* Encodes the ``tx.data`` for a transaction that calls the function * specified (see [[getFunction]] for valid values for %%fragment%%) with * the %%values%%.
(fragment, values)
| 644 | * the %%values%%. |
| 645 | */ |
| 646 | encodeFunctionData(fragment, values) { |
| 647 | if (typeof (fragment) === "string") { |
| 648 | const f = this.getFunction(fragment); |
| 649 | assertArgument(f, "unknown function", "fragment", fragment); |
| 650 | fragment = f; |
| 651 | } |
| 652 | return concat([ |
| 653 | fragment.selector, |
| 654 | this._encodeParams(fragment.inputs, values || []) |
| 655 | ]); |
| 656 | } |
| 657 | /** |
| 658 | * Decodes the result %%data%% (e.g. from an ``eth_call``) for the |
| 659 | * specified function (see [[getFunction]] for valid values for |
nothing calls this directly
no test coverage detected