How to convert BigInt into Bytes in subgraph

I want to convert BigInt into Bytes in subgraph code.
Please help me.

I’d try to do something like:

const bytes = ByteArray.fromHexString(bigIntVar.toHexString())

See here: AssemblyScript API | Docs | The Graph

(There are probably nicer solutions …)

I think you can do this Bytes.fromBigInt( )


what’s this?