Table of Contents
This document provides an overview of the application.
It outlines the use cases, i.e. desirable functionality, in addition to requirements for the smart contract and the user interface.
This section contains general information about the functionality of the application and thus does not touch upon any technical aspects.
If you are interested in a functional overview then this is the section for you.
This sub-section details what a user is able to do e.g. click a button and "x, y, z" happens.
A user should be able to create a campaign which consists of
- The asset that the campaign accepts
- The amount of asset required to deem the campaign a success a.k.a the goal
- A deadline after which the campaign is locked and deemed as concluded
- The beneficiary to whom the asset will be sent to upon reaching the goal
The author of a campaign should be able to cancel (end) the campaign
- If the campaign has not reached its deadline
- If the campaign has not been cancelled before
- If the campaign has not been claimed
The author of a campaign should be able to claim the total amount pledged
- After the deadline has been passed
- If the target amount (goal) has been reached
- If they have not claimed before
- If they have not cancelled before
A user should be able to pledge to any campaign
- If the campaign is active (not passed the deadline, cancelled or claimed)
- If they send the correct asset to the campaign
A user should be able to unpledge any amount that they have pledged
- If the campaign has not been claimed
This sub-section details the information that a user should have access to / what the application provides to them e.g. a history of their previous actions.
Returns the total number of uniquely pledged assets
- If two different campaigns receive a pledge from the same asset then the
asset_count()
will be 1 - If two different campaigns receive a pledge from two different assets then the
asset_count()
will be 2
Returns information about a specified asset through the use of its contract ID
- The total amount that has been pledged across all campaigns
- If the asset has been specified by any campaign
Returns information about a specified asset through the use of an index
- The total amount that has been pledged across all campaigns
- If the asset has been specified by any campaign
Returns the identifier used to track a campaign for a specified user
Returns data representing the state of a campaign
- The creator of the campaign
- The asset the campaign accepts for deposit
- Who the pledges will be sent to upon reaching the target amount
- Whether the campaign has been cancelled / claimed
- The deadline after which the campaign expires
- The target amount (goal) set for the campaign and the current amount pledged
Returns information regarding the amount pledged by a user to a specific campaign
Returns the total number of uniquely pledged assets by a user
- If a user has pledged 1 asset (any number of times) then the
pledge_count()
will be 1 - If a user has pledged 2 different assets (any number of times) then the
pledge_count()
will be 2
Returns the total number of created campaigns
Returns the total number of campaigns that a user has pledged to
- If a user pledges to 2 different campaigns then the
user_pledge_count()
will be 2 - If the user performs step 1 and then completely unpledges then
user_pledge_count()
will be 2