@venusprotocol/governance-contracts 1.4.0-dev.9 → 1.5.0-dev.1

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.
Files changed (46) hide show
  1. package/artifacts/build-info/0316dd7fd2aa91e193fff5353b0091da.json +1 -0
  2. package/artifacts/contracts/Governance/GovernorBravoDelegate.sol/GovernorBravoDelegate.dbg.json +1 -1
  3. package/artifacts/contracts/Governance/GovernorBravoDelegator.sol/GovernorBravoDelegator.dbg.json +1 -1
  4. package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorAlphaInterface.dbg.json +1 -1
  5. package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1.dbg.json +1 -1
  6. package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV2.dbg.json +1 -1
  7. package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage.dbg.json +1 -1
  8. package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/GovernorBravoEvents.dbg.json +1 -1
  9. package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/TimelockInterface.dbg.json +1 -1
  10. package/artifacts/contracts/Governance/GovernorBravoInterfaces.sol/XvsVaultInterface.dbg.json +1 -1
  11. package/artifacts/contracts/legacy/GovernorBravoDelegateV1.sol/GovernorBravoDelegateV1.dbg.json +1 -1
  12. package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegateStorageV1.dbg.json +1 -1
  13. package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoDelegatorStorage.dbg.json +1 -1
  14. package/artifacts/contracts/legacy/GovernorBravoInterfaces.sol/GovernorBravoEventsV1.dbg.json +1 -1
  15. package/deploy/001-timelock.ts +11 -0
  16. package/deployments/arbitrumone.json +5 -0
  17. package/deployments/arbitrumone_addresses.json +5 -0
  18. package/deployments/arbitrumsepolia/.chainId +1 -0
  19. package/deployments/arbitrumsepolia/AccessControlManager.json +564 -0
  20. package/deployments/arbitrumsepolia/solcInputs/54b252f80a6247d4c81ea6be337dbb06.json +87 -0
  21. package/deployments/arbitrumsepolia.json +369 -0
  22. package/deployments/arbitrumsepolia_addresses.json +7 -0
  23. package/deployments/opbnbmainnet/.chainId +1 -0
  24. package/deployments/opbnbmainnet/AccessControlManager.json +564 -0
  25. package/deployments/opbnbmainnet/solcInputs/f3b32d95e78d88a56120d2db9f8dd708.json +78 -0
  26. package/deployments/opbnbmainnet.json +369 -0
  27. package/deployments/opbnbmainnet_addresses.json +7 -0
  28. package/deployments/opbnbtestnet_addresses.json +7 -0
  29. package/dist/deploy/001-timelock.d.ts.map +1 -1
  30. package/dist/deploy/001-timelock.js +11 -0
  31. package/dist/deploy/001-timelock.js.map +1 -1
  32. package/dist/hardhat.config.d.ts.map +1 -1
  33. package/dist/hardhat.config.js +43 -7
  34. package/dist/hardhat.config.js.map +1 -1
  35. package/dist/helpers/deploy/constants.d.ts +4 -1
  36. package/dist/helpers/deploy/constants.d.ts.map +1 -1
  37. package/dist/helpers/deploy/constants.js +3 -0
  38. package/dist/helpers/deploy/constants.js.map +1 -1
  39. package/dist/helpers/deploy/deploymentUtils.d.ts.map +1 -1
  40. package/dist/helpers/deploy/deploymentUtils.js +9 -0
  41. package/dist/helpers/deploy/deploymentUtils.js.map +1 -1
  42. package/package.json +1 -1
  43. package/artifacts/build-info/da11d367dd07d3f79bea1d8c5833588f.json +0 -1
  44. package/artifacts/contracts/legacy/GovenorBravoV1.sol/GovernorBravoDelegatorV1.dbg.json +0 -4
  45. package/artifacts/contracts/legacy/GovenorBravoV1.sol/GovernorBravoDelegatorV1.json +0 -418
  46. package/contracts/legacy/GovenorBravoV1.sol +0 -97
