graph-tooling
graph-tooling copied to clipboard
BigInt.toHex() generates odd-length hex strings
Which packages are impacted by your issue?
@graphprotocol/graph-ts
Describe the issue
BigInt.toHex on an address that starts with a single 0 will return an odd-length hex string.
This does not match the behaviour of Address.toHex for example, which can cause problems.
It will also therefore fail if inputting the result into Bytes.fromHexString.
Expected behavior
BigInt.toHex should always return even-length hex strings
Platform
@graphprotocol/graph-ts 0.31.0
thanks @rellfy - @saihaj any ideas on this one - is this an issue with our implementation or a dependency?
thanks @rellfy - @saihaj any ideas on this one - is this an issue with our implementation or a dependency?
started an internal discussion with @leoyvens and likely it is something we investigate in graph-node cause graph-ts is just a types wrapper to host functions graph-node provides to WASM runtime