andromedaprotocol/andromeda-core

[Crowdfund] Allow users to claim tiers / get refunded after campaign ended

Closed this issue · 0 comments

Description

After the campaign is ended, allow users to get the tiers they purchased in case the campaign succeed.

If the campaign failed, they should get their invested capital back.

Implementation

  • If the campaign is successful, users claim tiers they purchased
    • The tier is minted when it is claimed using the metadata provided by tier management
    • Ensure the token id is unique
  • If the campaign is not successful, users get refund their invested tokens
  • Whether users get tiers or refunded, it should be handle by single Claim message.

Dependencies

ANDC-89

Acceptance Criteria

  • Current capital should be sent to the withdrawal address once the project is successful
  • Users get their tiers or money back depending on the campaign result
  • Tiers should be minted with unique id
  • Unit tests