Crowdsale
The Crowdsale library exposes methods to create and manage a decentralized crowdsale.
Method | Return type | Description |
---|---|---|
Crowdsale.create(from:Address, name:String, SaleFlags flags, startDate:Timestamp, endDate:Timestamp, sellSymbol:String, receiveSymbol:String, price:Number, globalSoftCap:Number, globalHardCap:Number, userSoftCap:Number, userHardCap:Number) | Hash | Returns a Hash of the sale created. |
Crowdsale.isSaleActive(saleHash:Hash) | bool | Returns true if the sale is active, false otherwise. |
Crowdsale.GetSaleParticipants(saleHash:Hash) | Address[] | Returns an Array of the addressess in by the saleHash. |
Crowdsale.getSaleWhitelists(saleHash:Hash) | Address[] | Retruns the list of addresses whitelisted for the sale, by the saleHash. |
Crowdsale.isWhitelisted(saleHash:Hash, address:Address) | Bool | Returns true if the user is whitelisted for the sale, false otherwise. |
Crowdsale.addToWhitelist(saleHash:Hash, target:Address) | None | To add a Address to the participate in the sale, by the saleHash and target address. |
Crowdsale.removeFromWhitelist(saleHash:Hash, target:Address) | None | To remove a Address from the participate in the sale, by the saleHash and target address. |
Crowdsale.getPurchasedAmount(saleHash:Hash, address:Address) | Number | Returns the Purchased amount. |
Crowdsale.getSoldAmount(saleHash:Hash) | Number | Returns the amount that the sale has been sold. |
Crowdsale.purchase(from:Address, saleHash:Hash, quoteSymbol:string, quoteAmount:Number) | None | To purchase the sale. |
Crowdsale.closeSale(from:Address, saleHash:Hash) | None | To close a given saleHash. |
Crowdsale.getLatestSaleHash() | Hash | Returns the last saleHash. |
Crowdsale.EditSalePrice(saleHash:Hash, price:Number) | None | To edit the sale price by the saleHash. |
Last updated