BIMOAccessRegistry
0xa64bc831dca641b49682f584c66d6c9dd71260af
Verification
Verified
v0.8.24+commit.e11b9ed9
Type
Contract
1,653 bytes
ABI entries
14
4 read · 3 write
License
none
Contract information
- Address
- 0xa64bc831dca641b49682f584c66d6c9dd71260af
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.24+commit.e11b9ed9
- Optimization
- Enabled
- Creator
- 0xBD556B6244…EE291dF893
- Creation tx
- 0x86e90a38d5…b2ccb9c72f
Token
Not a token
This contract does not expose ERC-20 metadata.
Read contract (4)
coordinator() → address
deployer() → address
executor() → address
governance() → address
Events (3)
CoordinatorConfiguredExecutorChangedExecutorDisabled
ABI
[
{
"inputs": [
{
"internalType": "address",
"name": "governance_",
"type": "address"
},
{
"internalType": "address",
"name": "deployer_",
"type": "address"
},
{
"internalType": "address",
"name": "executor_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AlreadyConfigured",
"type": "error"
},
{
"inputs": [],
"name": "InvalidExecutor",
"type": "error"
},
{
"inputs": [],
"name": "Unauthorized",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "coordinator",
"type": "address"
}
],
"name": "CoordinatorConfigured",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldExecutor",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newExecutor",
"type": "address"
}
],
"name": "ExecutorChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "oldExecutor",
"type": "address"
}
],
"name": "ExecutorDisabled",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "coordinator_",
"type": "address"
}
],
"name": "configureCoordinator",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "coordinator",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "deployer",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "disableExecutor",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "executor",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "governance",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newExecutor",
"type": "address"
}
],
"name": "setExecutor",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/// @notice Immutable governance identity and mutable executor state, isolated from the Coordinator.
contract BIMOAccessRegistry {
address public immutable governance;
address public immutable deployer;
address public executor;
address public coordinator;
error Unauthorized();
error InvalidExecutor();
error AlreadyConfigured();
event ExecutorDisabled(address indexed oldExecutor);
event ExecutorChanged(address indexed oldExecutor, address indexed newExecutor);
event CoordinatorConfigured(address indexed coordinator);
modifier onlyGovernanceOrCoordinator() {
if (msg.sender != governance && msg.sender != coordinator) revert Unauthorized();
_;
}
constructor(address governance_, address deployer_, address executor_) {
if (governance_ == address(0) || deployer_ == address(0)) revert InvalidExecutor();
governance = governance_;
deployer = deployer_;
_validateExecutor(executor_);
executor = executor_;
}
function configureCoordinator(address coordinator_) external {
if (msg.sender != deployer) revert Unauthorized();
if (coordinator != address(0) || coordinator_ == address(0) || coordinator_.code.length == 0) {
revert AlreadyConfigured();
}
coordinator = coordinator_;
emit CoordinatorConfigured(coordinator_);
}
function setExecutor(address newExecutor) external onlyGovernanceOrCoordinator {
_validateExecutor(newExecutor);
address previous = executor;
executor = newExecutor;
emit ExecutorChanged(previous, newExecutor);
}
function disableExecutor() external onlyGovernanceOrCoordinator {
address previous = executor;
executor = address(0);
emit ExecutorDisabled(previous);
}
function _validateExecutor(address account) private view {
if (account == address(0) || account == governance || account == deployer || account.code.length != 0)
{
revert InvalidExecutor();
}
}
}
Chain explorer2500msChain node98ms