Module RewardClaimPrototypeMock

Source
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 and xxReturn 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§

InvalidProofLength
Custom error with signature InvalidProofLength() and selector 0x4dc5f6a4.
RewardClaimPrototypeMockInstance
A RewardClaimPrototypeMock instance.
verifyRewardClaimCall
Function with signature verifyRewardClaim(bytes32,address,uint256,(bytes32[])) and selector 0x4c6d20d2.
verifyRewardClaimReturn
Container type for the return parameters of the verifyRewardClaim(bytes32,address,uint256,(bytes32[])) function.

Enums§

RewardClaimPrototypeMockCalls
Container for all the RewardClaimPrototypeMock function calls.
RewardClaimPrototypeMockErrors
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 given provider and constructor arguments, if any.
new
Creates a new wrapper around an on-chain RewardClaimPrototypeMock contract instance.