Contract Development on Testnet
Truffle: Deploy ERC20 Contract
Step 1. Enter smart-contract-example/truffle folder
smart-contract-example/truffle folder$ cd cronos-smart-contract-example/truffleStep 2. Run npm install inside the folder
npm install inside the folder$ npm installStep 3. Make a copy of .env.example to .env
.env.example to .env$ cp .env.example .envStep 4. Modify .env and fill ONE of the field
.env and fill ONE of the fieldMNEMONIC=goose easy ivory ...
PRIVATE_KEY=XXXXXXXStep 5. Review Migration Script at migrations/2_deploy_cronos_token.js
migrations/2_deploy_cronos_token.jsStep 6. Endpoints setting
Step 7. Deploy Contract
Step 8. Obtain Contract address from console and input to Metamask



Hardhat: Deploy ERC20 Contract
Step 1. Enter smart-contract-example/hardhat folder
smart-contract-example/hardhat folderStep 2. Run npm install inside the folder
npm install inside the folderStep 3. Make a copy of .env.example to .env
.env.example to .envStep 4. Modify .env and fill ONE of the field
.env and fill ONE of the fieldStep 5. Review Migration Script at scripts/deploy-cronos-token.js
scripts/deploy-cronos-token.jsStep 6. Endpoints setting
Step 7. Deploy Contract
Step 8. Obtain Contract address from console and input to Metamask


Last updated
Was this helpful?