Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Token Incentive contracts on zEVM #118

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/addresses/src/addresses.athens.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"multiChainSwap": "",
"multiChainSwapZetaConnector": "",
"multiChainValue": "0x82aC45D07dEe4DBDe050e838beF345347DEd99a8",
"rewardDistributorFactory": "0x3a969d797A28d61e8127562944E639a5824F1219",
"rewardDistributorFactory": "0x667e4C493d40015256BDC89E3ba750B2F90359E1",
"tridentPoolFactory": "",
"tss": "",
"tssUpdater": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const main = async () => {

const amount = parseEther("1");

if (ZETA_NETWORK !== "athens") {
if (networkName !== "athens") {
const zetaToken = await getErc20(getAddress("zetaToken"));
const tx = await zetaToken.approve(multiChainValueContract.address, amount.mul(10));
await tx.wait();
Expand All @@ -47,11 +47,11 @@ const main = async () => {
if (isZetaTestnet(ZETA_NETWORK)) {
const destinationAddress = ethers.utils.solidityPack(["address"], [process.env.PUBLIC_KEY_1 ?? signer.address]);

await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("goerli"), amount, destinationAddress);
// await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("klaytn-baobab"), amount, destinationAddress);
await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("polygon-mumbai"), amount, destinationAddress);
await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("bsc-testnet"), amount, destinationAddress);
await doTranfer(ZETA_NETWORK, multiChainValueContract, getChainId("athens"), amount, destinationAddress);
await doTranfer(networkName, multiChainValueContract, getChainId("goerli"), amount, destinationAddress);
// await doTranfer(networkName, multiChainValueContract, getChainId("klaytn-baobab"), amount, destinationAddress);
await doTranfer(networkName, multiChainValueContract, getChainId("polygon-mumbai"), amount, destinationAddress);
await doTranfer(networkName, multiChainValueContract, getChainId("bsc-testnet"), amount, destinationAddress);
await doTranfer(networkName, multiChainValueContract, getChainId("athens"), amount, destinationAddress);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ const addReward = async (
);

const ZETA = ERC20__factory.connect(zetaTokenAddress, deployer);
await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT.mul(2));
const tx = await ZETA.transfer(rewardDistributorContract.address, REWARDS_AMOUNT.mul(1));
await tx.wait();
await rewardDistributorContract.setRewardsDuration(REWARD_DURATION);
await rewardDistributorContract.notifyRewardAmount(REWARDS_AMOUNT);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const readRewardData = async (rewardContractAddress: string) => {
const rewardsDuration = await rewardDistributorContract.rewardsDuration();
const lastUpdateTime = await rewardDistributorContract.lastUpdateTime();
const rewardPerTokenStored = await rewardDistributorContract.rewardPerTokenStored();

if (rewardRate.isZero()) return;
console.table({
contract: rewardContractAddress,
lastUpdateTime: `${lastUpdateTime.toString()}-${new Date(lastUpdateTime.toNumber() * 1000).toISOString()}`,
Expand Down
Loading