Learn how to reward users with ERC20 rewards when they mint an NFT on Zora.
Purchased
event,
which has the event signature Purchased(address indexed,address indexed,uint256 indexed,uint256,uint256)
.
'Purchased' Event Structure. We reference the event arguments using zero-based indexing. The third argument represents the tokenId, which corresponds to index 2.
Purchased
event.
The important parameters to target in the event data are the tokenId and the NFT contract address.
eventAction
payload consists of the actionClaimant
and the actionSteps
we defined previously.
The purpose of the eventAction
is to track and reward users based on their interactions with the specified event.
signatureType
: Specifies that the signature type is an event.signature
: The event signature we are targeting, in this case, the Purchased
event.fieldIndex
: Indicates which field in the event data we are interested in; We can target any field that contains the claimants address.targetContract
: The address of the contract we are monitoring for the event.eventActionStep
.
EventAction
, passing in the constructed eventActionPayload
.
ERC20Incentive
is a fixed reward incentive. If you would like to have a variable reward based on on-chain logic, you can use the ERC20VariableCriteriaIncentive
type./signatures
api endpoint with the following params:
boostId
: The id of the boost where the action was completed. The format is chainId:boostId
(e.g. 8453:0x378632819f39c74c4f56b1429e760739c5fb51b7:12
)txHash
: The hash of the transaction that completed the action.maxParticipants
set for the boost is reached.