Readonly blocksReadonly bytecodeThe bytecode used to create this Contract.
Readonly chunksReadonly errorsSymbolic execution errors found during interpretation of this.bytecode.
Readonly eventsReadonly functionReadonly functionsReadonly mainReadonly mappingsReadonly metadataThe metadataHash part from the bytecode.
That is, if present, the bytecode without its code.
Readonly opcodesReadonly payableReadonly revertsReadonly variableshttps://eips.ethereum.org/EIPS/eip-165 https://eips.ethereum.org/EIPS/eip-20 https://eips.ethereum.org/EIPS/eip-20 https://eips.ethereum.org/EIPS/eip-721
Looks up for matching function and event selectors in the api.openchain.xyz remote API.
The endpoint used to fetch signatures is https://api.openchain.xyz/signature-database/v1/lookup.
Please note that the global Fetch API is used to make the request.
When a matching function or event is found,
it patches the Contract's function or event with the corresponding signature.
The lookup argument is an input/output argument to cache the result of the lookup.
When no argument is provided (default) or empty object, it always performs the request to the remote API (no caching).
In addition, it will populate the lookup argument with the result signatures of the request.
In turn, this lookup result signatures can be provided to the next invocation to patch (for the same contract) to avoid making a request to the remote API.
Thus, when catching the lookup, make sure to always pass a reference instead of a value.
In the following example, whenever the abiPath file exists,
the contract will be patched using the respective lookup signatures and avoid making the request to the remote API.
On the other hand, when it does not exist, it will make the request to fetch function and event signatures.
const abiPath = "path/to/save/contract/abi";
let lookup;
if (fs.existsSync(abiPath)) {
lookup = JSON.parse(fs.readFileSync(abiPath, 'utf8'));
} else {
lookup = {};
}
contract = await contract.patch(lookup);
Generated using TypeDoc v0.25.2
the bytecode to analyze in hexadecimal format.