STO module for standard capped crowdsale (USDTieredSTO.sol)
Last updated
Was this helpful?
Last updated
Was this helpful?
View Source:
↗ Extends: ,
USDTieredSTO
Constants & Variables
Events
Arguments
Name
Type
Description
Arguments
Name
Type
Description
Arguments
Name
Type
Description
_usdToken
address
Arguments
Name
Type
Description
_securityToken
address
_polyAddress
address
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
_ratePerTier
uint256[]
Rate (in USD) per tier ( 10*18)
_ratePerTierDiscountPoly
uint256[]
_tokensPerTierTotal
uint256[]
Tokens available in each tier
_tokensPerTierDiscountPoly
uint256[]
_nonAccreditedLimitUSD
uint256
Limit in USD ( 10*18) for non-accredited investors
_minimumInvestmentUSD
uint256
Minimun investment in USD ( 10*18)
_fundRaiseTypes
enum ISTO.FundRaiseType[]
Types of currency used to collect the funds
_wallet
address payable
Ethereum account address to hold the funds
_treasuryWallet
address
Ethereum account address to receive unsold tokens
_usdTokens
IERC20[]
Contract address of the stable coins
Modifies fund raise types
Arguments
Name
Type
Description
_fundRaiseTypes
enum ISTO.FundRaiseType[]
Array of fund raise types to allow
modifies max non accredited invets limit and overall minimum investment limit
Arguments
Name
Type
Description
_nonAccreditedLimitUSD
uint256
max non accredited invets limit
_minimumInvestmentUSD
uint256
overall minimum investment limit
modifiers STO tiers. All tiers must be passed, can not edit specific tiers.
Arguments
Name
Type
Description
_ratePerTier
uint256[]
Array of rates per tier
_ratePerTierDiscountPoly
uint256[]
Array of discounted poly rates per tier
_tokensPerTierTotal
uint256[]
Array of total tokens per tier
_tokensPerTierDiscountPoly
uint256[]
Array of discounted tokens per tier
Modifies STO start and end times
Arguments
Name
Type
Description
_startTime
uint256
start time of sto
_endTime
uint256
end time of sto
Arguments
Name
Type
Description
Modifies addresses used as wallet, reserve wallet and usd token
Arguments
Name
Type
Description
_wallet
address payable
Address of wallet where funds are sent
_treasuryWallet
address
Address of wallet where unsold tokens are sent
_usdTokens
IERC20[]
Address of usd tokens
Modifies Oracle address. By default, Polymath oracles are used but issuer can overide them using this function Set _oracleAddress to 0x0 to fallback to using Polymath oracles
Arguments
Name
Type
Description
_fundRaiseType
enum ISTO.FundRaiseType
Actual currency
_oracleAddress
address
address of the oracle
Arguments
Name
Type
Description
_nonAccreditedLimitUSD
uint256
_minimumInvestmentUSD
uint256
Arguments
Name
Type
Description
_ratePerTier
uint256[]
_ratePerTierDiscountPoly
uint256[]
_tokensPerTierTotal
uint256[]
_tokensPerTierDiscountPoly
uint256[]
Arguments
Name
Type
Description
_startTime
uint256
_endTime
uint256
Arguments
Name
Type
Description
_wallet
address payable
_treasuryWallet
address
_usdTokens
IERC20[]
Arguments
Name
Type
Description
_usdTokens
IERC20[]
Finalizes the STO and mint remaining tokens to treasury address
Arguments
Name
Type
Description
Modifies the list of overrides for non-accredited limits in USD
Arguments
Name
Type
Description
_investors
address[]
Array of investor addresses to modify
_nonAccreditedLimit
uint256[]
Array of uints specifying non-accredited limits
Returns investor accredited & non-accredited override informatiomn
Returns
investors list of all configured investors
Arguments
Name
Type
Description
Function to set allowBeneficialInvestments (allow beneficiary to be different to funder)
Arguments
Name
Type
Description
_allowBeneficialInvestments
bool
Boolean to allow or disallow beneficial investments
fallback function - assumes ETH being invested
Arguments
Name
Type
Description
Arguments
Name
Type
Description
_beneficiary
address
Arguments
Name
Type
Description
_beneficiary
address
_investedPOLY
uint256
Arguments
Name
Type
Description
_beneficiary
address
_investedSC
uint256
_usdToken
IERC20
Purchase tokens using ETH
Arguments
Name
Type
Description
_beneficiary
address
Address where security tokens will be sent
_minTokens
uint256
Minumum number of tokens to buy or else revert
Purchase tokens using POLY
Arguments
Name
Type
Description
_beneficiary
address
Address where security tokens will be sent
_investedPOLY
uint256
Amount of POLY invested
_minTokens
uint256
Minumum number of tokens to buy or else revert
Purchase tokens using Stable coins
Arguments
Name
Type
Description
_beneficiary
address
Address where security tokens will be sent
_investedSC
uint256
Amount of Stable coins invested
_minTokens
uint256
Minumum number of tokens to buy or else revert
_usdToken
IERC20
Address of USD stable coin to buy tokens with
Arguments
Name
Type
Description
_beneficiary
address
_tokenAmount
uint256
_fundRaiseType
enum ISTO.FundRaiseType
_minTokens
uint256
_token
IERC20
Arguments
Name
Type
Description
_beneficiary
address
_amount
uint256
_fundRaiseType
enum ISTO.FundRaiseType
_minTokens
uint256
Low level token purchase
Arguments
Name
Type
Description
_beneficiary
address
Address where security tokens will be sent
_investmentValue
uint256
Amount of POLY, ETH or Stable coins invested
_rate
uint256
_fundRaiseType
enum ISTO.FundRaiseType
Fund raise type (POLY, ETH, SC)
Arguments
Name
Type
Description
_beneficiary
address
_investmentValue
uint256
investedUSD
uint256
Arguments
Name
Type
Description
_beneficiary
address
_tier
uint256
_investedUSD
uint256
_fundRaiseType
enum ISTO.FundRaiseType
Arguments
Name
Type
Description
_beneficiary
address
_tierPrice
uint256
_tierRemaining
uint256
_investedUSD
uint256
_tier
uint256
Arguments
Name
Type
Description
_investor
address
Arguments
Name
Type
Description
_investor
address
dataStore
IDataStore
This function returns whether or not the STO is in fundraising mode (open)
Returns
bool Whether the STO is accepting investments
Arguments
Name
Type
Description
Checks whether the cap has been reached.
Returns
bool Whether the cap was reached
Arguments
Name
Type
Description
returns current conversion rate of funds
Arguments
Name
Type
Description
_fundRaiseType
enum ISTO.FundRaiseType
Fund raise type to get rate of
This function converts from ETH or POLY to USD
Returns
uint256 Value in USD
Arguments
Name
Type
Description
_fundRaiseType
enum ISTO.FundRaiseType
Currency key
_amount
uint256
Value to convert to USD
This function converts from USD to ETH or POLY
Returns
uint256 Value in ETH or POLY
Arguments
Name
Type
Description
_fundRaiseType
enum ISTO.FundRaiseType
Currency key
_amount
uint256
Value to convert from USD
Return the total no. of tokens sold
Returns
uint256 Total number of tokens sold
Arguments
Name
Type
Description
Return the total no. of tokens minted
Returns
uint256 Total number of tokens minted
Arguments
Name
Type
Description
Return the total no. of tokens sold for the given fund raise type param _fundRaiseType The fund raising currency (e.g. ETH, POLY, SC) to calculate sold tokens for
Returns
uint256 Total number of tokens sold for ETH
Arguments
Name
Type
Description
_fundRaiseType
enum ISTO.FundRaiseType
Return array of minted tokens in each fund raise type for given tier param _tier The tier to return minted tokens for
Returns
uint256[] array of minted tokens in each fund raise type
Arguments
Name
Type
Description
_tier
uint256
Return the total no. of tokens sold in a given tier param _tier The tier to calculate sold tokens for
Returns
uint256 Total number of tokens sold in the tier
Arguments
Name
Type
Description
_tier
uint256
Return the total no. of tiers
Returns
uint256 Total number of tiers
Arguments
Name
Type
Description
Return the usd tokens accepted by the STO
Returns
address[] usd tokens
Arguments
Name
Type
Description
Return the permissions flag that are associated with STO
Arguments
Name
Type
Description
Return the STO details
Returns
Unixtimestamp at which offering gets start.
Arguments
Name
Type
Description
This function returns the signature of configure function
Returns
bytes4 Configure function signature
Arguments
Name
Type
Description
Arguments
Name
Type
Description
_currency
bytes32
_denominatedCurrency
bytes32
⤾ overrides
⤾ overrides
⤾ overrides