I want to implement some features as precompiled contracts in Ethereum. I read some articles and the contract code, but I still don't know how to do this.
Is there's a tutorial from scratch?
This is good reference that do a new pre-compile contract for Ethereum next hardfork named
Basically, you only need to implement two methods of pre-compiled contract interface
By the way, the issue for us is official solidity compiler might not support our pre-compiled function then the only way that user can use our pre-compiled function is use inline assembly code in solidity smart contract.
Hope this will give you some clue to start!