* Decode the ABI %%data%% as the %%types%% into values. * * If %%loose%% decoding is enabled, then strict padding is * not enforced. Some older versions of Solidity incorrectly * padded event data emitted from ``external`` functions.
(types, data, loose)
| 178 | * padded event data emitted from ``external`` functions. |
| 179 | */ |
| 180 | decode(types, data, loose) { |
| 181 | const coders = types.map((type) => this.#getCoder(fragments_js_1.ParamType.from(type))); |
| 182 | const coder = new tuple_js_1.TupleCoder(coders, "_"); |
| 183 | return coder.decode(new abstract_coder_js_1.Reader(data, loose, defaultMaxInflation)); |
| 184 | } |
| 185 | static _setDefaultMaxInflation(value) { |
| 186 | (0, index_js_1.assertArgument)(typeof (value) === "number" && Number.isInteger(value), "invalid defaultMaxInflation factor", "value", value); |
| 187 | defaultMaxInflation = value; |
no test coverage detected