Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/plmc 458 community round gatekeep based on did winning bid not account #196

Conversation

JuaniRios
Copy link
Contributor

What?

  • Gatekeep the community contributions based on a did with winning bid, not an account.

Why?

  • People can create multiple accounts with the same did, hence did makes more sense to use game-theory wise.

How?

  • Create a new StorageDoubleMap that holds a project_id + did as keys, and a bool for if the user has a winning bid.
    • on the price calculation, when we set a bid to successful or partially successful, we add true to this. Default value is always false.
  • On the community contribution we check this map, and if it returns true for this project_id + did, then fail.

Testing?

  • New function called did_with_winning_bid_cannot_contribute

@JuaniRios JuaniRios requested review from lrazovic and vstam1 and removed request for lrazovic March 18, 2024 15:46
@JuaniRios JuaniRios self-assigned this Mar 18, 2024
pallets/funding/src/types.rs Outdated Show resolved Hide resolved
@@ -316,6 +317,7 @@ pub mod storage_types {
pub id: u32,
pub project_id: ProjectId,
pub bidder: AccountId,
pub did: DID,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub did: DID,
pub did: Did,

@JuaniRios JuaniRios merged commit 458f9a2 into main Mar 21, 2024
@JuaniRios JuaniRios deleted the feature/plmc-458-community-round-gatekeep-based-on-did-winning-bid-not branch March 26, 2024 08:18
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.

2 participants