Constructor
new EthereumEvolutionLand(web3js, network)
- Source:
constructor function.
Parameters:
Name | Type | Description |
---|---|---|
web3js |
object | web3js instance |
network |
string |
Methods
(async) addUniswapLiquidity(param0, param1, to, slippage, callback)
- Source:
Adds liquidity to an ERC-20⇄ERC-20 pool
msg.sender should have already given the router an allowance of at least amount on tokenA/tokenB.
Always adds assets at the ideal ratio, according to the price when the transaction is executed.
Parameters:
Name | Type | Description |
---|---|---|
param0 |
* | {token: tokenAType, amount: amountA} |
param1 |
* | {token: tokenBType, amount: amountB} |
to |
* | Recipient of the liquidity tokens. |
slippage |
* | The amount the price moves in a trading pair between when a transaction is submitted and when it is executed. |
callback |
* |
apostleBid(amount, tokenId, referrer) → {Promise.<PromiEvent.<any>>}
- Source:
Bid apostle by RING token
Parameters:
Name | Type | Description |
---|---|---|
amount |
RING amount |
|
tokenId |
Apostle token ID |
|
referrer |
refer address |
Returns:
- Type
- Promise.<PromiEvent.<any>>
apostleBorn(motherTokenId)
- Source:
Apostle Born without element
Parameters:
Name | Type | Description |
---|---|---|
motherTokenId |
apostleBornAndEnhance(motherTokenId, element, level, levelUnitPrice)
- Source:
Apostle Born with element
Parameters:
Name | Type | Description |
---|---|---|
motherTokenId |
||
element |
||
level |
||
levelUnitPrice |
apostleBreed(tokenId, targetTokenId, amount) → {Promise.<PromiEvent.<any>>}
- Source:
Apostle reproduction in own
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
||
targetTokenId |
||
amount |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) apostleBreedAuction(tokenId, start, end, duration) → {Promise.<PromiEvent.<any>>}
- Source:
Apostle Breed Auction
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle tokenId |
|
start |
start price |
|
end |
end price |
|
duration |
auction duration time |
Returns:
- Type
- Promise.<PromiEvent.<any>>
apostleBreedBid(tokenId, targetTokenId, amount)
- Source:
Apostle reproduction
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
||
targetTokenId |
||
amount |
apostleCancelBreedAuction(tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Cancel apostle breed auction
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Returns:
- Type
- Promise.<PromiEvent.<any>>
apostleCancelHire(tokenId)
- Source:
Cancel an apostle on Renting
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle tokenId |
apostleCancelSell(tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Cancel the auction by apostle token ID
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
apostle token ID |
Returns:
- Type
- Promise.<PromiEvent.<any>>
apostleClaim(tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Receive apostle
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle Token ID |
Returns:
- Type
- Promise.<PromiEvent.<any>>
apostleHire(tokenId, duration, price)
- Source:
Renting apostles to work
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle TokenId |
|
duration |
Duration in second |
|
price |
Hire Price |
apostleHireBid(tokenId, price)
- Source:
Bid apostle on Renting
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle tokenId |
|
price |
bid price |
apostleHireClaim(tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Claim an apostle that expires at work
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle TokenId |
Returns:
- Type
- Promise.<PromiEvent.<any>>
apostleRewardClaim(tokenId, nftData) → {Promise.<PromiEvent.<any>>}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
||
nftData |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) apostleSell(tokenId, start, end, duration) → {Promise.<PromiEvent.<any>>}
- Source:
Sell apostle
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle Token ID |
|
start |
auction start price |
|
end |
auction end price |
|
duration |
duration time |
Returns:
- Type
- Promise.<PromiEvent.<any>>
apostleStopWorking(tokenId)
- Source:
Stop apostle mining
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle tokenId |
(async) apostleTransfer(toAddress, tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Transfer apostle
Parameters:
Name | Type | Description |
---|---|---|
toAddress |
||
tokenId |
Returns:
- Type
- Promise.<PromiEvent.<any>>
apostleWork(tokenId, landTokenId, element)
- Source:
Let apostle go to work
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Apostle tokenId |
|
landTokenId |
Land tokenId |
|
element |
['gold', 'wood', 'water', 'fire' ,'soil'] |
(async) approveLiquidityTokenToUniswap(tokenAType, tokenBType, value, callback)
- Source:
Approve liquidity to uniswap
Parameters:
Name | Type | Default | Description |
---|---|---|---|
tokenAType |
* | Token 0 contract address |
|
tokenBType |
* | Token 1 contract address |
|
value |
* |
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
Approved value |
callback |
* |
(async) approveRingToUniswap(callback)
- Source:
Ethereum Function, Approve Ring to Uniswap Exchange
Parameters:
Name | Type | Description |
---|---|---|
callback |
* |
(async) approveToken(tokenContractOrType, spender, value, callback)
- Source:
Allows spender to withdraw from your account multiple times, up to the value amount. If this function is called again it overwrites the current allowance with value.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
tokenContractOrType |
* | Erc20 token contract address |
|
spender |
* | ||
value |
* |
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
|
callback |
* |
approveTokenToUniswap(addressOrType, value, callback)
- Source:
Allows Uniswap to withdraw from your account multiple times, up to the value amount.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
addressOrType |
* | ERC20 token contract address. |
|
value |
* |
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
|
callback |
* |
(async) approveUniswapLiquidityToken(tokenAType, tokenBType, value, callback)
- Source:
Approve uniswap liquidity token to spender.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
tokenAType |
* | ||
tokenBType |
* | ||
value |
* |
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
|
callback |
* |
(async) AtlantisSwapBridge(value, value, callback)
- Source:
Atlantis ring transfer to Byzantium
Parameters:
Name | Type | Description |
---|---|---|
value |
string | amount of rings to be swaped |
value |
string | tron address (bs58) |
callback |
* |
bridgeInAndTie(originNftAddress, originTokenId, apostleTokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Bind pet
Parameters:
Name | Type | Description |
---|---|---|
originNftAddress |
||
originTokenId |
||
apostleTokenId |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) buyFurnaceTreasure(goldBoxAmount, silverBoxAmount)
- Source:
buy lucky box
Parameters:
Name | Type | Default | Description |
---|---|---|---|
goldBoxAmount |
* |
0
|
gold box amount |
silverBoxAmount |
* |
0
|
silver box amount |
buyLandContract(amount, tokenId, referrer) → {Promise.<PromiEvent.<any>>}
- Source:
Bid Land Assets with Ring token.
Parameters:
Name | Type | Description |
---|---|---|
amount |
bid price with ring token |
|
tokenId |
tokenid of land |
|
referrer |
Referrer address |
Returns:
- Type
- Promise.<PromiEvent.<any>>
buyLandWithETHContract(tokenId, referer, value) → {Promise.<PromiEvent.<any>>}
- Source:
Bid Land Assets with Ether.
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
tokenid of land |
|
referer |
Referrer address |
|
value |
bid price with ether |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) buyLuckyBox(buyer, goldBoxAmount, silverBoxAmount)
- Source:
buy lucky box
Parameters:
Name | Type | Description |
---|---|---|
buyer |
* | Receiver |
goldBoxAmount |
* | gold box amount |
silverBoxAmount |
* | silver box amount |
buyRing(value) → {Promise.<PromiEvent.<any>>}
- Source:
Buy ring token with Ether.
Parameters:
Name | Type | Description |
---|---|---|
value |
string | amount for Ether, unit of measurement(wei) |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) buyRingUniswap(value) → {Promise.<PromiEvent.<any>>}
- Source:
Swap Ether to Ring token - Powered by uniswap.
Parameters:
Name | Type | Description |
---|---|---|
value |
string | amount for Ring, unit of measurement(wei) |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) callContract(methodName, abiKey, abiString, contractParams, sendParams, beforeFetch, transactionHashCallback, confirmationCallback, receiptCallback, errorCallback) → {Promise.<PromiEvent.<any>>}
- Source:
Interact with a contract.
Parameters:
Name | Type | Description |
---|---|---|
methodName |
string | contract method name |
abiKey |
string | If the contract exists in the configuration file, you can use the key in the configuration to get it directly. |
abiString |
json | ethereum ABI json |
contractParams |
contract function with arguments |
|
sendParams |
web3js send() arguments |
|
beforeFetch |
||
transactionHashCallback |
||
confirmationCallback |
||
receiptCallback |
||
errorCallback |
Returns:
- Type
- Promise.<PromiEvent.<any>>
cancelAuction(tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Cancel the Land being auctioned.
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
string | tokenid of land |
Returns:
- Type
- Promise.<PromiEvent.<any>>
checkAddress(address)
- Source:
check address info
Parameters:
Name | Type | Description |
---|---|---|
address |
Ethereum address |
(async) checkTokenAllowance(amount, tokenAddressOrType,, account, spender)
- Source:
Check if spender has sufficient transfer authority
Parameters:
Name | Type | Description |
---|---|---|
amount |
* | |
tokenAddressOrType, |
* | |
account |
* | |
spender |
* |
(async) checkUniswapAllowance(amount, tokenAddressOrType, account)
- Source:
Check if uniswap has sufficient transfer authority
Parameters:
Name | Type | Default | Description |
---|---|---|---|
amount |
* | ||
tokenAddressOrType |
* |
ring
|
|
account |
* |
claimFurnaceItemResource(tokenAddress, tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
claim resource on the Land
Parameters:
Name | Type | Description |
---|---|---|
tokenAddress |
The nft of props contract address |
|
tokenId |
Land token Id |
Returns:
- Type
- Promise.<PromiEvent.<any>>
claimLandAsset(tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Claim land asset
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Land tokenId |
Returns:
- Type
- Promise.<PromiEvent.<any>>
claimLandResource(tokenId) → {Promise.<PromiEvent.<any>>}
- Source:
claim resource on the Land
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Land token Id. |
Returns:
- Type
- Promise.<PromiEvent.<any>>
createRedPackageContract(amount, number, packetId) → {Promise.<PromiEvent.<any>>}
- Source:
create a red package
Parameters:
Name | Type | Description |
---|---|---|
amount |
amount of red package |
|
number |
number of received |
|
packetId |
packet ID |
Returns:
- Type
- Promise.<PromiEvent.<any>>
disenchantFurnanceProps(propsTokenId, depth, callback)
- Source:
Disenchant furnace props, and will get elements or LP and nft
Parameters:
Name | Type | Description |
---|---|---|
propsTokenId |
* | Token Id of the Props |
depth |
* | Supports one-time decomposition of high-level props. If a prop is in the second level, it needs to be restored to its original state, and the depth needs to be passed in 2 |
callback |
* |
divestLandProps(tokenId, index, callback)
- Source:
Divest the props on the index slot on the tokenid land
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
* | The tokenId of land |
index |
* | The index slot |
callback |
* |
enchantFurnanceProps(formulaIndex, majorTokenId, minorTokenAddress, callback)
- Source:
Use nft and elements or LP tokens in the furnace formula to the props.
Parameters:
Name | Type | Description |
---|---|---|
formulaIndex |
* | Formula for props - https://github.com/evolutionlandorg/furnace/blob/dev/src/Formula.sol |
majorTokenId |
* | ERC721 token Id |
minorTokenAddress |
* | Elements or LP tokens contract address |
callback |
* | callback |
(async) equipLandResource(tokenId, resource, index, token, id, callabck)
- Source:
Equip function, A NFT can equip to EVO Bar (LandBar or ApostleBar).
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
* | Land token Id which to be quiped. |
resource |
* | Which resouce appply to. |
index |
* | Index of the Bar. |
token |
* | Props token address which to quip. |
id |
* | Props token Id which to quip. |
callabck |
* |
(async) erc721Approve(to, tokenId)
- Source:
Change or reaffirm the approved address for an NFT
Parameters:
Name | Type | Description |
---|---|---|
to |
* | The new approved NFT controller |
tokenId |
* | The NFT to approve |
erc721IsApprovedForAll(owner, operator, contractAddress)
- Source:
Query if an address is an authorized operator for another address
Parameters:
Name | Type | Description |
---|---|---|
owner |
* | The address that owns the NFTs |
operator |
* | The address that acts on behalf of the owner |
contractAddress |
* | ERC721 contract address |
erc721IsApprovedForAll(owner, operator, contractAddress, callback)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
owner |
* | |
operator |
* | |
contractAddress |
* | |
callback |
* |
(async) erc721IsApprovedOrOwner(spender, contractAddress, tokenId)
- Source:
Returns whether spender
is allowed to manage tokenId
.
Parameters:
Name | Type | Description |
---|---|---|
spender |
* | The address that acts on behalf of the owner |
contractAddress |
* | The factory of tokenId. |
tokenId |
* | ERC721 token Id; |
(async) erc721SetApprovalForAll(to, approved, contractAddress, callback)
- Source:
Enable or disable approval for a third party ("operator") to manage
Parameters:
Name | Type | Description |
---|---|---|
to |
* | Address to add to the set of authorized operators |
approved |
* | True if the operator is approved, false to revoke approval |
contractAddress |
* | ERC721 contract address |
callback |
* |
(async) fetchAtlantisSwapFee(value, callback)
- Source:
Atlantis swap fee
Parameters:
Name | Type | Description |
---|---|---|
value |
string | amount of rings to be swaped |
callback |
* |
(async) getContractAddress(tokenKey)
- Source:
Get the contract address of evolution land by key.
Parameters:
Name | Type | Description |
---|---|---|
tokenKey |
* | ring | kton | gold ... |
getCurrentAccount() → {Promise.<any>}
- Source:
get web3js Current address.
Returns:
- Type
- Promise.<any>
(async) getDerivedBurnInfo(tokenAType, tokenBType, liquidityValue, to) → {*}
- Source:
Support for removeUniswapLiquidity function, assuming removal percentage of liquidity and the return router pair instances and elements are returned.
tokenType - token address or lowercase symbol (ring kton gold wood water fire soil)
pair - https://uniswap.org/docs/v2/SDK/pair/
TokenAmount - https://github.com/Uniswap/uniswap-sdk/blob/v2/src/entities/fractions/tokenAmount.ts
parsedAmounts - {
LIQUIDITY_PERCENT: percent,
liquidityTokenAddress: TokenAmount,
token0Address: TokenAmount,
token1Address: TokenAmount
}
Parameters:
Name | Type | Description |
---|---|---|
tokenAType |
* | |
tokenBType |
* | |
liquidityValue |
* | The value of liquidity removed |
to |
* |
Returns:
{pair, parsedAmounts}
- Type
- *
(async) getDerivedMintInfo(param0, param1) → {*}
- Source:
Support for addUniswapLiquidity function, and the return router pair instances and elements are returned.
Only one account needs to be provided, and the other quantity needs to be provided according to the current pool price
tokenType - token address or lowercase symbol (ring kton gold wood water fire soil)
amount - amount in WEI
Parameters:
Name | Type | Description |
---|---|---|
param0 |
* | {token: tokenAType, amount: amountA} |
param1 |
* | {token: tokenBType, amount: amountB} |
Returns:
{pair, parsedAmounts} pair - https://uniswap.org/docs/v2/SDK/pair/ parsedAmounts - {token0address: amount, token1address: amount}
- Type
- *
(async) getDerivedPairInfo(tokenA, tokenB) → {pair}
- Source:
Get uniswap pair info
Parameters:
Name | Type | Description |
---|---|---|
tokenA |
* | token address or lowercase symbol (ring kton gold wood water fire soil) |
tokenB |
* | token address or lowercase symbol (ring kton gold wood water fire soil) |
Returns:
pair - https://uniswap.org/docs/v2/SDK/pair/
- Type
- pair
(async) getEthToTokenOutputPrice(tokens_bought)
- Source:
Eth will be cost to swap 1 Ring
Parameters:
Name | Type | Default | Description |
---|---|---|---|
tokens_bought |
* |
1000000000000000000
|
getFurnaceTreasurePrice()
- Source:
get furnace treasure price
Returns:
- promise -> {0: "1026000000000000000000", 1: "102000000000000000000", priceGoldBox: "1026000000000000000000", priceSilverBox: "102000000000000000000"}
getKtonBalance(address)
- Source:
Returns the amount of KTON owned by account
Parameters:
Name | Type | Description |
---|---|---|
address |
* |
getLuckyBoxInfo() → {Array}
- Source:
lucky box information
Returns:
- promise -> [goldBoxPrice, silverBoxPrice, goldBoxAmountForSale, silverBoxAmountForSale, goldSaleLimit, silverSaleLimit]
- Type
- Array
getLuckyBoxSalesRecord(address) → {Array}
- Source:
Number of lucky box already purchased at this address
Parameters:
Name | Type | Description |
---|---|---|
address |
* | buyer |
Returns:
- promise -> [goldSalesRecord, silverSalesRecord]
- Type
- Array
getRingBalance(address)
- Source:
Returns the amount of RING owned by account
Parameters:
Name | Type | Description |
---|---|---|
address |
* |
getTokenBalance(account, contractAddress)
- Source:
Returns the amount of tokens owned by account
Parameters:
Name | Type | Description |
---|---|---|
account |
* | |
contractAddress |
* |
(async) getTokenToEthInputPrice(tokens_bought)
- Source:
Eth will be got to swap 1 Ring
Parameters:
Name | Type | Default | Description |
---|---|---|---|
tokens_bought |
* |
1000000000000000000
|
getTokenTotalSupply(contractAddress)
- Source:
Get total supply of erc20 token
Parameters:
Name | Type | Description |
---|---|---|
contractAddress |
* | Erc20 contract address |
(async) getUniswapEthBalance()
- Source:
get amount of ether in uniswap exchange
getUniswapToken(tokenType)
- Source:
Get uniswap Token info by lowercase symbol
Token - https://uniswap.org/docs/v2/SDK/token/
Parameters:
Name | Type | Description |
---|---|---|
tokenType |
* | ring kton gold wood water fire soil |
(async) getUniswapTokenBalance()
- Source:
get amount of ring in uniswap exchange
(async) login(address) → {Promise.<*>}
- Source:
Login Evolution Land
Parameters:
Name | Type | Description |
---|---|---|
address |
Ethereum address |
Returns:
- Type
- Promise.<*>
lotteryFromPoint(type) → {Promise.<PromiEvent.<any>>}
- Source:
Play a ticket game
Parameters:
Name | Type | Default | Description |
---|---|---|---|
type |
small
|
['small':playWithSmallTicket , 'large': playWithLargeTicket] |
Returns:
- Type
- Promise.<PromiEvent.<any>>
openFurnaceTreasure() → {Promise.<PromiEvent.<any>>}
- Source:
open furnace treasure
Returns:
- Type
- Promise.<PromiEvent.<any>>
redeemRing(amount, id) → {Promise.<PromiEvent.<any>>}
- Source:
Redemption of unexpired ring.
Parameters:
Name | Type | Description |
---|---|---|
amount |
penalty Kton amount |
|
id |
deposit ID |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) removeUniswapLiquidity(tokenAType, tokenBType, liquidityValue, to, slippage, callback)
- Source:
Removes liquidity from an ERC-20⇄ERC-20 pool.
msg.sender should have already given the router an allowance of at least liquidity on the pool.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
tokenAType |
* | A pool token. |
|
tokenBType |
* | A pool token. |
|
liquidityValue |
* | The value of liquidity tokens to remove. |
|
to |
* | Recipient of the underlying assets. |
|
slippage |
* |
100
|
The amount the price moves in a trading pair between when a transaction is submitted and when it is executed. |
callback |
* |
safeTransferFromEvoErc721(from, to, tokenId, callback)
- Source:
Transfers the ownership of an NFT from one address to another address
Parameters:
Name | Type | Description |
---|---|---|
from |
* | The current owner of the NFT |
to |
* | The new owner |
tokenId |
* | The NFT to transfer |
callback |
* |
saveRing(amount, month) → {Promise.<PromiEvent.<any>>}
- Source:
Lock ring token to get Kton token
Parameters:
Name | Type | Description |
---|---|---|
amount |
ring amount |
|
month |
Locking time(unit: month) |
Returns:
- Type
- Promise.<PromiEvent.<any>>
sellRing(amount) → {Promise.<PromiEvent.<any>>}
- Source:
Convert Ring token to Ether via bancor exchange
Parameters:
Name | Type | Description |
---|---|---|
amount |
ring token amount |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) sellRingUniswap(value) → {Promise.<PromiEvent.<any>>}
- Source:
Swap Ring token to Ether - Powered by uniswap.
Parameters:
Name | Type | Description |
---|---|---|
value |
string | amount for Ring, unit of measurement(wei) |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) setLandPrice(tokenId, start, end, duration) → {Promise.<PromiEvent.<any>>}
- Source:
Sell land asset
Parameters:
Name | Type | Description |
---|---|---|
tokenId |
Land tokenId |
|
start |
start price |
|
end |
end price |
|
duration |
bid duration time in second |
Returns:
- Type
- Promise.<PromiEvent.<any>>
(async) tokenTransfer(value, to, symbol, callback)
- Source:
Transfers value amount of tokens to address to
Parameters:
Name | Type | Description |
---|---|---|
value |
string | amount of tokens |
to |
string | receiving address |
symbol |
string | symbol of token [ring, kton, gold, wood, water, fire, soil] |
callback |
* |
(async) transferFromLand(from, to, tokenId) → {*}
- Source:
tansfer the Land
Parameters:
Name | Type | Description |
---|---|---|
from |
address | sender address |
to |
address | receiver |
tokenId |
string | Land token ID |
Returns:
- Type
- *
(async) transferFromObjectOwnership(to, tokenId, callback)
- Source:
transfer evo land 721 object
Parameters:
Name | Type | Description |
---|---|---|
to |
* | recevier |
tokenId |
* | 721 tokenid |
callback |
* |
(async) triggerContract(methodName, abiKey, abiString, contractParams, sendParams, beforeFetch, transactionHashCallback, confirmationCallback, receiptCallback, errorCallback) → {Promise.<PromiEvent.<any>>}
- Source:
Interact with a contract.
Parameters:
Name | Type | Description |
---|---|---|
methodName |
string | contract method name |
abiKey |
string | If the contract exists in the configuration file, you can use the key in the configuration to get it directly. |
abiString |
json | ethereum ABI json |
contractParams |
contract function with arguments |
|
sendParams |
web3js send() arguments |
|
beforeFetch |
||
transactionHashCallback |
||
confirmationCallback |
||
receiptCallback |
||
errorCallback |
Returns:
- Type
- Promise.<PromiEvent.<any>>
untiePetToken(petTokenId) → {Promise.<PromiEvent.<any>>}
- Source:
Unbind pet
Parameters:
Name | Type | Description |
---|---|---|
petTokenId |
Returns:
- Type
- Promise.<PromiEvent.<any>>
updateTesterRole(_nonce, _testerCodeHash, _hashmessage, _v, _r, _s) → {Promise.<PromiEvent.<any>>}
- Source:
Binding tester code
Parameters:
Name | Type | Description |
---|---|---|
_nonce |
||
_testerCodeHash |
||
_hashmessage |
||
_v |
||
_r |
||
_s |
Returns:
- Type
- Promise.<PromiEvent.<any>>
withdrawBankRing(id) → {Promise.<PromiEvent.<any>>}
- Source:
Redemption ring without penalty kton
Parameters:
Name | Type | Description |
---|---|---|
id |
deposit ID |
Returns:
- Type
- Promise.<PromiEvent.<any>>
withdrawKton(nonce, value, hash, v, r, s) → {Promise.<PromiEvent.<any>>}
- Source:
Withdraw kton from the channel
Parameters:
Name | Type | Description |
---|---|---|
nonce |
||
value |
||
hash |
||
v |
||
r |
||
s |
Returns:
- Type
- Promise.<PromiEvent.<any>>
withdrawRing(nonce, value, hash, v, r, s) → {Promise.<PromiEvent.<any>>}
- Source:
Withdraw ring from the channel
Parameters:
Name | Type | Description |
---|---|---|
nonce |
||
value |
||
hash |
||
v |
||
r |
||
s |
Returns:
- Type
- Promise.<PromiEvent.<any>>