Class PayableLimitedSignerValidator

A validator that verifies signatures, limits claims per address, and requires a claim fee. The claim fee is stored on the base implementation and all clones read from it. This allows updating the fee globally by only changing it on the base.

PayableLimitedSignerValidator

Hierarchy (view full)

Constructors

Properties

bases: Record<number, `0x${string}`> = ...

A static property representing a map of stringified chain ID's to the address of the base implementation on chain, used when cloning base contracts.

registryType: RegistryType = RegistryType.VALIDATOR

The target's registry type.

abi: readonly [{
    type: "constructor";
    inputs: readonly [{
        name: "owner_";
        internalType: "address";
        type: "address";
    }, {
        name: "initialClaimFee_";
        internalType: "uint256";
        type: "uint256";
    }];
    stateMutability: "nonpayable";
}, {
    type: "error";
    inputs: readonly [];
    name: "AlreadyInitialized";
}, {
    type: "error";
    inputs: readonly [];
    name: "CloneAlreadyInitialized";
}, {
    type: "error";
    inputs: readonly [];
    name: "FeeTransferFailed";
}, {
    type: "error";
    inputs: readonly [];
    name: "InitializerNotImplemented";
}, {
    type: "error";
    inputs: readonly [];
    name: "InvalidClaimFee";
}, {
    type: "error";
    inputs: readonly [{
        name: "available";
        internalType: "uint8";
        type: "uint8";
    }, {
        name: "id";
        internalType: "uint256";
        type: "uint256";
    }];
    name: "InvalidIncentive";
}, {
    type: "error";
    inputs: readonly [];
    name: "InvalidInitialization";
}, {
    type: "error";
    inputs: readonly [];
    name: "InvalidInitializationData";
}, {
    type: "error";
    inputs: readonly [];
    name: "LengthMismatch";
}, {
    type: "error";
    inputs: readonly [{
        name: "claimant";
        internalType: "address";
        type: "address";
    }];
    name: "MaximumClaimed";
}, {
    type: "error";
    inputs: readonly [];
    name: "NewOwnerIsZeroAddress";
}, {
    type: "error";
    inputs: readonly [];
    name: "NoHandoverRequest";
}, {
    type: "error";
    inputs: readonly [];
    name: "NotInitializing";
}, {
    type: "error";
    inputs: readonly [];
    name: "Unauthorized";
}, {
    type: "error";
    inputs: readonly [];
    name: "Unauthorized";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "claimant";
        internalType: "address";
        type: "address";
        indexed: true;
    }, {
        name: "boostId";
        internalType: "uint256";
        type: "uint256";
        indexed: true;
    }, {
        name: "incentiveId";
        internalType: "uint256";
        type: "uint256";
        indexed: true;
    }, {
        name: "fee";
        internalType: "uint256";
        type: "uint256";
        indexed: false;
    }, {
        name: "feeReceiver";
        internalType: "address";
        type: "address";
        indexed: false;
    }];
    name: "ClaimFeePaid";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "newFee";
        internalType: "uint256";
        type: "uint256";
        indexed: false;
    }];
    name: "ClaimFeeUpdated";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "version";
        internalType: "uint64";
        type: "uint64";
        indexed: false;
    }];
    name: "Initialized";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "pendingOwner";
        internalType: "address";
        type: "address";
        indexed: true;
    }];
    name: "OwnershipHandoverCanceled";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "pendingOwner";
        internalType: "address";
        type: "address";
        indexed: true;
    }];
    name: "OwnershipHandoverRequested";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "oldOwner";
        internalType: "address";
        type: "address";
        indexed: true;
    }, {
        name: "newOwner";
        internalType: "address";
        type: "address";
        indexed: true;
    }];
    name: "OwnershipTransferred";
}, {
    type: "event";
    anonymous: false;
    inputs: readonly [{
        name: "validatorCaller";
        internalType: "address";
        type: "address";
        indexed: false;
    }];
    name: "SignerValidatorInitialized";
}, {
    type: "function";
    inputs: readonly [];
    name: "cancelOwnershipHandover";
    outputs: readonly [];
    stateMutability: "payable";
}, {
    type: "function";
    inputs: readonly [];
    name: "claimFee";
    outputs: readonly [{
        name: "";
        internalType: "uint256";
        type: "uint256";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "pendingOwner";
        internalType: "address";
        type: "address";
    }];
    name: "completeOwnershipHandover";
    outputs: readonly [];
    stateMutability: "payable";
}, {
    type: "function";
    inputs: readonly [];
    name: "eip712Domain";
    outputs: readonly [{
        name: "fields";
        internalType: "bytes1";
        type: "bytes1";
    }, {
        name: "name";
        internalType: "string";
        type: "string";
    }, {
        name: "version";
        internalType: "string";
        type: "string";
    }, {
        name: "chainId";
        internalType: "uint256";
        type: "uint256";
    }, {
        name: "verifyingContract";
        internalType: "address";
        type: "address";
    }, {
        name: "salt";
        internalType: "bytes32";
        type: "bytes32";
    }, {
        name: "extensions";
        internalType: "uint256[]";
        type: "uint256[]";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [];
    name: "getClaimFee";
    outputs: readonly [{
        name: "";
        internalType: "uint256";
        type: "uint256";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [];
    name: "getComponentInterface";
    outputs: readonly [{
        name: "";
        internalType: "bytes4";
        type: "bytes4";
    }];
    stateMutability: "pure";
}, {
    type: "function";
    inputs: readonly [{
        name: "boostId";
        internalType: "uint256";
        type: "uint256";
    }, {
        name: "incentiveId";
        internalType: "uint256";
        type: "uint256";
    }, {
        name: "claimant";
        internalType: "address";
        type: "address";
    }];
    name: "hashClaimantData";
    outputs: readonly [{
        name: "hash";
        internalType: "bytes32";
        type: "bytes32";
    }];
    stateMutability: "pure";
}, {
    type: "function";
    inputs: readonly [{
        name: "boostId";
        internalType: "uint256";
        type: "uint256";
    }, {
        name: "incentiveQuantity";
        internalType: "uint8";
        type: "uint8";
    }, {
        name: "claimant";
        internalType: "address";
        type: "address";
    }, {
        name: "incentiveData";
        internalType: "bytes";
        type: "bytes";
    }];
    name: "hashSignerData";
    outputs: readonly [{
        name: "hashedSignerData";
        internalType: "bytes32";
        type: "bytes32";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "data_";
        internalType: "bytes";
        type: "bytes";
    }];
    name: "initialize";
    outputs: readonly [];
    stateMutability: "nonpayable";
}, {
    type: "function";
    inputs: readonly [];
    name: "maxClaimCount";
    outputs: readonly [{
        name: "";
        internalType: "uint256";
        type: "uint256";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [];
    name: "owner";
    outputs: readonly [{
        name: "result";
        internalType: "address";
        type: "address";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "pendingOwner";
        internalType: "address";
        type: "address";
    }];
    name: "ownershipHandoverExpiresAt";
    outputs: readonly [{
        name: "result";
        internalType: "uint256";
        type: "uint256";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "";
        internalType: "bytes32";
        type: "bytes32";
    }];
    name: "quantityClaimed";
    outputs: readonly [{
        name: "";
        internalType: "uint256";
        type: "uint256";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [];
    name: "renounceOwnership";
    outputs: readonly [];
    stateMutability: "payable";
}, {
    type: "function";
    inputs: readonly [];
    name: "requestOwnershipHandover";
    outputs: readonly [];
    stateMutability: "payable";
}, {
    type: "function";
    inputs: readonly [{
        name: "signers_";
        internalType: "address[]";
        type: "address[]";
    }, {
        name: "authorized_";
        internalType: "bool[]";
        type: "bool[]";
    }];
    name: "setAuthorized";
    outputs: readonly [];
    stateMutability: "nonpayable";
}, {
    type: "function";
    inputs: readonly [{
        name: "newFee";
        internalType: "uint256";
        type: "uint256";
    }];
    name: "setClaimFee";
    outputs: readonly [];
    stateMutability: "nonpayable";
}, {
    type: "function";
    inputs: readonly [{
        name: "newCaller";
        internalType: "address";
        type: "address";
    }];
    name: "setValidatorCaller";
    outputs: readonly [];
    stateMutability: "nonpayable";
}, {
    type: "function";
    inputs: readonly [{
        name: "";
        internalType: "address";
        type: "address";
    }];
    name: "signers";
    outputs: readonly [{
        name: "";
        internalType: "bool";
        type: "bool";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "interfaceId";
        internalType: "bytes4";
        type: "bytes4";
    }];
    name: "supportsInterface";
    outputs: readonly [{
        name: "";
        internalType: "bool";
        type: "bool";
    }];
    stateMutability: "view";
}, {
    type: "function";
    inputs: readonly [{
        name: "newOwner";
        internalType: "address";
        type: "address";
    }];
    name: "transferOwnership";
    outputs: readonly [];
    stateMutability: "payable";
}, {
    type: "function";
    inputs: readonly [{
        name: "boostId";
        internalType: "uint256";
        type: "uint256";
    }, {
        name: "incentiveId";
        internalType: "uint256";
        type: "uint256";
    }, {
        name: "claimant";
        internalType: "address";
        type: "address";
    }, {
        name: "claimData";
        internalType: "bytes";
        type: "bytes";
    }];
    name: "validate";
    outputs: readonly [{
        name: "";
        internalType: "bool";
        type: "bool";
    }];
    stateMutability: "payable";
}] = payableLimitedSignerValidatorAbi
_isBase: boolean = true

A property asserting that the protocol should eiher clone and initialize a new target from the base implementation, or re-use an existing contract without initializing.

The deployable payload used either for contract construction or initialization

_config: Config
_address: undefined | `0x${string}`

The internally managed address for this contract

_account?: Account

If it exists, Viem Local Account, if in a Node environment

Accessors

  • get bases(): Record<number, `0x${string}`>
  • A getter that will return the base implementation's static addresses by numerical chain ID

    Returns Record<number, `0x${string}`>

  • get address(): undefined | `0x${string}`
  • A getter returning this contract's deployed address, if it exists.

    Returns undefined | `0x${string}`

Methods

  • Get the current claim fee. For clones, this reads from the base implementation.

    Parameters

    • Optionalparams: Partial<Omit<ReadContractParameters,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<bigint>

  • Set the claim fee (only callable on the base implementation by the owner)

    Parameters

    • newFee: bigint

      The new claim fee amount in wei

    • Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<void>

  • Set the claim fee (only callable on the base implementation by the owner)

    Parameters

    • newFee: bigint

      The new claim fee amount in wei

    • Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<{
        hash: `0x${string}`;
        result: void;
    }>

  • The set of authorized signers

    Parameters

    • address: `0x${string}`
    • Optionalparams: Partial<Omit<ReadContractParameters,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<boolean>

  • Validate that the action has been completed successfully. Requires exact payment of the claim fee.

    Parameters

    • payload: PayableLimitedSignerValidatorValidatePayload
    • Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<boolean>

    • True if the action has been validated
  • Validate that the action has been completed successfully. Requires exact payment of the claim fee.

    Parameters

    • payload: PayableLimitedSignerValidatorValidatePayload
    • Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<{
        hash: `0x${string}`;
        result: boolean;
    }>

  • Set the authorized status of a signer

    Parameters

    • addresses: `0x${string}`[]

      The list of signers to update

    • allowed: boolean[]

      The authorized status of each signer

    • Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<void>

  • Set the authorized status of a signer

    Parameters

    • addresses: `0x${string}`[]

      The list of signers to update

    • allowed: boolean[]

      The authorized status of each signer

    • Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<{
        hash: `0x${string}`;
        result: void;
    }>

  • Update the authorized caller of the validator function

    Parameters

    • address: `0x${string}`
    • Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<{
        hash: `0x${string}`;
        result: void;
    }>

  • Update the authorized caller of the validator function

    Parameters

    • address: `0x${string}`
    • Optionalparams: Partial<Omit<UnionCompute<UnionStrictOmit<SimulateContractParameters<Abi, string, readonly unknown[], Chain, Chain, (`0x${string}` | Account)>, "chain">> & ChainIdParameter<Config, number> & ConnectorParameter,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<void>

  • Check if the contract supports the given interface

    Parameters

    • interfaceId: `0x${string}`

      The interface identifier

    • Optionalparams: Partial<Omit<ReadContractParameters,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<boolean>

    • True if the contract supports the interface
  • Return a cloneable's unique identifier for downstream consumers to differentiate various targets All implementations must override this function

    Parameters

    • Optionalparams: Partial<Omit<ReadContractParameters,
          | "address"
          | "abi"
          | "functionName"
          | "args">>

    Returns Promise<`0x${string}`>

  • A typed wrapper for (viem.getLogs)[https://viem.sh/docs/actions/public/getLogs#getlogs]. Accepts eventName and eventNames as optional parameters to narrow the returned log types.

    Type Parameters

    • event extends
          | "Initialized"
          | "OwnershipHandoverCanceled"
          | "OwnershipHandoverRequested"
          | "OwnershipTransferred"
          | "SignerValidatorInitialized"
          | "ClaimFeePaid"
          | "ClaimFeeUpdated"
    • const abiEvent extends
          | {
              name: event;
          } & {
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "claimant";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }, {
                  name: "boostId";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: true;
              }, {
                  name: "incentiveId";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: true;
              }, {
                  name: "fee";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: false;
              }, {
                  name: "feeReceiver";
                  internalType: "address";
                  type: "address";
                  indexed: false;
              }];
              name: "ClaimFeePaid";
          }
          | {
              name: event;
          } & {
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "newFee";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: false;
              }];
              name: "ClaimFeeUpdated";
          }
          | {
              name: event;
          } & {
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "version";
                  internalType: "uint64";
                  type: "uint64";
                  indexed: false;
              }];
              name: "Initialized";
          }
          | {
              name: event;
          } & {
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "pendingOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipHandoverCanceled";
          }
          | {
              name: event;
          } & {
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "pendingOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipHandoverRequested";
          }
          | {
              name: event;
          } & {
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "oldOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }, {
                  name: "newOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipTransferred";
          }
          | {
              name: event;
          } & {
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "validatorCaller";
                  internalType: "address";
                  type: "address";
                  indexed: false;
              }];
              name: "SignerValidatorInitialized";
          } =
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "claimant";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }, {
                  name: "boostId";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: true;
              }, {
                  name: "incentiveId";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: true;
              }, {
                  name: "fee";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: false;
              }, {
                  name: "feeReceiver";
                  internalType: "address";
                  type: "address";
                  indexed: false;
              }];
              name: "ClaimFeePaid";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "newFee";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: false;
              }];
              name: "ClaimFeeUpdated";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "version";
                  internalType: "uint64";
                  type: "uint64";
                  indexed: false;
              }];
              name: "Initialized";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "pendingOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipHandoverCanceled";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "pendingOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipHandoverRequested";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "oldOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }, {
                  name: "newOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipTransferred";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "validatorCaller";
                  internalType: "address";
                  type: "address";
                  indexed: false;
              }];
              name: "SignerValidatorInitialized";
          }, {
              name: event;
          }>

    Parameters

    • Optionalparams: Omit<GetLogsParams<readonly [{
          type: "constructor";
          inputs: readonly [{
              name: "owner_";
              internalType: "address";
              type: "address";
          }, {
              name: "initialClaimFee_";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "AlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "FeeTransferFailed";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidClaimFee";
      }, {
          type: "error";
          inputs: readonly [{
              name: "available";
              internalType: "uint8";
              type: "uint8";
          }, {
              name: "id";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "InvalidIncentive";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "LengthMismatch";
      }, {
          type: "error";
          inputs: readonly [{
              name: "claimant";
              internalType: "address";
              type: "address";
          }];
          name: "MaximumClaimed";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NewOwnerIsZeroAddress";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NoHandoverRequest";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "error";
          inputs: readonly [];
          name: "Unauthorized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "Unauthorized";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "claimant";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "boostId";
              internalType: "uint256";
              type: "uint256";
              indexed: true;
          }, {
              name: "incentiveId";
              internalType: "uint256";
              type: "uint256";
              indexed: true;
          }, {
              name: "fee";
              internalType: "uint256";
              type: "uint256";
              indexed: false;
          }, {
              name: "feeReceiver";
              internalType: "address";
              type: "address";
              indexed: false;
          }];
          name: "ClaimFeePaid";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "newFee";
              internalType: "uint256";
              type: "uint256";
              indexed: false;
          }];
          name: "ClaimFeeUpdated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "version";
              internalType: "uint64";
              type: "uint64";
              indexed: false;
          }];
          name: "Initialized";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "pendingOwner";
              internalType: "address";
              type: "address";
              indexed: true;
          }];
          name: "OwnershipHandoverCanceled";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "pendingOwner";
              internalType: "address";
              type: "address";
              indexed: true;
          }];
          name: "OwnershipHandoverRequested";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "oldOwner";
              internalType: "address";
              type: "address";
              indexed: true;
          }, {
              name: "newOwner";
              internalType: "address";
              type: "address";
              indexed: true;
          }];
          name: "OwnershipTransferred";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: "validatorCaller";
              internalType: "address";
              type: "address";
              indexed: false;
          }];
          name: "SignerValidatorInitialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "cancelOwnershipHandover";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "claimFee";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "pendingOwner";
              internalType: "address";
              type: "address";
          }];
          name: "completeOwnershipHandover";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "eip712Domain";
          outputs: readonly [{
              name: "fields";
              internalType: "bytes1";
              type: "bytes1";
          }, {
              name: "name";
              internalType: "string";
              type: "string";
          }, {
              name: "version";
              internalType: "string";
              type: "string";
          }, {
              name: "chainId";
              internalType: "uint256";
              type: "uint256";
          }, {
              name: "verifyingContract";
              internalType: "address";
              type: "address";
          }, {
              name: "salt";
              internalType: "bytes32";
              type: "bytes32";
          }, {
              name: "extensions";
              internalType: "uint256[]";
              type: "uint256[]";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getClaimFee";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: "";
              internalType: "bytes4";
              type: "bytes4";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "boostId";
              internalType: "uint256";
              type: "uint256";
          }, {
              name: "incentiveId";
              internalType: "uint256";
              type: "uint256";
          }, {
              name: "claimant";
              internalType: "address";
              type: "address";
          }];
          name: "hashClaimantData";
          outputs: readonly [{
              name: "hash";
              internalType: "bytes32";
              type: "bytes32";
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: "boostId";
              internalType: "uint256";
              type: "uint256";
          }, {
              name: "incentiveQuantity";
              internalType: "uint8";
              type: "uint8";
          }, {
              name: "claimant";
              internalType: "address";
              type: "address";
          }, {
              name: "incentiveData";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "hashSignerData";
          outputs: readonly [{
              name: "hashedSignerData";
              internalType: "bytes32";
              type: "bytes32";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "data_";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "maxClaimCount";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "owner";
          outputs: readonly [{
              name: "result";
              internalType: "address";
              type: "address";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "pendingOwner";
              internalType: "address";
              type: "address";
          }];
          name: "ownershipHandoverExpiresAt";
          outputs: readonly [{
              name: "result";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "bytes32";
              type: "bytes32";
          }];
          name: "quantityClaimed";
          outputs: readonly [{
              name: "";
              internalType: "uint256";
              type: "uint256";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "renounceOwnership";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "requestOwnershipHandover";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "signers_";
              internalType: "address[]";
              type: "address[]";
          }, {
              name: "authorized_";
              internalType: "bool[]";
              type: "bool[]";
          }];
          name: "setAuthorized";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "newFee";
              internalType: "uint256";
              type: "uint256";
          }];
          name: "setClaimFee";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "newCaller";
              internalType: "address";
              type: "address";
          }];
          name: "setValidatorCaller";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "";
              internalType: "address";
              type: "address";
          }];
          name: "signers";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "interfaceId";
              internalType: "bytes4";
              type: "bytes4";
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: "newOwner";
              internalType: "address";
              type: "address";
          }];
          name: "transferOwnership";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [{
              name: "boostId";
              internalType: "uint256";
              type: "uint256";
          }, {
              name: "incentiveId";
              internalType: "uint256";
              type: "uint256";
          }, {
              name: "claimant";
              internalType: "address";
              type: "address";
          }, {
              name: "claimData";
              internalType: "bytes";
              type: "bytes";
          }];
          name: "validate";
          outputs: readonly [{
              name: "";
              internalType: "bool";
              type: "bool";
          }];
          stateMutability: "payable";
      }], event, abiEvent, abiEvent[]>, "event" | "events"> & {
          eventName?: event;
          eventNames?: event[];
      }

    Returns Promise<GetLogsReturnType<abiEvent, abiEvent[]>>

    const logs = contract.getLogs({ eventName: 'EventName' })
    const logs = contract.getLogs({ eventNames: ['EventName'] })

    @public
    @async
    @template {ContractEvent} event
    @template {ExtractAbiEvent<
    ContractAbi,
    event
    >} [abiEvent=ExtractAbiEvent<ContractAbi, event>]
    @param {?Omit<
    GetLogsParams<ContractAbi, event, abiEvent, abiEvent[]>,
    'event' | 'events'
    > & {
    eventName?: event;
    eventNames?: event[];
    }} [params]
    @returns {Promise<GetLogsReturnType<abiEvent, abiEvent
  • A typed wrapper for wagmi.watchContractEvent

    Type Parameters

    • event extends
          | "Initialized"
          | "OwnershipHandoverCanceled"
          | "OwnershipHandoverRequested"
          | "OwnershipTransferred"
          | "SignerValidatorInitialized"
          | "ClaimFeePaid"
          | "ClaimFeeUpdated"

    Parameters

    • cb: ((log: Log<bigint, number, false,
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "claimant";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }, {
                  name: "boostId";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: true;
              }, {
                  name: "incentiveId";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: true;
              }, {
                  name: "fee";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: false;
              }, {
                  name: "feeReceiver";
                  internalType: "address";
                  type: "address";
                  indexed: false;
              }];
              name: "ClaimFeePaid";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "newFee";
                  internalType: "uint256";
                  type: "uint256";
                  indexed: false;
              }];
              name: "ClaimFeeUpdated";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "version";
                  internalType: "uint64";
                  type: "uint64";
                  indexed: false;
              }];
              name: "Initialized";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "pendingOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipHandoverCanceled";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "pendingOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipHandoverRequested";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "oldOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }, {
                  name: "newOwner";
                  internalType: "address";
                  type: "address";
                  indexed: true;
              }];
              name: "OwnershipTransferred";
          }, {
              name: event;
          }>
          | Extract<{
              type: "event";
              anonymous: false;
              inputs: readonly [{
                  name: "validatorCaller";
                  internalType: "address";
                  type: "address";
                  indexed: false;
              }];
              name: "SignerValidatorInitialized";
          }, {
              name: event;
          }>, true>) => unknown)
        • (log): unknown
        • Parameters

          • log: Log<bigint, number, false,
                | Extract<{
                    type: "event";
                    anonymous: false;
                    inputs: readonly [{
                        name: "claimant";
                        internalType: "address";
                        type: "address";
                        indexed: true;
                    }, {
                        name: "boostId";
                        internalType: "uint256";
                        type: "uint256";
                        indexed: true;
                    }, {
                        name: "incentiveId";
                        internalType: "uint256";
                        type: "uint256";
                        indexed: true;
                    }, {
                        name: "fee";
                        internalType: "uint256";
                        type: "uint256";
                        indexed: false;
                    }, {
                        name: "feeReceiver";
                        internalType: "address";
                        type: "address";
                        indexed: false;
                    }];
                    name: "ClaimFeePaid";
                }, {
                    name: event;
                }>
                | Extract<{
                    type: "event";
                    anonymous: false;
                    inputs: readonly [{
                        name: "newFee";
                        internalType: "uint256";
                        type: "uint256";
                        indexed: false;
                    }];
                    name: "ClaimFeeUpdated";
                }, {
                    name: event;
                }>
                | Extract<{
                    type: "event";
                    anonymous: false;
                    inputs: readonly [{
                        name: "version";
                        internalType: "uint64";
                        type: "uint64";
                        indexed: false;
                    }];
                    name: "Initialized";
                }, {
                    name: event;
                }>
                | Extract<{
                    type: "event";
                    anonymous: false;
                    inputs: readonly [{
                        name: "pendingOwner";
                        internalType: "address";
                        type: "address";
                        indexed: true;
                    }];
                    name: "OwnershipHandoverCanceled";
                }, {
                    name: event;
                }>
                | Extract<{
                    type: "event";
                    anonymous: false;
                    inputs: readonly [{
                        name: "pendingOwner";
                        internalType: "address";
                        type: "address";
                        indexed: true;
                    }];
                    name: "OwnershipHandoverRequested";
                }, {
                    name: event;
                }>
                | Extract<{
                    type: "event";
                    anonymous: false;
                    inputs: readonly [{
                        name: "oldOwner";
                        internalType: "address";
                        type: "address";
                        indexed: true;
                    }, {
                        name: "newOwner";
                        internalType: "address";
                        type: "address";
                        indexed: true;
                    }];
                    name: "OwnershipTransferred";
                }, {
                    name: event;
                }>
                | Extract<{
                    type: "event";
                    anonymous: false;
                    inputs: readonly [{
                        name: "validatorCaller";
                        internalType: "address";
                        type: "address";
                        indexed: false;
                    }];
                    name: "SignerValidatorInitialized";
                }, {
                    name: event;
                }>, true>

          Returns unknown

    • Optionalparams: Partial<Omit<UnionCompute<WatchContractEventParameters<readonly [{
          type: "constructor";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "nonpayable";
      }, {
          type: "error";
          inputs: readonly [];
          name: "AlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "CloneAlreadyInitialized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "FeeTransferFailed";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InitializerNotImplemented";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidClaimFee";
      }, {
          type: "error";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "InvalidIncentive";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitialization";
      }, {
          type: "error";
          inputs: readonly [];
          name: "InvalidInitializationData";
      }, {
          type: "error";
          inputs: readonly [];
          name: "LengthMismatch";
      }, {
          type: "error";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "MaximumClaimed";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NewOwnerIsZeroAddress";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NoHandoverRequest";
      }, {
          type: "error";
          inputs: readonly [];
          name: "NotInitializing";
      }, {
          type: "error";
          inputs: readonly [];
          name: "Unauthorized";
      }, {
          type: "error";
          inputs: readonly [];
          name: "Unauthorized";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "ClaimFeePaid";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "ClaimFeeUpdated";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "Initialized";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "OwnershipHandoverCanceled";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "OwnershipHandoverRequested";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "OwnershipTransferred";
      }, {
          type: "event";
          anonymous: false;
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
              indexed: ...;
          }];
          name: "SignerValidatorInitialized";
      }, {
          type: "function";
          inputs: readonly [];
          name: "cancelOwnershipHandover";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "claimFee";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "completeOwnershipHandover";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "eip712Domain";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getClaimFee";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "getComponentInterface";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "hashClaimantData";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "pure";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "hashSignerData";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "initialize";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "maxClaimCount";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "owner";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "ownershipHandoverExpiresAt";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "quantityClaimed";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [];
          name: "renounceOwnership";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [];
          name: "requestOwnershipHandover";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "setAuthorized";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "setClaimFee";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "setValidatorCaller";
          outputs: readonly [];
          stateMutability: "nonpayable";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "signers";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "supportsInterface";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "view";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "transferOwnership";
          outputs: readonly [];
          stateMutability: "payable";
      }, {
          type: "function";
          inputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }, {
              name: ...;
              internalType: ...;
              type: ...;
          }];
          name: "validate";
          outputs: readonly [{
              name: ...;
              internalType: ...;
              type: ...;
          }];
          stateMutability: "payable";
      }], event, undefined, WebSocketTransport> & ChainIdParameter<Config, number> & SyncConnectedChainParameter>, "address" | "abi">> & {
          eventName?: event;
      }

    Returns (() => void)

      • (): void
      • Returns void

  • Protected

    Internal function to attach the connected account to write methods to avoid manually passing in an account each call.

    Parameters

    • Optionalaccount: Account

    Returns {
        account: Account;
    } | {
        account: undefined;
    }