@@ -1,4 +0,0 @@
1
- {
2
- "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/da11d367dd07d3f79bea1d8c5833588f.json"
4
- }
@@ -1,418 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "GovernorBravoDelegatorV1",
4
- "sourceName": "contracts/legacy/GovenorBravoV1.sol",
5
- "abi": [
6
- {
7
- "inputs": [
8
- {
9
- "internalType": "address",
10
- "name": "timelock_",
11
- "type": "address"
12
- },
13
- {
14
- "internalType": "address",
15
- "name": "xvsVault_",
16
- "type": "address"
17
- },
18
- {
19
- "internalType": "address",
20
- "name": "admin_",
21
- "type": "address"
22
- },
23
- {
24
- "internalType": "address",
25
- "name": "implementation_",
26
- "type": "address"
27
- },
28
- {
29
- "internalType": "uint256",
30
- "name": "votingPeriod_",
31
- "type": "uint256"
32
- },
33
- {
34
- "internalType": "uint256",
35
- "name": "votingDelay_",
36
- "type": "uint256"
37
- },
38
- {
39
- "internalType": "uint256",
40
- "name": "proposalThreshold_",
41
- "type": "uint256"
42
- },
43
- {
44
- "internalType": "address",
45
- "name": "guardian_",
46
- "type": "address"
47
- }
48
- ],
49
- "payable": false,
50
- "stateMutability": "nonpayable",
51
- "type": "constructor"
52
- },
53
- {
54
- "anonymous": false,
55
- "inputs": [
56
- {
57
- "indexed": false,
58
- "internalType": "address",
59
- "name": "oldAdmin",
60
- "type": "address"
61
- },
62
- {
63
- "indexed": false,
64
- "internalType": "address",
65
- "name": "newAdmin",
66
- "type": "address"
67
- }
68
- ],
69
- "name": "NewAdmin",
70
- "type": "event"
71
- },
72
- {
73
- "anonymous": false,
74
- "inputs": [
75
- {
76
- "indexed": false,
77
- "internalType": "address",
78
- "name": "oldGuardian",
79
- "type": "address"
80
- },
81
- {
82
- "indexed": false,
83
- "internalType": "address",
84
- "name": "newGuardian",
85
- "type": "address"
86
- }
87
- ],
88
- "name": "NewGuardian",
89
- "type": "event"
90
- },
91
- {
92
- "anonymous": false,
93
- "inputs": [
94
- {
95
- "indexed": false,
96
- "internalType": "address",
97
- "name": "oldImplementation",
98
- "type": "address"
99
- },
100
- {
101
- "indexed": false,
102
- "internalType": "address",
103
- "name": "newImplementation",
104
- "type": "address"
105
- }
106
- ],
107
- "name": "NewImplementation",
108
- "type": "event"
109
- },
110
- {
111
- "anonymous": false,
112
- "inputs": [
113
- {
114
- "indexed": false,
115
- "internalType": "address",
116
- "name": "oldPendingAdmin",
117
- "type": "address"
118
- },
119
- {
120
- "indexed": false,
121
- "internalType": "address",
122
- "name": "newPendingAdmin",
123
- "type": "address"
124
- }
125
- ],
126
- "name": "NewPendingAdmin",
127
- "type": "event"
128
- },
129
- {
130
- "anonymous": false,
131
- "inputs": [
132
- {
133
- "indexed": false,
134
- "internalType": "uint256",
135
- "name": "id",
136
- "type": "uint256"
137
- }
138
- ],
139
- "name": "ProposalCanceled",
140
- "type": "event"
141
- },
142
- {
143
- "anonymous": false,
144
- "inputs": [
145
- {
146
- "indexed": false,
147
- "internalType": "uint256",
148
- "name": "id",
149
- "type": "uint256"
150
- },
151
- {
152
- "indexed": false,
153
- "internalType": "address",
154
- "name": "proposer",
155
- "type": "address"
156
- },
157
- {
158
- "indexed": false,
159
- "internalType": "address[]",
160
- "name": "targets",
161
- "type": "address[]"
162
- },
163
- {
164
- "indexed": false,
165
- "internalType": "uint256[]",
166
- "name": "values",
167
- "type": "uint256[]"
168
- },
169
- {
170
- "indexed": false,
171
- "internalType": "string[]",
172
- "name": "signatures",
173
- "type": "string[]"
174
- },
175
- {
176
- "indexed": false,
177
- "internalType": "bytes[]",
178
- "name": "calldatas",
179
- "type": "bytes[]"
180
- },
181
- {
182
- "indexed": false,
183
- "internalType": "uint256",
184
- "name": "startBlock",
185
- "type": "uint256"
186
- },
187
- {
188
- "indexed": false,
189
- "internalType": "uint256",
190
- "name": "endBlock",
191
- "type": "uint256"
192
- },
193
- {
194
- "indexed": false,
195
- "internalType": "string",
196
- "name": "description",
197
- "type": "string"
198
- }
199
- ],
200
- "name": "ProposalCreated",
201
- "type": "event"
202
- },
203
- {
204
- "anonymous": false,
205
- "inputs": [
206
- {
207
- "indexed": false,
208
- "internalType": "uint256",
209
- "name": "id",
210
- "type": "uint256"
211
- }
212
- ],
213
- "name": "ProposalExecuted",
214
- "type": "event"
215
- },
216
- {
217
- "anonymous": false,
218
- "inputs": [
219
- {
220
- "indexed": false,
221
- "internalType": "uint256",
222
- "name": "oldMaxOperations",
223
- "type": "uint256"
224
- },
225
- {
226
- "indexed": false,
227
- "internalType": "uint256",
228
- "name": "newMaxOperations",
229
- "type": "uint256"
230
- }
231
- ],
232
- "name": "ProposalMaxOperationsUpdated",
233
- "type": "event"
234
- },
235
- {
236
- "anonymous": false,
237
- "inputs": [
238
- {
239
- "indexed": false,
240
- "internalType": "uint256",
241
- "name": "id",
242
- "type": "uint256"
243
- },
244
- {
245
- "indexed": false,
246
- "internalType": "uint256",
247
- "name": "eta",
248
- "type": "uint256"
249
- }
250
- ],
251
- "name": "ProposalQueued",
252
- "type": "event"
253
- },
254
- {
255
- "anonymous": false,
256
- "inputs": [
257
- {
258
- "indexed": false,
259
- "internalType": "uint256",
260
- "name": "oldProposalThreshold",
261
- "type": "uint256"
262
- },
263
- {
264
- "indexed": false,
265
- "internalType": "uint256",
266
- "name": "newProposalThreshold",
267
- "type": "uint256"
268
- }
269
- ],
270
- "name": "ProposalThresholdSet",
271
- "type": "event"
272
- },
273
- {
274
- "anonymous": false,
275
- "inputs": [
276
- {
277
- "indexed": true,
278
- "internalType": "address",
279
- "name": "voter",
280
- "type": "address"
281
- },
282
- {
283
- "indexed": false,
284
- "internalType": "uint256",
285
- "name": "proposalId",
286
- "type": "uint256"
287
- },
288
- {
289
- "indexed": false,
290
- "internalType": "uint8",
291
- "name": "support",
292
- "type": "uint8"
293
- },
294
- {
295
- "indexed": false,
296
- "internalType": "uint256",
297
- "name": "votes",
298
- "type": "uint256"
299
- },
300
- {
301
- "indexed": false,
302
- "internalType": "string",
303
- "name": "reason",
304
- "type": "string"
305
- }
306
- ],
307
- "name": "VoteCast",
308
- "type": "event"
309
- },
310
- {
311
- "anonymous": false,
312
- "inputs": [
313
- {
314
- "indexed": false,
315
- "internalType": "uint256",
316
- "name": "oldVotingDelay",
317
- "type": "uint256"
318
- },
319
- {
320
- "indexed": false,
321
- "internalType": "uint256",
322
- "name": "newVotingDelay",
323
- "type": "uint256"
324
- }
325
- ],
326
- "name": "VotingDelaySet",
327
- "type": "event"
328
- },
329
- {
330
- "anonymous": false,
331
- "inputs": [
332
- {
333
- "indexed": false,
334
- "internalType": "uint256",
335
- "name": "oldVotingPeriod",
336
- "type": "uint256"
337
- },
338
- {
339
- "indexed": false,
340
- "internalType": "uint256",
341
- "name": "newVotingPeriod",
342
- "type": "uint256"
343
- }
344
- ],
345
- "name": "VotingPeriodSet",
346
- "type": "event"
347
- },
348
- {
349
- "payable": true,
350
- "stateMutability": "payable",
351
- "type": "fallback"
352
- },
353
- {
354
- "constant": false,
355
- "inputs": [
356
- {
357
- "internalType": "address",
358
- "name": "implementation_",
359
- "type": "address"
360
- }
361
- ],
362
- "name": "_setImplementation",
363
- "outputs": [],
364
- "payable": false,
365
- "stateMutability": "nonpayable",
366
- "type": "function"
367
- },
368
- {
369
- "constant": true,
370
- "inputs": [],
371
- "name": "admin",
372
- "outputs": [
373
- {
374
- "internalType": "address",
375
- "name": "",
376
- "type": "address"
377
- }
378
- ],
379
- "payable": false,
380
- "stateMutability": "view",
381
- "type": "function"
382
- },
383
- {
384
- "constant": true,
385
- "inputs": [],
386
- "name": "implementation",
387
- "outputs": [
388
- {
389
- "internalType": "address",
390
- "name": "",
391
- "type": "address"
392
- }
393
- ],
394
- "payable": false,
395
- "stateMutability": "view",
396
- "type": "function"
397
- },
398
- {
399
- "constant": true,
400
- "inputs": [],
401
- "name": "pendingAdmin",
402
- "outputs": [
403
- {
404
- "internalType": "address",
405
- "name": "",
406
- "type": "address"
407
- }
408
- ],
409
- "payable": false,
410
- "stateMutability": "view",
411
- "type": "function"
412
- }
413
- ],
414
- "bytecode": "0x60806040523480156200001157600080fd5b50604051620009963803806200099683398101604081905262000034916200023f565b600080546001600160a01b031916331790556040516200009e9086906200006a908b908b90899089908990899060240162000438565b60408051601f198184030181529190526020810180516001600160e01b0390811663b1a5d12d60e01b17909152620000e116565b620000b2856001600160e01b036200015d16565b5050600080546001600160a01b0319166001600160a01b039590951694909417909355506200053d9350505050565b60006060836001600160a01b031683604051620000ff919062000404565b600060405180830381855af49150503d80600081146200013c576040519150601f19603f3d011682016040523d82523d6000602084013e62000141565b606091505b5091509150600082141562000157573d60208201fd5b50505050565b6000546001600160a01b03163314620001935760405162461bcd60e51b81526004016200018a90620004b0565b60405180910390fd5b6001600160a01b038116620001bc5760405162461bcd60e51b81526004016200018a906200049e565b600280546001600160a01b038381166001600160a01b031983161792839055604051918116927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9262000213928592169062000419565b60405180910390a15050565b80516200022c8162000518565b92915050565b80516200022c8162000532565b600080600080600080600080610100898b0312156200025d57600080fd5b60006200026b8b8b6200021f565b98505060206200027e8b828c016200021f565b9750506040620002918b828c016200021f565b9650506060620002a48b828c016200021f565b9550506080620002b78b828c0162000232565b94505060a0620002ca8b828c0162000232565b93505060c0620002dd8b828c0162000232565b92505060e0620002f08b828c016200021f565b9150509295985092959890939650565b6200030b81620004d4565b82525050565b60006200031e82620004c2565b6200032a8185620004c6565b93506200033c818560208601620004e9565b9290920192915050565b600062000355604a83620004cb565b6000805160206200097683398151915281527f656d656e746174696f6e3a20696e76616c696420696d706c656d656e746174696020820152696f6e206164647265737360b01b604082015260600192915050565b6000620003b8603683620004cb565b6000805160206200097683398151915281527f656d656e746174696f6e3a2061646d696e206f6e6c7900000000000000000000602082015260400192915050565b6200030b81620004e6565b600062000412828462000311565b9392505050565b6040810162000429828562000300565b62000412602083018462000300565b60c0810162000448828962000300565b62000457602083018862000300565b620004666040830187620003f9565b620004756060830186620003f9565b620004846080830185620003f9565b6200049360a083018462000300565b979650505050505050565b602080825281016200022c8162000346565b602080825281016200022c81620003a9565b5190565b919050565b90815260200190565b60006001600160a01b0382166200022c565b90565b60005b8381101562000506578181015183820152602001620004ec565b83811115620001575750506000910152565b6200052381620004d4565b81146200052f57600080fd5b50565b6200052381620004e6565b610429806200054d6000396000f3fe60806040526004361061003f5760003560e01c806326782247146100ba5780635c60da1b146100e5578063bb913f41146100fa578063f851a4401461011c575b6002546040516000916001600160a01b03169061005f9083903690610347565b600060405180830381855af49150503d806000811461009a576040519150601f19603f3d011682016040523d82523d6000602084013e61009f565b606091505b505090506040513d6000823e8180156100b6573d82f35b3d82fd5b3480156100c657600080fd5b506100cf610131565b6040516100dc9190610354565b60405180910390f35b3480156100f157600080fd5b506100cf610140565b34801561010657600080fd5b5061011a610115366004610229565b61014f565b005b34801561012857600080fd5b506100cf610209565b6001546001600160a01b031681565b6002546001600160a01b031681565b6000546001600160a01b031633146101825760405162461bcd60e51b815260040161017990610394565b60405180910390fd5b6001600160a01b0381166101a85760405162461bcd60e51b815260040161017990610384565b600280546001600160a01b038381166001600160a01b031983161792839055604051918116927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a926101fd9285921690610362565b60405180910390a15050565b6000546001600160a01b031681565b8035610223816103cf565b92915050565b60006020828403121561023b57600080fd5b60006102478484610218565b949350505050565b610258816103b2565b82525050565b600061026a83856103a4565b93506102778385846103c3565b50500190565b600061028a604a836103a9565b7f476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c81527f656d656e746174696f6e3a20696e76616c696420696d706c656d656e746174696020820152696f6e206164647265737360b01b604082015260600192915050565b60006102fc6036836103a9565b7f476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c815275656d656e746174696f6e3a2061646d696e206f6e6c7960501b602082015260400192915050565b600061024782848661025e565b60208101610223828461024f565b60408101610370828561024f565b61037d602083018461024f565b9392505050565b602080825281016102238161027d565b60208082528101610223816102ef565b919050565b90815260200190565b60006001600160a01b038216610223565b82818337506000910152565b6103d8816103b2565b81146103e357600080fd5b5056fea365627a7a723158208d6d6937201eff41b41f52ce307f145158c4525df8bea7961c7bca228277e19e6c6578706572696d656e74616cf564736f6c63430005100040476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c",
415
- "deployedBytecode": "0x60806040526004361061003f5760003560e01c806326782247146100ba5780635c60da1b146100e5578063bb913f41146100fa578063f851a4401461011c575b6002546040516000916001600160a01b03169061005f9083903690610347565b600060405180830381855af49150503d806000811461009a576040519150601f19603f3d011682016040523d82523d6000602084013e61009f565b606091505b505090506040513d6000823e8180156100b6573d82f35b3d82fd5b3480156100c657600080fd5b506100cf610131565b6040516100dc9190610354565b60405180910390f35b3480156100f157600080fd5b506100cf610140565b34801561010657600080fd5b5061011a610115366004610229565b61014f565b005b34801561012857600080fd5b506100cf610209565b6001546001600160a01b031681565b6002546001600160a01b031681565b6000546001600160a01b031633146101825760405162461bcd60e51b815260040161017990610394565b60405180910390fd5b6001600160a01b0381166101a85760405162461bcd60e51b815260040161017990610384565b600280546001600160a01b038381166001600160a01b031983161792839055604051918116927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a926101fd9285921690610362565b60405180910390a15050565b6000546001600160a01b031681565b8035610223816103cf565b92915050565b60006020828403121561023b57600080fd5b60006102478484610218565b949350505050565b610258816103b2565b82525050565b600061026a83856103a4565b93506102778385846103c3565b50500190565b600061028a604a836103a9565b7f476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c81527f656d656e746174696f6e3a20696e76616c696420696d706c656d656e746174696020820152696f6e206164647265737360b01b604082015260600192915050565b60006102fc6036836103a9565b7f476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c815275656d656e746174696f6e3a2061646d696e206f6e6c7960501b602082015260400192915050565b600061024782848661025e565b60208101610223828461024f565b60408101610370828561024f565b61037d602083018461024f565b9392505050565b602080825281016102238161027d565b60208082528101610223816102ef565b919050565b90815260200190565b60006001600160a01b038216610223565b82818337506000910152565b6103d8816103b2565b81146103e357600080fd5b5056fea365627a7a723158208d6d6937201eff41b41f52ce307f145158c4525df8bea7961c7bca228277e19e6c6578706572696d656e74616cf564736f6c63430005100040",
416
- "linkReferences": {},
417
- "deployedLinkReferences": {}
418
- }
@@ -1,97 +0,0 @@
1
- pragma solidity ^0.5.16;
2
- pragma experimental ABIEncoderV2;
3
-
4
- import "./GovernorBravoInterfaces.sol";
5
-
6
- /**
7
- * @title GovernorBravoDelegator
8
- * @author Venus
9
- * @notice The `GovernorBravoDelegator` contract.
10
- */
11
- contract GovernorBravoDelegatorV1 is GovernorBravoDelegatorStorage, GovernorBravoEventsV1 {
12
- constructor(
13
- address timelock_,
14
- address xvsVault_,
15
- address admin_,
16
- address implementation_,
17
- uint votingPeriod_,
18
- uint votingDelay_,
19
- uint proposalThreshold_,
20
- address guardian_
21
- ) public {
22
- // Admin set to msg.sender for initialization
23
- admin = msg.sender;
24
-
25
- delegateTo(
26
- implementation_,
27
- abi.encodeWithSignature(
28
- "initialize(address,address,uint256,uint256,uint256,address)",
29
- timelock_,
30
- xvsVault_,
31
- votingPeriod_,
32
- votingDelay_,
33
- proposalThreshold_,
34
- guardian_
35
- )
36
- );
37
-
38
- _setImplementation(implementation_);
39
-
40
- admin = admin_;
41
- }
42
-
43
- /**
44
- * @notice Called by the admin to update the implementation of the delegator
45
- * @param implementation_ The address of the new implementation for delegation
46
- */
47
- function _setImplementation(address implementation_) public {
48
- require(msg.sender == admin, "GovernorBravoDelegator::_setImplementation: admin only");
49
- require(
50
- implementation_ != address(0),
51
- "GovernorBravoDelegator::_setImplementation: invalid implementation address"
52
- );
53
-
54
- address oldImplementation = implementation;
55
- implementation = implementation_;
56
-
57
- emit NewImplementation(oldImplementation, implementation);
58
- }
59
-
60
- /**
61
- * @notice Internal method to delegate execution to another contract
62
- * @dev It returns to the external caller whatever the implementation returns or forwards reverts
63
- * @param callee The contract to delegatecall
64
- * @param data The raw data to delegatecall
65
- */
66
- function delegateTo(address callee, bytes memory data) internal {
67
- (bool success, bytes memory returnData) = callee.delegatecall(data);
68
- assembly {
69
- if eq(success, 0) {
70
- revert(add(returnData, 0x20), returndatasize)
71
- }
72
- }
73
- }
74
-
75
- /**
76
- * @dev Delegates execution to an implementation contract.
77
- * It returns to the external caller whatever the implementation returns
78
- * or forwards reverts.
79
- */
80
- function() external payable {
81
- // delegate all other functions to current implementation
82
- (bool success, ) = implementation.delegatecall(msg.data);
83
-
84
- assembly {
85
- let free_mem_ptr := mload(0x40)
86
- returndatacopy(free_mem_ptr, 0, returndatasize)
87
-
88
- switch success
89
- case 0 {
90
- revert(free_mem_ptr, returndatasize)
91
- }
92
- default {
93
- return(free_mem_ptr, returndatasize)
94
- }
95
- }
96
- }
97
- }