This is a quickstart repo to easily deploy sample ERC-20 and/or ERC-721 token(s) that includes the hooks for using the Forte Rules Engine.
Check the docs at https://docs.forterulesengine.io/guides/ for more info.
This is a template repository that you can easily copy to your own github account with the "Use this template" button on home page of the repo. Then simply clone to your local machine to begin.
git clone git@github.com:<YOUR_GITHUB_USERNAME>/fre-tokens-quickstart.git
The project includes a sample.env
to get you started. Copy that to a new file named .env
and fill in the values.
cp sample.env .env
ETH_RPC_URL=
PRIV_KEY=
TOKEN_ADMIN=
ETHERSCAN_API_KEY=
Next, make your environment variables available to the command line for running the scripts to deploy your token contract.
source .env
forge script script/QuickstartERC20.s.sol:DeployQuickstartERC20 --rpc-url $ETH_RPC_URL --private-key $PRIV_KEY --broadcast --verify
Note
For the contract verification to work, you'll need to set the ETHERSCAN_API_KEY
value in the .env
file. You can obtain this for free from basescan.org. You can optionally remove the --verify
switch from the above command.
cast send 0xYourTokenAddress "mint(address,uint256)" 0xRecipientAddress 1000000000000000000000 --private-key $PRIV_KEY --rpc-url $ETH_RPC_URL
forge script script/QuickstartERC721.s.sol:DeployQuickstartERC721 --rpc-url $ETH_RPC_URL --private-key $PRIV_KEY --broadcast --verify
Note
For the contract verification to work, you'll need to set the ETHERSCAN_API_KEY
value in the .env
file. You can obtain this for free from basescan.org. You can optionally remove the --verify
switch from the above command.
cast send 0xYourTokenAddress "mint(address,uint256)" 0xRecipientAddress 1000000000000000000000 --private-key $PRIV_KEY --rpc-url $ETH_RPC_URL
These are some sample contracts that can be used as starting points for oracle based rules.
forge script script/OracleDenied.s.sol:DeployOracleDenied --rpc-url $ETH_RPC_URL --private-key $PRIV_KEY --broadcast --verify
forge script script/OracleApproved.s.sol:DeployOracleApproved --rpc-url $ETH_RPC_URL --private-key $PRIV_KEY --broadcast --verify