MCPcopy Create free account
hub / github.com/ccxt/ccxt / encodeFunctionResult

Method encodeFunctionResult

js/src/static_dependencies/ethers/interface.js:696–703  ·  view source on GitHub ↗

* Encodes the result data (e.g. from an ``eth_call``) for the * specified function (see [[getFunction]] for valid values * for %%fragment%%) with %%values%%. * * This is generally not used by most developers, unless trying to mock * a result from a Contract.

(fragment, values)

Source from the content-addressed store, hash-verified

694 * a result from a Contract.
695 */
696 encodeFunctionResult(fragment, values) {
697 if (typeof (fragment) === "string") {
698 const f = this.getFunction(fragment);
699 assertArgument(f, "unknown function", "fragment", fragment);
700 fragment = f;
701 }
702 return hexlify(this.#abiCoder.encode(fragment.outputs, values || []));
703 }
704 /*
705 spelunk(inputs: Array<ParamType>, values: ReadonlyArray<any>, processfunc: (type: string, value: any) => Promise<any>): Promise<Array<any>> {
706 const promises: Array<Promise<>> = [ ];

Callers

nothing calls this directly

Calls 4

getFunctionMethod · 0.95
assertArgumentFunction · 0.90
hexlifyFunction · 0.90
encodeMethod · 0.45

Tested by

no test coverage detected