Skip to content

Commit

Permalink
test: add vtoken configuration proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGuru7 committed Sep 22, 2023
1 parent 8b7ffa1 commit 9058285
Show file tree
Hide file tree
Showing 6 changed files with 341 additions and 97 deletions.
3 changes: 2 additions & 1 deletion .eslinttsconfigrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"./scripts",
"./src",
"./vips",
"./simulations"
"./simulations",
"./multisig"
]
}
29 changes: 29 additions & 0 deletions multisig/helper/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { ethers } from "ethers";

export interface deployedContracts {
[key: string]: string;
}
export interface NetworkAddress {
[key: string]: deployedContracts;
}
export const ZERO_ADDRESS = ethers.constants.AddressZero;
export const ADDRESSES: NetworkAddress = {
sepoliaContracts: {
CHAINLINK_ORACLE: "0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
RESILIENT_ORACLE: "0x9005091f2E0b20bEf6AaF2bD7F21dfd45DA8Af07",
BOUND_VALIDATOR: "0x8305fF2eEAE00bc0C19746851c1c8643Ebd68193",
ACM: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
TIMELOCK: "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb", // Sepolia Multisig
MOCK_USDC: "0x772d68929655ce7234C8C94256526ddA66Ef641E",
MOCK_USDT: "0x8d412FD0bc5d826615065B931171Eed10F5AF266",
MOCK_WETH: "0x700868CAbb60e90d77B6588ce072d9859ec8E281",
MOCK_WBTC: "0x92A2928f5634BEa89A195e7BeCF0f0FEEDAB885b",
POOL_REGISTRY: "0x22067CF4a23955Ab7b834D4a9336ca624D93485e",
COMPTROLLER: "0x4e4048b5eb13DD377872A418268b788f672653aa",
VWBTC: "0x13c15cA5A074E7E1450492D474087b99c7253001",
VWETH: "0x195D27b4cAfcb543C9104583FA37743ad5E4cEe5",
VUSDT: "0x2c3Cc8EED38b4d323ce97DB11f98737F3F7421A1",
VUSDC: "0x6f1089e90C6a14397C20348eE704d596819DFEd4",
VTREASURY: "0xD51008eAe81475b542638433a617f5f4171b39ee",
},
};
84 changes: 25 additions & 59 deletions multisig/sepolia/oracleAclOwnership.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ProposalType } from "../../src/types";
import { makeProposal } from "../../src/utils";
import { ADDRESSES, ZERO_ADDRESS } from "../helper/config";

const { sepoliaContracts } = ADDRESSES;
export const oracleAclOwnership = () => {
const meta = {
version: "v2",
Expand All @@ -18,94 +20,58 @@ export const oracleAclOwnership = () => {
return makeProposal(
[
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: ["0x0000000000000000000000000000000000000000", "pause()", "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb"],
params: [ZERO_ADDRESS, "pause()", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"unpause()",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "unpause()", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"setOracle(address,address,uint8)",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "setOracle(address,address,uint8)", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"enableOracle(address,uint8,bool)",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "enableOracle(address,uint8,bool)", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"setTokenConfig(TokenConfig)",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "setTokenConfig(TokenConfig)", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"setDirectPrice(address,uint256)",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "setDirectPrice(address,uint256)", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"setValidateConfig(ValidateConfig)",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "setValidateConfig(ValidateConfig)", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"setMaxStalePeriod(string,uint256)",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "setMaxStalePeriod(string,uint256)", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"setSymbolOverride(string,string)",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "setSymbolOverride(string,string)", sepoliaContracts.TIMELOCK],
},
{
target: "0xbf705C00578d43B6147ab4eaE04DBBEd1ccCdc96",
target: sepoliaContracts.ACM,
signature: "giveCallPermission(address,string,address)",
params: [
"0x0000000000000000000000000000000000000000",
"setUnderlyingPythOracle(address)",
"0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb",
],
params: [ZERO_ADDRESS, "setUnderlyingPythOracle(address)", sepoliaContracts.TIMELOCK],
},
{ target: "0x9005091f2E0b20bEf6AaF2bD7F21dfd45DA8Af07", signature: "acceptOwnership()", params: [] },
{ target: "0x0a16c96EB3E767147DB477196aA8E9774945CDf7", signature: "acceptOwnership()", params: [] },
{ target: "0x8305fF2eEAE00bc0C19746851c1c8643Ebd68193", signature: "acceptOwnership()", params: [] },
{ target: sepoliaContracts.RESILIENT_ORACLE, signature: "acceptOwnership()", params: [] },
{ target: sepoliaContracts.CHAINLINK_ORACLE, signature: "acceptOwnership()", params: [] },
{ target: sepoliaContracts.BOUND_VALIDATOR, signature: "acceptOwnership()", params: [] },
],
meta,
ProposalType.REGULAR,
Expand Down
62 changes: 26 additions & 36 deletions multisig/sepolia/oracleAssetConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { ProposalType } from "../../src/types";
import { makeProposal } from "../../src/utils";
import { ADDRESSES, ZERO_ADDRESS } from "../helper/config";

const { sepoliaContracts } = ADDRESSES;
const WBTC_CHAINLINK_FEED = "0x1b44F3514812d835EB1BDB0acB33d3fA3351Ee43";
const WETH_CHAINLINK_FEED = "0x694AA1769357215DE4FAC081bf1f309aDC325306";
const USDC_CHAINLINK_FEED = "0xA2F78ab2355fe2f984D808B5CeE7FD0A93D5270E";

export const oracleAssetConfig = () => {
const meta = {
Expand All @@ -17,81 +23,65 @@ export const oracleAssetConfig = () => {
return makeProposal(
[
{
target: "0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
target: sepoliaContracts.CHAINLINK_ORACLE,
signature: "setTokenConfig((address,address,uint256))",
params: [["0xbA9c9b6c72ACd08050BBF6e03AeAD1BBbaF21ef7", "0x1b44F3514812d835EB1BDB0acB33d3fA3351Ee43", 86400]],
params: [[sepoliaContracts.MOCK_WBTC, WBTC_CHAINLINK_FEED, 86400]],
},
{
target: "0x9005091f2E0b20bEf6AaF2bD7F21dfd45DA8Af07",
target: sepoliaContracts.RESILIENT_ORACLE,
signature: "setTokenConfig((address,address[3],bool[3]))",
params: [
[
"0xbA9c9b6c72ACd08050BBF6e03AeAD1BBbaF21ef7",
[
"0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000",
],
sepoliaContracts.MOCK_WBTC,
[sepoliaContracts.CHAINLINK_ORACLE, ZERO_ADDRESS, ZERO_ADDRESS],
[true, false, false],
],
],
},
{
target: "0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
target: sepoliaContracts.CHAINLINK_ORACLE,
signature: "setTokenConfig((address,address,uint256))",
params: [["0x58ef310046b1b9CFFE304D89104EA5DF2bABee28", "0x694AA1769357215DE4FAC081bf1f309aDC325306", 86400]],
params: [[sepoliaContracts.MOCK_WETH, WETH_CHAINLINK_FEED, 86400]],
},
{
target: "0x9005091f2E0b20bEf6AaF2bD7F21dfd45DA8Af07",
target: sepoliaContracts.RESILIENT_ORACLE,
signature: "setTokenConfig((address,address[3],bool[3]))",
params: [
[
"0x58ef310046b1b9CFFE304D89104EA5DF2bABee28",
[
"0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000",
],
sepoliaContracts.MOCK_WETH,
[sepoliaContracts.CHAINLINK_ORACLE, ZERO_ADDRESS, ZERO_ADDRESS],
[true, false, false],
],
],
},
{
target: "0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
target: sepoliaContracts.CHAINLINK_ORACLE,
signature: "setTokenConfig((address,address,uint256))",
params: [["0xA8c06B029d70142F7E7b389a7C4bdFe371d9eDf5", "0xA2F78ab2355fe2f984D808B5CeE7FD0A93D5270E", 86400]],
params: [[sepoliaContracts.MOCK_USDC, USDC_CHAINLINK_FEED, 86400]],
},
{
target: "0x9005091f2E0b20bEf6AaF2bD7F21dfd45DA8Af07",
target: sepoliaContracts.RESILIENT_ORACLE,
signature: "setTokenConfig((address,address[3],bool[3]))",
params: [
[
"0xA8c06B029d70142F7E7b389a7C4bdFe371d9eDf5",
[
"0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000",
],
sepoliaContracts.MOCK_USDC,
[sepoliaContracts.CHAINLINK_ORACLE, ZERO_ADDRESS, ZERO_ADDRESS],
[true, false, false],
],
],
},
{
target: "0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
target: sepoliaContracts.CHAINLINK_ORACLE,
signature: "setDirectPrice(address,uint256)",
params: ["0xbEe8E181599bBC04ACaaa24c741a27A32883e872", "1000000000000000000"],
params: [sepoliaContracts.MOCK_USDT, "1000000000000000000"],
},
{
target: "0x9005091f2E0b20bEf6AaF2bD7F21dfd45DA8Af07",
target: sepoliaContracts.RESILIENT_ORACLE,
signature: "setTokenConfig((address,address[3],bool[3]))",
params: [
[
"0xbEe8E181599bBC04ACaaa24c741a27A32883e872",
[
"0x0a16c96EB3E767147DB477196aA8E9774945CDf7",
"0x0000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000",
],
sepoliaContracts.MOCK_USDT,
[sepoliaContracts.CHAINLINK_ORACLE, ZERO_ADDRESS, ZERO_ADDRESS],
[true, false, false],
],
],
Expand Down
Loading

0 comments on commit 9058285

Please sign in to comment.