In this tutorial, we will walk through how to create your own precompile and add it to Geth.
In Geth, precompiles are a set of stateless contracts. But unlike Solidity code, their logic isn't in the smart contract code itself—they are part of the Geth client. You can think of a precompile as an interface that can execute Go code that resides within the Geth client.
The logic for precompiles in Geth is located in the core/vm/contracts.go
file.