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…
library RewardMerkleTreeVerifier {
struct AccruedRewardsProof {
bytes32[] siblings;
}
}
interface RewardClaimPrototypeMock {
error InvalidProofLength();
function verifyRewardClaim(bytes32 root, address account, uint256 amount, RewardMerkleTreeVerifier.AccruedRewardsProof memory proof) external pure returns (bool);
}
…which was generated by the following JSON ABI:
[
{
"type": "function",
"name": "verifyRewardClaim",
"inputs": [
{
"name": "root",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "proof",
"type": "tuple",
"internalType": "struct RewardMerkleTreeVerifier.AccruedRewardsProof",
"components": [
{
"name": "siblings",
"type": "bytes32[]",
"internalType": "bytes32[]"
}
]
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "pure"
},
{
"type": "error",
"name": "InvalidProofLength",
"inputs": []
}
]
Structs§
- Invalid
Proof Length - Custom error with signature
InvalidProofLength()
and selector0x4dc5f6a4
. - Reward
Claim Prototype Mock Instance - A
RewardClaimPrototypeMock
instance. - verify
Reward Claim Call - Function with signature
verifyRewardClaim(bytes32,address,uint256,(bytes32[]))
and selector0x4c6d20d2
. - verify
Reward Claim Return - Container type for the return parameters of the
verifyRewardClaim(bytes32,address,uint256,(bytes32[]))
function.
Enums§
- Reward
Claim Prototype Mock Calls - Container for all the
RewardClaimPrototypeMock
function calls. - Reward
Claim Prototype Mock Errors - Container for all the
RewardClaimPrototypeMock
custom errors.
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
RewardClaimPrototypeMock
contract instance.