Useful for scripts and tests within the truffle environment
- token-sale-helpers
Token Sale Helpers Module
- token-helpers
Token helpers module
- pausable-helpers
Pausable helpers module
- ownership-helpers
Ownership helpers module
Token Sale Helpers Module
- token-sale-helpers
- getWallet ⇒
String
⏏ - getToken ⇒
String
⏏ - getPresaleToken ⇒
String
⏏ - getCap ⇒
String
⏏ - getPriceInWei ⇒
String
⏏ - buyTokens ⇒
Object
⏏ - tokenPriceInWei ⇒
Number
⏏ - tokenPrice ⇒
Number
⏏ - numberOfTokensFor ⇒
Number
⏏
- getWallet ⇒
Returns wallet address for input token sale contract
Kind: Exported member
Returns: String
- wallet
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object |
Returns token address for input token sale contract
Kind: Exported member
Returns: String
- token
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object |
Returns presale token for input token sale contract
Kind: Exported member
Returns: String
- token
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object |
Returns cap for input token sale contract
Kind: Exported member
Returns: String
- token sale cap
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object |
Returns the price in wei of one token sold by the input token sale contract
Kind: Exported member
Returns: String
- token price in wei
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object |
Performs an token order from sender to the input token sale contract
Kind: Exported member
Returns: Object
- txnReceipt - Transaction receipt
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object corresponding to token sale contract |
sender | String |
Ethereum address from which ether is being sent |
value | Number |
Value to be send to the contract |
Returns the token price in wei
Kind: Exported member
Returns: Number
- token price in wei
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object |
Returns the token price
Kind: Exported member
Returns: Number
- token price in ether
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object |
Returns number of tokens for a certain amount of ether sent to a token sale contract
Kind: Exported member
Returns: Number
- number of tokens
Param | Type | Description |
---|---|---|
tokenSale | Object |
Truffle Contract Object |
weiAmount | Number |
Token helpers module
Get owner of token contract
Kind: inner property of token-helpers
Returns: owner
Param |
---|
token |
Get total supply of token contract
Kind: inner property of token-helpers
Returns: total supply
Param |
---|
token |
Get token balance of owner
Kind: inner property of token-helpers
Returns: token balance
Param |
---|
token |
owner |
Transfer amount of token from sender to receiver
Kind: inner property of token-helpers
Returns: transaction receipt
Param |
---|
token |
sender |
receiver |
amount |
Transfer amount of each token in the tokens array from sender to receiver
Kind: inner property of token-helpers
Returns: transaction receipts
Param |
---|
token |
sender |
receiver |
amount |
Mint amount of token for the receiver. Only works if minter is the owner of the token
Kind: inner property of token-helpers
Returns: transaction receipt
Param |
---|
contract |
minter |
receiver |
amount |
Finish minting period for the token contract. Only works if sender is the owner of the token
Kind: inner property of token-helpers
Returns: transaction receipt
Param |
---|
token |
sender |
Convert ERC20 units (=number of base units times 10^decimals) to base units
Kind: inner property of token-helpers
Returns: base units
Param |
---|
token |
amount |
Convert base units (=number of ERC20 units divided by 10^decimals) to ERC20 units
Kind: inner property of token-helpers
Returns: ERC20 units
Param |
---|
token |
amount |
Allocates (presale) tokens to the sender
Kind: inner property of token-helpers
Returns: transaction receipt
Param |
---|
token |
sender |
Import presale tokens to the token sale contract
Kind: inner property of token-helpers
Returns: transaction receipt
Param |
---|
token |
addresses |
balances |
Pausable helpers module
Pause the contract and wait until the transaction is mined
Kind: inner property of pausable-helpers
Param | Description |
---|---|
contract | Token truffle contract |
owner | Ethereum Address |
Unpause contract and wait until the transaction is mined
Kind: inner property of pausable-helpers
Param | Description |
---|---|
contract | Token Truffle Contract |
owner | Ethereum Address |
Ownership helpers module
- ownership-helpers
- ~transferOwnership ⇒
Object
- ~transferOwnerships
- ~lockOwnership ⇒
Object
- ~transferOwnership ⇒
Transfer ownership of input contract and wait until corresponding transaction is mined
Kind: inner property of ownership-helpers
Returns: Object
- transaction receipt
Param | Type | Description |
---|---|---|
contract | Object |
Truffle Contract Object |
sender | String |
|
receiver | String |
Transfer the ownerships of input contracts and wait until corresponding transactions are mined
Kind: inner property of ownership-helpers
Param | Type | Description |
---|---|---|
contracts | Object |
Truffle Object Contract Array |
sender | String |
|
receiver | String |
Lock ownership of input contract and wait until corresponding transaction is mined
Kind: inner property of ownership-helpers
Returns: Object
- Transaction Receipt
Param | Type | Description |
---|---|---|
contract | Object |
Truffle Object Contract Array |
owner | String |
- |