Skip to content

Latest commit

 

History

History
91 lines (48 loc) · 1.45 KB

File metadata and controls

91 lines (48 loc) · 1.45 KB

iexec


iexec / IExecNetworkModule

Class: IExecNetworkModule

module exposing network methods

Extends

Constructors

Constructor

new IExecNetworkModule(configOrArgs, options?): IExecNetworkModule

Create an IExecModule instance

Parameters

configOrArgs

IExecConfigArgs | IExecConfig

options?

IExecConfigOptions

Returns

IExecNetworkModule

Inherited from

IExecModule.constructor

Properties

config

config: IExecConfig

current IExecConfig

Inherited from

IExecModule.config

Methods

getNetwork()

getNetwork(): Promise<{ chainId: string; }>

get info about the current iExec network

example:

const { chainId } = await getNetwork();
console.log(`working on chain ${chainId}`);

Returns

Promise<{ chainId: string; }>


fromConfig()

static fromConfig(config): IExecNetworkModule

Create an IExecNetworkModule instance using an IExecConfig instance

Parameters

config

IExecConfig

Returns

IExecNetworkModule

Overrides

IExecModule.fromConfig