https://github.com/weavevm/evm-state-reconstructing
Reconstruct EVM state in 10 LOCs -- pulling data from wvm-archiver data lakes
https://github.com/weavevm/evm-state-reconstructing
Last synced: about 1 year ago
JSON representation
Reconstruct EVM state in 10 LOCs -- pulling data from wvm-archiver data lakes
- Host: GitHub
- URL: https://github.com/weavevm/evm-state-reconstructing
- Owner: weaveVM
- License: mit
- Created: 2025-01-25T23:54:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-25T10:21:07.000Z (over 1 year ago)
- Last Synced: 2025-06-11T18:04:12.975Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 371 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
EVM State Reconstruction is a PoC tool for testing purposes that demonstrates how to use EVM network data archived by an [wvm-archiver](https://github.com/weaveVM/wvm-archiver) instance to reconstruct its state trustlessly by pulling data from [WeaveVM](https://wvm.dev).
This PoC implements a simplified EVM state reconstruction logic using revm -- for production purposes users are free to implement their own logic in [evm_exec.rs](./src/utils/core/evm_exec.rs)
## Usage
Add it to your codebase:
```Cargo.toml
evm_state_reconstructing = {git = "https://github.com/weaveVM/evm-state-reconstructing", branch = "main"}
```
### Code example
Case example: Reconstructing the state of [RSS3 VSL Mainnet](https://rss3.io) :
```rust
use evm_state_reconstructing::utils::core::evm_exec::StateReconstructor;
use evm_state_reconstructing::utils::core::networks::Networks;
use evm_state_reconstructing::utils::core::reconstruct::reconstruct_network;
use anyhow::Error;
async fn reconstruct_state() -> Result {
let network: Networks = Networks::rss3();
let state: StateReconstructor = reconstruct_network(network).await?;
Ok(state)
}
```
## License
This repository is licensed under the [MIT License](./LICENSE)