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

Method encode

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

* Encode the %%values%% as the %%types%% into ABI data. * * @returns DataHexstring

(types, values)

Source from the content-addressed store, hash-verified

96 * @returns DataHexstring
97 */
98 encode(types, values) {
99 assertArgumentCount(values.length, types.length, "types/values length mismatch");
100 const coders = types.map((type) => this.#getCoder(ParamType.from(type)));
101 const coder = (new TupleCoder(coders, "_"));
102 const writer = new Writer();
103 coder.encode(writer, values);
104 return writer.data;
105 }
106 /**
107 * Decode the ABI %%data%% as the %%types%% into values.
108 *

Callers 15

signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
signMethod · 0.45
createAuthTokenMethod · 0.45

Calls 4

#getCoderMethod · 0.95
assertArgumentCountFunction · 0.90
mapMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected