Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VEN-2726] VIP for the XVS vault on OP sepolia #372

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions multisig/proposals/opsepolia/vip-003/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import { NETWORK_ADDRESSES } from "src/networkAddresses";
import { makeProposal } from "src/utils";

const { opsepolia } = NETWORK_ADDRESSES;

export const XVS_STORE = "0xE888FA54b32BfaD3cE0e3C7D566EFe809a6A0143";
export const ACM = "0x1652E12C8ABE2f0D84466F0fc1fA4286491B3BC1";

const vip003 = () => {
return makeProposal([
{
target: opsepolia.XVS_VAULT_PROXY,
signature: "_acceptAdmin()",
params: [],
},

{
target: XVS_STORE,
signature: "acceptAdmin()",
params: [],
},

{
target: ACM,
signature: "giveCallPermission(address,string,address)",
params: [opsepolia.XVS_VAULT_PROXY, "pause()", opsepolia.GUARDIAN],
},

{
target: ACM,
signature: "giveCallPermission(address,string,address)",
params: [opsepolia.XVS_VAULT_PROXY, "resume()", opsepolia.GUARDIAN],
},

{
target: ACM,
signature: "giveCallPermission(address,string,address)",
params: [opsepolia.XVS_VAULT_PROXY, "add(address,uint256,address,uint256,uint256)", opsepolia.GUARDIAN],
},

{
target: ACM,
signature: "giveCallPermission(address,string,address)",
params: [opsepolia.XVS_VAULT_PROXY, "set(address,uint256,uint256)", opsepolia.GUARDIAN],
},

{
target: ACM,
signature: "giveCallPermission(address,string,address)",
params: [opsepolia.XVS_VAULT_PROXY, "setRewardAmountPerBlockOrSecond(address,uint256)", opsepolia.GUARDIAN], // func name changed from setRewardAmountPerBlock to setRewardAmountPerBlockOrSecond
},

{
target: ACM,
signature: "giveCallPermission(address,string,address)",
params: [opsepolia.XVS_VAULT_PROXY, "setWithdrawalLockingPeriod(address,uint256,uint256)", opsepolia.GUARDIAN],
},

{
target: opsepolia.XVS_VAULT_PROXY,
signature: "add(address,uint256,address,uint256,uint256)",
params: [opsepolia.XVS, 100, opsepolia.XVS, "0", 604800],
},
{
target: opsepolia.XVS_VAULT_PROXY,
signature: "pause()",
params: [],
},
]);
};

export default vip003;
126 changes: 126 additions & 0 deletions multisig/simulations/opsepolia/vip-003/abi/acm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
[
{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
{
"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": "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"
}
]
Loading
Loading