Skip to content

Commit

Permalink
Add recursive version of get_storage circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
LogvinovLeon committed May 28, 2024
1 parent 2ad4011 commit 7b4938c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions Nargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"ethereum/circuits/lib",
"ethereum/circuits/get_receipt",
"ethereum/circuits/get_storage",
"ethereum/circuits/get_storage_recursive",
"ethereum/circuits/get_account",
"ethereum/circuits/get_header",
"ethereum/circuits/get_transaction",
Expand Down
7 changes: 7 additions & 0 deletions ethereum/circuits/get_storage_recursive/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "get_storage_recursive"
type = "bin"
compiler_version = ">=0.30.0"

[dependencies]
ethereum = { path = "../lib" }
3 changes: 3 additions & 0 deletions ethereum/circuits/get_storage_recursive/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Recursive get_storage

Recursive version of [get_storage](../get_storage/)
11 changes: 11 additions & 0 deletions ethereum/circuits/get_storage_recursive/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use dep::ethereum::{account_with_storage::{get_account_with_storage, StorageWithinBlock}, misc::types::{Address, Bytes32}};

#[recursive]
fn main(
chain_id: pub Field,
block_number: pub u64,
address: pub Address,
storage_key: pub Bytes32
) -> pub StorageWithinBlock<1> {
get_account_with_storage(chain_id, block_number, address, storage_key)
}

0 comments on commit 7b4938c

Please sign in to comment.