UpgradeExecutor
Arbitrum One0x3d745b8815f9be5bf053858165f8ab1f58c77932
Solidity v0.8.16+commit.07a7930e
🤖
Query this contract from your AI
Reference:
0x3d745b8815f9be5bf053858165f8ab1f58c77932
Sample prompt:
“Tell me the current state of arbitrum/0x3d745b8815f9be5bf053858165f8ab1f58c77932”
No AI wired up yet? →
mcp.smarts.md
Admin & Risk
Who can change the rules?
Detected role based controls from the verified ABI.
Role Based
Overview
Read Functions
6
Write Functions
6
Events
6
Read Functions
Block #25,170,236 · just now
ADMIN_ROLE()
view
→ 0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 |
DEFAULT_ADMIN_ROLE()
view
→ 0x0000000000000000000000000000000000000000000000000000000000000000
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 |
EXECUTOR_ROLE()
view
→ 0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 |
getRoleAdmin(role: bytes32)
view
dev: Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
| Name | Type | Description |
|---|---|---|
| role | bytes32 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 |
hasRole(role: bytes32, account: address)
view
dev: Returns `true` if `account` has been granted `role`.
Parameters
| Name | Type | Description |
|---|---|---|
| role | bytes32 | |
| account | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
supportsInterface(interfaceId: bytes4)
view
dev: See {IERC165-supportsInterface}.
Parameters
| Name | Type | Description |
|---|---|---|
| interfaceId | bytes4 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Write Functions
execute(upgrade: address, upgradeCallData: bytes)
payable
Execute an upgrade by delegate calling an upgrade contract
dev: Only executor can call this. Since we're using a delegatecall here the Upgrade contract will have access to the state of this contract - including the roles. Only upgrade contracts that do not touch local state should be used.
Parameters
| Name | Type | Description |
|---|---|---|
| upgrade | address | |
| upgradeCallData | bytes |
executeCall(target: address, targetCallData: bytes)
payable
Execute an upgrade by directly calling target contract
dev: Only executor can call this.
Parameters
| Name | Type | Description |
|---|---|---|
| target | address | |
| targetCallData | bytes |
grantRole(role: bytes32, account: address)
nonpayable
dev: 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.
Parameters
| Name | Type | Description |
|---|---|---|
| role | bytes32 | |
| account | address |
initialize(admin: address, executors: address[])
nonpayable
Initialise the upgrade executor
Parameters
| Name | Type | Description |
|---|---|---|
| admin | address | The admin who can update other roles, and itself - ADMIN_ROLE |
| executors | address[] | Can call the execute function - EXECUTOR_ROLE |
renounceRole(role: bytes32, account: address)
nonpayable
dev: 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.
Parameters
| Name | Type | Description |
|---|---|---|
| role | bytes32 | |
| account | address |
revokeRole(role: bytes32, account: address)
nonpayable
dev: 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.
Parameters
| Name | Type | Description |
|---|---|---|
| role | bytes32 | |
| account | address |
Events
Initialized(version: uint8)
| Name | Type | Indexed | Description |
|---|---|---|---|
| version | uint8 |
RoleAdminChanged(role: bytes32, previousAdminRole: bytes32, newAdminRole: bytes32)
| Name | Type | Indexed | Description |
|---|---|---|---|
| role | bytes32 | ✓ | |
| previousAdminRole | bytes32 | ✓ | |
| newAdminRole | bytes32 | ✓ |
RoleGranted(role: bytes32, account: address, sender: address)
| Name | Type | Indexed | Description |
|---|---|---|---|
| role | bytes32 | ✓ | |
| account | address | ✓ | |
| sender | address | ✓ |
RoleRevoked(role: bytes32, account: address, sender: address)
| Name | Type | Indexed | Description |
|---|---|---|---|
| role | bytes32 | ✓ | |
| account | address | ✓ | |
| sender | address | ✓ |
TargetCallExecuted(target: address, value: uint256, data: bytes)
Emitted when target call occurs
| Name | Type | Indexed | Description |
|---|---|---|---|
| target | address | ✓ | |
| value | uint256 | ||
| data | bytes |
UpgradeExecuted(upgrade: address, value: uint256, data: bytes)
Emitted when an upgrade execution occurs
| Name | Type | Indexed | Description |
|---|---|---|---|
| upgrade | address | ✓ | |
| value | uint256 | ||
| data | bytes |