STO module for standard capped crowdsale (CappedSTO.sol)
View Source: contracts/modules/STO/Capped/CappedSTO.sol
↗ Extends: CappedSTOStorage, STO, ReentrancyGuard
CappedSTO
Events
Functions
Arguments
Name | Type | Description |
_securityToken | address | |
_polyToken | address |
fallback function DO NOT OVERRIDE
Arguments
Name | Type | Description |
configure
Function used to intialize the contract variables
Arguments
Name | Type | Description |
_startTime | uint256 | Unix timestamp at which offering get started |
_endTime | uint256 | Unix timestamp at which offering get ended |
_cap | uint256 | Maximum No. of token base units for sale |
_rate | uint256 | Token units a buyer gets multiplied by 10^18 per wei / base unit of POLY |
_fundRaiseTypes | enum ISTO.FundRaiseType[] | Type of currency used to collect the funds |
_fundsReceiver | address payable | Ethereum account address to hold the funds |
getInitFunction
⤾ overrides IModule.getInitFunction
This function returns the signature of configure function
Arguments
Name | Type | Description |
changeAllowBeneficialInvestments
Function to set allowBeneficialInvestments (allow beneficiary to be different to funder)
Arguments
Name | Type | Description |
_allowBeneficialInvestments | bool | Boolean to allow or disallow beneficial investments |
buyTokens
Low level token purchase DO NOT OVERRIDE
Arguments
Name | Type | Description |
_beneficiary | address | Address performing the token purchase |
buyTokensWithPoly
low level token purchase
Arguments
Name | Type | Description |
_investedPOLY | uint256 | Amount of POLY invested |
capReached
Checks whether the cap has been reached.
Returns
bool Whether the cap was reached
Arguments
Name | Type | Description |
getTokensSold
⤾ overrides STO.getTokensSold
Return the total no. of tokens sold
Arguments
Name | Type | Description |
getPermissions
⤾ overrides IModule.getPermissions
Return the permissions flag that are associated with STO
Arguments
Name | Type | Description |
getSTODetails
Return the STO details
Returns
Unixtimestamp at which offering gets start.
Arguments
Name | Type | Description |
_processTx
Arguments
Name | Type | Description |
_beneficiary | address | Address performing the token purchase |
_investedAmount | uint256 | Value in wei involved in the purchase |
_preValidatePurchase
Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use super to concatenate validations.
Arguments
Name | Type | Description |
_beneficiary | address | Address performing the token purchase |
_investedAmount | uint256 | Value in wei involved in the purchase |
_deliverTokens
Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends its tokens.
Arguments
Name | Type | Description |
_beneficiary | address | Address performing the token purchase |
_tokenAmount | uint256 | Number of tokens to be emitted |
_processPurchase
Executed when a purchase has been validated and is ready to be executed. Not necessarily emits/sends tokens.
Arguments
Name | Type | Description |
_beneficiary | address | Address receiving the tokens |
_tokenAmount | uint256 | Number of tokens to be purchased |
_getTokenAmount
Overrides to extend the way in which ether is converted to tokens.
Returns
Number of tokens that can be purchased with the specified _investedAmount
Arguments
Name | Type | Description |
_investedAmount | uint256 | Value in wei to be converted into tokens |
_forwardFunds
Determines how ETH is stored/forwarded on purchases.
Arguments
Name | Type | Description |
_refund | uint256 |
_forwardPoly
Internal function used to forward the POLY raised to beneficiary address
Arguments
Name | Type | Description |
_beneficiary | address | Address of the funds reciever |
_to | address | Address who wants to ST-20 tokens |
_fundsAmount | uint256 | Amount invested by _to |
Last updated