API
FixedSwapContract
Kind: global class
new FixedSwapContract(web3, tokenAddress, decimals, contractAddress)
Fixed Swap Object
Param | Type | Description |
web3 |
| |
tokenAddress |
| |
decimals |
| |
contractAddress |
| ? (opt) |
setNewOwner(address)
Set New Owner of the Contract
Kind: global function
Param | Type |
address |
|
owner() ⇒ string
string
Get Owner of the Contract
Kind: global function
Returns: string
- address
isPaused() ⇒ boolean
boolean
Get Owner of the Contract
Kind: global function
pauseContract() ⇒ admin
admin
Pause Contract
Kind: global function
erc20() ⇒ Address
Address
Get Token Address
Kind: global function
Returns: Address
- Token Address
decimals() ⇒ Integer
Integer
Get Decimals
Kind: global function
Returns: Integer
- Integer
unpauseContract() ⇒ admin
admin
Unpause Contract
Kind: global function
tradeValue() ⇒ Integer
Integer
Get swapratio for the pool
Kind: global function
Returns: Integer
- trade value against ETH
startDate() ⇒ Date
Date
Get Start Date of Pool
Kind: global function
endDate() ⇒ Date
Date
Get End Date of Pool
Kind: global function
isFinalized() ⇒ Boolean
Boolean
To see if contract was finalized
Kind: global function
individualMinimumAmount() ⇒ Integer
Integer
Get Individual Minimum Amount for each address
Kind: global function
individualMaximumAmount() ⇒ Integer
Integer
Get Individual Maximum Amount for each address
Kind: global function
minimumRaiseAchieved() ⇒ Boolean
Boolean
Was Minimum Raise Achieved
Kind: global function
minimumRaise() ⇒ Integer
Integer
Get Minimum Raise amount for Token Sale
Kind: global function
Returns: Integer
- Amount in Tokens
tokensAllocated() ⇒ Integer
Integer
Get Total tokens Allocated already, therefore the tokens bought until now
Kind: global function
Returns: Integer
- Amount in Tokens
tokensForSale() ⇒ Integer
Integer
Get Total tokens Allocated/In Sale for the Pool
Kind: global function
Returns: Integer
- Amount in Tokens
hasMinimumRaise() ⇒ Boolea
Boolea
See if hasMinimumRaise
Kind: global function
minimumReached() ⇒ Integer
Integer
See if minimumRaise was Reached
Kind: global function
tokensAvailable() ⇒ Integer
Integer
Get Total tokens owned by the Pool
Kind: global function
Returns: Integer
- Amount in Tokens
tokensLeft() ⇒ Integer
Integer
Get Total tokens available to be sold in the pool
Kind: global function
Returns: Integer
- Amount in Tokens
withdrawableUnsoldTokens() ⇒ Integer
Integer
Get Total tokens available to be withdrawn by the admin
Kind: global function
Returns: Integer
- Amount in Tokens
withdrawableFunds() ⇒ Integer
Integer
Get Total funds raised to be withdrawn by the admin
Kind: global function
Returns: Integer
- Amount in ETH
isTokenSwapAtomic() ⇒ Boolean
Boolean
Verify if the Token Swap is atomic on this pool
Kind: global function
hasWhitelisting() ⇒ Boolean
Boolean
Verify if swap has whitelisting
Kind: global function
isWhitelisted() ⇒ Boolean
Boolean
Verify if address is whitelisted
Kind: global function
wereUnsoldTokensReedemed() ⇒ Boolean
Boolean
Verify if the admin already reemeded unsold tokens
Kind: global function
isFunded() ⇒ Boolean
Boolean
Verify if the Token Sale is Funded with all Tokens proposed in tokensForSale
Kind: global function
isOpen() ⇒ Boolean
Boolean
Verify if the Token Sale is Open for Swap
Kind: global function
hasStarted() ⇒ Boolean
Boolean
Verify if the Token Sale has started the Swap
Kind: global function
hasFinalized() ⇒ Boolean
Boolean
Verify if the Token Sale has finalized, if the current date is after endDate
Kind: global function
isPreStart() ⇒ Boolean
Boolean
Verify if the Token Sale in not open yet, where the admin can fund the pool
Kind: global function
getPurchase(purchase_id) ⇒ Integer
| Integer
| Address
| Integer
| Date
| Boolean
| Boolean
Integer
| Integer
| Address
| Integer
| Date
| Boolean
| Boolean
Get Purchase based on ID
Kind: global function
Returns: Integer
- _idInteger
- amountAddress
- purchaserInteger
- ethAmountDate
- timestampBoolean
- wasFinalizedBoolean
- reverted
Param | Type |
purchase_id |
|
getWhiteListedAddresses() ⇒ Array
| Address
Array
| Address
Get Whitelisted Addresses
Kind: global function
Returns: Array
| Address
- addresses
getBuyers() ⇒ Array
| Integer
Array
| Integer
Get Buyers
Kind: global function
Returns: Array
| Integer
- _ids
getPurchaseIds() ⇒ Array
| Integer
Array
| Integer
Get All Purchase Ids
Kind: global function
Returns: Array
| Integer
- _ids
getPurchaseIds(address) ⇒ Array
| Integer
Array
| Integer
Get All Purchase Ids filter by Address/Purchaser
Kind: global function
Returns: Array
| Integer
- _ids
Param | Type |
address |
|
getETHCostFromTokens(tokenAmount) ⇒ Integer
Integer
Get ETH Cost from Tokens Amount
Kind: global function
Returns: Integer
- ethAmount
Param | Type |
tokenAmount |
|
swap(tokenAmount)
Swap tokens by Ethereum
Kind: global function
Param | Type |
tokenAmount |
|
redeemTokens(purchase_id)
Reedem tokens bought
Kind: global function
Param | Type |
purchase_id |
|
redeemGivenMinimumGoalNotAchieved(purchase_id)
Reedem Ethereum from sale that did not achieve minimum goal
Kind: global function
Param | Type |
purchase_id |
|
withdrawUnsoldTokens()
Withdraw unsold tokens of sale
Kind: global function
withdrawFunds()
Withdraw all funds from tokens sold
Kind: global function
approveFundERC20()
Approve the pool to use approved tokens for sale
Kind: global function
isApproved(tokenAmount, address) ⇒ Boolean
Boolean
Verify if the Admin has approved the pool to use receive the tokens for sale
Kind: global function
Param | Type |
tokenAmount |
|
address |
|
fund(tokenAmount)
Send tokens to pool for sale, fund the sale
Kind: global function
Param | Type |
tokenAmount |
|
addWhitelistedAddress(Addresses)
add WhiteListed Address
Kind: global function
Param | Type |
Addresses |
|
removeWhitelistedAddress()
remove WhiteListed Address
Kind: global function
safePull()
Safe Pull all tokens & ETH
Kind: global function
removeOtherERC20Tokens(tokenAddress, toAddress)
Remove Tokens from other ERC20 Address (in case of accident)
Kind: global function
Param | Type |
tokenAddress |
|
toAddress |
|
deploy()
Deploy the Pool Contract
Kind: global function
getOwner(Address)
Get owner address of contract
Kind: global function
Param | Type |
Address |
|
getBalance(Balance)
Get Balance of Contract
Kind: global function
Param | Type |
Balance |
|
Last updated