To deploy the USDC contract, first create a config.json
file in the deploy/config
folder, based on the config.example.json
file.
Then, run the following command to generate the typings:
npm run build
The command above fetches the USDC contracts' source code and compiles them with Truffle, instead of using the existing Hardhat in the project, to avoid the USDC contract bytecode mismatch issue. This is related to the following issue: Hardhat and Truffle with same compiler options compile different bytecode
After that, create a .env
file at the root of the project, based on the .env.example
file.
Finally, run the following command to deploy the USDC contract on the QTum testnet:
npm run deploy-qtum-testnet
After each contract deployment, the deployed addresses of the contract are saved in the .migrate.storage.json
file.
So, in the case where deployment stops at the third step, for example, just comment out the already completed transactions and run the following command to continue the migration process:
npx hardhat migrate --network qtumTestnet --from 3 --continue
If you run the command above without the
--continue
option, it will remove all previous records from the.migrate.storage.json
file.
- Typings are generated based on the artifacts that are created after the Truffle compilation process of the
stablecoin-evm
contracts. - qtum-ethers-wrapper is used for contract deployment and interaction, so almost all features of the @solarity/hardhat-migrate are not supported.