Swarm Powered Fundraise Contract
- BETA -
Smart Contract: specific to a Swarm Powered Fundraise for a specific SRC20
Created: review the SPF Deployment Sequence; this contract references all other previously deployed contracts related to this fundraise
Purpose: Operates the actual SwarmPoweredFundraise; finalizes via stakeToMint
Example: TBD
Feature Description
Read Functions
Function | Description |
| The label of the current fundraise |
| Start date of the fundraise in UNIX time |
| End date of the fundraise in UNIX time |
| Minimum amount accepted as contribution in base currency |
| Maximum amount accepted as contribution in base currency |
| Time required for the issuer to stake and mint security tokens after the fundraise has been successfully completed. If the expiration time is reached, all contributors are able to get a refund |
| The SRC20 token that is being offered as a security |
| The contract that is responsible for minting the security tokens after the stake has been made |
| The contract address of the Affiliate Manager contract which is responsible for managing affiliate addresses, links and commissions |
| The contract address of the Contributor Restrictions contract which is responsible for handling contributor restrictions |
| The contract address of the Currency Registry which is responsible for managing accepted currencies in the fundraise |
| Returns true if off-chain contributions are allowed. If off chain contributions are allowed the token manager can manually input contributions into the contract |
| The soft cap amount in base currency |
| The hard cap amount in base currency |
| The price of each SRC20 token being sold in base currency. If this is set to 0 the value will be calculated based off of tokens to mint |
| The amount of SRC20 tokens that are for sale and will be minted. It will be 0 if the fundraising is based off of a token price |
| The amount raised in base currency |
| The total number of unique addresses that have contributed to the fundraise |
| The total amount the issuer can withdraw in base currency |
| Returns the address of the wallet which will receive the raised funds |
| Returns true if the fundraising has been cancelled or successfully finished< |
| Returns true if the fundraising set up is complete |
| Returns true if contributions are locked. This means contributors are not able to obtain a refund |
| Each contributor address holds an array of a Contribution structure like this |
| These are contributions that have yet to be counted as valid; the first parameter is the contributor and the second is the currency address in this format |
| Total sum of pending contributions per currency address |
| These are contributions that have been qualified and count in the fundraise. The first parameter is the contributor and the second is the currency address |
| Total sum of qualified contributions per currency address |
| An array of Balance structures per currency address. |
Write Functions
Function | Description |
| This function finishes setting up the contract once it has been deployed. The parameters are the following: 1/ Minimum contribution amount accepted in base currency; 2/ Maximum contribution amount accepted in base currency; 3/ Affiliate Manager contract address; 4/ Contributor Restrictions contract address; 5/ A boolean that sets if the contributions are locked |
| It cancels the fundraise; this function can only be called by the contract owner (token issuer) |
| Returns the contributor’s sum of contributions in base currency; the contributor’s address is the first parameter and the second parameter is a boolean for qualified contributions (true) or pending contributions (false) |
| If off-chain contributions are allowed the token issuer can add contributions manually so the contract can later mint and distribute tokens for manual contributions; this feature requires trust on the part of the token issuer |
| Allow contributions of ERC20 tokens that are registered in the |
| Allow a user to get ERC20 and ETH refunds if the fundraise has passed expiration time or has been cancelled |
| Function that can only be called by the Contributor Restriction smart contract after a user has been whitelisted by the issuer |
| Function that can only be called by the Contributor Restriction smart contract after a user's address has been unwhitelisted by the token issuer |
| Allow token issuer to stake SWM tokens in order to mint SRC20 tokens. The token issuer can either use |
| Allow contributors to claim their portion of SRC20 tokens after the fundraising is successfully over |
Last updated