MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / encode

Method encode

lib.commonjs/abi/coders/fixed-bytes.js:20–26  ·  view source on GitHub ↗
(writer, _value)

Source from the content-addressed store, hash-verified

18 return ("0x0000000000000000000000000000000000000000000000000000000000000000").substring(0, 2 + this.size * 2);
19 }
20 encode(writer, _value) {
21 let data = (0, index_js_1.getBytesCopy)(typed_js_1.Typed.dereference(_value, this.type));
22 if (data.length !== this.size) {
23 this._throwError("incorrect data length", _value);
24 }
25 return writer.writeBytes(data);
26 }
27 decode(reader) {
28 return (0, index_js_1.hexlify)(reader.readBytes(this.size));
29 }

Callers

nothing calls this directly

Calls 3

dereferenceMethod · 0.45
_throwErrorMethod · 0.45
writeBytesMethod · 0.45

Tested by

no test coverage detected