UpgradeExecutor

Arbitrum One Browse chains

0x3d745b8815f9be5bf053858165f8ab1f58c77932

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 · Browse chains

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,287,923 · just now
ADMIN_ROLE() view → 0xa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775

Get the bytes32 identifier for the contract's admin role.✨ AI

Returns

Name Type Description
bytes32 The bytes32 identifier used to represent the ADMIN_ROLE.✨ AI
DEFAULT_ADMIN_ROLE() view → 0x0000000000000000000000000000000000000000000000000000000000000000

Returns the bytes32 identifier for the contract's default admin role.✨ AI

Returns

Name Type Description
bytes32 The bytes32 role identifier representing the contract's DEFAULT_ADMIN_ROLE.✨ AI
EXECUTOR_ROLE() view → 0xd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63

Returns the bytes32 identifier for the contract's executor role.✨ AI

Returns

Name Type Description
bytes32 Bytes32 role identifier used by the access-control system to represent the executor role.✨ AI
getRoleAdmin(role: bytes32) view

Returns the admin role that controls the given role.✨ AI

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 Role identifier to query, provided as a bytes32 value.✨ AI

Returns

Name Type Description
bytes32 Admin role identifier (bytes32) that controls the specified role.✨ AI
hasRole(role: bytes32, account: address) view

Checks whether an account holds a specific role in the UpgradeExecutor contract.✨ AI

dev: Returns `true` if `account` has been granted `role`.

Parameters

Name Type Description
role bytes32 Role identifier (bytes32) to check.✨ AI
account address Address of the account to query.✨ AI

Returns

Name Type Description
bool True if the account has the specified role; otherwise false.✨ AI
supportsInterface(interfaceId: bytes4) view

Checks whether the contract implements the interface identified by interfaceId.✨ AI

dev: See {IERC165-supportsInterface}.

Parameters

Name Type Description
interfaceId bytes4 The ERC-165 interface identifier to query.✨ AI

Returns

Name Type Description
bool True if the contract implements the specified interfaceId according to ERC-165; otherwise false.✨ AI

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

Grants the specified role to the given account, enabling it to perform role-restricted operations.✨ AI

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 Role identifier to assign (bytes32 role hash).✨ AI
account address Account address that will receive the role.✨ AI
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

Renounce a previously granted role for a specific account.✨ AI

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 The role identifier to renounce (bytes32).✨ AI
account address The account address that will lose the role.✨ AI
revokeRole(role: bytes32, account: address) nonpayable

Revokes a role from an account.✨ AI

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 Role identifier to revoke, provided as a bytes32 value.✨ AI
account address Address of the account that will lose the role.✨ AI

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