SanityRatesContract
Extends:
SanityRatesContract represents the KyberNetwork sanity rates smart contract. It's purpose is to prevent unusual rates from conversion rates contract to be used.
Constructor Summary
Public Constructor | ||
public |
constructor(provider: object, address: string) Create new SanityRatesContract instance. |
Method Summary
Public Methods | ||
public |
getSanityRate(src: string, dest: string): string Return the sanity Rate of a pair of token |
|
public |
reasonableDiffInBps(address: string): string resonableDiffInBps return the list of reasonableDiffs in basis points (bps) |
|
public |
async setReasonableDiff(adminAddress: object, addresses: string[], diffs: uint[], gasPrice: number): object setResonableDiff Set reasonable conversion rate difference in percentage (any conversion rate outside of this range is considered unreasonable). |
|
public |
async setSanityRates(operatorAddress: object, srcs: string[], rates: uint[], gasPrice: number): object Set Sanity Rate for the contract |
Inherited Summary
From class BaseContract | ||
public |
contract: * |
|
public |
web3: * |
|
public |
async addAlerter(adminAddress: object, address: string, gasPrice: number): * Add new address to alerters list. |
|
public |
async addOperator(adminAddress: object, address: string, gasPrice: number): * Add given address from operators list. |
|
public |
Return the current admin address of contract. |
|
public |
async claimAdmin(newAccount: object, gasPrice: number): * Claim admin privilege. |
|
public |
getAlerters(): array Return alerter addresses of contract. |
|
public |
getOperators(): array Return operator addresses of contract. |
|
public |
Return the pending admin address of contract. |
|
public |
async removeAlerter(adminAddress: object, address: string, gasPrice: number): * Remove address from alerters list. |
|
public |
async removeOperator(adminAddress: object, address: string, gasPrice: number): * Remove given address from operators list. |
|
public |
async transferAdmin(adminAddress: object, address: string, gasPrice: number): * transfer admin privilege to given address. |
Public Constructors
Public Members
Public Methods
public getSanityRate(src: string, dest: string): string source
Return the sanity Rate of a pair of token
public reasonableDiffInBps(address: string): string source
resonableDiffInBps return the list of reasonableDiffs in basis points (bps)
Params:
Name | Type | Attribute | Description |
address | string | ERC20 token contract address to query |
public async setReasonableDiff(adminAddress: object, addresses: string[], diffs: uint[], gasPrice: number): object source
setResonableDiff Set reasonable conversion rate difference in percentage (any conversion rate outside of this range is considered unreasonable).