Create common library of precompiles #1266
roninjin10
started this conversation in
Ideas
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Descriptions
This issue is a series of very small tasks to add custom precompiles to a standard library of precompiles.
We have currently added one precompile, the FS precompile. We are keeping them private in the test folder for now. We want to add more so users of tevm can do useful things from within their tevm scripts.
Precompiles
Precompiles are JavaScript code deployed to a configurable address that can be executed via a call in the EVM in solidity code or sending to a tevm client.
See advanced scripting docs guide
Example of a precompile
See FS and the current implementation https://github.com/evmts/tevm-monorepo/tree/main/packages/precompiles/test
Subtasks
Comment on issue if you want to do a specific subtask and always reach out if you get stuck
Node API precompiles
Node apis will allow one to theoretically do wild things like build an entire web server in solidity.
Comment if you want to add any node api not listed
Browser api precompiles
Browser apis would allow one to do wild things like create a simple frontend framework that runs fully in solidity
Storage
Dom manipulation
document.createElement (not beginner friendly)
document.appendElement (blocked by createElement)
Comment if you would like to add any api not listed
Anvil
Anvil cheat codes are the state of the art for scripting. Anything that has relative compatability to an existing anvil cheat code when added as a precompile would be great to add to Tevm
Beta Was this translation helpful? Give feedback.
All reactions