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 ERC1967Proxy {
error AddressEmptyCode(address target);
error ERC1967InvalidImplementation(address implementation);
error ERC1967NonPayable();
error FailedInnerCall();
event Upgraded(address indexed implementation);
constructor(address implementation, bytes _data) payable;
fallback() external payable;
}
…which was generated by the following JSON ABI:
[
{
"type": "constructor",
"inputs": [
{
"name": "implementation",
"type": "address",
"internalType": "address"
},
{
"name": "_data",
"type": "bytes",
"internalType": "bytes"
}
],
"stateMutability": "payable"
},
{
"type": "fallback",
"stateMutability": "payable"
},
{
"type": "event",
"name": "Upgraded",
"inputs": [
{
"name": "implementation",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AddressEmptyCode",
"inputs": [
{
"name": "target",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC1967InvalidImplementation",
"inputs": [
{
"name": "implementation",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC1967NonPayable",
"inputs": []
},
{
"type": "error",
"name": "FailedInnerCall",
"inputs": []
}
]
Structs§
- Address
Empty Code - Custom error with signature
AddressEmptyCode(address)
and selector0x9996b315
.solidity error AddressEmptyCode(address target);
- ERC1967
Invalid Implementation - Custom error with signature
ERC1967InvalidImplementation(address)
and selector0x4c9c8ce3
.solidity error ERC1967InvalidImplementation(address implementation);
- ERC1967
NonPayable - Custom error with signature
ERC1967NonPayable()
and selector0xb398979f
.solidity error ERC1967NonPayable();
- ERC1967
Proxy Instance - A
ERC1967Proxy
instance. - Failed
Inner Call - Custom error with signature
FailedInnerCall()
and selector0x1425ea42
.solidity error FailedInnerCall();
- Upgraded
- Event with signature
Upgraded(address)
and selector0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b
.solidity event Upgraded(address indexed implementation);
- constructor
Call - Constructor`.
solidity constructor(address implementation, bytes _data) payable;
Enums§
- ERC1967
Proxy Errors - Container for all the
ERC1967Proxy
custom errors. - ERC1967
Proxy Events - Container for all the
ERC1967Proxy
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
ERC1967Proxy
contract instance.