* 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)
| 111 | * padded event data emitted from ``external`` functions. |
| 112 | */ |
| 113 | decode(types, data, loose) { |
| 114 | const coders = types.map((type) => this.#getCoder(ParamType.from(type))); |
| 115 | const coder = new TupleCoder(coders, "_"); |
| 116 | return coder.decode(new Reader(data, loose, defaultMaxInflation)); |
| 117 | } |
| 118 | static _setDefaultMaxInflation(value) { |
| 119 | assertArgument(typeof (value) === "number" && Number.isInteger(value), "invalid defaultMaxInflation factor", "value", value); |
| 120 | defaultMaxInflation = value; |