I'm trying to learn how to implement EVM pre-compiles in substrate (frontier), but I cannot find any documentation anywhere. If I try and reference something like moonbeam I fall into dependency hell. If you could point me towards some documentation or let me see some of what you have done I would be very grateful.
2 Answers
There is documentation by moonbeam https://docs.moonbeam.network/builders/build/canonical-contracts/precompiles/
few more links that may help you https://docs.astar.network/build/smart-contracts/ethereum-virtual-machine/evm-precompiles https://medium.com/@drstone/edgeware-evm-precompiles-a-deeper-dive-840a78f36320
-
Actually that link to Astar docs is outdated. The best way to learn IMO is by reading the code and runnning the unit tests. You can check the implementation of Astar precompiles here: github.com/AstarNetwork/astar-frame/tree/polkadot-v0.9.17/… and for Moonbeam: github.com/PureStake/moonbeam/tree/master/precompiles– MaarioCommented Apr 7, 2022 at 7:37
You can also find a tutorial here: https://docs.substrate.io/tutorials/integrate-with-tools/access-evm-accounts/