Skip to content

Commit

Permalink
Deploy Token Incentive contracts on zEVM (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello authored Oct 18, 2023
1 parent ccd893e commit ce2ae52
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/addresses/src/addresses.athens.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,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

0 comments on commit ce2ae52

Please sign in to comment.