- Make sure to use node 12.12.0
- Run
npm installin project root directory - Create
.envfile:
PRIVATE_KEY="{YOUR_PRIVATE_KEY}"
CONTRACT_OWNER="{CONTRACT_OWNER}"
FEE_LIMIT="{FEE_LIMIT}"
USER_FEE_PERCENTAGE="{USER_FEE_PERCENTAGE}"
PROXY_ADDRESS="{PROXY_ADDRESS}"
CONTRACT_VERSION_1_ADDRESS="{CONTRACT_VERSION_1_ADDRESS}"
CONTRACT_VERSION_2_ADDRESS="{CONTRACT_VERSION_2_ADDRESS}"
- Run
npm run rebuildin project root directory
As a testnet network we can use Shasta. Shasta's test coins can be obtained https://www.trongrid.io/shasta/#request. Transactions for testnet can be found on https://shasta.tronscan.org/#/. For test deploying:
- Run
npx hardhat run --network testnet ./scripts/1_deploy_proxy.tsto deploy test proxy. - Run
npx hardhat run --network testnet ./scripts/2_deploy_contract.tsto deploy test contract. - Run
npx hardhat run --network testnet ./scripts/3_set_initial_proxy_state.tsto set initial proxy state. - Run
npx hardhat run --network testnet ./scripts/4_mint_tokens.tsto mint test tokens. - Run
npx hardhat run --network testnet ./scripts/5_deploy_new_contract.tsto deploy test contract V2. - Run
npx hardhat run --network testnet ./scripts/6_upgrade_contract.tsto upgrade proxy contract. - Run
npx hardhat run --network testnet ./scripts/7_burn_tokens.tsto burn test tokens.
After EACH script on https://shasta.tronscan.org/ check that transaction was confirmed.