Takes a CalldataDecoding, which may have been produced in full mode or ABI mode, and converts it to its ABI mode equivalent. See the README for more information.
Please only use on decodings produced by this same decoder instance; use on decodings produced by other instances may not work consistently.
The decoding to abify
Takes a LogDecoding, which may have been produced in full mode or ABI mode, and converts it to its ABI mode equivalent. See the README for more information.
Please only use on decodings produced by this same decoder instance; use on decodings produced by other instances may not work consistently.
The decoding to abify
This method is asynchronous.
Takes a Log object and decodes it. Logs can be ambiguous, so this so this function returns an array of LogDecodings.
Note that logs are decoded in strict mode, so (with one exception) none of the decodings should contain errors; if a decoding would contain an error, instead it is simply excluded from the list of possible decodings. The one exception to this is that indexed parameters of reference type cannot meaningfully be decoded, so those will decode to an error.
If there are multiple possible decodings, they will always be listed in the following order:
You can check the kind and class.contractKind fields to distinguish between these.
If no possible decodings are found, the returned array of decodings will be empty.
Note that different decodings may use different decoding modes.
The log to be decoded.
This method is asynchronous.
Takes a Transaction object and decodes it. The result is a CalldataDecoding; see the documentation on that interface for more.
Note that decoding of transactions sent to libraries is presently not supported and may have unreliable results. Limited support for this is planned for future versions.
The transaction to be decoded.
This method is asynchronous.
Gets all events meeting certain conditions and decodes them. This function is fairly rudimentary at the moment but more functionality will be added in the future.
Used to determine what events to fetch; see the documentation on the EventOptions type for more.
An array of DecodedLogs. These consist of a log together with its possible decodings; see that type for more info. And see decodeLog for more info on how log decoding works in general.
This method is asynchronous.
Constructs a contract decoder for a given contract artifact.
The artifact for the contract.
A contract constructor object may be substituted for the artifact, so if you're not sure which you're dealing with, it's OK.
Note: The artifact must be one of the ones used to initialize the wire decoder; otherwise you will have problems.
This method is asynchronous.
Constructs a contract instance decoder for a given instance of a contract in this project.
The artifact for the contract.
A contract constructor object may be substituted for the artifact, so if you're not sure which you're dealing with, it's OK.
Note: The artifact must be one of the ones used to initialize the wire decoder; otherwise you will have problems.
The address of the contract instance decode. If left out, it will be autodetected. If an invalid address is provided, this method will throw an exception.
Generated using TypeDoc
The WireDecoder class. Decodes transactions and logs. See below for a method listing.