* Encodes the ``tx.data`` for a transaction that calls the function * specified (see [[getFunction]] for valid values for %%fragment%%) with * the %%values%%.
(fragment: FunctionFragment | string, values?: ReadonlyArray<any>)
| 872 | * the %%values%%. |
| 873 | */ |
| 874 | encodeFunctionData(fragment: FunctionFragment | string, values?: ReadonlyArray<any>): string { |
| 875 | if (typeof(fragment) === "string") { |
| 876 | const f = this.getFunction(fragment); |
| 877 | assertArgument(f, "unknown function", "fragment", fragment); |
| 878 | fragment = f; |
| 879 | } |
| 880 | |
| 881 | return concat([ |
| 882 | fragment.selector, |
| 883 | this._encodeParams(fragment.inputs, values || [ ]) |
| 884 | ]); |
| 885 | } |
| 886 | |
| 887 | /** |
| 888 | * Decodes the result %%data%% (e.g. from an ``eth_call``) for the |
nothing calls this directly
no test coverage detected