Claiming Hats
Hats can be made claimable by using the Multi Claims Hatter module.
The following functions support the claiming functionality enabled by this module.
accountCanClaim
Check whether an account can claim a given hat.
Arguments:
hatId
- The hat ID to claim.account
- The claiming account's address.
Response:
true
if can claim, false
otherwise.
canClaimForAccount
Check whether a hat can be claimed on behalf of a given account.
Arguments:
hatId
- The hat ID to claim-for.account
- The account address to claim on behalf of.
Response:
true
if can claim-for, false
otherwise.
claimHat
Claim a hat for the calling account.
Arguments:
account
- Viem account (Address for JSON-RPC accounts or Account for other types).hatId
- ID of the hat to claim.
Response:
status
- "success" if transaction was successful, "reverted" if transaction reverted.transactionHash
- transaction's hash.
claimHatFor
Claim a hat on behalf of a chosen account.
Arguments:
account
- Viem account (Address for JSON-RPC accounts or Account for other types).hatId
- ID of the hat to claim-for.wearer
- Address for which to claim the hat for.
Response:
status
- "success" if transaction was successful, "reverted" if transaction reverted.transactionHash
- transaction's hash.
multiClaimHatFor
Claim a hat on behalf of multiple accounts.
Arguments:
account
- Viem account (Address for JSON-RPC accounts or Account for other types).hatId
- ID of the hat to claim-for.wearers
- Addresses for which to claim the hat for.
Response:
status
- "success" if transaction was successful, "reverted" if transaction reverted.transactionHash
- transaction's hash.
Last updated