@venusprotocol/governance-contracts 1.0.1-dev.2 → 1.0.1-dev.3
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/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +183 -0
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +115 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json +76 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json +24 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +10 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +4 -0
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +24 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Governance/XVS.sol/Owned.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Governance/XVS.sol/Owned.json +66 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Governance/XVS.sol/Tokenlock.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Governance/XVS.sol/Tokenlock.json +90 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Governance/XVS.sol/XVS.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Governance/XVS.sol/XVS.json +618 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/Address.sol/Address.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/Address.sol/Address.json +10 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/ECDSA.sol/ECDSA.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/ECDSA.sol/ECDSA.json +10 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/IBEP20.sol/IBEP20.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/IBEP20.sol/IBEP20.json +206 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/SafeBEP20.sol/SafeBEP20.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/SafeBEP20.sol/SafeBEP20.json +10 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/SafeMath.sol/SafeMath.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/Utils/SafeMath.sol/SafeMath.json +10 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSStore.sol/XVSStore.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSStore.sol/XVSStore.json +244 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVault.sol/IXVSStore.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVault.sol/IXVSStore.json +56 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVault.sol/XVSVault.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVault.sol/XVSVault.json +1211 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultErrorReporter.sol/XVSVaultErrorReporter.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultErrorReporter.sol/XVSVaultErrorReporter.json +36 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultProxy.sol/XVSVaultProxy.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultProxy.sol/XVSVaultProxy.json +255 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultStorage.sol/XVSVaultAdminStorage.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultStorage.sol/XVSVaultAdminStorage.json +71 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultStorage.sol/XVSVaultStorage.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultStorage.sol/XVSVaultStorage.json +313 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultStorage.sol/XVSVaultStorageV1.dbg.json +4 -0
- package/artifacts/@venusprotocol/venus-protocol/contracts/XVSVault/XVSVaultStorage.sol/XVSVaultStorageV1.json +240 -0
- package/artifacts/build-info/0e028ff5062f0f59a7ffef92b702c074.json +1 -0
- package/artifacts/build-info/56323f6708e82b6f7b159248c3c1268a.json +1 -0
- package/artifacts/build-info/60a7730a05f99cbf38891be24e3a5c77.json +1 -0
- package/artifacts/build-info/bb792d434e41d4003eeb48354b3a6c5c.json +1 -0
- package/artifacts/build-info/e5638231ea42ec29d0230b1b013f1a57.json +1 -0
- package/artifacts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +4 -0
- package/artifacts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +369 -0
- package/artifacts/contracts/Governance/AccessControlledV5.sol/AccessControlledV5.dbg.json +4 -0
- package/artifacts/contracts/Governance/AccessControlledV5.sol/AccessControlledV5.json +45 -0
- package/artifacts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +4 -0
- package/artifacts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.json +181 -0
- package/artifacts/contracts/Governance/GovernorBravoDelegate.sol/GovernorBravoDelegate.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoDelegate.sol/GovernorBravoDelegate.json +1173 -0
- package/artifacts/contracts/Governance/GovernorBravoDelegator.sol/GovernorBravoDelegator.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoDelegator.sol/GovernorBravoDelegator.json +424 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorAlphaInterface.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorAlphaInterface.json +26 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1.json +283 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV2.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV2.json +335 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage.json +56 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents.json +312 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/TimelockInterface.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/TimelockInterface.json +188 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/XvsVaultInterface.dbg.json +4 -0
- package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/XvsVaultInterface.json +37 -0
- package/artifacts/contracts/Governance/IAccessControlManagerV5.sol/IAccessControlManagerV5.dbg.json +4 -0
- package/artifacts/contracts/Governance/IAccessControlManagerV5.sol/IAccessControlManagerV5.json +300 -0
- package/artifacts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +4 -0
- package/artifacts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.json +282 -0
- package/artifacts/contracts/Governance/Timelock.sol/Timelock.dbg.json +4 -0
- package/artifacts/contracts/Governance/Timelock.sol/Timelock.json +468 -0
- package/artifacts/contracts/Utils/SafeMath.sol/SafeMath.dbg.json +4 -0
- package/artifacts/contracts/Utils/SafeMath.sol/SafeMath.json +10 -0
- package/artifacts/contracts/test/MockAccessTest.sol/MockAccessTest.dbg.json +4 -0
- package/artifacts/contracts/test/MockAccessTest.sol/MockAccessTest.json +194 -0
- package/contracts/Governance/Timelock.sol +58 -1
- package/package.json +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "MockAccessTest",
|
|
4
|
+
"sourceName": "contracts/test/MockAccessTest.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"internalType": "address",
|
|
10
|
+
"name": "sender",
|
|
11
|
+
"type": "address"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"internalType": "address",
|
|
15
|
+
"name": "calledContract",
|
|
16
|
+
"type": "address"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"internalType": "string",
|
|
20
|
+
"name": "methodSignature",
|
|
21
|
+
"type": "string"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"name": "Unauthorized",
|
|
25
|
+
"type": "error"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"anonymous": false,
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"indexed": false,
|
|
32
|
+
"internalType": "uint8",
|
|
33
|
+
"name": "version",
|
|
34
|
+
"type": "uint8"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"name": "Initialized",
|
|
38
|
+
"type": "event"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"anonymous": false,
|
|
42
|
+
"inputs": [
|
|
43
|
+
{
|
|
44
|
+
"indexed": false,
|
|
45
|
+
"internalType": "address",
|
|
46
|
+
"name": "oldAccessControlManager",
|
|
47
|
+
"type": "address"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"indexed": false,
|
|
51
|
+
"internalType": "address",
|
|
52
|
+
"name": "newAccessControlManager",
|
|
53
|
+
"type": "address"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"name": "NewAccessControlManager",
|
|
57
|
+
"type": "event"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"anonymous": false,
|
|
61
|
+
"inputs": [
|
|
62
|
+
{
|
|
63
|
+
"indexed": true,
|
|
64
|
+
"internalType": "address",
|
|
65
|
+
"name": "previousOwner",
|
|
66
|
+
"type": "address"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"indexed": true,
|
|
70
|
+
"internalType": "address",
|
|
71
|
+
"name": "newOwner",
|
|
72
|
+
"type": "address"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"name": "OwnershipTransferStarted",
|
|
76
|
+
"type": "event"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"anonymous": false,
|
|
80
|
+
"inputs": [
|
|
81
|
+
{
|
|
82
|
+
"indexed": true,
|
|
83
|
+
"internalType": "address",
|
|
84
|
+
"name": "previousOwner",
|
|
85
|
+
"type": "address"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"indexed": true,
|
|
89
|
+
"internalType": "address",
|
|
90
|
+
"name": "newOwner",
|
|
91
|
+
"type": "address"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"name": "OwnershipTransferred",
|
|
95
|
+
"type": "event"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"inputs": [],
|
|
99
|
+
"name": "acceptOwnership",
|
|
100
|
+
"outputs": [],
|
|
101
|
+
"stateMutability": "nonpayable",
|
|
102
|
+
"type": "function"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"inputs": [],
|
|
106
|
+
"name": "accessControlManager",
|
|
107
|
+
"outputs": [
|
|
108
|
+
{
|
|
109
|
+
"internalType": "contract IAccessControlManagerV8",
|
|
110
|
+
"name": "",
|
|
111
|
+
"type": "address"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"stateMutability": "view",
|
|
115
|
+
"type": "function"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"inputs": [
|
|
119
|
+
{
|
|
120
|
+
"internalType": "address",
|
|
121
|
+
"name": "accessControlManager",
|
|
122
|
+
"type": "address"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"name": "initialize",
|
|
126
|
+
"outputs": [],
|
|
127
|
+
"stateMutability": "nonpayable",
|
|
128
|
+
"type": "function"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"inputs": [],
|
|
132
|
+
"name": "owner",
|
|
133
|
+
"outputs": [
|
|
134
|
+
{
|
|
135
|
+
"internalType": "address",
|
|
136
|
+
"name": "",
|
|
137
|
+
"type": "address"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"stateMutability": "view",
|
|
141
|
+
"type": "function"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"inputs": [],
|
|
145
|
+
"name": "pendingOwner",
|
|
146
|
+
"outputs": [
|
|
147
|
+
{
|
|
148
|
+
"internalType": "address",
|
|
149
|
+
"name": "",
|
|
150
|
+
"type": "address"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"stateMutability": "view",
|
|
154
|
+
"type": "function"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"inputs": [],
|
|
158
|
+
"name": "renounceOwnership",
|
|
159
|
+
"outputs": [],
|
|
160
|
+
"stateMutability": "nonpayable",
|
|
161
|
+
"type": "function"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"inputs": [
|
|
165
|
+
{
|
|
166
|
+
"internalType": "address",
|
|
167
|
+
"name": "accessControlManager_",
|
|
168
|
+
"type": "address"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"name": "setAccessControlManager",
|
|
172
|
+
"outputs": [],
|
|
173
|
+
"stateMutability": "nonpayable",
|
|
174
|
+
"type": "function"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"inputs": [
|
|
178
|
+
{
|
|
179
|
+
"internalType": "address",
|
|
180
|
+
"name": "newOwner",
|
|
181
|
+
"type": "address"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"name": "transferOwnership",
|
|
185
|
+
"outputs": [],
|
|
186
|
+
"stateMutability": "nonpayable",
|
|
187
|
+
"type": "function"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"bytecode": "0x608060405234801561001057600080fd5b506107d0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063b4a0bdf31161005b578063b4a0bdf3146100f5578063c4d66de814610113578063e30c397814610126578063f2fde38b1461014457600080fd5b80630e32cb861461008d578063715018a6146100a257806379ba5097146100aa5780638da5cb5b146100b2575b600080fd5b6100a061009b36600461075d565b610157565b005b6100a061016b565b6100a061017f565b60335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60975473ffffffffffffffffffffffffffffffffffffffff166100cc565b6100a061012136600461075d565b610236565b60655473ffffffffffffffffffffffffffffffffffffffff166100cc565b6100a061015236600461075d565b6103cb565b61015f61047b565b610168816104fc565b50565b61017361047b565b61017d600061061e565b565b606554339073ffffffffffffffffffffffffffffffffffffffff16811461022d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6101688161061e565b600054610100900460ff16158080156102565750600054600160ff909116105b806102705750303b158015610270575060005460ff166001145b6102fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610224565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561035a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6103638261064f565b80156103c757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050565b6103d361047b565b6065805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561043660335473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60335473ffffffffffffffffffffffffffffffffffffffff16331461017d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610224565b73ffffffffffffffffffffffffffffffffffffffff811661059f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610224565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa091016103be565b606580547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610168816106e6565b600054610100900460ff1661015f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610224565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006020828403121561076f57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461079357600080fd5b939250505056fea2646970667358221220c3115a278068d49108fe8d65a871866cb167594549082c406ef4f2c7b78616f464736f6c634300080d0033",
|
|
191
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063b4a0bdf31161005b578063b4a0bdf3146100f5578063c4d66de814610113578063e30c397814610126578063f2fde38b1461014457600080fd5b80630e32cb861461008d578063715018a6146100a257806379ba5097146100aa5780638da5cb5b146100b2575b600080fd5b6100a061009b36600461075d565b610157565b005b6100a061016b565b6100a061017f565b60335473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60975473ffffffffffffffffffffffffffffffffffffffff166100cc565b6100a061012136600461075d565b610236565b60655473ffffffffffffffffffffffffffffffffffffffff166100cc565b6100a061015236600461075d565b6103cb565b61015f61047b565b610168816104fc565b50565b61017361047b565b61017d600061061e565b565b606554339073ffffffffffffffffffffffffffffffffffffffff16811461022d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6101688161061e565b600054610100900460ff16158080156102565750600054600160ff909116105b806102705750303b158015610270575060005460ff166001145b6102fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610224565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561035a57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6103638261064f565b80156103c757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050565b6103d361047b565b6065805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561043660335473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60335473ffffffffffffffffffffffffffffffffffffffff16331461017d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610224565b73ffffffffffffffffffffffffffffffffffffffff811661059f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f696e76616c696420616365737320636f6e74726f6c206d616e6167657220616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610224565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f66fd58e82f7b31a2a5c30e0888f3093efe4e111b00cd2b0c31fe014601293aa091016103be565b606580547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610168816106e6565b600054610100900460ff1661015f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610224565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006020828403121561076f57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461079357600080fd5b939250505056fea2646970667358221220c3115a278068d49108fe8d65a871866cb167594549082c406ef4f2c7b78616f464736f6c634300080d0033",
|
|
192
|
+
"linkReferences": {},
|
|
193
|
+
"deployedLinkReferences": {}
|
|
194
|
+
}
|
|
@@ -9,10 +9,16 @@ import "../Utils/SafeMath.sol";
|
|
|
9
9
|
*/
|
|
10
10
|
contract Timelock {
|
|
11
11
|
using SafeMath for uint;
|
|
12
|
-
|
|
12
|
+
/// @notice Event emitted when a new admin is accepted
|
|
13
13
|
event NewAdmin(address indexed newAdmin);
|
|
14
|
+
|
|
15
|
+
/// @notice Event emitted when a new admin is proposed
|
|
14
16
|
event NewPendingAdmin(address indexed newPendingAdmin);
|
|
17
|
+
|
|
18
|
+
/// @notice Event emitted when a new admin is proposed
|
|
15
19
|
event NewDelay(uint indexed newDelay);
|
|
20
|
+
|
|
21
|
+
/// @notice Event emitted when a proposal transaction has been cancelled
|
|
16
22
|
event CancelTransaction(
|
|
17
23
|
bytes32 indexed txHash,
|
|
18
24
|
address indexed target,
|
|
@@ -21,6 +27,8 @@ contract Timelock {
|
|
|
21
27
|
bytes data,
|
|
22
28
|
uint eta
|
|
23
29
|
);
|
|
30
|
+
|
|
31
|
+
/// @notice Event emitted when a proposal transaction has been executed
|
|
24
32
|
event ExecuteTransaction(
|
|
25
33
|
bytes32 indexed txHash,
|
|
26
34
|
address indexed target,
|
|
@@ -29,6 +37,8 @@ contract Timelock {
|
|
|
29
37
|
bytes data,
|
|
30
38
|
uint eta
|
|
31
39
|
);
|
|
40
|
+
|
|
41
|
+
/// @notice Event emitted when a proposal transaction has been queued
|
|
32
42
|
event QueueTransaction(
|
|
33
43
|
bytes32 indexed txHash,
|
|
34
44
|
address indexed target,
|
|
@@ -38,14 +48,25 @@ contract Timelock {
|
|
|
38
48
|
uint eta
|
|
39
49
|
);
|
|
40
50
|
|
|
51
|
+
/// @notice Required period to execute a proposal transaction
|
|
41
52
|
uint public constant GRACE_PERIOD = 14 days;
|
|
53
|
+
|
|
54
|
+
/// @notice Minimum amount of time a proposal transaction must be queued
|
|
42
55
|
uint public constant MINIMUM_DELAY = 1 hours;
|
|
56
|
+
|
|
57
|
+
/// @notice Maximum amount of time a proposal transaction must be queued
|
|
43
58
|
uint public constant MAXIMUM_DELAY = 30 days;
|
|
44
59
|
|
|
60
|
+
/// @notice Timelock admin authorized to queue and execute transactions
|
|
45
61
|
address public admin;
|
|
62
|
+
|
|
63
|
+
/// @notice Account proposed as the next admin
|
|
46
64
|
address public pendingAdmin;
|
|
65
|
+
|
|
66
|
+
/// @notice Period for a proposal transaction to be queued
|
|
47
67
|
uint public delay;
|
|
48
68
|
|
|
69
|
+
/// @notice Mapping of queued transactions
|
|
49
70
|
mapping(bytes32 => bool) public queuedTransactions;
|
|
50
71
|
|
|
51
72
|
constructor(address admin_, uint delay_) public {
|
|
@@ -58,6 +79,10 @@ contract Timelock {
|
|
|
58
79
|
|
|
59
80
|
function() external payable {}
|
|
60
81
|
|
|
82
|
+
/**
|
|
83
|
+
* @notice Setter for the transaction queue delay
|
|
84
|
+
* @param delay_ The new delay period for the transaction queue
|
|
85
|
+
*/
|
|
61
86
|
function setDelay(uint delay_) public {
|
|
62
87
|
require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock.");
|
|
63
88
|
require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay.");
|
|
@@ -67,6 +92,9 @@ contract Timelock {
|
|
|
67
92
|
emit NewDelay(delay);
|
|
68
93
|
}
|
|
69
94
|
|
|
95
|
+
/**
|
|
96
|
+
* @notice Method for accepting a proposed admin
|
|
97
|
+
*/
|
|
70
98
|
function acceptAdmin() public {
|
|
71
99
|
require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin.");
|
|
72
100
|
admin = msg.sender;
|
|
@@ -75,6 +103,10 @@ contract Timelock {
|
|
|
75
103
|
emit NewAdmin(admin);
|
|
76
104
|
}
|
|
77
105
|
|
|
106
|
+
/**
|
|
107
|
+
* @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract
|
|
108
|
+
* @param pendingAdmin_ Address of the proposed admin
|
|
109
|
+
*/
|
|
78
110
|
function setPendingAdmin(address pendingAdmin_) public {
|
|
79
111
|
require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock.");
|
|
80
112
|
pendingAdmin = pendingAdmin_;
|
|
@@ -82,6 +114,15 @@ contract Timelock {
|
|
|
82
114
|
emit NewPendingAdmin(pendingAdmin);
|
|
83
115
|
}
|
|
84
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @notice Called for each action when queuing a proposal
|
|
119
|
+
* @param target Address of the contract with the method to be called
|
|
120
|
+
* @param value Native token amount sent with the transaction
|
|
121
|
+
* @param signature Ssignature of the function to be called
|
|
122
|
+
* @param data Arguments to be passed to the function when called
|
|
123
|
+
* @param eta Timestamp after which the transaction can be executed
|
|
124
|
+
* @return Hash of the queued transaction
|
|
125
|
+
*/
|
|
85
126
|
function queueTransaction(
|
|
86
127
|
address target,
|
|
87
128
|
uint value,
|
|
@@ -102,6 +143,14 @@ contract Timelock {
|
|
|
102
143
|
return txHash;
|
|
103
144
|
}
|
|
104
145
|
|
|
146
|
+
/**
|
|
147
|
+
* @notice Called to cancel a queued transaction
|
|
148
|
+
* @param target Address of the contract with the method to be called
|
|
149
|
+
* @param value Native token amount sent with the transaction
|
|
150
|
+
* @param signature Ssignature of the function to be called
|
|
151
|
+
* @param data Arguments to be passed to the function when called
|
|
152
|
+
* @param eta Timestamp after which the transaction can be executed
|
|
153
|
+
*/
|
|
105
154
|
function cancelTransaction(
|
|
106
155
|
address target,
|
|
107
156
|
uint value,
|
|
@@ -117,6 +166,14 @@ contract Timelock {
|
|
|
117
166
|
emit CancelTransaction(txHash, target, value, signature, data, eta);
|
|
118
167
|
}
|
|
119
168
|
|
|
169
|
+
/**
|
|
170
|
+
* @notice Called to execute a queued transaction
|
|
171
|
+
* @param target Address of the contract with the method to be called
|
|
172
|
+
* @param value Native token amount sent with the transaction
|
|
173
|
+
* @param signature Ssignature of the function to be called
|
|
174
|
+
* @param data Arguments to be passed to the function when called
|
|
175
|
+
* @param eta Timestamp after which the transaction can be executed
|
|
176
|
+
*/
|
|
120
177
|
function executeTransaction(
|
|
121
178
|
address target,
|
|
122
179
|
uint value,
|