iexec / IExecNetworkModule
module exposing network methods
new IExecNetworkModule(
configOrArgs,options?):IExecNetworkModule
Create an IExecModule instance
IExecNetworkModule
config:
IExecConfig
current IExecConfig
getNetwork():
Promise<{chainId:string;isNative:boolean; }>
get info about the current iExec network
NB: isNative is true when the iExec instance use the chain's native token for payment (otherwise the payment token is an ERC20)
example:
const { chainId, isNative } = await getNetwork();
console.log(`working on chain ${chainId}, using native token: ${isNative}`);Promise<{ chainId: string; isNative: boolean; }>
staticfromConfig(config):IExecNetworkModule
Create an IExecNetworkModule instance using an IExecConfig instance
IExecNetworkModule