Polymath
master
master
  • README
  • api
    • Proxy (Proxy.sol)
    • Base abstract contract to be extended by all STO modules (STO.sol)
    • OwnedUpgradeabilityProxy (OwnedUpgradeabilityProxy.sol)
    • Transfer Manager module for core transfer validation functionality (GeneralTransferManager.sol)
    • VotingCheckpointStorage.sol
    • PLCRVotingCheckpoint.sol
    • Factory for deploying VestingEscrowWallet module (VestingEscrowWalletFactory.sol)
    • Helper library use to compare or validate the semantic versions (VersionUtils.sol)
    • Interface to be implemented by all Wallet modules (Wallet.sol)
    • Factory for deploying CappedSTO module (CappedSTOFactory.sol)
    • Checkpoint module for issuing ERC20 dividends (ERC20DividendCheckpoint.sol)
    • Interface to be implemented by all Transfer Manager modules (ITransferManager.sol)
    • StableOracle.sol
    • VolumeRestrictionTM.sol
    • SecurityTokenRegistryProxy (SecurityTokenRegistryProxy.sol)
    • PreSaleSTO module Proxy (PreSaleSTOProxy.sol)
    • DataStoreProxy Proxy (DataStoreProxy.sol)
    • Proxy for deploying SecurityToken instances (STFactory.sol)
    • Ownable (IOwnable.sol)
    • Checkpoint module for issuing ether dividends (DividendCheckpoint.sol)
    • CountTransferManager module Proxy (BlacklistTransferManagerProxy.sol)
    • Security Token contract (mock) (MockSTGetter.sol)
    • Permission Manager module for core permissioning functionality (GeneralPermissionManager.sol)
    • Contract used to store layout for the CountTransferManager storage (CountTransferManagerStorage.sol)
    • DummySTO module Proxy (DummySTOProxy.sol)
    • Transfer Manager module for limiting percentage of token supply a single address can hold (Percentag
    • Helps contracts guard against reentrancy attacks. (ReentrancyGuard.sol)
    • Factory for deploying EtherDividendCheckpoint module (ScheduledCheckpointFactory.sol)
    • Interface that every module factory contract should implement (IModuleFactory.sol)
    • Factory for deploying GeneralTransferManager module (TrackedRedemptionFactory.sol)
    • SafeMath (SafeMath.sol)
    • USDTiered STO module Proxy (SecurityTokenProxy.sol)
    • USDTiered STO module Proxy (USDTieredSTOProxy.sol)
    • IOracle.sol
    • ManualApprovalTransferManager module Proxy (ManualApprovalTransferManagerProxy.sol)
    • Interface to be implemented by all permission manager modules (IPermissionManager.sol)
    • Factory for deploying PreSaleSTO module (PreSaleSTOFactory.sol)
    • MockPolyOracle.sol
    • Transfer Manager module for verifing transations with a signed message (SignedTransferManager.sol)
    • DataStoreFactory.sol
    • OraclizeAddrResolverI.sol
    • PolyTokenFaucet.sol
    • Registry contract for issuers to register their security tokens (MockModuleRegistry.sol)
    • VolumeRestrictionLib.sol
    • Contract used to store layout for the PercentageTransferManager storage (PercentageTransferManagerSt
    • Transfer Manager for limiting maximum number of token holders (CountTransferManager.sol)
    • ModuleRegistryProxy (ModuleRegistryProxy.sol)
    • Voting module for governance (WeightedVoteCheckpointProxy.sol)
    • Factory for deploying BlacklistTransferManager module (BlacklistTransferManagerFactory.sol)
    • Contract used to store layout for the GeneralPermissionManager storage (GeneralPermissionManagerStor
    • CountTransferManager module Proxy (LockUpTransferManagerProxy.sol)
    • Holds the storage variable for the DividendCheckpoint modules (i.e ERC20, Ether) (DividendCheckpoint
    • Factory for deploying DummySTO module (DummySTOFactory.sol)
    • IERC1644.sol
    • Core functionality for registry upgradability (PolymathRegistry.sol)
    • Utility contract to allow owner to retreive any ERC20 sent to the contract (ReclaimTokens.sol)
    • SecurityTokenMock.sol
    • Factory for deploying CappedSTO module (USDTieredSTOFactory.sol)
    • Factory for deploying ManualApprovalTransferManager module (ManualApprovalTransferManagerFactory.sol
    • IERC1643.sol
    • Transfer Manager module for core transfer validation functionality (EtherDividendCheckpointProxy.sol
    • solcChecker.sol
    • It holds the storage variables related to ERC20DividendCheckpoint module (ERC20DividendCheckpointSto
    • Interface for all security tokens (ISecurityToken.sol)
    • Base abstract contract to be implemented by all Transfer Manager modules (TransferManager.sol)
    • Storage layout for VolumeRestrictionTM (VolumeRestrictionTMStorage.sol)
    • Security Token contract (mock) (MockSecurityTokenLogic.sol)
    • Transfer Manager module for core transfer validation functionality (GeneralTransferManagerStorage.so
    • IERC1410.sol
    • VotingCheckpoint.sol
    • Factory for deploying WeightedVoteCheckpoint module (WeightedVoteCheckpointFactory.sol)
    • PLCRVotingCheckpointStorage.sol
    • IDataStore.sol
    • TestSTOFactory.sol
    • Ownable (Ownable.sol)
    • UpgradeabilityProxy (UpgradeabilityProxy.sol)
    • Mock Contract Not fit for production environment (MockFactory.sol)
    • Registry contract for issuers to register their security tokens (SecurityTokenRegistryMock.sol)
    • ICheckPermission.sol
    • Factory for deploying LockUpTransferManager module (LockUpTransferManagerFactory.sol)
    • Storage layout for the STO contract (STOStorage.sol)
    • Interface for the Polymath Security Token Registry contract (ISecurityTokenRegistry.sol)
    • Mock Contract Not fit for production environment (MockWrongTypeFactory.sol)
    • Transfer Manager module for core transfer validation functionality (KYCTransferManager.sol)
    • Factory for deploying EtherDividendCheckpoint module (EtherDividendCheckpointFactory.sol)
    • functionSigClash2.sol
    • Standard Interface of ERC1594 (IERC1594.sol)
    • TokenLib.sol
    • MakerDAOOracle.sol
    • Interface that any module contract should implement (Module.sol)
    • Interface that any module factory contract should implement (ModuleFactory.sol)
    • STGetter.sol
    • Interface to be implemented by upgradable token factories (IUpgradableTokenFactory.sol)
    • ERC20 interface (IERC20.sol)
    • KYCTransferManagerFactory.sol
    • Checkpoint module for issuing ether dividends (EtherDividendCheckpoint.sol)
    • functionSigClash1.sol
    • Wallet for core vesting escrow functionality (VestingEscrowWalletStorage.sol)
    • Interface for managing polymath feature switches (IFeatureRegistry.sol)
    • Encoder.sol
    • STRGetter.sol
    • OraclizeI.sol
    • Contract used to store layout for the CappedSTO storage (CappedSTOStorage.sol)
    • LockUpTransferManager.sol
    • Checkpoint module for token weighted vote (WeightedVoteCheckpoint.sol)
    • Registry contract to store registered modules (ModuleRegistry.sol)
    • Factory for deploying upgradable modules (UpgradableModuleFactory.sol)
    • Utility contract to allow pausing and unpausing of certain functions (Pausable.sol)
    • CountTransferManager module Proxy (CountTransferManagerProxy.sol)
    • Math (Math.sol)
    • IPolymathRegistry.sol
    • MockOracle.sol
    • Transfer Manager module for manually approving transactions between accounts (ManualApprovalTransfer
    • DecimalMath.sol
    • STO module for standard capped crowdsale (USDTieredSTO.sol)
    • Security Token contract (SecurityToken.sol)
    • PercentageTransferManager module Proxy (PercentageTransferManagerProxy.sol)
    • Interface to be implemented by all checkpoint modules (IBurn.sol)
    • Burn module for burning tokens and keeping track of burnt amounts (MockRedemptionManager.sol)
    • GeneralPermissionManager module Proxy (GeneralPermissionManagerProxy.sol)
    • STO module for sample implementation of a different crowdsale module (DummySTO.sol)
    • Factory for deploying CountTransferManager module (CountTransferManagerFactory.sol)
    • Interface to be implemented by all STO modules (ISTO.sol)
    • Data store contract that stores data for all the modules in a central contract. (DataStore.sol)
    • Transfer Manager module to automate blacklist and restrict transfers (BlacklistTransferManager.sol)
    • Contract used to store layout for the PreSaleSTO storage (PreSaleSTOStorage.sol)
    • Migrations.sol
    • Contract used to store layout for the CountTransferManager storage (BlacklistTransferManagerStorage.
    • STO module for private presales (PreSaleSTO.sol)
    • DataStoreStorage.sol
    • Storage layout for the ISTO contract (ISTOStorage.sol)
    • Registry contract for issuers to register their tickers and security tokens (SecurityTokenRegistry.s
    • Factory for deploying SignedTransferManager module (SignedTransferManagerFactory.sol)
    • Transfer Manager module for core transfer validation functionality (ERC20DividendCheckpointProxy.sol
    • Burn module for burning tokens and keeping track of burnt amounts (ScheduledCheckpoint.sol)
    • ERC20 interface (IPoly.sol)
    • Transfer Manager module for core transfer validation functionality (VolumeRestrictionTMProxy.sol)
    • Contract used to store layout for the DummySTO storage (DummySTOStorage.sol)
    • Burn module for burning tokens and keeping track of burnt amounts (TrackedRedemption.sol)
    • Interface that every module contract should implement (IModule.sol)
    • Contract used to store layout for the ManualApprovalTransferManager storage (ManualApprovalTransferM
    • Elliptic curve signature operations (ECDSA.sol)
    • Factory for deploying PercentageTransferManager module (PercentageTransferManagerFactory.sol)
    • Transfer Manager module for core transfer validation functionality (GeneralTransferManagerProxy.sol)
    • Utility contract for reusable code (Util.sol)
    • SecurityTokenStorage.sol
    • Contract used to store layout for the USDTieredSTO storage (USDTieredSTOStorage.sol)
    • Factory for deploying GeneralPermissionManager module (GeneralPermissionManagerFactory.sol)
    • Address.sol
    • StatusCodes.sol
    • Standard ERC20 token
    • Voting module for governance (PLCRVotingCheckpointProxy.sol)
    • CBOR.sol
    • Registry for managing polymath feature switches (FeatureRegistry.sol)
    • WeightedVoteCheckpointStorage.sol
    • Interface for the Polymath Module Registry contract (IModuleRegistry.sol)
    • Interface for security token proxy deployment (ISTFactory.sol)
    • Registry contract for issuers to register their security tokens (MockSTRGetter.sol)
    • Buffer.sol
    • BokkyPooBahsDateTimeLibrary.sol
    • Mock Contract Not fit for production environment (MockBurnFactory.sol)
    • Wallet for core vesting escrow functionality (LockUpTransferManagerStorage.sol)
    • Factory for deploying VolumeRestrictionTM module (VolumeRestrictionTMFactory.sol)
    • usingOraclize.sol
    • STO module for standard capped crowdsale (CappedSTO.sol)
    • Interface to MakerDAO Medianizer contract (IMedianizer.sol)
    • Interface to be implemented by all checkpoint modules (ICheckpoint.sol)
    • Factory for deploying ERC20DividendCheckpoint module (ERC20DividendCheckpointFactory.sol)
    • Factory for deploying GeneralTransferManager module (GeneralTransferManagerFactory.sol)
    • Escrow wallet module for vesting functionality (VestingEscrowWalletProxy.sol)
    • OZStorage.sol
    • Wallet for core vesting escrow functionality (VestingEscrowWallet.sol)
    • EternalStorage.sol
    • Factory for deploying PLCRVotingCheckpoint module (PLCRVotingCheckpointFactory.sol)
    • IVoting.sol
    • Transfer Manager for limiting maximum number of token holders (MockCountTransferManager.sol)
    • CappedSTO module Proxy (CappedSTOProxy.sol)
    • Storage for Module contract (ModuleStorage.sol)
  • wiki
    • Dividend-Module
    • Transfer-manager-results
    • General Permission Manager
    • Transfer-Feature
    • Voting-Checkpoint-Modules
    • USDTieredSTO
    • Contract-Manager
    • Vesting-Escrow-Wallet
    • General Transfer Manager
    • Permission-Manager
    • Dividends-Manager
    • Manual Approval Transfer Manager
    • Transfer-Ownership
    • Transfer-Manager
    • How-to-Use-the-Investor-Portal
    • Count Transfer Manager
    • VolumeRestrictionTransferManager
    • Time-Travel-(Contract-Testing)
    • Percentage Transfer Manager
    • Prerequisite-Instructions-for-Deploying-and-Setting-Up-the-Polymath-Contracts
    • How to Create and Launch an STO
    • Token-Manager
    • How to set up and use the POLY Faucet
    • Advanced PLCR Voting Checkpoint
    • Welcome to the Polymath Core Wiki
    • Capped STO
    • _Sidebar
    • CLI for Polymath-core
    • Lockup Transfer Manager
    • The-STO-Manager
    • Blacklist Transfer Manager (BTM)
  • misc
    • Multiple Transfer Managers
    • PolyOracle Encrypted URL
    • ethereum_status_codes
    • Flags List
    • Permissions List
Powered by GitBook
On this page
  • Contract Members
  • Modifiers
  • validETH
  • validPOLY
  • validSC
  • Functions
  • configure
  • modifyFunding
  • modifyLimits
  • modifyTiers
  • modifyTimes
  • _isSTOStarted
  • modifyAddresses
  • modifyOracle
  • _modifyLimits
  • _modifyTiers
  • _modifyTimes
  • _modifyAddresses
  • _modifyUSDTokens
  • finalize
  • changeNonAccreditedLimit
  • getAccreditedData
  • changeAllowBeneficialInvestments
  • buyWithETH
  • buyWithPOLY
  • buyWithUSD
  • buyWithETHRateLimited
  • buyWithPOLYRateLimited
  • buyWithUSDRateLimited
  • _buyWithTokens
  • _getSpentvalues
  • _buyTokens
  • _buyTokensChecks
  • _calculateTier
  • _purchaseTier
  • _isAccredited
  • _getIsAccredited
  • isOpen
  • capReached
  • getRate
  • convertToUSD
  • convertFromUSD
  • getTokensSold
  • getTokensMinted
  • getTokensSoldFor
  • getTokensMintedByTier
  • getTokensSoldByTier
  • getNumberOfTiers
  • getUsdTokens
  • getPermissions
  • getSTODetails
  • getInitFunction
  • _getOracle

Was this helpful?

  1. api

STO module for standard capped crowdsale (USDTieredSTO.sol)

PreviousDecimalMath.solNextSecurity Token contract (SecurityToken.sol)

Last updated 5 years ago

Was this helpful?

View Source:

↗ Extends: ,

USDTieredSTO

Contract Members

Constants & Variables

string internal constant POLY_ORACLE;
string internal constant ETH_ORACLE;

Events

event SetAllowBeneficialInvestments(bool  _allowed);
event SetNonAccreditedLimit(address  _investor, uint256  _limit);
event TokenPurchase(address indexed _purchaser, address indexed _beneficiary, uint256  _tokens, uint256  _usdAmount, uint256  _tierPrice, uint256  _tier);
event FundsReceived(address indexed _purchaser, address indexed _beneficiary, uint256  _usdAmount, enum ISTO.FundRaiseType  _fundRaiseType, uint256  _receivedValue, uint256  _spentValue, uint256  _rate);
event ReserveTokenMint(address indexed _owner, address indexed _wallet, uint256  _tokens, uint256  _latestTier);
event SetAddresses(address indexed _wallet, IERC20[]  _usdTokens);
event SetLimits(uint256  _nonAccreditedLimitUSD, uint256  _minimumInvestmentUSD);
event SetTimes(uint256  _startTime, uint256  _endTime);
event SetTiers(uint256[]  _ratePerTier, uint256[]  _ratePerTierDiscountPoly, uint256[]  _tokensPerTierTotal, uint256[]  _tokensPerTierDiscountPoly);
event SetTreasuryWallet(address  _oldWallet, address  _newWallet);

Modifiers

validETH

modifier validETH() internal

Arguments

Name

Type

Description

validPOLY

modifier validPOLY() internal

Arguments

Name

Type

Description

validSC

modifier validSC(address _usdToken) internal

Arguments

Name

Type

Description

_usdToken

address

Functions

function (address _securityToken, address _polyAddress) public nonpayable Module

Arguments

Name

Type

Description

_securityToken

address

_polyAddress

address

configure

Function used to intialize the contract variables

function configure(uint256 _startTime, uint256 _endTime, uint256[] _ratePerTier, uint256[] _ratePerTierDiscountPoly, uint256[] _tokensPerTierTotal, uint256[] _tokensPerTierDiscountPoly, uint256 _nonAccreditedLimitUSD, uint256 _minimumInvestmentUSD, enum ISTO.FundRaiseType[] _fundRaiseTypes, address payable _wallet, address _treasuryWallet, IERC20[] _usdTokens) public nonpayable onlyFactory

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

modifyFunding

Modifies fund raise types

function modifyFunding(enum ISTO.FundRaiseType[] _fundRaiseTypes) external nonpayable withPerm

Arguments

Name

Type

Description

_fundRaiseTypes

enum ISTO.FundRaiseType[]

Array of fund raise types to allow

modifyLimits

modifies max non accredited invets limit and overall minimum investment limit

function modifyLimits(uint256 _nonAccreditedLimitUSD, uint256 _minimumInvestmentUSD) external nonpayable withPerm

Arguments

Name

Type

Description

_nonAccreditedLimitUSD

uint256

max non accredited invets limit

_minimumInvestmentUSD

uint256

overall minimum investment limit

modifyTiers

modifiers STO tiers. All tiers must be passed, can not edit specific tiers.

function modifyTiers(uint256[] _ratePerTier, uint256[] _ratePerTierDiscountPoly, uint256[] _tokensPerTierTotal, uint256[] _tokensPerTierDiscountPoly) external nonpayable withPerm

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

modifyTimes

Modifies STO start and end times

function modifyTimes(uint256 _startTime, uint256 _endTime) external nonpayable withPerm

Arguments

Name

Type

Description

_startTime

uint256

start time of sto

_endTime

uint256

end time of sto

_isSTOStarted

function _isSTOStarted() internal view

Arguments

Name

Type

Description

modifyAddresses

Modifies addresses used as wallet, reserve wallet and usd token

function modifyAddresses(address payable _wallet, address _treasuryWallet, IERC20[] _usdTokens) external nonpayable

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

modifyOracle

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

function modifyOracle(enum ISTO.FundRaiseType _fundRaiseType, address _oracleAddress) external nonpayable

Arguments

Name

Type

Description

_fundRaiseType

enum ISTO.FundRaiseType

Actual currency

_oracleAddress

address

address of the oracle

_modifyLimits

function _modifyLimits(uint256 _nonAccreditedLimitUSD, uint256 _minimumInvestmentUSD) internal nonpayable

Arguments

Name

Type

Description

_nonAccreditedLimitUSD

uint256

_minimumInvestmentUSD

uint256

_modifyTiers

function _modifyTiers(uint256[] _ratePerTier, uint256[] _ratePerTierDiscountPoly, uint256[] _tokensPerTierTotal, uint256[] _tokensPerTierDiscountPoly) internal nonpayable

Arguments

Name

Type

Description

_ratePerTier

uint256[]

_ratePerTierDiscountPoly

uint256[]

_tokensPerTierTotal

uint256[]

_tokensPerTierDiscountPoly

uint256[]

_modifyTimes

function _modifyTimes(uint256 _startTime, uint256 _endTime) internal nonpayable

Arguments

Name

Type

Description

_startTime

uint256

_endTime

uint256

_modifyAddresses

function _modifyAddresses(address payable _wallet, address _treasuryWallet, IERC20[] _usdTokens) internal nonpayable

Arguments

Name

Type

Description

_wallet

address payable

_treasuryWallet

address

_usdTokens

IERC20[]

_modifyUSDTokens

function _modifyUSDTokens(IERC20[] _usdTokens) internal nonpayable

Arguments

Name

Type

Description

_usdTokens

IERC20[]

finalize

Finalizes the STO and mint remaining tokens to treasury address

function finalize() external nonpayable withPerm

Arguments

Name

Type

Description

changeNonAccreditedLimit

Modifies the list of overrides for non-accredited limits in USD

function changeNonAccreditedLimit(address[] _investors, uint256[] _nonAccreditedLimit) external nonpayable withPerm

Arguments

Name

Type

Description

_investors

address[]

Array of investor addresses to modify

_nonAccreditedLimit

uint256[]

Array of uints specifying non-accredited limits

getAccreditedData

Returns investor accredited & non-accredited override informatiomn

function getAccreditedData() external view
returns(investors address[], accredited bool[], overrides uint256[])

Returns

investors list of all configured investors

Arguments

Name

Type

Description

changeAllowBeneficialInvestments

Function to set allowBeneficialInvestments (allow beneficiary to be different to funder)

function changeAllowBeneficialInvestments(bool _allowBeneficialInvestments) external nonpayable withPerm

Arguments

Name

Type

Description

_allowBeneficialInvestments

bool

Boolean to allow or disallow beneficial investments

fallback function - assumes ETH being invested

function () external payable

Arguments

Name

Type

Description

buyWithETH

function buyWithETH(address _beneficiary) external payable
returns(uint256, uint256, uint256)

Arguments

Name

Type

Description

_beneficiary

address

buyWithPOLY

function buyWithPOLY(address _beneficiary, uint256 _investedPOLY) external nonpayable
returns(uint256, uint256, uint256)

Arguments

Name

Type

Description

_beneficiary

address

_investedPOLY

uint256

buyWithUSD

function buyWithUSD(address _beneficiary, uint256 _investedSC, IERC20 _usdToken) external nonpayable
returns(uint256, uint256, uint256)

Arguments

Name

Type

Description

_beneficiary

address

_investedSC

uint256

_usdToken

IERC20

buyWithETHRateLimited

Purchase tokens using ETH

function buyWithETHRateLimited(address _beneficiary, uint256 _minTokens) public payable validETH 
returns(uint256, uint256, uint256)

Arguments

Name

Type

Description

_beneficiary

address

Address where security tokens will be sent

_minTokens

uint256

Minumum number of tokens to buy or else revert

buyWithPOLYRateLimited

Purchase tokens using POLY

function buyWithPOLYRateLimited(address _beneficiary, uint256 _investedPOLY, uint256 _minTokens) public nonpayable validPOLY 
returns(uint256, uint256, uint256)

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

buyWithUSDRateLimited

Purchase tokens using Stable coins

function buyWithUSDRateLimited(address _beneficiary, uint256 _investedSC, uint256 _minTokens, IERC20 _usdToken) public nonpayable validSC 
returns(uint256, uint256, uint256)

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

_buyWithTokens

function _buyWithTokens(address _beneficiary, uint256 _tokenAmount, enum ISTO.FundRaiseType _fundRaiseType, uint256 _minTokens, IERC20 _token) internal nonpayable
returns(uint256, uint256, uint256)

Arguments

Name

Type

Description

_beneficiary

address

_tokenAmount

uint256

_fundRaiseType

enum ISTO.FundRaiseType

_minTokens

uint256

_token

IERC20

_getSpentvalues

function _getSpentvalues(address _beneficiary, uint256 _amount, enum ISTO.FundRaiseType _fundRaiseType, uint256 _minTokens) internal nonpayable
returns(rate uint256, spentUSD uint256, spentValue uint256, initialMinted uint256)

Arguments

Name

Type

Description

_beneficiary

address

_amount

uint256

_fundRaiseType

enum ISTO.FundRaiseType

_minTokens

uint256

_buyTokens

Low level token purchase

function _buyTokens(address _beneficiary, uint256 _investmentValue, uint256 _rate, enum ISTO.FundRaiseType _fundRaiseType) internal nonpayable whenNotPaused 
returns(spentUSD uint256, spentValue uint256)

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)

_buyTokensChecks

function _buyTokensChecks(address _beneficiary, uint256 _investmentValue, uint256 investedUSD) internal view
returns(netInvestedUSD uint256)

Arguments

Name

Type

Description

_beneficiary

address

_investmentValue

uint256

investedUSD

uint256

_calculateTier

function _calculateTier(address _beneficiary, uint256 _tier, uint256 _investedUSD, enum ISTO.FundRaiseType _fundRaiseType) internal nonpayable
returns(spentUSD uint256, gotoNextTier bool)

Arguments

Name

Type

Description

_beneficiary

address

_tier

uint256

_investedUSD

uint256

_fundRaiseType

enum ISTO.FundRaiseType

_purchaseTier

function _purchaseTier(address _beneficiary, uint256 _tierPrice, uint256 _tierRemaining, uint256 _investedUSD, uint256 _tier) internal nonpayable
returns(spentUSD uint256, purchasedTokens uint256, gotoNextTier bool)

Arguments

Name

Type

Description

_beneficiary

address

_tierPrice

uint256

_tierRemaining

uint256

_investedUSD

uint256

_tier

uint256

_isAccredited

function _isAccredited(address _investor) internal view
returns(bool)

Arguments

Name

Type

Description

_investor

address

_getIsAccredited

function _getIsAccredited(address _investor, IDataStore dataStore) internal view
returns(bool)

Arguments

Name

Type

Description

_investor

address

dataStore

IDataStore

isOpen

This function returns whether or not the STO is in fundraising mode (open)

function isOpen() public view
returns(bool)

Returns

bool Whether the STO is accepting investments

Arguments

Name

Type

Description

capReached

Checks whether the cap has been reached.

function capReached() public view
returns(bool)

Returns

bool Whether the cap was reached

Arguments

Name

Type

Description

getRate

returns current conversion rate of funds

function getRate(enum ISTO.FundRaiseType _fundRaiseType) public nonpayable
returns(uint256)

Arguments

Name

Type

Description

_fundRaiseType

enum ISTO.FundRaiseType

Fund raise type to get rate of

convertToUSD

This function converts from ETH or POLY to USD

function convertToUSD(enum ISTO.FundRaiseType _fundRaiseType, uint256 _amount) public nonpayable
returns(uint256)

Returns

uint256 Value in USD

Arguments

Name

Type

Description

_fundRaiseType

enum ISTO.FundRaiseType

Currency key

_amount

uint256

Value to convert to USD

convertFromUSD

This function converts from USD to ETH or POLY

function convertFromUSD(enum ISTO.FundRaiseType _fundRaiseType, uint256 _amount) public nonpayable
returns(uint256)

Returns

uint256 Value in ETH or POLY

Arguments

Name

Type

Description

_fundRaiseType

enum ISTO.FundRaiseType

Currency key

_amount

uint256

Value to convert from USD

getTokensSold

Return the total no. of tokens sold

function getTokensSold() public view
returns(uint256)

Returns

uint256 Total number of tokens sold

Arguments

Name

Type

Description

getTokensMinted

Return the total no. of tokens minted

function getTokensMinted() public view
returns(tokensMinted uint256)

Returns

uint256 Total number of tokens minted

Arguments

Name

Type

Description

getTokensSoldFor

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

function getTokensSoldFor(enum ISTO.FundRaiseType _fundRaiseType) external view
returns(tokensSold uint256)

Returns

uint256 Total number of tokens sold for ETH

Arguments

Name

Type

Description

_fundRaiseType

enum ISTO.FundRaiseType

getTokensMintedByTier

Return array of minted tokens in each fund raise type for given tier param _tier The tier to return minted tokens for

function getTokensMintedByTier(uint256 _tier) external view
returns(uint256[])

Returns

uint256[] array of minted tokens in each fund raise type

Arguments

Name

Type

Description

_tier

uint256

getTokensSoldByTier

Return the total no. of tokens sold in a given tier param _tier The tier to calculate sold tokens for

function getTokensSoldByTier(uint256 _tier) external view
returns(uint256)

Returns

uint256 Total number of tokens sold in the tier

Arguments

Name

Type

Description

_tier

uint256

getNumberOfTiers

Return the total no. of tiers

function getNumberOfTiers() external view
returns(uint256)

Returns

uint256 Total number of tiers

Arguments

Name

Type

Description

getUsdTokens

Return the usd tokens accepted by the STO

function getUsdTokens() external view
returns(contract IERC20[])

Returns

address[] usd tokens

Arguments

Name

Type

Description

getPermissions

Return the permissions flag that are associated with STO

function getPermissions() public view
returns(allPermissions bytes32[])

Arguments

Name

Type

Description

getSTODetails

Return the STO details

function getSTODetails() external view
returns(uint256, uint256, uint256, uint256[], uint256[], uint256, uint256, uint256, bool[])

Returns

Unixtimestamp at which offering gets start.

Arguments

Name

Type

Description

getInitFunction

This function returns the signature of configure function

function getInitFunction() public pure
returns(bytes4)

Returns

bytes4 Configure function signature

Arguments

Name

Type

Description

_getOracle

function _getOracle(bytes32 _currency, bytes32 _denominatedCurrency) internal view
returns(oracleAddress address)

Arguments

Name

Type

Description

_currency

bytes32

_denominatedCurrency

bytes32

⤾ overrides

⤾ overrides

⤾ overrides

contracts/modules/STO/USDTiered/USDTieredSTO.sol
USDTieredSTOStorage
STO
(address _securityToken, address _polyAddress)
()
STO.getTokensSold
IModule.getPermissions
IModule.getInitFunction
validETH
validPOLY
validSC
configure(uint256 _startTime, uint256 _endTime, uint256[] _ratePerTier, uint256[] _ratePerTierDiscountPoly, uint256[] _tokensPerTierTotal, uint256[] _tokensPerTierDiscountPoly, uint256 _nonAccreditedLimitUSD, uint256 _minimumInvestmentUSD, enum ISTO.FundRaiseType[] _fundRaiseTypes, address payable _wallet, address _treasuryWallet, IERC20[] _usdTokens)
modifyFunding(enum ISTO.FundRaiseType[] _fundRaiseTypes)
modifyLimits(uint256 _nonAccreditedLimitUSD, uint256 _minimumInvestmentUSD)
modifyTiers(uint256[] _ratePerTier, uint256[] _ratePerTierDiscountPoly, uint256[] _tokensPerTierTotal, uint256[] _tokensPerTierDiscountPoly)
modifyTimes(uint256 _startTime, uint256 _endTime)
_isSTOStarted()
modifyAddresses(address payable _wallet, address _treasuryWallet, IERC20[] _usdTokens)
modifyOracle(enum ISTO.FundRaiseType _fundRaiseType, address _oracleAddress)
_modifyLimits(uint256 _nonAccreditedLimitUSD, uint256 _minimumInvestmentUSD)
_modifyTiers(uint256[] _ratePerTier, uint256[] _ratePerTierDiscountPoly, uint256[] _tokensPerTierTotal, uint256[] _tokensPerTierDiscountPoly)
_modifyTimes(uint256 _startTime, uint256 _endTime)
_modifyAddresses(address payable _wallet, address _treasuryWallet, IERC20[] _usdTokens)
_modifyUSDTokens(IERC20[] _usdTokens)
finalize()
changeNonAccreditedLimit(address[] _investors, uint256[] _nonAccreditedLimit)
getAccreditedData()
changeAllowBeneficialInvestments(bool _allowBeneficialInvestments)
buyWithETH(address _beneficiary)
buyWithPOLY(address _beneficiary, uint256 _investedPOLY)
buyWithUSD(address _beneficiary, uint256 _investedSC, IERC20 _usdToken)
buyWithETHRateLimited(address _beneficiary, uint256 _minTokens)
buyWithPOLYRateLimited(address _beneficiary, uint256 _investedPOLY, uint256 _minTokens)
buyWithUSDRateLimited(address _beneficiary, uint256 _investedSC, uint256 _minTokens, IERC20 _usdToken)
_buyWithTokens(address _beneficiary, uint256 _tokenAmount, enum ISTO.FundRaiseType _fundRaiseType, uint256 _minTokens, IERC20 _token)
_getSpentvalues(address _beneficiary, uint256 _amount, enum ISTO.FundRaiseType _fundRaiseType, uint256 _minTokens)
_buyTokens(address _beneficiary, uint256 _investmentValue, uint256 _rate, enum ISTO.FundRaiseType _fundRaiseType)
_buyTokensChecks(address _beneficiary, uint256 _investmentValue, uint256 investedUSD)
_calculateTier(address _beneficiary, uint256 _tier, uint256 _investedUSD, enum ISTO.FundRaiseType _fundRaiseType)
_purchaseTier(address _beneficiary, uint256 _tierPrice, uint256 _tierRemaining, uint256 _investedUSD, uint256 _tier)
_isAccredited(address _investor)
_getIsAccredited(address _investor, IDataStore dataStore)
isOpen()
capReached()
getRate(enum ISTO.FundRaiseType _fundRaiseType)
convertToUSD(enum ISTO.FundRaiseType _fundRaiseType, uint256 _amount)
convertFromUSD(enum ISTO.FundRaiseType _fundRaiseType, uint256 _amount)
getTokensSold()
getTokensMinted()
getTokensSoldFor(enum ISTO.FundRaiseType _fundRaiseType)
getTokensMintedByTier(uint256 _tier)
getTokensSoldByTier(uint256 _tier)
getNumberOfTiers()
getUsdTokens()
getPermissions()
getSTODetails()
getInitFunction()
_getOracle(bytes32 _currency, bytes32 _denominatedCurrency)