You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nico
9e41dba391
|
2 years ago | |
---|---|---|
contracts | 2 years ago | |
scripts | 2 years ago | |
.gitignore | 2 years ago | |
README.md | 2 years ago | |
hardhat.config.js | 2 years ago | |
package-lock.json | 2 years ago | |
package.json | 2 years ago |
README.md
Kaly Chain wKLC Token & Vesting Contract Deploy and Verify
How to configue harhat.config.js
module.exports = {
solidity: {
compilers: [
{
version: "0.8.11",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
}
],
},
networks: {
kaly: {
url: "https://testnetrpc.kalychain.io/rpc",
accounts: ['put your private key here dont forget to remove before uploading to github'],
gas: 3000000,
gasPrice: 8000000000,
}
},
etherscan: {
apiKey: {
kaly: "abc"
},
customChains: [
{
network: "kaly",
chainId: 3889,
allowUnlimitedContractSize: true,
gas: 3000000,
gasPrice: 8000000000,
urls: {
apiURL: "https://testnet.kalyscan.io/api",
browserURL: "https://testnet.kalyscan.io"
}
}
]
}
};
How to deploy wKLC token and Vesting contract
Deploy token contract
npx hardhat run scripts/deploy_token.js --network kaly
Deploy token vesting contract
Before deploy, you have to update scripts/deploy_vesting.js
as you can see below with the wKLC address.
const TokenVesting = await ethers.getContractFactory("TokenVesting");
const tokenVesting = await TokenVesting.deploy(
Token = "0x069255299Bb729399f3CECaBdc73d15d3D10a2A3"
);
console.log("TokenVesting address:", tokenVesting.address);
}
npx hardhat run scripts/deploy_vesting.js --network kaly
Update scripts/verify_vesting.js
with the Token Vesting address and wKLC address
verify_vesting.js
await hre.run("verify:verify", {
address: Deployed Token Vesting contract address,
constructorArguments: [
0x069255299Bb729399f3CECaBdc73d15d3D10a2A3
]
})
The final step is run below commands.
npx hardhat run scripts/verify_token.js --network kaly
npx hardhat run scripts/verify_vesting.js --network kaly
Finally, you will get fully verified wKLC Token and Vesting contracts.