From b790006734aba5b2c8c6787610ebde4f24ef2a18 Mon Sep 17 00:00:00 2001 From: Nisheeth Barthwal Date: Tue, 3 Oct 2023 15:33:36 +0200 Subject: [PATCH] feat: add eth_getStorageAt (#134) * add get_storage_at * add eth_getStorageAt * limit max archived blocks to 128 * remove ethers-contract dep --- Cargo.lock | 1460 ++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 6 +- SUPPORTED_APIS.md | 32 +- src/node.rs | 493 ++++++++++++++- src/testing.rs | 110 +++- test_endpoints.http | 11 + 6 files changed, 1998 insertions(+), 114 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de32f1a0..e58bebd2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "actix-codec" version = "0.5.1" @@ -70,7 +80,7 @@ dependencies = [ "tokio", "tokio-util 0.7.8", "tracing", - "zstd", + "zstd 0.12.4", ] [[package]] @@ -233,7 +243,18 @@ checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" dependencies = [ "aes-soft", "aesni", - "cipher", + "cipher 0.2.5", +] + +[[package]] +name = "aes" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +dependencies = [ + "cfg-if 1.0.0", + "cipher 0.4.4", + "cpufeatures", ] [[package]] @@ -244,8 +265,8 @@ checksum = "7729c3cde54d67063be556aeac75a81330d802f0259500ca40cb52967f975763" dependencies = [ "aes-soft", "aesni", - "cipher", - "ctr", + "cipher 0.2.5", + "ctr 0.6.0", ] [[package]] @@ -254,7 +275,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" dependencies = [ - "cipher", + "cipher 0.2.5", "opaque-debug 0.3.0", ] @@ -264,7 +285,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" dependencies = [ - "cipher", + "cipher 0.2.5", "opaque-debug 0.3.0", ] @@ -442,6 +463,15 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "async-compression" version = "0.4.1" @@ -454,8 +484,8 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "zstd", - "zstd-safe", + "zstd 0.12.4", + "zstd-safe 6.0.6", ] [[package]] @@ -500,6 +530,17 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures 0.3.28", + "pharos", + "rustc_version", +] + [[package]] name = "atoi" version = "0.4.0" @@ -520,6 +561,18 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "auto_impl" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +dependencies = [ + "proc-macro-error", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "autocfg" version = "0.1.8" @@ -616,6 +669,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.1" @@ -634,6 +693,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "beef" version = "0.5.2" @@ -708,6 +773,15 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + [[package]] name = "bit-vec" version = "0.6.3" @@ -843,7 +917,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a0e8073e8baa88212fb5823574c02ebccb395136ba9a164ab89379ec6072f0" dependencies = [ "block-padding 0.2.1", - "cipher", + "cipher 0.2.5", ] [[package]] @@ -882,6 +956,16 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "sha2 0.10.6", + "tinyvec", +] + [[package]] name = "bstr" version = "0.2.17" @@ -948,6 +1032,9 @@ name = "bytes" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +dependencies = [ + "serde", +] [[package]] name = "bytestring" @@ -958,6 +1045,16 @@ dependencies = [ "bytes 1.4.0", ] +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + [[package]] name = "bzip2-sys" version = "0.1.11+1.0.8" @@ -1000,6 +1097,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "cargo_metadata" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7daec1a2a2129eeba1644b220b4647ec537b0b5d4bfd6876fcc5a540056b592" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cc" version = "1.0.83" @@ -1055,6 +1166,16 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "circuit_testing" version = "0.1.0" @@ -1164,6 +1285,58 @@ dependencies = [ "indexmap 1.9.3", ] +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest 0.10.7", + "hmac 0.12.1", + "k256 0.13.1", + "serde", + "sha2 0.10.6", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec 1.0.1", + "coins-bip32", + "hmac 0.12.1", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2 0.10.6", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.2", + "bech32", + "bs58", + "digest 0.10.7", + "generic-array 0.14.7", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2 0.10.6", + "sha3 0.10.6", + "thiserror", +] + [[package]] name = "colorchoice" version = "1.0.0" @@ -1191,6 +1364,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "const-hex" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c37be52ef5e3b394db27a2341010685ad5103c72ac15ce2e9420a7e8f93f342c" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "hex", + "serde", +] + [[package]] name = "const-oid" version = "0.7.1" @@ -1451,6 +1636,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "crypto-bigint" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +dependencies = [ + "generic-array 0.14.7", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -1499,7 +1696,16 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" dependencies = [ - "cipher", + "cipher 0.2.5", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", ] [[package]] @@ -1554,12 +1760,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edd72493923899c6f10c641bdbdeddc7183d6396641d99c1a0d1597f37f92e28" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "lock_api", "once_cell", "parking_lot_core 0.9.8", ] +[[package]] +name = "data-encoding" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" + [[package]] name = "debugid" version = "0.8.0" @@ -1567,7 +1779,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ "serde", - "uuid", + "uuid 1.4.1", ] [[package]] @@ -1591,6 +1803,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid 0.9.5", + "zeroize", +] + [[package]] name = "deranged" version = "0.3.8" @@ -1624,6 +1846,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "digest" version = "0.8.1" @@ -1649,6 +1877,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid 0.9.5", "crypto-common", "subtle", ] @@ -1659,7 +1888,26 @@ version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ - "dirs-sys", + "dirs-sys 0.3.7", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", ] [[package]] @@ -1673,6 +1921,29 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + [[package]] name = "dotenv" version = "0.15.0" @@ -1685,6 +1956,12 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + [[package]] name = "ecdsa" version = "0.14.8" @@ -1692,9 +1969,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der 0.6.1", - "elliptic-curve", - "rfc6979", - "signature", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +dependencies = [ + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.6", + "rfc6979 0.4.0", + "signature 2.1.0", + "spki 0.7.2", ] [[package]] @@ -1712,16 +2003,35 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "base16ct", + "base16ct 0.1.1", "crypto-bigint 0.4.9", "der 0.6.1", "digest 0.10.7", - "ff", + "ff 0.12.1", "generic-array 0.14.7", - "group", + "group 0.12.1", "pkcs8 0.9.0", "rand_core 0.6.4", - "sec1", + "sec1 0.3.0", + "subtle", + "zeroize", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.3", + "digest 0.10.7", + "ff 0.13.0", + "generic-array 0.14.7", + "group 0.13.0", + "pkcs8 0.10.2", + "rand_core 0.6.4", + "sec1 0.7.3", "subtle", "zeroize", ] @@ -1735,6 +2045,15 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "ena" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +dependencies = [ + "log", +] + [[package]] name = "encoding_rs" version = "0.8.32" @@ -1744,6 +2063,24 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "enr" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" +dependencies = [ + "base64 0.21.2", + "bytes 1.4.0", + "hex", + "k256 0.13.1", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3 0.10.6", + "zeroize", +] + [[package]] name = "env_logger" version = "0.9.3" @@ -1757,6 +2094,19 @@ dependencies = [ "termcolor", ] +[[package]] +name = "env_logger" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +dependencies = [ + "humantime", + "is-terminal", + "log", + "regex", + "termcolor", +] + [[package]] name = "envy" version = "0.4.2" @@ -1778,15 +2128,16 @@ version = "0.1.0-alpha.5" dependencies = [ "anyhow", "bigdecimal", - "chrono", "clap 4.3.23", "colored", "ethabi 16.0.0", + "ethers", "eyre", "futures 0.3.28", "hex", "httptest", - "itertools", + "indexmap 2.0.2", + "itertools 0.10.5", "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", "jsonrpc-core-client", "jsonrpc-derive", @@ -1807,6 +2158,7 @@ dependencies = [ "tracing-subscriber", "vlog", "vm", + "zksync-web3-rs", "zksync_basic_types", "zksync_contracts", "zksync_core", @@ -1846,6 +2198,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes 0.8.3", + "ctr 0.9.2", + "digest 0.10.7", + "hex", + "hmac 0.12.1", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt 0.10.0", + "serde", + "serde_json", + "sha2 0.10.6", + "sha3 0.10.6", + "thiserror", + "uuid 0.8.2", +] + [[package]] name = "ethabi" version = "16.0.0" @@ -1899,8 +2273,10 @@ checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", "fixed-hash 0.8.0", + "impl-codec 0.6.0", "impl-rlp", "impl-serde 0.4.0", + "scale-info", "tiny-keccak 2.0.2", ] @@ -1926,12 +2302,261 @@ checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom 0.13.0", "fixed-hash 0.8.0", + "impl-codec 0.6.0", "impl-rlp", "impl-serde 0.4.0", "primitive-types 0.12.1", + "scale-info", "uint", ] +[[package]] +name = "ethers" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b4026b97da8281276744741fac7eb385da905f6093c583331fa2953fdd4253" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e9e8acd0ed348403cc73a670c24daba3226c40b98dc1a41903766b3ab6240a" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d79269278125006bb0552349c03593ffa9702112ca88bc7046cc669f148fb47c" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce95a43c939b2e4e2f3191c5ad4a1f279780b8a39139c9905b43a7433531e2ab" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2 1.0.66", + "quote 1.0.33", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.29", + "toml 0.7.8", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9ce44906fc871b3ee8c69a695ca7ec7f70e50cb379c9b9cb5e532269e492f6" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2 1.0.66", + "quote 1.0.33", + "serde_json", + "syn 2.0.29", +] + +[[package]] +name = "ethers-core" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0a17f0708692024db9956b31d7a20163607d2745953f5ae8125ab368ba280ad" +dependencies = [ + "arrayvec 0.7.4", + "bytes 1.4.0", + "cargo_metadata 0.17.0", + "chrono", + "const-hex", + "elliptic-curve 0.13.6", + "ethabi 18.0.0", + "generic-array 0.14.7", + "k256 0.13.1", + "num_enum 0.7.0", + "once_cell", + "open-fastrlp", + "rand 0.8.5", + "rlp", + "serde", + "serde_json", + "strum 0.25.0", + "syn 2.0.29", + "tempfile", + "thiserror", + "tiny-keccak 2.0.2", + "unicode-xid 0.2.4", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e53451ea4a8128fbce33966da71132cf9e1040dcfd2a2084fd7733ada7b2045" +dependencies = [ + "ethers-core", + "reqwest", + "semver", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c339aad74ae5c451d27e0e49c7a3c7d22620b119b4f9291d7aa21f72d7f366" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6838fa110e57d572336178b7c79e94ff88ef976306852d8cb87d9e5b1fc7c0b5" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.2", + "bytes 1.4.0", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4864d387456a9c09a1157fa10e1528b29d90f1d859443acf06a1b23365fb518c" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "elliptic-curve 0.13.6", + "eth-keystore", + "ethers-core", + "hex", + "rand 0.8.5", + "sha2 0.10.6", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de34e484e7ae3cab99fbfd013d6c5dc7f9013676a4e0e414d8b12e1213e8b3ba" +dependencies = [ + "cfg-if 1.0.0", + "const-hex", + "dirs 5.0.1", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak 2.0.2", + "tokio", + "tracing", + "walkdir", + "yansi", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -1979,6 +2604,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "ff_ce" version = "0.14.3" @@ -2043,6 +2678,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.27" @@ -2098,7 +2739,7 @@ dependencies = [ "digest 0.9.0", "hex", "indexmap 1.9.3", - "itertools", + "itertools 0.10.5", "lazy_static", "num-bigint 0.4.3", "num-derive 0.2.5", @@ -2113,6 +2754,16 @@ dependencies = [ "tiny-keccak 1.5.0", ] +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "fuchsia-cprng" version = "0.1.1" @@ -2213,6 +2864,16 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + [[package]] name = "futures-macro" version = "0.3.28" @@ -2243,7 +2904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" dependencies = [ "gloo-timers", - "send_wrapper", + "send_wrapper 0.4.0", ] [[package]] @@ -2265,6 +2926,15 @@ dependencies = [ "slab", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + [[package]] name = "generic-array" version = "0.12.4" @@ -2282,6 +2952,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -2472,7 +3143,18 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ - "ff", + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", "rand_core 0.6.4", "subtle", ] @@ -2536,9 +3218,18 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] [[package]] name = "hashlink" @@ -2905,12 +3596,21 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array 0.14.7", ] [[package]] @@ -2973,6 +3673,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -3297,9 +4006,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ "cfg-if 1.0.0", - "ecdsa", - "elliptic-curve", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.6", +] + +[[package]] +name = "k256" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +dependencies = [ + "cfg-if 1.0.0", + "ecdsa 0.16.8", + "elliptic-curve 0.13.6", + "once_cell", "sha2 0.10.6", + "signature 2.1.0", ] [[package]] @@ -3321,6 +4044,34 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "lalrpop" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +dependencies = [ + "ascii-canvas", + "bit-set", + "diff", + "ena", + "is-terminal", + "itertools 0.10.5", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax 0.7.4", + "string_cache", + "term", + "tiny-keccak 2.0.2", + "unicode-xid 0.2.4", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" + [[package]] name = "language-tags" version = "0.3.2" @@ -3740,6 +4491,12 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + [[package]] name = "nix" version = "0.26.2" @@ -3972,7 +4729,16 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" +dependencies = [ + "num_enum_derive 0.7.0", ] [[package]] @@ -3987,6 +4753,18 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "num_enum_derive" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ea360eafe1022f7cc56cd7b869ed57330fb2453d0c7831d99b74c65d2f5597" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + [[package]] name = "num_threads" version = "0.1.6" @@ -4023,6 +4801,31 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes 1.4.0", + "ethereum-types 0.14.1", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes 1.4.0", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "openssl" version = "0.10.56" @@ -4077,6 +4880,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + [[package]] name = "os_info" version = "3.7.0" @@ -4113,7 +4922,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b92ea9ddac0d6e1db7c49991e7d397d34a9fd814b4c93cda53788e8eef94e35" dependencies = [ - "aes", + "aes 0.6.0", "aes-ctr", "block-modes", "digest 0.9.0", @@ -4123,7 +4932,7 @@ dependencies = [ "pbkdf2 0.7.5", "ripemd160", "rustc-hex", - "scrypt", + "scrypt 0.5.0", "secp256k1 0.20.3", "sha2 0.9.9", "subtle", @@ -4259,12 +5068,29 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "paste" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + [[package]] name = "pbkdf2" version = "0.6.0" @@ -4283,10 +5109,32 @@ dependencies = [ "base64ct", "crypto-mac 0.10.1", "hmac 0.10.1", - "password-hash", + "password-hash 0.1.4", "sha2 0.9.9", ] +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", + "password-hash 0.4.2", + "sha2 0.10.6", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac 0.12.1", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -4361,6 +5209,77 @@ dependencies = [ "sha2 0.10.6", ] +[[package]] +name = "petgraph" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +dependencies = [ + "fixedbitset", + "indexmap 2.0.2", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures 0.3.28", + "rustc_version", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand 0.8.5", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 2.0.29", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" version = "1.1.3" @@ -4425,6 +5344,16 @@ dependencies = [ "spki 0.6.0", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.8", + "spki 0.7.2", +] + [[package]] name = "pkg-config" version = "0.3.27" @@ -4443,6 +5372,12 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + [[package]] name = "prettyplease" version = "0.2.12" @@ -4476,6 +5411,7 @@ dependencies = [ "impl-codec 0.6.0", "impl-rlp", "impl-serde 0.4.0", + "scale-info", "uint", ] @@ -4485,7 +5421,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -4495,7 +5431,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.19.14", + "toml_edit 0.19.15", ] [[package]] @@ -4534,7 +5470,7 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid", + "unicode-xid 0.1.0", ] [[package]] @@ -5042,6 +5978,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac 0.12.1", + "subtle", +] + [[package]] name = "ring" version = "0.16.20" @@ -5057,6 +6003,15 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "ripemd160" version = "0.9.1" @@ -5075,9 +6030,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes 1.4.0", + "rlp-derive", "rustc-hex", ] +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "rocksdb" version = "0.21.0" @@ -5209,7 +6176,16 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "399f290ffc409596022fce5ea5d4138184be4784f2b28c62c59f0d8389059a15" dependencies = [ - "cipher", + "cipher 0.2.5", +] + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher 0.4.4", ] [[package]] @@ -5221,6 +6197,30 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scale-info" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" +dependencies = [ + "cfg-if 1.0.0", + "derive_more", + "parity-scale-codec 3.6.4", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2 1.0.66", + "quote 1.0.33", + "syn 1.0.109", +] + [[package]] name = "schannel" version = "0.1.22" @@ -5247,11 +6247,23 @@ dependencies = [ "pbkdf2 0.6.0", "rand 0.7.3", "rand_core 0.5.1", - "salsa20", + "salsa20 0.7.2", "sha2 0.9.9", "subtle", ] +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac 0.12.1", + "pbkdf2 0.11.0", + "salsa20 0.10.2", + "sha2 0.10.6", +] + [[package]] name = "sct" version = "0.7.0" @@ -5268,7 +6280,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ - "base16ct", + "base16ct 0.1.1", "der 0.6.1", "generic-array 0.14.7", "pkcs8 0.9.0", @@ -5276,6 +6288,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.8", + "generic-array 0.14.7", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + [[package]] name = "secp256k1" version = "0.20.3" @@ -5351,6 +6377,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "sentry" version = "0.31.5" @@ -5456,7 +6488,7 @@ dependencies = [ "thiserror", "time", "url", - "uuid", + "uuid 1.4.1", ] [[package]] @@ -5500,6 +6532,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5662,6 +6703,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "signature" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + [[package]] name = "simple_asn1" version = "0.6.2" @@ -5685,6 +6736,12 @@ dependencies = [ "time", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "skeptic" version = "0.13.7" @@ -5692,7 +6749,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16d23b015676c90a0f01c197bfdc786c20342c73a0afdda9025adb0bc42940a8" dependencies = [ "bytecount", - "cargo_metadata", + "cargo_metadata 0.14.2", "error-chain", "glob", "pulldown-cmark", @@ -5757,6 +6814,20 @@ dependencies = [ "sha-1 0.9.8", ] +[[package]] +name = "solang-parser" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cb9fa2fa2fa6837be8a2495486ff92e3ffe68a99b6eeba288e139efdd842457" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror", + "unicode-xid 0.2.4", +] + [[package]] name = "spin" version = "0.5.2" @@ -5783,6 +6854,16 @@ dependencies = [ "der 0.6.1", ] +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der 0.7.8", +] + [[package]] name = "splitmut" version = "0.2.1" @@ -5795,7 +6876,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" dependencies = [ - "itertools", + "itertools 0.10.5", "nom", "unicode_categories", ] @@ -5826,7 +6907,7 @@ dependencies = [ "chrono", "crc", "crossbeam-queue 0.3.8", - "dirs", + "dirs 4.0.0", "either", "event-listener", "futures-channel", @@ -5909,6 +6990,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.1", + "phf_shared 0.10.0", + "precomputed-hash", +] + [[package]] name = "stringprep" version = "0.1.3" @@ -5961,7 +7055,16 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ - "strum_macros", + "strum_macros 0.24.3", +] + +[[package]] +name = "strum" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros 0.25.2", ] [[package]] @@ -5977,12 +7080,45 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "strum_macros" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +dependencies = [ + "heck 0.4.1", + "proc-macro2 1.0.66", + "quote 1.0.33", + "rustversion", + "syn 2.0.29", +] + [[package]] name = "subtle" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "svm-rs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597e3a746727984cb7ea2487b6a40726cad0dbe86628e7d429aa6b8c4c153db4" +dependencies = [ + "dirs 5.0.1", + "fs2", + "hex", + "once_cell", + "reqwest", + "semver", + "serde", + "serde_json", + "sha2 0.10.6", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "0.15.44" @@ -5991,7 +7127,7 @@ checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", - "unicode-xid", + "unicode-xid 0.1.0", ] [[package]] @@ -6026,7 +7162,7 @@ dependencies = [ "derivative", "franklin-crypto", "hex", - "itertools", + "itertools 0.10.5", "num-bigint 0.4.3", "num-derive 0.3.3", "num-integer", @@ -6083,6 +7219,17 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi 0.3.9", +] + [[package]] name = "termcolor" version = "1.1.3" @@ -6266,6 +7413,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots 0.25.2", +] + [[package]] name = "tokio-util" version = "0.6.10" @@ -6304,11 +7466,26 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + [[package]] name = "toml_datetime" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -6318,16 +7495,18 @@ checksum = "5376256e44f2443f8896ac012507c19a012df0fe8758b55246ae51a2279db51f" dependencies = [ "combine", "indexmap 1.9.3", - "itertools", + "itertools 0.10.5", ] [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -6380,7 +7559,7 @@ dependencies = [ "tower-layer", "tower-service", "tracing", - "uuid", + "uuid 1.4.1", ] [[package]] @@ -6429,6 +7608,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + [[package]] name = "tracing-log" version = "0.1.3" @@ -6484,6 +7673,26 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes 1.4.0", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "typenum" version = "1.16.0" @@ -6565,6 +7774,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + [[package]] name = "unicode_categories" version = "0.1.1" @@ -6608,12 +7823,28 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.10", + "serde", +] + [[package]] name = "uuid" version = "1.4.1" @@ -6702,7 +7933,7 @@ source = "git+https://github.com/matter-labs/zksync-era.git?rev=8df11278ca76000d dependencies = [ "anyhow", "hex", - "itertools", + "itertools 0.10.5", "once_cell", "thiserror", "tracing", @@ -6723,7 +7954,7 @@ dependencies = [ "anyhow", "ethabi 18.0.0", "hex", - "itertools", + "itertools 0.10.5", "once_cell", "thiserror", "tracing", @@ -6742,7 +7973,7 @@ version = "0.1.0" source = "git+https://github.com/matter-labs/zksync-era.git?rev=8df11278ca76000d842fc0f73f5233dfc85ef77e#8df11278ca76000d842fc0f73f5233dfc85ef77e" dependencies = [ "hex", - "itertools", + "itertools 0.10.5", "once_cell", "thiserror", "tracing", @@ -6763,7 +7994,7 @@ version = "0.1.0" source = "git+https://github.com/matter-labs/zksync-era.git?rev=8df11278ca76000d842fc0f73f5233dfc85ef77e#8df11278ca76000d842fc0f73f5233dfc85ef77e" dependencies = [ "hex", - "itertools", + "itertools 0.10.5", "once_cell", "thiserror", "tracing", @@ -7108,6 +8339,25 @@ dependencies = [ "winapi-build", ] +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures 0.3.28", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper 0.6.0", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wyz" version = "0.2.0" @@ -7123,19 +8373,45 @@ dependencies = [ "tap", ] +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "zeroize" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes 0.8.3", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils 0.8.16", + "flate2", + "hmac 0.12.1", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd 0.11.2+zstd.1.5.2", +] + [[package]] name = "zk_evm" version = "1.3.1" source = "git+https://github.com/matter-labs/era-zk_evm.git?tag=v1.3.1-rc0#877ba31cc1d82316fd924e8d83a9f5f1a77b1b9a" dependencies = [ "blake2 0.10.6", - "k256", + "k256 0.11.6", "lazy_static", "num 0.4.1", "serde", @@ -7177,7 +8453,7 @@ name = "zkevm-assembly" version = "1.3.1" source = "git+https://github.com/matter-labs/era-zkEVM-assembly.git?tag=v1.3.1-rc0#dabbb07e84dd886ee90dde2b5dde0acbf9b0123a" dependencies = [ - "env_logger", + "env_logger 0.9.3", "hex", "lazy_static", "log", @@ -7196,7 +8472,7 @@ name = "zkevm-assembly" version = "1.3.2" source = "git+https://github.com/matter-labs/era-zkEVM-assembly.git?branch=v1.3.2#3c61d450cbe6548068be8f313ed02f1bd229a865" dependencies = [ - "env_logger", + "env_logger 0.9.3", "hex", "lazy_static", "log", @@ -7229,7 +8505,7 @@ dependencies = [ "bitflags 2.4.0", "blake2 0.10.6", "ethereum-types 0.14.1", - "k256", + "k256 0.11.6", "lazy_static", "sha2 0.10.6", "sha3 0.10.6", @@ -7245,7 +8521,7 @@ dependencies = [ "codegen 0.2.0", "crossbeam 0.8.2", "derivative", - "env_logger", + "env_logger 0.9.3", "hex", "num-bigint 0.4.3", "num-integer", @@ -7262,6 +8538,27 @@ dependencies = [ "zkevm-assembly 1.3.2", ] +[[package]] +name = "zksync-web3-rs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bc9b106393359ac013c2527db318ced4ca838d26ef03488233af557ebe5da8" +dependencies = [ + "async-trait", + "clap 4.3.23", + "env_logger 0.10.0", + "ethers", + "ethers-contract", + "hex", + "lazy_static", + "log", + "serde", + "serde_json", + "sha2 0.9.9", + "thiserror", + "tokio", +] + [[package]] name = "zksync_basic_types" version = "0.1.0" @@ -7345,7 +8642,7 @@ dependencies = [ "futures 0.3.28", "governor", "hex", - "itertools", + "itertools 0.10.5", "jsonrpc-core 18.0.0 (git+https://github.com/matter-labs/jsonrpc.git?branch=master)", "jsonrpc-core-client", "jsonrpc-derive", @@ -7413,13 +8710,13 @@ dependencies = [ "bigdecimal", "bincode", "hex", - "itertools", + "itertools 0.10.5", "num 0.3.1", "once_cell", "serde", "serde_json", "sqlx", - "strum", + "strum 0.24.1", "thiserror", "tokio", "tracing", @@ -7606,14 +8903,14 @@ dependencies = [ "codegen 0.1.0", "ethereum-types 0.12.1", "num 0.3.1", - "num_enum", + "num_enum 0.6.1", "once_cell", "parity-crypto", "rlp", "serde", "serde_json", "serde_with", - "strum", + "strum 0.24.1", "thiserror", "zk_evm 1.3.3", "zkevm_test_harness", @@ -7633,7 +8930,7 @@ dependencies = [ "bigdecimal", "futures 0.3.28", "hex", - "itertools", + "itertools 0.10.5", "metrics", "num 0.3.1", "reqwest", @@ -7656,7 +8953,7 @@ dependencies = [ "circuit_testing", "ff_ce", "hex", - "itertools", + "itertools 0.10.5", "once_cell", "serde_json", "structopt", @@ -7673,7 +8970,7 @@ source = "git+https://github.com/matter-labs/zksync-era.git?rev=8df11278ca76000d dependencies = [ "bigdecimal", "chrono", - "itertools", + "itertools 0.10.5", "jsonrpsee", "rlp", "serde", @@ -7682,13 +8979,32 @@ dependencies = [ "zksync_types", ] +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe 5.0.2+zstd.1.5.2", +] + [[package]] name = "zstd" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ - "zstd-safe", + "zstd-safe 6.0.6", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index f91a0f5d..96aa4ca1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,9 +51,11 @@ itertools = "0.10.5" log = "0.4.20" simplelog = "0.12.1" rustc-hash = "1.1.0" -chrono = "0.4.31" +indexmap = "2.0.1" [dev-dependencies] httptest = "0.15.4" tempdir = "0.3.7" -maplit = "1.0.2" \ No newline at end of file +maplit = "1.0.2" +zksync-web3-rs = "0.1.1" +ethers = { version = "2.0.4", features = ["rustls"] } \ No newline at end of file diff --git a/SUPPORTED_APIS.md b/SUPPORTED_APIS.md index df2c441d..ca1ba172 100644 --- a/SUPPORTED_APIS.md +++ b/SUPPORTED_APIS.md @@ -47,7 +47,7 @@ The `status` options are: | [`ETH`](#eth-namespace) | [`eth_getFilterLogs`](#eth_getfilterlogs) | `SUPPORTED` | Returns an array of all logs matching filter with given id | | [`ETH`](#eth-namespace) | [`eth_getLogs`](#eth_getlogs) | `SUPPORTED` | Returns an array of all logs matching a given filter object | | `ETH` | `eth_getProof` | `NOT IMPLEMENTED` | Returns the details for the account at the specified address and block number, the account's Merkle proof, and the storage values for the specified storage keys with their Merkle-proofs | -| `ETH` | `eth_getStorageAt` | `NOT IMPLEMENTED`
[GitHub Issue #45](https://github.com/matter-labs/era-test-node/issues/45) | Returns the value from a storage position at a given address | +| [`ETH`](#eth-namespace) | `eth_getStorageAt`(#`eth_getstorageat) | `SUPPORTED` | Returns the value from a storage position at a given address | | `ETH` | `eth_getTransactionByBlockHashAndIndex` | `NOT IMPLEMENTED`
[GitHub Issue #46](https://github.com/matter-labs/era-test-node/issues/46) | Returns information about a transaction by block hash and transaction index position | | `ETH` | `eth_getTransactionByBlockNumberAndIndex` | `NOT IMPLEMENTED`
[GitHub Issue #47](https://github.com/matter-labs/era-test-node/issues/47) | Returns information about a transaction by block number and transaction index position | | [`ETH`](#eth-namespace) | [`eth_getTransactionReceipt`](#eth_gettransactionreceipt) | `SUPPORTED` | Returns the receipt of a transaction by transaction hash | @@ -1071,6 +1071,36 @@ curl --request POST \ }' ``` +### `eth_getStorageAt` + +[source](src/node.rs) + +Returns the value from a storage position at a given address. + +#### Arguments + ++ `address: H160` ++ `position: U256` ++ `blockNumber: BlockIdVariant` + +#### Status + +`SUPPORTED` + +#### Example + +```bash +curl --request POST \ + --url http://localhost:8011/ \ + --header 'content-type: application/json' \ + --data '{ + "jsonrpc": "2.0", + "id": "1", + "method": "eth_getStorageAt", + "params": ["0x123456789abcdef123456789abcdef1234567890", "0x0", "latest"] +}' +``` + ## `HARDHAT NAMESPACE` ### `hardhat_setBalance` diff --git a/src/node.rs b/src/node.rs index b50919d8..28aad4f2 100644 --- a/src/node.rs +++ b/src/node.rs @@ -14,6 +14,7 @@ use clap::Parser; use colored::Colorize; use core::fmt::Display; use futures::FutureExt; +use indexmap::IndexMap; use itertools::Itertools; use jsonrpc_core::BoxFuture; use once_cell::sync::OnceCell; @@ -56,8 +57,9 @@ use zksync_types::{ decompose_full_nonce, nonces_to_full_nonce, storage_key_for_eth_balance, storage_key_for_standard_token_balance, }, - PackedEthSignature, StorageKey, StorageLogQueryType, Transaction, ACCOUNT_CODE_STORAGE_ADDRESS, - EIP_712_TX_TYPE, L2_ETH_TOKEN_ADDRESS, MAX_GAS_PER_PUBDATA_BYTE, MAX_L2_TX_GAS_LIMIT, + PackedEthSignature, StorageKey, StorageLogQueryType, StorageValue, Transaction, + ACCOUNT_CODE_STORAGE_ADDRESS, EIP_712_TX_TYPE, L2_ETH_TOKEN_ADDRESS, MAX_GAS_PER_PUBDATA_BYTE, + MAX_L2_TX_GAS_LIMIT, }; use zksync_utils::{ bytecode::{compress_bytecode, hash_bytecode}, @@ -86,6 +88,8 @@ pub const ESTIMATE_GAS_PUBLISH_BYTE_OVERHEAD: u32 = 100; pub const ESTIMATE_GAS_ACCEPTABLE_OVERESTIMATION: u32 = 1_000; /// The factor by which to scale the gasLimit. pub const ESTIMATE_GAS_SCALE_FACTOR: f32 = 1.3; +/// The maximum number of previous blocks to store the state for. +pub const MAX_PREVIOUS_STATES: u16 = 128; pub fn compute_hash(block_number: u64, tx_hash: H256) -> H256 { let digest = [&block_number.to_be_bytes()[..], tx_hash.as_bytes()].concat(); @@ -248,6 +252,8 @@ pub struct InMemoryNodeInner { /// The latest miniblock number that was already generated. /// Next transaction will go to the block current_miniblock + 1 pub current_miniblock: u64, + /// The latest miniblock hash. + pub current_miniblock_hash: H256, pub l1_gas_price: u64, // Map from transaction to details about the exeuction pub tx_results: HashMap, @@ -273,6 +279,8 @@ pub struct InMemoryNodeInner { pub system_contracts: SystemContracts, pub impersonated_accounts: HashSet
, pub rich_accounts: HashSet, + /// Keeps track of historical states indexed via block hash. Limited to [MAX_PREVIOUS_STATES]. + pub previous_states: IndexMap>, } type L2TxResult = ( @@ -477,8 +485,8 @@ impl InMemoryNodeInner { gas_per_pubdata_byte, suggested_gas_limit, l1_gas_price, - batch_env.clone(), - system_env.clone(), + batch_env, + system_env, &self.fork_storage, ); @@ -653,6 +661,32 @@ impl InMemoryNodeInner { pub fn stop_impersonating_account(&mut self, address: Address) -> bool { self.impersonated_accounts.remove(&address) } + + /// Archives the current state for later queries. + pub fn archive_state(&mut self) -> Result<(), String> { + if self.previous_states.len() > MAX_PREVIOUS_STATES as usize { + if let Some(entry) = self.previous_states.shift_remove_index(0) { + log::debug!("removing archived state for previous block {:#x}", entry.0); + } + } + log::debug!( + "archiving state for {:#x} #{}", + self.current_miniblock_hash, + self.current_miniblock + ); + self.previous_states.insert( + self.current_miniblock_hash, + self.fork_storage + .inner + .read() + .map_err(|err| err.to_string())? + .raw_storage + .state + .clone(), + ); + + Ok(()) + } } fn not_implemented( @@ -719,6 +753,7 @@ impl InMemoryNode { current_timestamp: f.block_timestamp, current_batch: f.l1_block.0, current_miniblock: f.l2_miniblock, + current_miniblock_hash: f.l2_miniblock_hash, l1_gas_price: f.l1_gas_price, tx_results: Default::default(), blocks, @@ -734,6 +769,7 @@ impl InMemoryNode { system_contracts: SystemContracts::from_options(system_contracts_options), impersonated_accounts: Default::default(), rich_accounts: HashSet::new(), + previous_states: Default::default(), } } else { let mut block_hashes = HashMap::::new(); @@ -748,6 +784,7 @@ impl InMemoryNode { current_timestamp: NON_FORK_FIRST_BLOCK_TIMESTAMP, current_batch: 0, current_miniblock: 0, + current_miniblock_hash: H256::zero(), l1_gas_price: L1_GAS_PRICE, tx_results: Default::default(), blocks, @@ -763,6 +800,7 @@ impl InMemoryNode { system_contracts: SystemContracts::from_options(system_contracts_options), impersonated_accounts: Default::default(), rich_accounts: HashSet::new(), + previous_states: Default::default(), } }; @@ -811,7 +849,7 @@ impl InMemoryNode { } /// Runs L2 'eth call' method - that doesn't commit to a block. - fn run_l2_call(&self, l2_tx: L2Tx) -> Result { + fn run_l2_call(&self, mut l2_tx: L2Tx) -> Result { let execution_mode = TxExecutionMode::EthCall; let inner = self @@ -830,7 +868,6 @@ impl InMemoryNode { let mut vm = Vm::new(batch_env, system_env, storage, HistoryDisabled); - let mut l2_tx = l2_tx.clone(); // We must inject *some* signature (otherwise bootloader code fails to generate hash). if l2_tx.common_data.signature.is_empty() { l2_tx.common_data.signature = PackedEthSignature::default().serialize_packed().into(); @@ -1367,51 +1404,55 @@ impl InMemoryNode { let empty_block_at_end_of_batch = create_empty_block(block_ctx.miniblock, block_ctx.timestamp, block_ctx.batch); - let new_batch = inner.current_batch.saturating_add(1); - let mut current_miniblock = inner.current_miniblock; - let mut current_timestamp = inner.current_timestamp; + inner.current_batch = inner.current_batch.saturating_add(1); for block in vec![block, empty_block_at_end_of_batch] { - current_miniblock = current_miniblock.saturating_add(1); - current_timestamp = current_timestamp.saturating_add(1); + // archive current state before we produce new batch/blocks + if let Err(err) = inner.archive_state() { + log::error!( + "failed archiving state for block {}: {}", + inner.current_miniblock, + err + ); + } + + inner.current_miniblock = inner.current_miniblock.saturating_add(1); + inner.current_timestamp = inner.current_timestamp.saturating_add(1); let actual_l1_batch_number = block .l1_batch_number .expect("block must have a l1_batch_number"); - if actual_l1_batch_number.as_u32() != new_batch { + if actual_l1_batch_number.as_u32() != inner.current_batch { panic!( "expected next block to have batch_number {}, got {}", - new_batch, + inner.current_batch, actual_l1_batch_number.as_u32() ); } - if block.number.as_u64() != current_miniblock { + if block.number.as_u64() != inner.current_miniblock { panic!( "expected next block to have miniblock {}, got {}", - current_miniblock, + inner.current_miniblock, block.number.as_u64() ); } - if block.timestamp.as_u64() != current_timestamp { + if block.timestamp.as_u64() != inner.current_timestamp { panic!( "expected next block to have timestamp {}, got {}", - current_timestamp, + inner.current_timestamp, block.timestamp.as_u64() ); } let block_hash = block.hash; + inner.current_miniblock_hash = block_hash; inner.block_hashes.insert(block.number.as_u64(), block.hash); inner.blocks.insert(block.hash, block); inner.filters.notify_new_block(block_hash); } - inner.current_batch = new_batch; - inner.current_miniblock = current_miniblock; - inner.current_timestamp = current_timestamp; - Ok(()) } } @@ -2368,13 +2409,96 @@ impl EthNamespaceT for }) } + /// Returns the value from a storage position at a given address. + /// + /// # Arguments + /// + /// * `address`: Address of the storage + /// * `idx`: Integer of the position in the storage + /// * `block`: The block storage to target + /// + /// # Returns + /// + /// A `BoxFuture` containing a `jsonrpc_core::Result` that resolves to a [H256] value in the storage. fn get_storage( &self, - _address: zksync_basic_types::Address, - _idx: U256, - _block: Option, + address: zksync_basic_types::Address, + idx: U256, + block: Option, ) -> jsonrpc_core::BoxFuture> { - not_implemented("get_storage") + let inner = Arc::clone(&self.inner); + + Box::pin(async move { + let mut writer = match inner.write() { + Ok(r) => r, + Err(_) => { + return Err(into_jsrpc_error(Web3Error::InternalError)); + } + }; + + let storage_key = StorageKey::new(AccountTreeId::new(address), u256_to_h256(idx)); + + let block_number = block + .map(|block| match block { + zksync_types::api::BlockIdVariant::BlockNumber(block_number) => { + Ok(utils::to_real_block_number( + block_number, + U64::from(writer.current_miniblock), + )) + } + zksync_types::api::BlockIdVariant::BlockNumberObject(o) => { + Ok(utils::to_real_block_number( + o.block_number, + U64::from(writer.current_miniblock), + )) + } + zksync_types::api::BlockIdVariant::BlockHashObject(o) => writer + .blocks + .get(&o.block_hash) + .map(|block| block.number) + .ok_or_else(|| { + log::error!("unable to map block number to hash #{:#x}", o.block_hash); + into_jsrpc_error(Web3Error::InternalError) + }), + }) + .unwrap_or_else(|| Ok(U64::from(writer.current_miniblock)))?; + + if block_number.as_u64() == writer.current_miniblock { + Ok(H256(writer.fork_storage.read_value(&storage_key).0)) + } else if writer.block_hashes.contains_key(&block_number.as_u64()) { + let value = writer + .block_hashes + .get(&block_number.as_u64()) + .and_then(|block_hash| writer.previous_states.get(block_hash)) + .and_then(|state| state.get(&storage_key)) + .cloned() + .unwrap_or_default(); + + if value.is_zero() { + Ok(H256(writer.fork_storage.read_value(&storage_key).0)) + } else { + Ok(value) + } + } else { + writer + .fork_storage + .inner + .read() + .expect("failed reading fork storage") + .fork + .as_ref() + .and_then(|fork| fork.fork_source.get_storage_at(address, idx, block).ok()) + .ok_or_else(|| { + log::error!( + "unable to get storage at address {:?}, index {:?} for block {:?}", + address, + idx, + block + ); + into_jsrpc_error(Web3Error::InternalError) + }) + } + }) } fn get_transaction_by_block_hash_and_index( @@ -2524,7 +2648,11 @@ mod tests { node::InMemoryNode, testing::{self, ForkBlockConfig, LogBuilder, MockServer}, }; - use zksync_types::api::BlockNumber; + use maplit::hashmap; + use zksync_types::{ + api::{BlockHashObject, BlockNumber, BlockNumberObject}, + utils::deployed_address_create, + }; use zksync_web3_decl::types::{SyncState, ValueOrArray}; use super::*; @@ -3305,6 +3433,319 @@ mod tests { } } + #[tokio::test] + async fn test_produced_block_archives_previous_blocks() { + let node = InMemoryNode::::default(); + + let input_storage_key = StorageKey::new( + AccountTreeId::new(H160::repeat_byte(0x1)), + u256_to_h256(U256::zero()), + ); + let input_storage_value = H256::repeat_byte(0xcd); + node.inner + .write() + .unwrap() + .fork_storage + .set_value(input_storage_key, input_storage_value); + let initial_miniblock = node.inner.read().unwrap().current_miniblock; + + testing::apply_tx(&node, H256::repeat_byte(0x1)); + let current_miniblock = node.inner.read().unwrap().current_miniblock; + + let reader = node.inner.read().unwrap(); + for miniblock in initial_miniblock..current_miniblock { + let actual_cached_value = reader + .block_hashes + .get(&miniblock) + .map(|hash| { + reader + .previous_states + .get(hash) + .unwrap_or_else(|| panic!("state was not cached for block {}", miniblock)) + }) + .map(|state| state.get(&input_storage_key)) + .flatten() + .copied(); + + assert_eq!( + Some(input_storage_value), + actual_cached_value, + "unexpected cached state value for block {}", + miniblock + ); + } + } + + #[tokio::test] + async fn test_get_storage_fetches_zero_value_for_non_existent_key() { + let node = InMemoryNode::::default(); + + let value = node + .get_storage(H160::repeat_byte(0xf1), U256::from(1024), None) + .await + .expect("failed retrieving storage"); + assert_eq!(H256::zero(), value); + } + + #[tokio::test] + async fn test_get_storage_uses_fork_to_get_value_for_historical_block() { + let mock_server = MockServer::run_with_config(ForkBlockConfig { + number: 10, + transaction_count: 0, + hash: H256::repeat_byte(0xab), + }); + let input_address = H160::repeat_byte(0x1); + let input_storage_value = H256::repeat_byte(0xcd); + mock_server.expect( + serde_json::json!({ + "jsonrpc": "2.0", + "id": 0, + "method": "eth_getStorageAt", + "params": [ + format!("{:#x}", input_address), + "0x0", + { "blockNumber": "0x2" }, + ], + }), + serde_json::json!({ + "jsonrpc": "2.0", + "id": 0, + "result": format!("{:#x}", input_storage_value), + }), + ); + + let node = InMemoryNode::::new( + Some(ForkDetails::from_network(&mock_server.url(), None, CacheConfig::None).await), + crate::node::ShowCalls::None, + ShowStorageLogs::None, + ShowVMDetails::None, + ShowGasDetails::None, + false, + &system_contracts::Options::BuiltIn, + ); + + let actual_value = node + .get_storage( + input_address, + U256::zero(), + Some(zksync_types::api::BlockIdVariant::BlockNumberObject( + BlockNumberObject { + block_number: BlockNumber::Number(U64::from(2)), + }, + )), + ) + .await + .expect("failed retrieving storage"); + assert_eq!(input_storage_value, actual_value); + } + + #[tokio::test] + async fn test_get_storage_uses_archived_storage_to_get_value_for_missing_key() { + let input_address = H160::repeat_byte(0x1); + let input_storage_key = StorageKey::new( + AccountTreeId::new(input_address), + u256_to_h256(U256::zero()), + ); + let input_storage_value = H256::repeat_byte(0xcd); + + let node = InMemoryNode::::default(); + node.inner + .write() + .and_then(|mut writer| { + let historical_block = Block:: { + hash: H256::repeat_byte(0x2), + number: U64::from(2), + ..Default::default() + }; + writer.block_hashes.insert(2, historical_block.hash); + + writer.previous_states.insert( + historical_block.hash, + hashmap! { + input_storage_key => input_storage_value, + }, + ); + writer + .blocks + .insert(historical_block.hash, historical_block); + + Ok(()) + }) + .expect("failed setting storage for historical block"); + + let actual_value = node + .get_storage( + input_address, + U256::zero(), + Some(zksync_types::api::BlockIdVariant::BlockNumberObject( + BlockNumberObject { + block_number: BlockNumber::Number(U64::from(2)), + }, + )), + ) + .await + .expect("failed retrieving storage"); + assert_eq!(input_storage_value, actual_value); + } + + #[tokio::test] + async fn test_get_storage_uses_fork_to_get_value_for_latest_block_for_missing_key() { + let mock_server = MockServer::run_with_config(ForkBlockConfig { + number: 10, + transaction_count: 0, + hash: H256::repeat_byte(0xab), + }); + let input_address = H160::repeat_byte(0x1); + let input_storage_value = H256::repeat_byte(0xcd); + mock_server.expect( + serde_json::json!({ + "jsonrpc": "2.0", + "id": 0, + "method": "eth_getStorageAt", + "params": [ + format!("{:#x}", input_address), + "0x0", + "0xa", + ], + }), + serde_json::json!({ + "jsonrpc": "2.0", + "id": 0, + "result": format!("{:#x}", input_storage_value), + }), + ); + + let node = InMemoryNode::::new( + Some(ForkDetails::from_network(&mock_server.url(), None, CacheConfig::None).await), + crate::node::ShowCalls::None, + ShowStorageLogs::None, + ShowVMDetails::None, + ShowGasDetails::None, + false, + &system_contracts::Options::BuiltIn, + ); + node.inner + .write() + .and_then(|mut writer| { + let historical_block = Block:: { + hash: H256::repeat_byte(0x2), + number: U64::from(2), + ..Default::default() + }; + writer.block_hashes.insert(2, historical_block.hash); + writer + .previous_states + .insert(historical_block.hash, Default::default()); + writer + .blocks + .insert(historical_block.hash, historical_block); + + Ok(()) + }) + .expect("failed setting storage for historical block"); + + let actual_value = node + .get_storage( + input_address, + U256::zero(), + Some(zksync_types::api::BlockIdVariant::BlockNumberObject( + BlockNumberObject { + block_number: BlockNumber::Number(U64::from(2)), + }, + )), + ) + .await + .expect("failed retrieving storage"); + assert_eq!(input_storage_value, actual_value); + } + + #[tokio::test] + async fn test_get_storage_fetches_state_for_deployed_smart_contract_in_current_block() { + let node = InMemoryNode::::default(); + + let private_key = H256::repeat_byte(0xef); + let from_account = zksync_types::PackedEthSignature::address_from_private_key(&private_key) + .expect("failed generating address"); + node.set_rich_account(from_account); + + let deployed_address = deployed_address_create(from_account, U256::zero()); + + testing::deploy_contract( + &node, + H256::repeat_byte(0x1), + private_key, + hex::decode(testing::STORAGE_CONTRACT_BYTECODE).unwrap(), + ); + + let number1 = node + .get_storage(deployed_address, U256::from(0), None) + .await + .expect("failed retrieving storage at slot 0"); + assert_eq!(U256::from(1024), h256_to_u256(number1)); + + let number2 = node + .get_storage(deployed_address, U256::from(1), None) + .await + .expect("failed retrieving storage at slot 1"); + assert_eq!(U256::MAX, h256_to_u256(number2)); + } + + #[tokio::test] + async fn test_get_storage_fetches_state_for_deployed_smart_contract_in_old_block() { + let node = InMemoryNode::::default(); + + let private_key = H256::repeat_byte(0xef); + let from_account = zksync_types::PackedEthSignature::address_from_private_key(&private_key) + .expect("failed generating address"); + node.set_rich_account(from_account); + + let deployed_address = deployed_address_create(from_account, U256::zero()); + + let initial_block_hash = testing::deploy_contract( + &node, + H256::repeat_byte(0x1), + private_key, + hex::decode(testing::STORAGE_CONTRACT_BYTECODE).unwrap(), + ); + + // simulate a tx modifying the storage + testing::apply_tx(&node, H256::repeat_byte(0x2)); + let key = StorageKey::new( + AccountTreeId::new(deployed_address), + u256_to_h256(U256::from(0)), + ); + node.inner + .write() + .unwrap() + .fork_storage + .inner + .write() + .unwrap() + .raw_storage + .state + .insert(key, u256_to_h256(U256::from(512))); + + let number1_current = node + .get_storage(deployed_address, U256::from(0), None) + .await + .expect("failed retrieving storage at slot 0"); + assert_eq!(U256::from(512), h256_to_u256(number1_current)); + + let number1_old = node + .get_storage( + deployed_address, + U256::from(0), + Some(zksync_types::api::BlockIdVariant::BlockHashObject( + BlockHashObject { + block_hash: initial_block_hash, + }, + )), + ) + .await + .expect("failed retrieving storage at slot 0"); + assert_eq!(U256::from(1024), h256_to_u256(number1_old)); + } + #[tokio::test] async fn test_get_filter_logs_returns_matching_logs_for_valid_id() { let node = InMemoryNode::::default(); diff --git a/src/testing.rs b/src/testing.rs index a2f9399d..97a02fdd 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -8,6 +8,7 @@ use crate::node::{InMemoryNode, TxExecutionInfo}; use crate::{fork::ForkSource, node::compute_hash}; +use ethers::contract; use httptest::{ matchers::{eq, json_decoded, request}, responders::json_encoded, @@ -142,19 +143,6 @@ impl MockServer { } }))), ); - server.expect( - Expectation::matching(request::body(json_decoded(eq(serde_json::json!({ - "jsonrpc": "2.0", - "id": 4, - "method": "eth_getStorageAt", - "params": vec!["0x000000000000000000000000000000000000800a","0xe9472b134a1b5f7b935d5debff2691f95801214eafffdeabbf0e366da383104e","0xa"], - }))))).times(0..) - .respond_with(json_encoded(serde_json::json!({ - "jsonrpc": "2.0", - "id": 4, - "result": "0x0000000000000000000000000000000000000000000000000000000000000000", - }))), - ); MockServer { inner: server } } @@ -391,6 +379,86 @@ pub fn apply_tx(node: &InMemoryNode, tx_hash produced_block_hash } +/// Deploys a contract with the given bytecode. +pub fn deploy_contract( + node: &InMemoryNode, + tx_hash: H256, + private_key: H256, + bytecode: Vec, +) -> H256 { + use ethers::abi::Function; + use ethers::types::Bytes; + use zksync_web3_rs::eip712; + + let next_miniblock = node + .get_inner() + .read() + .map(|reader| reader.current_miniblock.saturating_add(1)) + .expect("failed getting current batch number"); + let produced_block_hash = compute_hash(next_miniblock, tx_hash); + + let salt = [0u8; 32]; + let bytecode_hash = eip712::hash_bytecode(&bytecode).expect("invalid bytecode"); + let call_data: Bytes = Default::default(); + let create: Function = serde_json::from_str( + r#"{ + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_bytecodeHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_input", + "type": "bytes" + } + ], + "name": "create", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }"#, + ) + .unwrap(); + + let data = contract::encode_function_data(&create, (salt, bytecode_hash, call_data)) + .expect("failed encoding function data"); + + let mut tx = L2Tx::new_signed( + zksync_types::CONTRACT_DEPLOYER_ADDRESS, + data.to_vec(), + zksync_basic_types::Nonce(0), + Fee { + gas_limit: U256::from(8251129), + max_fee_per_gas: U256::from(250_000_000), + max_priority_fee_per_gas: U256::from(250_000_000), + gas_per_pubdata_limit: U256::from(50000), + }, + U256::from(0), + zksync_basic_types::L2ChainId(260), + &private_key, + Some(vec![bytecode]), + Default::default(), + ) + .expect("failed signing tx"); + tx.set_input(vec![], tx_hash); + node.apply_txs(vec![tx]).expect("failed deploying contract"); + + produced_block_hash +} + /// Builds transaction logs #[derive(Debug, Default, Clone)] pub struct LogBuilder { @@ -442,6 +510,22 @@ impl LogBuilder { } } +/// Simple storage solidity contract that stores and retrieves two numbers +/// +/// contract Storage { +/// uint256 number1 = 1024; +/// uint256 number2 = 115792089237316195423570985008687907853269984665640564039457584007913129639935; // uint256::max +/// +/// function retrieve1() public view returns (uint256) { +/// return number1; +/// } +/// +/// function retrieve2() public view returns (uint256) { +/// return number2; +/// } +/// } +pub const STORAGE_CONTRACT_BYTECODE: &str = "000200000000000200010000000103550000006001100270000000160010019d0000008001000039000000400010043f0000000101200190000000280000c13d0000000001000031000000040110008c000000460000413d0000000101000367000000000101043b000000e001100270000000180210009c000000350000613d000000190110009c000000460000c13d0000000001000416000000000101004b000000460000c13d000000040100008a00000000011000310000001a02000041000000000301004b000000000300001900000000030240190000001a01100197000000000401004b000000000200a0190000001a0110009c00000000010300190000000001026019000000000101004b000000460000c13d0000000101000039000000000101041a000000800010043f0000001c01000041000000520001042e0000000001000416000000000101004b000000460000c13d0000040001000039000000000010041b000000010100008a0000000102000039000000000012041b0000002001000039000001000010044300000120000004430000001701000041000000520001042e0000000001000416000000000101004b000000460000c13d000000040100008a00000000011000310000001a02000041000000000301004b000000000300001900000000030240190000001a01100197000000000401004b000000000200a0190000001a0110009c00000000010300190000000001026019000000000101004b000000480000613d00000000010000190000005300010430000000400100043d000000000200041a00000000002104350000001602000041000000160310009c000000000102801900000040011002100000001b011001c7000000520001042e0000005100000432000000520001042e0000005300010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff000000020000000000000000000000000000004000000100000000000000000000000000000000000000000000000000000000000000000000000000ae2e2cce000000000000000000000000000000000000000000000000000000002711432d80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000dec5bcecb8ee3456d9f70206a2d3c7fe5879354667a3a4b473afaff3d289dc8"; + /// Returns a default instance for a successful [TxExecutionInfo] pub fn default_tx_execution_info() -> TxExecutionInfo { TxExecutionInfo { diff --git a/test_endpoints.http b/test_endpoints.http index 30bd0f20..9c750b6b 100644 --- a/test_endpoints.http +++ b/test_endpoints.http @@ -476,6 +476,17 @@ content-type: application/json POST http://localhost:8011 content-type: application/json +{ + "jsonrpc": "2.0", + "id": "2", + "method": "eth_getStorageAt", + "params": ["0x123456789abcdef123456789abcdef1234567890", "0x0", "latest"] +} + +### +POST http://localhost:8011 +content-type: application/json + { "jsonrpc": "2.0", "id": "2",