├── .env.example ├── .gitignore ├── .vscode └── settings.json ├── Cargo.lock ├── Cargo.toml ├── README.md └── src ├── cli.rs ├── lib.rs ├── main.rs └── simulator ├── constants.rs ├── fork_simulator.rs ├── mod.rs ├── print_result.rs ├── process_logs.rs ├── trace_simulator.rs ├── types.rs └── utils.rs /.env.example: -------------------------------------------------------------------------------- 1 | RPC_URL= -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .env 3 | output -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.linkedProjects": ["./Cargo.toml"] 3 | } 4 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "Inflector" 7 | version = "0.11.4" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" 10 | dependencies = [ 11 | "lazy_static", 12 | "regex", 13 | ] 14 | 15 | [[package]] 16 | name = "addr2line" 17 | version = "0.20.0" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" 20 | dependencies = [ 21 | "gimli", 22 | ] 23 | 24 | [[package]] 25 | name = "adler" 26 | version = "1.0.2" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 29 | 30 | [[package]] 31 | name = "aes" 32 | version = "0.8.3" 33 | source = "registry+https://github.com/rust-lang/crates.io-index" 34 | checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" 35 | dependencies = [ 36 | "cfg-if", 37 | "cipher", 38 | "cpufeatures", 39 | ] 40 | 41 | [[package]] 42 | name = "aho-corasick" 43 | version = "1.0.2" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" 46 | dependencies = [ 47 | "memchr", 48 | ] 49 | 50 | [[package]] 51 | name = "android-tzdata" 52 | version = "0.1.1" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 55 | 56 | [[package]] 57 | name = "ansi_term" 58 | version = "0.12.1" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 61 | dependencies = [ 62 | "winapi", 63 | ] 64 | 65 | [[package]] 66 | name = "arrayvec" 67 | version = "0.7.4" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" 70 | 71 | [[package]] 72 | name = "ascii-canvas" 73 | version = "3.0.0" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" 76 | dependencies = [ 77 | "term", 78 | ] 79 | 80 | [[package]] 81 | name = "async-trait" 82 | version = "0.1.71" 83 | source = "registry+https://github.com/rust-lang/crates.io-index" 84 | checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" 85 | dependencies = [ 86 | "proc-macro2", 87 | "quote", 88 | "syn 2.0.23", 89 | ] 90 | 91 | [[package]] 92 | name = "async_io_stream" 93 | version = "0.3.3" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" 96 | dependencies = [ 97 | "futures", 98 | "pharos", 99 | "rustc_version", 100 | ] 101 | 102 | [[package]] 103 | name = "atty" 104 | version = "0.2.14" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 107 | dependencies = [ 108 | "hermit-abi 0.1.19", 109 | "libc", 110 | "winapi", 111 | ] 112 | 113 | [[package]] 114 | name = "auto_impl" 115 | version = "1.1.0" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" 118 | dependencies = [ 119 | "proc-macro-error", 120 | "proc-macro2", 121 | "quote", 122 | "syn 1.0.109", 123 | ] 124 | 125 | [[package]] 126 | name = "autocfg" 127 | version = "1.1.0" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 130 | 131 | [[package]] 132 | name = "backtrace" 133 | version = "0.3.68" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" 136 | dependencies = [ 137 | "addr2line", 138 | "cc", 139 | "cfg-if", 140 | "libc", 141 | "miniz_oxide", 142 | "object", 143 | "rustc-demangle", 144 | ] 145 | 146 | [[package]] 147 | name = "base16ct" 148 | version = "0.2.0" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" 151 | 152 | [[package]] 153 | name = "base64" 154 | version = "0.13.1" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 157 | 158 | [[package]] 159 | name = "base64" 160 | version = "0.21.2" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" 163 | 164 | [[package]] 165 | name = "base64ct" 166 | version = "1.6.0" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 169 | 170 | [[package]] 171 | name = "bech32" 172 | version = "0.7.3" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "2dabbe35f96fb9507f7330793dc490461b2962659ac5d427181e451a623751d1" 175 | 176 | [[package]] 177 | name = "bincode" 178 | version = "1.3.3" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 181 | dependencies = [ 182 | "serde", 183 | ] 184 | 185 | [[package]] 186 | name = "bit-set" 187 | version = "0.5.3" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 190 | dependencies = [ 191 | "bit-vec", 192 | ] 193 | 194 | [[package]] 195 | name = "bit-vec" 196 | version = "0.6.3" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 199 | 200 | [[package]] 201 | name = "bitflags" 202 | version = "1.3.2" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 205 | 206 | [[package]] 207 | name = "bitflags" 208 | version = "2.3.3" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" 211 | 212 | [[package]] 213 | name = "bitvec" 214 | version = "0.17.4" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" 217 | dependencies = [ 218 | "either", 219 | "radium 0.3.0", 220 | ] 221 | 222 | [[package]] 223 | name = "bitvec" 224 | version = "1.0.1" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" 227 | dependencies = [ 228 | "funty", 229 | "radium 0.7.0", 230 | "tap", 231 | "wyz", 232 | ] 233 | 234 | [[package]] 235 | name = "block-buffer" 236 | version = "0.9.0" 237 | source = "registry+https://github.com/rust-lang/crates.io-index" 238 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 239 | dependencies = [ 240 | "generic-array", 241 | ] 242 | 243 | [[package]] 244 | name = "block-buffer" 245 | version = "0.10.4" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 248 | dependencies = [ 249 | "generic-array", 250 | ] 251 | 252 | [[package]] 253 | name = "bs58" 254 | version = "0.4.0" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" 257 | dependencies = [ 258 | "sha2 0.9.9", 259 | ] 260 | 261 | [[package]] 262 | name = "bumpalo" 263 | version = "3.13.0" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" 266 | 267 | [[package]] 268 | name = "byte-slice-cast" 269 | version = "1.2.2" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" 272 | 273 | [[package]] 274 | name = "byteorder" 275 | version = "1.4.3" 276 | source = "registry+https://github.com/rust-lang/crates.io-index" 277 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 278 | 279 | [[package]] 280 | name = "bytes" 281 | version = "1.4.0" 282 | source = "registry+https://github.com/rust-lang/crates.io-index" 283 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 284 | dependencies = [ 285 | "serde", 286 | ] 287 | 288 | [[package]] 289 | name = "bzip2" 290 | version = "0.4.4" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" 293 | dependencies = [ 294 | "bzip2-sys", 295 | "libc", 296 | ] 297 | 298 | [[package]] 299 | name = "bzip2-sys" 300 | version = "0.1.11+1.0.8" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" 303 | dependencies = [ 304 | "cc", 305 | "libc", 306 | "pkg-config", 307 | ] 308 | 309 | [[package]] 310 | name = "camino" 311 | version = "1.1.4" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" 314 | dependencies = [ 315 | "serde", 316 | ] 317 | 318 | [[package]] 319 | name = "cargo-platform" 320 | version = "0.1.2" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" 323 | dependencies = [ 324 | "serde", 325 | ] 326 | 327 | [[package]] 328 | name = "cargo_metadata" 329 | version = "0.15.4" 330 | source = "registry+https://github.com/rust-lang/crates.io-index" 331 | checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" 332 | dependencies = [ 333 | "camino", 334 | "cargo-platform", 335 | "semver", 336 | "serde", 337 | "serde_json", 338 | "thiserror", 339 | ] 340 | 341 | [[package]] 342 | name = "cc" 343 | version = "1.0.79" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 346 | dependencies = [ 347 | "jobserver", 348 | ] 349 | 350 | [[package]] 351 | name = "cfg-if" 352 | version = "1.0.0" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 355 | 356 | [[package]] 357 | name = "chrono" 358 | version = "0.4.26" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" 361 | dependencies = [ 362 | "android-tzdata", 363 | "num-traits", 364 | ] 365 | 366 | [[package]] 367 | name = "cipher" 368 | version = "0.4.4" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" 371 | dependencies = [ 372 | "crypto-common", 373 | "inout", 374 | ] 375 | 376 | [[package]] 377 | name = "clap" 378 | version = "2.34.0" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 381 | dependencies = [ 382 | "ansi_term", 383 | "atty", 384 | "bitflags 1.3.2", 385 | "strsim", 386 | "textwrap", 387 | "unicode-width", 388 | "vec_map", 389 | ] 390 | 391 | [[package]] 392 | name = "coins-bip32" 393 | version = "0.8.3" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "b30a84aab436fcb256a2ab3c80663d8aec686e6bae12827bb05fef3e1e439c9f" 396 | dependencies = [ 397 | "bincode", 398 | "bs58", 399 | "coins-core", 400 | "digest 0.10.7", 401 | "getrandom", 402 | "hmac", 403 | "k256", 404 | "lazy_static", 405 | "serde", 406 | "sha2 0.10.7", 407 | "thiserror", 408 | ] 409 | 410 | [[package]] 411 | name = "coins-bip39" 412 | version = "0.8.6" 413 | source = "registry+https://github.com/rust-lang/crates.io-index" 414 | checksum = "84f4d04ee18e58356accd644896aeb2094ddeafb6a713e056cef0c0a8e468c15" 415 | dependencies = [ 416 | "bitvec 0.17.4", 417 | "coins-bip32", 418 | "getrandom", 419 | "hmac", 420 | "once_cell", 421 | "pbkdf2 0.12.1", 422 | "rand", 423 | "sha2 0.10.7", 424 | "thiserror", 425 | ] 426 | 427 | [[package]] 428 | name = "coins-core" 429 | version = "0.8.3" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "9b949a1c63fb7eb591eb7ba438746326aedf0ae843e51ec92ba6bec5bb382c4f" 432 | dependencies = [ 433 | "base64 0.21.2", 434 | "bech32", 435 | "bs58", 436 | "digest 0.10.7", 437 | "generic-array", 438 | "hex", 439 | "ripemd", 440 | "serde", 441 | "serde_derive", 442 | "sha2 0.10.7", 443 | "sha3", 444 | "thiserror", 445 | ] 446 | 447 | [[package]] 448 | name = "const-oid" 449 | version = "0.9.3" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "6340df57935414636969091153f35f68d9f00bbc8fb4a9c6054706c213e6c6bc" 452 | 453 | [[package]] 454 | name = "constant_time_eq" 455 | version = "0.1.5" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" 458 | 459 | [[package]] 460 | name = "cpufeatures" 461 | version = "0.2.9" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" 464 | dependencies = [ 465 | "libc", 466 | ] 467 | 468 | [[package]] 469 | name = "crc32fast" 470 | version = "1.3.2" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 473 | dependencies = [ 474 | "cfg-if", 475 | ] 476 | 477 | [[package]] 478 | name = "crossbeam-channel" 479 | version = "0.5.8" 480 | source = "registry+https://github.com/rust-lang/crates.io-index" 481 | checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" 482 | dependencies = [ 483 | "cfg-if", 484 | "crossbeam-utils", 485 | ] 486 | 487 | [[package]] 488 | name = "crossbeam-deque" 489 | version = "0.8.3" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" 492 | dependencies = [ 493 | "cfg-if", 494 | "crossbeam-epoch", 495 | "crossbeam-utils", 496 | ] 497 | 498 | [[package]] 499 | name = "crossbeam-epoch" 500 | version = "0.9.15" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" 503 | dependencies = [ 504 | "autocfg", 505 | "cfg-if", 506 | "crossbeam-utils", 507 | "memoffset", 508 | "scopeguard", 509 | ] 510 | 511 | [[package]] 512 | name = "crossbeam-utils" 513 | version = "0.8.16" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 516 | dependencies = [ 517 | "cfg-if", 518 | ] 519 | 520 | [[package]] 521 | name = "crunchy" 522 | version = "0.2.2" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 525 | 526 | [[package]] 527 | name = "crypto-bigint" 528 | version = "0.5.2" 529 | source = "registry+https://github.com/rust-lang/crates.io-index" 530 | checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" 531 | dependencies = [ 532 | "generic-array", 533 | "rand_core", 534 | "subtle", 535 | "zeroize", 536 | ] 537 | 538 | [[package]] 539 | name = "crypto-common" 540 | version = "0.1.6" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 543 | dependencies = [ 544 | "generic-array", 545 | "typenum", 546 | ] 547 | 548 | [[package]] 549 | name = "ctr" 550 | version = "0.9.2" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" 553 | dependencies = [ 554 | "cipher", 555 | ] 556 | 557 | [[package]] 558 | name = "data-encoding" 559 | version = "2.4.0" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" 562 | 563 | [[package]] 564 | name = "der" 565 | version = "0.7.7" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" 568 | dependencies = [ 569 | "const-oid", 570 | "zeroize", 571 | ] 572 | 573 | [[package]] 574 | name = "derive_more" 575 | version = "0.99.17" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 578 | dependencies = [ 579 | "proc-macro2", 580 | "quote", 581 | "syn 1.0.109", 582 | ] 583 | 584 | [[package]] 585 | name = "diff" 586 | version = "0.1.13" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" 589 | 590 | [[package]] 591 | name = "digest" 592 | version = "0.9.0" 593 | source = "registry+https://github.com/rust-lang/crates.io-index" 594 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 595 | dependencies = [ 596 | "generic-array", 597 | ] 598 | 599 | [[package]] 600 | name = "digest" 601 | version = "0.10.7" 602 | source = "registry+https://github.com/rust-lang/crates.io-index" 603 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 604 | dependencies = [ 605 | "block-buffer 0.10.4", 606 | "const-oid", 607 | "crypto-common", 608 | "subtle", 609 | ] 610 | 611 | [[package]] 612 | name = "dirs-next" 613 | version = "2.0.0" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 616 | dependencies = [ 617 | "cfg-if", 618 | "dirs-sys-next", 619 | ] 620 | 621 | [[package]] 622 | name = "dirs-sys-next" 623 | version = "0.1.2" 624 | source = "registry+https://github.com/rust-lang/crates.io-index" 625 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 626 | dependencies = [ 627 | "libc", 628 | "redox_users", 629 | "winapi", 630 | ] 631 | 632 | [[package]] 633 | name = "dotenv" 634 | version = "0.15.0" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 637 | 638 | [[package]] 639 | name = "dunce" 640 | version = "1.0.4" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" 643 | 644 | [[package]] 645 | name = "ecdsa" 646 | version = "0.16.7" 647 | source = "registry+https://github.com/rust-lang/crates.io-index" 648 | checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" 649 | dependencies = [ 650 | "der", 651 | "digest 0.10.7", 652 | "elliptic-curve", 653 | "rfc6979", 654 | "signature", 655 | "spki", 656 | ] 657 | 658 | [[package]] 659 | name = "either" 660 | version = "1.8.1" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 663 | 664 | [[package]] 665 | name = "elliptic-curve" 666 | version = "0.13.5" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" 669 | dependencies = [ 670 | "base16ct", 671 | "crypto-bigint", 672 | "digest 0.10.7", 673 | "ff", 674 | "generic-array", 675 | "group", 676 | "pkcs8", 677 | "rand_core", 678 | "sec1", 679 | "subtle", 680 | "zeroize", 681 | ] 682 | 683 | [[package]] 684 | name = "ena" 685 | version = "0.14.2" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" 688 | dependencies = [ 689 | "log", 690 | ] 691 | 692 | [[package]] 693 | name = "encoding_rs" 694 | version = "0.8.32" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 697 | dependencies = [ 698 | "cfg-if", 699 | ] 700 | 701 | [[package]] 702 | name = "enr" 703 | version = "0.8.1" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116" 706 | dependencies = [ 707 | "base64 0.13.1", 708 | "bytes", 709 | "hex", 710 | "k256", 711 | "log", 712 | "rand", 713 | "rlp", 714 | "serde", 715 | "sha3", 716 | "zeroize", 717 | ] 718 | 719 | [[package]] 720 | name = "equivalent" 721 | version = "1.0.0" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" 724 | 725 | [[package]] 726 | name = "errno" 727 | version = "0.3.1" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" 730 | dependencies = [ 731 | "errno-dragonfly", 732 | "libc", 733 | "windows-sys", 734 | ] 735 | 736 | [[package]] 737 | name = "errno-dragonfly" 738 | version = "0.1.2" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 741 | dependencies = [ 742 | "cc", 743 | "libc", 744 | ] 745 | 746 | [[package]] 747 | name = "eth-keystore" 748 | version = "0.5.0" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" 751 | dependencies = [ 752 | "aes", 753 | "ctr", 754 | "digest 0.10.7", 755 | "hex", 756 | "hmac", 757 | "pbkdf2 0.11.0", 758 | "rand", 759 | "scrypt", 760 | "serde", 761 | "serde_json", 762 | "sha2 0.10.7", 763 | "sha3", 764 | "thiserror", 765 | "uuid", 766 | ] 767 | 768 | [[package]] 769 | name = "ethabi" 770 | version = "18.0.0" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" 773 | dependencies = [ 774 | "ethereum-types", 775 | "hex", 776 | "once_cell", 777 | "regex", 778 | "serde", 779 | "serde_json", 780 | "sha3", 781 | "thiserror", 782 | "uint", 783 | ] 784 | 785 | [[package]] 786 | name = "ethbloom" 787 | version = "0.13.0" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" 790 | dependencies = [ 791 | "crunchy", 792 | "fixed-hash", 793 | "impl-codec", 794 | "impl-rlp", 795 | "impl-serde", 796 | "scale-info", 797 | "tiny-keccak", 798 | ] 799 | 800 | [[package]] 801 | name = "ethereum-types" 802 | version = "0.14.1" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" 805 | dependencies = [ 806 | "ethbloom", 807 | "fixed-hash", 808 | "impl-codec", 809 | "impl-rlp", 810 | "impl-serde", 811 | "primitive-types", 812 | "scale-info", 813 | "uint", 814 | ] 815 | 816 | [[package]] 817 | name = "ethers" 818 | version = "2.0.7" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | checksum = "2a58ce802c65cf3d0756dee5a61094a92cde53c1583b246e9ee5b37226c7fc15" 821 | dependencies = [ 822 | "ethers-addressbook", 823 | "ethers-contract", 824 | "ethers-core", 825 | "ethers-etherscan", 826 | "ethers-middleware", 827 | "ethers-providers", 828 | "ethers-signers", 829 | "ethers-solc", 830 | ] 831 | 832 | [[package]] 833 | name = "ethers-addressbook" 834 | version = "2.0.7" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | checksum = "7b856b7b8ff5c961093cb8efe151fbcce724b451941ce20781de11a531ccd578" 837 | dependencies = [ 838 | "ethers-core", 839 | "once_cell", 840 | "serde", 841 | "serde_json", 842 | ] 843 | 844 | [[package]] 845 | name = "ethers-contract" 846 | version = "2.0.7" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "e066a0d9cfc70c454672bf16bb433b0243427420076dc5b2f49c448fb5a10628" 849 | dependencies = [ 850 | "ethers-contract-abigen", 851 | "ethers-contract-derive", 852 | "ethers-core", 853 | "ethers-providers", 854 | "futures-util", 855 | "hex", 856 | "once_cell", 857 | "pin-project", 858 | "serde", 859 | "serde_json", 860 | "thiserror", 861 | ] 862 | 863 | [[package]] 864 | name = "ethers-contract-abigen" 865 | version = "2.0.7" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "c113e3e86b6bc16d98484b2c3bb2d01d6fed9f489fe2e592e5cc87c3024d616b" 868 | dependencies = [ 869 | "Inflector", 870 | "dunce", 871 | "ethers-core", 872 | "ethers-etherscan", 873 | "eyre", 874 | "hex", 875 | "prettyplease", 876 | "proc-macro2", 877 | "quote", 878 | "regex", 879 | "reqwest", 880 | "serde", 881 | "serde_json", 882 | "syn 2.0.23", 883 | "toml", 884 | "walkdir", 885 | ] 886 | 887 | [[package]] 888 | name = "ethers-contract-derive" 889 | version = "2.0.7" 890 | source = "registry+https://github.com/rust-lang/crates.io-index" 891 | checksum = "8c3fb5adee25701c79ec58fcf2c63594cd8829bc9ad6037ff862d5a111101ed2" 892 | dependencies = [ 893 | "Inflector", 894 | "ethers-contract-abigen", 895 | "ethers-core", 896 | "hex", 897 | "proc-macro2", 898 | "quote", 899 | "serde_json", 900 | "syn 2.0.23", 901 | ] 902 | 903 | [[package]] 904 | name = "ethers-core" 905 | version = "2.0.7" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "6da5fa198af0d3be20c19192df2bd9590b92ce09a8421e793bec8851270f1b05" 908 | dependencies = [ 909 | "arrayvec", 910 | "bytes", 911 | "cargo_metadata", 912 | "chrono", 913 | "elliptic-curve", 914 | "ethabi", 915 | "generic-array", 916 | "hex", 917 | "k256", 918 | "num_enum", 919 | "once_cell", 920 | "open-fastrlp", 921 | "rand", 922 | "rlp", 923 | "serde", 924 | "serde_json", 925 | "strum", 926 | "syn 2.0.23", 927 | "tempfile", 928 | "thiserror", 929 | "tiny-keccak", 930 | "unicode-xid", 931 | ] 932 | 933 | [[package]] 934 | name = "ethers-etherscan" 935 | version = "2.0.7" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "84ebb401ba97c6f5af278c2c9936c4546cad75dec464b439ae6df249906f4caa" 938 | dependencies = [ 939 | "ethers-core", 940 | "reqwest", 941 | "semver", 942 | "serde", 943 | "serde_json", 944 | "thiserror", 945 | "tracing", 946 | ] 947 | 948 | [[package]] 949 | name = "ethers-middleware" 950 | version = "2.0.7" 951 | source = "registry+https://github.com/rust-lang/crates.io-index" 952 | checksum = "740f4a773c19dd6d6a68c8c2e0996c096488d38997d524e21dc612c55da3bd24" 953 | dependencies = [ 954 | "async-trait", 955 | "auto_impl", 956 | "ethers-contract", 957 | "ethers-core", 958 | "ethers-etherscan", 959 | "ethers-providers", 960 | "ethers-signers", 961 | "futures-channel", 962 | "futures-locks", 963 | "futures-util", 964 | "instant", 965 | "reqwest", 966 | "serde", 967 | "serde_json", 968 | "thiserror", 969 | "tokio", 970 | "tracing", 971 | "tracing-futures", 972 | "url", 973 | ] 974 | 975 | [[package]] 976 | name = "ethers-providers" 977 | version = "2.0.7" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "56b498fd2a6c019d023e43e83488cd1fb0721f299055975aa6bac8dbf1e95f2c" 980 | dependencies = [ 981 | "async-trait", 982 | "auto_impl", 983 | "base64 0.21.2", 984 | "bytes", 985 | "enr", 986 | "ethers-core", 987 | "futures-core", 988 | "futures-timer", 989 | "futures-util", 990 | "hashers", 991 | "hex", 992 | "http", 993 | "instant", 994 | "once_cell", 995 | "pin-project", 996 | "reqwest", 997 | "serde", 998 | "serde_json", 999 | "thiserror", 1000 | "tokio", 1001 | "tokio-tungstenite", 1002 | "tracing", 1003 | "tracing-futures", 1004 | "url", 1005 | "wasm-bindgen", 1006 | "wasm-bindgen-futures", 1007 | "web-sys", 1008 | "ws_stream_wasm", 1009 | ] 1010 | 1011 | [[package]] 1012 | name = "ethers-signers" 1013 | version = "2.0.7" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "02c4b7e15f212fa7cc2e1251868320221d4ff77a3d48068e69f47ce1c491df2d" 1016 | dependencies = [ 1017 | "async-trait", 1018 | "coins-bip32", 1019 | "coins-bip39", 1020 | "elliptic-curve", 1021 | "eth-keystore", 1022 | "ethers-core", 1023 | "hex", 1024 | "rand", 1025 | "sha2 0.10.7", 1026 | "thiserror", 1027 | "tracing", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "ethers-solc" 1032 | version = "2.0.7" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "a81c89f121595cf8959e746045bb8b25a6a38d72588561e1a3b7992fc213f674" 1035 | dependencies = [ 1036 | "cfg-if", 1037 | "dunce", 1038 | "ethers-core", 1039 | "glob", 1040 | "hex", 1041 | "home", 1042 | "md-5", 1043 | "num_cpus", 1044 | "once_cell", 1045 | "path-slash", 1046 | "rayon", 1047 | "regex", 1048 | "semver", 1049 | "serde", 1050 | "serde_json", 1051 | "solang-parser", 1052 | "svm-rs", 1053 | "thiserror", 1054 | "tiny-keccak", 1055 | "tokio", 1056 | "tracing", 1057 | "walkdir", 1058 | "yansi", 1059 | ] 1060 | 1061 | [[package]] 1062 | name = "evm_simulator" 1063 | version = "0.1.0" 1064 | dependencies = [ 1065 | "clap", 1066 | "dotenv", 1067 | "ethers", 1068 | "eyre", 1069 | "serde_json", 1070 | "tokio", 1071 | ] 1072 | 1073 | [[package]] 1074 | name = "eyre" 1075 | version = "0.6.8" 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" 1077 | checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" 1078 | dependencies = [ 1079 | "indenter", 1080 | "once_cell", 1081 | ] 1082 | 1083 | [[package]] 1084 | name = "fastrand" 1085 | version = "1.9.0" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 1088 | dependencies = [ 1089 | "instant", 1090 | ] 1091 | 1092 | [[package]] 1093 | name = "ff" 1094 | version = "0.13.0" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" 1097 | dependencies = [ 1098 | "rand_core", 1099 | "subtle", 1100 | ] 1101 | 1102 | [[package]] 1103 | name = "fixed-hash" 1104 | version = "0.8.0" 1105 | source = "registry+https://github.com/rust-lang/crates.io-index" 1106 | checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" 1107 | dependencies = [ 1108 | "byteorder", 1109 | "rand", 1110 | "rustc-hex", 1111 | "static_assertions", 1112 | ] 1113 | 1114 | [[package]] 1115 | name = "fixedbitset" 1116 | version = "0.4.2" 1117 | source = "registry+https://github.com/rust-lang/crates.io-index" 1118 | checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 1119 | 1120 | [[package]] 1121 | name = "flate2" 1122 | version = "1.0.26" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" 1125 | dependencies = [ 1126 | "crc32fast", 1127 | "miniz_oxide", 1128 | ] 1129 | 1130 | [[package]] 1131 | name = "fnv" 1132 | version = "1.0.7" 1133 | source = "registry+https://github.com/rust-lang/crates.io-index" 1134 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 1135 | 1136 | [[package]] 1137 | name = "form_urlencoded" 1138 | version = "1.2.0" 1139 | source = "registry+https://github.com/rust-lang/crates.io-index" 1140 | checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 1141 | dependencies = [ 1142 | "percent-encoding", 1143 | ] 1144 | 1145 | [[package]] 1146 | name = "fs2" 1147 | version = "0.4.3" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" 1150 | dependencies = [ 1151 | "libc", 1152 | "winapi", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "funty" 1157 | version = "2.0.0" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" 1160 | 1161 | [[package]] 1162 | name = "futures" 1163 | version = "0.3.28" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" 1166 | dependencies = [ 1167 | "futures-channel", 1168 | "futures-core", 1169 | "futures-executor", 1170 | "futures-io", 1171 | "futures-sink", 1172 | "futures-task", 1173 | "futures-util", 1174 | ] 1175 | 1176 | [[package]] 1177 | name = "futures-channel" 1178 | version = "0.3.28" 1179 | source = "registry+https://github.com/rust-lang/crates.io-index" 1180 | checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" 1181 | dependencies = [ 1182 | "futures-core", 1183 | "futures-sink", 1184 | ] 1185 | 1186 | [[package]] 1187 | name = "futures-core" 1188 | version = "0.3.28" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 1191 | 1192 | [[package]] 1193 | name = "futures-executor" 1194 | version = "0.3.28" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" 1197 | dependencies = [ 1198 | "futures-core", 1199 | "futures-task", 1200 | "futures-util", 1201 | ] 1202 | 1203 | [[package]] 1204 | name = "futures-io" 1205 | version = "0.3.28" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" 1208 | 1209 | [[package]] 1210 | name = "futures-locks" 1211 | version = "0.7.1" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" 1214 | dependencies = [ 1215 | "futures-channel", 1216 | "futures-task", 1217 | ] 1218 | 1219 | [[package]] 1220 | name = "futures-macro" 1221 | version = "0.3.28" 1222 | source = "registry+https://github.com/rust-lang/crates.io-index" 1223 | checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" 1224 | dependencies = [ 1225 | "proc-macro2", 1226 | "quote", 1227 | "syn 2.0.23", 1228 | ] 1229 | 1230 | [[package]] 1231 | name = "futures-sink" 1232 | version = "0.3.28" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 1235 | 1236 | [[package]] 1237 | name = "futures-task" 1238 | version = "0.3.28" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 1241 | 1242 | [[package]] 1243 | name = "futures-timer" 1244 | version = "3.0.2" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" 1247 | dependencies = [ 1248 | "gloo-timers", 1249 | "send_wrapper 0.4.0", 1250 | ] 1251 | 1252 | [[package]] 1253 | name = "futures-util" 1254 | version = "0.3.28" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 1257 | dependencies = [ 1258 | "futures-channel", 1259 | "futures-core", 1260 | "futures-io", 1261 | "futures-macro", 1262 | "futures-sink", 1263 | "futures-task", 1264 | "memchr", 1265 | "pin-project-lite", 1266 | "pin-utils", 1267 | "slab", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "fxhash" 1272 | version = "0.2.1" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 1275 | dependencies = [ 1276 | "byteorder", 1277 | ] 1278 | 1279 | [[package]] 1280 | name = "generic-array" 1281 | version = "0.14.7" 1282 | source = "registry+https://github.com/rust-lang/crates.io-index" 1283 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 1284 | dependencies = [ 1285 | "typenum", 1286 | "version_check", 1287 | "zeroize", 1288 | ] 1289 | 1290 | [[package]] 1291 | name = "getrandom" 1292 | version = "0.2.10" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" 1295 | dependencies = [ 1296 | "cfg-if", 1297 | "js-sys", 1298 | "libc", 1299 | "wasi", 1300 | "wasm-bindgen", 1301 | ] 1302 | 1303 | [[package]] 1304 | name = "gimli" 1305 | version = "0.27.3" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" 1308 | 1309 | [[package]] 1310 | name = "glob" 1311 | version = "0.3.1" 1312 | source = "registry+https://github.com/rust-lang/crates.io-index" 1313 | checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" 1314 | 1315 | [[package]] 1316 | name = "gloo-timers" 1317 | version = "0.2.6" 1318 | source = "registry+https://github.com/rust-lang/crates.io-index" 1319 | checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" 1320 | dependencies = [ 1321 | "futures-channel", 1322 | "futures-core", 1323 | "js-sys", 1324 | "wasm-bindgen", 1325 | ] 1326 | 1327 | [[package]] 1328 | name = "group" 1329 | version = "0.13.0" 1330 | source = "registry+https://github.com/rust-lang/crates.io-index" 1331 | checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" 1332 | dependencies = [ 1333 | "ff", 1334 | "rand_core", 1335 | "subtle", 1336 | ] 1337 | 1338 | [[package]] 1339 | name = "h2" 1340 | version = "0.3.20" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" 1343 | dependencies = [ 1344 | "bytes", 1345 | "fnv", 1346 | "futures-core", 1347 | "futures-sink", 1348 | "futures-util", 1349 | "http", 1350 | "indexmap 1.9.3", 1351 | "slab", 1352 | "tokio", 1353 | "tokio-util", 1354 | "tracing", 1355 | ] 1356 | 1357 | [[package]] 1358 | name = "hashbrown" 1359 | version = "0.12.3" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 1362 | 1363 | [[package]] 1364 | name = "hashbrown" 1365 | version = "0.14.0" 1366 | source = "registry+https://github.com/rust-lang/crates.io-index" 1367 | checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" 1368 | 1369 | [[package]] 1370 | name = "hashers" 1371 | version = "1.0.1" 1372 | source = "registry+https://github.com/rust-lang/crates.io-index" 1373 | checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" 1374 | dependencies = [ 1375 | "fxhash", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "heck" 1380 | version = "0.4.1" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 1383 | 1384 | [[package]] 1385 | name = "hermit-abi" 1386 | version = "0.1.19" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 1389 | dependencies = [ 1390 | "libc", 1391 | ] 1392 | 1393 | [[package]] 1394 | name = "hermit-abi" 1395 | version = "0.3.2" 1396 | source = "registry+https://github.com/rust-lang/crates.io-index" 1397 | checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" 1398 | 1399 | [[package]] 1400 | name = "hex" 1401 | version = "0.4.3" 1402 | source = "registry+https://github.com/rust-lang/crates.io-index" 1403 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1404 | 1405 | [[package]] 1406 | name = "hmac" 1407 | version = "0.12.1" 1408 | source = "registry+https://github.com/rust-lang/crates.io-index" 1409 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 1410 | dependencies = [ 1411 | "digest 0.10.7", 1412 | ] 1413 | 1414 | [[package]] 1415 | name = "home" 1416 | version = "0.5.5" 1417 | source = "registry+https://github.com/rust-lang/crates.io-index" 1418 | checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" 1419 | dependencies = [ 1420 | "windows-sys", 1421 | ] 1422 | 1423 | [[package]] 1424 | name = "http" 1425 | version = "0.2.9" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 1428 | dependencies = [ 1429 | "bytes", 1430 | "fnv", 1431 | "itoa", 1432 | ] 1433 | 1434 | [[package]] 1435 | name = "http-body" 1436 | version = "0.4.5" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 1439 | dependencies = [ 1440 | "bytes", 1441 | "http", 1442 | "pin-project-lite", 1443 | ] 1444 | 1445 | [[package]] 1446 | name = "httparse" 1447 | version = "1.8.0" 1448 | source = "registry+https://github.com/rust-lang/crates.io-index" 1449 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 1450 | 1451 | [[package]] 1452 | name = "httpdate" 1453 | version = "1.0.2" 1454 | source = "registry+https://github.com/rust-lang/crates.io-index" 1455 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 1456 | 1457 | [[package]] 1458 | name = "hyper" 1459 | version = "0.14.27" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" 1462 | dependencies = [ 1463 | "bytes", 1464 | "futures-channel", 1465 | "futures-core", 1466 | "futures-util", 1467 | "h2", 1468 | "http", 1469 | "http-body", 1470 | "httparse", 1471 | "httpdate", 1472 | "itoa", 1473 | "pin-project-lite", 1474 | "socket2", 1475 | "tokio", 1476 | "tower-service", 1477 | "tracing", 1478 | "want", 1479 | ] 1480 | 1481 | [[package]] 1482 | name = "hyper-rustls" 1483 | version = "0.24.1" 1484 | source = "registry+https://github.com/rust-lang/crates.io-index" 1485 | checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" 1486 | dependencies = [ 1487 | "futures-util", 1488 | "http", 1489 | "hyper", 1490 | "rustls", 1491 | "tokio", 1492 | "tokio-rustls", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "idna" 1497 | version = "0.4.0" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" 1500 | dependencies = [ 1501 | "unicode-bidi", 1502 | "unicode-normalization", 1503 | ] 1504 | 1505 | [[package]] 1506 | name = "impl-codec" 1507 | version = "0.6.0" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" 1510 | dependencies = [ 1511 | "parity-scale-codec", 1512 | ] 1513 | 1514 | [[package]] 1515 | name = "impl-rlp" 1516 | version = "0.3.0" 1517 | source = "registry+https://github.com/rust-lang/crates.io-index" 1518 | checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" 1519 | dependencies = [ 1520 | "rlp", 1521 | ] 1522 | 1523 | [[package]] 1524 | name = "impl-serde" 1525 | version = "0.4.0" 1526 | source = "registry+https://github.com/rust-lang/crates.io-index" 1527 | checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" 1528 | dependencies = [ 1529 | "serde", 1530 | ] 1531 | 1532 | [[package]] 1533 | name = "impl-trait-for-tuples" 1534 | version = "0.2.2" 1535 | source = "registry+https://github.com/rust-lang/crates.io-index" 1536 | checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" 1537 | dependencies = [ 1538 | "proc-macro2", 1539 | "quote", 1540 | "syn 1.0.109", 1541 | ] 1542 | 1543 | [[package]] 1544 | name = "indenter" 1545 | version = "0.3.3" 1546 | source = "registry+https://github.com/rust-lang/crates.io-index" 1547 | checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" 1548 | 1549 | [[package]] 1550 | name = "indexmap" 1551 | version = "1.9.3" 1552 | source = "registry+https://github.com/rust-lang/crates.io-index" 1553 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 1554 | dependencies = [ 1555 | "autocfg", 1556 | "hashbrown 0.12.3", 1557 | ] 1558 | 1559 | [[package]] 1560 | name = "indexmap" 1561 | version = "2.0.0" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" 1564 | dependencies = [ 1565 | "equivalent", 1566 | "hashbrown 0.14.0", 1567 | ] 1568 | 1569 | [[package]] 1570 | name = "inout" 1571 | version = "0.1.3" 1572 | source = "registry+https://github.com/rust-lang/crates.io-index" 1573 | checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" 1574 | dependencies = [ 1575 | "generic-array", 1576 | ] 1577 | 1578 | [[package]] 1579 | name = "instant" 1580 | version = "0.1.12" 1581 | source = "registry+https://github.com/rust-lang/crates.io-index" 1582 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 1583 | dependencies = [ 1584 | "cfg-if", 1585 | ] 1586 | 1587 | [[package]] 1588 | name = "io-lifetimes" 1589 | version = "1.0.11" 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" 1591 | checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" 1592 | dependencies = [ 1593 | "hermit-abi 0.3.2", 1594 | "libc", 1595 | "windows-sys", 1596 | ] 1597 | 1598 | [[package]] 1599 | name = "ipnet" 1600 | version = "2.8.0" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" 1603 | 1604 | [[package]] 1605 | name = "is-terminal" 1606 | version = "0.4.9" 1607 | source = "registry+https://github.com/rust-lang/crates.io-index" 1608 | checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" 1609 | dependencies = [ 1610 | "hermit-abi 0.3.2", 1611 | "rustix 0.38.3", 1612 | "windows-sys", 1613 | ] 1614 | 1615 | [[package]] 1616 | name = "itertools" 1617 | version = "0.10.5" 1618 | source = "registry+https://github.com/rust-lang/crates.io-index" 1619 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 1620 | dependencies = [ 1621 | "either", 1622 | ] 1623 | 1624 | [[package]] 1625 | name = "itoa" 1626 | version = "1.0.8" 1627 | source = "registry+https://github.com/rust-lang/crates.io-index" 1628 | checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" 1629 | 1630 | [[package]] 1631 | name = "jobserver" 1632 | version = "0.1.26" 1633 | source = "registry+https://github.com/rust-lang/crates.io-index" 1634 | checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" 1635 | dependencies = [ 1636 | "libc", 1637 | ] 1638 | 1639 | [[package]] 1640 | name = "js-sys" 1641 | version = "0.3.64" 1642 | source = "registry+https://github.com/rust-lang/crates.io-index" 1643 | checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" 1644 | dependencies = [ 1645 | "wasm-bindgen", 1646 | ] 1647 | 1648 | [[package]] 1649 | name = "k256" 1650 | version = "0.13.1" 1651 | source = "registry+https://github.com/rust-lang/crates.io-index" 1652 | checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" 1653 | dependencies = [ 1654 | "cfg-if", 1655 | "ecdsa", 1656 | "elliptic-curve", 1657 | "once_cell", 1658 | "sha2 0.10.7", 1659 | "signature", 1660 | ] 1661 | 1662 | [[package]] 1663 | name = "keccak" 1664 | version = "0.1.4" 1665 | source = "registry+https://github.com/rust-lang/crates.io-index" 1666 | checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" 1667 | dependencies = [ 1668 | "cpufeatures", 1669 | ] 1670 | 1671 | [[package]] 1672 | name = "lalrpop" 1673 | version = "0.19.12" 1674 | source = "registry+https://github.com/rust-lang/crates.io-index" 1675 | checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" 1676 | dependencies = [ 1677 | "ascii-canvas", 1678 | "bit-set", 1679 | "diff", 1680 | "ena", 1681 | "is-terminal", 1682 | "itertools", 1683 | "lalrpop-util", 1684 | "petgraph", 1685 | "regex", 1686 | "regex-syntax 0.6.29", 1687 | "string_cache", 1688 | "term", 1689 | "tiny-keccak", 1690 | "unicode-xid", 1691 | ] 1692 | 1693 | [[package]] 1694 | name = "lalrpop-util" 1695 | version = "0.19.12" 1696 | source = "registry+https://github.com/rust-lang/crates.io-index" 1697 | checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" 1698 | 1699 | [[package]] 1700 | name = "lazy_static" 1701 | version = "1.4.0" 1702 | source = "registry+https://github.com/rust-lang/crates.io-index" 1703 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1704 | 1705 | [[package]] 1706 | name = "libc" 1707 | version = "0.2.147" 1708 | source = "registry+https://github.com/rust-lang/crates.io-index" 1709 | checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" 1710 | 1711 | [[package]] 1712 | name = "linux-raw-sys" 1713 | version = "0.3.8" 1714 | source = "registry+https://github.com/rust-lang/crates.io-index" 1715 | checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" 1716 | 1717 | [[package]] 1718 | name = "linux-raw-sys" 1719 | version = "0.4.3" 1720 | source = "registry+https://github.com/rust-lang/crates.io-index" 1721 | checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" 1722 | 1723 | [[package]] 1724 | name = "lock_api" 1725 | version = "0.4.10" 1726 | source = "registry+https://github.com/rust-lang/crates.io-index" 1727 | checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" 1728 | dependencies = [ 1729 | "autocfg", 1730 | "scopeguard", 1731 | ] 1732 | 1733 | [[package]] 1734 | name = "log" 1735 | version = "0.4.19" 1736 | source = "registry+https://github.com/rust-lang/crates.io-index" 1737 | checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" 1738 | 1739 | [[package]] 1740 | name = "md-5" 1741 | version = "0.10.5" 1742 | source = "registry+https://github.com/rust-lang/crates.io-index" 1743 | checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" 1744 | dependencies = [ 1745 | "digest 0.10.7", 1746 | ] 1747 | 1748 | [[package]] 1749 | name = "memchr" 1750 | version = "2.5.0" 1751 | source = "registry+https://github.com/rust-lang/crates.io-index" 1752 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1753 | 1754 | [[package]] 1755 | name = "memoffset" 1756 | version = "0.9.0" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 1759 | dependencies = [ 1760 | "autocfg", 1761 | ] 1762 | 1763 | [[package]] 1764 | name = "mime" 1765 | version = "0.3.17" 1766 | source = "registry+https://github.com/rust-lang/crates.io-index" 1767 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1768 | 1769 | [[package]] 1770 | name = "miniz_oxide" 1771 | version = "0.7.1" 1772 | source = "registry+https://github.com/rust-lang/crates.io-index" 1773 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 1774 | dependencies = [ 1775 | "adler", 1776 | ] 1777 | 1778 | [[package]] 1779 | name = "mio" 1780 | version = "0.8.8" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" 1783 | dependencies = [ 1784 | "libc", 1785 | "wasi", 1786 | "windows-sys", 1787 | ] 1788 | 1789 | [[package]] 1790 | name = "new_debug_unreachable" 1791 | version = "1.0.4" 1792 | source = "registry+https://github.com/rust-lang/crates.io-index" 1793 | checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" 1794 | 1795 | [[package]] 1796 | name = "num-traits" 1797 | version = "0.2.15" 1798 | source = "registry+https://github.com/rust-lang/crates.io-index" 1799 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1800 | dependencies = [ 1801 | "autocfg", 1802 | ] 1803 | 1804 | [[package]] 1805 | name = "num_cpus" 1806 | version = "1.16.0" 1807 | source = "registry+https://github.com/rust-lang/crates.io-index" 1808 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1809 | dependencies = [ 1810 | "hermit-abi 0.3.2", 1811 | "libc", 1812 | ] 1813 | 1814 | [[package]] 1815 | name = "num_enum" 1816 | version = "0.6.1" 1817 | source = "registry+https://github.com/rust-lang/crates.io-index" 1818 | checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" 1819 | dependencies = [ 1820 | "num_enum_derive", 1821 | ] 1822 | 1823 | [[package]] 1824 | name = "num_enum_derive" 1825 | version = "0.6.1" 1826 | source = "registry+https://github.com/rust-lang/crates.io-index" 1827 | checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" 1828 | dependencies = [ 1829 | "proc-macro-crate", 1830 | "proc-macro2", 1831 | "quote", 1832 | "syn 2.0.23", 1833 | ] 1834 | 1835 | [[package]] 1836 | name = "object" 1837 | version = "0.31.1" 1838 | source = "registry+https://github.com/rust-lang/crates.io-index" 1839 | checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" 1840 | dependencies = [ 1841 | "memchr", 1842 | ] 1843 | 1844 | [[package]] 1845 | name = "once_cell" 1846 | version = "1.18.0" 1847 | source = "registry+https://github.com/rust-lang/crates.io-index" 1848 | checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 1849 | 1850 | [[package]] 1851 | name = "opaque-debug" 1852 | version = "0.3.0" 1853 | source = "registry+https://github.com/rust-lang/crates.io-index" 1854 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 1855 | 1856 | [[package]] 1857 | name = "open-fastrlp" 1858 | version = "0.1.4" 1859 | source = "registry+https://github.com/rust-lang/crates.io-index" 1860 | checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" 1861 | dependencies = [ 1862 | "arrayvec", 1863 | "auto_impl", 1864 | "bytes", 1865 | "ethereum-types", 1866 | "open-fastrlp-derive", 1867 | ] 1868 | 1869 | [[package]] 1870 | name = "open-fastrlp-derive" 1871 | version = "0.1.1" 1872 | source = "registry+https://github.com/rust-lang/crates.io-index" 1873 | checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" 1874 | dependencies = [ 1875 | "bytes", 1876 | "proc-macro2", 1877 | "quote", 1878 | "syn 1.0.109", 1879 | ] 1880 | 1881 | [[package]] 1882 | name = "parity-scale-codec" 1883 | version = "3.6.3" 1884 | source = "registry+https://github.com/rust-lang/crates.io-index" 1885 | checksum = "756d439303e94fae44f288ba881ad29670c65b0c4b0e05674ca81061bb65f2c5" 1886 | dependencies = [ 1887 | "arrayvec", 1888 | "bitvec 1.0.1", 1889 | "byte-slice-cast", 1890 | "impl-trait-for-tuples", 1891 | "parity-scale-codec-derive", 1892 | "serde", 1893 | ] 1894 | 1895 | [[package]] 1896 | name = "parity-scale-codec-derive" 1897 | version = "3.6.3" 1898 | source = "registry+https://github.com/rust-lang/crates.io-index" 1899 | checksum = "9d884d78fcf214d70b1e239fcd1c6e5e95aa3be1881918da2e488cc946c7a476" 1900 | dependencies = [ 1901 | "proc-macro-crate", 1902 | "proc-macro2", 1903 | "quote", 1904 | "syn 1.0.109", 1905 | ] 1906 | 1907 | [[package]] 1908 | name = "parking_lot" 1909 | version = "0.12.1" 1910 | source = "registry+https://github.com/rust-lang/crates.io-index" 1911 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1912 | dependencies = [ 1913 | "lock_api", 1914 | "parking_lot_core", 1915 | ] 1916 | 1917 | [[package]] 1918 | name = "parking_lot_core" 1919 | version = "0.9.8" 1920 | source = "registry+https://github.com/rust-lang/crates.io-index" 1921 | checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" 1922 | dependencies = [ 1923 | "cfg-if", 1924 | "libc", 1925 | "redox_syscall 0.3.5", 1926 | "smallvec", 1927 | "windows-targets", 1928 | ] 1929 | 1930 | [[package]] 1931 | name = "password-hash" 1932 | version = "0.4.2" 1933 | source = "registry+https://github.com/rust-lang/crates.io-index" 1934 | checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" 1935 | dependencies = [ 1936 | "base64ct", 1937 | "rand_core", 1938 | "subtle", 1939 | ] 1940 | 1941 | [[package]] 1942 | name = "path-slash" 1943 | version = "0.2.1" 1944 | source = "registry+https://github.com/rust-lang/crates.io-index" 1945 | checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" 1946 | 1947 | [[package]] 1948 | name = "pbkdf2" 1949 | version = "0.11.0" 1950 | source = "registry+https://github.com/rust-lang/crates.io-index" 1951 | checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" 1952 | dependencies = [ 1953 | "digest 0.10.7", 1954 | "hmac", 1955 | "password-hash", 1956 | "sha2 0.10.7", 1957 | ] 1958 | 1959 | [[package]] 1960 | name = "pbkdf2" 1961 | version = "0.12.1" 1962 | source = "registry+https://github.com/rust-lang/crates.io-index" 1963 | checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" 1964 | dependencies = [ 1965 | "digest 0.10.7", 1966 | "hmac", 1967 | ] 1968 | 1969 | [[package]] 1970 | name = "percent-encoding" 1971 | version = "2.3.0" 1972 | source = "registry+https://github.com/rust-lang/crates.io-index" 1973 | checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 1974 | 1975 | [[package]] 1976 | name = "petgraph" 1977 | version = "0.6.3" 1978 | source = "registry+https://github.com/rust-lang/crates.io-index" 1979 | checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" 1980 | dependencies = [ 1981 | "fixedbitset", 1982 | "indexmap 1.9.3", 1983 | ] 1984 | 1985 | [[package]] 1986 | name = "pharos" 1987 | version = "0.5.3" 1988 | source = "registry+https://github.com/rust-lang/crates.io-index" 1989 | checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" 1990 | dependencies = [ 1991 | "futures", 1992 | "rustc_version", 1993 | ] 1994 | 1995 | [[package]] 1996 | name = "phf" 1997 | version = "0.11.2" 1998 | source = "registry+https://github.com/rust-lang/crates.io-index" 1999 | checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" 2000 | dependencies = [ 2001 | "phf_macros", 2002 | "phf_shared 0.11.2", 2003 | ] 2004 | 2005 | [[package]] 2006 | name = "phf_generator" 2007 | version = "0.11.2" 2008 | source = "registry+https://github.com/rust-lang/crates.io-index" 2009 | checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" 2010 | dependencies = [ 2011 | "phf_shared 0.11.2", 2012 | "rand", 2013 | ] 2014 | 2015 | [[package]] 2016 | name = "phf_macros" 2017 | version = "0.11.2" 2018 | source = "registry+https://github.com/rust-lang/crates.io-index" 2019 | checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" 2020 | dependencies = [ 2021 | "phf_generator", 2022 | "phf_shared 0.11.2", 2023 | "proc-macro2", 2024 | "quote", 2025 | "syn 2.0.23", 2026 | ] 2027 | 2028 | [[package]] 2029 | name = "phf_shared" 2030 | version = "0.10.0" 2031 | source = "registry+https://github.com/rust-lang/crates.io-index" 2032 | checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" 2033 | dependencies = [ 2034 | "siphasher", 2035 | ] 2036 | 2037 | [[package]] 2038 | name = "phf_shared" 2039 | version = "0.11.2" 2040 | source = "registry+https://github.com/rust-lang/crates.io-index" 2041 | checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" 2042 | dependencies = [ 2043 | "siphasher", 2044 | ] 2045 | 2046 | [[package]] 2047 | name = "pin-project" 2048 | version = "1.1.2" 2049 | source = "registry+https://github.com/rust-lang/crates.io-index" 2050 | checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" 2051 | dependencies = [ 2052 | "pin-project-internal", 2053 | ] 2054 | 2055 | [[package]] 2056 | name = "pin-project-internal" 2057 | version = "1.1.2" 2058 | source = "registry+https://github.com/rust-lang/crates.io-index" 2059 | checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" 2060 | dependencies = [ 2061 | "proc-macro2", 2062 | "quote", 2063 | "syn 2.0.23", 2064 | ] 2065 | 2066 | [[package]] 2067 | name = "pin-project-lite" 2068 | version = "0.2.10" 2069 | source = "registry+https://github.com/rust-lang/crates.io-index" 2070 | checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" 2071 | 2072 | [[package]] 2073 | name = "pin-utils" 2074 | version = "0.1.0" 2075 | source = "registry+https://github.com/rust-lang/crates.io-index" 2076 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 2077 | 2078 | [[package]] 2079 | name = "pkcs8" 2080 | version = "0.10.2" 2081 | source = "registry+https://github.com/rust-lang/crates.io-index" 2082 | checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 2083 | dependencies = [ 2084 | "der", 2085 | "spki", 2086 | ] 2087 | 2088 | [[package]] 2089 | name = "pkg-config" 2090 | version = "0.3.27" 2091 | source = "registry+https://github.com/rust-lang/crates.io-index" 2092 | checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 2093 | 2094 | [[package]] 2095 | name = "ppv-lite86" 2096 | version = "0.2.17" 2097 | source = "registry+https://github.com/rust-lang/crates.io-index" 2098 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 2099 | 2100 | [[package]] 2101 | name = "precomputed-hash" 2102 | version = "0.1.1" 2103 | source = "registry+https://github.com/rust-lang/crates.io-index" 2104 | checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" 2105 | 2106 | [[package]] 2107 | name = "prettyplease" 2108 | version = "0.2.10" 2109 | source = "registry+https://github.com/rust-lang/crates.io-index" 2110 | checksum = "92139198957b410250d43fad93e630d956499a625c527eda65175c8680f83387" 2111 | dependencies = [ 2112 | "proc-macro2", 2113 | "syn 2.0.23", 2114 | ] 2115 | 2116 | [[package]] 2117 | name = "primitive-types" 2118 | version = "0.12.1" 2119 | source = "registry+https://github.com/rust-lang/crates.io-index" 2120 | checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" 2121 | dependencies = [ 2122 | "fixed-hash", 2123 | "impl-codec", 2124 | "impl-rlp", 2125 | "impl-serde", 2126 | "scale-info", 2127 | "uint", 2128 | ] 2129 | 2130 | [[package]] 2131 | name = "proc-macro-crate" 2132 | version = "1.3.1" 2133 | source = "registry+https://github.com/rust-lang/crates.io-index" 2134 | checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" 2135 | dependencies = [ 2136 | "once_cell", 2137 | "toml_edit", 2138 | ] 2139 | 2140 | [[package]] 2141 | name = "proc-macro-error" 2142 | version = "1.0.4" 2143 | source = "registry+https://github.com/rust-lang/crates.io-index" 2144 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 2145 | dependencies = [ 2146 | "proc-macro-error-attr", 2147 | "proc-macro2", 2148 | "quote", 2149 | "syn 1.0.109", 2150 | "version_check", 2151 | ] 2152 | 2153 | [[package]] 2154 | name = "proc-macro-error-attr" 2155 | version = "1.0.4" 2156 | source = "registry+https://github.com/rust-lang/crates.io-index" 2157 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 2158 | dependencies = [ 2159 | "proc-macro2", 2160 | "quote", 2161 | "version_check", 2162 | ] 2163 | 2164 | [[package]] 2165 | name = "proc-macro2" 2166 | version = "1.0.63" 2167 | source = "registry+https://github.com/rust-lang/crates.io-index" 2168 | checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" 2169 | dependencies = [ 2170 | "unicode-ident", 2171 | ] 2172 | 2173 | [[package]] 2174 | name = "quote" 2175 | version = "1.0.29" 2176 | source = "registry+https://github.com/rust-lang/crates.io-index" 2177 | checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" 2178 | dependencies = [ 2179 | "proc-macro2", 2180 | ] 2181 | 2182 | [[package]] 2183 | name = "radium" 2184 | version = "0.3.0" 2185 | source = "registry+https://github.com/rust-lang/crates.io-index" 2186 | checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" 2187 | 2188 | [[package]] 2189 | name = "radium" 2190 | version = "0.7.0" 2191 | source = "registry+https://github.com/rust-lang/crates.io-index" 2192 | checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" 2193 | 2194 | [[package]] 2195 | name = "rand" 2196 | version = "0.8.5" 2197 | source = "registry+https://github.com/rust-lang/crates.io-index" 2198 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 2199 | dependencies = [ 2200 | "libc", 2201 | "rand_chacha", 2202 | "rand_core", 2203 | ] 2204 | 2205 | [[package]] 2206 | name = "rand_chacha" 2207 | version = "0.3.1" 2208 | source = "registry+https://github.com/rust-lang/crates.io-index" 2209 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 2210 | dependencies = [ 2211 | "ppv-lite86", 2212 | "rand_core", 2213 | ] 2214 | 2215 | [[package]] 2216 | name = "rand_core" 2217 | version = "0.6.4" 2218 | source = "registry+https://github.com/rust-lang/crates.io-index" 2219 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 2220 | dependencies = [ 2221 | "getrandom", 2222 | ] 2223 | 2224 | [[package]] 2225 | name = "rayon" 2226 | version = "1.7.0" 2227 | source = "registry+https://github.com/rust-lang/crates.io-index" 2228 | checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" 2229 | dependencies = [ 2230 | "either", 2231 | "rayon-core", 2232 | ] 2233 | 2234 | [[package]] 2235 | name = "rayon-core" 2236 | version = "1.11.0" 2237 | source = "registry+https://github.com/rust-lang/crates.io-index" 2238 | checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" 2239 | dependencies = [ 2240 | "crossbeam-channel", 2241 | "crossbeam-deque", 2242 | "crossbeam-utils", 2243 | "num_cpus", 2244 | ] 2245 | 2246 | [[package]] 2247 | name = "redox_syscall" 2248 | version = "0.2.16" 2249 | source = "registry+https://github.com/rust-lang/crates.io-index" 2250 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 2251 | dependencies = [ 2252 | "bitflags 1.3.2", 2253 | ] 2254 | 2255 | [[package]] 2256 | name = "redox_syscall" 2257 | version = "0.3.5" 2258 | source = "registry+https://github.com/rust-lang/crates.io-index" 2259 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 2260 | dependencies = [ 2261 | "bitflags 1.3.2", 2262 | ] 2263 | 2264 | [[package]] 2265 | name = "redox_users" 2266 | version = "0.4.3" 2267 | source = "registry+https://github.com/rust-lang/crates.io-index" 2268 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 2269 | dependencies = [ 2270 | "getrandom", 2271 | "redox_syscall 0.2.16", 2272 | "thiserror", 2273 | ] 2274 | 2275 | [[package]] 2276 | name = "regex" 2277 | version = "1.9.1" 2278 | source = "registry+https://github.com/rust-lang/crates.io-index" 2279 | checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" 2280 | dependencies = [ 2281 | "aho-corasick", 2282 | "memchr", 2283 | "regex-automata", 2284 | "regex-syntax 0.7.3", 2285 | ] 2286 | 2287 | [[package]] 2288 | name = "regex-automata" 2289 | version = "0.3.1" 2290 | source = "registry+https://github.com/rust-lang/crates.io-index" 2291 | checksum = "e9aaecc05d5c4b5f7da074b9a0d1a0867e71fd36e7fc0482d8bcfe8e8fc56290" 2292 | dependencies = [ 2293 | "aho-corasick", 2294 | "memchr", 2295 | "regex-syntax 0.7.3", 2296 | ] 2297 | 2298 | [[package]] 2299 | name = "regex-syntax" 2300 | version = "0.6.29" 2301 | source = "registry+https://github.com/rust-lang/crates.io-index" 2302 | checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 2303 | 2304 | [[package]] 2305 | name = "regex-syntax" 2306 | version = "0.7.3" 2307 | source = "registry+https://github.com/rust-lang/crates.io-index" 2308 | checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846" 2309 | 2310 | [[package]] 2311 | name = "reqwest" 2312 | version = "0.11.18" 2313 | source = "registry+https://github.com/rust-lang/crates.io-index" 2314 | checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" 2315 | dependencies = [ 2316 | "base64 0.21.2", 2317 | "bytes", 2318 | "encoding_rs", 2319 | "futures-core", 2320 | "futures-util", 2321 | "h2", 2322 | "http", 2323 | "http-body", 2324 | "hyper", 2325 | "hyper-rustls", 2326 | "ipnet", 2327 | "js-sys", 2328 | "log", 2329 | "mime", 2330 | "once_cell", 2331 | "percent-encoding", 2332 | "pin-project-lite", 2333 | "rustls", 2334 | "rustls-pemfile", 2335 | "serde", 2336 | "serde_json", 2337 | "serde_urlencoded", 2338 | "tokio", 2339 | "tokio-rustls", 2340 | "tower-service", 2341 | "url", 2342 | "wasm-bindgen", 2343 | "wasm-bindgen-futures", 2344 | "web-sys", 2345 | "webpki-roots 0.22.6", 2346 | "winreg", 2347 | ] 2348 | 2349 | [[package]] 2350 | name = "rfc6979" 2351 | version = "0.4.0" 2352 | source = "registry+https://github.com/rust-lang/crates.io-index" 2353 | checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" 2354 | dependencies = [ 2355 | "hmac", 2356 | "subtle", 2357 | ] 2358 | 2359 | [[package]] 2360 | name = "ring" 2361 | version = "0.16.20" 2362 | source = "registry+https://github.com/rust-lang/crates.io-index" 2363 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 2364 | dependencies = [ 2365 | "cc", 2366 | "libc", 2367 | "once_cell", 2368 | "spin", 2369 | "untrusted", 2370 | "web-sys", 2371 | "winapi", 2372 | ] 2373 | 2374 | [[package]] 2375 | name = "ripemd" 2376 | version = "0.1.3" 2377 | source = "registry+https://github.com/rust-lang/crates.io-index" 2378 | checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" 2379 | dependencies = [ 2380 | "digest 0.10.7", 2381 | ] 2382 | 2383 | [[package]] 2384 | name = "rlp" 2385 | version = "0.5.2" 2386 | source = "registry+https://github.com/rust-lang/crates.io-index" 2387 | checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" 2388 | dependencies = [ 2389 | "bytes", 2390 | "rlp-derive", 2391 | "rustc-hex", 2392 | ] 2393 | 2394 | [[package]] 2395 | name = "rlp-derive" 2396 | version = "0.1.0" 2397 | source = "registry+https://github.com/rust-lang/crates.io-index" 2398 | checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" 2399 | dependencies = [ 2400 | "proc-macro2", 2401 | "quote", 2402 | "syn 1.0.109", 2403 | ] 2404 | 2405 | [[package]] 2406 | name = "rustc-demangle" 2407 | version = "0.1.23" 2408 | source = "registry+https://github.com/rust-lang/crates.io-index" 2409 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 2410 | 2411 | [[package]] 2412 | name = "rustc-hex" 2413 | version = "2.1.0" 2414 | source = "registry+https://github.com/rust-lang/crates.io-index" 2415 | checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" 2416 | 2417 | [[package]] 2418 | name = "rustc_version" 2419 | version = "0.4.0" 2420 | source = "registry+https://github.com/rust-lang/crates.io-index" 2421 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 2422 | dependencies = [ 2423 | "semver", 2424 | ] 2425 | 2426 | [[package]] 2427 | name = "rustix" 2428 | version = "0.37.23" 2429 | source = "registry+https://github.com/rust-lang/crates.io-index" 2430 | checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" 2431 | dependencies = [ 2432 | "bitflags 1.3.2", 2433 | "errno", 2434 | "io-lifetimes", 2435 | "libc", 2436 | "linux-raw-sys 0.3.8", 2437 | "windows-sys", 2438 | ] 2439 | 2440 | [[package]] 2441 | name = "rustix" 2442 | version = "0.38.3" 2443 | source = "registry+https://github.com/rust-lang/crates.io-index" 2444 | checksum = "ac5ffa1efe7548069688cd7028f32591853cd7b5b756d41bcffd2353e4fc75b4" 2445 | dependencies = [ 2446 | "bitflags 2.3.3", 2447 | "errno", 2448 | "libc", 2449 | "linux-raw-sys 0.4.3", 2450 | "windows-sys", 2451 | ] 2452 | 2453 | [[package]] 2454 | name = "rustls" 2455 | version = "0.21.3" 2456 | source = "registry+https://github.com/rust-lang/crates.io-index" 2457 | checksum = "b19faa85ecb5197342b54f987b142fb3e30d0c90da40f80ef4fa9a726e6676ed" 2458 | dependencies = [ 2459 | "log", 2460 | "ring", 2461 | "rustls-webpki 0.101.1", 2462 | "sct", 2463 | ] 2464 | 2465 | [[package]] 2466 | name = "rustls-pemfile" 2467 | version = "1.0.3" 2468 | source = "registry+https://github.com/rust-lang/crates.io-index" 2469 | checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" 2470 | dependencies = [ 2471 | "base64 0.21.2", 2472 | ] 2473 | 2474 | [[package]] 2475 | name = "rustls-webpki" 2476 | version = "0.100.1" 2477 | source = "registry+https://github.com/rust-lang/crates.io-index" 2478 | checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" 2479 | dependencies = [ 2480 | "ring", 2481 | "untrusted", 2482 | ] 2483 | 2484 | [[package]] 2485 | name = "rustls-webpki" 2486 | version = "0.101.1" 2487 | source = "registry+https://github.com/rust-lang/crates.io-index" 2488 | checksum = "15f36a6828982f422756984e47912a7a51dcbc2a197aa791158f8ca61cd8204e" 2489 | dependencies = [ 2490 | "ring", 2491 | "untrusted", 2492 | ] 2493 | 2494 | [[package]] 2495 | name = "rustversion" 2496 | version = "1.0.13" 2497 | source = "registry+https://github.com/rust-lang/crates.io-index" 2498 | checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" 2499 | 2500 | [[package]] 2501 | name = "ryu" 2502 | version = "1.0.14" 2503 | source = "registry+https://github.com/rust-lang/crates.io-index" 2504 | checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" 2505 | 2506 | [[package]] 2507 | name = "salsa20" 2508 | version = "0.10.2" 2509 | source = "registry+https://github.com/rust-lang/crates.io-index" 2510 | checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" 2511 | dependencies = [ 2512 | "cipher", 2513 | ] 2514 | 2515 | [[package]] 2516 | name = "same-file" 2517 | version = "1.0.6" 2518 | source = "registry+https://github.com/rust-lang/crates.io-index" 2519 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 2520 | dependencies = [ 2521 | "winapi-util", 2522 | ] 2523 | 2524 | [[package]] 2525 | name = "scale-info" 2526 | version = "2.9.0" 2527 | source = "registry+https://github.com/rust-lang/crates.io-index" 2528 | checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" 2529 | dependencies = [ 2530 | "cfg-if", 2531 | "derive_more", 2532 | "parity-scale-codec", 2533 | "scale-info-derive", 2534 | ] 2535 | 2536 | [[package]] 2537 | name = "scale-info-derive" 2538 | version = "2.9.0" 2539 | source = "registry+https://github.com/rust-lang/crates.io-index" 2540 | checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" 2541 | dependencies = [ 2542 | "proc-macro-crate", 2543 | "proc-macro2", 2544 | "quote", 2545 | "syn 1.0.109", 2546 | ] 2547 | 2548 | [[package]] 2549 | name = "scopeguard" 2550 | version = "1.1.0" 2551 | source = "registry+https://github.com/rust-lang/crates.io-index" 2552 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 2553 | 2554 | [[package]] 2555 | name = "scrypt" 2556 | version = "0.10.0" 2557 | source = "registry+https://github.com/rust-lang/crates.io-index" 2558 | checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" 2559 | dependencies = [ 2560 | "hmac", 2561 | "pbkdf2 0.11.0", 2562 | "salsa20", 2563 | "sha2 0.10.7", 2564 | ] 2565 | 2566 | [[package]] 2567 | name = "sct" 2568 | version = "0.7.0" 2569 | source = "registry+https://github.com/rust-lang/crates.io-index" 2570 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 2571 | dependencies = [ 2572 | "ring", 2573 | "untrusted", 2574 | ] 2575 | 2576 | [[package]] 2577 | name = "sec1" 2578 | version = "0.7.2" 2579 | source = "registry+https://github.com/rust-lang/crates.io-index" 2580 | checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" 2581 | dependencies = [ 2582 | "base16ct", 2583 | "der", 2584 | "generic-array", 2585 | "pkcs8", 2586 | "subtle", 2587 | "zeroize", 2588 | ] 2589 | 2590 | [[package]] 2591 | name = "semver" 2592 | version = "1.0.17" 2593 | source = "registry+https://github.com/rust-lang/crates.io-index" 2594 | checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" 2595 | dependencies = [ 2596 | "serde", 2597 | ] 2598 | 2599 | [[package]] 2600 | name = "send_wrapper" 2601 | version = "0.4.0" 2602 | source = "registry+https://github.com/rust-lang/crates.io-index" 2603 | checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" 2604 | 2605 | [[package]] 2606 | name = "send_wrapper" 2607 | version = "0.6.0" 2608 | source = "registry+https://github.com/rust-lang/crates.io-index" 2609 | checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" 2610 | 2611 | [[package]] 2612 | name = "serde" 2613 | version = "1.0.167" 2614 | source = "registry+https://github.com/rust-lang/crates.io-index" 2615 | checksum = "7daf513456463b42aa1d94cff7e0c24d682b429f020b9afa4f5ba5c40a22b237" 2616 | dependencies = [ 2617 | "serde_derive", 2618 | ] 2619 | 2620 | [[package]] 2621 | name = "serde_derive" 2622 | version = "1.0.167" 2623 | source = "registry+https://github.com/rust-lang/crates.io-index" 2624 | checksum = "b69b106b68bc8054f0e974e70d19984040f8a5cf9215ca82626ea4853f82c4b9" 2625 | dependencies = [ 2626 | "proc-macro2", 2627 | "quote", 2628 | "syn 2.0.23", 2629 | ] 2630 | 2631 | [[package]] 2632 | name = "serde_json" 2633 | version = "1.0.100" 2634 | source = "registry+https://github.com/rust-lang/crates.io-index" 2635 | checksum = "0f1e14e89be7aa4c4b78bdbdc9eb5bf8517829a600ae8eaa39a6e1d960b5185c" 2636 | dependencies = [ 2637 | "itoa", 2638 | "ryu", 2639 | "serde", 2640 | ] 2641 | 2642 | [[package]] 2643 | name = "serde_spanned" 2644 | version = "0.6.3" 2645 | source = "registry+https://github.com/rust-lang/crates.io-index" 2646 | checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" 2647 | dependencies = [ 2648 | "serde", 2649 | ] 2650 | 2651 | [[package]] 2652 | name = "serde_urlencoded" 2653 | version = "0.7.1" 2654 | source = "registry+https://github.com/rust-lang/crates.io-index" 2655 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 2656 | dependencies = [ 2657 | "form_urlencoded", 2658 | "itoa", 2659 | "ryu", 2660 | "serde", 2661 | ] 2662 | 2663 | [[package]] 2664 | name = "sha1" 2665 | version = "0.10.5" 2666 | source = "registry+https://github.com/rust-lang/crates.io-index" 2667 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 2668 | dependencies = [ 2669 | "cfg-if", 2670 | "cpufeatures", 2671 | "digest 0.10.7", 2672 | ] 2673 | 2674 | [[package]] 2675 | name = "sha2" 2676 | version = "0.9.9" 2677 | source = "registry+https://github.com/rust-lang/crates.io-index" 2678 | checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" 2679 | dependencies = [ 2680 | "block-buffer 0.9.0", 2681 | "cfg-if", 2682 | "cpufeatures", 2683 | "digest 0.9.0", 2684 | "opaque-debug", 2685 | ] 2686 | 2687 | [[package]] 2688 | name = "sha2" 2689 | version = "0.10.7" 2690 | source = "registry+https://github.com/rust-lang/crates.io-index" 2691 | checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" 2692 | dependencies = [ 2693 | "cfg-if", 2694 | "cpufeatures", 2695 | "digest 0.10.7", 2696 | ] 2697 | 2698 | [[package]] 2699 | name = "sha3" 2700 | version = "0.10.8" 2701 | source = "registry+https://github.com/rust-lang/crates.io-index" 2702 | checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" 2703 | dependencies = [ 2704 | "digest 0.10.7", 2705 | "keccak", 2706 | ] 2707 | 2708 | [[package]] 2709 | name = "signal-hook-registry" 2710 | version = "1.4.1" 2711 | source = "registry+https://github.com/rust-lang/crates.io-index" 2712 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 2713 | dependencies = [ 2714 | "libc", 2715 | ] 2716 | 2717 | [[package]] 2718 | name = "signature" 2719 | version = "2.1.0" 2720 | source = "registry+https://github.com/rust-lang/crates.io-index" 2721 | checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" 2722 | dependencies = [ 2723 | "digest 0.10.7", 2724 | "rand_core", 2725 | ] 2726 | 2727 | [[package]] 2728 | name = "siphasher" 2729 | version = "0.3.10" 2730 | source = "registry+https://github.com/rust-lang/crates.io-index" 2731 | checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" 2732 | 2733 | [[package]] 2734 | name = "slab" 2735 | version = "0.4.8" 2736 | source = "registry+https://github.com/rust-lang/crates.io-index" 2737 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 2738 | dependencies = [ 2739 | "autocfg", 2740 | ] 2741 | 2742 | [[package]] 2743 | name = "smallvec" 2744 | version = "1.11.0" 2745 | source = "registry+https://github.com/rust-lang/crates.io-index" 2746 | checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" 2747 | 2748 | [[package]] 2749 | name = "socket2" 2750 | version = "0.4.9" 2751 | source = "registry+https://github.com/rust-lang/crates.io-index" 2752 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 2753 | dependencies = [ 2754 | "libc", 2755 | "winapi", 2756 | ] 2757 | 2758 | [[package]] 2759 | name = "solang-parser" 2760 | version = "0.3.0" 2761 | source = "registry+https://github.com/rust-lang/crates.io-index" 2762 | checksum = "4a94494913728908efa7a25a2dd2e4f037e714897985c24273c40596638ed909" 2763 | dependencies = [ 2764 | "itertools", 2765 | "lalrpop", 2766 | "lalrpop-util", 2767 | "phf", 2768 | "thiserror", 2769 | "unicode-xid", 2770 | ] 2771 | 2772 | [[package]] 2773 | name = "spin" 2774 | version = "0.5.2" 2775 | source = "registry+https://github.com/rust-lang/crates.io-index" 2776 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 2777 | 2778 | [[package]] 2779 | name = "spki" 2780 | version = "0.7.2" 2781 | source = "registry+https://github.com/rust-lang/crates.io-index" 2782 | checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" 2783 | dependencies = [ 2784 | "base64ct", 2785 | "der", 2786 | ] 2787 | 2788 | [[package]] 2789 | name = "static_assertions" 2790 | version = "1.1.0" 2791 | source = "registry+https://github.com/rust-lang/crates.io-index" 2792 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2793 | 2794 | [[package]] 2795 | name = "string_cache" 2796 | version = "0.8.7" 2797 | source = "registry+https://github.com/rust-lang/crates.io-index" 2798 | checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" 2799 | dependencies = [ 2800 | "new_debug_unreachable", 2801 | "once_cell", 2802 | "parking_lot", 2803 | "phf_shared 0.10.0", 2804 | "precomputed-hash", 2805 | ] 2806 | 2807 | [[package]] 2808 | name = "strsim" 2809 | version = "0.8.0" 2810 | source = "registry+https://github.com/rust-lang/crates.io-index" 2811 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 2812 | 2813 | [[package]] 2814 | name = "strum" 2815 | version = "0.24.1" 2816 | source = "registry+https://github.com/rust-lang/crates.io-index" 2817 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 2818 | dependencies = [ 2819 | "strum_macros", 2820 | ] 2821 | 2822 | [[package]] 2823 | name = "strum_macros" 2824 | version = "0.24.3" 2825 | source = "registry+https://github.com/rust-lang/crates.io-index" 2826 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 2827 | dependencies = [ 2828 | "heck", 2829 | "proc-macro2", 2830 | "quote", 2831 | "rustversion", 2832 | "syn 1.0.109", 2833 | ] 2834 | 2835 | [[package]] 2836 | name = "subtle" 2837 | version = "2.5.0" 2838 | source = "registry+https://github.com/rust-lang/crates.io-index" 2839 | checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 2840 | 2841 | [[package]] 2842 | name = "svm-rs" 2843 | version = "0.2.23" 2844 | source = "registry+https://github.com/rust-lang/crates.io-index" 2845 | checksum = "3a04fc4f5cd35c700153b233f5575ccb3237e0f941fa5049d9e98254d10bf2fe" 2846 | dependencies = [ 2847 | "fs2", 2848 | "hex", 2849 | "home", 2850 | "once_cell", 2851 | "reqwest", 2852 | "semver", 2853 | "serde", 2854 | "serde_json", 2855 | "sha2 0.10.7", 2856 | "thiserror", 2857 | "url", 2858 | "zip", 2859 | ] 2860 | 2861 | [[package]] 2862 | name = "syn" 2863 | version = "1.0.109" 2864 | source = "registry+https://github.com/rust-lang/crates.io-index" 2865 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2866 | dependencies = [ 2867 | "proc-macro2", 2868 | "quote", 2869 | "unicode-ident", 2870 | ] 2871 | 2872 | [[package]] 2873 | name = "syn" 2874 | version = "2.0.23" 2875 | source = "registry+https://github.com/rust-lang/crates.io-index" 2876 | checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" 2877 | dependencies = [ 2878 | "proc-macro2", 2879 | "quote", 2880 | "unicode-ident", 2881 | ] 2882 | 2883 | [[package]] 2884 | name = "tap" 2885 | version = "1.0.1" 2886 | source = "registry+https://github.com/rust-lang/crates.io-index" 2887 | checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" 2888 | 2889 | [[package]] 2890 | name = "tempfile" 2891 | version = "3.6.0" 2892 | source = "registry+https://github.com/rust-lang/crates.io-index" 2893 | checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" 2894 | dependencies = [ 2895 | "autocfg", 2896 | "cfg-if", 2897 | "fastrand", 2898 | "redox_syscall 0.3.5", 2899 | "rustix 0.37.23", 2900 | "windows-sys", 2901 | ] 2902 | 2903 | [[package]] 2904 | name = "term" 2905 | version = "0.7.0" 2906 | source = "registry+https://github.com/rust-lang/crates.io-index" 2907 | checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" 2908 | dependencies = [ 2909 | "dirs-next", 2910 | "rustversion", 2911 | "winapi", 2912 | ] 2913 | 2914 | [[package]] 2915 | name = "textwrap" 2916 | version = "0.11.0" 2917 | source = "registry+https://github.com/rust-lang/crates.io-index" 2918 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 2919 | dependencies = [ 2920 | "unicode-width", 2921 | ] 2922 | 2923 | [[package]] 2924 | name = "thiserror" 2925 | version = "1.0.43" 2926 | source = "registry+https://github.com/rust-lang/crates.io-index" 2927 | checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" 2928 | dependencies = [ 2929 | "thiserror-impl", 2930 | ] 2931 | 2932 | [[package]] 2933 | name = "thiserror-impl" 2934 | version = "1.0.43" 2935 | source = "registry+https://github.com/rust-lang/crates.io-index" 2936 | checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" 2937 | dependencies = [ 2938 | "proc-macro2", 2939 | "quote", 2940 | "syn 2.0.23", 2941 | ] 2942 | 2943 | [[package]] 2944 | name = "time" 2945 | version = "0.3.22" 2946 | source = "registry+https://github.com/rust-lang/crates.io-index" 2947 | checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" 2948 | dependencies = [ 2949 | "serde", 2950 | "time-core", 2951 | ] 2952 | 2953 | [[package]] 2954 | name = "time-core" 2955 | version = "0.1.1" 2956 | source = "registry+https://github.com/rust-lang/crates.io-index" 2957 | checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" 2958 | 2959 | [[package]] 2960 | name = "tiny-keccak" 2961 | version = "2.0.2" 2962 | source = "registry+https://github.com/rust-lang/crates.io-index" 2963 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 2964 | dependencies = [ 2965 | "crunchy", 2966 | ] 2967 | 2968 | [[package]] 2969 | name = "tinyvec" 2970 | version = "1.6.0" 2971 | source = "registry+https://github.com/rust-lang/crates.io-index" 2972 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2973 | dependencies = [ 2974 | "tinyvec_macros", 2975 | ] 2976 | 2977 | [[package]] 2978 | name = "tinyvec_macros" 2979 | version = "0.1.1" 2980 | source = "registry+https://github.com/rust-lang/crates.io-index" 2981 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2982 | 2983 | [[package]] 2984 | name = "tokio" 2985 | version = "1.29.1" 2986 | source = "registry+https://github.com/rust-lang/crates.io-index" 2987 | checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" 2988 | dependencies = [ 2989 | "autocfg", 2990 | "backtrace", 2991 | "bytes", 2992 | "libc", 2993 | "mio", 2994 | "num_cpus", 2995 | "parking_lot", 2996 | "pin-project-lite", 2997 | "signal-hook-registry", 2998 | "socket2", 2999 | "tokio-macros", 3000 | "windows-sys", 3001 | ] 3002 | 3003 | [[package]] 3004 | name = "tokio-macros" 3005 | version = "2.1.0" 3006 | source = "registry+https://github.com/rust-lang/crates.io-index" 3007 | checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" 3008 | dependencies = [ 3009 | "proc-macro2", 3010 | "quote", 3011 | "syn 2.0.23", 3012 | ] 3013 | 3014 | [[package]] 3015 | name = "tokio-rustls" 3016 | version = "0.24.1" 3017 | source = "registry+https://github.com/rust-lang/crates.io-index" 3018 | checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" 3019 | dependencies = [ 3020 | "rustls", 3021 | "tokio", 3022 | ] 3023 | 3024 | [[package]] 3025 | name = "tokio-tungstenite" 3026 | version = "0.19.0" 3027 | source = "registry+https://github.com/rust-lang/crates.io-index" 3028 | checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" 3029 | dependencies = [ 3030 | "futures-util", 3031 | "log", 3032 | "rustls", 3033 | "tokio", 3034 | "tokio-rustls", 3035 | "tungstenite", 3036 | "webpki-roots 0.23.1", 3037 | ] 3038 | 3039 | [[package]] 3040 | name = "tokio-util" 3041 | version = "0.7.8" 3042 | source = "registry+https://github.com/rust-lang/crates.io-index" 3043 | checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" 3044 | dependencies = [ 3045 | "bytes", 3046 | "futures-core", 3047 | "futures-sink", 3048 | "pin-project-lite", 3049 | "tokio", 3050 | "tracing", 3051 | ] 3052 | 3053 | [[package]] 3054 | name = "toml" 3055 | version = "0.7.6" 3056 | source = "registry+https://github.com/rust-lang/crates.io-index" 3057 | checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" 3058 | dependencies = [ 3059 | "serde", 3060 | "serde_spanned", 3061 | "toml_datetime", 3062 | "toml_edit", 3063 | ] 3064 | 3065 | [[package]] 3066 | name = "toml_datetime" 3067 | version = "0.6.3" 3068 | source = "registry+https://github.com/rust-lang/crates.io-index" 3069 | checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" 3070 | dependencies = [ 3071 | "serde", 3072 | ] 3073 | 3074 | [[package]] 3075 | name = "toml_edit" 3076 | version = "0.19.12" 3077 | source = "registry+https://github.com/rust-lang/crates.io-index" 3078 | checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" 3079 | dependencies = [ 3080 | "indexmap 2.0.0", 3081 | "serde", 3082 | "serde_spanned", 3083 | "toml_datetime", 3084 | "winnow", 3085 | ] 3086 | 3087 | [[package]] 3088 | name = "tower-service" 3089 | version = "0.3.2" 3090 | source = "registry+https://github.com/rust-lang/crates.io-index" 3091 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 3092 | 3093 | [[package]] 3094 | name = "tracing" 3095 | version = "0.1.37" 3096 | source = "registry+https://github.com/rust-lang/crates.io-index" 3097 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 3098 | dependencies = [ 3099 | "cfg-if", 3100 | "pin-project-lite", 3101 | "tracing-attributes", 3102 | "tracing-core", 3103 | ] 3104 | 3105 | [[package]] 3106 | name = "tracing-attributes" 3107 | version = "0.1.26" 3108 | source = "registry+https://github.com/rust-lang/crates.io-index" 3109 | checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" 3110 | dependencies = [ 3111 | "proc-macro2", 3112 | "quote", 3113 | "syn 2.0.23", 3114 | ] 3115 | 3116 | [[package]] 3117 | name = "tracing-core" 3118 | version = "0.1.31" 3119 | source = "registry+https://github.com/rust-lang/crates.io-index" 3120 | checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" 3121 | dependencies = [ 3122 | "once_cell", 3123 | ] 3124 | 3125 | [[package]] 3126 | name = "tracing-futures" 3127 | version = "0.2.5" 3128 | source = "registry+https://github.com/rust-lang/crates.io-index" 3129 | checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" 3130 | dependencies = [ 3131 | "pin-project", 3132 | "tracing", 3133 | ] 3134 | 3135 | [[package]] 3136 | name = "try-lock" 3137 | version = "0.2.4" 3138 | source = "registry+https://github.com/rust-lang/crates.io-index" 3139 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 3140 | 3141 | [[package]] 3142 | name = "tungstenite" 3143 | version = "0.19.0" 3144 | source = "registry+https://github.com/rust-lang/crates.io-index" 3145 | checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" 3146 | dependencies = [ 3147 | "byteorder", 3148 | "bytes", 3149 | "data-encoding", 3150 | "http", 3151 | "httparse", 3152 | "log", 3153 | "rand", 3154 | "rustls", 3155 | "sha1", 3156 | "thiserror", 3157 | "url", 3158 | "utf-8", 3159 | "webpki", 3160 | ] 3161 | 3162 | [[package]] 3163 | name = "typenum" 3164 | version = "1.16.0" 3165 | source = "registry+https://github.com/rust-lang/crates.io-index" 3166 | checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" 3167 | 3168 | [[package]] 3169 | name = "uint" 3170 | version = "0.9.5" 3171 | source = "registry+https://github.com/rust-lang/crates.io-index" 3172 | checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" 3173 | dependencies = [ 3174 | "byteorder", 3175 | "crunchy", 3176 | "hex", 3177 | "static_assertions", 3178 | ] 3179 | 3180 | [[package]] 3181 | name = "unicode-bidi" 3182 | version = "0.3.13" 3183 | source = "registry+https://github.com/rust-lang/crates.io-index" 3184 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 3185 | 3186 | [[package]] 3187 | name = "unicode-ident" 3188 | version = "1.0.10" 3189 | source = "registry+https://github.com/rust-lang/crates.io-index" 3190 | checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" 3191 | 3192 | [[package]] 3193 | name = "unicode-normalization" 3194 | version = "0.1.22" 3195 | source = "registry+https://github.com/rust-lang/crates.io-index" 3196 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 3197 | dependencies = [ 3198 | "tinyvec", 3199 | ] 3200 | 3201 | [[package]] 3202 | name = "unicode-width" 3203 | version = "0.1.10" 3204 | source = "registry+https://github.com/rust-lang/crates.io-index" 3205 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 3206 | 3207 | [[package]] 3208 | name = "unicode-xid" 3209 | version = "0.2.4" 3210 | source = "registry+https://github.com/rust-lang/crates.io-index" 3211 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 3212 | 3213 | [[package]] 3214 | name = "untrusted" 3215 | version = "0.7.1" 3216 | source = "registry+https://github.com/rust-lang/crates.io-index" 3217 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 3218 | 3219 | [[package]] 3220 | name = "url" 3221 | version = "2.4.0" 3222 | source = "registry+https://github.com/rust-lang/crates.io-index" 3223 | checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" 3224 | dependencies = [ 3225 | "form_urlencoded", 3226 | "idna", 3227 | "percent-encoding", 3228 | ] 3229 | 3230 | [[package]] 3231 | name = "utf-8" 3232 | version = "0.7.6" 3233 | source = "registry+https://github.com/rust-lang/crates.io-index" 3234 | checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 3235 | 3236 | [[package]] 3237 | name = "uuid" 3238 | version = "0.8.2" 3239 | source = "registry+https://github.com/rust-lang/crates.io-index" 3240 | checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" 3241 | dependencies = [ 3242 | "getrandom", 3243 | "serde", 3244 | ] 3245 | 3246 | [[package]] 3247 | name = "vec_map" 3248 | version = "0.8.2" 3249 | source = "registry+https://github.com/rust-lang/crates.io-index" 3250 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 3251 | 3252 | [[package]] 3253 | name = "version_check" 3254 | version = "0.9.4" 3255 | source = "registry+https://github.com/rust-lang/crates.io-index" 3256 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 3257 | 3258 | [[package]] 3259 | name = "walkdir" 3260 | version = "2.3.3" 3261 | source = "registry+https://github.com/rust-lang/crates.io-index" 3262 | checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" 3263 | dependencies = [ 3264 | "same-file", 3265 | "winapi-util", 3266 | ] 3267 | 3268 | [[package]] 3269 | name = "want" 3270 | version = "0.3.1" 3271 | source = "registry+https://github.com/rust-lang/crates.io-index" 3272 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 3273 | dependencies = [ 3274 | "try-lock", 3275 | ] 3276 | 3277 | [[package]] 3278 | name = "wasi" 3279 | version = "0.11.0+wasi-snapshot-preview1" 3280 | source = "registry+https://github.com/rust-lang/crates.io-index" 3281 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 3282 | 3283 | [[package]] 3284 | name = "wasm-bindgen" 3285 | version = "0.2.87" 3286 | source = "registry+https://github.com/rust-lang/crates.io-index" 3287 | checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" 3288 | dependencies = [ 3289 | "cfg-if", 3290 | "wasm-bindgen-macro", 3291 | ] 3292 | 3293 | [[package]] 3294 | name = "wasm-bindgen-backend" 3295 | version = "0.2.87" 3296 | source = "registry+https://github.com/rust-lang/crates.io-index" 3297 | checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" 3298 | dependencies = [ 3299 | "bumpalo", 3300 | "log", 3301 | "once_cell", 3302 | "proc-macro2", 3303 | "quote", 3304 | "syn 2.0.23", 3305 | "wasm-bindgen-shared", 3306 | ] 3307 | 3308 | [[package]] 3309 | name = "wasm-bindgen-futures" 3310 | version = "0.4.37" 3311 | source = "registry+https://github.com/rust-lang/crates.io-index" 3312 | checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" 3313 | dependencies = [ 3314 | "cfg-if", 3315 | "js-sys", 3316 | "wasm-bindgen", 3317 | "web-sys", 3318 | ] 3319 | 3320 | [[package]] 3321 | name = "wasm-bindgen-macro" 3322 | version = "0.2.87" 3323 | source = "registry+https://github.com/rust-lang/crates.io-index" 3324 | checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" 3325 | dependencies = [ 3326 | "quote", 3327 | "wasm-bindgen-macro-support", 3328 | ] 3329 | 3330 | [[package]] 3331 | name = "wasm-bindgen-macro-support" 3332 | version = "0.2.87" 3333 | source = "registry+https://github.com/rust-lang/crates.io-index" 3334 | checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" 3335 | dependencies = [ 3336 | "proc-macro2", 3337 | "quote", 3338 | "syn 2.0.23", 3339 | "wasm-bindgen-backend", 3340 | "wasm-bindgen-shared", 3341 | ] 3342 | 3343 | [[package]] 3344 | name = "wasm-bindgen-shared" 3345 | version = "0.2.87" 3346 | source = "registry+https://github.com/rust-lang/crates.io-index" 3347 | checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" 3348 | 3349 | [[package]] 3350 | name = "web-sys" 3351 | version = "0.3.64" 3352 | source = "registry+https://github.com/rust-lang/crates.io-index" 3353 | checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" 3354 | dependencies = [ 3355 | "js-sys", 3356 | "wasm-bindgen", 3357 | ] 3358 | 3359 | [[package]] 3360 | name = "webpki" 3361 | version = "0.22.0" 3362 | source = "registry+https://github.com/rust-lang/crates.io-index" 3363 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 3364 | dependencies = [ 3365 | "ring", 3366 | "untrusted", 3367 | ] 3368 | 3369 | [[package]] 3370 | name = "webpki-roots" 3371 | version = "0.22.6" 3372 | source = "registry+https://github.com/rust-lang/crates.io-index" 3373 | checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" 3374 | dependencies = [ 3375 | "webpki", 3376 | ] 3377 | 3378 | [[package]] 3379 | name = "webpki-roots" 3380 | version = "0.23.1" 3381 | source = "registry+https://github.com/rust-lang/crates.io-index" 3382 | checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" 3383 | dependencies = [ 3384 | "rustls-webpki 0.100.1", 3385 | ] 3386 | 3387 | [[package]] 3388 | name = "winapi" 3389 | version = "0.3.9" 3390 | source = "registry+https://github.com/rust-lang/crates.io-index" 3391 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3392 | dependencies = [ 3393 | "winapi-i686-pc-windows-gnu", 3394 | "winapi-x86_64-pc-windows-gnu", 3395 | ] 3396 | 3397 | [[package]] 3398 | name = "winapi-i686-pc-windows-gnu" 3399 | version = "0.4.0" 3400 | source = "registry+https://github.com/rust-lang/crates.io-index" 3401 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3402 | 3403 | [[package]] 3404 | name = "winapi-util" 3405 | version = "0.1.5" 3406 | source = "registry+https://github.com/rust-lang/crates.io-index" 3407 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 3408 | dependencies = [ 3409 | "winapi", 3410 | ] 3411 | 3412 | [[package]] 3413 | name = "winapi-x86_64-pc-windows-gnu" 3414 | version = "0.4.0" 3415 | source = "registry+https://github.com/rust-lang/crates.io-index" 3416 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3417 | 3418 | [[package]] 3419 | name = "windows-sys" 3420 | version = "0.48.0" 3421 | source = "registry+https://github.com/rust-lang/crates.io-index" 3422 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 3423 | dependencies = [ 3424 | "windows-targets", 3425 | ] 3426 | 3427 | [[package]] 3428 | name = "windows-targets" 3429 | version = "0.48.1" 3430 | source = "registry+https://github.com/rust-lang/crates.io-index" 3431 | checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" 3432 | dependencies = [ 3433 | "windows_aarch64_gnullvm", 3434 | "windows_aarch64_msvc", 3435 | "windows_i686_gnu", 3436 | "windows_i686_msvc", 3437 | "windows_x86_64_gnu", 3438 | "windows_x86_64_gnullvm", 3439 | "windows_x86_64_msvc", 3440 | ] 3441 | 3442 | [[package]] 3443 | name = "windows_aarch64_gnullvm" 3444 | version = "0.48.0" 3445 | source = "registry+https://github.com/rust-lang/crates.io-index" 3446 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 3447 | 3448 | [[package]] 3449 | name = "windows_aarch64_msvc" 3450 | version = "0.48.0" 3451 | source = "registry+https://github.com/rust-lang/crates.io-index" 3452 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 3453 | 3454 | [[package]] 3455 | name = "windows_i686_gnu" 3456 | version = "0.48.0" 3457 | source = "registry+https://github.com/rust-lang/crates.io-index" 3458 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 3459 | 3460 | [[package]] 3461 | name = "windows_i686_msvc" 3462 | version = "0.48.0" 3463 | source = "registry+https://github.com/rust-lang/crates.io-index" 3464 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 3465 | 3466 | [[package]] 3467 | name = "windows_x86_64_gnu" 3468 | version = "0.48.0" 3469 | source = "registry+https://github.com/rust-lang/crates.io-index" 3470 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 3471 | 3472 | [[package]] 3473 | name = "windows_x86_64_gnullvm" 3474 | version = "0.48.0" 3475 | source = "registry+https://github.com/rust-lang/crates.io-index" 3476 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 3477 | 3478 | [[package]] 3479 | name = "windows_x86_64_msvc" 3480 | version = "0.48.0" 3481 | source = "registry+https://github.com/rust-lang/crates.io-index" 3482 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 3483 | 3484 | [[package]] 3485 | name = "winnow" 3486 | version = "0.4.8" 3487 | source = "registry+https://github.com/rust-lang/crates.io-index" 3488 | checksum = "a9482fe6ceabdf32f3966bfdd350ba69256a97c30253dc616fe0005af24f164e" 3489 | dependencies = [ 3490 | "memchr", 3491 | ] 3492 | 3493 | [[package]] 3494 | name = "winreg" 3495 | version = "0.10.1" 3496 | source = "registry+https://github.com/rust-lang/crates.io-index" 3497 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 3498 | dependencies = [ 3499 | "winapi", 3500 | ] 3501 | 3502 | [[package]] 3503 | name = "ws_stream_wasm" 3504 | version = "0.7.4" 3505 | source = "registry+https://github.com/rust-lang/crates.io-index" 3506 | checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" 3507 | dependencies = [ 3508 | "async_io_stream", 3509 | "futures", 3510 | "js-sys", 3511 | "log", 3512 | "pharos", 3513 | "rustc_version", 3514 | "send_wrapper 0.6.0", 3515 | "thiserror", 3516 | "wasm-bindgen", 3517 | "wasm-bindgen-futures", 3518 | "web-sys", 3519 | ] 3520 | 3521 | [[package]] 3522 | name = "wyz" 3523 | version = "0.5.1" 3524 | source = "registry+https://github.com/rust-lang/crates.io-index" 3525 | checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" 3526 | dependencies = [ 3527 | "tap", 3528 | ] 3529 | 3530 | [[package]] 3531 | name = "yansi" 3532 | version = "0.5.1" 3533 | source = "registry+https://github.com/rust-lang/crates.io-index" 3534 | checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" 3535 | 3536 | [[package]] 3537 | name = "zeroize" 3538 | version = "1.6.0" 3539 | source = "registry+https://github.com/rust-lang/crates.io-index" 3540 | checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" 3541 | 3542 | [[package]] 3543 | name = "zip" 3544 | version = "0.6.6" 3545 | source = "registry+https://github.com/rust-lang/crates.io-index" 3546 | checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" 3547 | dependencies = [ 3548 | "aes", 3549 | "byteorder", 3550 | "bzip2", 3551 | "constant_time_eq", 3552 | "crc32fast", 3553 | "crossbeam-utils", 3554 | "flate2", 3555 | "hmac", 3556 | "pbkdf2 0.11.0", 3557 | "sha1", 3558 | "time", 3559 | "zstd", 3560 | ] 3561 | 3562 | [[package]] 3563 | name = "zstd" 3564 | version = "0.11.2+zstd.1.5.2" 3565 | source = "registry+https://github.com/rust-lang/crates.io-index" 3566 | checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" 3567 | dependencies = [ 3568 | "zstd-safe", 3569 | ] 3570 | 3571 | [[package]] 3572 | name = "zstd-safe" 3573 | version = "5.0.2+zstd.1.5.2" 3574 | source = "registry+https://github.com/rust-lang/crates.io-index" 3575 | checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" 3576 | dependencies = [ 3577 | "libc", 3578 | "zstd-sys", 3579 | ] 3580 | 3581 | [[package]] 3582 | name = "zstd-sys" 3583 | version = "2.0.8+zstd.1.5.5" 3584 | source = "registry+https://github.com/rust-lang/crates.io-index" 3585 | checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" 3586 | dependencies = [ 3587 | "cc", 3588 | "libc", 3589 | "pkg-config", 3590 | ] 3591 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "evm_simulator" 3 | version = "0.1.0" 4 | authors = ["Michael Amadi"] 5 | edition = "2021" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | ethers = { version = "2.0", features = ["rustls"] } 11 | # Ethers' async features rely upon the Tokio async runtime. 12 | tokio = { version = "1", features = ["full"] } 13 | # Flexible concrete Error Reporting type built on std::error::Error with customizable Reports 14 | eyre = "0.6" 15 | serde_json = "1.0" 16 | dotenv = "0.15.0" 17 | clap = "2.33" 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | A personal project i'm using to improve in rust. 2 | 3 | # EVM SIMULATOR WRITTEN IN RUST 4 | 5 | Evm simulator with suppport for ERC20, ERC721 and ERC1155. Supports batch simulations now! 6 | 7 | ## It detects the following in each simulated transaction 8 | 9 | - ERC20 Transfers and TransferFrom 10 | - ERC20 Approvals 11 | - ERC721 Tranfers and TransferFrom 12 | - ERC721 ApprovalForAll 13 | - ERC1155 TransferSingle and TransferBatch 14 | - ERC1155 ApprovalForAll 15 | 16 | ### To test, run this in your terminal 17 | 18 | This assumes a valid rpc url link is in the `.env` file. 19 | 20 | You can also specify the `--rpc ${rpc-url}` as an alternative to using dotenv. 21 | 22 | There's also support for simulating groups of transactions one after the other from a persistent fork chain running on a port locally which you can enable by adding `--persist true` flag and also setting the `--rpc` flag to `http://localhost:port`. 23 | 24 | Example of a simple single simulation: 25 | 26 | ```zsh 27 | cargo run -- --from 0x3B059f15059d976cA189165ee36d75Cb18249daf --to 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D --data 0x791ac94700000000000000000000000000000000000000000000021e19e0c9bab24000000000000000000000000000000000000000000000000000000191112d9c55be9100000000000000000000000000000000000000000000000000000000000000a00000000000000000000000003b059f15059d976ca189165ee36d75cb18249daf0000000000000000000000000000000000000000000000000000000064d8924a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000930dac667ca8ac9166c93ae2eec3fb118a83c05f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 --value 0 --block 17904698 28 | ``` 29 | 30 | ### Your output would be similar to this 31 | 32 | ```zsh 33 | Finished dev [unoptimized + debuginfo] target(s) in 13.98s 34 | Running `target/debug/evm_simulator --from 0x3B059f15059d976cA189165ee36d75Cb18249daf --to 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D --data 0x791ac94700000000000000000000000000000000000000000000021e19e0c9bab24000000000000000000000000000000000000000000000000000000191112d9c55be9100000000000000000000000000000000000000000000000000000000000000a00000000000000000000000003b059f15059d976ca189165ee36d75cb18249daf0000000000000000000000000000000000000000000000000000000064d8924a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000930dac667ca8ac9166c93ae2eec3fb118a83c05f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 --value 0 --block 17904698` 35 | 36 | 37 | Simulating transaction with details: 38 | From: 0x3b059f15059d976ca189165ee36d75cb18249daf 39 | To: 0x7a250d5630b4cf539739df2c5dacb4c659f2488d 40 | Data: 0x791ac94700000000000000000000000000000000000000000000021e19e0c9bab24000000000000000000000000000000000000000000000000000000191112d9c55be9100000000000000000000000000000000000000000000000000000000000000a00000000000000000000000003b059f15059d976ca189165ee36d75cb18249daf0000000000000000000000000000000000000000000000000000000064d8924a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000930dac667ca8ac9166c93ae2eec3fb118a83c05f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 41 | Value: 0 42 | Block Number: Past(17904698) 43 | 44 | 45 | 46 | 47 | 48 | _____________________________________________________________________ SIMULATION RESULTS _____________________________________________________________________ 49 | 50 | 1. Approval 51 | Token Info: 52 | Standard: NONE, 53 | Address: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 54 | Token Name: "Nuclear Pump", 55 | Symbol: "NUMP", 56 | Decimals: 18, 57 | 58 | From: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 59 | To: 0x7a250d5630b4cf539739df2c5dacb4c659f2488d, 60 | id: "", 61 | Amount: "1000.000000000000000000" 62 | 63 | ________________________________________________________________________________________________________________________________________________________________ 64 | 65 | 2. Transfer 66 | Token Info: 67 | Standard: NONE, 68 | Address: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 69 | Token Name: "Nuclear Pump", 70 | Symbol: "NUMP", 71 | Decimals: 18, 72 | 73 | From: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 74 | To: 0x405a49c1ae3836205edadb873946f5925812ec72, 75 | id: "", 76 | Amount: "1000.000000000000000000" 77 | 78 | ________________________________________________________________________________________________________________________________________________________________ 79 | 80 | 3. Approval 81 | Token Info: 82 | Standard: NONE, 83 | Address: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 84 | Token Name: "Nuclear Pump", 85 | Symbol: "NUMP", 86 | Decimals: 18, 87 | 88 | From: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 89 | To: 0x7a250d5630b4cf539739df2c5dacb4c659f2488d, 90 | id: "", 91 | Amount: "0.000000000000000000" 92 | 93 | ________________________________________________________________________________________________________________________________________________________________ 94 | 95 | 4. Transfer 96 | Token Info: 97 | Standard: NONE, 98 | Address: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 99 | Token Name: "Wrapped Ether", 100 | Symbol: "WETH", 101 | Decimals: 18, 102 | 103 | From: 0x405a49c1ae3836205edadb873946f5925812ec72, 104 | To: 0x7a250d5630b4cf539739df2c5dacb4c659f2488d, 105 | id: "", 106 | Amount: "0.012324693073573815" 107 | 108 | ________________________________________________________________________________________________________________________________________________________________ 109 | 110 | 5. Transfer 111 | Token Info: 112 | Standard: NONE, 113 | Address: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 114 | Token Name: "Nuclear Pump", 115 | Symbol: "NUMP", 116 | Decimals: 18, 117 | 118 | From: 0x3b059f15059d976ca189165ee36d75cb18249daf, 119 | To: 0x405a49c1ae3836205edadb873946f5925812ec72, 120 | id: "", 121 | Amount: "9700.000000000000000000" 122 | 123 | ________________________________________________________________________________________________________________________________________________________________ 124 | 125 | 6. Transfer 126 | Token Info: 127 | Standard: NONE, 128 | Address: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 129 | Token Name: "Nuclear Pump", 130 | Symbol: "NUMP", 131 | Decimals: 18, 132 | 133 | From: 0x3b059f15059d976ca189165ee36d75cb18249daf, 134 | To: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 135 | id: "", 136 | Amount: "300.000000000000000000" 137 | 138 | ________________________________________________________________________________________________________________________________________________________________ 139 | 140 | 7. Approval 141 | Token Info: 142 | Standard: NONE, 143 | Address: 0x930dac667ca8ac9166c93ae2eec3fb118a83c05f, 144 | Token Name: "Nuclear Pump", 145 | Symbol: "NUMP", 146 | Decimals: 18, 147 | 148 | From: 0x3b059f15059d976ca189165ee36d75cb18249daf, 149 | To: 0x7a250d5630b4cf539739df2c5dacb4c659f2488d, 150 | id: "", 151 | Amount: "115792089237316195423570985008687907853269984665640564019757.584007913129639935" 152 | 153 | ________________________________________________________________________________________________________________________________________________________________ 154 | 155 | 8. Transfer 156 | Token Info: 157 | Standard: NONE, 158 | Address: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2, 159 | Token Name: "Wrapped Ether", 160 | Symbol: "WETH", 161 | Decimals: 18, 162 | 163 | From: 0x405a49c1ae3836205edadb873946f5925812ec72, 164 | To: 0x7a250d5630b4cf539739df2c5dacb4c659f2488d, 165 | id: "", 166 | Amount: "0.115192375116522393" 167 | 168 | ________________________________________________________________________________________________________________________________________________________________ 169 | ``` 170 | 171 | ### To use: 172 | 173 | It expects a minimum of 2 flags with inputs: `--from
` and `--to
` 174 | It can also take 3 extra inputs for customizability: `--data ` (defaults to `0x` if not specified), `--value ` (defaults to `0 wei` if not specified), `--block ` (defaults to the latest block if not specified), `--rpc ` (defaults to the key `RPC_URL` in your `.env` file and reverts if it doesn't find it) and `--persist ` (defaults to false if not specified). 175 | 176 | Note: For older blocks, you would need an archival node's rpc url 177 | 178 | ### For more info, run: 179 | 180 | ```zsh 181 | cargo run -- --help 182 | ``` 183 | -------------------------------------------------------------------------------- /src/cli.rs: -------------------------------------------------------------------------------- 1 | use clap::{App, Arg}; 2 | 3 | pub fn cli() -> Vec { 4 | let matches = App::new("Rust CLI evm simulator") 5 | .version("1.0") 6 | .author("Michael Amadi") 7 | .about("A CLI app for simulating EVM chain's transactions and viewing transfers and approvals that will happen without actually executing it on mainnet") 8 | .arg( 9 | Arg::with_name("from") 10 | .long("from") 11 | .value_name("ADDRESS") 12 | .help("Source address") 13 | .required(true), 14 | ) 15 | .arg( 16 | Arg::with_name("to") 17 | .long("to") 18 | .value_name("ADDRESS") 19 | .help("Destination address or contract address") 20 | .required(true), 21 | ) 22 | .arg( 23 | Arg::with_name("data") 24 | .long("data") 25 | .value_name("DATA") 26 | .help("Transaction input data") 27 | .required(false), 28 | ) 29 | .arg( 30 | Arg::with_name("value") 31 | .long("value") 32 | .value_name("VALUE") 33 | .help("Transaction value") 34 | .required(false), 35 | ) 36 | .arg( 37 | Arg::with_name("block") 38 | .long("block") 39 | .value_name("BLOCK") 40 | .help("Block number") 41 | .required(false), 42 | ) 43 | .arg( 44 | Arg::with_name("rpc") 45 | .long("rpc") 46 | .value_name("RPC_URL") 47 | .help("RPC URL") 48 | .required(false), 49 | ) 50 | .arg( 51 | Arg::with_name("persist") 52 | .long("persist") 53 | .value_name("PERSIST") 54 | .help("Persist the state after simulations") 55 | .required(false), 56 | ) 57 | .get_matches(); 58 | 59 | let from = matches.value_of("from").unwrap(); 60 | let to = matches.value_of("to").unwrap(); 61 | let data = matches.value_of("data").unwrap_or_else(|| "0x"); 62 | let value = matches.value_of("value").unwrap_or_else(|| "0"); 63 | let block = matches.value_of("block").unwrap_or_default(); 64 | let rpc = matches.value_of("rpc").unwrap_or_default(); 65 | let persist = matches.value_of("persist").unwrap_or_default(); 66 | 67 | vec![ 68 | from.to_owned(), 69 | to.to_owned(), 70 | data.to_owned(), 71 | value.to_owned(), 72 | block.to_owned(), 73 | rpc.to_owned(), 74 | persist.to_owned(), 75 | ] 76 | } 77 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod cli; 2 | pub mod simulator; 3 | 4 | pub mod prelude { 5 | pub use crate::{cli, simulator}; 6 | pub use simulator::{print_result, simulate, types}; 7 | } 8 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use eyre::Result; 2 | use std::process; 3 | 4 | use evm_simulator::prelude::*; 5 | 6 | #[tokio::main] 7 | async fn main() -> Result<()> { 8 | let args: Vec = cli::cli(); 9 | let simulation_params = types::SimulationParams::new(&args).unwrap_or_else(|e| { 10 | eprintln!("{}", e); 11 | process::exit(1); 12 | }); 13 | 14 | println!( 15 | "\n\n\x1b[1m Simulating transaction with details: 16 | \x1b[92m From: \x1b[0m {:?} 17 | \x1b[92m To: \x1b[0m {:?} 18 | \x1b[92m Data: \x1b[0m {} 19 | \x1b[92m Value: \x1b[0m {} 20 | \x1b[92m Block Number: \x1b[0m {:?}\n", 21 | simulation_params.from, 22 | simulation_params.to, 23 | simulation_params.data, 24 | simulation_params.value, 25 | simulation_params.block_number 26 | ); 27 | 28 | let sim_result = simulate(simulation_params, true).await?; 29 | let _ = print_result::print_result(sim_result); 30 | 31 | Ok(()) 32 | } 33 | 34 | // still working on tests 35 | #[cfg(test)] 36 | mod test { 37 | use ethers::types::{Address, U256}; 38 | use evm_simulator::{simulator::simulate, simulator::types}; 39 | use eyre::Result; 40 | use types::{Operation, SimulationParams, SimulationResults, Standard, TokenInfo}; 41 | 42 | // test runs 43 | fn return_erc20_test_case() -> Vec { 44 | // return a uniswap swap tx data 45 | 46 | let from = "0x448E0F9F42746F6165Dbe6E7B77149bB0F631E6E".to_owned(); 47 | let to = "0x2Ec705D306b51e486B1bC0D6ebEE708E0661ADd1".to_owned(); 48 | let data = "0x18cbafe500000000000000000000000000000000000000000000000000394425252270000000000000000000000000000000000000000000000000000035e2b98723e13d00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000448e0f9f42746f6165dbe6e7b77149bb0f631e6e0000000000000000000000000000000000000000000000000000000064a876b70000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e30bbec87855c8710729e6b8384ef9783c76379c000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2".to_owned(); 49 | let value = "0".to_owned(); 50 | let block_number = "17644319".to_owned(); 51 | let rpc = "".to_owned(); 52 | let persist = "".to_owned(); 53 | 54 | vec![from, to, data, value, block_number, rpc, persist] 55 | } 56 | 57 | fn return_nft_test_case() -> Vec { 58 | // return an erc1155 and erc20 tx 59 | 60 | let from = "0x77c5D44F392DD825A073C417EDe8C2f8bce603F6".to_owned(); 61 | let to = "0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC".to_owned(); 62 | let data = "0xe7acab24000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000005e00000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000004c00000000000000000000000000b818dc9d41732617dfc5bc8dff03dac632780e1000000000000000000000000000000e7ec00e7b300774b00001314b8610022b80000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000064ac23690000000000000000000000000000000000000000000000000000000064d501e50000000000000000000000000000000000000000000000000000000000000000360c6ebe0000000000000000000000000000000000000000710e918d59930ae50000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d529ae9e86000000000000000000000000000000000000000000000000000000d529ae9e8600000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000076be3b62873462d2142405439777e971754e8e77000000000000000000000000000000000000000000000000000000000000282c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000020000000000000000000000000b818dc9d41732617dfc5bc8dff03dac632780e10000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005543df729c0000000000000000000000000000000000000000000000000000005543df729c0000000000000000000000000000000a26b00c1f0df003000390027140000faa719000000000000000000000000000000000000000000000000000000000000004059577c8e8707f9b8896a85d4a59a2ef30647fb061287f000079b9fe1e5063474597f9bf2b77700bba355bd813f416da1c12048c8b976a222a3fcdbc92a7887aa000000000000000000000000000000000000000000000000000000000000007e0077c5d44f392dd825a073c417ede8c2f8bce603f60000000064add71eaab1b624b2bf2ba4bc33225f4eb7638e22f73aca43287493a1f63311f6c038a5d8ca9631edb8f32f3696d78963d536359f05834d595295a3189b2c0862236f6900000000000000000000000000000000000000000000000000000000000000282c0000000000000000000000000000000000000000000000000000000000000000000000000000360c6ebe".to_owned(); 63 | let value = "0".to_owned(); 64 | let block_number = "17673303".to_owned(); 65 | let rpc = "".to_owned(); 66 | let persist = "".to_owned(); 67 | 68 | vec![from, to, data, value, block_number, rpc, persist] 69 | } 70 | 71 | #[tokio::test] 72 | async fn test_swap_tx_sim_should_detect_expected_logs() -> Result<(), String> { 73 | let args = return_erc20_test_case(); 74 | let simulation_params = SimulationParams::new(&args)?; 75 | 76 | let sim_result = simulate(simulation_params, true).await; 77 | let sim_result = match sim_result { 78 | Ok(r) => r, 79 | Err(_) => return Err("Simulation failed".to_owned()), 80 | }; 81 | let expected_result = vec![ 82 | SimulationResults { 83 | operation: Operation::Transfer, 84 | token_info: TokenInfo { 85 | standard: Standard::Eip20, 86 | address: "0xe30bbec87855c8710729e6b8384ef9783c76379c" 87 | .parse::
() 88 | .unwrap(), 89 | name: "Wrapped Luna".to_owned(), 90 | symbol: "WLUNA".to_owned(), 91 | decimals: U256::from(9), 92 | }, 93 | from: "0x448e0f9f42746f6165dbe6e7b77149bb0f631e6e" 94 | .parse::
() 95 | .unwrap(), 96 | to: "0x7a333329ba40a0999ba1c8b4d56acc1107c7a501" 97 | .parse::
() 98 | .unwrap(), 99 | id: None, 100 | amount: U256::from_dec_str("16119000000000000").unwrap(), 101 | }, 102 | SimulationResults { 103 | operation: Operation::Approval, 104 | token_info: TokenInfo { 105 | standard: Standard::Eip20, 106 | address: "0xe30bbec87855c8710729e6b8384ef9783c76379c" 107 | .parse::
() 108 | .unwrap(), 109 | name: "Wrapped Luna".to_owned(), 110 | symbol: "WLUNA".to_owned(), 111 | decimals: U256::from(9), 112 | }, 113 | from: "0x448e0f9f42746f6165dbe6e7b77149bb0f631e6e" 114 | .parse::
() 115 | .unwrap(), 116 | to: "0x2ec705d306b51e486b1bc0d6ebee708e0661add1" 117 | .parse::
() 118 | .unwrap(), 119 | id: None, 120 | amount: U256::from(0), 121 | }, 122 | SimulationResults { 123 | operation: Operation::Transfer, 124 | token_info: TokenInfo { 125 | standard: Standard::Eip20, 126 | address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" 127 | .parse::
() 128 | .unwrap(), 129 | name: "Wrapped Ether".to_owned(), 130 | symbol: "WETH".to_owned(), 131 | decimals: U256::from(18), 132 | }, 133 | from: "0x7a333329ba40a0999ba1c8b4d56acc1107c7a501" 134 | .parse::
() 135 | .unwrap(), 136 | to: "0x2ec705d306b51e486b1bc0d6ebee708e0661add1" 137 | .parse::
() 138 | .unwrap(), 139 | id: None, 140 | amount: U256::from_dec_str("20210640756165174").unwrap(), 141 | }, 142 | ]; 143 | 144 | assert_eq!(sim_result, expected_result); 145 | 146 | Ok(()) 147 | } 148 | 149 | #[tokio::test] 150 | async fn test_nft_tx_sim_should_detect_expected_logs() -> Result<(), String> { 151 | let args = return_nft_test_case(); 152 | let simulation_params = SimulationParams::new(&args)?; 153 | 154 | let sim_result = simulate(simulation_params, true).await; 155 | let sim_result = match sim_result { 156 | Ok(r) => r, 157 | Err(_) => return Err("Simulation failed".to_owned()), 158 | }; 159 | let expected_result = vec![ 160 | SimulationResults { 161 | operation: Operation::Transfer, 162 | token_info: TokenInfo { 163 | standard: Standard::Eip20, 164 | address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" 165 | .parse::
() 166 | .unwrap(), 167 | name: "Wrapped Ether".to_owned(), 168 | symbol: "WETH".to_owned(), 169 | decimals: U256::from_dec_str("18").unwrap(), 170 | }, 171 | from: "0x0b818dc9d41732617dfc5bc8dff03dac632780e1" 172 | .parse::
() 173 | .unwrap(), 174 | to: "0x77c5d44f392dd825a073c417ede8c2f8bce603f6" 175 | .parse::
() 176 | .unwrap(), 177 | id: None, 178 | amount: U256::from_dec_str("60000000000000000").unwrap(), 179 | }, 180 | SimulationResults { 181 | operation: Operation::TransferSingle, 182 | token_info: TokenInfo { 183 | standard: Standard::Eip1155, 184 | address: "0x76be3b62873462d2142405439777e971754e8e77" 185 | .parse::
() 186 | .unwrap(), 187 | name: "".to_owned(), 188 | symbol: "".to_owned(), 189 | decimals: U256::from_dec_str("0").unwrap(), 190 | }, 191 | from: "0x77c5d44f392dd825a073c417ede8c2f8bce603f6" 192 | .parse::
() 193 | .unwrap(), 194 | to: "0x0b818dc9d41732617dfc5bc8dff03dac632780e1" 195 | .parse::
() 196 | .unwrap(), 197 | id: Some(U256::from_dec_str("10284").unwrap()), 198 | amount: U256::from_dec_str("2").unwrap(), 199 | }, 200 | SimulationResults { 201 | operation: Operation::Transfer, 202 | token_info: TokenInfo { 203 | standard: Standard::Eip20, 204 | address: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" 205 | .parse::
() 206 | .unwrap(), 207 | name: "Wrapped Ether".to_owned(), 208 | symbol: "WETH".to_owned(), 209 | decimals: U256::from_dec_str("18").unwrap(), 210 | }, 211 | from: "0x77c5d44f392dd825a073c417ede8c2f8bce603f6" 212 | .parse::
() 213 | .unwrap(), 214 | to: "0x0000a26b00c1f0df003000390027140000faa719" 215 | .parse::
() 216 | .unwrap(), 217 | id: None, 218 | amount: U256::from_dec_str("1500000000000000").unwrap(), 219 | }, 220 | ]; 221 | 222 | assert_eq!(sim_result, expected_result); 223 | 224 | Ok(()) 225 | } 226 | } 227 | -------------------------------------------------------------------------------- /src/simulator/constants.rs: -------------------------------------------------------------------------------- 1 | // Constants 2 | pub const APPROVAL: [u8; 32] = [ 3 | 140, 91, 225, 229, 235, 236, 125, 91, 209, 79, 113, 66, 125, 30, 132, 243, 221, 3, 20, 192, 4 | 247, 178, 41, 30, 91, 32, 10, 200, 199, 195, 185, 37, 5 | ]; // 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925 6 | pub const TRANSFER: [u8; 32] = [ 7 | 221, 242, 82, 173, 27, 226, 200, 155, 105, 194, 176, 104, 252, 55, 141, 170, 149, 43, 167, 241, 8 | 99, 196, 161, 22, 40, 245, 90, 77, 245, 35, 179, 239, 9 | ]; // 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef 10 | pub const APPROVAL_FOR_ALL: [u8; 32] = [ 11 | 23, 48, 126, 171, 57, 171, 97, 7, 232, 137, 152, 69, 173, 61, 89, 189, 150, 83, 242, 0, 242, 12 | 32, 146, 4, 137, 202, 43, 89, 55, 105, 108, 49, 13 | ]; // 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31 14 | pub const TRANSFER_SINGLE: [u8; 32] = [ 15 | 195, 213, 129, 104, 197, 174, 115, 151, 115, 29, 6, 61, 91, 191, 61, 101, 120, 84, 66, 115, 67, 16 | 244, 192, 131, 36, 15, 122, 172, 170, 45, 15, 98, 17 | ]; // 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62 18 | pub const TRANSFER_BATCH: [u8; 32] = [ 19 | 74, 57, 220, 6, 212, 192, 219, 198, 75, 112, 175, 144, 253, 105, 138, 35, 58, 81, 138, 165, 20 | 208, 126, 89, 93, 152, 59, 140, 5, 38, 200, 247, 251, 21 | ]; // 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb 22 | 23 | // array of checked topics 24 | pub const CHECKED_TOPICS: [[u8; 32]; 5] = [ 25 | APPROVAL, 26 | TRANSFER, 27 | APPROVAL_FOR_ALL, 28 | TRANSFER_SINGLE, 29 | TRANSFER_BATCH, 30 | ]; 31 | 32 | // PRECOMPILES 33 | const EC_RECOVER: [u8; 32] = [ 34 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 35 | ]; 36 | const SHA2_256: [u8; 32] = [ 37 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 38 | ]; 39 | const RIPEMD_160: [u8; 32] = [ 40 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 41 | ]; 42 | const IDENTITY: [u8; 32] = [ 43 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 44 | ]; 45 | const MOD_EXP: [u8; 32] = [ 46 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 47 | ]; 48 | const EC_ADD: [u8; 32] = [ 49 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 50 | ]; 51 | const EC_MUL: [u8; 32] = [ 52 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 53 | ]; 54 | const EC_PAIRING: [u8; 32] = [ 55 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 56 | ]; 57 | const BLAKE_2F: [u8; 32] = [ 58 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 59 | ]; 60 | 61 | pub const PRECOMPILES: [[u8; 32]; 9] = [ 62 | EC_RECOVER, SHA2_256, RIPEMD_160, IDENTITY, MOD_EXP, EC_ADD, EC_MUL, EC_PAIRING, BLAKE_2F, 63 | ]; 64 | -------------------------------------------------------------------------------- /src/simulator/fork_simulator.rs: -------------------------------------------------------------------------------- 1 | use ethers::{ 2 | core::types::TransactionRequest, 3 | providers::{Http, Middleware, Provider}, 4 | }; 5 | use eyre::Result; 6 | use std::process; 7 | 8 | use super::process_logs::process_logs; 9 | use super::types::{MyLog, SimulationResults}; 10 | 11 | pub async fn simulate( 12 | tx: TransactionRequest, 13 | provider: &Provider, 14 | ) -> Result> { 15 | // send tx 16 | let pending_tx = provider 17 | .send_transaction(tx, None) 18 | .await 19 | .unwrap_or_else(|e| { 20 | eprintln!("transaction reverted with err: {}", e); 21 | process::exit(1); 22 | }); 23 | 24 | // await and get receipt and tx 25 | let receipt = pending_tx 26 | .await? 27 | .ok_or_else(|| eyre::format_err!("Transaction Failed"))?; 28 | 29 | // let tx = provider.get_transaction(receipt.transaction_hash).await?; 30 | 31 | // println!("tx: {:?}", serde_json::to_string(&tx)?); 32 | // println!("receipt: {:?}", serde_json::to_string(&receipt)?); 33 | 34 | let logs = receipt.logs; 35 | // println!("logs: {:?}", logs); 36 | 37 | let mut simulated_infos: Vec = Vec::new(); 38 | 39 | for log in logs.into_iter() { 40 | match process_logs( 41 | MyLog { 42 | address: log.address, 43 | topics: log.topics, 44 | data: log.data, 45 | }, 46 | provider.clone(), 47 | ) 48 | .await 49 | { 50 | Ok(Some(x)) => simulated_infos.push(x), 51 | Ok(None) => {} 52 | Err(err) => { 53 | eprintln!("Err {}", err); 54 | process::exit(1) 55 | } 56 | } 57 | } 58 | 59 | Ok(simulated_infos) 60 | } 61 | -------------------------------------------------------------------------------- /src/simulator/mod.rs: -------------------------------------------------------------------------------- 1 | use dotenv::dotenv; 2 | use ethers::{ 3 | core::types::TransactionRequest, 4 | providers::{Http, Provider}, 5 | types::Address, 6 | utils::Anvil, 7 | }; 8 | use eyre::Result; 9 | use std::convert::TryFrom; 10 | use std::process; 11 | 12 | mod constants; 13 | mod fork_simulator; 14 | pub mod print_result; 15 | mod process_logs; 16 | mod trace_simulator; 17 | pub mod types; 18 | mod utils; 19 | 20 | use types::{SimulationParams, SimulationResults}; 21 | 22 | use self::types::BlockNumberType; 23 | 24 | pub async fn simulate( 25 | simulation_params: SimulationParams, 26 | create_fork: bool, 27 | ) -> Result> { 28 | // either use parsed in rpc-url if it exists or use the one in the nev file if that exists, else revert 29 | let rpc_url = match simulation_params.rpc_url { 30 | Some(u) => u, 31 | None => { 32 | dotenv().ok(); 33 | let url = 34 | std::env::var("RPC_URL").expect("RPC_URL must be set if rpc flag is not given"); 35 | url 36 | } 37 | }; 38 | 39 | let tx = TransactionRequest::new() 40 | .from(simulation_params.from) 41 | .to(simulation_params.to) 42 | .value(simulation_params.value) 43 | .data(simulation_params.data); 44 | 45 | let provider; 46 | let anvil; 47 | let simulated_infos: Vec; 48 | if simulation_params.persist { 49 | provider = Provider::::try_from(rpc_url).unwrap_or_else(|_| { 50 | eprintln!("could not instantiate HTTP Provider"); 51 | process::exit(1); 52 | }); 53 | 54 | simulated_infos = use_fork_simulator(&provider, simulation_params.from, tx).await?; 55 | } else { 56 | // create instance of forked chain using anvil 57 | anvil = match simulation_params.block_number { 58 | BlockNumberType::Past(num) => Anvil::new().fork(rpc_url).fork_block_number(num).spawn(), 59 | BlockNumberType::Latest => Anvil::new().fork(rpc_url).spawn(), 60 | }; 61 | provider = Provider::::try_from(anvil.endpoint()).unwrap_or_else(|_| { 62 | eprintln!("could not instantiate HTTP Provider"); 63 | process::exit(1); 64 | }); 65 | 66 | simulated_infos = if create_fork { 67 | use_fork_simulator(&provider, simulation_params.from, tx).await? 68 | } else { 69 | trace_simulator::simulate(tx, &provider, simulation_params.block_number) 70 | .await 71 | .expect("Fork simulation failed") 72 | }; 73 | } 74 | 75 | Ok(simulated_infos) 76 | } 77 | 78 | async fn use_fork_simulator( 79 | provider: &Provider, 80 | from: Address, 81 | tx: TransactionRequest, 82 | ) -> Result> { 83 | // impersonate address 84 | provider.request("anvil_impersonateAccount", [from]).await?; 85 | 86 | let simulated_infos = fork_simulator::simulate(tx, &provider) 87 | .await 88 | .expect("Fork simulation failed"); 89 | 90 | provider 91 | .request("anvil_stopImpersonatingAccount", [from]) 92 | .await?; 93 | 94 | Ok(simulated_infos) 95 | } 96 | -------------------------------------------------------------------------------- /src/simulator/print_result.rs: -------------------------------------------------------------------------------- 1 | use super::types::SimulationResults; 2 | use ethers::utils::format_units; 3 | 4 | pub fn print_result(simulated_infos: Vec) { 5 | if simulated_infos.len() == 0 { 6 | println!("No watched events detected!"); 7 | return; 8 | } 9 | 10 | println!("\n\n\n\n\x1b[92m _____________________________________________________________________ SIMULATION RESULTS _____________________________________________________________________\n"); 11 | for (index, simulated_info) in simulated_infos.iter().enumerate() { 12 | let decimals: u32 = simulated_info 13 | .token_info 14 | .decimals 15 | .to_string() 16 | .parse() 17 | .expect("failed to convert to u32"); 18 | let amount = match decimals > 0 { 19 | true => format_units(simulated_info.amount, decimals).unwrap(), 20 | false => format!("{}", simulated_info.amount), 21 | }; 22 | let id = match simulated_info.id { 23 | Some(id) => format!("{}", id), 24 | None => "".to_owned(), 25 | }; 26 | 27 | println!( 28 | " \x1b[94m{}. \x1b[0m{:?} 29 | Token Info: 30 | Standard: {:?}, 31 | Address: {:?}, 32 | Token Name: {:?}, 33 | Symbol: {:?}, 34 | Decimals: {:?}, 35 | 36 | Operation Info: 37 | From: {:?}, 38 | To: {:?}, 39 | id: {:?}, 40 | Amount: {:?} 41 | \n\x1b[92m________________________________________________________________________________________________________________________________________________________________\n", 42 | index + 1, 43 | simulated_info.operation, 44 | simulated_info.token_info.standard, 45 | simulated_info.token_info.address, 46 | simulated_info.token_info.name, 47 | simulated_info.token_info.symbol, 48 | simulated_info.token_info.decimals, 49 | simulated_info.from, 50 | simulated_info.to, 51 | id, 52 | amount 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/simulator/process_logs.rs: -------------------------------------------------------------------------------- 1 | use ethers::{ 2 | abi::{decode_whole, ParamType, Token}, 3 | contract::Multicall, 4 | prelude::abigen, 5 | providers::{Http, Provider}, 6 | types::{Address, U256}, 7 | }; 8 | use eyre::Result; 9 | use std::process; 10 | use std::sync::Arc; 11 | 12 | use super::constants::{APPROVAL, APPROVAL_FOR_ALL, CHECKED_TOPICS, TRANSFER, TRANSFER_SINGLE}; 13 | use super::types::{MyLog, Operation, SimulationResults, Standard, TokenInfo}; 14 | 15 | pub async fn process_logs( 16 | log: MyLog, 17 | provider: Provider, 18 | ) -> Result> { 19 | let topic0 = log.topics[0] 20 | .as_bytes() 21 | .try_into() 22 | .expect("could not convert topic0 into a uint8 array"); 23 | 24 | if CHECKED_TOPICS.contains(&topic0) { 25 | let amount: U256; 26 | let id: Option; 27 | let standard: Standard; 28 | 29 | if log.data.len() == 64 { 30 | let decoded = 31 | match decode_whole(&[ParamType::Uint(256), ParamType::Uint(256)], &log.data) { 32 | Ok(x) => x, 33 | Err(err) => { 34 | eprintln!("decoding failed with err: {}", err); 35 | process::exit(1); 36 | } 37 | }; 38 | (id, amount) = match (&decoded[0], &decoded[1]) { 39 | (Token::Uint(x), Token::Uint(y)) => (Some(*x), *y), 40 | _ => { 41 | eprintln!("Wrong type decoded"); 42 | process::exit(1); 43 | } 44 | }; 45 | standard = Standard::Eip1155; 46 | } else if log.data.len() == 32 { 47 | let decoded = match decode_whole(&[ParamType::Uint(256)], &log.data) { 48 | Ok(x) => x, 49 | Err(err) => { 50 | eprintln!("decoding failed with err: {}", err); 51 | process::exit(1); 52 | } 53 | }; 54 | amount = match decoded[0] { 55 | Token::Uint(x) => x, 56 | _ => { 57 | eprintln!("Wrong type decoded"); 58 | process::exit(1); 59 | } 60 | }; 61 | id = None; 62 | 63 | standard = match &topic0 { 64 | &APPROVAL => Standard::Eip20, 65 | &TRANSFER => Standard::Eip20, 66 | &APPROVAL_FOR_ALL => Standard::Eip721, 67 | _ => Standard::None, 68 | } 69 | } else { 70 | amount = U256::from(1); 71 | 72 | let d: &[u8] = log.topics[3] 73 | .as_bytes() 74 | .try_into() 75 | .expect("could not convert topic4 into a uint8 array"); 76 | id = Some(U256::from(d)); 77 | 78 | standard = Standard::Eip721; 79 | }; 80 | 81 | let (name, symbol, decimals) = 82 | get_token_name_and_symbol(log.address, provider, &standard).await?; 83 | 84 | match_simulation_result(topic0, name, symbol, decimals, amount, id, log, standard) 85 | } else { 86 | Ok(None) 87 | } 88 | } 89 | 90 | fn match_simulation_result( 91 | topic0: [u8; 32], 92 | name: String, 93 | symbol: String, 94 | decimals: U256, 95 | amount: U256, 96 | id: Option, 97 | log: MyLog, 98 | standard: Standard, 99 | ) -> Result> { 100 | match topic0 { 101 | APPROVAL => Ok(Some(SimulationResults { 102 | operation: Operation::Approval, 103 | token_info: TokenInfo { 104 | standard, 105 | name, 106 | symbol, 107 | decimals, 108 | address: log.address, 109 | }, 110 | from: Address::from(log.topics[1]), 111 | to: Address::from(log.topics[2]), 112 | amount, 113 | id, 114 | })), 115 | TRANSFER => Ok(Some(SimulationResults { 116 | operation: Operation::Transfer, 117 | token_info: TokenInfo { 118 | standard, 119 | name, 120 | symbol, 121 | decimals, 122 | address: log.address, 123 | }, 124 | from: Address::from(log.topics[1]), 125 | to: Address::from(log.topics[2]), 126 | amount, 127 | id, 128 | })), 129 | APPROVAL_FOR_ALL => Ok(Some(SimulationResults { 130 | operation: Operation::ApprovalForAll, 131 | token_info: TokenInfo { 132 | standard, 133 | name, 134 | symbol, 135 | decimals, 136 | address: log.address, 137 | }, 138 | from: Address::from(log.topics[1]), 139 | to: Address::from(log.topics[2]), 140 | amount, 141 | id, 142 | })), 143 | TRANSFER_SINGLE => Ok(Some(SimulationResults { 144 | operation: Operation::TransferSingle, 145 | token_info: TokenInfo { 146 | standard, 147 | name, 148 | symbol, 149 | decimals, 150 | address: log.address, 151 | }, 152 | from: Address::from(log.topics[2]), 153 | to: Address::from(log.topics[3]), 154 | amount, 155 | id, 156 | })), 157 | _ => Ok(Some(SimulationResults { 158 | operation: Operation::TransferBatch, 159 | token_info: TokenInfo { 160 | standard, 161 | name, 162 | symbol, 163 | decimals, 164 | address: log.address, 165 | }, 166 | from: Address::from(log.topics[2]), 167 | to: Address::from(log.topics[3]), 168 | amount, 169 | id, 170 | })), 171 | } 172 | } 173 | 174 | async fn get_token_name_and_symbol( 175 | address: Address, 176 | provider: Provider, 177 | standard: &Standard, 178 | ) -> Result<(String, String, U256)> { 179 | abigen!( 180 | TokenInstance, 181 | r#"[ 182 | function name() external view returns (string) 183 | function symbol() external view returns (string) 184 | function decimals() external view returns (uint256) 185 | ]"#, 186 | ); 187 | 188 | let client = Arc::new(provider); 189 | let token_instance = TokenInstance::new(address, client.clone()); 190 | 191 | let name_fn = token_instance.method::<_, String>("name", ())?; 192 | let symbol_fn = token_instance.method::<_, String>("symbol", ())?; 193 | let decimals_fn = token_instance.method::<_, U256>("decimals", ())?; 194 | 195 | let mut multicall = Multicall::new(client, None).await?; 196 | 197 | let name: String; 198 | let symbol: String; 199 | let decimals: U256; 200 | match standard { 201 | Standard::Eip20 => { 202 | multicall 203 | .add_call(name_fn, true) 204 | .add_call(symbol_fn, true) 205 | .add_call(decimals_fn, true); 206 | // `await`ing on the `call` method lets us fetch the return values of both the above calls in one single RPC call 207 | (name, symbol, decimals) = match multicall.call().await { 208 | Ok((a, b, c)) => (a, b, c), 209 | Err(_) => ("".to_owned(), "".to_owned(), U256::from_dec_str("0")?), 210 | }; 211 | } 212 | Standard::Eip721 => { 213 | multicall.add_call(name_fn, true).add_call(symbol_fn, true); 214 | // `await`ing on the `call` method lets us fetch the return values of both the above calls in one single RPC call 215 | (name, symbol) = match multicall.call().await { 216 | Ok((a, b)) => (a, b), 217 | Err(_) => ("".to_owned(), "".to_owned()), 218 | }; 219 | decimals = U256::from_dec_str("0")?; 220 | } 221 | Standard::Eip1155 => { 222 | multicall.add_call(name_fn, true); 223 | // `await`ing on the `call` method lets us fetch the return values of both the above calls in one single RPC call 224 | (name) = match multicall.call().await { 225 | Ok(a) => a, 226 | Err(_) => "".to_owned(), 227 | }; 228 | symbol = "".to_owned(); 229 | decimals = U256::from_dec_str("0")?; 230 | } 231 | Standard::None => { 232 | multicall 233 | .add_call(name_fn, true) 234 | .add_call(symbol_fn, true) 235 | .add_call(decimals_fn, true); 236 | // `await`ing on the `call` method lets us fetch the return values of both the above calls in one single RPC call 237 | (name, symbol, decimals) = match multicall.call().await { 238 | Ok((a, b, c)) => (a, b, c), 239 | Err(_) => ("".to_owned(), "".to_owned(), U256::from_dec_str("0")?), 240 | } 241 | } 242 | } 243 | Ok((name, symbol, decimals)) 244 | } 245 | -------------------------------------------------------------------------------- /src/simulator/trace_simulator.rs: -------------------------------------------------------------------------------- 1 | use ethers::{ 2 | core::types::TransactionRequest, 3 | providers::{Http, Middleware, Provider}, 4 | types::{ 5 | Address, BlockId, BlockNumber, Bytes, GethDebugTracingCallOptions, GethDebugTracingOptions, 6 | NameOrAddress, StructLog, H256, U256, U64, 7 | }, 8 | }; 9 | use eyre::Result; 10 | use std::process; 11 | 12 | use super::constants::PRECOMPILES; 13 | use super::process_logs::process_logs; 14 | use super::types::{BlockNumberType, MyLog, SimulationResults}; 15 | use super::utils::{u256_to_address, u64_array_to_u8_array /*, write_to_output_file */}; 16 | 17 | pub async fn simulate( 18 | tx: TransactionRequest, 19 | provider: &Provider, 20 | block: BlockNumberType, 21 | ) -> Result> { 22 | let block = match block { 23 | BlockNumberType::Past(num) => BlockId::Number(BlockNumber::Number(U64::from(num))), 24 | BlockNumberType::Latest => BlockId::Number(BlockNumber::Latest), 25 | }; 26 | let mut tracing_options = GethDebugTracingOptions::default(); 27 | tracing_options.enable_memory = Some(true); 28 | // tracing_options.tracer = Some(GethDebugTracerType::BuiltInTracer(GethDebugBuiltInTracerType::CallTracer)); 29 | // tracing_options.tracer_config = Some(GethDebugTracerConfig::BuiltInTracer( 30 | // GethDebugBuiltInTracerConfig::CallTracer(CallConfig { 31 | // with_log: Some(true), 32 | // only_top_call: Some(false), 33 | // }), 34 | // )); 35 | 36 | let to: Address = match tx.to.clone().unwrap() { 37 | NameOrAddress::Address(a) => a, 38 | NameOrAddress::Name(_) => { 39 | println!("name unsupported"); 40 | process::exit(1); 41 | } 42 | }; 43 | 44 | let tx_trace = provider 45 | .debug_trace_call( 46 | tx, 47 | Some(block), 48 | GethDebugTracingCallOptions { 49 | tracing_options, 50 | state_overrides: None, 51 | }, 52 | ) 53 | .await 54 | .unwrap_or_else(|e| { 55 | eprintln!("transaction reverted with err: {}", e); 56 | process::exit(1); 57 | }); 58 | 59 | // write_to_output_file(&tx_trace); 60 | 61 | let x = match tx_trace { 62 | ethers::types::GethTrace::Known(a) => match a { 63 | ethers::types::GethTraceFrame::Default(b) => b, 64 | _ => todo!(), 65 | }, 66 | _ => todo!(), 67 | }; 68 | 69 | let mut cached_call_stack: Vec
= vec![to]; 70 | let mut logs_call_stack: Vec> = Vec::new(); 71 | 72 | let struct_logs: Vec = x 73 | .struct_logs 74 | .into_iter() 75 | .filter(|s| { 76 | // update call stack 77 | match s.op.as_str() { 78 | "CALL" | "STATICCALL" => { 79 | let stack = s.stack.as_ref().unwrap(); 80 | let called_address = stack[stack.len() - 2]; 81 | 82 | if !PRECOMPILES.contains(&u64_array_to_u8_array(called_address.0)) { 83 | cached_call_stack.push(u256_to_address(called_address)); 84 | } 85 | 86 | false 87 | } 88 | "RETURN" | "REVERT" | "STOP" => { 89 | cached_call_stack.pop(); 90 | false 91 | } 92 | "LOG3" | "LOG4" => { 93 | logs_call_stack.push(cached_call_stack.clone()); 94 | true 95 | } 96 | _ => false, 97 | } 98 | }) 99 | .collect(); 100 | 101 | let struct_logs_and_their_call_stack = struct_logs.into_iter().zip(logs_call_stack); 102 | 103 | let mut logs: Vec = Vec::new(); 104 | for (struct_log, call_stack) in struct_logs_and_their_call_stack { 105 | let stack = struct_log.stack.unwrap(); 106 | let stack_length = stack.len(); 107 | 108 | let memory = struct_log.memory.unwrap(); 109 | 110 | // get data 111 | let data_word_index = (stack[stack_length - 1] / 32).as_usize(); 112 | let data_offset = (stack[stack_length - 1] % 32).as_usize(); 113 | 114 | let data_len = (stack[stack_length - 2]).as_usize(); 115 | 116 | let mut data: Vec = Vec::new(); 117 | 118 | let count = (data_len / 32) + 1; 119 | for i in 0..count { 120 | let to_push; 121 | 122 | if i == count - 1 { 123 | if data_offset == 0 { 124 | break; 125 | } 126 | let x = memory[data_word_index + i].as_str(); 127 | to_push = &x[0..data_offset]; 128 | } else { 129 | to_push = memory[data_word_index + i].as_str(); 130 | } 131 | 132 | let y = u64_array_to_u8_array(U256::from_str_radix(to_push, 16).expect("aaa").0); 133 | 134 | data.append(&mut y.to_vec()); 135 | } 136 | 137 | let data = Bytes::from(data); 138 | 139 | // get 3 topics 140 | let topics = vec![ 141 | H256::from(u64_array_to_u8_array(stack[stack_length - 3].0)), 142 | H256::from(u64_array_to_u8_array(stack[stack_length - 4].0)), 143 | H256::from(u64_array_to_u8_array(stack[stack_length - 5].0)), 144 | H256::from(u64_array_to_u8_array(stack[stack_length - 6].0)), // Only used if opcode == log4 145 | ]; 146 | 147 | let address: Address = call_stack[(struct_log.depth - 1) as usize]; 148 | 149 | logs.push(MyLog { 150 | address, 151 | topics, 152 | data, 153 | }); 154 | } 155 | 156 | let mut simulated_infos: Vec = Vec::new(); 157 | 158 | for log in logs.into_iter() { 159 | match process_logs(log, provider.clone()).await { 160 | Ok(Some(x)) => simulated_infos.push(x), 161 | Ok(None) => {} 162 | Err(err) => { 163 | eprintln!("Err {}", err); 164 | process::exit(1) 165 | } 166 | } 167 | } 168 | 169 | Ok(simulated_infos) 170 | } 171 | -------------------------------------------------------------------------------- /src/simulator/types.rs: -------------------------------------------------------------------------------- 1 | use ethers::{ 2 | types::{Address, Bytes, H256, U256}, 3 | utils::parse_ether, 4 | }; 5 | use eyre::Result; 6 | use std::process; 7 | 8 | #[derive(Debug)] 9 | pub struct MyLog { 10 | pub address: Address, 11 | pub topics: Vec, 12 | pub data: Bytes, 13 | } 14 | 15 | // Types 16 | #[derive(Debug, PartialEq)] 17 | pub enum Operation { 18 | Approval, 19 | Transfer, 20 | ApprovalForAll, 21 | TransferSingle, 22 | TransferBatch, 23 | } 24 | 25 | #[derive(Debug, PartialEq)] 26 | pub enum Standard { 27 | None, 28 | Eip20, 29 | Eip721, 30 | Eip1155, 31 | } 32 | 33 | #[derive(Debug, PartialEq)] 34 | pub struct TokenInfo { 35 | pub standard: Standard, 36 | pub address: Address, 37 | pub name: String, 38 | pub symbol: String, 39 | pub decimals: U256, 40 | } 41 | 42 | #[derive(Debug, PartialEq)] 43 | pub struct SimulationResults { 44 | pub operation: Operation, 45 | pub token_info: TokenInfo, 46 | pub from: Address, 47 | pub to: Address, 48 | pub id: Option, 49 | pub amount: U256, 50 | } 51 | 52 | #[derive(Debug)] 53 | pub enum BlockNumberType { 54 | Past(u64), 55 | Latest, 56 | } 57 | 58 | #[derive(Debug)] 59 | pub struct SimulationParams { 60 | pub from: Address, 61 | pub to: Address, 62 | pub data: Bytes, 63 | pub value: U256, 64 | pub block_number: BlockNumberType, 65 | pub rpc_url: Option, 66 | pub persist: bool, 67 | } 68 | 69 | impl SimulationParams { 70 | pub fn new(args: &Vec) -> Result { 71 | let from = args[0].parse::
(); 72 | let from = match from { 73 | Ok(f) => f, 74 | _ => return Err("invalid 'from' address provided"), 75 | }; 76 | 77 | let to = args[1].parse::
(); 78 | let to = match to { 79 | Ok(t) => t, 80 | _ => return Err("Invalid 'to' address provided"), 81 | }; 82 | 83 | let data; 84 | if args[3] == "" { 85 | data = "0x".parse::(); 86 | } else { 87 | data = args[2].parse::(); 88 | } 89 | let data = match data { 90 | Ok(d) => d, 91 | _ => return Err("Invalid 'input data' provided"), 92 | }; 93 | 94 | let value = parse_ether(args[3].as_str()); 95 | let value = match value { 96 | Ok(val) => val, 97 | _ => return Err("Invalid ether value provided"), 98 | }; 99 | 100 | let block_number = if args[4].len() == 0 { 101 | BlockNumberType::Latest 102 | } else { 103 | let block_number = args[4].parse::(); 104 | let block_number = match block_number { 105 | Ok(num) => BlockNumberType::Past(num), 106 | _ => return Err("Block number parsed in not a valid number. To use the current block number, parse in an empty string e.g '' or don't specify a block number at all"), 107 | }; 108 | block_number 109 | }; 110 | 111 | let rpc_url = if args[5].len() == 0 { 112 | None 113 | } else { 114 | Some(args[5].to_owned()) 115 | }; 116 | 117 | let persist = match args[6].len() { 118 | 0 => false, 119 | _ => args[6].parse::().unwrap_or_else(|_| { 120 | eprintln!("invalid boolean parameter for field 'persist'."); 121 | process::exit(1) 122 | }), 123 | }; 124 | 125 | Ok(SimulationParams { 126 | from, 127 | to, 128 | data, 129 | value, 130 | block_number, 131 | rpc_url, 132 | persist, 133 | }) 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /src/simulator/utils.rs: -------------------------------------------------------------------------------- 1 | use ethers::types::{Address, H256, U256}; 2 | 3 | pub fn u64_array_to_u8_array(input: [u64; 4]) -> [u8; 32] { 4 | let mut output = [0; 32]; 5 | 6 | for (i, &u64_value) in input.iter().enumerate() { 7 | let bytes = u64_value.swap_bytes().to_le_bytes(); 8 | 9 | let u = 3 - i; 10 | 11 | output[u * 8..(u + 1) * 8].copy_from_slice(&bytes); 12 | } 13 | 14 | output 15 | } 16 | 17 | pub fn u256_to_address(input: U256) -> Address { 18 | Address::from(H256::from(u64_array_to_u8_array(input.0))) 19 | } 20 | 21 | pub fn write_to_output_file(to_write: &T) { 22 | // Specify the file path you want to write to 23 | let file_path: &str = "output.txt"; 24 | 25 | // Open the file for writing (creates the file if it doesn't exist) 26 | let mut file = std::fs::File::create(file_path).expect("failed to create file"); 27 | 28 | let st = format!("{:?}", to_write); 29 | 30 | // Write the data to the file 31 | std::io::Write::write_all(&mut file, st.as_bytes()).expect("failed to write to created file"); 32 | } 33 | --------------------------------------------------------------------------------