From ef0fa556801111e4dd494752c1b7715d1bfdb531 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Tue, 10 Sep 2024 20:19:06 +0530 Subject: [PATCH 1/6] feat: add core pool vip for opsepolia --- multisig/proposals/opsepolia/vip-004/index.ts | 367 +++ .../opsepolia/vip-004/abi/WETH.json | 557 +++++ .../opsepolia/vip-004/abi/comptroller.json | 1496 ++++++++++++ .../opsepolia/vip-004/abi/erc20.json | 295 +++ .../opsepolia/vip-004/abi/poolRegistry.json | 724 ++++++ .../opsepolia/vip-004/abi/rateModel.json | 118 + .../opsepolia/vip-004/abi/vToken.json | 2066 +++++++++++++++++ .../simulations/opsepolia/vip-004/index.ts | 411 ++++ src/networkAddresses.ts | 2 + 9 files changed, 6036 insertions(+) create mode 100644 multisig/proposals/opsepolia/vip-004/index.ts create mode 100644 multisig/simulations/opsepolia/vip-004/abi/WETH.json create mode 100644 multisig/simulations/opsepolia/vip-004/abi/comptroller.json create mode 100644 multisig/simulations/opsepolia/vip-004/abi/erc20.json create mode 100644 multisig/simulations/opsepolia/vip-004/abi/poolRegistry.json create mode 100644 multisig/simulations/opsepolia/vip-004/abi/rateModel.json create mode 100644 multisig/simulations/opsepolia/vip-004/abi/vToken.json create mode 100644 multisig/simulations/opsepolia/vip-004/index.ts diff --git a/multisig/proposals/opsepolia/vip-004/index.ts b/multisig/proposals/opsepolia/vip-004/index.ts new file mode 100644 index 000000000..3eca4ad23 --- /dev/null +++ b/multisig/proposals/opsepolia/vip-004/index.ts @@ -0,0 +1,367 @@ +import { parseUnits } from "ethers/lib/utils"; +import { NETWORK_ADDRESSES, ZERO_ADDRESS } from "src/networkAddresses"; +import { makeProposal } from "src/utils"; + +const { opsepolia } = NETWORK_ADDRESSES; + +export const ACM = "0x1652E12C8ABE2f0D84466F0fc1fA4286491B3BC1"; +export const COMPTROLLER_CORE = "0x59d10988974223B042767aaBFb6D926863069535"; + +export const MOCK_WBTC = "0x9f5039a86AF12AB10Ff16659eA0885bb4C04d013"; +export const WETH = "0x4200000000000000000000000000000000000006"; +export const MOCK_USDT = "0x9AD0542c71c09B764cf58d38918892F3Ae7ecc63"; +export const MOCK_USDC = "0x71B49d40B10Aa76cc44954e821eB6eA038Cf196F"; +export const MOCK_OP = "0xEC5f6eB84677F562FC568B89121C5E5C19639776"; + +export const VWBTC_CORE = "0x6149eFAd7671f496C900B3BeC16Ba31Aed60BE4b"; +export const VWETH_CORE = "0x4E610626BeF901EEE22D558b2ed19e6f7B87cf51"; +export const VUSDC_CORE = "0x2419606690B08060ebFd7581e0a6Ae45f1915ee9"; +export const VUSDT_CORE = "0xC23D18536E7069f924B3717B2710CA6A09e53ea9"; +export const VOP_CORE = "0x49cceCdd0b399C1b13260452893A3A835bDad5DC"; + +export const PSR = "0x4d3785aD3767b93231C19543AA7c9BcD098F1f15"; + +// IL configuration +const vip004 = () => { + return makeProposal([ + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setCollateralFactor(address,uint256,uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setMarketSupplyCaps(address[],uint256[])", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setMarketBorrowCaps(address[],uint256[])", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setLiquidationIncentive(uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setCloseFactor(uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setMinLiquidatableCollateral(uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setActionsPaused(address[],uint256[],bool)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "addPool(string,address,uint256,uint256,uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setPoolName(address,string)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "updatePoolMetadata(address,VenusPoolMetaData)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setProtocolSeizeShare(uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setReserveFactor(uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setInterestRateModel(address)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "updateJumpRateModel(uint256,uint256,uint256,uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setRewardTokenSpeeds(address[],uint256[],uint256[])", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setLastRewardingBlock(address[],uint32[],uint32[])", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setCollateralFactor(address,uint256,uint256)", opsepolia.POOL_REGISTRY], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [opsepolia.POOL_REGISTRY, "addMarket(AddMarketInput)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setReduceReservesBlockDelta(uint256)", opsepolia.NORMAL_TIMELOCK], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setMarketSupplyCaps(address[],uint256[])", opsepolia.POOL_REGISTRY], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setMarketBorrowCaps(address[],uint256[])", opsepolia.POOL_REGISTRY], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setLiquidationIncentive(uint256)", opsepolia.POOL_REGISTRY], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setCloseFactor(uint256)", opsepolia.POOL_REGISTRY], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "setMinLiquidatableCollateral(uint256)", opsepolia.POOL_REGISTRY], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [ZERO_ADDRESS, "supportMarket(address)", opsepolia.POOL_REGISTRY], + }, + { target: opsepolia.POOL_REGISTRY, signature: "acceptOwnership()", params: [] }, + { target: COMPTROLLER_CORE, signature: "acceptOwnership()", params: [] }, + { + target: COMPTROLLER_CORE, + signature: "setPriceOracle(address)", + params: [opsepolia.RESILIENT_ORACLE], + }, + { + target: opsepolia.POOL_REGISTRY, + signature: "addPool(string,address,uint256,uint256,uint256)", + params: ["Core", COMPTROLLER_CORE, parseUnits("0.5", 18), parseUnits("1.1", 18), parseUnits("100", 18)], + }, + { + target: opsepolia.VTREASURY, + signature: "withdrawTreasuryToken(address,uint256,address)", + params: [MOCK_WBTC, "3553143", opsepolia.NORMAL_TIMELOCK], + }, + { + target: MOCK_WBTC, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, 0], + }, + { + target: MOCK_WBTC, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, "3553143"], + }, + { + target: VWBTC_CORE, + signature: "setReduceReservesBlockDelta(uint256)", + params: ["86400"], + }, + { + target: VWBTC_CORE, + signature: "setProtocolShareReserve(address)", + params: [PSR], + }, + { + target: opsepolia.POOL_REGISTRY, + signature: "addMarket((address,uint256,uint256,uint256,address,uint256,uint256))", + params: [ + [ + VWBTC_CORE, + parseUnits("0.7", 18), + parseUnits("0.75", 18), + "3553143", + opsepolia.VTREASURY, + parseUnits("1", 8), + parseUnits(".55", 8), + ], + ], + }, + { + target: opsepolia.VTREASURY, + signature: "withdrawTreasuryToken(address,uint256,address)", + params: [WETH, "610978879332136515", opsepolia.NORMAL_TIMELOCK], + }, + { + target: WETH, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, 0], + }, + { + target: WETH, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, "610978879332136515"], + }, + { + target: VWETH_CORE, + signature: "setReduceReservesBlockDelta(uint256)", + params: ["86400"], + }, + { + target: VWETH_CORE, + signature: "setProtocolShareReserve(address)", + params: [PSR], + }, + { + target: opsepolia.POOL_REGISTRY, + signature: "addMarket((address,uint256,uint256,uint256,address,uint256,uint256))", + params: [ + [ + VWETH_CORE, + parseUnits("0.7", 18), + parseUnits("0.75", 18), + "610978879332136515", + opsepolia.VTREASURY, + parseUnits("25", 18), + parseUnits("16", 18), + ], + ], + }, + { + target: opsepolia.VTREASURY, + signature: "withdrawTreasuryToken(address,uint256,address)", + params: [MOCK_USDC, parseUnits("1800", 6), opsepolia.NORMAL_TIMELOCK], + }, + { + target: MOCK_USDC, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, 0], + }, + { + target: MOCK_USDC, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, parseUnits("1800", 6)], + }, + { + target: VUSDC_CORE, + signature: "setReduceReservesBlockDelta(uint256)", + params: ["86400"], + }, + { + target: VUSDC_CORE, + signature: "setProtocolShareReserve(address)", + params: [PSR], + }, + { + target: opsepolia.POOL_REGISTRY, + signature: "addMarket((address,uint256,uint256,uint256,address,uint256,uint256))", + params: [ + [ + VUSDC_CORE, + parseUnits("0.75", 18), + parseUnits("0.77", 18), + parseUnits("1800", 6), + opsepolia.VTREASURY, + parseUnits("150000", 6), + parseUnits("130000", 6), + ], + ], + }, + { + target: opsepolia.VTREASURY, + signature: "withdrawTreasuryToken(address,uint256,address)", + params: [MOCK_USDT, parseUnits("1800", 6), opsepolia.NORMAL_TIMELOCK], + }, + { + target: MOCK_USDT, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, 0], + }, + { + target: MOCK_USDT, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, parseUnits("1800", 6)], + }, + { + target: VUSDT_CORE, + signature: "setReduceReservesBlockDelta(uint256)", + params: ["86400"], + }, + { + target: VUSDT_CORE, + signature: "setProtocolShareReserve(address)", + params: [PSR], + }, + { + target: opsepolia.POOL_REGISTRY, + signature: "addMarket((address,uint256,uint256,uint256,address,uint256,uint256))", + params: [ + [ + VUSDT_CORE, + parseUnits("0.75", 18), + parseUnits("0.77", 18), + parseUnits("1800", 6), + opsepolia.VTREASURY, + parseUnits("150000", 6), + parseUnits("130000", 6), + ], + ], + }, + { + target: opsepolia.VTREASURY, + signature: "withdrawTreasuryToken(address,uint256,address)", + params: [MOCK_OP, "610978879332136515", opsepolia.NORMAL_TIMELOCK], + }, + { + target: MOCK_OP, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, 0], + }, + { + target: MOCK_OP, + signature: "approve(address,uint256)", + params: [opsepolia.POOL_REGISTRY, "610978879332136515"], + }, + { + target: VOP_CORE, + signature: "setReduceReservesBlockDelta(uint256)", + params: ["86400"], + }, + { + target: VOP_CORE, + signature: "setProtocolShareReserve(address)", + params: [PSR], + }, + { + target: opsepolia.POOL_REGISTRY, + signature: "addMarket((address,uint256,uint256,uint256,address,uint256,uint256))", + params: [ + [ + VOP_CORE, + parseUnits("0.7", 18), + parseUnits("0.75", 18), + "610978879332136515", + opsepolia.VTREASURY, + parseUnits("25", 18), + parseUnits("16", 18), + ], + ], + }, + ]); +}; + +export default vip004; diff --git a/multisig/simulations/opsepolia/vip-004/abi/WETH.json b/multisig/simulations/opsepolia/vip-004/abi/WETH.json new file mode 100644 index 000000000..5e2e37081 --- /dev/null +++ b/multisig/simulations/opsepolia/vip-004/abi/WETH.json @@ -0,0 +1,557 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "bridgeBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "bridgeMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address", + "name": "l2Gateway_", + "type": "address" + }, + { + "internalType": "address", + "name": "l1Address_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "l1Address", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2Gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/multisig/simulations/opsepolia/vip-004/abi/comptroller.json b/multisig/simulations/opsepolia/vip-004/abi/comptroller.json new file mode 100644 index 000000000..fafe7b35e --- /dev/null +++ b/multisig/simulations/opsepolia/vip-004/abi/comptroller.json @@ -0,0 +1,1496 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "poolRegistry_", + "type": "address" + }, + { + "internalType": "address", + "name": "accessControl_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "enum ComptrollerStorage.Action", + "name": "action", + "type": "uint8" + } + ], + "name": "ActionPaused", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "BorrowCapExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedLessThanOrEqualTo", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + } + ], + "name": "CollateralExceedsThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "ComptrollerMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collateralToSeize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableCollateral", + "type": "uint256" + } + ], + "name": "InsufficientCollateral", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientLiquidity", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientShortfall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCollateralFactor", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLiquidationThreshold", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "MarketAlreadyListed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "MarketNotListed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedGreaterThan", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "actual", + "type": "uint256" + } + ], + "name": "MinimalCollateralViolated", + "type": "error" + }, + { + "inputs": [], + "name": "NonzeroBorrowBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "PriceError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "SnapshotError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "uint256", + "name": "cap", + "type": "uint256" + } + ], + "name": "SupplyCapExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "TooMuchRepay", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedSender", + "type": "address" + }, + { + "internalType": "address", + "name": "actualSender", + "type": "address" + } + ], + "name": "UnexpectedSender", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum ComptrollerStorage.Action", + "name": "action", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bool", + "name": "pauseState", + "type": "bool" + } + ], + "name": "ActionPausedMarket", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "MarketEntered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "MarketExited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + } + ], + "name": "MarketSupported", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBorrowCap", + "type": "uint256" + } + ], + "name": "NewBorrowCap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldCloseFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCloseFactorMantissa", + "type": "uint256" + } + ], + "name": "NewCloseFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldCollateralFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newCollateralFactorMantissa", + "type": "uint256" + } + ], + "name": "NewCollateralFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldLiquidationIncentiveMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLiquidationIncentiveMantissa", + "type": "uint256" + } + ], + "name": "NewLiquidationIncentive", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldLiquidationThresholdMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLiquidationThresholdMantissa", + "type": "uint256" + } + ], + "name": "NewLiquidationThreshold", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMinLiquidatableCollateral", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMinLiquidatableCollateral", + "type": "uint256" + } + ], + "name": "NewMinLiquidatableCollateral", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract PriceOracle", + "name": "oldPriceOracle", + "type": "address" + }, + { + "indexed": false, + "internalType": "contract PriceOracle", + "name": "newPriceOracle", + "type": "address" + } + ], + "name": "NewPriceOracle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "rewardsDistributor", + "type": "address" + } + ], + "name": "NewRewardsDistributor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSupplyCap", + "type": "uint256" + } + ], + "name": "NewSupplyCap", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControl", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "accountAssets", + "outputs": [ + { + "internalType": "contract VToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "enum ComptrollerStorage.Action", + "name": "action", + "type": "uint8" + } + ], + "name": "actionPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract RewardsDistributor", + "name": "_rewardsDistributor", + "type": "address" + } + ], + "name": "addRewardsDistributor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "allMarkets", + "outputs": [ + { + "internalType": "contract VToken", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "borrowCaps", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + } + ], + "name": "checkMembership", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "closeFactorMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "vTokens", + "type": "address[]" + } + ], + "name": "enterMarkets", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vTokenAddress", + "type": "address" + } + ], + "name": "exitMarket", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortfall", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAllMarkets", + "outputs": [ + { + "internalType": "contract VToken[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAssetsIn", + "outputs": [ + { + "internalType": "contract VToken[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenModify", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "getHypotheticalAccountLiquidity", + "outputs": [ + { + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "shortfall", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRewardDistributors", + "outputs": [ + { + "internalType": "contract RewardsDistributor[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + } + ], + "name": "getRewardsByMarket", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "rewardToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "supplySpeed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowSpeed", + "type": "uint256" + } + ], + "internalType": "struct ComptrollerStorage.RewardSpeeds[]", + "name": "rewardSpeeds", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "healAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isComptroller", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + } + ], + "name": "isDeprecated", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + } + ], + "name": "isMarketListed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "components": [ + { + "internalType": "contract VToken", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "contract VToken", + "name": "vTokenBorrowed", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "internalType": "struct ComptrollerStorage.LiquidationOrder[]", + "name": "orders", + "type": "tuple[]" + } + ], + "name": "liquidateAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vTokenBorrowed", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "uint256", + "name": "actualRepayAmount", + "type": "uint256" + } + ], + "name": "liquidateCalculateSeizeTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensToSeize", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "liquidationIncentiveMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "markets", + "outputs": [ + { + "internalType": "bool", + "name": "isListed", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "collateralFactorMantissa", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidationThresholdMantissa", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minLiquidatableCollateral", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract PriceOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "preBorrowHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vTokenBorrowed", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "skipLiquidityCheck", + "type": "bool" + } + ], + "name": "preLiquidateHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "preMintHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "preRedeemHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + } + ], + "name": "preRepayHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "address", + "name": "seizerContract", + "type": "address" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + } + ], + "name": "preSeizeHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "vToken", + "type": "address" + }, + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "transferTokens", + "type": "uint256" + } + ], + "name": "preTransferHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract VToken[]", + "name": "marketsList", + "type": "address[]" + }, + { + "internalType": "enum ComptrollerStorage.Action[]", + "name": "actionsList", + "type": "uint8[]" + }, + { + "internalType": "bool", + "name": "paused", + "type": "bool" + } + ], + "name": "setActionsPaused", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newCloseFactorMantissa", + "type": "uint256" + } + ], + "name": "setCloseFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "newCollateralFactorMantissa", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "newLiquidationThresholdMantissa", + "type": "uint256" + } + ], + "name": "setCollateralFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newLiquidationIncentiveMantissa", + "type": "uint256" + } + ], + "name": "setLiquidationIncentive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "newBorrowCaps", + "type": "uint256[]" + } + ], + "name": "setMarketBorrowCaps", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract VToken[]", + "name": "vTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "newSupplyCaps", + "type": "uint256[]" + } + ], + "name": "setMarketSupplyCaps", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newMinLiquidatableCollateral", + "type": "uint256" + } + ], + "name": "setMinLiquidatableCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract PriceOracle", + "name": "newOracle", + "type": "address" + } + ], + "name": "setPriceOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "supplyCaps", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract VToken", + "name": "vToken", + "type": "address" + } + ], + "name": "supportMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/opsepolia/vip-004/abi/erc20.json b/multisig/simulations/opsepolia/vip-004/abi/erc20.json new file mode 100644 index 000000000..374b04c75 --- /dev/null +++ b/multisig/simulations/opsepolia/vip-004/abi/erc20.json @@ -0,0 +1,295 @@ +[ + { + "inputs": [ + { "internalType": "string", "name": "name_", "type": "string" }, + { "internalType": "string", "name": "symbol_", "type": "string" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "spender", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "userAddress", "type": "address" }, + { "indexed": false, "internalType": "address payable", "name": "relayerAddress", "type": "address" }, + { "indexed": false, "internalType": "bytes", "name": "functionSignature", "type": "bytes" } + ], + "name": "MetaTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "bytes32", "name": "previousAdminRole", "type": "bytes32" }, + { "indexed": true, "internalType": "bytes32", "name": "newAdminRole", "type": "bytes32" } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "account", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "sender", "type": "address" } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, + { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC712_VERSION", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PREDICATE_ROLE", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" } + ], + "name": "decreaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "userAddress", "type": "address" }, + { "internalType": "bytes", "name": "functionSignature", "type": "bytes" }, + { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, + { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, + { "internalType": "uint8", "name": "sigV", "type": "uint8" } + ], + "name": "executeMetaTransaction", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getChainId", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getDomainSeperator", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], + "name": "getNonce", + "outputs": [{ "internalType": "uint256", "name": "nonce", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], + "name": "getRoleAdmin", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "uint256", "name": "index", "type": "uint256" } + ], + "name": "getRoleMember", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "role", "type": "bytes32" }], + "name": "getRoleMemberCount", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "hasRole", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "addedValue", "type": "uint256" } + ], + "name": "increaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "role", "type": "bytes32" }, + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "recipient", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "address", "name": "recipient", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/opsepolia/vip-004/abi/poolRegistry.json b/multisig/simulations/opsepolia/vip-004/abi/poolRegistry.json new file mode 100644 index 000000000..2d0268aeb --- /dev/null +++ b/multisig/simulations/opsepolia/vip-004/abi/poolRegistry.json @@ -0,0 +1,724 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "vTokenAddress", + "type": "address" + } + ], + "name": "MarketAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum PoolRegistryInterface.RiskRating", + "name": "riskRating", + "type": "uint8" + }, + { + "internalType": "string", + "name": "category", + "type": "string" + }, + { + "internalType": "string", + "name": "logoURL", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "indexed": false, + "internalType": "struct PoolRegistryInterface.VenusPoolMetaData", + "name": "oldMetadata", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "enum PoolRegistryInterface.RiskRating", + "name": "riskRating", + "type": "uint8" + }, + { + "internalType": "string", + "name": "category", + "type": "string" + }, + { + "internalType": "string", + "name": "logoURL", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "indexed": false, + "internalType": "struct PoolRegistryInterface.VenusPoolMetaData", + "name": "newMetadata", + "type": "tuple" + } + ], + "name": "PoolMetadataUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "oldName", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "newName", + "type": "string" + } + ], + "name": "PoolNameSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "creator", + "type": "address" + }, + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockPosted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestampPosted", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct PoolRegistryInterface.VenusPool", + "name": "pool", + "type": "tuple" + } + ], + "name": "PoolRegistered", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint8", + "name": "decimals", + "type": "uint8" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "enum PoolRegistry.InterestRateModels", + "name": "rateModel", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "baseRatePerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "multiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "jumpMultiplierPerYear", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kink_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateralFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidationThreshold", + "type": "uint256" + }, + { + "internalType": "contract AccessControlManager", + "name": "accessControlManager", + "type": "address" + }, + { + "internalType": "address", + "name": "vTokenProxyAdmin", + "type": "address" + }, + { + "internalType": "address", + "name": "beaconAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "supplyCap", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowCap", + "type": "uint256" + } + ], + "internalType": "struct PoolRegistry.AddMarketInput", + "name": "input", + "type": "tuple" + } + ], + "name": "addMarket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "beaconAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "closeFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidationIncentive", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minLiquidatableCollateral", + "type": "uint256" + }, + { + "internalType": "address", + "name": "priceOracle", + "type": "address" + } + ], + "name": "createRegistryPool", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "proxyAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllPools", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "creator", + "type": "address" + }, + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockPosted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestampPosted", + "type": "uint256" + } + ], + "internalType": "struct PoolRegistryInterface.VenusPool[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + } + ], + "name": "getPoolByComptroller", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "creator", + "type": "address" + }, + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockPosted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestampPosted", + "type": "uint256" + } + ], + "internalType": "struct PoolRegistryInterface.VenusPool", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getPoolsSupportedByAsset", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getVTokenForAsset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + } + ], + "name": "getVenusPoolMetadata", + "outputs": [ + { + "components": [ + { + "internalType": "enum PoolRegistryInterface.RiskRating", + "name": "riskRating", + "type": "uint8" + }, + { + "internalType": "string", + "name": "category", + "type": "string" + }, + { + "internalType": "string", + "name": "logoURL", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "internalType": "struct PoolRegistryInterface.VenusPoolMetaData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract VTokenProxyFactory", + "name": "_vTokenFactory", + "type": "address" + }, + { + "internalType": "contract JumpRateModelFactory", + "name": "_jumpRateFactory", + "type": "address" + }, + { + "internalType": "contract WhitePaperInterestRateModelFactory", + "name": "_whitePaperFactory", + "type": "address" + }, + { + "internalType": "contract Shortfall", + "name": "_shortfall", + "type": "address" + }, + { + "internalType": "address payable", + "name": "riskFund_", + "type": "address" + }, + { + "internalType": "address payable", + "name": "protocolShareReserve_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "metadata", + "outputs": [ + { + "internalType": "enum PoolRegistryInterface.RiskRating", + "name": "riskRating", + "type": "uint8" + }, + { + "internalType": "string", + "name": "category", + "type": "string" + }, + { + "internalType": "string", + "name": "logoURL", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setPoolName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "components": [ + { + "internalType": "enum PoolRegistryInterface.RiskRating", + "name": "riskRating", + "type": "uint8" + }, + { + "internalType": "string", + "name": "category", + "type": "string" + }, + { + "internalType": "string", + "name": "logoURL", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "internalType": "struct PoolRegistryInterface.VenusPoolMetaData", + "name": "_metadata", + "type": "tuple" + } + ], + "name": "updatePoolMetadata", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/multisig/simulations/opsepolia/vip-004/abi/rateModel.json b/multisig/simulations/opsepolia/vip-004/abi/rateModel.json new file mode 100644 index 000000000..8c04a8527 --- /dev/null +++ b/multisig/simulations/opsepolia/vip-004/abi/rateModel.json @@ -0,0 +1,118 @@ +[ + { + "inputs": [ + { "internalType": "uint256", "name": "baseRatePerYear", "type": "uint256" }, + { "internalType": "uint256", "name": "multiplierPerYear", "type": "uint256" }, + { "internalType": "uint256", "name": "jumpMultiplierPerYear", "type": "uint256" }, + { "internalType": "uint256", "name": "kink_", "type": "uint256" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "uint256", "name": "baseRatePerBlock", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "multiplierPerBlock", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "jumpMultiplierPerBlock", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "kink", "type": "uint256" } + ], + "name": "NewInterestParams", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "baseRatePerBlock", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "blocksPerYear", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "uint256", "name": "cash", "type": "uint256" }, + { "internalType": "uint256", "name": "borrows", "type": "uint256" }, + { "internalType": "uint256", "name": "reserves", "type": "uint256" } + ], + "name": "getBorrowRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "uint256", "name": "cash", "type": "uint256" }, + { "internalType": "uint256", "name": "borrows", "type": "uint256" }, + { "internalType": "uint256", "name": "reserves", "type": "uint256" }, + { "internalType": "uint256", "name": "reserveFactorMantissa", "type": "uint256" } + ], + "name": "getSupplyRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "isInterestRateModel", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "jumpMultiplierPerBlock", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "kink", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "multiplierPerBlock", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "uint256", "name": "cash", "type": "uint256" }, + { "internalType": "uint256", "name": "borrows", "type": "uint256" }, + { "internalType": "uint256", "name": "reserves", "type": "uint256" } + ], + "name": "utilizationRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "payable": false, + "stateMutability": "pure", + "type": "function" + } +] diff --git a/multisig/simulations/opsepolia/vip-004/abi/vToken.json b/multisig/simulations/opsepolia/vip-004/abi/vToken.json new file mode 100644 index 000000000..1ce01e4a8 --- /dev/null +++ b/multisig/simulations/opsepolia/vip-004/abi/vToken.json @@ -0,0 +1,2066 @@ +[ + { + "inputs": [ + { + "internalType": "bool", + "name": "timeBased_", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "blocksPerYear_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxBorrowRateMantissa_", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actualAddAmount", + "type": "uint256" + } + ], + "name": "AddReservesFactorFreshCheck", + "type": "error" + }, + { + "inputs": [], + "name": "BorrowCashNotAvailable", + "type": "error" + }, + { + "inputs": [], + "name": "BorrowFreshnessCheck", + "type": "error" + }, + { + "inputs": [], + "name": "DelegateNotApproved", + "type": "error" + }, + { + "inputs": [], + "name": "ForceLiquidateBorrowUnauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "HealBorrowUnauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBlocksPerYear", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTimeBasedConfiguration", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "errorCode", + "type": "uint256" + } + ], + "name": "LiquidateAccrueCollateralInterestFailed", + "type": "error" + }, + { + "inputs": [], + "name": "LiquidateCloseAmountIsUintMax", + "type": "error" + }, + { + "inputs": [], + "name": "LiquidateCloseAmountIsZero", + "type": "error" + }, + { + "inputs": [], + "name": "LiquidateCollateralFreshnessCheck", + "type": "error" + }, + { + "inputs": [], + "name": "LiquidateFreshnessCheck", + "type": "error" + }, + { + "inputs": [], + "name": "LiquidateLiquidatorIsBorrower", + "type": "error" + }, + { + "inputs": [], + "name": "LiquidateSeizeLiquidatorIsBorrower", + "type": "error" + }, + { + "inputs": [], + "name": "MintFreshnessCheck", + "type": "error" + }, + { + "inputs": [], + "name": "ProtocolSeizeShareTooBig", + "type": "error" + }, + { + "inputs": [], + "name": "RedeemFreshnessCheck", + "type": "error" + }, + { + "inputs": [], + "name": "RedeemTransferOutNotPossible", + "type": "error" + }, + { + "inputs": [], + "name": "ReduceReservesCashNotAvailable", + "type": "error" + }, + { + "inputs": [], + "name": "ReduceReservesCashValidation", + "type": "error" + }, + { + "inputs": [], + "name": "ReduceReservesFreshCheck", + "type": "error" + }, + { + "inputs": [], + "name": "RepayBorrowFreshnessCheck", + "type": "error" + }, + { + "inputs": [], + "name": "SetInterestRateModelFreshCheck", + "type": "error" + }, + { + "inputs": [], + "name": "SetReserveFactorBoundsCheck", + "type": "error" + }, + { + "inputs": [], + "name": "SetReserveFactorFreshCheck", + "type": "error" + }, + { + "inputs": [], + "name": "TransferNotAllowed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddressNotAllowed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "cashPrior", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "interestAccumulated", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "AccrueInterest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "badDebtDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "badDebtOld", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "badDebtNew", + "type": "uint256" + } + ], + "name": "BadDebtIncreased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "badDebtOld", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "badDebtNew", + "type": "uint256" + } + ], + "name": "BadDebtRecovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "Borrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "HealBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "vTokenCollateral", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "LiquidateBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "mintTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBalance", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract ComptrollerInterface", + "name": "oldComptroller", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract ComptrollerInterface", + "name": "newComptroller", + "type": "address" + } + ], + "name": "NewComptroller", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "contract InterestRateModel", + "name": "oldInterestRateModel", + "type": "address" + }, + { + "indexed": true, + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "NewMarketInterestRateModel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldProtocolSeizeShareMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newProtocolSeizeShareMantissa", + "type": "uint256" + } + ], + "name": "NewProtocolSeizeShare", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldProtocolShareReserve", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newProtocolShareReserve", + "type": "address" + } + ], + "name": "NewProtocolShareReserve", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReduceReservesBlockOrTimestampDelta", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReduceReservesBlockOrTimestampDelta", + "type": "uint256" + } + ], + "name": "NewReduceReservesBlockDelta", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldReserveFactorMantissa", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "NewReserveFactor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldShortfall", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newShortfall", + "type": "address" + } + ], + "name": "NewShortfallContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ProtocolSeize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBalance", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "accountBorrows", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBorrows", + "type": "uint256" + } + ], + "name": "RepayBorrow", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "benefactor", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "ReservesAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "protocolShareReserve", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newTotalReserves", + "type": "uint256" + } + ], + "name": "SpreadReservesReduced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SweepToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "NO_ERROR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accrueInterest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "addAmount", + "type": "uint256" + } + ], + "name": "addReserves", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "badDebt", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "recoveredAmount_", + "type": "uint256" + } + ], + "name": "badDebtRecovered", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOfUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "blocksOrSecondsPerYear", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "borrowBalanceStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "borrowAmount", + "type": "uint256" + } + ], + "name": "borrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "borrowIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "borrowRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "comptroller", + "outputs": [ + { + "internalType": "contract ComptrollerInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRateCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRateStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract VTokenInterface", + "name": "vTokenCollateral", + "type": "address" + }, + { + "internalType": "bool", + "name": "skipLiquidityCheck", + "type": "bool" + } + ], + "name": "forceLiquidateBorrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountSnapshot", + "outputs": [ + { + "internalType": "uint256", + "name": "error", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "vTokenBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "borrowBalance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "exchangeRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBlockNumberOrTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCash", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "payer", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "healBorrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "underlying_", + "type": "address" + }, + { + "internalType": "contract ComptrollerInterface", + "name": "comptroller_", + "type": "address" + }, + { + "internalType": "contract InterestRateModel", + "name": "interestRateModel_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "initialExchangeRateMantissa_", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "uint8", + "name": "decimals_", + "type": "uint8" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "shortfall", + "type": "address" + }, + { + "internalType": "address payable", + "name": "protocolShareReserve", + "type": "address" + } + ], + "internalType": "struct VTokenInterface.RiskManagementInit", + "name": "riskManagement", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "reserveFactorMantissa_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "interestRateModel", + "outputs": [ + { + "internalType": "contract InterestRateModel", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isTimeBased", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isVToken", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + }, + { + "internalType": "contract VTokenInterface", + "name": "vTokenCollateral", + "type": "address" + } + ], + "name": "liquidateBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "internalType": "uint256", + "name": "mintAmount", + "type": "uint256" + } + ], + "name": "mintBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolSeizeShareMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolShareReserve", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemTokens", + "type": "uint256" + } + ], + "name": "redeemBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlying", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "redeemer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "redeemAmount", + "type": "uint256" + } + ], + "name": "redeemUnderlyingBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "reduceAmount", + "type": "uint256" + } + ], + "name": "reduceReserves", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reduceReservesBlockDelta", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reduceReservesBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrow", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayBorrowBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "reserveFactorMantissa", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "liquidator", + "type": "address" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint256", + "name": "seizeTokens", + "type": "uint256" + } + ], + "name": "seize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract InterestRateModel", + "name": "newInterestRateModel", + "type": "address" + } + ], + "name": "setInterestRateModel", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newProtocolSeizeShareMantissa_", + "type": "uint256" + } + ], + "name": "setProtocolSeizeShare", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address payable", + "name": "protocolShareReserve_", + "type": "address" + } + ], + "name": "setProtocolShareReserve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newReduceReservesBlockOrTimestampDelta", + "type": "uint256" + } + ], + "name": "setReduceReservesBlockDelta", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newReserveFactorMantissa", + "type": "uint256" + } + ], + "name": "setReserveFactor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "shortfall_", + "type": "address" + } + ], + "name": "setShortfallContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "shortfall", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "supplyRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + } + ], + "name": "sweepToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalBorrows", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalBorrowsCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "src", + "type": "address" + }, + { + "internalType": "address", + "name": "dst", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlying", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/opsepolia/vip-004/index.ts b/multisig/simulations/opsepolia/vip-004/index.ts new file mode 100644 index 000000000..b638edd19 --- /dev/null +++ b/multisig/simulations/opsepolia/vip-004/index.ts @@ -0,0 +1,411 @@ +import { impersonateAccount, setBalance } from "@nomicfoundation/hardhat-network-helpers"; +import { expect } from "chai"; +import { BigNumberish, Signer } from "ethers"; +import { BigNumber, Contract } from "ethers"; +import { parseUnits } from "ethers/lib/utils"; +import { ethers } from "hardhat"; +import { NETWORK_ADDRESSES } from "src/networkAddresses"; +import { forking, pretendExecutingVip } from "src/vip-framework"; +import { checkVToken } from "src/vip-framework/checks/checkVToken"; +import { checkInterestRate } from "src/vip-framework/checks/interestRateModel"; + +import vip001 from "../../../proposals/opsepolia/vip-001"; +import vip004, { + COMPTROLLER_CORE, + MOCK_OP, + MOCK_USDC, + MOCK_USDT, + MOCK_WBTC, + PSR, + VOP_CORE, + VUSDC_CORE, + VUSDT_CORE, + VWBTC_CORE, + VWETH_CORE, + WETH, +} from "../../../proposals/opsepolia/vip-004"; +import TOKEN_ABI from "./abi/WETH.json"; +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 { opsepolia } = NETWORK_ADDRESSES; + +const RESILIENT_ORACLE = opsepolia.RESILIENT_ORACLE; +const GUARDIAN = opsepolia.GUARDIAN; +const POOL_REGISTRY = opsepolia.POOL_REGISTRY; + +const BLOCKS_PER_YEAR = BigNumber.from("31536000"); // equal to seconds in a year as it is timebased deployment + +type VTokenSymbol = "vWBTC_Core" | "vWETH_Core" | "vUSDT_Core" | "vUSDC_Core" | "vOP_Core"; + +const vTokens: { [key in VTokenSymbol]: string } = { + vWBTC_Core: VWBTC_CORE, + vWETH_Core: VWETH_CORE, + vUSDT_Core: VUSDT_CORE, + vUSDC_Core: VUSDC_CORE, + vOP_Core: VOP_CORE, +}; + +const tokens = { + WBTC: MOCK_WBTC, + WETH: WETH, + USDT: MOCK_USDT, + USDC: MOCK_USDC, + OP: MOCK_OP, +}; + +interface VTokenState { + name: string; + symbol: string; + decimals: number; + underlying: string; + exchangeRate: BigNumberish; + comptroller: string; +} + +const vTokenState: { [key in VTokenSymbol]: VTokenState } = { + // Core Pool + vWBTC_Core: { + name: "Venus WBTC (Core)", + symbol: "vWBTC_Core", + decimals: 8, + underlying: tokens.WBTC, + exchangeRate: parseUnits("1", 18), + comptroller: COMPTROLLER_CORE, + }, + vWETH_Core: { + name: "Venus WETH (Core)", + symbol: "vWETH_Core", + decimals: 8, + underlying: tokens.WETH, + exchangeRate: parseUnits("1", 28), + comptroller: COMPTROLLER_CORE, + }, + vUSDT_Core: { + name: "Venus USDT (Core)", + symbol: "vUSDT_Core", + decimals: 8, + underlying: tokens.USDT, + exchangeRate: parseUnits("1", 16), + comptroller: COMPTROLLER_CORE, + }, + vUSDC_Core: { + name: "Venus USDC (Core)", + symbol: "vUSDC_Core", + decimals: 8, + underlying: tokens.USDC, + exchangeRate: parseUnits("1", 16), + comptroller: COMPTROLLER_CORE, + }, + vOP_Core: { + name: "Venus OP (Core)", + symbol: "vOP_Core", + decimals: 8, + underlying: tokens.OP, + exchangeRate: parseUnits("1", 28), + comptroller: COMPTROLLER_CORE, + }, +}; + +interface RiskParameters { + borrowCap: string; + supplyCap: string; + collateralFactor: string; + liquidationThreshold: string; + reserveFactor: string; + initialSupply: string; + vTokenReceiver: string; +} + +const riskParameters: { [key in VTokenSymbol]: RiskParameters } = { + // Core Pool + vWBTC_Core: { + borrowCap: "0.55", + supplyCap: "1", + collateralFactor: "0.70", + liquidationThreshold: "0.75", + reserveFactor: "0.2", + initialSupply: "0.03553143", + vTokenReceiver: opsepolia.VTREASURY, + }, + vWETH_Core: { + borrowCap: "16", + supplyCap: "25", + collateralFactor: "0.7", + liquidationThreshold: "0.75", + reserveFactor: "0.2", + initialSupply: "0.61097887", + vTokenReceiver: opsepolia.VTREASURY, + }, + vUSDC_Core: { + borrowCap: "130000", + supplyCap: "150000", + collateralFactor: "0.75", + liquidationThreshold: "0.77", + reserveFactor: "0.1", + initialSupply: "1800", + vTokenReceiver: opsepolia.VTREASURY, + }, + vUSDT_Core: { + borrowCap: "130000", + supplyCap: "150000", + collateralFactor: "0.75", + liquidationThreshold: "0.77", + reserveFactor: "0.1", + initialSupply: "1800", + vTokenReceiver: opsepolia.VTREASURY, + }, + vOP_Core: { + borrowCap: "16", + supplyCap: "25", + collateralFactor: "0.7", + liquidationThreshold: "0.75", + reserveFactor: "0.2", + initialSupply: "0.61097887", + vTokenReceiver: opsepolia.VTREASURY, + }, +}; + +interface InterestRateModelSpec { + vTokens: VTokenSymbol[]; + kink: string; + base: string; + multiplier: string; + jump: string; +} + +const interestRateModels: InterestRateModelSpec[] = [ + { + vTokens: ["vWBTC_Core", "vWETH_Core", "vOP_Core"], + kink: "0.45", + base: "0", + multiplier: "0.09", + jump: "3", + }, + { + vTokens: ["vUSDC_Core", "vUSDT_Core"], + kink: "0.8", + base: "0", + multiplier: "0.075", + jump: "2.5", + }, +]; + +const interestRateModelAddresses: { [key in VTokenSymbol]: string } = { + vWBTC_Core: "", + vWETH_Core: "", + vUSDT_Core: "", + vUSDC_Core: "", + vOP_Core: "", +}; + +forking(17082725, async () => { + let poolRegistry: Contract; + + before(async () => { + poolRegistry = await ethers.getContractAt(POOL_REGISTRY_ABI, POOL_REGISTRY); + }); + + describe("Contracts setup", () => { + for (const [symbol, address] of Object.entries(vTokens) as [VTokenSymbol, string][]) { + checkVToken(address, vTokenState[symbol]); + } + }); + + describe("Post-Execution state", () => { + before(async () => { + const WETH_ACCOUNT = "0xff44346743550D9c973aaC5baA2ac819d75D0c18"; + + await impersonateAccount(WETH_ACCOUNT); + await setBalance(WETH_ACCOUNT, ethers.utils.parseEther("1")); + + const WETHSigner: Signer = await ethers.getSigner(WETH_ACCOUNT); + const mockWSTToken = await ethers.getContractAt(TOKEN_ABI, WETH, WETHSigner); + + await mockWSTToken.connect(WETHSigner).transfer(opsepolia.VTREASURY, ethers.utils.parseEther("1")); + + // executing vip001 before vip004 to set the oracles for the mock tokens + await pretendExecutingVip(await vip001()); + await pretendExecutingVip(await vip004()); + + for (const model of interestRateModels) { + for (const symbol of model.vTokens) { + const vToken = await ethers.getContractAt(VTOKEN_ABI, vTokens[symbol]); + interestRateModelAddresses[symbol] = await vToken.interestRateModel(); + } + } + }); + + describe("PoolRegistry state", () => { + let registeredPools: { name: string; creator: string; comptroller: string }[]; + + before(async () => { + registeredPools = await poolRegistry.getAllPools(); + }); + + it("should have 1 pool(Core Pool)", async () => { + expect(registeredPools).to.have.lengthOf(1); + }); + + it("should register Core pool in PoolRegistry", async () => { + const pool = registeredPools[0]; + expect(pool.name).to.equal("Core"); + expect(pool.creator).to.equal(GUARDIAN); + expect(pool.comptroller).to.equal(COMPTROLLER_CORE); + }); + + it("should register Core pool vTokens in Core pool Comptroller", async () => { + const comptroller = await ethers.getContractAt(COMPTROLLER_ABI, COMPTROLLER_CORE); + const poolVTokens = await comptroller.getAllMarkets(); + expect(poolVTokens).to.have.lengthOf(5); + expect(poolVTokens).to.include(vTokens.vWBTC_Core); + expect(poolVTokens).to.include(vTokens.vWETH_Core); + expect(poolVTokens).to.include(vTokens.vUSDT_Core); + expect(poolVTokens).to.include(vTokens.vUSDC_Core); + expect(poolVTokens).to.include(vTokens.vOP_Core); + }); + + for (const [symbol, { underlying }] of Object.entries(vTokenState) as [VTokenSymbol, VTokenState][]) { + it(`should register ${symbol} in PoolRegistry`, async () => { + const registeredVToken = await poolRegistry.getVTokenForAsset(vTokenState[symbol].comptroller, underlying); + expect(registeredVToken).to.equal(vTokens[symbol]); + }); + } + }); + + describe("Ownership", () => { + for (const [symbol, address] of Object.entries(vTokens) as [VTokenSymbol, string][]) { + it(`should transfer ownership of ${symbol} to GUARDIAN`, async () => { + const vToken = await ethers.getContractAt(VTOKEN_ABI, address); + expect(await vToken.owner()).to.equal(GUARDIAN); + }); + } + }); + + describe("ProtocolShareReserve", () => { + for (const [symbol, address] of Object.entries(vTokens) as [VTokenSymbol, string][]) { + it(`should set PSR for ${symbol}`, async () => { + const vToken = await ethers.getContractAt(VTOKEN_ABI, address); + expect(await vToken.protocolShareReserve()).to.equal(PSR); + }); + } + }); + + describe("Initial supply", () => { + for (const [symbol, params] of Object.entries(riskParameters) as [VTokenSymbol, RiskParameters][]) { + it(`should mint initial supply of ${symbol} to ${params.vTokenReceiver}`, async () => { + // Since we're distributing 1:1, decimals should be accounted for in the exchange rate + const expectedSupply = parseUnits(params.initialSupply, 8); + const vToken = await ethers.getContractAt(VTOKEN_ABI, vTokens[symbol]); + expect(await vToken.balanceOf(params.vTokenReceiver)).to.equal(expectedSupply); + }); + } + }); + + describe("Risk parameters", () => { + for (const [symbol, params] of Object.entries(riskParameters) as [VTokenSymbol, RiskParameters][]) { + describe(`${symbol} risk parameters`, () => { + let vToken: Contract; + let comptroller: Contract; + let underlyingDecimals: number; + + before(async () => { + vToken = await ethers.getContractAt(VTOKEN_ABI, vTokens[symbol]); + comptroller = await ethers.getContractAt(COMPTROLLER_ABI, vTokenState[symbol].comptroller); + const underlyingAddress = vTokenState[symbol].underlying; + const underlying = await ethers.getContractAt(ERC20_ABI, underlyingAddress); + underlyingDecimals = await underlying.decimals(); + }); + + it(`should set ${symbol} reserve factor to ${params.reserveFactor}`, async () => { + expect(await vToken.reserveFactorMantissa()).to.equal(parseUnits(params.reserveFactor, 18)); + }); + + it(`should set ${symbol} collateral factor to ${params.collateralFactor}`, async () => { + const market = await comptroller.markets(vTokens[symbol]); + expect(market.collateralFactorMantissa).to.equal(parseUnits(params.collateralFactor, 18)); + }); + + it(`should set ${symbol} liquidation threshold to ${params.liquidationThreshold}`, async () => { + const market = await comptroller.markets(vTokens[symbol]); + expect(market.liquidationThresholdMantissa).to.equal(parseUnits(params.liquidationThreshold, 18)); + }); + + it(`should set ${symbol} protocol seize share to 0.05`, async () => { + expect(await vToken.protocolSeizeShareMantissa()).to.equal(parseUnits("0.05", 18)); + }); + + it(`should set ${symbol} supply cap to ${params.supplyCap}`, async () => { + expect(await comptroller.supplyCaps(vTokens[symbol])).to.equal( + parseUnits(params.supplyCap, underlyingDecimals), + ); + }); + + it(`should set ${symbol} borrow cap to ${params.borrowCap}`, async () => { + expect(await comptroller.borrowCaps(vTokens[symbol])).to.equal( + parseUnits(params.borrowCap, underlyingDecimals), + ); + }); + }); + } + }); + + describe("Pools configuration", () => { + const checkComptroller = (comptrollerAddress: string, comptrollerName: string) => { + describe(`${comptrollerName} Comptroller`, () => { + let comptroller: Contract; + + before(async () => { + comptroller = await ethers.getContractAt(COMPTROLLER_ABI, comptrollerAddress); + }); + + it("should use the correct comptroller address", async () => { + expect(comptroller.address).to.equal(comptrollerAddress); + }); + + it("should have the correct price oracle", async () => { + expect(await comptroller.oracle()).to.equal(RESILIENT_ORACLE); + }); + + it("should have close factor = 0.5", async () => { + expect(await comptroller.closeFactorMantissa()).to.equal(parseUnits("0.5", 18)); + }); + + it("should have liquidation incentive = 1.1", async () => { + expect(await comptroller.liquidationIncentiveMantissa()).to.equal(parseUnits("1.1", 18)); + }); + + it("should have minLiquidatableCollateral = $100", async () => { + expect(await comptroller.minLiquidatableCollateral()).to.equal(parseUnits("100", 18)); + }); + + it("should have owner = GUARDIAN", async () => { + expect(await comptroller.owner()).to.equal(GUARDIAN); + }); + }); + }; + + checkComptroller(COMPTROLLER_CORE, "Core"); + }); + + it("Interest rates", async () => { + for (const model of interestRateModels) { + for (const symbol of model.vTokens) { + checkInterestRate( + interestRateModelAddresses[symbol], + symbol, + { + base: model.base, + multiplier: model.multiplier, + jump: model.jump, + kink: model.kink, + }, + BLOCKS_PER_YEAR, + ); + } + } + }); + }); +}); diff --git a/src/networkAddresses.ts b/src/networkAddresses.ts index 7dbf7bbd9..cb109f73c 100644 --- a/src/networkAddresses.ts +++ b/src/networkAddresses.ts @@ -184,5 +184,7 @@ export const NETWORK_ADDRESSES = { GUARDIAN: "0xd57365EE4E850e881229e2F8Aa405822f289e78d", RESILIENT_ORACLE: "0x6c01ECa2B5C97F135406a3A5531445A7d977D28e", CHAINLINK_ORACLE: "0x493C3f543AEa37EefF17D823f27Cb1feAB9f3143", + POOL_REGISTRY: "0x6538C861C7A6997602311342657b9143dD9E8152", + VTREASURY: "0x5A1a12F47FA7007C9e23cf5e025F3f5d3aC7d755", }, }; From cbf637fce1583e0ec40365b291d632deeb9d60d4 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Thu, 12 Sep 2024 17:50:56 +0530 Subject: [PATCH 2/6] refactor: vip004 for opsepolia --- multisig/proposals/opsepolia/vip-004/index.ts | 48 +++++++++---------- .../simulations/opsepolia/vip-004/index.ts | 5 +- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/multisig/proposals/opsepolia/vip-004/index.ts b/multisig/proposals/opsepolia/vip-004/index.ts index 3eca4ad23..894bf6635 100644 --- a/multisig/proposals/opsepolia/vip-004/index.ts +++ b/multisig/proposals/opsepolia/vip-004/index.ts @@ -19,7 +19,7 @@ export const VUSDC_CORE = "0x2419606690B08060ebFd7581e0a6Ae45f1915ee9"; export const VUSDT_CORE = "0xC23D18536E7069f924B3717B2710CA6A09e53ea9"; export const VOP_CORE = "0x49cceCdd0b399C1b13260452893A3A835bDad5DC"; -export const PSR = "0x4d3785aD3767b93231C19543AA7c9BcD098F1f15"; +export const PSR = "0x0F021c29283c47DF8237741dD5a0aA22952aFc88"; // IL configuration const vip004 = () => { @@ -27,82 +27,82 @@ const vip004 = () => { { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setCollateralFactor(address,uint256,uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setCollateralFactor(address,uint256,uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setMarketSupplyCaps(address[],uint256[])", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setMarketSupplyCaps(address[],uint256[])", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setMarketBorrowCaps(address[],uint256[])", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setMarketBorrowCaps(address[],uint256[])", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setLiquidationIncentive(uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setLiquidationIncentive(uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setCloseFactor(uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setCloseFactor(uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setMinLiquidatableCollateral(uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setMinLiquidatableCollateral(uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setActionsPaused(address[],uint256[],bool)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setActionsPaused(address[],uint256[],bool)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "addPool(string,address,uint256,uint256,uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "addPool(string,address,uint256,uint256,uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setPoolName(address,string)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setPoolName(address,string)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "updatePoolMetadata(address,VenusPoolMetaData)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "updatePoolMetadata(address,VenusPoolMetaData)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setProtocolSeizeShare(uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setProtocolSeizeShare(uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setReserveFactor(uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setReserveFactor(uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setInterestRateModel(address)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setInterestRateModel(address)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "updateJumpRateModel(uint256,uint256,uint256,uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "updateJumpRateModel(uint256,uint256,uint256,uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setRewardTokenSpeeds(address[],uint256[],uint256[])", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setRewardTokenSpeeds(address[],uint256[],uint256[])", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setLastRewardingBlock(address[],uint32[],uint32[])", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setLastRewardingBlock(address[],uint32[],uint32[])", opsepolia.GUARDIAN], }, { target: ACM, @@ -112,12 +112,12 @@ const vip004 = () => { { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [opsepolia.POOL_REGISTRY, "addMarket(AddMarketInput)", opsepolia.NORMAL_TIMELOCK], + params: [opsepolia.POOL_REGISTRY, "addMarket(AddMarketInput)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setReduceReservesBlockDelta(uint256)", opsepolia.NORMAL_TIMELOCK], + params: [ZERO_ADDRESS, "setReduceReservesBlockDelta(uint256)", opsepolia.GUARDIAN], }, { target: ACM, @@ -164,7 +164,7 @@ const vip004 = () => { { target: opsepolia.VTREASURY, signature: "withdrawTreasuryToken(address,uint256,address)", - params: [MOCK_WBTC, "3553143", opsepolia.NORMAL_TIMELOCK], + params: [MOCK_WBTC, "3553143", opsepolia.GUARDIAN], }, { target: MOCK_WBTC, @@ -204,7 +204,7 @@ const vip004 = () => { { target: opsepolia.VTREASURY, signature: "withdrawTreasuryToken(address,uint256,address)", - params: [WETH, "610978879332136515", opsepolia.NORMAL_TIMELOCK], + params: [WETH, "610978879332136515", opsepolia.GUARDIAN], }, { target: WETH, @@ -244,7 +244,7 @@ const vip004 = () => { { target: opsepolia.VTREASURY, signature: "withdrawTreasuryToken(address,uint256,address)", - params: [MOCK_USDC, parseUnits("1800", 6), opsepolia.NORMAL_TIMELOCK], + params: [MOCK_USDC, parseUnits("1800", 6), opsepolia.GUARDIAN], }, { target: MOCK_USDC, @@ -284,7 +284,7 @@ const vip004 = () => { { target: opsepolia.VTREASURY, signature: "withdrawTreasuryToken(address,uint256,address)", - params: [MOCK_USDT, parseUnits("1800", 6), opsepolia.NORMAL_TIMELOCK], + params: [MOCK_USDT, parseUnits("1800", 6), opsepolia.GUARDIAN], }, { target: MOCK_USDT, @@ -324,7 +324,7 @@ const vip004 = () => { { target: opsepolia.VTREASURY, signature: "withdrawTreasuryToken(address,uint256,address)", - params: [MOCK_OP, "610978879332136515", opsepolia.NORMAL_TIMELOCK], + params: [MOCK_OP, "610978879332136515", opsepolia.GUARDIAN], }, { target: MOCK_OP, diff --git a/multisig/simulations/opsepolia/vip-004/index.ts b/multisig/simulations/opsepolia/vip-004/index.ts index b638edd19..d18b58e61 100644 --- a/multisig/simulations/opsepolia/vip-004/index.ts +++ b/multisig/simulations/opsepolia/vip-004/index.ts @@ -9,7 +9,6 @@ import { forking, pretendExecutingVip } from "src/vip-framework"; import { checkVToken } from "src/vip-framework/checks/checkVToken"; import { checkInterestRate } from "src/vip-framework/checks/interestRateModel"; -import vip001 from "../../../proposals/opsepolia/vip-001"; import vip004, { COMPTROLLER_CORE, MOCK_OP, @@ -201,7 +200,7 @@ const interestRateModelAddresses: { [key in VTokenSymbol]: string } = { vOP_Core: "", }; -forking(17082725, async () => { +forking(17170245, async () => { let poolRegistry: Contract; before(async () => { @@ -226,8 +225,6 @@ forking(17082725, async () => { await mockWSTToken.connect(WETHSigner).transfer(opsepolia.VTREASURY, ethers.utils.parseEther("1")); - // executing vip001 before vip004 to set the oracles for the mock tokens - await pretendExecutingVip(await vip001()); await pretendExecutingVip(await vip004()); for (const model of interestRateModels) { From f2e0107c8ebc0c2c65abb84976b8615c49f79350 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Thu, 12 Sep 2024 17:51:49 +0530 Subject: [PATCH 3/6] feat: vip005 on opsepolia for PSR and NTG for core pool --- multisig/proposals/opsepolia/vip-005/index.ts | 50 + .../vip-005/abi/accessControlManager.json | 360 +++++++ .../vip-005/abi/protocolShareReserve.json | 918 ++++++++++++++++++ .../simulations/opsepolia/vip-005/index.ts | 63 ++ 4 files changed, 1391 insertions(+) create mode 100644 multisig/proposals/opsepolia/vip-005/index.ts create mode 100644 multisig/simulations/opsepolia/vip-005/abi/accessControlManager.json create mode 100644 multisig/simulations/opsepolia/vip-005/abi/protocolShareReserve.json create mode 100644 multisig/simulations/opsepolia/vip-005/index.ts diff --git a/multisig/proposals/opsepolia/vip-005/index.ts b/multisig/proposals/opsepolia/vip-005/index.ts new file mode 100644 index 000000000..5b988a550 --- /dev/null +++ b/multisig/proposals/opsepolia/vip-005/index.ts @@ -0,0 +1,50 @@ +import { NETWORK_ADDRESSES } from "src/networkAddresses"; +import { makeProposal } from "src/utils"; + +const { opsepolia } = NETWORK_ADDRESSES; + +export const ACM = "0x1652E12C8ABE2f0D84466F0fc1fA4286491B3BC1"; +export const PSR = "0x0F021c29283c47DF8237741dD5a0aA22952aFc88"; +export const NATIVE_TOKEN_GATEWAY_CORE_POOL = "0xfE0AAFd5A4fEB9f6DEC36B0Cb8A972bD0B5149f7"; + +const vip005 = () => { + return makeProposal([ + { + target: PSR, + signature: "acceptOwnership()", + params: [], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [PSR, "addOrUpdateDistributionConfigs(DistributionConfig[])", opsepolia.GUARDIAN], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [PSR, "removeDistributionConfig(Schema,address)", opsepolia.GUARDIAN], + }, + { + target: PSR, + signature: "addOrUpdateDistributionConfigs((uint8,uint16,address)[])", + params: [ + [ + [0, 10000, opsepolia.VTREASURY], + [1, 10000, opsepolia.VTREASURY], + ], + ], + }, + { + target: PSR, + signature: "setPoolRegistry(address)", + params: [opsepolia.POOL_REGISTRY], + }, + { + target: NATIVE_TOKEN_GATEWAY_CORE_POOL, + signature: "acceptOwnership()", + params: [], + }, + ]); +}; + +export default vip005; diff --git a/multisig/simulations/opsepolia/vip-005/abi/accessControlManager.json b/multisig/simulations/opsepolia/vip-005/abi/accessControlManager.json new file mode 100644 index 000000000..4a118fcc4 --- /dev/null +++ b/multisig/simulations/opsepolia/vip-005/abi/accessControlManager.json @@ -0,0 +1,360 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "functionSig", + "type": "string" + } + ], + "name": "PermissionGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "functionSig", + "type": "string" + } + ], + "name": "PermissionRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + }, + { + "internalType": "address", + "name": "accountToPermit", + "type": "address" + } + ], + "name": "giveCallPermission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + } + ], + "name": "hasPermission", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + } + ], + "name": "isAllowedToCall", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "functionSig", + "type": "string" + }, + { + "internalType": "address", + "name": "accountToRevoke", + "type": "address" + } + ], + "name": "revokeCallPermission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/multisig/simulations/opsepolia/vip-005/abi/protocolShareReserve.json b/multisig/simulations/opsepolia/vip-005/abi/protocolShareReserve.json new file mode 100644 index 000000000..8a1c8ad14 --- /dev/null +++ b/multisig/simulations/opsepolia/vip-005/abi/protocolShareReserve.json @@ -0,0 +1,918 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [], + "name": "InvalidAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTotalPercentage", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "loopsLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredLoops", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "calledContract", + "type": "address" + }, + { + "internalType": "string", + "name": "methodSignature", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "percent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "AssetReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum IProtocolShareReserve.IncomeType", + "name": "incomeType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + } + ], + "name": "AssetsReservesUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "percentage", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + } + ], + "name": "DistributionConfigAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "percentage", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + } + ], + "name": "DistributionConfigRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "oldPercentage", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "newPercentage", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + } + ], + "name": "DistributionConfigUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMaxLoopsLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newmaxLoopsLimit", + "type": "uint256" + } + ], + "name": "MaxLoopsLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldAccessControlManager", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAccessControlManager", + "type": "address" + } + ], + "name": "NewAccessControlManager", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldPoolRegistry", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newPoolRegistry", + "type": "address" + } + ], + "name": "PoolRegistryUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "ReservesUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "CORE_POOL_COMPTROLLER", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_PERCENT", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WBNB", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accessControlManager", + "outputs": [ + { + "internalType": "contract IAccessControlManagerV8", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "percentage", + "type": "uint16" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct ProtocolShareReserve.DistributionConfig[]", + "name": "configs", + "type": "tuple[]" + } + ], + "name": "addOrUpdateDistributionConfigs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "enum ProtocolShareReserve.Schema", + "name": "", + "type": "uint8" + } + ], + "name": "assetsReserves", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "distributionTargets", + "outputs": [ + { + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "percentage", + "type": "uint16" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + } + ], + "name": "getPercentageDistribution", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "getUnreleasedFunds", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_accessControlManager", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_loopsLimit", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxLoopsLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address[]", + "name": "assets", + "type": "address[]" + } + ], + "name": "releaseFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum ProtocolShareReserve.Schema", + "name": "schema", + "type": "uint8" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "removeDistributionConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accessControlManager_", + "type": "address" + } + ], + "name": "setAccessControlManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_poolRegistry", + "type": "address" + } + ], + "name": "setPoolRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "totalAssetReserve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalDistributions", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "comptroller", + "type": "address" + }, + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "enum IProtocolShareReserve.IncomeType", + "name": "incomeType", + "type": "uint8" + } + ], + "name": "updateAssetsState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vBNB", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } +] diff --git a/multisig/simulations/opsepolia/vip-005/index.ts b/multisig/simulations/opsepolia/vip-005/index.ts new file mode 100644 index 000000000..ee7eb9e91 --- /dev/null +++ b/multisig/simulations/opsepolia/vip-005/index.ts @@ -0,0 +1,63 @@ +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; +import { expect } from "chai"; +import { Contract } from "ethers"; +import { ethers } from "hardhat"; +import { NETWORK_ADDRESSES } from "src/networkAddresses"; +import { initMainnetUser } from "src/utils"; +import { forking, pretendExecutingVip } from "src/vip-framework/index"; + +import vip005, { ACM, PSR } from "../../../proposals/opsepolia/vip-005"; +import ACM_ABI from "./abi/accessControlManager.json"; +import PSR_ABI from "./abi/protocolShareReserve.json"; + +const { opsepolia } = NETWORK_ADDRESSES; + +forking(17170245, async () => { + let protocolShareReserve: Contract; + let accessControlManager: Contract; + let psrSigner: SignerWithAddress; + + before(async () => { + protocolShareReserve = await ethers.getContractAt(PSR_ABI, PSR); + accessControlManager = await ethers.getContractAt(ACM_ABI, ACM); + + psrSigner = await initMainnetUser(PSR, ethers.utils.parseEther("1")); + await pretendExecutingVip(await vip005()); + }); + + describe("Post tx checks", () => { + it("PSR owner should be multisig", async () => { + const owner = await protocolShareReserve.owner(); + expect(owner).equals(opsepolia.GUARDIAN); + }); + + it("PSR should have correct ACM reference", async () => { + const acm = await protocolShareReserve.accessControlManager(); + expect(acm).equals(ACM); + }); + + it("PSR should have correct PoolRegistry reference", async () => { + expect(await protocolShareReserve.poolRegistry()).to.equal(opsepolia.POOL_REGISTRY); + }); + + it("Verify Multisig permissions for PSR", async () => { + expect( + await accessControlManager + .connect(psrSigner) + .isAllowedToCall(opsepolia.GUARDIAN, "addOrUpdateDistributionConfigs(DistributionConfig[])"), + ).to.be.true; + + expect( + await accessControlManager + .connect(psrSigner) + .isAllowedToCall(opsepolia.GUARDIAN, "removeDistributionConfig(Schema,address)"), + ).to.be.true; + }); + + it("Validate PSR distribution config", async () => { + expect(await protocolShareReserve.totalDistributions()).to.equal(2); + expect(await protocolShareReserve.getPercentageDistribution(opsepolia.VTREASURY, 0)).to.equal(10000); + expect(await protocolShareReserve.getPercentageDistribution(opsepolia.VTREASURY, 1)).to.equal(10000); + }); + }); +}); From 767d326baf001c17a5b70877be84deaca590c118 Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Thu, 12 Sep 2024 23:12:04 +0530 Subject: [PATCH 4/6] refactor: update the NTG address in vip005 for opsepolia --- multisig/proposals/opsepolia/vip-005/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multisig/proposals/opsepolia/vip-005/index.ts b/multisig/proposals/opsepolia/vip-005/index.ts index 5b988a550..555a55549 100644 --- a/multisig/proposals/opsepolia/vip-005/index.ts +++ b/multisig/proposals/opsepolia/vip-005/index.ts @@ -5,7 +5,7 @@ const { opsepolia } = NETWORK_ADDRESSES; export const ACM = "0x1652E12C8ABE2f0D84466F0fc1fA4286491B3BC1"; export const PSR = "0x0F021c29283c47DF8237741dD5a0aA22952aFc88"; -export const NATIVE_TOKEN_GATEWAY_CORE_POOL = "0xfE0AAFd5A4fEB9f6DEC36B0Cb8A972bD0B5149f7"; +export const NATIVE_TOKEN_GATEWAY_CORE_POOL = "0x521f59b2670bcc70961FB2edD4F62c3f3B1E7f6b"; const vip005 = () => { return makeProposal([ From 87cb376178f1be2313bd520b3152ffe96726f78d Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Fri, 13 Sep 2024 19:26:45 +0530 Subject: [PATCH 5/6] fix: PR comments --- multisig/proposals/opsepolia/vip-004/index.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/multisig/proposals/opsepolia/vip-004/index.ts b/multisig/proposals/opsepolia/vip-004/index.ts index 894bf6635..c1f8f586a 100644 --- a/multisig/proposals/opsepolia/vip-004/index.ts +++ b/multisig/proposals/opsepolia/vip-004/index.ts @@ -62,17 +62,22 @@ const vip004 = () => { { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "addPool(string,address,uint256,uint256,uint256)", opsepolia.GUARDIAN], + params: [ZERO_ADDRESS, "setForcedLiquidation(address,bool)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setPoolName(address,string)", opsepolia.GUARDIAN], + params: [opsepolia.POOL_REGISTRY, "addPool(string,address,uint256,uint256,uint256)", opsepolia.GUARDIAN], }, { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "updatePoolMetadata(address,VenusPoolMetaData)", opsepolia.GUARDIAN], + params: [opsepolia.POOL_REGISTRY, "setPoolName(address,string)", opsepolia.GUARDIAN], + }, + { + target: ACM, + signature: "giveCallPermission(address,string,address)", + params: [opsepolia.POOL_REGISTRY, "updatePoolMetadata(address,VenusPoolMetaData)", opsepolia.GUARDIAN], }, { target: ACM, @@ -102,7 +107,7 @@ const vip004 = () => { { target: ACM, signature: "giveCallPermission(address,string,address)", - params: [ZERO_ADDRESS, "setLastRewardingBlock(address[],uint32[],uint32[])", opsepolia.GUARDIAN], + params: [ZERO_ADDRESS, "setLastRewardingBlockTimestamps(address[],uint256[],uint256[])", opsepolia.GUARDIAN], }, { target: ACM, From 964c55c6061a886d3ec10b16114b0ff1010097ed Mon Sep 17 00:00:00 2001 From: Debugger022 Date: Mon, 16 Sep 2024 18:11:49 +0530 Subject: [PATCH 6/6] refactor: update initial supply for the WETH in core pool for opsepolia --- multisig/proposals/opsepolia/vip-004/index.ts | 6 +++--- multisig/simulations/opsepolia/vip-004/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/multisig/proposals/opsepolia/vip-004/index.ts b/multisig/proposals/opsepolia/vip-004/index.ts index c1f8f586a..667afd84c 100644 --- a/multisig/proposals/opsepolia/vip-004/index.ts +++ b/multisig/proposals/opsepolia/vip-004/index.ts @@ -209,7 +209,7 @@ const vip004 = () => { { target: opsepolia.VTREASURY, signature: "withdrawTreasuryToken(address,uint256,address)", - params: [WETH, "610978879332136515", opsepolia.GUARDIAN], + params: [WETH, parseUnits("0.4", 18), opsepolia.GUARDIAN], }, { target: WETH, @@ -219,7 +219,7 @@ const vip004 = () => { { target: WETH, signature: "approve(address,uint256)", - params: [opsepolia.POOL_REGISTRY, "610978879332136515"], + params: [opsepolia.POOL_REGISTRY, parseUnits("0.4", 18)], }, { target: VWETH_CORE, @@ -239,7 +239,7 @@ const vip004 = () => { VWETH_CORE, parseUnits("0.7", 18), parseUnits("0.75", 18), - "610978879332136515", + parseUnits("0.4", 18), opsepolia.VTREASURY, parseUnits("25", 18), parseUnits("16", 18), diff --git a/multisig/simulations/opsepolia/vip-004/index.ts b/multisig/simulations/opsepolia/vip-004/index.ts index d18b58e61..d9a0f2fb1 100644 --- a/multisig/simulations/opsepolia/vip-004/index.ts +++ b/multisig/simulations/opsepolia/vip-004/index.ts @@ -135,7 +135,7 @@ const riskParameters: { [key in VTokenSymbol]: RiskParameters } = { collateralFactor: "0.7", liquidationThreshold: "0.75", reserveFactor: "0.2", - initialSupply: "0.61097887", + initialSupply: "0.4", vTokenReceiver: opsepolia.VTREASURY, }, vUSDC_Core: { @@ -200,7 +200,7 @@ const interestRateModelAddresses: { [key in VTokenSymbol]: string } = { vOP_Core: "", }; -forking(17170245, async () => { +forking(17337900, async () => { let poolRegistry: Contract; before(async () => {