0xJchen / revm-by-example

Practical examples of the Rust Ethereum Virtual Machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Revm by Example

Practical examples of the Rust Ethereum Virtual Machine (REVM)

Getting Started

Clone the Repository:

git clone https://github.com/Cionn3/revm-by-example.git

Usage

To run an example, cargo run by the module name: cargo run --bin transfer

Available Examples

  • simulate_swap.rs: Demonstrates a token swap on a Uniswap pool, interacting with a custom Solidity contract.

  • simple_trace.rs: An example of how you may trace pending transactions.

  • transfer.rs: Transfer ETH and ERC20 tokens.

  • revert_msg.rs: Convert EVM output to a readable message.

About

Practical examples of the Rust Ethereum Virtual Machine


Languages

Language:Rust 74.2%Language:Solidity 25.8%