Skip to content

Claim/Minting logic for the Contribution Tokens after the Community Round#10

Merged
lrazovic merged 16 commits into
mainfrom
leonardo/contribute-in-community-round
Jan 23, 2023
Merged

Claim/Minting logic for the Contribution Tokens after the Community Round#10
lrazovic merged 16 commits into
mainfrom
leonardo/contribute-in-community-round

Conversation

@lrazovic
Copy link
Copy Markdown
Member

@lrazovic lrazovic commented Jan 17, 2023

Description

After the Community Round, a new Contribution Token is created with the metadata provided by the user. #9
This PR adds the logic for the claim_contribution_tokens() extrinsic, which calculate the amount of CTs to which a user is entitled, and mint this amount to the user.

Changes Made

  • The frame_support::traits::tokens::fungibles::Create trait (which "inherits" the Inspect trait) now uses T::ProjectIdentifier and T::CurrencyBalance as types for the AssetId and the Balance.
  • The value of the Contributions StorageDoubleMap now is a ContributionInfo<T> instead of BalanceOf<T>, to keep track if the user can claim the Contribution Tokens.
  • A user can now contribute multiple times to the same Project

Additional Notes

@lrazovic lrazovic requested a review from joepetrowski January 17, 2023 16:08
@lrazovic lrazovic self-assigned this Jan 17, 2023
@lrazovic lrazovic marked this pull request as ready for review January 17, 2023 16:29
@lrazovic lrazovic merged commit a71872a into main Jan 23, 2023
@lrazovic lrazovic deleted the leonardo/contribute-in-community-round branch March 20, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant