* 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)
| 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<>> = [ ]; |
nothing calls this directly
no test coverage detected