* Encode the %%values%% as the %%types%% into ABI data. * * @returns DataHexstring
(types, values)
| 160 | * @returns DataHexstring |
| 161 | */ |
| 162 | encode(types, values) { |
| 163 | assertArgumentCount(values.length, types.length, "types/values length mismatch"); |
| 164 | const coders = types.map((type) => this.#getCoder(ParamType.from(type))); |
| 165 | const coder = (new TupleCoder(coders, "_")); |
| 166 | const writer = new Writer(); |
| 167 | coder.encode(writer, values); |
| 168 | return writer.data; |
| 169 | } |
| 170 | /** |
| 171 | * Decode the ABI %%data%% as the %%types%% into values. |
| 172 | * |
no test coverage detected