Function
Static Public Summary | ||
public |
async assertAdmin(contract: *, address: *) |
|
public |
async assertAlerter(contract: *, address: *) |
|
public |
async assertOperator(contract: *, address: *) |
|
public |
buildCompactBulk(newBuys: *, newSells: *, indices: *): {buyResults: Array, sellResults: Array, indexResults: Array} Build the compact data input. |
|
public |
validateAddress(address: *) throw an exception if the given address is not a valid Ethereum address. |
Static Public
public async assertAdmin(contract: *, address: *) source
import {assertAdmin} from 'kyber-fpr-sdk/src/permission_assert.js'
Params:
Name | Type | Attribute | Description |
contract | * | ||
address | * |
public async assertAlerter(contract: *, address: *) source
import {assertAlerter} from 'kyber-fpr-sdk/src/permission_assert.js'
Params:
Name | Type | Attribute | Description |
contract | * | ||
address | * |
public async assertOperator(contract: *, address: *) source
import {assertOperator} from 'kyber-fpr-sdk/src/permission_assert.js'
Params:
Name | Type | Attribute | Description |
contract | * | ||
address | * |
public buildCompactBulk(newBuys: *, newSells: *, indices: *): {buyResults: Array, sellResults: Array, indexResults: Array} source
import {buildCompactBulk} from 'kyber-fpr-sdk/src/conversion_rates_contract.js'
Build the compact data input. In ConversionRates contract, the compact data is stored in two dimensions array with location:
- bulkIndex
- indexInBulk
When setting compact data, user needs to submit the whole bulk along with its index.
Params:
Name | Type | Attribute | Description |
newBuys | * | buy compact data |
|
newSells | * | sell compact data |
|
indices | * | map of address to its bulk index |
public validateAddress(address: *) source
import {validateAddress} from 'kyber-fpr-sdk/src/validate.js'
throw an exception if the given address is not a valid Ethereum address.
Params:
Name | Type | Attribute | Description |
address | * | {string} - an Ethereum address |