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

Method writeBytes

js/src/static_dependencies/ethers/coders/abstract-coder.js:308–315  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

306 }
307 // Arrayish item; pad on the right to *nearest* WordSize
308 writeBytes(value) {
309 let bytes = getBytesCopy(value);
310 const paddingOffset = bytes.length % WordSize;
311 if (paddingOffset) {
312 bytes = getBytesCopy(concat([bytes, Padding.slice(paddingOffset)]));
313 }
314 return this.#writeData(bytes);
315 }
316 // Numeric item; pad on the left *to* WordSize
317 writeValue(value) {
318 return this.#writeData(getValue(value));

Callers 3

encodeMethod · 0.45
encodeMethod · 0.45
encodeMethod · 0.45

Calls 4

#writeDataMethod · 0.95
getBytesCopyFunction · 0.90
concatFunction · 0.90
sliceMethod · 0.45

Tested by

no test coverage detected