Claiming Hats
Last updated
Last updated
Hats can be made claimable by using the module.
The following functions support the claiming functionality enabled by this module.
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.
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.
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.
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.
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.