Skip to content

Create common library of precompiles #768

Closed

Description

@roninjin10

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

  • local 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

Activity

  1. roninjin10 commented on Dec 20, 2023

    @roninjin10
    CollaboratorAuthor

    CHA-112

  2. added
    good second issueInteresting changes to tevm that are easy but non trivial
    and removed on Feb 16, 2024
  3. changed the title [-]Common library of precompiles[/-] [+]Create common library of precompiles[/+] on Feb 16, 2024
  4. locked and limited conversation to collaborators on Jul 3, 2024
  5. converted this issue into a discussion #1266 on Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good second issueInteresting changes to tevm that are easy but non trivialhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions