diff --git a/.env.example b/.env.example index 2dbe4b520..bf062b0a9 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,3 @@ -# true or false - DEPLOYER_PRIVATE_KEY="" ## Archive nodes diff --git a/hardhat.config.ts b/hardhat.config.ts index 6064f4c00..c84d322f5 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,12 +1,12 @@ import "@nomicfoundation/hardhat-chai-matchers"; import "@nomiclabs/hardhat-ethers"; +import * as dotenv from "dotenv"; import { ethers } from "ethers"; import { HardhatUserConfig, task } from "hardhat/config"; import "./type-extensions"; -// eslint-disable-next-line @typescript-eslint/no-var-requires -require("dotenv").config(); +dotenv.config(); const DEPLOYER_PRIVATE_KEY = process.env.DEPLOYER_PRIVATE_KEY; task("accounts", "Prints the list of accounts", async (taskArgs, hre) => { diff --git a/multisig/proposals/vip-015/vip-015-ethereum.ts b/multisig/proposals/ethereum/vip-015/index.ts similarity index 83% rename from multisig/proposals/vip-015/vip-015-ethereum.ts rename to multisig/proposals/ethereum/vip-015/index.ts index 32d0b6a5d..191c712f9 100644 --- a/multisig/proposals/vip-015/vip-015-ethereum.ts +++ b/multisig/proposals/ethereum/vip-015/index.ts @@ -1,13 +1,13 @@ import { parseUnits } from "ethers/lib/utils"; -import { makeProposal } from "../../../src/utils"; +import { makeProposal } from "../../../../src/utils"; export const TREASURY = "0xFD9B071168bC27DBE16406eC3Aba050Ce8Eb22FA"; export const COMMUNITY_WALLET = "0xc444949e0054a23c44fc45789738bdf64aed2391"; export const XVS = "0xd3CC9d8f3689B83c91b7B59cAB4946B063EB894A"; export const XVS_AMOUNT = parseUnits("8000", 18).toString(); -export const vip015 = () => { +const vip015 = () => { return makeProposal([ { target: TREASURY, @@ -16,3 +16,5 @@ export const vip015 = () => { }, ]); }; + +export default vip015; diff --git a/multisig/proposals/sepolia/vip-002/index.ts b/multisig/proposals/sepolia/vip-002/index.ts index 58eaef633..6873fd40b 100644 --- a/multisig/proposals/sepolia/vip-002/index.ts +++ b/multisig/proposals/sepolia/vip-002/index.ts @@ -27,7 +27,6 @@ export const POOL_REGISTRY = "0x758f5715d817e02857Ba40889251201A5aE3E186"; export const RESILIENT_ORACLE = "0xEF4e53a9A4565ef243A2f0ee9a7fc2410E1aA623"; export const VTREASURY = "0x3370915301E8a6A6baAe6f461af703e2498409F3"; - // IL configuration const vip002 = () => { return makeProposal([ @@ -220,15 +219,7 @@ const vip002 = () => { target: POOL_REGISTRY, signature: "addMarket((address,uint256,uint256,uint256,address,uint256,uint256))", params: [ - [ - VWBTC_CORE, - "750000000000000000", - "800000000000000000", - "30000000", - VTREASURY, - "30000000000", - "25000000000", - ], + [VWBTC_CORE, "750000000000000000", "800000000000000000", "30000000", VTREASURY, "30000000000", "25000000000"], ], }, { diff --git a/multisig/proposals/vip-016/vip-016-sepolia.ts b/multisig/proposals/sepolia/vip-016/index.ts similarity index 94% rename from multisig/proposals/vip-016/vip-016-sepolia.ts rename to multisig/proposals/sepolia/vip-016/index.ts index 9effe7483..a38d16dd1 100644 --- a/multisig/proposals/vip-016/vip-016-sepolia.ts +++ b/multisig/proposals/sepolia/vip-016/index.ts @@ -1,4 +1,4 @@ -import { makeProposal } from "../../../src/utils"; +import { makeProposal } from "../../../../src/utils"; import { REWARD_DISTRIBUTOR_CORE_0, REWARD_DISTRIBUTOR_CORE_1, @@ -15,7 +15,7 @@ import { VWETH_CORE, VWETH_LST, VWSTETH_LST, -} from "../vip-006/vip-006-sepolia"; +} from "../vip-006"; // Start block considered Multisig tx executed https://sepolia.etherscan.io/tx/0x9785ef7f2eed457a934b194c5697bb94e060774e3deeecf5e26d58d37c764bff const REWARDS_START_BLOCK = 5530143; @@ -61,7 +61,7 @@ const lastRewardBlockConfig: LastRewardBlockConfig[] = [ }, ]; -export const vip016 = () => { +const vip016 = () => { return makeProposal([ ...lastRewardBlockConfig.map(config => { const lastRewardBlockArray = new Array(config.vTokens.length).fill(config.lastRewardBlock); @@ -73,3 +73,5 @@ export const vip016 = () => { }), ]); }; + +export default vip016; diff --git a/multisig/simulations/ethereum/index.ts b/multisig/simulations/ethereum/index.ts index f62b4068d..f8a744e03 100644 --- a/multisig/simulations/ethereum/index.ts +++ b/multisig/simulations/ethereum/index.ts @@ -8,3 +8,4 @@ import "./vip-009"; import "./vip-010"; import "./vip-013"; import "./vip-014"; +import "./vip-015"; diff --git a/multisig/simulations/ethereum/vip-002/index.ts b/multisig/simulations/ethereum/vip-002/index.ts index 8cd8646cf..394935810 100644 --- a/multisig/simulations/ethereum/vip-002/index.ts +++ b/multisig/simulations/ethereum/vip-002/index.ts @@ -20,9 +20,7 @@ const POOL_REGISTRY = "0x61CAff113CCaf05FFc6540302c37adcf077C5179"; const TREASURY = "0xfd9b071168bc27dbe16406ec3aba050ce8eb22fa"; const CRV_VTOKEN_RECEIVER = "0x7a16fF8270133F063aAb6C9977183D9e72835428"; -const RESILIENT_ORACLE = sepolia.RESILIENT_ORACLE; const GUARDIAN = "0x94fa6078b6b8a26F0B6EDFFBE6501B22A10470fB"; -const POOL_REGISTRY = sepolia.POOL_REGISTRY; const BLOCKS_PER_YEAR = 2_628_000; // assuming a block is mined every 12 seconds diff --git a/multisig/simulations/vip-015/vip-015-ethereum/abi/XVS.json b/multisig/simulations/ethereum/vip-015/abi/XVS.json similarity index 100% rename from multisig/simulations/vip-015/vip-015-ethereum/abi/XVS.json rename to multisig/simulations/ethereum/vip-015/abi/XVS.json diff --git a/multisig/simulations/vip-015/vip-015-ethereum/simulations.ts b/multisig/simulations/ethereum/vip-015/index.ts similarity index 85% rename from multisig/simulations/vip-015/vip-015-ethereum/simulations.ts rename to multisig/simulations/ethereum/vip-015/index.ts index edf33f82f..aa23426eb 100644 --- a/multisig/simulations/vip-015/vip-015-ethereum/simulations.ts +++ b/multisig/simulations/ethereum/vip-015/index.ts @@ -4,8 +4,8 @@ import { parseUnits } from "ethers/lib/utils"; import { ethers } from "hardhat"; import { forking, pretendExecutingVip } from "../../../../src/vip-framework"; -import { COMMUNITY_WALLET, TREASURY, XVS, vip015 } from "../../../proposals/vip-015/vip-015-ethereum"; -import XVS_ABI from "./abi/XVS.json"; +import vip015, { COMMUNITY_WALLET, TREASURY, XVS } from "../../../proposals/ethereum/vip-015"; +import XVS_ABI from "../../vip-015/vip-015-ethereum/abi/XVS.json"; forking(19474280, () => { let xvs: Contract; diff --git a/multisig/simulations/sepolia/index.ts b/multisig/simulations/sepolia/index.ts index 6c8413bb7..db9bbc01d 100644 --- a/multisig/simulations/sepolia/index.ts +++ b/multisig/simulations/sepolia/index.ts @@ -9,3 +9,4 @@ import "./vip-008"; import "./vip-009"; // import './vip-010' // passes when run separately import "./vip-013"; +import "./vip-016"; diff --git a/multisig/simulations/sepolia/vip-002/index.ts b/multisig/simulations/sepolia/vip-002/index.ts index 6f3990c6a..82436927e 100644 --- a/multisig/simulations/sepolia/vip-002/index.ts +++ b/multisig/simulations/sepolia/vip-002/index.ts @@ -1,5 +1,5 @@ import { expect } from "chai"; -import { BigNumberish, BigNumber } from "ethers"; +import { BigNumber, BigNumberish } from "ethers"; import { Contract } from "ethers"; import { parseUnits } from "ethers/lib/utils"; import { ethers } from "hardhat"; @@ -8,36 +8,36 @@ import { forking, pretendExecutingVip } from "../../../../src/vip-framework"; import { checkVToken } from "../../../../src/vip-framework/checks/checkVToken"; import { checkInterestRate } from "../../../../src/vip-framework/checks/interestRateModel"; import vip002, { - VWBTC_CORE, - VWETH_CORE, - VUSDT_CORE, - VUSDC_CORE, - VCRVUSD_CORE, - VCRV_CORE, - VUSDC_STABLECOINS, - VUSDT_STABLECOINS, - VCRVUSD_STABLECOINS, - VCRVUSD_CURVE, - VCRV_CURVE, + COMPTROLLER_CORE, + COMPTROLLER_CURVE, + COMPTROLLER_STABLECOINS, + MOCK_CRV, + MOCK_USDC, + MOCK_USDT, MOCK_WBTC, MOCK_WETH, - MOCK_USDT, - MOCK_USDC, - MOCK_CRV, MOCK_crvUSD, - COMPTROLLER_CORE, - RESILIENT_ORACLE, POOL_REGISTRY, + RESILIENT_ORACLE, + VCRVUSD_CORE, + VCRVUSD_CURVE, + VCRVUSD_STABLECOINS, + VCRV_CORE, + VCRV_CURVE, VTREASURY, - COMPTROLLER_STABLECOINS, - COMPTROLLER_CURVE, + VUSDC_CORE, + VUSDC_STABLECOINS, + VUSDT_CORE, + VUSDT_STABLECOINS, + VWBTC_CORE, + VWETH_CORE, } from "../../../proposals/sepolia/vip-002"; import COMPTROLLER_ABI from "./abi/comptroller.json"; import ERC20_ABI from "./abi/erc20.json"; import POOL_REGISTRY_ABI from "./abi/poolRegistry.json"; import VTOKEN_ABI from "./abi/vToken.json"; -const BLOCKS_PER_YEAR = BigNumber.from('2252571'); // assuming a block is mined every 14 seconds +const BLOCKS_PER_YEAR = BigNumber.from("2252571"); // assuming a block is mined every 14 seconds const GUARDIAN = "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf"; type VTokenSymbol = @@ -346,9 +346,9 @@ forking(4783370, () => { poolRegistry = await ethers.getContractAt(POOL_REGISTRY_ABI, POOL_REGISTRY); }); - describe("Contracts setup", () => { + describe("Contracts setup", async () => { for (const [symbol, address] of Object.entries(vTokens) as [VTokenSymbol, string][]) { - checkVToken(address, vTokenState[symbol]); + await checkVToken(address, vTokenState[symbol]); } }); @@ -559,4 +559,4 @@ forking(4783370, () => { } }); }); -}); \ No newline at end of file +}); diff --git a/multisig/simulations/vip-016/vip-016-sepolia/abi/rewardsDistributor.json b/multisig/simulations/sepolia/vip-016/abi/rewardsDistributor.json similarity index 100% rename from multisig/simulations/vip-016/vip-016-sepolia/abi/rewardsDistributor.json rename to multisig/simulations/sepolia/vip-016/abi/rewardsDistributor.json diff --git a/multisig/simulations/vip-016/vip-016-sepolia/abi/vToken.json b/multisig/simulations/sepolia/vip-016/abi/vToken.json similarity index 100% rename from multisig/simulations/vip-016/vip-016-sepolia/abi/vToken.json rename to multisig/simulations/sepolia/vip-016/abi/vToken.json diff --git a/multisig/simulations/vip-016/vip-016-sepolia/simulations.ts b/multisig/simulations/sepolia/vip-016/index.ts similarity index 93% rename from multisig/simulations/vip-016/vip-016-sepolia/simulations.ts rename to multisig/simulations/sepolia/vip-016/index.ts index c19ec4a9b..c663317e4 100644 --- a/multisig/simulations/vip-016/vip-016-sepolia/simulations.ts +++ b/multisig/simulations/sepolia/vip-016/index.ts @@ -19,10 +19,10 @@ import { VWETH_CORE, VWETH_LST, VWSTETH_LST, -} from "../../../proposals/vip-006/vip-006-sepolia"; -import { vip016 } from "../../../proposals/vip-016/vip-016-sepolia"; -import REWARDS_DISTRIBUTOR_ABI from "./abi/rewardsDistributor.json"; -import VTOKEN_ABI from "./abi/vToken.json"; +} from "../../../proposals/sepolia/vip-006"; +import vip016 from "../../../proposals/sepolia/vip-016"; +import REWARDS_DISTRIBUTOR_ABI from "../../vip-016/vip-016-sepolia/abi/rewardsDistributor.json"; +import VTOKEN_ABI from "../../vip-016/vip-016-sepolia/abi/vToken.json"; // Start block considered Multisig tx executed https://sepolia.etherscan.io/tx/0x9785ef7f2eed457a934b194c5697bb94e060774e3deeecf5e26d58d37c764bff const REWARDS_START_BLOCK = 5530143;