Events For Indexer
The GrantPicks (Rounds) contract utilizes events to notify external systems about significant actions that occur within the contract. These events are crucial for maintaining transparency and enabling real-time updates on the state of funding rounds, applications, votes, deposits, and payouts.
Round Events
1. Log Create Round Event
Purpose: This event is emitted when a new funding round is created.
Parameters:
env
: The environment context for executing the event.round_detail
: ARoundDetail
object containing information about the newly created round.
2. Log Update Round Event
Purpose: This event is emitted when an existing funding round is updated.
Parameters:
env
: The environment context for executing the event.round_detail
: ARoundDetail
object containing updated information about the round.
Application Events
3. Log Create Application Event
Purpose: This event is emitted when a new application is submitted for a funding round.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round to which the application belongs.application
: ARoundApplication
object containing details of the submitted application.
4. Log Update Application Event
Purpose: This event is emitted when an existing application is updated.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round associated with the application.application
: ARoundApplication
object containing updated details of the application.updated_by
: The address of the user who made the update.
5. Log Delete Application Event
Purpose: This event is emitted when an application is deleted from a funding round.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round from which the application was deleted.application
: ARoundApplication
object representing the deleted application.
Deposit Events
6. Log Create Deposit Event
Purpose: This event is emitted when a deposit is made to a funding round.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round receiving the deposit.data
: ADeposit
object containing details of the deposit made.
Vote Events
7. Log Create Vote Event
Purpose: This event is emitted when a vote is cast in a funding round.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round in which voting took place.result
: AVotingResult
object containing details of the vote cast.
Payout Events
8. Log Create Payout Event
Purpose: This event is emitted when a payout is processed for approved projects in a funding round.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round associated with the payout.address
: The recipient's address who will receive the payout.amount
: The amount being paid out.
Update Approved Projects Events
9. Log Update Approved Projects Event
Purpose: This event is emitted when approved projects are updated in a funding round.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round where projects were approved or updated.project_ids
: A vector containing IDs of projects that have been approved or modified.
Update Whitelist Events
10. Log Update Whitelist Event
Purpose: This event is emitted when a user is added to or removed from the whitelist for voting in a funding round.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round associated with whitelisting changes.address
: The address of the user being added or removed from the whitelist.is_add
: Boolean indicating whether this action adds (true
) or removes (false
) the user from the whitelist.
Update Blacklist/Flag Events
11. Log Update User Flag Event
Purpose: This event is emitted when a user is flagged or unflagged in a funding round.
Parameters:
env
: The environment context for executing the event.round_id
: The unique identifier of the round where user flagging occurs.address
: The address of the user being flagged or unflagged.is_flag
: Boolean indicating whether this action flags (true
) or unflags (false
) the user.
Last updated
Was this helpful?