Refactor Campaign Pool Constructor function #64 #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Refactor Campaign Pool Constructor function
Context
This PR enhances the
CampaignPools
contract in the TokenGiver project by adding support for a governance token and voting periods. Specifically, it:CampaignPool
struct to include voting start and end times.These changes enable tracking of governance token distribution for donations and voting periods for campaign pools, supporting decentralized decision-making for pool fund allocation on StarkNet. The modifications are submitted to the
pool_campaign
branch as requested.Assumptions
CampaignPools Contract:
create_campaign_pool
and related functions.voting_start_time
,voting_end_time
) will be set and validated in future functions.Storage Updates:
governance_token_address
stores the address of an external governance token contract.tokens_per_donation
defines the rate of token minting per donation unit.CampaignPool
struct now includesvoting_start_time
andvoting_end_time
, initialized to 0.Deployment:
governance_token_address
,tokens_per_donation
) during deployment.Branch:
pool_campaign
branch.Changes
Storage Updates:
governance_token_address: ContractAddress
toStorage
.tokens_per_donation: u256
toStorage
.Constructor:
governance_token_address
andtokens_per_donation
parameters.CampaignPool Struct:
voting_start_time: u64
andvoting_end_time: u64
to theCampaignPool
struct increate_campaign_pool
, initialized to 0.Acceptance Criteria
Governance Token Support:
governance_token_address
.tokens_per_donation
.Voting Period Support:
CampaignPool
struct includesvoting_start_time
andvoting_end_time
.create_campaign_pool
.No Functional Changes:
Screenshot
On scarb build :
Checklist
governance_token_address
toStorage
.tokens_per_donation
toStorage
.voting_start_time
andvoting_end_time
toCampaignPool
struct.pool_campaign
branch.scarb build
(pending screenshot).