Round & Vote Methods
The Rounds contract includes several methods that facilitate the management of funding rounds and the voting process. Below is a detailed overview of these methods:
1. Set Cooldown Configuration
Purpose: This method configures the cooldown period for a specific funding round, which is the time required before a new round can be initiated after the current one ends.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being configured.caller
: The address of the user making the request.cooldown_period_ms
: Optional parameter specifying the cooldown duration in milliseconds.
Returns: A
RoundDetail
object containing updated information about the round.
2. Set Compliance Configuration
Purpose: This method sets compliance requirements for a funding round, including any necessary documentation or checks that must be completed.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being configured.caller
: The address of the user making the request.compliance_req_desc
: Optional description of compliance requirements.compliance_period_ms
: Optional duration for which compliance must be maintained.
Returns: A
RoundDetail
object with updated compliance settings.
3. Set Redistribution Configuration
Purpose: This method configures whether remaining funds from a round can be redistributed and specifies where those funds should be sent.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being configured.caller
: The address of the user making the request.allow_remaining_dist
: Boolean indicating if redistribution is allowed.remaining_dist_address
: Optional address for receiving redistributed funds.
Returns: A
RoundDetail
object reflecting changes to redistribution settings.
4. Set Applications Configuration
Purpose: This method configures application settings for a funding round, including whether applications are allowed and their time frame.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being configured.caller
: The address of the user making the request.allow_applications
: Boolean indicating if applications can be submitted.start_ms
: Optional start time for accepting applications in milliseconds.end_ms
: Optional end time for accepting applications in milliseconds.
Returns: A
RoundDetail
object with updated application settings.
5. Set Voting Period
Purpose: This method sets the voting period for a specific funding round.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being configured.caller
: The address of the user making the request.start_ms
: Start time for voting in milliseconds.end_ms
: End time for voting in milliseconds.
6. Set Number of Votes
Purpose: This method specifies how many projects each voter can select during voting.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being configured.caller
: The address of the user making the request.num_picks_per_voter
: Number of projects each voter can choose.
7. Set Expected Amount
Purpose: This method sets an expected funding amount for a specific funding round.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being configured.caller
: The address of the user making the request.amount
: Expected amount to be raised in this round.
8. Set Admins
Purpose: This method assigns administrators to manage a specific funding round.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being configured.round_admins
: List of addresses designated as admins for this round.
9. Add Approved Project
Purpose: This method allows an admin to add approved projects to a specific funding round.
Parameters:
env
: The environment context for executing the method.round_id
: The unique identifier of the round being modified.caller
: The address of the user making this request (must be an admin).project_ids
: List of project IDs to be added as approved projects.
10. Transfer Round Ownership
Purpose: This method transfers ownership of a specific funding round to a new owner.
Parameters:
env
: The environment context for executing this transfer.round_id
: The unique identifier of the round being transferred.new_owner
: Address of the new owner who will take over control.
11. Set Round Complete
Purpose: This method marks a funding round as complete once all processes are finalized.
Parameters:
env
: The environment context for executing this action.round_id
: The unique identifier of the completed round.caller
: The address of the user initiating this action (must be an admin).
Returns: A updated
RoundDetail
object indicating that this round has been completed.
12. Update Round
Purpose: This method allows an admin to update details about an existing funding round.
Parameters:
env
: The environment context for executing this update.caller
: The address of the user initiating this update (must be an admin).round_id
: The unique identifier of the round being updated.round_detail
: Updated parameters encapsulated in an UpdateRoundParams struct.
Returns: An updated
RoundDetail
object reflecting changes made to this funding round.
13. Delete Round
Purpose: This method removes a specified funding round from existence within the contract.
Parameters:
env
: The environment context for executing this deletion.round_id
: The unique identifier of the round to be deleted.
Returns : A deleted (or removed) RoundDetail object indicating that this funding has been removed from existence.
Application Management Methods
Apply to Round
Last updated
Was this helpful?