* 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: FunctionFragment | string, values?: ReadonlyArray<any>)
| 927 | * a result from a Contract. |
| 928 | */ |
| 929 | encodeFunctionResult(fragment: FunctionFragment | string, values?: ReadonlyArray<any>): string { |
| 930 | if (typeof(fragment) === "string") { |
| 931 | const f = this.getFunction(fragment); |
| 932 | assertArgument(f, "unknown function", "fragment", fragment); |
| 933 | fragment = f; |
| 934 | } |
| 935 | return hexlify(this.#abiCoder.encode(fragment.outputs, values || [ ])); |
| 936 | } |
| 937 | /* |
| 938 | spelunk(inputs: Array<ParamType>, values: ReadonlyArray<any>, processfunc: (type: string, value: any) => Promise<any>): Promise<Array<any>> { |
| 939 | const promises: Array<Promise<>> = [ ]; |
nothing calls this directly
no test coverage detected