@venusprotocol/governance-contracts 2.12.0 → 2.13.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.
- package/deploy/005-remote-timelock.ts +2 -2
- package/deployments/berachainbepolia/.chainId +1 -0
- package/deployments/{berachainbartio → berachainbepolia}/ACMCommandsAggregator.json +22 -22
- package/deployments/{berachainbartio → berachainbepolia}/AccessControlManager.json +16 -16
- package/deployments/{berachainbartio → berachainbepolia}/CriticalTimelock.json +8 -8
- package/deployments/{berachainbartio → berachainbepolia}/DefaultProxyAdmin.json +17 -17
- package/deployments/{berachainbartio → berachainbepolia}/FastTrackTimelock.json +9 -9
- package/deployments/{berachainbartio → berachainbepolia}/NormalTimelock.json +13 -13
- package/deployments/{berachainbartio → berachainbepolia}/OmnichainExecutorOwner.json +48 -48
- package/deployments/{berachainbartio → berachainbepolia}/OmnichainExecutorOwner_Implementation.json +17 -17
- package/deployments/{berachainbartio → berachainbepolia}/OmnichainExecutorOwner_Proxy.json +46 -46
- package/deployments/{berachainbartio → berachainbepolia}/OmnichainGovernanceExecutor.json +16 -16
- package/deployments/{berachainbartio/solcInputs/9f400d4fd6f6fcf916824838bc678e25.json → berachainbepolia/solcInputs/0fe2e57d7b731fab98e94353ed44ddd5.json} +6 -0
- package/deployments/berachainbepolia/solcInputs/34ad2ac9bd0914b716cd67ba66054da9.json +235 -0
- package/deployments/{berachainbartio.json → berachainbepolia.json} +12 -12
- package/deployments/berachainbepolia_addresses.json +16 -0
- package/dist/deploy/005-remote-timelock.d.ts +1 -1
- package/dist/deploy/005-remote-timelock.d.ts.map +1 -1
- package/dist/deploy/005-remote-timelock.js +2 -2
- package/dist/deploy/005-remote-timelock.js.map +1 -1
- package/dist/hardhat.config.js +8 -8
- package/dist/hardhat.config.js.map +1 -1
- package/dist/helpers/deploy/constants.d.ts +1 -1
- package/dist/helpers/deploy/constants.d.ts.map +1 -1
- package/dist/helpers/deploy/constants.js +2 -2
- package/dist/helpers/deploy/constants.js.map +1 -1
- package/dist/helpers/deploy/deploymentConfig.js +1 -1
- package/dist/helpers/deploy/deploymentConfig.js.map +1 -1
- package/dist/helpers/deploy/deploymentUtils.js +3 -3
- package/dist/helpers/deploy/deploymentUtils.js.map +1 -1
- package/dist/scripts/ACMPermissions/config.js +1 -1
- package/dist/scripts/ACMPermissions/config.js.map +1 -1
- package/package.json +1 -1
- package/deployments/berachainbartio/.chainId +0 -1
- package/deployments/berachainbartio/solcInputs/39b818455672acbd6d12469b0e689d7a.json +0 -40
- package/deployments/berachainbartio/solcInputs/c8adce9942919fd992f7532e82a0e082.json +0 -43
- package/deployments/berachainbartio/solcInputs/e5536fb1b5f4db72d1c808989021a017.json +0 -73
- package/deployments/berachainbartio_addresses.json +0 -16
- /package/deployments/{berachainbartio → berachainbepolia}/solcInputs/dd255b4e0156dfc73554b72a83ca02d8.json +0 -0
|
@@ -17,7 +17,7 @@ export enum REMOTE_NETWORKS {
|
|
|
17
17
|
BASEMAINNET = "basemainnet",
|
|
18
18
|
UNICHAINSEPOLIA = "unichainsepolia",
|
|
19
19
|
UNICHAINMAINNET = "unichainmainnet",
|
|
20
|
-
|
|
20
|
+
BERACHAINBEPOLIA = "berachainbepolia",
|
|
21
21
|
HARDHAT = "hardhat",
|
|
22
22
|
}
|
|
23
23
|
type DelayTypes = {
|
|
@@ -105,7 +105,7 @@ export const delayConfig: DelayConfig = {
|
|
|
105
105
|
fast: 21600,
|
|
106
106
|
critical: 3600,
|
|
107
107
|
},
|
|
108
|
-
|
|
108
|
+
berachainbepolia: {
|
|
109
109
|
normal: 600,
|
|
110
110
|
fast: 300,
|
|
111
111
|
critical: 100,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
80069
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "0x1EAA596ad8101bb321a5999e509A61747893078B",
|
|
3
3
|
"abi": [
|
|
4
4
|
{
|
|
5
5
|
"inputs": [
|
|
@@ -242,25 +242,25 @@
|
|
|
242
242
|
"type": "function"
|
|
243
243
|
}
|
|
244
244
|
],
|
|
245
|
-
"transactionHash": "
|
|
245
|
+
"transactionHash": "0xbab977806b91d7889b81120dfe38fc539b24149a4bb10b3b82a7c15941be9dbf",
|
|
246
246
|
"receipt": {
|
|
247
247
|
"to": null,
|
|
248
248
|
"from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d",
|
|
249
|
-
"contractAddress": "
|
|
250
|
-
"transactionIndex":
|
|
249
|
+
"contractAddress": "0x1EAA596ad8101bb321a5999e509A61747893078B",
|
|
250
|
+
"transactionIndex": 1,
|
|
251
251
|
"gasUsed": "937641",
|
|
252
252
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
253
|
-
"blockHash": "
|
|
254
|
-
"transactionHash": "
|
|
253
|
+
"blockHash": "0x5dc26957b0f39f30eac382d5a96c6d1bdcea0c44700d4c6093db30dc5842eb81",
|
|
254
|
+
"transactionHash": "0xbab977806b91d7889b81120dfe38fc539b24149a4bb10b3b82a7c15941be9dbf",
|
|
255
255
|
"logs": [],
|
|
256
|
-
"blockNumber":
|
|
257
|
-
"cumulativeGasUsed": "
|
|
256
|
+
"blockNumber": 2924146,
|
|
257
|
+
"cumulativeGasUsed": "1725710",
|
|
258
258
|
"status": 1,
|
|
259
259
|
"byzantium": true
|
|
260
260
|
},
|
|
261
|
-
"args": ["
|
|
261
|
+
"args": ["0x243313C1cC198FF80756ed2ef14D9dcd94Ee762b"],
|
|
262
262
|
"numDeployments": 1,
|
|
263
|
-
"solcInputHash": "
|
|
263
|
+
"solcInputHash": "34ad2ac9bd0914b716cd67ba66054da9",
|
|
264
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
265
|
"bytecode": "0x60a0604052348015600f57600080fd5b506040516110c73803806110c7833981016040819052602c91606c565b6033816043565b6001600160a01b0316608052609a565b6001600160a01b0381166069576040516342bcdf7f60e11b815260040160405180910390fd5b50565b600060208284031215607d57600080fd5b81516001600160a01b0381168114609357600080fd5b9392505050565b6080516110046100c360003960008181610100015281816102de0152610a0101526110046000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80639d6c76b81161005b5780639d6c76b8146100d5578063de46a235146100e8578063f9b80da1146100fb578063ff1575e11461014757600080fd5b806322473d8c14610082578063514aab87146100975780635666a5ea146100c2575b600080fd5b610095610090366004610ab8565b61015a565b005b6100aa6100a5366004610ad1565b61038d565b6040516100b993929190610af3565b60405180910390f35b6100956100d0366004610c59565b610492565b6100956100e3366004610c59565b610689565b6100956100f6366004610ab8565b61087f565b6101227f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b9565b6100aa610155366004610ad1565b610aa8565b60006001828154811061016f5761016f610de1565b600091825260208220015491505b818110156103545760006001848154811061019a5761019a610de1565b9060005260206000200182815481106101b5576101b5610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161020290610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461022e90610e10565b801561027b5780601f106102505761010080835404028352916020019161027b565b820191906000526020600020905b81548152906001019060200180831161025e57829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f545f7a320000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363545f7a329361031693909291600401610af3565b600060405180830381600087803b15801561033057600080fd5b505af1158015610344573d6000803e3d6000fd5b505050505080600101905061017d565b506040518281527f1382323d6618527d8b03daa05db815f0490966e8b80679fe5ad3d868f84e1a71906020015b60405180910390a15050565b6000828154811061039d57600080fd5b9060005260206000200181815481106103b557600080fd5b60009182526020909120600390910201805460018201805473ffffffffffffffffffffffffffffffffffffffff90921694509192506103f390610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461041f90610e10565b801561046c5780601f106104415761010080835404028352916020019161046c565b820191906000526020600020905b81548152906001019060200180831161044f57829003601f168201915b5050506002909301549192505073ffffffffffffffffffffffffffffffffffffffff1683565b80516000036104cd576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805480820182556000918252905b825181101561065857600182815481106104f9576104f9610de1565b90600052602060002001604051806060016040528085848151811061052057610520610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061055957610559610de1565b602002602001015160200151815260200185848151811061057c5761057c610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906106019082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016104dd565b506040518181527f75922591bf2cec980645dc4a32bb7d5e8da9a15fda86dacf06f8402cecd1478f90602001610381565b80516000036106c4576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054600181018255818052905b825181101561084e57600082815481106106ef576106ef610de1565b90600052602060002001604051806060016040528085848151811061071657610716610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061074f5761074f610de1565b602002602001015160200151815260200185848151811061077257610772610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906107f79082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016106d3565b506040518181527ff8ca6ea7cc31be8572501c37ef5e9e8298be717fb881e0b1ca785aecc4d25e9f90602001610381565b600080828154811061089357610893610de1565b600091825260208220015491505b81811015610a775760008084815481106108bd576108bd610de1565b9060005260206000200182815481106108d8576108d8610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161092590610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461095190610e10565b801561099e5780601f106109735761010080835404028352916020019161099e565b820191906000526020600020905b81548152906001019060200180831161098157829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f584f6b600000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363584f6b6093610a3993909291600401610af3565b600060405180830381600087803b158015610a5357600080fd5b505af1158015610a67573d6000803e3d6000fd5b50505050508060010190506108a1565b506040518281527f01a805f459381af632ecab72ec192c3f9a4c72d26be089026ffd6636d82de98890602001610381565b6001828154811061039d57600080fd5b600060208284031215610aca57600080fd5b5035919050565b60008060408385031215610ae457600080fd5b50508035926020909101359150565b600073ffffffffffffffffffffffffffffffffffffffff8086168352602060606020850152855180606086015260005b81811015610b3f57878101830151868201608001528201610b23565b5060006080828701015260807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011686010193505050808416604084015250949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610bdb57610bdb610b89565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610c2857610c28610b89565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c5457600080fd5b919050565b60006020808385031215610c6c57600080fd5b823567ffffffffffffffff80821115610c8457600080fd5b818501915085601f830112610c9857600080fd5b813581811115610caa57610caa610b89565b8060051b610cb9858201610be1565b9182528381018501918581019089841115610cd357600080fd5b86860192505b83831015610dd457823585811115610cf057600080fd5b86017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06060828d0382011215610d265760008081fd5b610d2e610bb8565b610d398a8401610c30565b815260408084013589811115610d4f5760008081fd5b8401603f81018f13610d615760008081fd5b8b8101358a811115610d7557610d75610b89565b610d858d86601f84011601610be1565b94508085528f83828401011115610d9c5760008081fd5b808383018e87013760008d82870101525050828b830152610dbf60608501610c30565b90820152845250509186019190860190610cd9565b9998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c90821680610e2457607f821691505b602082108103610e5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610eaf576000816000526020600020601f850160051c81016020861015610e8c5750805b601f850160051c820191505b81811015610eab57828155600101610e98565b5050505b505050565b815167ffffffffffffffff811115610ece57610ece610b89565b610ee281610edc8454610e10565b84610e63565b602080601f831160018114610f355760008415610eff5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610eab565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015610f8257888601518255948401946001909101908401610f63565b5085821015610fbe57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b0190555056fea264697066735822122090d4936e163063dfe747da5bf04cc06002b17436a13e78a30b2797e6219ebb2264736f6c63430008190033",
|
|
266
266
|
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80639d6c76b81161005b5780639d6c76b8146100d5578063de46a235146100e8578063f9b80da1146100fb578063ff1575e11461014757600080fd5b806322473d8c14610082578063514aab87146100975780635666a5ea146100c2575b600080fd5b610095610090366004610ab8565b61015a565b005b6100aa6100a5366004610ad1565b61038d565b6040516100b993929190610af3565b60405180910390f35b6100956100d0366004610c59565b610492565b6100956100e3366004610c59565b610689565b6100956100f6366004610ab8565b61087f565b6101227f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100b9565b6100aa610155366004610ad1565b610aa8565b60006001828154811061016f5761016f610de1565b600091825260208220015491505b818110156103545760006001848154811061019a5761019a610de1565b9060005260206000200182815481106101b5576101b5610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161020290610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461022e90610e10565b801561027b5780601f106102505761010080835404028352916020019161027b565b820191906000526020600020905b81548152906001019060200180831161025e57829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f545f7a320000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363545f7a329361031693909291600401610af3565b600060405180830381600087803b15801561033057600080fd5b505af1158015610344573d6000803e3d6000fd5b505050505080600101905061017d565b506040518281527f1382323d6618527d8b03daa05db815f0490966e8b80679fe5ad3d868f84e1a71906020015b60405180910390a15050565b6000828154811061039d57600080fd5b9060005260206000200181815481106103b557600080fd5b60009182526020909120600390910201805460018201805473ffffffffffffffffffffffffffffffffffffffff90921694509192506103f390610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461041f90610e10565b801561046c5780601f106104415761010080835404028352916020019161046c565b820191906000526020600020905b81548152906001019060200180831161044f57829003601f168201915b5050506002909301549192505073ffffffffffffffffffffffffffffffffffffffff1683565b80516000036104cd576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001805480820182556000918252905b825181101561065857600182815481106104f9576104f9610de1565b90600052602060002001604051806060016040528085848151811061052057610520610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061055957610559610de1565b602002602001015160200151815260200185848151811061057c5761057c610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906106019082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016104dd565b506040518181527f75922591bf2cec980645dc4a32bb7d5e8da9a15fda86dacf06f8402cecd1478f90602001610381565b80516000036106c4576040517f4494013c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008054600181018255818052905b825181101561084e57600082815481106106ef576106ef610de1565b90600052602060002001604051806060016040528085848151811061071657610716610de1565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff16815260200185848151811061074f5761074f610de1565b602002602001015160200151815260200185848151811061077257610772610de1565b6020908102919091018101516040015173ffffffffffffffffffffffffffffffffffffffff908116909252835460018082018655600095865294829020845160039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169190931617825582015191929091908201906107f79082610eb4565b5060409190910151600290910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790556001016106d3565b506040518181527ff8ca6ea7cc31be8572501c37ef5e9e8298be717fb881e0b1ca785aecc4d25e9f90602001610381565b600080828154811061089357610893610de1565b600091825260208220015491505b81811015610a775760008084815481106108bd576108bd610de1565b9060005260206000200182815481106108d8576108d8610de1565b60009182526020918290206040805160608101909152600390920201805473ffffffffffffffffffffffffffffffffffffffff168252600181018054929391929184019161092590610e10565b80601f016020809104026020016040519081016040528092919081815260200182805461095190610e10565b801561099e5780601f106109735761010080835404028352916020019161099e565b820191906000526020600020905b81548152906001019060200180831161098157829003601f168201915b50505091835250506002919091015473ffffffffffffffffffffffffffffffffffffffff90811660209283015282519183015160408085015190517f584f6b600000000000000000000000000000000000000000000000000000000081529495507f00000000000000000000000000000000000000000000000000000000000000009092169363584f6b6093610a3993909291600401610af3565b600060405180830381600087803b158015610a5357600080fd5b505af1158015610a67573d6000803e3d6000fd5b50505050508060010190506108a1565b506040518281527f01a805f459381af632ecab72ec192c3f9a4c72d26be089026ffd6636d82de98890602001610381565b6001828154811061039d57600080fd5b600060208284031215610aca57600080fd5b5035919050565b60008060408385031215610ae457600080fd5b50508035926020909101359150565b600073ffffffffffffffffffffffffffffffffffffffff8086168352602060606020850152855180606086015260005b81811015610b3f57878101830151868201608001528201610b23565b5060006080828701015260807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011686010193505050808416604084015250949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610bdb57610bdb610b89565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610c2857610c28610b89565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610c5457600080fd5b919050565b60006020808385031215610c6c57600080fd5b823567ffffffffffffffff80821115610c8457600080fd5b818501915085601f830112610c9857600080fd5b813581811115610caa57610caa610b89565b8060051b610cb9858201610be1565b9182528381018501918581019089841115610cd357600080fd5b86860192505b83831015610dd457823585811115610cf057600080fd5b86017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06060828d0382011215610d265760008081fd5b610d2e610bb8565b610d398a8401610c30565b815260408084013589811115610d4f5760008081fd5b8401603f81018f13610d615760008081fd5b8b8101358a811115610d7557610d75610b89565b610d858d86601f84011601610be1565b94508085528f83828401011115610d9c5760008081fd5b808383018e87013760008d82870101525050828b830152610dbf60608501610c30565b90820152845250509186019190860190610cd9565b9998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c90821680610e2457607f821691505b602082108103610e5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f821115610eaf576000816000526020600020601f850160051c81016020861015610e8c5750805b601f850160051c820191505b81811015610eab57828155600101610e98565b5050505b505050565b815167ffffffffffffffff811115610ece57610ece610b89565b610ee281610edc8454610e10565b84610e63565b602080601f831160018114610f355760008415610eff5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610eab565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015610f8257888601518255948401946001909101908401610f63565b5085821015610fbe57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b0190555056fea264697066735822122090d4936e163063dfe747da5bf04cc06002b17436a13e78a30b2797e6219ebb2264736f6c63430008190033",
|
|
@@ -291,20 +291,20 @@
|
|
|
291
291
|
"storageLayout": {
|
|
292
292
|
"storage": [
|
|
293
293
|
{
|
|
294
|
-
"astId":
|
|
294
|
+
"astId": 10492,
|
|
295
295
|
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
296
296
|
"label": "grantPermissions",
|
|
297
297
|
"offset": 0,
|
|
298
298
|
"slot": "0",
|
|
299
|
-
"type": "t_array(t_array(t_struct(Permission)
|
|
299
|
+
"type": "t_array(t_array(t_struct(Permission)10483_storage)dyn_storage)dyn_storage"
|
|
300
300
|
},
|
|
301
301
|
{
|
|
302
|
-
"astId":
|
|
302
|
+
"astId": 10497,
|
|
303
303
|
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
304
304
|
"label": "revokePermissions",
|
|
305
305
|
"offset": 0,
|
|
306
306
|
"slot": "1",
|
|
307
|
-
"type": "t_array(t_array(t_struct(Permission)
|
|
307
|
+
"type": "t_array(t_array(t_struct(Permission)10483_storage)dyn_storage)dyn_storage"
|
|
308
308
|
}
|
|
309
309
|
],
|
|
310
310
|
"types": {
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
"label": "address",
|
|
314
314
|
"numberOfBytes": "20"
|
|
315
315
|
},
|
|
316
|
-
"t_array(t_array(t_struct(Permission)
|
|
317
|
-
"base": "t_array(t_struct(Permission)
|
|
316
|
+
"t_array(t_array(t_struct(Permission)10483_storage)dyn_storage)dyn_storage": {
|
|
317
|
+
"base": "t_array(t_struct(Permission)10483_storage)dyn_storage",
|
|
318
318
|
"encoding": "dynamic_array",
|
|
319
319
|
"label": "struct ACMCommandsAggregator.Permission[][]",
|
|
320
320
|
"numberOfBytes": "32"
|
|
321
321
|
},
|
|
322
|
-
"t_array(t_struct(Permission)
|
|
323
|
-
"base": "t_struct(Permission)
|
|
322
|
+
"t_array(t_struct(Permission)10483_storage)dyn_storage": {
|
|
323
|
+
"base": "t_struct(Permission)10483_storage",
|
|
324
324
|
"encoding": "dynamic_array",
|
|
325
325
|
"label": "struct ACMCommandsAggregator.Permission[]",
|
|
326
326
|
"numberOfBytes": "32"
|
|
@@ -330,12 +330,12 @@
|
|
|
330
330
|
"label": "string",
|
|
331
331
|
"numberOfBytes": "32"
|
|
332
332
|
},
|
|
333
|
-
"t_struct(Permission)
|
|
333
|
+
"t_struct(Permission)10483_storage": {
|
|
334
334
|
"encoding": "inplace",
|
|
335
335
|
"label": "struct ACMCommandsAggregator.Permission",
|
|
336
336
|
"members": [
|
|
337
337
|
{
|
|
338
|
-
"astId":
|
|
338
|
+
"astId": 10478,
|
|
339
339
|
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
340
340
|
"label": "contractAddress",
|
|
341
341
|
"offset": 0,
|
|
@@ -343,7 +343,7 @@
|
|
|
343
343
|
"type": "t_address"
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
|
-
"astId":
|
|
346
|
+
"astId": 10480,
|
|
347
347
|
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
348
348
|
"label": "functionSig",
|
|
349
349
|
"offset": 0,
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
"type": "t_string_storage"
|
|
352
352
|
},
|
|
353
353
|
{
|
|
354
|
-
"astId":
|
|
354
|
+
"astId": 10482,
|
|
355
355
|
"contract": "contracts/Utils/ACMCommandsAggregator.sol:ACMCommandsAggregator",
|
|
356
356
|
"label": "account",
|
|
357
357
|
"offset": 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "0x243313C1cC198FF80756ed2ef14D9dcd94Ee762b",
|
|
3
3
|
"abi": [
|
|
4
4
|
{
|
|
5
5
|
"inputs": [],
|
|
@@ -360,22 +360,22 @@
|
|
|
360
360
|
"type": "function"
|
|
361
361
|
}
|
|
362
362
|
],
|
|
363
|
-
"transactionHash": "
|
|
363
|
+
"transactionHash": "0xe16ef53e8b7337b8a353054602a0e3a2e4d827c452c86d0d65b4cbb3a04a290f",
|
|
364
364
|
"receipt": {
|
|
365
365
|
"to": null,
|
|
366
366
|
"from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d",
|
|
367
|
-
"contractAddress": "
|
|
368
|
-
"transactionIndex":
|
|
367
|
+
"contractAddress": "0x243313C1cC198FF80756ed2ef14D9dcd94Ee762b",
|
|
368
|
+
"transactionIndex": 2,
|
|
369
369
|
"gasUsed": "910465",
|
|
370
|
-
"logsBloom": "
|
|
371
|
-
"blockHash": "
|
|
372
|
-
"transactionHash": "
|
|
370
|
+
"logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000100000000000000020000000000020000000800000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000040000000000000000000000000000001000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000",
|
|
371
|
+
"blockHash": "0xc8cc3256b7ed725a2f12b3ba68ced81db19a5b42e25a3607cab401a84e440466",
|
|
372
|
+
"transactionHash": "0xe16ef53e8b7337b8a353054602a0e3a2e4d827c452c86d0d65b4cbb3a04a290f",
|
|
373
373
|
"logs": [
|
|
374
374
|
{
|
|
375
|
-
"transactionIndex":
|
|
376
|
-
"blockNumber":
|
|
377
|
-
"transactionHash": "
|
|
378
|
-
"address": "
|
|
375
|
+
"transactionIndex": 2,
|
|
376
|
+
"blockNumber": 2922351,
|
|
377
|
+
"transactionHash": "0xe16ef53e8b7337b8a353054602a0e3a2e4d827c452c86d0d65b4cbb3a04a290f",
|
|
378
|
+
"address": "0x243313C1cC198FF80756ed2ef14D9dcd94Ee762b",
|
|
379
379
|
"topics": [
|
|
380
380
|
"0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",
|
|
381
381
|
"0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
@@ -383,18 +383,18 @@
|
|
|
383
383
|
"0x00000000000000000000000018bdb05dd1a95677f4381cfb4db52d342df5c00d"
|
|
384
384
|
],
|
|
385
385
|
"data": "0x",
|
|
386
|
-
"logIndex":
|
|
387
|
-
"blockHash": "
|
|
386
|
+
"logIndex": 40,
|
|
387
|
+
"blockHash": "0xc8cc3256b7ed725a2f12b3ba68ced81db19a5b42e25a3607cab401a84e440466"
|
|
388
388
|
}
|
|
389
389
|
],
|
|
390
|
-
"blockNumber":
|
|
391
|
-
"cumulativeGasUsed": "
|
|
390
|
+
"blockNumber": 2922351,
|
|
391
|
+
"cumulativeGasUsed": "2118903",
|
|
392
392
|
"status": 1,
|
|
393
393
|
"byzantium": true
|
|
394
394
|
},
|
|
395
395
|
"args": [],
|
|
396
396
|
"numDeployments": 1,
|
|
397
|
-
"solcInputHash": "
|
|
397
|
+
"solcInputHash": "0fe2e57d7b731fab98e94353ed44ddd5",
|
|
398
398
|
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"}],\"name\":\"PermissionGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"}],\"name\":\"PermissionRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"accountToPermit\",\"type\":\"address\"}],\"name\":\"giveCallPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"}],\"name\":\"hasPermission\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"}],\"name\":\"isAllowedToCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"functionSig\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"accountToRevoke\",\"type\":\"address\"}],\"name\":\"revokeCallPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"details\":\"This contract is a wrapper of OpenZeppelin AccessControl extending it in a way to standartize access control within Venus Smart Contract Ecosystem.\",\"events\":{\"PermissionGranted(address,address,string)\":{\"details\":\"If contract address is 0x000..0 this means that the account is a default admin of this function and can call any contract function with this signature\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"giveCallPermission(address,string,address)\":{\"custom:event\":\"Emits a {RoleGranted} and {PermissionGranted} events.\",\"details\":\"this function can be called only from Role Admin or DEFAULT_ADMIN_ROLEif contractAddress is zero address, the account can access the specified function on **any** contract managed by this ACL\",\"params\":{\"accountToPermit\":\"account that will be given access to the contract function\",\"contractAddress\":\"address of contract for which call permissions will be granted\",\"functionSig\":\"signature e.g. \\\"functionName(uint256,bool)\\\"\"}},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasPermission(address,address,string)\":{\"details\":\"This function is used as a view function to check permissions rather than contract hook for access restriction check.\",\"params\":{\"account\":\"for which call permissions will be checked against\",\"contractAddress\":\"address of the restricted contract\",\"functionSig\":\"signature of the restricted function e.g. \\\"functionName(uint256,bool)\\\"\"},\"returns\":{\"_0\":\"false if the user account cannot call the particular contract function\"}},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isAllowedToCall(address,string)\":{\"details\":\"Since restricted contracts using this function as a permission hook, we can get contracts address with msg.sender\",\"params\":{\"account\":\"for which call permissions will be checked\",\"functionSig\":\"restricted function signature e.g. \\\"functionName(uint256,bool)\\\"\"},\"returns\":{\"_0\":\"false if the user account cannot call the particular contract function\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeCallPermission(address,string,address)\":{\"custom:event\":\"Emits {RoleRevoked} and {PermissionRevoked} events.\",\"details\":\"this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE \\t\\tMay emit a {RoleRevoked} event.\",\"params\":{\"contractAddress\":\"address of contract for which call permissions will be revoked\",\"functionSig\":\"signature e.g. \\\"functionName(uint256,bool)\\\"\"}},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"title\":\"AccessControlManager\",\"version\":1},\"userdoc\":{\"events\":{\"PermissionGranted(address,address,string)\":{\"notice\":\"Emitted when an account is given a permission to a certain contract function\"},\"PermissionRevoked(address,address,string)\":{\"notice\":\"Emitted when an account is revoked a permission to a certain contract function\"}},\"kind\":\"user\",\"methods\":{\"giveCallPermission(address,string,address)\":{\"notice\":\"Gives a function call permission to one single account\"},\"hasPermission(address,address,string)\":{\"notice\":\"Verifies if the given account can call a contract's guarded function\"},\"isAllowedToCall(address,string)\":{\"notice\":\"Verifies if the given account can call a contract's guarded function\"},\"revokeCallPermission(address,string,address)\":{\"notice\":\"Revokes an account's permission to a particular function call\"}},\"notice\":\"Access control plays a crucial role in the Venus governance model. It is used to restrict functions so that they can only be called from one account or list of accounts (EOA or Contract Accounts). The implementation of `AccessControlManager`(https://github.com/VenusProtocol/governance-contracts/blob/main/contracts/Governance/AccessControlManager.sol) inherits the [Open Zeppelin AccessControl](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol) contract as a base for role management logic. There are two role types: admin and granular permissions. ## Granular Roles Granular roles are built by hashing the contract address and its function signature. For example, given contract `Foo` with function `Foo.bar()` which is guarded by ACM, calling `giveRolePermission` for account B do the following: 1. Compute `keccak256(contractFooAddress,functionSignatureBar)` 1. Add the computed role to the roles of account B 1. Account B now can call `ContractFoo.bar()` ## Admin Roles Admin roles allow for an address to call a function signature on any contract guarded by the `AccessControlManager`. This is particularly useful for contracts created by factories. For Admin roles a null address is hashed in place of the contract address (`keccak256(0x0000000000000000000000000000000000000000,functionSignatureBar)`. In the previous example, giving account B the admin role, account B will have permissions to call the `bar()` function on any contract that is guarded by ACM, not only contract A. ## Protocol Integration All restricted functions in Venus Protocol use a hook to ACM in order to check if the caller has the right permission to call the guarded function. `AccessControlledV5` and `AccessControlledV8` abstract contract makes this integration easier. They call ACM's external method `isAllowedToCall(address caller, string functionSig)`. Here is an example of how `setCollateralFactor` function in `Comptroller` is integrated with ACM: ``` contract Comptroller is [...] AccessControlledV8 { [...] function setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external { _checkAccessAllowed(\\\"setCollateralFactor(address,uint256,uint256)\\\"); [...] } } ```\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/AccessControlManager.sol\":\"AccessControlManager\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(account),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\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 {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\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 * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\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 * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\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 revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x67e3daf189111d6d5b0464ed09cf9f0605a22c4b965a7fcecd707101faff008a\",\"license\":\"MIT\"},\"@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\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6\",\"license\":\"MIT\"},\"contracts/Governance/AccessControlManager.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"./IAccessControlManagerV8.sol\\\";\\n\\n/**\\n * @title AccessControlManager\\n * @author Venus\\n * @dev This contract is a wrapper of OpenZeppelin AccessControl extending it in a way to standartize access control within Venus Smart Contract Ecosystem.\\n * @notice Access control plays a crucial role in the Venus governance model. It is used to restrict functions so that they can only be called from one\\n * account or list of accounts (EOA or Contract Accounts).\\n *\\n * The implementation of `AccessControlManager`(https://github.com/VenusProtocol/governance-contracts/blob/main/contracts/Governance/AccessControlManager.sol)\\n * inherits the [Open Zeppelin AccessControl](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol)\\n * contract as a base for role management logic. There are two role types: admin and granular permissions.\\n * \\n * ## Granular Roles\\n * \\n * Granular roles are built by hashing the contract address and its function signature. For example, given contract `Foo` with function `Foo.bar()` which\\n * is guarded by ACM, calling `giveRolePermission` for account B do the following:\\n * \\n * 1. Compute `keccak256(contractFooAddress,functionSignatureBar)`\\n * 1. Add the computed role to the roles of account B\\n * 1. Account B now can call `ContractFoo.bar()`\\n * \\n * ## Admin Roles\\n * \\n * Admin roles allow for an address to call a function signature on any contract guarded by the `AccessControlManager`. This is particularly useful for\\n * contracts created by factories.\\n * \\n * For Admin roles a null address is hashed in place of the contract address (`keccak256(0x0000000000000000000000000000000000000000,functionSignatureBar)`.\\n * \\n * In the previous example, giving account B the admin role, account B will have permissions to call the `bar()` function on any contract that is guarded by\\n * ACM, not only contract A.\\n * \\n * ## Protocol Integration\\n * \\n * All restricted functions in Venus Protocol use a hook to ACM in order to check if the caller has the right permission to call the guarded function.\\n * `AccessControlledV5` and `AccessControlledV8` abstract contract makes this integration easier. They call ACM's external method\\n * `isAllowedToCall(address caller, string functionSig)`. Here is an example of how `setCollateralFactor` function in `Comptroller` is integrated with ACM:\\n\\n```\\n contract Comptroller is [...] AccessControlledV8 {\\n [...]\\n function setCollateralFactor(VToken vToken, uint256 newCollateralFactorMantissa, uint256 newLiquidationThresholdMantissa) external {\\n _checkAccessAllowed(\\\"setCollateralFactor(address,uint256,uint256)\\\");\\n [...]\\n }\\n }\\n```\\n */\\ncontract AccessControlManager is AccessControl, IAccessControlManagerV8 {\\n /// @notice Emitted when an account is given a permission to a certain contract function\\n /// @dev If contract address is 0x000..0 this means that the account is a default admin of this function and\\n /// can call any contract function with this signature\\n event PermissionGranted(address account, address contractAddress, string functionSig);\\n\\n /// @notice Emitted when an account is revoked a permission to a certain contract function\\n event PermissionRevoked(address account, address contractAddress, string functionSig);\\n\\n constructor() {\\n // Grant the contract deployer the default admin role: it will be able\\n // to grant and revoke any roles\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /**\\n * @notice Gives a function call permission to one single account\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * @param contractAddress address of contract for which call permissions will be granted\\n * @dev if contractAddress is zero address, the account can access the specified function\\n * on **any** contract managed by this ACL\\n * @param functionSig signature e.g. \\\"functionName(uint256,bool)\\\"\\n * @param accountToPermit account that will be given access to the contract function\\n * @custom:event Emits a {RoleGranted} and {PermissionGranted} events.\\n */\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) public {\\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\\n grantRole(role, accountToPermit);\\n emit PermissionGranted(accountToPermit, contractAddress, functionSig);\\n }\\n\\n /**\\n * @notice Revokes an account's permission to a particular function call\\n * @dev this function can be called only from Role Admin or DEFAULT_ADMIN_ROLE\\n * \\t\\tMay emit a {RoleRevoked} event.\\n * @param contractAddress address of contract for which call permissions will be revoked\\n * @param functionSig signature e.g. \\\"functionName(uint256,bool)\\\"\\n * @custom:event Emits {RoleRevoked} and {PermissionRevoked} events.\\n */\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) public {\\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\\n revokeRole(role, accountToRevoke);\\n emit PermissionRevoked(accountToRevoke, contractAddress, functionSig);\\n }\\n\\n /**\\n * @notice Verifies if the given account can call a contract's guarded function\\n * @dev Since restricted contracts using this function as a permission hook, we can get contracts address with msg.sender\\n * @param account for which call permissions will be checked\\n * @param functionSig restricted function signature e.g. \\\"functionName(uint256,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n *\\n */\\n function isAllowedToCall(address account, string calldata functionSig) public view returns (bool) {\\n bytes32 role = keccak256(abi.encodePacked(msg.sender, functionSig));\\n\\n if (hasRole(role, account)) {\\n return true;\\n } else {\\n role = keccak256(abi.encodePacked(address(0), functionSig));\\n return hasRole(role, account);\\n }\\n }\\n\\n /**\\n * @notice Verifies if the given account can call a contract's guarded function\\n * @dev This function is used as a view function to check permissions rather than contract hook for access restriction check.\\n * @param account for which call permissions will be checked against\\n * @param contractAddress address of the restricted contract\\n * @param functionSig signature of the restricted function e.g. \\\"functionName(uint256,bool)\\\"\\n * @return false if the user account cannot call the particular contract function\\n */\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) public view returns (bool) {\\n bytes32 role = keccak256(abi.encodePacked(contractAddress, functionSig));\\n return hasRole(role, account);\\n }\\n}\\n\",\"keccak256\":\"0x9cf1fe49aecbf49434d4a04c3bd25c1a103356c999d335774216da17a3a152a8\",\"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\"}},\"version\":1}",
|
|
399
399
|
"bytecode": "0x6080604052348015600f57600080fd5b506019600033601d565b60c5565b602582826029565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166025576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905560813390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610f19806100d46000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c8063545f7a321161008157806391d148541161005b57806391d148541461019b578063a217fddf146101df578063d547741f146101e757600080fd5b8063545f7a3214610162578063584f6b601461017557806382bfd0f01461018857600080fd5b8063248a9ca3116100b2578063248a9ca3146101095780632f2ff15d1461013a57806336568abe1461014f57600080fd5b806301ffc9a7146100ce57806318c5e8ab146100f6575b600080fd5b6100e16100dc366004610a74565b6101fa565b60405190151581526020015b60405180910390f35b6100e1610104366004610b28565b610293565b61012c610117366004610b7b565b60009081526020819052604090206001015490565b6040519081526020016100ed565b61014d610148366004610b94565b610368565b005b61014d61015d366004610b94565b610392565b61014d610170366004610bc0565b61044a565b61014d610183366004610bc0565b6104c7565b6100e1610196366004610c25565b610535565b6100e16101a9366004610b94565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61012c600081565b61014d6101f5366004610b94565b61059f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061028d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000803384846040516020016102ab93929190610c86565b60408051601f198184030181529181528151602092830120600081815280845282812073ffffffffffffffffffffffffffffffffffffffff8a16825290935291205490915060ff1615610302576001915050610361565b6000848460405160200161031893929190610c86565b60408051808303601f190181529181528151602092830120600090815280835281812073ffffffffffffffffffffffffffffffffffffffff8916825290925290205460ff169150505b9392505050565b600082815260208190526040902060010154610383816105c4565b61038d83836105d1565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116331461043c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61044682826106c1565b5050565b600084848460405160200161046193929190610c86565b604051602081830303815290604052805190602001209050610483818361059f565b7f55426a61e90ac7d7d1fc886b67b420ade8c8b535e68d655394bc271e3a12b8e2828686866040516104b89493929190610cc5565b60405180910390a15050505050565b60008484846040516020016104de93929190610c86565b6040516020818303038152906040528051906020012090506105008183610368565b7f69c5ce2d658fea352a2464f87ffbe1f09746c918a91da0994044c3767d641b3f828686866040516104b89493929190610cc5565b60008084848460405160200161054d93929190610c86565b60408051601f198184030181529181528151602092830120600081815280845282812073ffffffffffffffffffffffffffffffffffffffff8b16825290935291205490915060ff169695505050505050565b6000828152602081905260409020600101546105ba816105c4565b61038d83836106c1565b6105ce8133610778565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166104465760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556106633390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156104465760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610446576107b681610812565b6107c1836020610831565b6040516020016107d2929190610d43565b60408051601f19818403018152908290527f08c379a000000000000000000000000000000000000000000000000000000000825261043391600401610dc4565b606061028d73ffffffffffffffffffffffffffffffffffffffff831660145b60606000610840836002610e26565b61084b906002610e3d565b67ffffffffffffffff81111561086357610863610e50565b6040519080825280601f01601f19166020018201604052801561088d576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106108c4576108c4610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061092757610927610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000610963846002610e26565b61096e906001610e3d565b90505b6001811115610a0b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106109af576109af610e7f565b1a60f81b8282815181106109c5576109c5610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93610a0481610eae565b9050610971565b508315610361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610433565b600060208284031215610a8657600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461036157600080fd5b803573ffffffffffffffffffffffffffffffffffffffff81168114610ada57600080fd5b919050565b60008083601f840112610af157600080fd5b50813567ffffffffffffffff811115610b0957600080fd5b602083019150836020828501011115610b2157600080fd5b9250929050565b600080600060408486031215610b3d57600080fd5b610b4684610ab6565b9250602084013567ffffffffffffffff811115610b6257600080fd5b610b6e86828701610adf565b9497909650939450505050565b600060208284031215610b8d57600080fd5b5035919050565b60008060408385031215610ba757600080fd5b82359150610bb760208401610ab6565b90509250929050565b60008060008060608587031215610bd657600080fd5b610bdf85610ab6565b9350602085013567ffffffffffffffff811115610bfb57600080fd5b610c0787828801610adf565b9094509250610c1a905060408601610ab6565b905092959194509250565b60008060008060608587031215610c3b57600080fd5b610c4485610ab6565b9350610c5260208601610ab6565b9250604085013567ffffffffffffffff811115610c6e57600080fd5b610c7a87828801610adf565b95989497509550505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b168152818360148301376000910160140190815292915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b60005b83811015610d3a578181015183820152602001610d22565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610d7b816017850160208801610d1f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351610db8816028840160208801610d1f565b01602801949350505050565b6020815260008251806020840152610de3816040850160208701610d1f565b601f01601f19169190910160400192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761028d5761028d610df7565b8082018082111561028d5761028d610df7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081610ebd57610ebd610df7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220a6052000a243f1fa66363f0f0a0d702386084ba1cb5d78f17dbc24f77d046bfb64736f6c63430008190033",
|
|
400
400
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c8063545f7a321161008157806391d148541161005b57806391d148541461019b578063a217fddf146101df578063d547741f146101e757600080fd5b8063545f7a3214610162578063584f6b601461017557806382bfd0f01461018857600080fd5b8063248a9ca3116100b2578063248a9ca3146101095780632f2ff15d1461013a57806336568abe1461014f57600080fd5b806301ffc9a7146100ce57806318c5e8ab146100f6575b600080fd5b6100e16100dc366004610a74565b6101fa565b60405190151581526020015b60405180910390f35b6100e1610104366004610b28565b610293565b61012c610117366004610b7b565b60009081526020819052604090206001015490565b6040519081526020016100ed565b61014d610148366004610b94565b610368565b005b61014d61015d366004610b94565b610392565b61014d610170366004610bc0565b61044a565b61014d610183366004610bc0565b6104c7565b6100e1610196366004610c25565b610535565b6100e16101a9366004610b94565b60009182526020828152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61012c600081565b61014d6101f5366004610b94565b61059f565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061028d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000803384846040516020016102ab93929190610c86565b60408051601f198184030181529181528151602092830120600081815280845282812073ffffffffffffffffffffffffffffffffffffffff8a16825290935291205490915060ff1615610302576001915050610361565b6000848460405160200161031893929190610c86565b60408051808303601f190181529181528151602092830120600090815280835281812073ffffffffffffffffffffffffffffffffffffffff8916825290925290205460ff169150505b9392505050565b600082815260208190526040902060010154610383816105c4565b61038d83836105d1565b505050565b73ffffffffffffffffffffffffffffffffffffffff8116331461043c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61044682826106c1565b5050565b600084848460405160200161046193929190610c86565b604051602081830303815290604052805190602001209050610483818361059f565b7f55426a61e90ac7d7d1fc886b67b420ade8c8b535e68d655394bc271e3a12b8e2828686866040516104b89493929190610cc5565b60405180910390a15050505050565b60008484846040516020016104de93929190610c86565b6040516020818303038152906040528051906020012090506105008183610368565b7f69c5ce2d658fea352a2464f87ffbe1f09746c918a91da0994044c3767d641b3f828686866040516104b89493929190610cc5565b60008084848460405160200161054d93929190610c86565b60408051601f198184030181529181528151602092830120600081815280845282812073ffffffffffffffffffffffffffffffffffffffff8b16825290935291205490915060ff169695505050505050565b6000828152602081905260409020600101546105ba816105c4565b61038d83836106c1565b6105ce8133610778565b50565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166104465760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556106633390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156104465760008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60008281526020818152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610446576107b681610812565b6107c1836020610831565b6040516020016107d2929190610d43565b60408051601f19818403018152908290527f08c379a000000000000000000000000000000000000000000000000000000000825261043391600401610dc4565b606061028d73ffffffffffffffffffffffffffffffffffffffff831660145b60606000610840836002610e26565b61084b906002610e3d565b67ffffffffffffffff81111561086357610863610e50565b6040519080825280601f01601f19166020018201604052801561088d576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106108c4576108c4610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061092757610927610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000610963846002610e26565b61096e906001610e3d565b90505b6001811115610a0b577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106109af576109af610e7f565b1a60f81b8282815181106109c5576109c5610e7f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93610a0481610eae565b9050610971565b508315610361576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610433565b600060208284031215610a8657600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461036157600080fd5b803573ffffffffffffffffffffffffffffffffffffffff81168114610ada57600080fd5b919050565b60008083601f840112610af157600080fd5b50813567ffffffffffffffff811115610b0957600080fd5b602083019150836020828501011115610b2157600080fd5b9250929050565b600080600060408486031215610b3d57600080fd5b610b4684610ab6565b9250602084013567ffffffffffffffff811115610b6257600080fd5b610b6e86828701610adf565b9497909650939450505050565b600060208284031215610b8d57600080fd5b5035919050565b60008060408385031215610ba757600080fd5b82359150610bb760208401610ab6565b90509250929050565b60008060008060608587031215610bd657600080fd5b610bdf85610ab6565b9350602085013567ffffffffffffffff811115610bfb57600080fd5b610c0787828801610adf565b9094509250610c1a905060408601610ab6565b905092959194509250565b60008060008060608587031215610c3b57600080fd5b610c4485610ab6565b9350610c5260208601610ab6565b9250604085013567ffffffffffffffff811115610c6e57600080fd5b610c7a87828801610adf565b95989497509550505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b168152818360148301376000910160140190815292915050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060606040830152826060830152828460808401376000608084840101526080601f19601f850116830101905095945050505050565b60005b83811015610d3a578181015183820152602001610d22565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610d7b816017850160208801610d1f565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351610db8816028840160208801610d1f565b01602801949350505050565b6020815260008251806020840152610de3816040850160208701610d1f565b601f01601f19169190910160400192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808202811582820484141761028d5761028d610df7565b8082018082111561028d5761028d610df7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081610ebd57610ebd610df7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019056fea2646970667358221220a6052000a243f1fa66363f0f0a0d702386084ba1cb5d78f17dbc24f77d046bfb64736f6c63430008190033",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "0x2aae1073B2219729Ff8e5952887905A8da498062",
|
|
3
3
|
"abi": [
|
|
4
4
|
{
|
|
5
5
|
"inputs": [
|
|
@@ -448,23 +448,23 @@
|
|
|
448
448
|
"type": "function"
|
|
449
449
|
}
|
|
450
450
|
],
|
|
451
|
-
"transactionHash": "
|
|
451
|
+
"transactionHash": "0xf66eb89173c6a517a56686ffc02b2cfb791d5d2506f62590c2fc15a8b4912612",
|
|
452
452
|
"receipt": {
|
|
453
453
|
"to": null,
|
|
454
454
|
"from": "0x18BDb05DD1A95677f4381cfb4db52D342dF5C00d",
|
|
455
|
-
"contractAddress": "
|
|
455
|
+
"contractAddress": "0x2aae1073B2219729Ff8e5952887905A8da498062",
|
|
456
456
|
"transactionIndex": 2,
|
|
457
457
|
"gasUsed": "1178183",
|
|
458
458
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
459
|
-
"blockHash": "
|
|
460
|
-
"transactionHash": "
|
|
459
|
+
"blockHash": "0x66a232c6332fbfca0f75b329a09bd6f35865397cba56f910d8ac2caef004f5d4",
|
|
460
|
+
"transactionHash": "0xf66eb89173c6a517a56686ffc02b2cfb791d5d2506f62590c2fc15a8b4912612",
|
|
461
461
|
"logs": [],
|
|
462
|
-
"blockNumber":
|
|
463
|
-
"cumulativeGasUsed": "
|
|
462
|
+
"blockNumber": 2922325,
|
|
463
|
+
"cumulativeGasUsed": "2386681",
|
|
464
464
|
"status": 1,
|
|
465
465
|
"byzantium": true
|
|
466
466
|
},
|
|
467
|
-
"args": ["
|
|
467
|
+
"args": ["0xc80E4112940efF40c8626bAc0D8E79cB7dAbe289", 100],
|
|
468
468
|
"numDeployments": 1,
|
|
469
469
|
"solcInputHash": "dd255b4e0156dfc73554b72a83ca02d8",
|
|
470
470
|
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"CancelTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"ExecuteTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldDelay\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newDelay\",\"type\":\"uint256\"}],\"name\":\"NewDelay\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"QueueTransaction\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"GRACE_PERIOD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAXIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINIMUM_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"cancelTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"delay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"executeTransaction\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"signature\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"eta\",\"type\":\"uint256\"}],\"name\":\"queueTransaction\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"queuedTransactions\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"delay_\",\"type\":\"uint256\"}],\"name\":\"setDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pendingAdmin_\",\"type\":\"address\"}],\"name\":\"setPendingAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"GRACE_PERIOD()\":{\"returns\":{\"_0\":\"The duration of the grace period, specified as a uint256 value.\"}},\"MAXIMUM_DELAY()\":{\"returns\":{\"_0\":\"Maximum delay\"}},\"MINIMUM_DELAY()\":{\"returns\":{\"_0\":\"Minimum delay\"}},\"acceptAdmin()\":{\"custom:access\":\"Sender must be pending admin\",\"custom:event\":\"Emit NewAdmin with old and new admin\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit CancelTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"}},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit ExecuteTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Result of function call\"}},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"custom:access\":\"Sender must be admin\",\"custom:event\":\"Emit QueueTransaction\",\"params\":{\"data\":\"Arguments to be passed to the function when called\",\"eta\":\"Timestamp after which the transaction can be executed\",\"signature\":\"Signature of the function to be called\",\"target\":\"Address of the contract with the method to be called\",\"value\":\"Native token amount sent with the transaction\"},\"returns\":{\"_0\":\"Hash of the queued transaction\"}},\"setDelay(uint256)\":{\"custom:access\":\"Sender must be Timelock itself\",\"custom:event\":\"Emit NewDelay with old and new delay\",\"params\":{\"delay_\":\"The new delay period for the transaction queue\"}},\"setPendingAdmin(address)\":{\"custom:access\":\"Sender must be Timelock contract itself or admin\",\"custom:event\":\"Emit NewPendingAdmin with new pending admin\",\"params\":{\"pendingAdmin_\":\"Address of the proposed admin\"}}},\"title\":\"TimelockV8\",\"version\":1},\"userdoc\":{\"errors\":{\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"events\":{\"CancelTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been cancelled\"},\"ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been executed\"},\"NewAdmin(address,address)\":{\"notice\":\"Event emitted when a new admin is accepted\"},\"NewDelay(uint256,uint256)\":{\"notice\":\"Event emitted when a new delay is proposed\"},\"NewPendingAdmin(address)\":{\"notice\":\"Event emitted when a new admin is proposed\"},\"QueueTransaction(bytes32,address,uint256,string,bytes,uint256)\":{\"notice\":\"Event emitted when a proposal transaction has been queued\"}},\"kind\":\"user\",\"methods\":{\"GRACE_PERIOD()\":{\"notice\":\"Return grace period\"},\"MAXIMUM_DELAY()\":{\"notice\":\"Return required maximum delay\"},\"MINIMUM_DELAY()\":{\"notice\":\"Return required minimum delay\"},\"acceptAdmin()\":{\"notice\":\"Method for accepting a proposed admin\"},\"admin()\":{\"notice\":\"Timelock admin authorized to queue and execute transactions\"},\"cancelTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to cancel a queued transaction\"},\"delay()\":{\"notice\":\"Period for a proposal transaction to be queued\"},\"executeTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called to execute a queued transaction\"},\"pendingAdmin()\":{\"notice\":\"Account proposed as the next admin\"},\"queueTransaction(address,uint256,string,bytes,uint256)\":{\"notice\":\"Called for each action when queuing a proposal\"},\"queuedTransactions(bytes32)\":{\"notice\":\"Mapping of queued transactions\"},\"setDelay(uint256)\":{\"notice\":\"Setter for the transaction queue delay\"},\"setPendingAdmin(address)\":{\"notice\":\"Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\"}},\"notice\":\"The Timelock contract using solidity V8. This contract also differs from the original timelock because it has a virtual function to get minimum delays and allow test deployments to override the value.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Governance/TimelockV8.sol\":\"TimelockV8\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@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/TimelockV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\n\\n/**\\n * @title TimelockV8\\n * @author Venus\\n * @notice The Timelock contract using solidity V8.\\n * This contract also differs from the original timelock because it has a virtual function to get minimum delays\\n * and allow test deployments to override the value.\\n */\\ncontract TimelockV8 {\\n /// @notice Required period to execute a proposal transaction\\n uint256 private constant DEFAULT_GRACE_PERIOD = 14 days;\\n\\n /// @notice Minimum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MINIMUM_DELAY = 1 seconds;\\n\\n /// @notice Maximum amount of time a proposal transaction must be queued\\n uint256 private constant DEFAULT_MAXIMUM_DELAY = 30 days;\\n\\n /// @notice Timelock admin authorized to queue and execute transactions\\n address public admin;\\n\\n /// @notice Account proposed as the next admin\\n address public pendingAdmin;\\n\\n /// @notice Period for a proposal transaction to be queued\\n uint256 public delay;\\n\\n /// @notice Mapping of queued transactions\\n mapping(bytes32 => bool) public queuedTransactions;\\n\\n /// @notice Event emitted when a new admin is accepted\\n event NewAdmin(address indexed oldAdmin, address indexed newAdmin);\\n\\n /// @notice Event emitted when a new admin is proposed\\n event NewPendingAdmin(address indexed newPendingAdmin);\\n\\n /// @notice Event emitted when a new delay is proposed\\n event NewDelay(uint256 indexed oldDelay, uint256 indexed newDelay);\\n\\n /// @notice Event emitted when a proposal transaction has been cancelled\\n event CancelTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been executed\\n event ExecuteTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n /// @notice Event emitted when a proposal transaction has been queued\\n event QueueTransaction(\\n bytes32 indexed txHash,\\n address indexed target,\\n uint256 value,\\n string signature,\\n bytes data,\\n uint256 eta\\n );\\n\\n constructor(address admin_, uint256 delay_) {\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::constructor: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n ensureNonzeroAddress(admin_);\\n\\n admin = admin_;\\n delay = delay_;\\n }\\n\\n fallback() external payable {}\\n\\n /**\\n * @notice Setter for the transaction queue delay\\n * @param delay_ The new delay period for the transaction queue\\n * @custom:access Sender must be Timelock itself\\n * @custom:event Emit NewDelay with old and new delay\\n */\\n function setDelay(uint256 delay_) public {\\n require(msg.sender == address(this), \\\"Timelock::setDelay: Call must come from Timelock.\\\");\\n require(delay_ >= MINIMUM_DELAY(), \\\"Timelock::setDelay: Delay must exceed minimum delay.\\\");\\n require(delay_ <= MAXIMUM_DELAY(), \\\"Timelock::setDelay: Delay must not exceed maximum delay.\\\");\\n emit NewDelay(delay, delay_);\\n delay = delay_;\\n }\\n\\n /**\\n * @notice Return grace period\\n * @return The duration of the grace period, specified as a uint256 value.\\n */\\n function GRACE_PERIOD() public view virtual returns (uint256) {\\n return DEFAULT_GRACE_PERIOD;\\n }\\n\\n /**\\n * @notice Return required minimum delay\\n * @return Minimum delay\\n */\\n function MINIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MINIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Return required maximum delay\\n * @return Maximum delay\\n */\\n function MAXIMUM_DELAY() public view virtual returns (uint256) {\\n return DEFAULT_MAXIMUM_DELAY;\\n }\\n\\n /**\\n * @notice Method for accepting a proposed admin\\n * @custom:access Sender must be pending admin\\n * @custom:event Emit NewAdmin with old and new admin\\n */\\n function acceptAdmin() public {\\n require(msg.sender == pendingAdmin, \\\"Timelock::acceptAdmin: Call must come from pendingAdmin.\\\");\\n emit NewAdmin(admin, msg.sender);\\n admin = msg.sender;\\n pendingAdmin = address(0);\\n }\\n\\n /**\\n * @notice Method to propose a new admin authorized to call timelock functions. This should be the Governor Contract\\n * @param pendingAdmin_ Address of the proposed admin\\n * @custom:access Sender must be Timelock contract itself or admin\\n * @custom:event Emit NewPendingAdmin with new pending admin\\n */\\n function setPendingAdmin(address pendingAdmin_) public {\\n require(\\n msg.sender == address(this) || msg.sender == admin,\\n \\\"Timelock::setPendingAdmin: Call must come from Timelock.\\\"\\n );\\n ensureNonzeroAddress(pendingAdmin_);\\n pendingAdmin = pendingAdmin_;\\n\\n emit NewPendingAdmin(pendingAdmin);\\n }\\n\\n /**\\n * @notice Called for each action when queuing a proposal\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Hash of the queued transaction\\n * @custom:access Sender must be admin\\n * @custom:event Emit QueueTransaction\\n */\\n function queueTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes32) {\\n require(msg.sender == admin, \\\"Timelock::queueTransaction: Call must come from admin.\\\");\\n require(\\n eta >= getBlockTimestamp() + delay,\\n \\\"Timelock::queueTransaction: Estimated execution block must satisfy delay.\\\"\\n );\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(!queuedTransactions[txHash], \\\"Timelock::queueTransaction: transaction already queued.\\\");\\n queuedTransactions[txHash] = true;\\n\\n emit QueueTransaction(txHash, target, value, signature, data, eta);\\n return txHash;\\n }\\n\\n /**\\n * @notice Called to cancel a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @custom:access Sender must be admin\\n * @custom:event Emit CancelTransaction\\n */\\n function cancelTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public {\\n require(msg.sender == admin, \\\"Timelock::cancelTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::cancelTransaction: transaction is not queued yet.\\\");\\n delete (queuedTransactions[txHash]);\\n\\n emit CancelTransaction(txHash, target, value, signature, data, eta);\\n }\\n\\n /**\\n * @notice Called to execute a queued transaction\\n * @param target Address of the contract with the method to be called\\n * @param value Native token amount sent with the transaction\\n * @param signature Signature of the function to be called\\n * @param data Arguments to be passed to the function when called\\n * @param eta Timestamp after which the transaction can be executed\\n * @return Result of function call\\n * @custom:access Sender must be admin\\n * @custom:event Emit ExecuteTransaction\\n */\\n function executeTransaction(\\n address target,\\n uint256 value,\\n string calldata signature,\\n bytes calldata data,\\n uint256 eta\\n ) public returns (bytes memory) {\\n require(msg.sender == admin, \\\"Timelock::executeTransaction: Call must come from admin.\\\");\\n\\n bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));\\n require(queuedTransactions[txHash], \\\"Timelock::executeTransaction: Transaction hasn't been queued.\\\");\\n require(getBlockTimestamp() >= eta, \\\"Timelock::executeTransaction: Transaction hasn't surpassed time lock.\\\");\\n require(getBlockTimestamp() <= eta + GRACE_PERIOD(), \\\"Timelock::executeTransaction: Transaction is stale.\\\");\\n\\n delete (queuedTransactions[txHash]);\\n\\n bytes memory callData;\\n\\n if (bytes(signature).length == 0) {\\n callData = data;\\n } else {\\n callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);\\n }\\n\\n // solium-disable-next-line security/no-call-value\\n (bool success, bytes memory returnData) = target.call{ value: value }(callData);\\n require(success, \\\"Timelock::executeTransaction: Transaction execution reverted.\\\");\\n\\n emit ExecuteTransaction(txHash, target, value, signature, data, eta);\\n\\n return returnData;\\n }\\n\\n /**\\n * @notice Returns the current block timestamp\\n * @return The current block timestamp\\n */\\n function getBlockTimestamp() internal view returns (uint256) {\\n // solium-disable-next-line security/no-block-members\\n return block.timestamp;\\n }\\n}\\n\",\"keccak256\":\"0xaf1af48a0bb1ad0391a95270b934bcd30a0326f6e5ba415c581503807e689b45\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
|