* 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>)
| 966 | * a result from a Contract. |
| 967 | */ |
| 968 | encodeFunctionResult(fragment: FunctionFragment | string, values?: ReadonlyArray<any>): string { |
| 969 | if (typeof(fragment) === "string") { |
| 970 | const f = this.getFunction(fragment); |
| 971 | assertArgument(f, "unknown function", "fragment", fragment); |
| 972 | fragment = f; |
| 973 | } |
| 974 | return hexlify(this.#abiCoder.encode(fragment.outputs, values || [ ])); |
| 975 | } |
| 976 | /* |
| 977 | spelunk(inputs: Array<ParamType>, values: ReadonlyArray<any>, processfunc: (type: string, value: any) => Promise<any>): Promise<Array<any>> { |
| 978 | const promises: Array<Promise<>> = [ ]; |
no test coverage detected