@venusprotocol/governance-contracts 2.5.0-dev.4 → 2.5.0-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/005-remote-timelock.ts +9 -0
- package/deploy/008-configure-acm-commands-aggregator.ts +43 -0
- package/deployments/basesepolia/.chainId +1 -0
- package/deployments/basesepolia/ACMCommandsAggregator.json +366 -0
- package/deployments/basesepolia/AccessControlManager.json +573 -0
- package/deployments/basesepolia/CriticalTimelock.json +691 -0
- package/deployments/basesepolia/DefaultProxyAdmin.json +200 -0
- package/deployments/basesepolia/FastTrackTimelock.json +691 -0
- package/deployments/basesepolia/NormalTimelock.json +691 -0
- package/deployments/basesepolia/OmnichainExecutorOwner.json +555 -0
- package/deployments/basesepolia/OmnichainExecutorOwner_Implementation.json +600 -0
- package/deployments/basesepolia/OmnichainExecutorOwner_Proxy.json +262 -0
- package/deployments/basesepolia/OmnichainGovernanceExecutor.json +1840 -0
- package/deployments/basesepolia/solcInputs/39b818455672acbd6d12469b0e689d7a.json +40 -0
- package/deployments/basesepolia/solcInputs/8462bae4a0ff7e7203ecab090cdf091c.json +151 -0
- package/deployments/basesepolia/solcInputs/9f400d4fd6f6fcf916824838bc678e25.json +139 -0
- package/deployments/basesepolia/solcInputs/c8adce9942919fd992f7532e82a0e082.json +43 -0
- package/deployments/basesepolia/solcInputs/dd255b4e0156dfc73554b72a83ca02d8.json +40 -0
- package/deployments/basesepolia/solcInputs/e5536fb1b5f4db72d1c808989021a017.json +73 -0
- package/deployments/basesepolia.json +4228 -0
- package/deployments/basesepolia_addresses.json +16 -0
- package/dist/deploy/005-remote-timelock.d.ts +1 -0
- package/dist/deploy/005-remote-timelock.d.ts.map +1 -1
- package/dist/deploy/005-remote-timelock.js +9 -0
- package/dist/deploy/005-remote-timelock.js.map +1 -1
- package/dist/deploy/008-configure-acm-commands-aggregator.d.ts.map +1 -1
- package/dist/deploy/008-configure-acm-commands-aggregator.js +43 -0
- package/dist/deploy/008-configure-acm-commands-aggregator.js.map +1 -1
- package/dist/hardhat.config.d.ts.map +1 -1
- package/dist/hardhat.config.js +15 -0
- package/dist/hardhat.config.js.map +1 -1
- package/dist/helpers/deploy/constants.d.ts +1 -0
- package/dist/helpers/deploy/constants.d.ts.map +1 -1
- package/dist/helpers/deploy/constants.js +2 -0
- package/dist/helpers/deploy/constants.js.map +1 -1
- package/dist/helpers/deploy/deploymentConfig.d.ts.map +1 -1
- package/dist/helpers/deploy/deploymentConfig.js +6 -0
- package/dist/helpers/deploy/deploymentConfig.js.map +1 -1
- package/dist/helpers/deploy/deploymentUtils.d.ts.map +1 -1
- package/dist/helpers/deploy/deploymentUtils.js +16 -1
- package/dist/helpers/deploy/deploymentUtils.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export enum REMOTE_NETWORKS {
|
|
|
13
13
|
ZKSYNCMAINNET = "zksyncmainnet",
|
|
14
14
|
OPSEPOLIA = "opsepolia",
|
|
15
15
|
OPMAINNET = "opmainnet",
|
|
16
|
+
BASESEPOLIA = "basesepolia",
|
|
16
17
|
HARDHAT = "hardhat",
|
|
17
18
|
}
|
|
18
19
|
type DelayTypes = {
|
|
@@ -80,6 +81,11 @@ export const delayConfig: DelayConfig = {
|
|
|
80
81
|
fast: 21600,
|
|
81
82
|
critical: 3600,
|
|
82
83
|
},
|
|
84
|
+
basesepolia: {
|
|
85
|
+
normal: 600,
|
|
86
|
+
fast: 300,
|
|
87
|
+
critical: 100,
|
|
88
|
+
},
|
|
83
89
|
};
|
|
84
90
|
|
|
85
91
|
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
@@ -98,6 +104,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
|
98
104
|
args: [omnichainGovernanceExecutorAddress, delayConfig[networkName].normal],
|
|
99
105
|
log: true,
|
|
100
106
|
autoMine: true,
|
|
107
|
+
skipIfAlreadyDeployed: true,
|
|
101
108
|
});
|
|
102
109
|
|
|
103
110
|
await deploy(live ? "FastTrackTimelock" : "FastTrackTimelockRemote", {
|
|
@@ -106,6 +113,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
|
106
113
|
args: [omnichainGovernanceExecutorAddress, delayConfig[networkName].fast],
|
|
107
114
|
log: true,
|
|
108
115
|
autoMine: true,
|
|
116
|
+
skipIfAlreadyDeployed: true,
|
|
109
117
|
});
|
|
110
118
|
|
|
111
119
|
await deploy(live ? "CriticalTimelock" : "CriticalTimelockRemote", {
|
|
@@ -114,6 +122,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
|
114
122
|
args: [omnichainGovernanceExecutorAddress, delayConfig[networkName].critical],
|
|
115
123
|
log: true,
|
|
116
124
|
autoMine: true,
|
|
125
|
+
skipIfAlreadyDeployed: true,
|
|
117
126
|
});
|
|
118
127
|
};
|
|
119
128
|
|
|
@@ -71,6 +71,10 @@ const SEPOLIA_sFrxETH_ORACLE = "0x61EB836afA467677e6b403D504fe69D6940e7996";
|
|
|
71
71
|
const OPBNBTESTNET_RESILIENT_ORACLE = "0xEF4e53a9A4565ef243A2f0ee9a7fc2410E1aA623";
|
|
72
72
|
const OPBNBTESTNET_BINANCE_ORACLE = "0x496B6b03469472572C47bdB407d5549b244a74F2";
|
|
73
73
|
const OPBNBTESTNET_BOUND_VALIDATOR = "0x049537Bb065e6253e9D8D08B45Bf6b753657A746";
|
|
74
|
+
const BASESEPOLIA_RESILIENT_ORACLE = "0xC34871C982cf0Bc6e7aCa2c2670Bc319bDA1C744";
|
|
75
|
+
const BASESEPOLIA_CHAINLINK_ORACLE = "0x801aB33A69AD867500fbCda7b3dB66C73151494b";
|
|
76
|
+
const BASESEPOLIA_REDSTONE_ORACLE = "0x8267FE3f75E0A37ee34e113E767F9C9727206838";
|
|
77
|
+
const BASESEPOLIA_BOUND_VALIDATOR = "0xC76284488E57554A457A75a8b166fB2ADAB430dB";
|
|
74
78
|
|
|
75
79
|
const ARBITRUMONE_XVS = "0xc1Eb7689147C81aC840d4FF0D298489fc7986d52";
|
|
76
80
|
const ETHEREUM_XVS = "0xd3CC9d8f3689B83c91b7B59cAB4946B063EB894A";
|
|
@@ -84,6 +88,8 @@ const OPBNBMAINNET_XVS_BRIDGE_ADMIN = "0x52fcE05aDbf6103d71ed2BA8Be7A31728273183
|
|
|
84
88
|
const ARBITRUMSEPOLIA_XVS_BRIDGE_ADMIN = "0xc94578caCC89a29B044a0a1D54d20d48A645E5C8";
|
|
85
89
|
const SEPOLIA_XVS_BRIDGE_ADMIN = "0xd3c6bdeeadB2359F726aD4cF42EAa8B7102DAd9B";
|
|
86
90
|
const OPBNBTESTNET_XVS_BRIDGE_ADMIN = "0x19252AFD0B2F539C400aEab7d460CBFbf74c17ff";
|
|
91
|
+
const BASESEPOLIA_XVS = "0xE657EDb5579B82135a274E85187927C42E38C021";
|
|
92
|
+
const BASESEPOLIA_XVS_BRIDGE_ADMIN = "0xE431E82d8fFfd81E7c082BeC7Fe2C306f5c988aD";
|
|
87
93
|
|
|
88
94
|
const ARBITRUMONE_XVS_VAULT_PROXY = "0x8b79692AAB2822Be30a6382Eb04763A74752d5B4";
|
|
89
95
|
const ETHEREUM_XVS_VAULT_PROXY = "0xA0882C2D5DF29233A092d2887A258C2b90e9b994";
|
|
@@ -91,6 +97,7 @@ const OPBNBMAINNET_XVS_VAULT_PROXY = "0x7dc969122450749A8B0777c0e324522d67737988
|
|
|
91
97
|
const ARBITRUMSEPOLIA_XVS_VAULT_PROXY = "0x407507DC2809D3aa31D54EcA3BEde5C5c4C8A17F";
|
|
92
98
|
const SEPOLIA_XVS_VAULT_PROXY = "0x1129f882eAa912aE6D4f6D445b2E2b1eCbA99fd5";
|
|
93
99
|
const OPBNBTESTNET_XVS_VAULT_PROXY = "0xB14A0e72C5C202139F78963C9e89252c1ad16f01";
|
|
100
|
+
const BASESEPOLIA_XVS_VAULT_PROXY = "0x9b5D0aDfCEcC8ed422d714EcbcE2FFA436e269B8";
|
|
94
101
|
|
|
95
102
|
const ETHEREUM_XVS_VAULT_TREASURY = "0xaE39C38AF957338b3cEE2b3E5d825ea88df02EfE";
|
|
96
103
|
const SEPOLIA_XVS_VAULT_TREASURY = "0xCCB08e5107b406E67Ad8356023dd489CEbc79B40";
|
|
@@ -101,6 +108,7 @@ const OPBNBMAINNET_POOL_REGISTRY = "0x345a030Ad22e2317ac52811AC41C1A63cfa13aEe";
|
|
|
101
108
|
const SEPOLIA_POOL_REGISTRY = "0x758f5715d817e02857Ba40889251201A5aE3E186";
|
|
102
109
|
const OPBNBTESTNET_POOL_REGISTRY = "0x560eA4e1cC42591E9f5F5D83Ad2fd65F30128951";
|
|
103
110
|
const ARBITRUMSEPOLIA_POOL_REGISTRY = "0xf93Df3135e0D555185c0BC888073374cA551C5fE";
|
|
111
|
+
const BASESEPOLIA_POOL_REGISTRY = "0xCa330282BEeb07a81963336d0bf8f5f34317916c";
|
|
104
112
|
|
|
105
113
|
const ARBITRUMONE_PRIME = "0xFE69720424C954A2da05648a0FAC84f9bf11Ef49";
|
|
106
114
|
const ARBITRUMONE_PLP = "0x86bf21dB200f29F21253080942Be8af61046Ec29";
|
|
@@ -118,6 +126,9 @@ const SEPOLIA_PLP = "0x15242a55Ad1842A1aEa09c59cf8366bD2f3CE9B4";
|
|
|
118
126
|
const SEPOLIA_PSR = "0xbea70755cc3555708ca11219adB0db4C80F6721B";
|
|
119
127
|
const OPBNBTESTNET_PSR = "0xc355dEb1A9289f8C58CFAa076EEdBf51F3A8Da7F";
|
|
120
128
|
const SEPOLIA_CONVERTER_NETWORK = "0xB5A4208bFC4cC2C4670744849B8fC35B21A690Fa";
|
|
129
|
+
const BASESEPOLIA_PRIME = "0x15A1AC7fA14C5900Ba93853375d66b6bB6A83B50";
|
|
130
|
+
const BASESEPOLIA_PLP = "0xb5BA66311C5f9A5C9d3CeE0183F5426DD694dE37";
|
|
131
|
+
const BASESEPOLIA_PSR = "0x4Ae3D77Ece08Ec3E5f5842B195f746bd3bCb8d73";
|
|
121
132
|
|
|
122
133
|
const ARBITRUMONE_GUARDIAN = "0x14e0E151b33f9802b3e75b621c1457afc44DcAA0";
|
|
123
134
|
const ETHEREUM_GUARDIAN = "0x285960C5B22fD66A736C7136967A3eB15e93CC67";
|
|
@@ -125,10 +136,12 @@ const OPBNBMAINNET_GUARDIAN = "0xC46796a21a3A9FAB6546aF3434F2eBfFd0604207";
|
|
|
125
136
|
const SEPOLIA_GUARDIAN = "0x94fa6078b6b8a26f0b6edffbe6501b22a10470fb";
|
|
126
137
|
const OPBNBTESTNET_GUARDIAN = "0xb15f6EfEbC276A3b9805df81b5FB3D50C2A62BDf";
|
|
127
138
|
const ARBITRUMSEPOLIA_GUARDIAN = "0x1426A5Ae009c4443188DA8793751024E358A61C2";
|
|
139
|
+
const BASESEPOLIA_GUARDIAN = "0xdf3b635d2b535f906BB02abb22AED71346E36a00";
|
|
128
140
|
|
|
129
141
|
const ARBITRUMSEPOLIA_OMNICHAIN_EXECUTOR_OWNER = "0xfCA70dd553b7dF6eB8F813CFEA6a9DD039448878";
|
|
130
142
|
const SEPOLIA_OMNICHAIN_EXECUTOR_OWNER = "0xf964158C67439D01e5f17F0A3F39DfF46823F27A";
|
|
131
143
|
const OPBNBTESTNET_OMNICHAIN_EXECUTOR_OWNER = "0x4F570240FF6265Fbb1C79cE824De6408F1948913";
|
|
144
|
+
const BASESEPOLIA_OMNICHAIN_EXECUTOR_OWNER = "0xe3fb08B8817a0c88d39A4DA4eFFD586D3326b73b";
|
|
132
145
|
|
|
133
146
|
const ETHEREUM_CONVERTERS: string[] = [
|
|
134
147
|
"0xaE39C38AF957338b3cEE2b3E5d825ea88df02EfE",
|
|
@@ -257,6 +270,23 @@ const grantPermissions: Permissions = {
|
|
|
257
270
|
...getIRMPermissions(),
|
|
258
271
|
...getOmniChainExecutorOwnerPermissions(OPBNBTESTNET_OMNICHAIN_EXECUTOR_OWNER, OPBNBTESTNET_GUARDIAN),
|
|
259
272
|
],
|
|
273
|
+
basesepolia: [
|
|
274
|
+
...getResilientOraclePermissions(BASESEPOLIA_RESILIENT_ORACLE),
|
|
275
|
+
...getChainlinkOraclePermissions(BASESEPOLIA_CHAINLINK_ORACLE),
|
|
276
|
+
...getRedstoneOraclePermissions(BASESEPOLIA_REDSTONE_ORACLE),
|
|
277
|
+
...getBoundValidatorPermissions(BASESEPOLIA_BOUND_VALIDATOR),
|
|
278
|
+
...getXVSPermissions(BASESEPOLIA_XVS),
|
|
279
|
+
...getXVSBridgeAdminPermissions(BASESEPOLIA_XVS_BRIDGE_ADMIN),
|
|
280
|
+
...getXVSVaultPermissions(BASESEPOLIA_XVS_VAULT_PROXY),
|
|
281
|
+
...getPoolRegistryPermissions(BASESEPOLIA_POOL_REGISTRY),
|
|
282
|
+
...getPrimePermissions(BASESEPOLIA_PRIME),
|
|
283
|
+
...getPrimeLiquidityProviderPermissions(BASESEPOLIA_PLP),
|
|
284
|
+
...getProtocolShareReservePermissions(BASESEPOLIA_PSR),
|
|
285
|
+
...getComptrollerPermissions(),
|
|
286
|
+
...getVTokenPermissions(),
|
|
287
|
+
...getRewardDistributorPermissionsTimebased(),
|
|
288
|
+
...getIRMPermissions(),
|
|
289
|
+
],
|
|
260
290
|
};
|
|
261
291
|
|
|
262
292
|
const revokePermissions: Permissions = {
|
|
@@ -348,6 +378,19 @@ const revokePermissions: Permissions = {
|
|
|
348
378
|
...getRedstoneOracleRevokePermissions(ARBITRUMSEPOLIA_REDSTONE_ORACLE, ARBITRUMSEPOLIA_GUARDIAN),
|
|
349
379
|
...getOmniChainExecutorOwnerRevokePermissions(ARBITRUMSEPOLIA_OMNICHAIN_EXECUTOR_OWNER, ARBITRUMSEPOLIA_GUARDIAN),
|
|
350
380
|
],
|
|
381
|
+
basesepolia: [
|
|
382
|
+
...getPrimeRevokePermissions(BASESEPOLIA_PRIME, BASESEPOLIA_GUARDIAN),
|
|
383
|
+
...getPrimeLiquidityProviderRevokePermissions(BASESEPOLIA_PLP, BASESEPOLIA_GUARDIAN),
|
|
384
|
+
...getResilientOracleRevokePermissions(BASESEPOLIA_RESILIENT_ORACLE, BASESEPOLIA_GUARDIAN),
|
|
385
|
+
...getBoundValidatorRevokePermissions(BASESEPOLIA_BOUND_VALIDATOR, BASESEPOLIA_GUARDIAN),
|
|
386
|
+
...getXVSVaultRevokePermissions(BASESEPOLIA_XVS_VAULT_PROXY, BASESEPOLIA_GUARDIAN),
|
|
387
|
+
...getRewardDistributorRevokePermissions(BASESEPOLIA_GUARDIAN, true),
|
|
388
|
+
...getIRMRevokePermissions(BASESEPOLIA_GUARDIAN),
|
|
389
|
+
...getPoolRegistryRevokePermissions(BASESEPOLIA_POOL_REGISTRY, BASESEPOLIA_GUARDIAN),
|
|
390
|
+
...getComptrollerRevokePermissions(BASESEPOLIA_GUARDIAN),
|
|
391
|
+
...getVTokenRevokePermissions(BASESEPOLIA_GUARDIAN),
|
|
392
|
+
...getXVSBridgeAdminRevokePermissions(BASESEPOLIA_XVS_BRIDGE_ADMIN, BASESEPOLIA_GUARDIAN),
|
|
393
|
+
],
|
|
351
394
|
};
|
|
352
395
|
|
|
353
396
|
function splitPermissions(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
84532
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
{
|
|
2
|
+
"address": "0xd82A217713F6c61f3ed4199cdEEDfbB80e5E4562",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "contract IAccessControlManagerV8",
|
|
8
|
+
"name": "_acm",
|
|
9
|
+
"type": "address"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"stateMutability": "nonpayable",
|
|
13
|
+
"type": "constructor"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"inputs": [],
|
|
17
|
+
"name": "EmptyPermissions",
|
|
18
|
+
"type": "error"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"inputs": [],
|
|
22
|
+
"name": "ZeroAddressNotAllowed",
|
|
23
|
+
"type": "error"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"anonymous": false,
|
|
27
|
+
"inputs": [
|
|
28
|
+
{
|
|
29
|
+
"indexed": false,
|
|
30
|
+
"internalType": "uint256",
|
|
31
|
+
"name": "index",
|
|
32
|
+
"type": "uint256"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"name": "GrantPermissionsAdded",
|
|
36
|
+
"type": "event"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"anonymous": false,
|
|
40
|
+
"inputs": [
|
|
41
|
+
{
|
|
42
|
+
"indexed": false,
|
|
43
|
+
"internalType": "uint256",
|
|
44
|
+
"name": "index",
|
|
45
|
+
"type": "uint256"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"name": "GrantPermissionsExecuted",
|
|
49
|
+
"type": "event"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"anonymous": false,
|
|
53
|
+
"inputs": [
|
|
54
|
+
{
|
|
55
|
+
"indexed": false,
|
|
56
|
+
"internalType": "uint256",
|
|
57
|
+
"name": "index",
|
|
58
|
+
"type": "uint256"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"name": "RevokePermissionsAdded",
|
|
62
|
+
"type": "event"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"anonymous": false,
|
|
66
|
+
"inputs": [
|
|
67
|
+
{
|
|
68
|
+
"indexed": false,
|
|
69
|
+
"internalType": "uint256",
|
|
70
|
+
"name": "index",
|
|
71
|
+
"type": "uint256"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"name": "RevokePermissionsExecuted",
|
|
75
|
+
"type": "event"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"inputs": [],
|
|
79
|
+
"name": "ACM",
|
|
80
|
+
"outputs": [
|
|
81
|
+
{
|
|
82
|
+
"internalType": "contract IAccessControlManagerV8",
|
|
83
|
+
"name": "",
|
|
84
|
+
"type": "address"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"stateMutability": "view",
|
|
88
|
+
"type": "function"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"inputs": [
|
|
92
|
+
{
|
|
93
|
+
"components": [
|
|
94
|
+
{
|
|
95
|
+
"internalType": "address",
|
|
96
|
+
"name": "contractAddress",
|
|
97
|
+
"type": "address"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"internalType": "string",
|
|
101
|
+
"name": "functionSig",
|
|
102
|
+
"type": "string"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"internalType": "address",
|
|
106
|
+
"name": "account",
|
|
107
|
+
"type": "address"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"internalType": "struct ACMCommandsAggregator.Permission[]",
|
|
111
|
+
"name": "_permissions",
|
|
112
|
+
"type": "tuple[]"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"name": "addGrantPermissions",
|
|
116
|
+
"outputs": [],
|
|
117
|
+
"stateMutability": "nonpayable",
|
|
118
|
+
"type": "function"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"inputs": [
|
|
122
|
+
{
|
|
123
|
+
"components": [
|
|
124
|
+
{
|
|
125
|
+
"internalType": "address",
|
|
126
|
+
"name": "contractAddress",
|
|
127
|
+
"type": "address"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"internalType": "string",
|
|
131
|
+
"name": "functionSig",
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"internalType": "address",
|
|
136
|
+
"name": "account",
|
|
137
|
+
"type": "address"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"internalType": "struct ACMCommandsAggregator.Permission[]",
|
|
141
|
+
"name": "_permissions",
|
|
142
|
+
"type": "tuple[]"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"name": "addRevokePermissions",
|
|
146
|
+
"outputs": [],
|
|
147
|
+
"stateMutability": "nonpayable",
|
|
148
|
+
"type": "function"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"inputs": [
|
|
152
|
+
{
|
|
153
|
+
"internalType": "uint256",
|
|
154
|
+
"name": "index",
|
|
155
|
+
"type": "uint256"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"name": "executeGrantPermissions",
|
|
159
|
+
"outputs": [],
|
|
160
|
+
"stateMutability": "nonpayable",
|
|
161
|
+
"type": "function"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"inputs": [
|
|
165
|
+
{
|
|
166
|
+
"internalType": "uint256",
|
|
167
|
+
"name": "index",
|
|
168
|
+
"type": "uint256"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"name": "executeRevokePermissions",
|
|
172
|
+
"outputs": [],
|
|
173
|
+
"stateMutability": "nonpayable",
|
|
174
|
+
"type": "function"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"inputs": [
|
|
178
|
+
{
|
|
179
|
+
"internalType": "uint256",
|
|
180
|
+
"name": "",
|
|
181
|
+
"type": "uint256"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"internalType": "uint256",
|
|
185
|
+
"name": "",
|
|
186
|
+
"type": "uint256"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"name": "grantPermissions",
|
|
190
|
+
"outputs": [
|
|
191
|
+
{
|
|
192
|
+
"internalType": "address",
|
|
193
|
+
"name": "contractAddress",
|
|
194
|
+
"type": "address"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"internalType": "string",
|
|
198
|
+
"name": "functionSig",
|
|
199
|
+
"type": "string"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"internalType": "address",
|
|
203
|
+
"name": "account",
|
|
204
|
+
"type": "address"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"stateMutability": "view",
|
|
208
|
+
"type": "function"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"inputs": [
|
|
212
|
+
{
|
|
213
|
+
"internalType": "uint256",
|
|
214
|
+
"name": "",
|
|
215
|
+
"type": "uint256"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"internalType": "uint256",
|
|
219
|
+
"name": "",
|
|
220
|
+
"type": "uint256"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"name": "revokePermissions",
|
|
224
|
+
"outputs": [
|
|
225
|
+
{
|
|
226
|
+
"internalType": "address",
|
|
227
|
+
"name": "contractAddress",
|
|
228
|
+
"type": "address"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"internalType": "string",
|
|
232
|
+
"name": "functionSig",
|
|
233
|
+
"type": "string"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"internalType": "address",
|
|
237
|
+
"name": "account",
|
|
238
|
+
"type": "address"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"stateMutability": "view",
|
|
242
|
+
"type": "function"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"transactionHash": "0x01446a67dad89a06c60cac17b76741df53f36f2820d925eae4d03dc690d2cbb2",
|
|
246
|
+
"receipt": {
|
|
247
|
+
"to": null,
|
|
248
|
+
"from": "0x646413D07084c4C9B07C023a2207ad0b5292094d",
|
|
249
|
+
"contractAddress": "0xd82A217713F6c61f3ed4199cdEEDfbB80e5E4562",
|
|
250
|
+
"transactionIndex": 2,
|
|
251
|
+
"gasUsed": "937641",
|
|
252
|
+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
253
|
+
"blockHash": "0xdbc8f5b8c7930af5f770c14249990382d3ed9d3c530899de330b0a47d2508f45",
|
|
254
|
+
"transactionHash": "0x01446a67dad89a06c60cac17b76741df53f36f2820d925eae4d03dc690d2cbb2",
|
|
255
|
+
"logs": [],
|
|
256
|
+
"blockNumber": 18508532,
|
|
257
|
+
"cumulativeGasUsed": "1191006",
|
|
258
|
+
"status": 1,
|
|
259
|
+
"byzantium": true
|
|
260
|
+
},
|
|
261
|
+
"args": ["0x724138223D8F76b519fdE715f60124E7Ce51e051"],
|
|
262
|
+
"numDeployments": 1,
|
|
263
|
+
"solcInputHash": "c8adce9942919fd992f7532e82a0e082",
|
|
264
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"_acm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"EmptyPermissions\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"GrantPermissionsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"GrantPermissionsExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"RevokePermissionsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"RevokePermissionsExecuted\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACM\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"internalType\":\"struct ACMCommandsAggregator.Permission[]\",\"name\":\"_permissions\",\"type\":\"tuple[]\"}],\"name\":\"addGrantPermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"internalType\":\"struct ACMCommandsAggregator.Permission[]\",\"name\":\"_permissions\",\"type\":\"tuple[]\"}],\"name\":\"addRevokePermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"executeGrantPermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"executeRevokePermissions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"grantPermissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"revokePermissions\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{},\"title\":\"ACMCommandsAggregator\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"kind\":\"user\",\"methods\":{\"ACM()\":{\"notice\":\"Access control manager contract\"}},\"notice\":\"This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Utils/ACMCommandsAggregator.sol\":\"ACMCommandsAggregator\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"},\"contracts/Utils/ACMCommandsAggregator.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { IAccessControlManagerV8 } from \\\"../Governance/IAccessControlManagerV8.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title ACMCommandsAggregator\\n * @author Venus\\n * @notice This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.\\n */\\ncontract ACMCommandsAggregator {\\n /*\\n * @notice Struct to store permission details\\n */\\n struct Permission {\\n /*\\n * @notice Address of the contract\\n */\\n address contractAddress;\\n /*\\n * @notice Function signature\\n */\\n string functionSig;\\n /*\\n * @notice Address of the account\\n */\\n address account;\\n }\\n\\n /**\\n * @notice Access control manager contract\\n */\\n IAccessControlManagerV8 public immutable ACM;\\n\\n /*\\n * @notice 2D array to store grant permissions in batches\\n */\\n Permission[][] public grantPermissions;\\n\\n /*\\n * @notice 2D array to store revoke permissions in batches\\n */\\n Permission[][] public revokePermissions;\\n\\n /*\\n * @notice Event emitted when grant permissions are added\\n */\\n event GrantPermissionsAdded(uint256 index);\\n\\n /*\\n * @notice Event emitted when revoke permissions are added\\n */\\n event RevokePermissionsAdded(uint256 index);\\n\\n /*\\n * @notice Event emitted when grant permissions are executed\\n */\\n event GrantPermissionsExecuted(uint256 index);\\n\\n /*\\n * @notice Event emitted when revoke permissions are executed\\n */\\n event RevokePermissionsExecuted(uint256 index);\\n\\n /*\\n * @notice Error to be thrown when permissions are empty\\n */\\n error EmptyPermissions();\\n\\n /*\\n * @notice Constructor to set the access control manager\\n * @param _acm Address of the access control manager\\n */\\n constructor(IAccessControlManagerV8 _acm) {\\n ensureNonzeroAddress(address(_acm));\\n ACM = _acm;\\n }\\n\\n /*\\n * @notice Function to add grant permissions\\n * @param _permissions Array of permissions\\n * @custom:event Emits GrantPermissionsAdded event\\n */\\n function addGrantPermissions(Permission[] memory _permissions) external {\\n if (_permissions.length == 0) {\\n revert EmptyPermissions();\\n }\\n\\n uint256 index = grantPermissions.length;\\n grantPermissions.push();\\n\\n for (uint256 i; i < _permissions.length; ++i) {\\n grantPermissions[index].push(\\n Permission(_permissions[i].contractAddress, _permissions[i].functionSig, _permissions[i].account)\\n );\\n }\\n\\n emit GrantPermissionsAdded(index);\\n }\\n\\n /*\\n * @notice Function to add revoke permissions\\n * @param _permissions Array of permissions\\n * @custom:event Emits RevokePermissionsAdded event\\n */\\n function addRevokePermissions(Permission[] memory _permissions) external {\\n if (_permissions.length == 0) {\\n revert EmptyPermissions();\\n }\\n\\n uint256 index = revokePermissions.length;\\n revokePermissions.push();\\n\\n for (uint256 i; i < _permissions.length; ++i) {\\n revokePermissions[index].push(\\n Permission(_permissions[i].contractAddress, _permissions[i].functionSig, _permissions[i].account)\\n );\\n }\\n\\n emit RevokePermissionsAdded(index);\\n }\\n\\n /*\\n * @notice Function to execute grant permissions\\n * @param index Index of the permissions array\\n * @custom:event Emits GrantPermissionsExecuted event\\n */\\n function executeGrantPermissions(uint256 index) external {\\n uint256 length = grantPermissions[index].length;\\n for (uint256 i; i < length; ++i) {\\n Permission memory permission = grantPermissions[index][i];\\n ACM.giveCallPermission(permission.contractAddress, permission.functionSig, permission.account);\\n }\\n\\n emit GrantPermissionsExecuted(index);\\n }\\n\\n /*\\n * @notice Function to execute revoke permissions\\n * @param index Index of the permissions array\\n * @custom:event Emits RevokePermissionsExecuted event\\n */\\n function executeRevokePermissions(uint256 index) external {\\n uint256 length = revokePermissions[index].length;\\n for (uint256 i; i < length; ++i) {\\n Permission memory permission = revokePermissions[index][i];\\n ACM.revokeCallPermission(permission.contractAddress, permission.functionSig, permission.account);\\n }\\n\\n emit RevokePermissionsExecuted(index);\\n }\\n}\\n\",\"keccak256\":\"0xe642b8f0e0fedc74d31196197bc7d78b43b44eab556c07ec74d6b75ccf8d0f8c\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
|
|
265
|
+
"bytecode": "0x60a0604052348015600f57600080fd5b506040516110c73803806110c7833981016040819052602c91606c565b6033816043565b6001600160a01b0316608052609a565b6001600160a01b0381166069576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600060208284031215607d57600080fd5b81516001600160a01b0381168114609357600080fd5b9392505050565b6080516110046100c360003960008181610100015281816102de0152610a0101526110046000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639d6c76b81161005b5780639d6c76b8146100d5578063de46a235146100e8578063f9b80da1146100fb578063ff1575e11461014757600080fd5b806322473d8c14610082578063514aab87146100975780635666a5ea146100c2575b600080fd5b610095610090366004610ab8565b61015a565b005b6100aa6100a5366004610ad1565b61038d565b6040516100b993929190610af3565b60405180910390f35b6100956100d0366004610c59565b610492565b6100956100e3366004610c59565b610689565b6100956100f6366004610ab8565b61087f565b6101227f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b9565b6100aa610155366004610ad1565b610aa8565b60006001828154811061016f5761016f610de1565b600091825260208220015491505b818110156103545760006001848154811061019a5761019a610de1565b9060005260206000200182815481106101b5576101b5610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161020290610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461022e90610e10565b801561027b5780601f106102505761010080835404028352916020019161027b565b820191906000526020600020905b81548152906001019060200180831161025e57829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f545f7a320000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363545f7a329361031693909291600401610af3565b600060405180830381600087803b15801561033057600080fd5b505af1158015610344573d6000803e3d6000fd5b505050505080600101905061017d565b506040518281527f1382323d6618527d8b03daa05db815f0490966e8b80679fe5ad3d868f84e1a71906020015b60405180910390a15050565b6000828154811061039d57600080fd5b9060005260206000200181815481106103b557600080fd5b60009182526020909120600390910201805460018201805473ffffffffffffffffffffffffffffffffffffffff90921694509192506103f390610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461041f90610e10565b801561046c5780601f106104415761010080835404028352916020019161046c565b820191906000526020600020905b81548152906001019060200180831161044f57829003601f168201915b5050506002909301549192505073ffffffffffffffffffffffffffffffffffffffff1683565b80516000036104cd576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805480820182556000918252905b825181101561065857600182815481106104f9576104f9610de1565b90600052602060002001604051806060016040528085848151811061052057610520610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061055957610559610de1565b602002602001015160200151815260200185848151811061057c5761057c610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906106019082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016104dd565b506040518181527f75922591bf2cec980645dc4a32bb7d5e8da9a15fda86dacf06f8402cecd1478f90602001610381565b80516000036106c4576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054600181018255818052905b825181101561084e57600082815481106106ef576106ef610de1565b90600052602060002001604051806060016040528085848151811061071657610716610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061074f5761074f610de1565b602002602001015160200151815260200185848151811061077257610772610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906107f79082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016106d3565b506040518181527ff8ca6ea7cc31be8572501c37ef5e9e8298be717fb881e0b1ca785aecc4d25e9f90602001610381565b600080828154811061089357610893610de1565b600091825260208220015491505b81811015610a775760008084815481106108bd576108bd610de1565b9060005260206000200182815481106108d8576108d8610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161092590610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461095190610e10565b801561099e5780601f106109735761010080835404028352916020019161099e565b820191906000526020600020905b81548152906001019060200180831161098157829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f584f6b600000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363584f6b6093610a3993909291600401610af3565b600060405180830381600087803b158015610a5357600080fd5b505af1158015610a67573d6000803e3d6000fd5b50505050508060010190506108a1565b506040518281527f01a805f459381af632ecab72ec192c3f9a4c72d26be089026ffd6636d82de98890602001610381565b6001828154811061039d57600080fd5b600060208284031215610aca57600080fd5b5035919050565b60008060408385031215610ae457600080fd5b50508035926020909101359150565b600073ffffffffffffffffffffffffffffffffffffffff8086168352602060606020850152855180606086015260005b81811015610b3f57878101830151868201608001528201610b23565b5060006080828701015260807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011686010193505050808416604084015250949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610bdb57610bdb610b89565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610c2857610c28610b89565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c5457600080fd5b919050565b60006020808385031215610c6c57600080fd5b823567ffffffffffffffff80821115610c8457600080fd5b818501915085601f830112610c9857600080fd5b813581811115610caa57610caa610b89565b8060051b610cb9858201610be1565b9182528381018501918581019089841115610cd357600080fd5b86860192505b83831015610dd457823585811115610cf057600080fd5b86017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06060828d0382011215610d265760008081fd5b610d2e610bb8565b610d398a8401610c30565b815260408084013589811115610d4f5760008081fd5b8401603f81018f13610d615760008081fd5b8b8101358a811115610d7557610d75610b89565b610d858d86601f84011601610be1565b94508085528f83828401011115610d9c5760008081fd5b808383018e87013760008d82870101525050828b830152610dbf60608501610c30565b90820152845250509186019190860190610cd9565b9998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c90821680610e2457607f821691505b602082108103610e5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610eaf576000816000526020600020601f850160051c81016020861015610e8c5750805b601f850160051c820191505b81811015610eab57828155600101610e98565b5050505b505050565b815167ffffffffffffffff811115610ece57610ece610b89565b610ee281610edc8454610e10565b84610e63565b602080601f831160018114610f355760008415610eff5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610eab565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015610f8257888601518255948401946001909101908401610f63565b5085821015610fbe57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b0190555056fea264697066735822122090d4936e163063dfe747da5bf04cc06002b17436a13e78a30b2797e6219ebb2264736f6c63430008190033",
|
|
266
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80639d6c76b81161005b5780639d6c76b8146100d5578063de46a235146100e8578063f9b80da1146100fb578063ff1575e11461014757600080fd5b806322473d8c14610082578063514aab87146100975780635666a5ea146100c2575b600080fd5b610095610090366004610ab8565b61015a565b005b6100aa6100a5366004610ad1565b61038d565b6040516100b993929190610af3565b60405180910390f35b6100956100d0366004610c59565b610492565b6100956100e3366004610c59565b610689565b6100956100f6366004610ab8565b61087f565b6101227f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b9565b6100aa610155366004610ad1565b610aa8565b60006001828154811061016f5761016f610de1565b600091825260208220015491505b818110156103545760006001848154811061019a5761019a610de1565b9060005260206000200182815481106101b5576101b5610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161020290610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461022e90610e10565b801561027b5780601f106102505761010080835404028352916020019161027b565b820191906000526020600020905b81548152906001019060200180831161025e57829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f545f7a320000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363545f7a329361031693909291600401610af3565b600060405180830381600087803b15801561033057600080fd5b505af1158015610344573d6000803e3d6000fd5b505050505080600101905061017d565b506040518281527f1382323d6618527d8b03daa05db815f0490966e8b80679fe5ad3d868f84e1a71906020015b60405180910390a15050565b6000828154811061039d57600080fd5b9060005260206000200181815481106103b557600080fd5b60009182526020909120600390910201805460018201805473ffffffffffffffffffffffffffffffffffffffff90921694509192506103f390610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461041f90610e10565b801561046c5780601f106104415761010080835404028352916020019161046c565b820191906000526020600020905b81548152906001019060200180831161044f57829003601f168201915b5050506002909301549192505073ffffffffffffffffffffffffffffffffffffffff1683565b80516000036104cd576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805480820182556000918252905b825181101561065857600182815481106104f9576104f9610de1565b90600052602060002001604051806060016040528085848151811061052057610520610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061055957610559610de1565b602002602001015160200151815260200185848151811061057c5761057c610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906106019082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016104dd565b506040518181527f75922591bf2cec980645dc4a32bb7d5e8da9a15fda86dacf06f8402cecd1478f90602001610381565b80516000036106c4576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054600181018255818052905b825181101561084e57600082815481106106ef576106ef610de1565b90600052602060002001604051806060016040528085848151811061071657610716610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061074f5761074f610de1565b602002602001015160200151815260200185848151811061077257610772610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906107f79082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016106d3565b506040518181527ff8ca6ea7cc31be8572501c37ef5e9e8298be717fb881e0b1ca785aecc4d25e9f90602001610381565b600080828154811061089357610893610de1565b600091825260208220015491505b81811015610a775760008084815481106108bd576108bd610de1565b9060005260206000200182815481106108d8576108d8610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161092590610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461095190610e10565b801561099e5780601f106109735761010080835404028352916020019161099e565b820191906000526020600020905b81548152906001019060200180831161098157829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f584f6b600000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363584f6b6093610a3993909291600401610af3565b600060405180830381600087803b158015610a5357600080fd5b505af1158015610a67573d6000803e3d6000fd5b50505050508060010190506108a1565b506040518281527f01a805f459381af632ecab72ec192c3f9a4c72d26be089026ffd6636d82de98890602001610381565b6001828154811061039d57600080fd5b600060208284031215610aca57600080fd5b5035919050565b60008060408385031215610ae457600080fd5b50508035926020909101359150565b600073ffffffffffffffffffffffffffffffffffffffff8086168352602060606020850152855180606086015260005b81811015610b3f57878101830151868201608001528201610b23565b5060006080828701015260807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011686010193505050808416604084015250949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610bdb57610bdb610b89565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610c2857610c28610b89565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c5457600080fd5b919050565b60006020808385031215610c6c57600080fd5b823567ffffffffffffffff80821115610c8457600080fd5b818501915085601f830112610c9857600080fd5b813581811115610caa57610caa610b89565b8060051b610cb9858201610be1565b9182528381018501918581019089841115610cd357600080fd5b86860192505b83831015610dd457823585811115610cf057600080fd5b86017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06060828d0382011215610d265760008081fd5b610d2e610bb8565b610d398a8401610c30565b815260408084013589811115610d4f5760008081fd5b8401603f81018f13610d615760008081fd5b8b8101358a811115610d7557610d75610b89565b610d858d86601f84011601610be1565b94508085528f83828401011115610d9c5760008081fd5b808383018e87013760008d82870101525050828b830152610dbf60608501610c30565b90820152845250509186019190860190610cd9565b9998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c90821680610e2457607f821691505b602082108103610e5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610eaf576000816000526020600020601f850160051c81016020861015610e8c5750805b601f850160051c820191505b81811015610eab57828155600101610e98565b5050505b505050565b815167ffffffffffffffff811115610ece57610ece610b89565b610ee281610edc8454610e10565b84610e63565b602080601f831160018114610f355760008415610eff5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610eab565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015610f8257888601518255948401946001909101908401610f63565b5085821015610fbe57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b0190555056fea264697066735822122090d4936e163063dfe747da5bf04cc06002b17436a13e78a30b2797e6219ebb2264736f6c63430008190033",
|
|
267
|
+
"devdoc": {
|
|
268
|
+
"author": "Venus",
|
|
269
|
+
"kind": "dev",
|
|
270
|
+
"methods": {},
|
|
271
|
+
"title": "ACMCommandsAggregator",
|
|
272
|
+
"version": 1
|
|
273
|
+
},
|
|
274
|
+
"userdoc": {
|
|
275
|
+
"errors": {
|
|
276
|
+
"ZeroAddressNotAllowed()": [
|
|
277
|
+
{
|
|
278
|
+
"notice": "Thrown if the supplied address is a zero address where it is not allowed"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
"kind": "user",
|
|
283
|
+
"methods": {
|
|
284
|
+
"ACM()": {
|
|
285
|
+
"notice": "Access control manager contract"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"notice": "This contract is a helper to aggregate multiple grant and revoke permissions in batches and execute them in one go.",
|
|
289
|
+
"version": 1
|
|
290
|
+
},
|
|
291
|
+
"storageLayout": {
|
|
292
|
+
"storage": [
|
|
293
|
+
{
|
|
294
|
+
"astId": 181,
|
|
295
|
+
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
296
|
+
"label": "grantPermissions",
|
|
297
|
+
"offset": 0,
|
|
298
|
+
"slot": "0",
|
|
299
|
+
"type": "t_array(t_array(t_struct(Permission)172_storage)dyn_storage)dyn_storage"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"astId": 186,
|
|
303
|
+
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
304
|
+
"label": "revokePermissions",
|
|
305
|
+
"offset": 0,
|
|
306
|
+
"slot": "1",
|
|
307
|
+
"type": "t_array(t_array(t_struct(Permission)172_storage)dyn_storage)dyn_storage"
|
|
308
|
+
}
|
|
309
|
+
],
|
|
310
|
+
"types": {
|
|
311
|
+
"t_address": {
|
|
312
|
+
"encoding": "inplace",
|
|
313
|
+
"label": "address",
|
|
314
|
+
"numberOfBytes": "20"
|
|
315
|
+
},
|
|
316
|
+
"t_array(t_array(t_struct(Permission)172_storage)dyn_storage)dyn_storage": {
|
|
317
|
+
"base": "t_array(t_struct(Permission)172_storage)dyn_storage",
|
|
318
|
+
"encoding": "dynamic_array",
|
|
319
|
+
"label": "struct ACMCommandsAggregator.Permission[][]",
|
|
320
|
+
"numberOfBytes": "32"
|
|
321
|
+
},
|
|
322
|
+
"t_array(t_struct(Permission)172_storage)dyn_storage": {
|
|
323
|
+
"base": "t_struct(Permission)172_storage",
|
|
324
|
+
"encoding": "dynamic_array",
|
|
325
|
+
"label": "struct ACMCommandsAggregator.Permission[]",
|
|
326
|
+
"numberOfBytes": "32"
|
|
327
|
+
},
|
|
328
|
+
"t_string_storage": {
|
|
329
|
+
"encoding": "bytes",
|
|
330
|
+
"label": "string",
|
|
331
|
+
"numberOfBytes": "32"
|
|
332
|
+
},
|
|
333
|
+
"t_struct(Permission)172_storage": {
|
|
334
|
+
"encoding": "inplace",
|
|
335
|
+
"label": "struct ACMCommandsAggregator.Permission",
|
|
336
|
+
"members": [
|
|
337
|
+
{
|
|
338
|
+
"astId": 167,
|
|
339
|
+
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
340
|
+
"label": "contractAddress",
|
|
341
|
+
"offset": 0,
|
|
342
|
+
"slot": "0",
|
|
343
|
+
"type": "t_address"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"astId": 169,
|
|
347
|
+
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
348
|
+
"label": "functionSig",
|
|
349
|
+
"offset": 0,
|
|
350
|
+
"slot": "1",
|
|
351
|
+
"type": "t_string_storage"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"astId": 171,
|
|
355
|
+
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
356
|
+
"label": "account",
|
|
357
|
+
"offset": 0,
|
|
358
|
+
"slot": "2",
|
|
359
|
+
"type": "t_address"
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"numberOfBytes": "96"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|