Expand description
§What to re-export, what to hide?
- export contract struct itself, but try to avoid export instance type (instead, use ::new() to get a handle)
- avoid exporting
xxCallandxxReturntypes, they usually can be converted/transmuted from existing struct - Event types should be exported
- structs should be exported and renamed with
xxSolsuffix to avoid confusion with other rust types- see module doc for more explanation on types duplication issue in alloy
Generated by the following Solidity interface…
interface AccessControlUpgradeable {
error AccessControlBadConfirmation();
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
error InvalidInitialization();
error NotInitializing();
event Initialized(uint64 version);
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function DEFAULT_ADMIN_ROLE() external view returns (bytes32);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function grantRole(bytes32 role, address account) external;
function hasRole(bytes32 role, address account) external view returns (bool);
function renounceRole(bytes32 role, address callerConfirmation) external;
function revokeRole(bytes32 role, address account) external;
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}…which was generated by the following JSON ABI:
[
{
"type": "function",
"name": "DEFAULT_ADMIN_ROLE",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getRoleAdmin",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "grantRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "hasRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "callerConfirmation",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "revokeRole",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "supportsInterface",
"inputs": [
{
"name": "interfaceId",
"type": "bytes4",
"internalType": "bytes4"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleAdminChanged",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "previousAdminRole",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "newAdminRole",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleGranted",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "RoleRevoked",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AccessControlBadConfirmation",
"inputs": []
},
{
"type": "error",
"name": "AccessControlUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "neededRole",
"type": "bytes32",
"internalType": "bytes32"
}
]
},
{
"type": "error",
"name": "InvalidInitialization",
"inputs": []
},
{
"type": "error",
"name": "NotInitializing",
"inputs": []
}
]Structs§
- Access
Control BadConfirmation - Custom error with signature
AccessControlBadConfirmation()and selector0x6697b232. - Access
Control Unauthorized Account - Custom error with signature
AccessControlUnauthorizedAccount(address,bytes32)and selector0xe2517d3f. - Access
Control Upgradeable Instance - A
AccessControlUpgradeableinstance. - DEFAULT_
ADMIN_ ROLE Call - Function with signature
DEFAULT_ADMIN_ROLE()and selector0xa217fddf. - DEFAULT_
ADMIN_ ROLE Return - Container type for the return parameters of the
DEFAULT_ADMIN_ROLE()function. - Initialized
- Event with signature
Initialized(uint64)and selector0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. - Invalid
Initialization - Custom error with signature
InvalidInitialization()and selector0xf92ee8a9. - NotInitializing
- Custom error with signature
NotInitializing()and selector0xd7e6bcf8. - Role
Admin Changed - Event with signature
RoleAdminChanged(bytes32,bytes32,bytes32)and selector0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. - Role
Granted - Event with signature
RoleGranted(bytes32,address,address)and selector0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. - Role
Revoked - Event with signature
RoleRevoked(bytes32,address,address)and selector0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. - getRole
Admin Call - Function with signature
getRoleAdmin(bytes32)and selector0x248a9ca3. - getRole
Admin Return - Container type for the return parameters of the
getRoleAdmin(bytes32)function. - grant
Role Call - Function with signature
grantRole(bytes32,address)and selector0x2f2ff15d. - grant
Role Return - Container type for the return parameters of the
grantRole(bytes32,address)function. - hasRole
Call - Function with signature
hasRole(bytes32,address)and selector0x91d14854. - hasRole
Return - Container type for the return parameters of the
hasRole(bytes32,address)function. - renounce
Role Call - Function with signature
renounceRole(bytes32,address)and selector0x36568abe. - renounce
Role Return - Container type for the return parameters of the
renounceRole(bytes32,address)function. - revoke
Role Call - Function with signature
revokeRole(bytes32,address)and selector0xd547741f. - revoke
Role Return - Container type for the return parameters of the
revokeRole(bytes32,address)function. - supports
Interface Call - Function with signature
supportsInterface(bytes4)and selector0x01ffc9a7. - supports
Interface Return - Container type for the return parameters of the
supportsInterface(bytes4)function.
Enums§
- Access
Control Upgradeable Calls - Container for all the
AccessControlUpgradeablefunction calls. - Access
Control Upgradeable Errors - Container for all the
AccessControlUpgradeablecustom errors. - Access
Control Upgradeable Events - Container for all the
AccessControlUpgradeableevents.
Statics§
- BYTECODE
- The creation / init bytecode of the contract.
- DEPLOYED_
BYTECODE - The runtime bytecode of the contract, as deployed on the network.
Functions§
- deploy
- Deploys this contract using the given
providerand constructor arguments, if any. - deploy_
builder - Creates a
RawCallBuilderfor deploying this contract using the givenproviderand constructor arguments, if any. - new
- Creates a new wrapper around an on-chain
AccessControlUpgradeablecontract instance.