diff --git a/Nargo.toml b/Nargo.toml index 3ed4ea25..1d192022 100644 --- a/Nargo.toml +++ b/Nargo.toml @@ -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", diff --git a/ethereum/circuits/get_storage_recursive/Nargo.toml b/ethereum/circuits/get_storage_recursive/Nargo.toml new file mode 100644 index 00000000..84d77de2 --- /dev/null +++ b/ethereum/circuits/get_storage_recursive/Nargo.toml @@ -0,0 +1,7 @@ +[package] +name = "get_storage_recursive" +type = "bin" +compiler_version = ">=0.30.0" + +[dependencies] +ethereum = { path = "../lib" } diff --git a/ethereum/circuits/get_storage_recursive/README.md b/ethereum/circuits/get_storage_recursive/README.md new file mode 100644 index 00000000..ae67b4ce --- /dev/null +++ b/ethereum/circuits/get_storage_recursive/README.md @@ -0,0 +1,3 @@ +# Recursive get_storage + +Recursive version of [get_storage](../get_storage/) diff --git a/ethereum/circuits/get_storage_recursive/src/main.nr b/ethereum/circuits/get_storage_recursive/src/main.nr new file mode 100644 index 00000000..20cf916c --- /dev/null +++ b/ethereum/circuits/get_storage_recursive/src/main.nr @@ -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) +}