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
xxCall
andxxReturn
types, they usually can be converted/transmuted from existing struct - Event types should be exported
- structs should be exported and renamed with
xxSol
suffix 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 OwnableUpgradeable {
error InvalidInitialization();
error NotInitializing();
error OwnableInvalidOwner(address owner);
error OwnableUnauthorizedAccount(address account);
event Initialized(uint64 version);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function owner() external view returns (address);
function renounceOwnership() external;
function transferOwnership(address newOwner) external;
}
…which was generated by the following JSON ABI:
[
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "InvalidInitialization",
"inputs": []
},
{
"type": "error",
"name": "NotInitializing",
"inputs": []
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
}
]
Structs§
- 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
. - Ownable
Invalid Owner - Custom error with signature
OwnableInvalidOwner(address)
and selector0x1e4fbdf7
. - Ownable
Unauthorized Account - Custom error with signature
OwnableUnauthorizedAccount(address)
and selector0x118cdaa7
. - Ownable
Upgradeable Instance - A
OwnableUpgradeable
instance. - Ownership
Transferred - Event with signature
OwnershipTransferred(address,address)
and selector0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0
. - owner
Call - Function with signature
owner()
and selector0x8da5cb5b
. - owner
Return - Container type for the return parameters of the
owner()
function. - renounce
Ownership Call - Function with signature
renounceOwnership()
and selector0x715018a6
. - renounce
Ownership Return - Container type for the return parameters of the
renounceOwnership()
function. - transfer
Ownership Call - Function with signature
transferOwnership(address)
and selector0xf2fde38b
. - transfer
Ownership Return - Container type for the return parameters of the
transferOwnership(address)
function.
Enums§
- Ownable
Upgradeable Calls - Container for all the
OwnableUpgradeable
function calls. - Ownable
Upgradeable Errors - Container for all the
OwnableUpgradeable
custom errors. - Ownable
Upgradeable Events - Container for all the
OwnableUpgradeable
events.
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
provider
and constructor arguments, if any. - deploy_
builder - Creates a
RawCallBuilder
for deploying this contract using the givenprovider
and constructor arguments, if any. - new
- Creates a new wrapper around an on-chain
OwnableUpgradeable
contract instance.