When you execute forc build
, you’ll notice a .bin
inside the out/debug
directory. To get the bytecode
, you need to hexlify
the contents of this .bin
file.
You can use the Typegen to generate all the boilerplate files with the bytecode
in place:
But if you want to do it manually, this is how it is done internally: