Skip to content

Commit

Permalink
fix: changed var name
Browse files Browse the repository at this point in the history
  • Loading branch information
web3rover committed Dec 24, 2024
1 parent 8d54e8a commit e1035ff
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
6 changes: 3 additions & 3 deletions simulations/vip-410/arbitrumone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ forking(288053557, async () => {
isBorrowerAllocation,
vToken,
rewardsDistributor,
blocksPerMonth,
blocksOrSecondsPerMonth,
} of emissions) {
if (chainId == LzChainId.arbitrumone) {
const rewardDistirbutor = new ethers.Contract(rewardsDistributor, REWARDS_DISTRIBUTOR_ABI, ethers.provider);
if (isSupplierAllocation) {
expect(await rewardDistirbutor.rewardTokenSupplySpeeds(vToken)).to.equals(
newAllocation.div(blocksPerMonth),
newAllocation.div(blocksOrSecondsPerMonth),
);
expect(await rewardDistirbutor.rewardTokenBorrowSpeeds(vToken)).to.equals(0);
}

if (isBorrowerAllocation) {
expect(await rewardDistirbutor.rewardTokenSupplySpeeds(vToken)).to.equals(0);
expect(await rewardDistirbutor.rewardTokenBorrowSpeeds(vToken)).to.equals(
newAllocation.div(blocksPerMonth),
newAllocation.div(blocksOrSecondsPerMonth),
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions simulations/vip-410/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ forking(21470971, async () => {
isBorrowerAllocation,
vToken,
rewardsDistributor,
blocksPerMonth,
blocksOrSecondsPerMonth,
} of emissions) {
if (chainId == LzChainId.ethereum) {
const rewardDistirbutor = new ethers.Contract(rewardsDistributor, REWARDS_DISTRIBUTOR_ABI, ethers.provider);
if (isSupplierAllocation) {
expect(await rewardDistirbutor.rewardTokenSupplySpeeds(vToken)).to.equals(
newAllocation.div(blocksPerMonth),
newAllocation.div(blocksOrSecondsPerMonth),
);
expect(await rewardDistirbutor.rewardTokenBorrowSpeeds(vToken)).to.equals(0);
}

if (isBorrowerAllocation) {
expect(await rewardDistirbutor.rewardTokenSupplySpeeds(vToken)).to.equals(0);
expect(await rewardDistirbutor.rewardTokenBorrowSpeeds(vToken)).to.equals(
newAllocation.div(blocksPerMonth),
newAllocation.div(blocksOrSecondsPerMonth),
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions simulations/vip-410/zksyncmainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ forking(52050098, async () => {
isBorrowerAllocation,
vToken,
rewardsDistributor,
blocksPerMonth,
blocksOrSecondsPerMonth,
} of emissions) {
if (chainId == LzChainId.zksyncmainnet) {
const rewardDistirbutor = new ethers.Contract(rewardsDistributor, REWARDS_DISTRIBUTOR_ABI, ethers.provider);
if (isSupplierAllocation) {
expect(await rewardDistirbutor.rewardTokenSupplySpeeds(vToken)).to.equals(
newAllocation.div(blocksPerMonth),
newAllocation.div(blocksOrSecondsPerMonth),
);
expect(await rewardDistirbutor.rewardTokenBorrowSpeeds(vToken)).to.equals(0);
}

if (isBorrowerAllocation) {
expect(await rewardDistirbutor.rewardTokenSupplySpeeds(vToken)).to.equals(0);
expect(await rewardDistirbutor.rewardTokenBorrowSpeeds(vToken)).to.equals(
newAllocation.div(blocksPerMonth),
newAllocation.div(blocksOrSecondsPerMonth),
);
}
}
Expand Down
42 changes: 21 additions & 21 deletions vips/vip-410/bscmainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { LzChainId } from "src/types";
import { ProposalType } from "../../src/types";
import { makeProposal } from "../../src/utils";

export const ZKSYNC_BLOCKS_PER_MONTH = 2592000;
export const ARBITRUM_BLOCKS_PER_MONTH = 2592000;
export const ZKSYNC_SECONDS_PER_MONTH = 2592000;
export const ARBITRUM_SECONDS_PER_MONTH = 2592000;
export const ETHEREUM_BLOCKS_PER_MONTH = 216000;
export const BSC_BLOCKS_PER_MONTH = 864000;

Expand Down Expand Up @@ -44,7 +44,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0x697a70779C1A03Ba2BD28b7627a902BFf831b616",
rewardsDistributor: ZKSYNC_XVS_REWARDS_DISTRIBUTOR,
blocksPerMonth: ZKSYNC_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ZKSYNC_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.zksyncmainnet,
Expand All @@ -53,7 +53,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0x1Fa916C27c7C2c4602124A14C77Dbb40a5FF1BE8",
rewardsDistributor: ZKSYNC_XVS_REWARDS_DISTRIBUTOR,
blocksPerMonth: ZKSYNC_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ZKSYNC_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.zksyncmainnet,
Expand All @@ -62,7 +62,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0xAF8fD83cFCbe963211FAaf1847F0F217F80B4719",
rewardsDistributor: ZKSYNC_XVS_REWARDS_DISTRIBUTOR,
blocksPerMonth: ZKSYNC_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ZKSYNC_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.zksyncmainnet,
Expand All @@ -71,7 +71,7 @@ export const emissions = [
isBorrowerAllocation: true,
vToken: "0x69cDA960E3b20DFD480866fFfd377Ebe40bd0A46",
rewardsDistributor: ZKSYNC_XVS_REWARDS_DISTRIBUTOR,
blocksPerMonth: ZKSYNC_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ZKSYNC_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.zksyncmainnet,
Expand All @@ -80,7 +80,7 @@ export const emissions = [
isBorrowerAllocation: true,
vToken: "0x1aF23bD57c62A99C59aD48236553D0Dd11e49D2D",
rewardsDistributor: ZKSYNC_XVS_REWARDS_DISTRIBUTOR,
blocksPerMonth: ZKSYNC_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ZKSYNC_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.ethereum,
Expand All @@ -89,7 +89,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0x7c8ff7d2A1372433726f879BD945fFb250B94c65",
rewardsDistributor: ETHEREUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
},
{
chainId: LzChainId.ethereum,
Expand All @@ -98,7 +98,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0x8716554364f20BCA783cb2BAA744d39361fd1D8d",
rewardsDistributor: ETHEREUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
},
{
chainId: LzChainId.ethereum,
Expand All @@ -107,7 +107,7 @@ export const emissions = [
isBorrowerAllocation: true,
vToken: "0x8C3e3821259B82fFb32B2450A95d2dcbf161C24E",
rewardsDistributor: ETHEREUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
},
{
chainId: LzChainId.ethereum,
Expand All @@ -116,7 +116,7 @@ export const emissions = [
isBorrowerAllocation: true,
vToken: "0x17C07e0c232f2f80DfDbd7a95b942D893A4C5ACb",
rewardsDistributor: ETHEREUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
},
{
chainId: LzChainId.ethereum,
Expand All @@ -125,7 +125,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0xc82780Db1257C788F262FBbDA960B3706Dfdcaf2",
rewardsDistributor: ETHEREUM_XVS_REWARDS_DISTRIBUTOR_LST,
blocksPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ETHEREUM_BLOCKS_PER_MONTH,
},
{
chainId: LzChainId.arbitrumone,
Expand All @@ -134,7 +134,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0xAeB0FEd69354f34831fe1D16475D9A83ddaCaDA6",
rewardsDistributor: ARBITRUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ARBITRUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ARBITRUM_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.arbitrumone,
Expand All @@ -143,7 +143,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0x68a34332983f4Bf866768DD6D6E638b02eF5e1f0",
rewardsDistributor: ARBITRUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ARBITRUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ARBITRUM_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.arbitrumone,
Expand All @@ -152,7 +152,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0xaDa57840B372D4c28623E87FC175dE8490792811",
rewardsDistributor: ARBITRUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ARBITRUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ARBITRUM_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.arbitrumone,
Expand All @@ -161,7 +161,7 @@ export const emissions = [
isBorrowerAllocation: true,
vToken: "0xB9F9117d4200dC296F9AcD1e8bE1937df834a2fD",
rewardsDistributor: ARBITRUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ARBITRUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ARBITRUM_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.arbitrumone,
Expand All @@ -170,7 +170,7 @@ export const emissions = [
isBorrowerAllocation: true,
vToken: "0x7D8609f8da70fF9027E9bc5229Af4F6727662707",
rewardsDistributor: ARBITRUM_XVS_REWARDS_DISTRIBUTOR_CORE,
blocksPerMonth: ARBITRUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ARBITRUM_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.arbitrumone,
Expand All @@ -179,7 +179,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0x39D6d13Ea59548637104E40e729E4aABE27FE106",
rewardsDistributor: ARBITRUM_XVS_REWARDS_DISTRIBUTOR_LST,
blocksPerMonth: ARBITRUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ARBITRUM_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.arbitrumone,
Expand All @@ -188,7 +188,7 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0x9df6B5132135f14719696bBAe3C54BAb272fDb16",
rewardsDistributor: ARBITRUM_XVS_REWARDS_DISTRIBUTOR_LST,
blocksPerMonth: ARBITRUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ARBITRUM_SECONDS_PER_MONTH,
},
{
chainId: LzChainId.arbitrumone,
Expand All @@ -197,12 +197,12 @@ export const emissions = [
isBorrowerAllocation: false,
vToken: "0x246a35E79a3a0618535A469aDaF5091cAA9f7E88",
rewardsDistributor: ARBITRUM_XVS_REWARDS_DISTRIBUTOR_LST,
blocksPerMonth: ARBITRUM_BLOCKS_PER_MONTH,
blocksOrSecondsPerMonth: ARBITRUM_SECONDS_PER_MONTH,
},
];

const commands = emissions.map(emission => {
const speed = emission.newAllocation.div(emission.blocksPerMonth);
const speed = emission.newAllocation.div(emission.blocksOrSecondsPerMonth);
return {
target: emission.rewardsDistributor,
signature: "setRewardTokenSpeeds(address[],uint256[],uint256[])",
Expand Down

0 comments on commit e1035ff

Please sign in to comment.