SimpleSto
Last updated
Was this helpful?
Last updated
Was this helpful?
Class used to manage a simple sto
↳ ‹›
↳ SimpleSto
Create a new simple sto instance
Parameters:
Name
Type
params
context
• address: string
ethereum address for the STO
• beneficialInvestmentsAllowed: boolean
whether investments can be made on behalf of a beneficiary or not
• cap: BigNumber
cap of total tokens that can be sold in sto
• capReached: boolean
whether the STO cap has been reached or not
Protected
context• endDate: Date
• fundraiseCurrencies: Currency[]
types of currency in which funds can be raised
• investorCount: number
number of investors that have purchased tokens in the STO
• isFinalized: boolean
whether the STO has been finalized or not
• isPaused: boolean
whether the STO is currently paused or not
• preIssueAllowed: boolean
whether all tokens due to be sold are issued when the STO starts. If false, the appropriate amount of tokens is issued to the buyer whenever a sale is made
• raisedAmount: BigNumber
amount of funds that have been raised so far
• raisedFundsWallet: string
wallet where raised funds will be forwarded to
• rate: BigNumber
rate at which the tokens will be sold in sto
• securityTokenId: string
• securityTokenSymbol: string
• soldTokensAmount: BigNumber
total number of tokens that have been sold so far
• startDate: Date
type of STO setup
• uid: string
unique generated Tiered STO id
• unsoldTokensWallet: string
wallet where unsold tokens will be returned to
Hydrate the entity
Parameters:
Name
Type
params
Returns: void
Enable a party to invest in the STO on behalf of another party
Enable all offered tokens to be issued instantly at STO start (default behavior is to issue on purchase) Can be disabled BEFORE the STO starts by calling disallowPreIssuing
Assign a role on the STO to a delegate
Parameters:
â–ª args: object
Name
Type
delegateAddress
string
description?
undefined | string
role
Disable the possibility for a party to invest in the STO on behalf of another party
Disable pre-issuing of offered tokens at STO start (goes back to default behavior, which is to issue on purchase) Can be re-enabled BEFORE the STO starts by calling allowPreIssuing
Finalize the offering. The offering's treasury wallet (or the Security Token's treasury wallet if one was not specified for the offering) will receive the remaining unsold tokens. Throws an error if there are transfer restrictions which do not permit the wallet to receive that amount of tokens
Retrieve all investments that have been made on this STO
Invest in the STO
Parameters:
â–ª args: object
Name
Type
Description
amount
BigNumber
amount to spend
beneficiary?
undefined | string
address that will receive the purchased tokens (defaults to current wallet, will fail if beneficial investments are not allowed for the STO, only applicable if the STO currency is ETH)
Pause the offering
Remove a role from a delegate
Parameters:
â–ª args: object
Name
Type
delegateAddress
string
role
â–¸ toPojo(): object
Convert entity to a POJO (Plain Old Javascript Object)
Returns: object
cap: BigNumber
rate: BigNumber
Unpause the offering
Static
generateIdâ–¸ generateId(__namedParameters
: object): string
Generate the Simple STO's UUID from its identifying properties
Parameters:
â–ª __namedParameters: object
Name
Type
address
string
securityTokenId
string
stoType
Returns: string
Static
unserializeUnserialize string to a Security Token Offering object representation
Parameters:
Name
Type
serialized
string
+ new SimpleSto(params
: & , context
: ):
Overrides .
Defined in
&
Returns:
Inherited from .
Defined in
Inherited from .
Defined in
Defined in
Inherited from .
Defined in
• context:
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
Inherited from .
Defined in
• stoType:
Inherited from .
Defined in
Overrides .
Defined in
Inherited from .
Defined in
â–¸ _refresh(params
: Partial‹›): void
Overrides .
Defined in
Partial‹›
▸ allowBeneficialInvestments(): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
▸ allowPreIssuing(): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
â–¸ assignRole(args
: object): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
▸ disallowBeneficialInvestments(): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
▸ disallowPreIssuing(): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
▸ finalize(): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
▸ getInvestments(): Promise‹[]›
Defined in
Returns: Promise‹[]›
â–¸ invest(args
: object): Promise‹‹, void››
Defined in
Returns: Promise‹‹, void››
▸ pause(): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
â–¸ revokeRole(args
: object): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
Overrides .
Defined in
▸ unpause(): Promise‹‹, void››
Inherited from
Defined in
Returns: Promise‹‹, void››
Defined in
â–¸ unserialize(serialized
: string):
Inherited from .
Defined in
Returns: