Home Reference Source

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:

NameTypeAttributeDescription
contract *
address *

public async assertAlerter(contract: *, address: *) source

import {assertAlerter} from 'kyber-fpr-sdk/src/permission_assert.js'

Params:

NameTypeAttributeDescription
contract *
address *

public async assertOperator(contract: *, address: *) source

import {assertOperator} from 'kyber-fpr-sdk/src/permission_assert.js'

Params:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
newBuys *

buy compact data

newSells *

sell compact data

indices *

map of address to its bulk index

Return:

{buyResults: Array, sellResults: Array, indexResults: Array}

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:

NameTypeAttributeDescription
address *

{string} - an Ethereum address