MCPcopy Create free account
hub / github.com/ccxt/ccxt / decode

Method decode

js/src/static_dependencies/ethers/abi-coder.js:113–117  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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;

Callers 15

decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45
decodeFunction · 0.45

Calls 4

#getCoderMethod · 0.95
decodeMethod · 0.95
mapMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected