Airdrop Claim Smart Contract for LOWB
-
Before running this project, install truffle first:
npm install -g truffle
. -
Compile the smart contracts:
truffle compile
. -
Deploy to local network:
truffle migrate
. (You may need to start Ganache before migrating.) -
Now you can start to play with this contract:
truffle console
. For example, you can set up the white list by:truffle(development)> let instance = await AirdropClaim.deployed() truffle(development)> instance.setClaimExpiredAt(1621310400) truffle(development)> let whitelist = require('./whitelist.json') truffle(development)> instance.setupWhitelist(whitelist.candidates, whitelist.values)
- Create a new .secret file in root directory and enter your 12 word mnemonic seed phrase. Then just run
truffle migrate --network testnet
. You will deploy contracts to the Binance testnet. (You may need to install hdwallet-provider first:npm install @truffle/[email protected]
.) - To verify the contract, create a new .apikey file in root directory and enter the API Key. Then just run
truffle run verify AirdropClaim@{contract-address} --network testnet
. (You may need to install truffle-plugin-verify first:npm install -D truffle-plugin-verify
.)