MCPcopy Create free account
hub / github.com/cardstack/cardstack / bytesFromHex

Function bytesFromHex

packages/cardpay-subgraph/src/abi.ts:112–117  ·  view source on GitHub ↗
(hex: string)

Source from the content-addressed store, hash-verified

110}
111
112function bytesFromHex(hex: string): Bytes {
113 if (!hex.startsWith('0x')) {
114 hex = toHex(hex);
115 }
116 return Bytes.fromHexString(hex) as Bytes;
117}
118
119function hexToI32(hex: string): i32 {
120 if (hex.startsWith('0x')) {

Callers 2

decodeFunction · 0.85
bigIntFromHexFunction · 0.85

Calls 1

toHexFunction · 0.90

Tested by

no test coverage detected