Options
All
  • Public
  • Public/Protected
  • All
Menu

This type contains information needed to initialize the encoder.

Hierarchy

  • EncoderSettings

Index

Properties

This field can be included to enable or disable ENS resolution and specify how it should be performed. If absent, but a provider was given above, ENS resolution will be performed using that.

networkId?: number

Optionally include a network ID; this is used for the same purposes as the provider (see above), but won't turn on ENS resolution.

There is no need to include this when using a Truffle Contract based constructor, as it will use the contract's network ID, but if you do include it, it will override that network ID.

If this is passed in addition to provider, this network ID will override the one from provider.

Information about the project or contracts being decoded. This may come in several forms; see the type documentation for more information. The simplest way to use this to set it to { artifacts: <array of artifacts in project> }.

This may be left out if an artifact or contract has been passed in by some other means, in which case the encoder will be made based purely on that single contract, but it's recommended to pass in project info for all your contracts to get the encoder's full power.

provider?: Provider

Optionally include a provider; if given, this allows the encoder to know the current network ID and thereby perform any necessary library linking when encoding a contract creation. If you attempt to encode a contract creation transaction for a contract that still has unlinked libraries, and do not provide the information needed to link them, an exception will be thrown.

There is no need to include this when using a Truffle Contract based constructor, as it will use the contract's provider, but if you do include it, it will override that provider.

Including this will also turn on ENS resolution unless it is turned off in the ENS settings (see below).

Generated using TypeDoc