Skip to content

Commit

Permalink
Merge main.
Browse files Browse the repository at this point in the history
  • Loading branch information
TAMARA LIPOWSKI committed Oct 22, 2024
2 parents 6e57413 + 8028523 commit 7ac060f
Show file tree
Hide file tree
Showing 33 changed files with 29 additions and 5,401 deletions.
21 changes: 0 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ members = ["protosim_py"]
[dependencies]
ethabi = "13.0"
ethers = "2.0.13"
enum_dispatch = "0.3.8"
serde_json = "1.0.105"
serde = { version = "1.0", features = ["rc"] }
tokio = { version = "1.38.0", features = ["full"] }
tokio-tungstenite = "0.20.1"
async-trait = "0.1.73"
hyper = "0.14.27"
futures = "0.3.28"
revm = { version = "12.1.0", features = ["ethersdb", "serde"] }
hex = "0.4.3"
Expand All @@ -36,11 +32,6 @@ reqwest = { version = "0.12.7", features = ["blocking"] }
tycho-core = { git = "ssh://github.com/propeller-heads/tycho-indexer.git", package = "tycho-core", tag = "0.31.3" }
tycho-client = { git = "ssh://github.com/propeller-heads/tycho-indexer.git", package = "tycho-client", tag = "0.31.3" }
rpc_state_reader = { git = "https://github.com/propeller-heads/starknet_in_rust.git", package = "rpc_state_reader", branch = "feature/bump-cairo-lang-version", optional = true }
starknet_in_rust = { git = "https://github.com/propeller-heads/starknet_in_rust.git", package = "starknet_in_rust", branch = "feature/bump-cairo-lang-version", optional = true }
starknet_api = { version = "0.4.1", optional = true }
starknet = { version = "0.5.0", optional = true }
cairo-vm = { version = "0.8.5", features = ["cairo-1-hints"], optional = true }

foundry-config = { git = "https://github.com/foundry-rs/foundry", rev = "2544793" }
foundry-evm = { git = "https://github.com/foundry-rs/foundry", rev = "2544793" }
revm-inspectors = { version = "0.5", features = ["serde"] }
Expand All @@ -56,19 +47,11 @@ tracing-subscriber = { version = "0.3.17", default-features = false, features =
"env-filter",
"fmt",
] }
tungstenite = "0.20.1"
tempfile = "3.13.0"

[features]
default = []
network_tests = []
starknet = [
"dep:starknet_in_rust",
"dep:starknet_api",
"dep:starknet",
"dep:cairo-vm",
"dep:rpc_state_reader",
]

[profile.bench]
debug = true
2 changes: 1 addition & 1 deletion protosim_py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib"]
num-bigint = "0.4.3"
pyo3 = { version = "0.19", features = ["num-bigint", "extension-module"] }
pyo3-asyncio = { version = "0.19", features = ["tokio-runtime"] }
protosim = { path = "../", features = ["starknet"] }
protosim = { path = "../"}
tokio = { version = "1.38.0", features = ["full"] }
ethers = "2.0.13"
once_cell = "1.17.2"
Expand Down
152 changes: 0 additions & 152 deletions protosim_py/protosim_starknet_demo.py

This file was deleted.

7 changes: 0 additions & 7 deletions protosim_py/python/protosim_py/starknet/__init__.py

This file was deleted.

11 changes: 0 additions & 11 deletions protosim_py/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
use pyo3::prelude::*;
use simulation_py::SimulationEngine;
// use starknet_simulation_py::StarknetSimulationEngine;
// use starknet_structs_py::{
// StarknetContractOverride, StarknetSimulationParameters, StarknetSimulationResult,
// };
use structs_py::{
AccountInfo, AccountUpdate, BlockHeader, SimulationDB, SimulationParameters, SimulationResult,
StateUpdate, TychoDB,
};
use tracing_subscriber::EnvFilter;

mod simulation_py;
// mod starknet_simulation_py;
// mod starknet_structs_py;
mod structs_py;

/// Transaction simulation using EVM implemented in Rust
Expand Down Expand Up @@ -49,10 +43,5 @@ fn _protosim_py(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_class::<SimulationDB>()?;
m.add_class::<TychoDB>()?;
m.add_class::<AccountUpdate>()?;
// m.add_class::<StarknetSimulationEngine>()?;
// m.add_class::<StarknetContractOverride>()?;
// m.add_class::<StarknetSimulationParameters>()?;
// m.add_class::<StarknetSimulationResult>()?;

Ok(())
}
4 changes: 2 additions & 2 deletions protosim_py/src/simulation_py.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::structs_py::{
use pyo3::{prelude::*, types::PyType};
use std::{collections::HashMap, str::FromStr};

use protosim::evm_simulation::{account_storage, database, simulation, tycho_db};
use protosim::evm::{account_storage, database, simulation, tycho_db};

#[derive(Clone, Copy)]
enum DatabaseType {
Expand Down Expand Up @@ -201,7 +201,7 @@ impl SimulationEngine {
updates: HashMap<String, StateUpdate>,
block: BlockHeader,
) -> PyResult<HashMap<String, StateUpdate>> {
let block = protosim::evm_simulation::database::BlockHeader::from(block);
let block = protosim::evm::database::BlockHeader::from(block);
let mut rust_updates: HashMap<Address, account_storage::StateUpdate> = HashMap::new();
for (key, value) in updates {
rust_updates.insert(
Expand Down
71 changes: 0 additions & 71 deletions protosim_py/src/starknet_simulation_py.rs

This file was deleted.

Loading

0 comments on commit 7ac060f

Please sign in to comment.