Trigger Functions
Some functions can only be called by whitelisted accounts that trigger actions
setPubId();
actionId
uint256
Action ID returned by fundAction()
pubId
string
A string that identifies a publication in a social graph. Prefixes are used to uniquely identify publication from different social graphs, like "lens-0x01a2ee-0x09"
actionName
string
Action names are "mirror", "like", "comment", "post", "follow", "collect", and so on.
This function is used to bound the settings stored in an Action ID with a corresponding publication ID and an "action name". An Action ID is returned each time a fundAction() is executed.
processAction();
pubId
string
The string that identifies a publication in a social graph.
action
string[]
An array of actions that were engaged and areprocessed. Action names are "mirror", "like", "comment", "post", "follow", "collect", and so on.
user
address[]
A correlating array of the users addresses that engaged with the actions input.
variableCount
uint256[]
An array of arbitrary values used as filters for the action being processed.
Triggers will call this function after reading engagements on wav3s posts with the information of the zurfers that engaged. If the user fill the requiremets the reward will be transfered to them. If the action being processed is a raffle, then the function will store the valid zurfers waiting to the executiong of the raffle.
An event is emitted each time an action in processed with the user address and the pubId of the post.
If the budget of the publication is over after the processing of the action, an "Action Finished" event is emitted
executeRaffle();
pubId
string
The string that identifies a publication in a social graph.
actionName
string
Action names are "mirror", "like", "comment", "post", "follow", "collect", and so on.
With both pubId and actionName, the trigger can command the execution of a Raffle related to both inputs. The raffle will only succed if the "raffle duration" time has passed, and at least there is enough amount of zurfers in the list as rewards has the raffle.
When a prize of the raffle is paid, an event is emitted:
If the prizes are over, an Action Prize Finished event is emitted:
getWinners();
pubId
string
The string that identifies a publication in a social graph.
actionName
string
Action names are "mirror", "like", "comment", "post", "follow", "collect", and so on.
By calling getWinners() with a specified pubId and actionName, if the action was a raffle, the function will return an array containing all the addresses of the winners of the raffle.
Last updated