Home Reference Source
import Deployer from 'kyber-fpr-sdk/src/deployer.js'
public class | source

Deployer

Deployer is used for deploying new KyberNetwork reserve contracts. It deployed all requires smart contracts for running a reserve:

  • reserve
  • conversionRates
  • sanityRates (optional)

Constructor Summary

Public Constructor
public

Create a deployer instance with given account parameter.

Member Summary

Public Members
public

web3: *

Method Summary

Public Methods
public

async deploy(adminAddress: object, network: string, sanityRates: boolean, gasPrice: number): Addresses

Deploy new reserve and pricing contracts.

public

async deploySanityRates(adminAddress: *, gasPrice: *): *

Public Constructors

public constructor(web3: object) source

Create a deployer instance with given account parameter.

Params:

NameTypeAttributeDescription
web3 object

Web3 instance

Public Members

public web3: * source

Public Methods

public async deploy(adminAddress: object, network: string, sanityRates: boolean, gasPrice: number): Addresses source

Deploy new reserve and pricing contracts.

Params:

NameTypeAttributeDescription
adminAddress object

Web3 account to create the smart contracts. This account is also set to be admin of the contracts

network string
  • optional

Address of KyberNetwork smart contract.

sanityRates boolean
  • optional
  • default: false

If true, sanityRates contract will be deployed.

gasPrice number

(optional) - the gasPrice desired for the tx

Return:

Addresses

Deployed reserve addresses set.

public async deploySanityRates(adminAddress: *, gasPrice: *): * source

Params:

NameTypeAttributeDescription
adminAddress *
gasPrice *

Return:

*