Clone or donwload this repositorie.
Go to path and run on terminal:
npm install
After running, all dependecies will be downloaded.
Maybe you need install truffle as global dependency to run next steps.
truffle compile
After running, contract information — including ABI — will be available at the build/contracts/
directory.
You can run tests which can be found in the test directory /test
runing on terminal:
truffle test
Or run tests within a specific file:
truffle test <file_path>
Create .env file on root with:
PRIVATE_KEY = // Wallet private key
INFURA_PROJECT_ID = // Your Infura Project Id
TOKEN_NAME = "Token Name"
TOKEN_SYMBOL = "ERC"
TOKEN_DECIMALS = 18
TOKEN_TOTALSUPLY = 0
It is important that the chosen wallet has native tokens for the payment of gas.
Run migrate command:
truffle migrate --network <network_name> // mainnet, rinkeby, polygon, mumbai...
After migration, contract address and transaction ID will be shown on screen.