From cb9830c2399ea42f310c39d4d35f3e2ce197ccab Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Wed, 15 May 2024 14:20:52 +0100 Subject: [PATCH 01/26] eth setup --- rust/.gitignore | 3 + rust/Cargo.lock | 4064 +++++++++++++++++++++++++ rust/Cargo.toml | 51 + rust/abis/FastHypERC20.json | 858 ++++++ rust/abis/FastHypERC20Collateral.json | 605 ++++ rust/abis/Mailbox.json | 446 +++ rust/abis/TestMultisigIsm.json | 103 + rust/abis/TestRecipient.json | 232 ++ rust/build.rs | 39 + rust/src/lib.rs | 1 + rust/tests/constants.rs | 7 + rust/tests/contracts/eth/bind/mod.rs | 10 + rust/tests/contracts/eth/deploy.rs | 36 + rust/tests/contracts/eth/mod.rs | 8 + rust/tests/contracts/eth/setup.rs | 39 + rust/tests/contracts/eth/types.rs | 12 + rust/tests/contracts/mod.rs | 1 + rust/tests/mailbox.rs | 2 + 18 files changed, 6517 insertions(+) create mode 100644 rust/.gitignore create mode 100644 rust/Cargo.lock create mode 100644 rust/Cargo.toml create mode 100644 rust/abis/FastHypERC20.json create mode 100644 rust/abis/FastHypERC20Collateral.json create mode 100644 rust/abis/Mailbox.json create mode 100644 rust/abis/TestMultisigIsm.json create mode 100644 rust/abis/TestRecipient.json create mode 100644 rust/build.rs create mode 100644 rust/src/lib.rs create mode 100644 rust/tests/constants.rs create mode 100644 rust/tests/contracts/eth/bind/mod.rs create mode 100644 rust/tests/contracts/eth/deploy.rs create mode 100644 rust/tests/contracts/eth/mod.rs create mode 100644 rust/tests/contracts/eth/setup.rs create mode 100644 rust/tests/contracts/eth/types.rs create mode 100644 rust/tests/contracts/mod.rs create mode 100644 rust/tests/mailbox.rs diff --git a/rust/.gitignore b/rust/.gitignore new file mode 100644 index 0000000..266a5cb --- /dev/null +++ b/rust/.gitignore @@ -0,0 +1,3 @@ +tests/contracts/eth/bind/*.rs +!tests/contracts/eth/bind/mod.rs +target/ \ No newline at end of file diff --git a/rust/Cargo.lock b/rust/Cargo.lock new file mode 100644 index 0000000..0c34d59 --- /dev/null +++ b/rust/Cargo.lock @@ -0,0 +1,4064 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" +dependencies = [ + "backtrace", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std", + "digest", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + +[[package]] +name = "async-trait" +version = "0.1.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version", +] + +[[package]] +name = "auto_impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bigdecimal" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", + "serde", +] + +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +dependencies = [ + "serde", +] + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + +[[package]] +name = "camino" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "cc" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" +dependencies = [ + "jobserver", + "libc", + "once_cell", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-targets 0.52.5", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest", + "hmac", + "k256", + "serde", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand", + "sha2", + "thiserror", +] + +[[package]] +name = "coins-core" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58", + "digest", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror", +] + +[[package]] +name = "const-hex" +version = "1.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" +dependencies = [ + "cfg-if", + "cpufeatures", + "hex", + "proptest", + "serde", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "darling" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.63", +] + +[[package]] +name = "darling_macro" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + +[[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature", + "spki", +] + +[[package]] +name = "either" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand", + "rlp", + "serde", + "sha3", + "zeroize", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes", + "ctr", + "digest", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror", + "uuid", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.63", + "toml", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.63", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand", + "rlp", + "serde", + "serde_json", + "strum", + "syn 2.0.63", + "tempfile", + "thiserror", + "tiny-keccak", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest", + "semver", + "serde", + "serde_json", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-tungstenite", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand", + "sha2", + "thiserror", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror", + "tiny-keccak", + "tokio", + "tracing", + "walkdir", + "yansi", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core", + "subtle", +] + +[[package]] +name = "fixed-hash" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +dependencies = [ + "byteorder", + "rand", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashers" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +dependencies = [ + "fxhash", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyperlane-starknet" +version = "0.0.2" +dependencies = [ + "anyhow", + "ethers", + "eyre", + "rstest", + "serde", + "serde_json", + "starknet", + "thiserror", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "once_cell", + "sha2", + "signature", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax", + "string_cache", + "term", + "tiny-keccak", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libredox" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +dependencies = [ + "bitflags 2.5.0", + "libc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "parity-scale-codec" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" +dependencies = [ + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "parking_lot" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.2.6", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand", +] + +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +dependencies = [ + "proc-macro2", + "syn 2.0.63", +] + +[[package]] +name = "primitive-types" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" +dependencies = [ + "fixed-hash", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "uint", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +dependencies = [ + "bitflags 2.5.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax", + "unarray", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "redox_users" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +dependencies = [ + "getrandom", + "libredox", + "thiserror", +] + +[[package]] +name = "regex" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" + +[[package]] +name = "relative-path" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest", +] + +[[package]] +name = "rlp" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" +dependencies = [ + "bytes", + "rlp-derive", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rstest" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" +dependencies = [ + "futures", + "futures-timer", + "rstest_macros", + "rustc_version", +] + +[[package]] +name = "rstest_macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d428f8247852f894ee1be110b375111b586d4fa431f6c46e64ba5a0dcccbe605" +dependencies = [ + "cfg-if", + "glob", + "proc-macro2", + "quote", + "regex", + "relative-path", + "rustc_version", + "syn 2.0.63", + "unicode-ident", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + +[[package]] +name = "serde" +version = "1.0.202" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.202" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "serde_json" +version = "1.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_json_pythonic" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62212da9872ca2a0cad0093191ee33753eddff9266cbbc1b4a602d13a3a768db" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "base64 0.13.1", + "chrono", + "hex", + "indexmap 1.9.3", + "serde", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest", + "keccak", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core", +] + +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror", + "time", +] + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror", + "unicode-xid", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "starknet" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20b9a7b7bfd87287af85854f7458b8170ba6aa59c39113436532b7ff3d2fcbd8" +dependencies = [ + "starknet-accounts", + "starknet-contract", + "starknet-core", + "starknet-crypto", + "starknet-ff", + "starknet-macros", + "starknet-providers", + "starknet-signers", +] + +[[package]] +name = "starknet-accounts" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2095d7584608ae1707bd1cf2889368ab3734d9f54e4fcef4765cba1f3b3f7618" +dependencies = [ + "async-trait", + "auto_impl", + "starknet-core", + "starknet-providers", + "starknet-signers", + "thiserror", +] + +[[package]] +name = "starknet-contract" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3b73d437b4d62241612d13fce612602de6684c149cccf696e76a20757e2156" +dependencies = [ + "serde", + "serde_json", + "serde_with", + "starknet-accounts", + "starknet-core", + "starknet-providers", + "thiserror", +] + +[[package]] +name = "starknet-core" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ed286d637e34fb8ae1cd2f9615120ec8ff38d1cffd311ed7fdd497cdd2bd01f" +dependencies = [ + "base64 0.21.7", + "flate2", + "hex", + "serde", + "serde_json", + "serde_json_pythonic", + "serde_with", + "sha3", + "starknet-crypto", + "starknet-ff", +] + +[[package]] +name = "starknet-crypto" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e2c30c01e8eb0fc913c4ee3cf676389fffc1d1182bfe5bb9670e4e72e968064" +dependencies = [ + "crypto-bigint", + "hex", + "hmac", + "num-bigint", + "num-integer", + "num-traits", + "rfc6979", + "sha2", + "starknet-crypto-codegen", + "starknet-curve", + "starknet-ff", + "zeroize", +] + +[[package]] +name = "starknet-crypto-codegen" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" +dependencies = [ + "starknet-curve", + "starknet-ff", + "syn 2.0.63", +] + +[[package]] +name = "starknet-curve" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c383518bb312751e4be80f53e8644034aa99a0afb29d7ac41b89a997db875b" +dependencies = [ + "starknet-ff", +] + +[[package]] +name = "starknet-ff" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abf1b44ec5b18d87c1ae5f54590ca9d0699ef4dd5b2ffa66fc97f24613ec585" +dependencies = [ + "ark-ff", + "bigdecimal", + "crypto-bigint", + "getrandom", + "hex", + "num-bigint", + "serde", +] + +[[package]] +name = "starknet-macros" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95d549d3078bdbe775d0deaa8ddb57a19942989ce7c1f2dfd60beeb322bb4945" +dependencies = [ + "starknet-core", + "syn 2.0.63", +] + +[[package]] +name = "starknet-providers" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6abf40ffcbe3b887b4d5cfc8ab73170c816b4aa78d1d4ad59abd3fb3b0f53cd" +dependencies = [ + "async-trait", + "auto_impl", + "ethereum-types", + "flate2", + "log", + "reqwest", + "serde", + "serde_json", + "serde_with", + "starknet-core", + "thiserror", + "url", +] + +[[package]] +name = "starknet-signers" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a2bd4fd66090003c3b7f0d76476e5b63cd44f6a49ede2442673f4427d5a40" +dependencies = [ + "async-trait", + "auto_impl", + "crypto-bigint", + "eth-keystore", + "rand", + "starknet-core", + "starknet-crypto", + "thiserror", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot", + "phf_shared 0.10.0", + "precomputed-hash", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.63", +] + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "svm-rs" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest", + "semver", + "serde", + "serde_json", + "sha2", + "thiserror", + "url", + "zip", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi", +] + +[[package]] +name = "thiserror" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.12", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.8", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand", + "rustls", + "sha1", + "thiserror", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom", + "serde", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.63", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper 0.6.0", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.10+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..2925352 --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,51 @@ +[package] +name = "hyperlane-starknet" +version = "0.0.2" +authors = [ + "byeongsu-hong ", + "Eric ", + "Steve ", +] +edition = "2021" +license = "Apache-2.0" +repository = "https://github.com/astraly-labs/hyperlane-starknet" +homepage = "https://www.hyperlane.xyz/" +documentation = "https://docs.hyperlane.xyz/" +keywords = ["hyperlane", "starknet", "cairo"] + +[profile.test] +opt-level = 2 +overflow-checks = true + +[profile.release] +codegen-units = 1 +debug = false +debug-assertions = false +incremental = false +lto = true +opt-level = 3 +overflow-checks = true +panic = "abort" +rpath = false + +[lib] +crate-type = ["cdylib", "rlib"] + +[dependencies] +starknet = "0.10.0" + +[dev_dependencies] +starknet = "0.10.0" +ethers = "2.0.7" +serde = { version = "1.0.162", default-features = false, features = ["derive"] } +serde_json = "1.0.96" + +# utilities +thiserror = { version = "1.0.37" } +anyhow = { version = "1.0.71", features = ["backtrace"] } +eyre = { version = "0.6.8" } + +rstest = "0.18.2" + +[build-dependencies] +ethers = "2.0.7" diff --git a/rust/abis/FastHypERC20.json b/rust/abis/FastHypERC20.json new file mode 100644 index 0000000..dceb8ad --- /dev/null +++ b/rust/abis/FastHypERC20.json @@ -0,0 +1,858 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "FastHypERC20", + "sourceName": "contracts/FastHypERC20.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint8", + "name": "__decimals", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "domain", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gas", + "type": "uint256" + } + ], + "name": "DestinationGasSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "interchainGasPaymaster", + "type": "address" + } + ], + "name": "InterchainGasPaymasterSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "InterchainSecurityModuleSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "mailbox", + "type": "address" + } + ], + "name": "MailboxSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "origin", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ReceivedTransferRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "domain", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "router", + "type": "bytes32" + } + ], + "name": "RemoteRouterEnrolled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "destination", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "SentTransferRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "destinationGas", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "domains", + "outputs": [ + { + "internalType": "uint32[]", + "name": "", + "type": "uint32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_domain", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_router", + "type": "bytes32" + } + ], + "name": "enrollRemoteRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "_domains", + "type": "uint32[]" + }, + { + "internalType": "bytes32[]", + "name": "_addresses", + "type": "bytes32[]" + } + ], + "name": "enrollRemoteRouters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fastTransferId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_destination", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_recipient", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amountOrId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_fastFee", + "type": "uint256" + } + ], + "name": "fastTransferRemote", + "outputs": [ + { + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_fastFee", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_origin", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_fastTransferId", + "type": "uint256" + } + ], + "name": "fillFastTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_origin", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_sender", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "handle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_mailbox", + "type": "address" + }, + { + "internalType": "address", + "name": "_interchainGasPaymaster", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_totalSupply", + "type": "uint256" + }, + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "interchainGasPaymaster", + "outputs": [ + { + "internalType": "contract IInterchainGasPaymaster", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "interchainSecurityModule", + "outputs": [ + { + "internalType": "contract IInterchainSecurityModule", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mailbox", + "outputs": [ + { + "internalType": "contract IMailbox", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_destinationDomain", + "type": "uint32" + } + ], + "name": "quoteGasPayment", + "outputs": [ + { + "internalType": "uint256", + "name": "_gasPayment", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_domain", + "type": "uint32" + } + ], + "name": "routers", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "domain", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + } + ], + "internalType": "struct GasRouter.GasRouterConfig[]", + "name": "gasConfigs", + "type": "tuple[]" + } + ], + "name": "setDestinationGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_interchainGasPaymaster", + "type": "address" + } + ], + "name": "setInterchainGasPaymaster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_module", + "type": "address" + } + ], + "name": "setInterchainSecurityModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_mailbox", + "type": "address" + } + ], + "name": "setMailbox", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_destination", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_recipient", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amountOrId", + "type": "uint256" + } + ], + "name": "transferRemote", + "outputs": [ + { + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + } + ], + "bytecode": "0x60a06040523480156200001157600080fd5b5060405162004ae238038062004ae2833981810160405281019062000037919062000091565b808060ff1660808160ff16815250505050620000c3565b600080fd5b600060ff82169050919050565b6200006b8162000053565b81146200007757600080fd5b50565b6000815190506200008b8162000060565b92915050565b600060208284031215620000aa57620000a96200004e565b5b6000620000ba848285016200007a565b91505092915050565b608051614a03620000df6000396000610a7c0152614a036000f3fe6080604052600436106101ee5760003560e01c80638da5cb5b1161010d578063d5438eae116100a0578063f1bd6f0a1161006f578063f1bd6f0a1461072c578063f2ed8c5314610755578063f2fde38b14610792578063f3c61d6b146107bb578063f5f09f2e146107e4576101ee565b8063d5438eae14610670578063dd62ed3e1461069b578063de523cf3146106d8578063e9198bf914610703576101ee565b8063a478333b116100dc578063a478333b146105b6578063a9059cbb146105e1578063b1bd64361461061e578063b49c53a714610647576101ee565b80638da5cb5b146104fa57806395d89b41146105255780639ab8367e14610550578063a457c2d714610579576101ee565b8063395093511161018557806370a082311161015457806370a0823114610439578063715018a614610476578063775313a11461048d57806381b4e8b4146104ca576101ee565b8063395093511461037d57806339bb4ad9146103ba578063440df4f4146103e557806356d5d47514610410576101ee565b80631b177491116101c15780631b177491146102af57806323b872dd146102d85780632ead72f614610315578063313ce56714610352576101ee565b806306fdde03146101f3578063095ea7b31461021e5780630e72cc061461025b57806318160ddd14610284575b600080fd5b3480156101ff57600080fd5b50610208610814565b6040516102159190612cb1565b60405180910390f35b34801561022a57600080fd5b5061024560048036038101906102409190612d7b565b6108a6565b6040516102529190612dd6565b60405180910390f35b34801561026757600080fd5b50610282600480360381019061027d9190612df1565b6108c9565b005b34801561029057600080fd5b506102996108dd565b6040516102a69190612e2d565b60405180910390f35b3480156102bb57600080fd5b506102d660048036038101906102d19190612e84565b6108e7565b005b3480156102e457600080fd5b506102ff60048036038101906102fa9190612eff565b610a20565b60405161030c9190612dd6565b60405180910390f35b34801561032157600080fd5b5061033c60048036038101906103379190612f52565b610a4f565b6040516103499190612f98565b60405180910390f35b34801561035e57600080fd5b50610367610a78565b6040516103749190612fcf565b60405180910390f35b34801561038957600080fd5b506103a4600480360381019061039f9190612d7b565b610aa0565b6040516103b19190612dd6565b60405180910390f35b3480156103c657600080fd5b506103cf610ad7565b6040516103dc9190613049565b60405180910390f35b3480156103f157600080fd5b506103fa610afd565b6040516104079190613122565b60405180910390f35b34801561041c57600080fd5b50610437600480360381019061043291906131d5565b610b0e565b005b34801561044557600080fd5b50610460600480360381019061045b9190612df1565b610c19565b60405161046d9190612e2d565b60405180910390f35b34801561048257600080fd5b5061048b610c62565b005b34801561049957600080fd5b506104b460048036038101906104af9190612f52565b610c76565b6040516104c19190612e2d565b60405180910390f35b6104e460048036038101906104df9190613249565b610c8e565b6040516104f19190612f98565b60405180910390f35b34801561050657600080fd5b5061050f610ca5565b60405161051c91906132ab565b60405180910390f35b34801561053157600080fd5b5061053a610ccf565b6040516105479190612cb1565b60405180910390f35b34801561055c57600080fd5b50610577600480360381019061057291906133f6565b610d61565b005b34801561058557600080fd5b506105a0600480360381019061059b9190612d7b565b610eba565b6040516105ad9190612dd6565b60405180910390f35b3480156105c257600080fd5b506105cb610f31565b6040516105d89190612e2d565b60405180910390f35b3480156105ed57600080fd5b5061060860048036038101906106039190612d7b565b610f37565b6040516106159190612dd6565b60405180910390f35b34801561062a57600080fd5b50610645600480360381019061064091906134ff565b610f5a565b005b34801561065357600080fd5b5061066e6004803603810190610669919061354c565b610fd9565b005b34801561067c57600080fd5b50610685610fef565b60405161069291906135ad565b60405180910390f35b3480156106a757600080fd5b506106c260048036038101906106bd91906135c8565b611015565b6040516106cf9190612e2d565b60405180910390f35b3480156106e457600080fd5b506106ed61109c565b6040516106fa9190613629565b60405180910390f35b34801561070f57600080fd5b5061072a600480360381019061072591906136f0565b6110c2565b005b34801561073857600080fd5b50610753600480360381019061074e9190612df1565b61118b565b005b34801561076157600080fd5b5061077c60048036038101906107779190612f52565b61119f565b6040516107899190612e2d565b60405180910390f35b34801561079e57600080fd5b506107b960048036038101906107b49190612df1565b611265565b005b3480156107c757600080fd5b506107e260048036038101906107dd9190612df1565b6112e8565b005b6107fe60048036038101906107f99190613771565b6112fc565b60405161080b9190612f98565b60405180910390f35b60606036805461082390613807565b80601f016020809104026020016040519081016040528092919081815260200182805461084f90613807565b801561089c5780601f106108715761010080835404028352916020019161089c565b820191906000526020600020905b81548152906001019060200180831161087f57829003601f168201915b5050505050905090565b6000806108b1611393565b90506108be81858561139b565b600191505092915050565b6108d1611564565b6108da816115e2565b50565b6000603554905090565b60006108f6838387878a6116e8565b9050600073ffffffffffffffffffffffffffffffffffffffff16610100600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461099b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099290613884565b60405180910390fd5b33610100600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610a033385876109fe91906138d3565b611724565b610a18868587610a1391906138d3565b611732565b505050505050565b600080610a2b611393565b9050610a38858285611740565b610a438585856117cc565b60019150509392505050565b600080610a6c8363ffffffff1660ca611a4590919063ffffffff16565b91505080915050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b600080610aab611393565b9050610acc818585610abd8589611015565b610ac79190613907565b61139b565b600191505092915050565b609860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060610b0960ca611a6c565b905090565b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9590613987565b60405180910390fd5b8383610baa8282611b35565b60405180608001604052806043815260200161498b6043913990610c04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfb9190612cb1565b60405180910390fd5b50610c1186868686611b4a565b505050505050565b6000603360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610c6a611564565b610c746000611b5c565b565b60fe6020528060005260406000206000915090505481565b6000610c9c84848434611c22565b90509392505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060378054610cde90613807565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0a90613807565b8015610d575780601f10610d2c57610100808354040283529160200191610d57565b820191906000526020600020905b815481529060010190602001808311610d3a57829003601f168201915b5050505050905090565b60008060019054906101000a900460ff16159050808015610d925750600160008054906101000a900460ff1660ff16105b80610dbf5750610da130611c90565b158015610dbe5750600160008054906101000a900460ff1660ff16145b5b610dfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df590613a19565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610e3b576001600060016101000a81548160ff0219169083151502179055505b610e458686611cb3565b610e4f8383611d18565b610e593385611d75565b8015610eb25760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610ea99190613a74565b60405180910390a15b505050505050565b600080610ec5611393565b90506000610ed38286611015565b905083811015610f18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0f90613b01565b60405180910390fd5b610f25828686840361139b565b60019250505092915050565b60ff5481565b600080610f42611393565b9050610f4f8185856117cc565b600191505092915050565b610f62611564565b60005b82829050811015610fd457610fc0838383818110610f8657610f85613b21565b5b9050604002016000016020810190610f9e9190612f52565b848484818110610fb157610fb0613b21565b5b90506040020160200135611ecc565b600181610fcd9190613907565b9050610f65565b505050565b610fe1611564565b610feb8282611f32565b5050565b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000603460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b609960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6110ca611564565b818190508484905014611112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110990613b9c565b60405180910390fd5b600084849050905060005b818110156111835761116f86868381811061113b5761113a613b21565b5b90506020020160208101906111509190612f52565b85858481811061116357611162613b21565b5b90506020020135611f32565b60018161117c9190613907565b905061111d565b505050505050565b611193611564565b61119c81611f90565b50565b6000609860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a69297938360fe60008663ffffffff1663ffffffff168152602001908152602001600020546040518363ffffffff1660e01b815260040161121d929190613bcb565b602060405180830381865afa15801561123a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125e9190613c09565b9050919050565b61126d611564565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036112dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d390613ca8565b60405180910390fd5b6112e581611b5c565b50565b6112f0611564565b6112f981612061565b50565b60008060ff5490506001816113119190613907565b60ff819055506000611330858560018561132b9190613907565b612132565b905061134887611341888885612169565b3433612198565b9250858763ffffffff167fd229aacb94204188fe8042965fa6b269c62dc5818b21238779ab64bdd17efeec876040516113819190612e2d565b60405180910390a35050949350505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190613d3a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147090613dcc565b60405180910390fd5b80603460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115579190612e2d565b60405180910390a3505050565b61156c611393565b73ffffffffffffffffffffffffffffffffffffffff1661158a610ca5565b73ffffffffffffffffffffffffffffffffffffffff16146115e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d790613e38565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806116225750611621816121d0565b5b611661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165890613ea4565b60405180910390fd5b80609960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167ffec811ed4e60aebdaf7a79cad8a97196bf56e35362f039705598226d30c9d24860405160405180910390a250565b60008585858585604051602001611703959493929190613f63565b60405160208183030381529060405280519060200120905095945050505050565b61172e82826121f3565b5050565b61173c8282611d75565b5050565b600061174c8484611015565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117c657818110156117b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117af9061400e565b60405180910390fd5b6117c5848484840361139b565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361183b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611832906140a0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036118aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118a190614132565b60405180910390fd5b6118b58383836123c2565b6000603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561193c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611933906141c4565b60405180910390fd5b818103603360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611a2c9190612e2d565b60405180910390a3611a3f8484846123c7565b50505050565b600080611a618360001b856000016123cc90919063ffffffff16565b915091509250929050565b60606000611a798361241b565b9050805167ffffffffffffffff811115611a9657611a956132cb565b5b604051908082528060200260200182016040528015611ac45781602001602082028036833780820191505090505b50915060005b8151811015611b2e57818181518110611ae657611ae5613b21565b5b6020026020010151838281518110611b0157611b00613b21565b5b602002602001019063ffffffff16908163ffffffff16815250508080611b26906141e4565b915050611aca565b5050919050565b600081611b4184610a4f565b14905092915050565b611b56848484846124d8565b50505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080611c2e84612563565b9050611c4686611c3f878785612169565b8533612198565b9150848663ffffffff167fd229aacb94204188fe8042965fa6b269c62dc5818b21238779ab64bdd17efeec86604051611c7f9190612e2d565b60405180910390a350949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611d02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cf99061429e565b60405180910390fd5b611d0b81611f90565b611d1482612586565b5050565b600060019054906101000a900460ff16611d67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5e9061429e565b60405180910390fd5b611d7182826125e9565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611de4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ddb9061430a565b60405180910390fd5b611df0600083836123c2565b8060356000828254611e029190613907565b9250508190555080603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611eb49190612e2d565b60405180910390a3611ec8600083836123c7565b5050565b8060fe60008463ffffffff1663ffffffff168152602001908152602001600020819055508163ffffffff167f90563f253ecb04527a6a7ae1a8cbe2bdc6caefb39d5f7b06a973cf5e7f8035a482604051611f269190612e2d565b60405180910390a25050565b611f4e8263ffffffff168260ca61265c9092919063ffffffff16565b8163ffffffff167f97fd51fef1f80c854cbd0150c248e8b2ac4ecdc97cc05e742b5f61c9f4dc645882604051611f849190612f98565b60405180910390a25050565b80611f9a816121d0565b611fd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd090613ea4565b60405180910390fd5b81609860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fb87f5a0bface22cde699143559fb99f990ae54eea236995fc54178af91af859f60405160405180910390a25050565b8061206b816121d0565b6120aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a190613ea4565b60405180910390fd5b81609760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167f7a61e573722ff8b205c8962b59d37e7d30573f368965597a844a94872204ebd760405160405180910390a25050565b606061213e3385611724565b828260405160200161215192919061432a565b60405160208183030381529060405290509392505050565b6060838383604051602001612180939291906143bb565b60405160208183030381529060405290509392505050565b60006121c6858560fe60008963ffffffff1663ffffffff16815260200190815260200160002054868661267d565b9050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612262576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225990614466565b60405180910390fd5b61226e826000836123c2565b6000603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156122f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ec906144f8565b60405180910390fd5b818103603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081603560008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516123a99190612e2d565b60405180910390a36123bd836000846123c7565b505050565b505050565b505050565b60008060008460020160008581526020019081526020016000205490506000801b810361240b576123fd8585612728565b6000801b9250925050612414565b60018192509250505b9250929050565b6060600061242b83600001612748565b90508067ffffffffffffffff811115612447576124466132cb565b5b6040519080825280602002602001820160405280156124755781602001602082028036833780820191505090505b50915060005b818110156124d15761249c818560000160000161275d90919063ffffffff16565b60001c8382815181106124b2576124b1613b21565b5b60200260200101818152505080806124c9906141e4565b91505061247b565b5050919050565b60006124e48383612774565b905060006124f2848461279d565b905036600061250186866127c9565b9150915061251a612511856127ea565b848a85856127f7565b838863ffffffff167fba20947a325f450d232530e5f5fce293e7963499d5309a07cee84a269f2f15a6856040516125519190612e2d565b60405180910390a35050505050505050565b606061256f33836121f3565b604051806020016040528060008152509050919050565b600060019054906101000a900460ff166125d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125cc9061429e565b60405180910390fd5b6125de81612061565b6125e661281a565b50565b600060019054906101000a900460ff16612638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161262f9061429e565b60405180910390fd5b816036908161264791906146ba565b50806037908161265791906146ba565b505050565b6126778260001b82856000016128739092919063ffffffff16565b50505050565b600061268986866128ae565b9050609860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166311bf2c1884838988876040518663ffffffff1660e01b81526004016126ed949392919061478c565b6000604051808303818588803b15801561270657600080fd5b505af115801561271a573d6000803e3d6000fd5b505050505095945050505050565b6000612740828460000161296790919063ffffffff16565b905092915050565b60006127568260000161297e565b9050919050565b600061276c8360000183612993565b905092915050565b6000828260009060209261278a939291906147db565b906127959190614821565b905092915050565b600082826020906040926127b3939291906147db565b906127be9190614821565b60001c905092915050565b366000838360409080926127df939291906147db565b915091509250929050565b60008160001c9050919050565b600061280686868686866129be565b90506128128186611732565b505050505050565b600060019054906101000a900460ff16612869576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128609061429e565b60405180910390fd5b612871612a7c565b565b600081846002016000858152602001908152602001600020819055506128a58385600001612add90919063ffffffff16565b90509392505050565b6000806128ba84612af4565b9050609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa31de018583866040518463ffffffff1660e01b815260040161291b939291906148ca565b6020604051808303816000875af115801561293a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295e919061491d565b91505092915050565b60006129768360000183612b7d565b905092915050565b600061298c82600001612ba0565b9050919050565b60008260000182815481106129ab576129aa613b21565b5b9060005260206000200154905092915050565b60008083839050036129d257859050612a73565b60008084848101906129e4919061494a565b91509150600061010060006129fc89858c888f6116e8565b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612a6c57809350505050612a73565b8893505050505b95945050505050565b600060019054906101000a900460ff16612acb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ac29061429e565b60405180910390fd5b612adb612ad6611393565b611b5c565b565b6000612aec8360000183612bb1565b905092915050565b6000806000612b138463ffffffff1660ca611a4590919063ffffffff16565b915091508160405180608001604052806043815260200161498b6043913990612b72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b699190612cb1565b60405180910390fd5b508092505050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b6000612bbd8383612b7d565b612c16578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612c1b565b600090505b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612c5b578082015181840152602081019050612c40565b60008484015250505050565b6000601f19601f8301169050919050565b6000612c8382612c21565b612c8d8185612c2c565b9350612c9d818560208601612c3d565b612ca681612c67565b840191505092915050565b60006020820190508181036000830152612ccb8184612c78565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d1282612ce7565b9050919050565b612d2281612d07565b8114612d2d57600080fd5b50565b600081359050612d3f81612d19565b92915050565b6000819050919050565b612d5881612d45565b8114612d6357600080fd5b50565b600081359050612d7581612d4f565b92915050565b60008060408385031215612d9257612d91612cdd565b5b6000612da085828601612d30565b9250506020612db185828601612d66565b9150509250929050565b60008115159050919050565b612dd081612dbb565b82525050565b6000602082019050612deb6000830184612dc7565b92915050565b600060208284031215612e0757612e06612cdd565b5b6000612e1584828501612d30565b91505092915050565b612e2781612d45565b82525050565b6000602082019050612e426000830184612e1e565b92915050565b600063ffffffff82169050919050565b612e6181612e48565b8114612e6c57600080fd5b50565b600081359050612e7e81612e58565b92915050565b600080600080600060a08688031215612ea057612e9f612cdd565b5b6000612eae88828901612d30565b9550506020612ebf88828901612d66565b9450506040612ed088828901612d66565b9350506060612ee188828901612e6f565b9250506080612ef288828901612d66565b9150509295509295909350565b600080600060608486031215612f1857612f17612cdd565b5b6000612f2686828701612d30565b9350506020612f3786828701612d30565b9250506040612f4886828701612d66565b9150509250925092565b600060208284031215612f6857612f67612cdd565b5b6000612f7684828501612e6f565b91505092915050565b6000819050919050565b612f9281612f7f565b82525050565b6000602082019050612fad6000830184612f89565b92915050565b600060ff82169050919050565b612fc981612fb3565b82525050565b6000602082019050612fe46000830184612fc0565b92915050565b6000819050919050565b600061300f61300a61300584612ce7565b612fea565b612ce7565b9050919050565b600061302182612ff4565b9050919050565b600061303382613016565b9050919050565b61304381613028565b82525050565b600060208201905061305e600083018461303a565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61309981612e48565b82525050565b60006130ab8383613090565b60208301905092915050565b6000602082019050919050565b60006130cf82613064565b6130d9818561306f565b93506130e483613080565b8060005b838110156131155781516130fc888261309f565b9750613107836130b7565b9250506001810190506130e8565b5085935050505092915050565b6000602082019050818103600083015261313c81846130c4565b905092915050565b61314d81612f7f565b811461315857600080fd5b50565b60008135905061316a81613144565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261319557613194613170565b5b8235905067ffffffffffffffff8111156131b2576131b1613175565b5b6020830191508360018202830111156131ce576131cd61317a565b5b9250929050565b600080600080606085870312156131ef576131ee612cdd565b5b60006131fd87828801612e6f565b945050602061320e8782880161315b565b935050604085013567ffffffffffffffff81111561322f5761322e612ce2565b5b61323b8782880161317f565b925092505092959194509250565b60008060006060848603121561326257613261612cdd565b5b600061327086828701612e6f565b93505060206132818682870161315b565b925050604061329286828701612d66565b9150509250925092565b6132a581612d07565b82525050565b60006020820190506132c0600083018461329c565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61330382612c67565b810181811067ffffffffffffffff82111715613322576133216132cb565b5b80604052505050565b6000613335612cd3565b905061334182826132fa565b919050565b600067ffffffffffffffff821115613361576133606132cb565b5b61336a82612c67565b9050602081019050919050565b82818337600083830152505050565b600061339961339484613346565b61332b565b9050828152602081018484840111156133b5576133b46132c6565b5b6133c0848285613377565b509392505050565b600082601f8301126133dd576133dc613170565b5b81356133ed848260208601613386565b91505092915050565b600080600080600060a0868803121561341257613411612cdd565b5b600061342088828901612d30565b955050602061343188828901612d30565b945050604061344288828901612d66565b935050606086013567ffffffffffffffff81111561346357613462612ce2565b5b61346f888289016133c8565b925050608086013567ffffffffffffffff8111156134905761348f612ce2565b5b61349c888289016133c8565b9150509295509295909350565b60008083601f8401126134bf576134be613170565b5b8235905067ffffffffffffffff8111156134dc576134db613175565b5b6020830191508360408202830111156134f8576134f761317a565b5b9250929050565b6000806020838503121561351657613515612cdd565b5b600083013567ffffffffffffffff81111561353457613533612ce2565b5b613540858286016134a9565b92509250509250929050565b6000806040838503121561356357613562612cdd565b5b600061357185828601612e6f565b92505060206135828582860161315b565b9150509250929050565b600061359782613016565b9050919050565b6135a78161358c565b82525050565b60006020820190506135c2600083018461359e565b92915050565b600080604083850312156135df576135de612cdd565b5b60006135ed85828601612d30565b92505060206135fe85828601612d30565b9150509250929050565b600061361382613016565b9050919050565b61362381613608565b82525050565b600060208201905061363e600083018461361a565b92915050565b60008083601f84011261365a57613659613170565b5b8235905067ffffffffffffffff81111561367757613676613175565b5b6020830191508360208202830111156136935761369261317a565b5b9250929050565b60008083601f8401126136b0576136af613170565b5b8235905067ffffffffffffffff8111156136cd576136cc613175565b5b6020830191508360208202830111156136e9576136e861317a565b5b9250929050565b6000806000806040858703121561370a57613709612cdd565b5b600085013567ffffffffffffffff81111561372857613727612ce2565b5b61373487828801613644565b9450945050602085013567ffffffffffffffff81111561375757613756612ce2565b5b6137638782880161369a565b925092505092959194509250565b6000806000806080858703121561378b5761378a612cdd565b5b600061379987828801612e6f565b94505060206137aa8782880161315b565b93505060406137bb87828801612d66565b92505060606137cc87828801612d66565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061381f57607f821691505b602082108103613832576138316137d8565b5b50919050565b7f7265717565737420616c72656164792066696c6c656400000000000000000000600082015250565b600061386e601683612c2c565b915061387982613838565b602082019050919050565b6000602082019050818103600083015261389d81613861565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006138de82612d45565b91506138e983612d45565b9250828203905081811115613901576139006138a4565b5b92915050565b600061391282612d45565b915061391d83612d45565b9250828201905080821115613935576139346138a4565b5b92915050565b7f216d61696c626f78000000000000000000000000000000000000000000000000600082015250565b6000613971600883612c2c565b915061397c8261393b565b602082019050919050565b600060208201905081810360008301526139a081613964565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000613a03602e83612c2c565b9150613a0e826139a7565b604082019050919050565b60006020820190508181036000830152613a32816139f6565b9050919050565b6000819050919050565b6000613a5e613a59613a5484613a39565b612fea565b612fb3565b9050919050565b613a6e81613a43565b82525050565b6000602082019050613a896000830184613a65565b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000613aeb602583612c2c565b9150613af682613a8f565b604082019050919050565b60006020820190508181036000830152613b1a81613ade565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f216c656e67746800000000000000000000000000000000000000000000000000600082015250565b6000613b86600783612c2c565b9150613b9182613b50565b602082019050919050565b60006020820190508181036000830152613bb581613b79565b9050919050565b613bc581612e48565b82525050565b6000604082019050613be06000830185613bbc565b613bed6020830184612e1e565b9392505050565b600081519050613c0381612d4f565b92915050565b600060208284031215613c1f57613c1e612cdd565b5b6000613c2d84828501613bf4565b91505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613c92602683612c2c565b9150613c9d82613c36565b604082019050919050565b60006020820190508181036000830152613cc181613c85565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613d24602483612c2c565b9150613d2f82613cc8565b604082019050919050565b60006020820190508181036000830152613d5381613d17565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613db6602283612c2c565b9150613dc182613d5a565b604082019050919050565b60006020820190508181036000830152613de581613da9565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613e22602083612c2c565b9150613e2d82613dec565b602082019050919050565b60006020820190508181036000830152613e5181613e15565b9050919050565b7f21636f6e74726163740000000000000000000000000000000000000000000000600082015250565b6000613e8e600983612c2c565b9150613e9982613e58565b602082019050919050565b60006020820190508181036000830152613ebd81613e81565b9050919050565b60008160e01b9050919050565b6000613edc82613ec4565b9050919050565b613ef4613eef82612e48565b613ed1565b82525050565b6000819050919050565b613f15613f1082612d45565b613efa565b82525050565b60008160601b9050919050565b6000613f3382613f1b565b9050919050565b6000613f4582613f28565b9050919050565b613f5d613f5882612d07565b613f3a565b82525050565b6000613f6f8288613ee3565b600482019150613f7f8287613f04565b602082019150613f8f8286613f04565b602082019150613f9f8285613f04565b602082019150613faf8284613f4c565b6014820191508190509695505050505050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000613ff8601d83612c2c565b915061400382613fc2565b602082019050919050565b6000602082019050818103600083015261402781613feb565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061408a602583612c2c565b91506140958261402e565b604082019050919050565b600060208201905081810360008301526140b98161407d565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061411c602383612c2c565b9150614127826140c0565b604082019050919050565b6000602082019050818103600083015261414b8161410f565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006141ae602683612c2c565b91506141b982614152565b604082019050919050565b600060208201905081810360008301526141dd816141a1565b9050919050565b60006141ef82612d45565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614221576142206138a4565b5b600182019050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000614288602b83612c2c565b91506142938261422c565b604082019050919050565b600060208201905081810360008301526142b78161427b565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b60006142f4601f83612c2c565b91506142ff826142be565b602082019050919050565b60006020820190508181036000830152614323816142e7565b9050919050565b600060408201905061433f6000830185612e1e565b61434c6020830184612e1e565b9392505050565b6000819050919050565b61436e61436982612f7f565b614353565b82525050565b600081519050919050565b600081905092915050565b600061439582614374565b61439f818561437f565b93506143af818560208601612c3d565b80840191505092915050565b60006143c7828661435d565b6020820191506143d78285613f04565b6020820191506143e7828461438a565b9150819050949350505050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614450602183612c2c565b915061445b826143f4565b604082019050919050565b6000602082019050818103600083015261447f81614443565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006144e2602283612c2c565b91506144ed82614486565b604082019050919050565b60006020820190508181036000830152614511816144d5565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261457a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261453d565b614584868361453d565b95508019841693508086168417925050509392505050565b60006145b76145b26145ad84612d45565b612fea565b612d45565b9050919050565b6000819050919050565b6145d18361459c565b6145e56145dd826145be565b84845461454a565b825550505050565b600090565b6145fa6145ed565b6146058184846145c8565b505050565b5b818110156146295761461e6000826145f2565b60018101905061460b565b5050565b601f82111561466e5761463f81614518565b6146488461452d565b81016020851015614657578190505b61466b6146638561452d565b83018261460a565b50505b505050565b600082821c905092915050565b600061469160001984600802614673565b1980831691505092915050565b60006146aa8383614680565b9150826002028217905092915050565b6146c382612c21565b67ffffffffffffffff8111156146dc576146db6132cb565b5b6146e68254613807565b6146f182828561462d565b600060209050601f8311600181146147245760008415614712578287015190505b61471c858261469e565b865550614784565b601f19841661473286614518565b60005b8281101561475a57848901518255600182019150602085019450602081019050614735565b868310156147775784890151614773601f891682614680565b8355505b6001600288020188555050505b505050505050565b60006080820190506147a16000830187612f89565b6147ae6020830186613bbc565b6147bb6040830185612e1e565b6147c8606083018461329c565b95945050505050565b600080fd5b600080fd5b600080858511156147ef576147ee6147d1565b5b83861115614800576147ff6147d6565b5b6001850283019150848603905094509492505050565b600082905092915050565b600061482d8383614816565b826148388135612f7f565b92506020821015614878576148737fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8360200360080261453d565b831692505b505092915050565b600082825260208201905092915050565b600061489c82614374565b6148a68185614880565b93506148b6818560208601612c3d565b6148bf81612c67565b840191505092915050565b60006060820190506148df6000830186613bbc565b6148ec6020830185612f89565b81810360408301526148fe8184614891565b9050949350505050565b60008151905061491781613144565b92915050565b60006020828403121561493357614932612cdd565b5b600061494184828501614908565b91505092915050565b6000806040838503121561496157614960612cdd565b5b600061496f85828601612d66565b925050602061498085828601612d66565b915050925092905056fe4e6f20726f7574657220656e726f6c6c656420666f7220646f6d61696e2e2044696420796f7520737065636966792074686520726967687420646f6d61696e2049443fa2646970667358221220c14552771ae4c287924c40d77542afb6211048c2150985141d46033b488eefb664736f6c63430008100033", + "deployedBytecode": "0x6080604052600436106101ee5760003560e01c80638da5cb5b1161010d578063d5438eae116100a0578063f1bd6f0a1161006f578063f1bd6f0a1461072c578063f2ed8c5314610755578063f2fde38b14610792578063f3c61d6b146107bb578063f5f09f2e146107e4576101ee565b8063d5438eae14610670578063dd62ed3e1461069b578063de523cf3146106d8578063e9198bf914610703576101ee565b8063a478333b116100dc578063a478333b146105b6578063a9059cbb146105e1578063b1bd64361461061e578063b49c53a714610647576101ee565b80638da5cb5b146104fa57806395d89b41146105255780639ab8367e14610550578063a457c2d714610579576101ee565b8063395093511161018557806370a082311161015457806370a0823114610439578063715018a614610476578063775313a11461048d57806381b4e8b4146104ca576101ee565b8063395093511461037d57806339bb4ad9146103ba578063440df4f4146103e557806356d5d47514610410576101ee565b80631b177491116101c15780631b177491146102af57806323b872dd146102d85780632ead72f614610315578063313ce56714610352576101ee565b806306fdde03146101f3578063095ea7b31461021e5780630e72cc061461025b57806318160ddd14610284575b600080fd5b3480156101ff57600080fd5b50610208610814565b6040516102159190612cb1565b60405180910390f35b34801561022a57600080fd5b5061024560048036038101906102409190612d7b565b6108a6565b6040516102529190612dd6565b60405180910390f35b34801561026757600080fd5b50610282600480360381019061027d9190612df1565b6108c9565b005b34801561029057600080fd5b506102996108dd565b6040516102a69190612e2d565b60405180910390f35b3480156102bb57600080fd5b506102d660048036038101906102d19190612e84565b6108e7565b005b3480156102e457600080fd5b506102ff60048036038101906102fa9190612eff565b610a20565b60405161030c9190612dd6565b60405180910390f35b34801561032157600080fd5b5061033c60048036038101906103379190612f52565b610a4f565b6040516103499190612f98565b60405180910390f35b34801561035e57600080fd5b50610367610a78565b6040516103749190612fcf565b60405180910390f35b34801561038957600080fd5b506103a4600480360381019061039f9190612d7b565b610aa0565b6040516103b19190612dd6565b60405180910390f35b3480156103c657600080fd5b506103cf610ad7565b6040516103dc9190613049565b60405180910390f35b3480156103f157600080fd5b506103fa610afd565b6040516104079190613122565b60405180910390f35b34801561041c57600080fd5b50610437600480360381019061043291906131d5565b610b0e565b005b34801561044557600080fd5b50610460600480360381019061045b9190612df1565b610c19565b60405161046d9190612e2d565b60405180910390f35b34801561048257600080fd5b5061048b610c62565b005b34801561049957600080fd5b506104b460048036038101906104af9190612f52565b610c76565b6040516104c19190612e2d565b60405180910390f35b6104e460048036038101906104df9190613249565b610c8e565b6040516104f19190612f98565b60405180910390f35b34801561050657600080fd5b5061050f610ca5565b60405161051c91906132ab565b60405180910390f35b34801561053157600080fd5b5061053a610ccf565b6040516105479190612cb1565b60405180910390f35b34801561055c57600080fd5b50610577600480360381019061057291906133f6565b610d61565b005b34801561058557600080fd5b506105a0600480360381019061059b9190612d7b565b610eba565b6040516105ad9190612dd6565b60405180910390f35b3480156105c257600080fd5b506105cb610f31565b6040516105d89190612e2d565b60405180910390f35b3480156105ed57600080fd5b5061060860048036038101906106039190612d7b565b610f37565b6040516106159190612dd6565b60405180910390f35b34801561062a57600080fd5b50610645600480360381019061064091906134ff565b610f5a565b005b34801561065357600080fd5b5061066e6004803603810190610669919061354c565b610fd9565b005b34801561067c57600080fd5b50610685610fef565b60405161069291906135ad565b60405180910390f35b3480156106a757600080fd5b506106c260048036038101906106bd91906135c8565b611015565b6040516106cf9190612e2d565b60405180910390f35b3480156106e457600080fd5b506106ed61109c565b6040516106fa9190613629565b60405180910390f35b34801561070f57600080fd5b5061072a600480360381019061072591906136f0565b6110c2565b005b34801561073857600080fd5b50610753600480360381019061074e9190612df1565b61118b565b005b34801561076157600080fd5b5061077c60048036038101906107779190612f52565b61119f565b6040516107899190612e2d565b60405180910390f35b34801561079e57600080fd5b506107b960048036038101906107b49190612df1565b611265565b005b3480156107c757600080fd5b506107e260048036038101906107dd9190612df1565b6112e8565b005b6107fe60048036038101906107f99190613771565b6112fc565b60405161080b9190612f98565b60405180910390f35b60606036805461082390613807565b80601f016020809104026020016040519081016040528092919081815260200182805461084f90613807565b801561089c5780601f106108715761010080835404028352916020019161089c565b820191906000526020600020905b81548152906001019060200180831161087f57829003601f168201915b5050505050905090565b6000806108b1611393565b90506108be81858561139b565b600191505092915050565b6108d1611564565b6108da816115e2565b50565b6000603554905090565b60006108f6838387878a6116e8565b9050600073ffffffffffffffffffffffffffffffffffffffff16610100600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461099b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099290613884565b60405180910390fd5b33610100600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610a033385876109fe91906138d3565b611724565b610a18868587610a1391906138d3565b611732565b505050505050565b600080610a2b611393565b9050610a38858285611740565b610a438585856117cc565b60019150509392505050565b600080610a6c8363ffffffff1660ca611a4590919063ffffffff16565b91505080915050919050565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b600080610aab611393565b9050610acc818585610abd8589611015565b610ac79190613907565b61139b565b600191505092915050565b609860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060610b0960ca611a6c565b905090565b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9590613987565b60405180910390fd5b8383610baa8282611b35565b60405180608001604052806043815260200161498b6043913990610c04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfb9190612cb1565b60405180910390fd5b50610c1186868686611b4a565b505050505050565b6000603360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610c6a611564565b610c746000611b5c565b565b60fe6020528060005260406000206000915090505481565b6000610c9c84848434611c22565b90509392505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060378054610cde90613807565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0a90613807565b8015610d575780601f10610d2c57610100808354040283529160200191610d57565b820191906000526020600020905b815481529060010190602001808311610d3a57829003601f168201915b5050505050905090565b60008060019054906101000a900460ff16159050808015610d925750600160008054906101000a900460ff1660ff16105b80610dbf5750610da130611c90565b158015610dbe5750600160008054906101000a900460ff1660ff16145b5b610dfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df590613a19565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610e3b576001600060016101000a81548160ff0219169083151502179055505b610e458686611cb3565b610e4f8383611d18565b610e593385611d75565b8015610eb25760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610ea99190613a74565b60405180910390a15b505050505050565b600080610ec5611393565b90506000610ed38286611015565b905083811015610f18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0f90613b01565b60405180910390fd5b610f25828686840361139b565b60019250505092915050565b60ff5481565b600080610f42611393565b9050610f4f8185856117cc565b600191505092915050565b610f62611564565b60005b82829050811015610fd457610fc0838383818110610f8657610f85613b21565b5b9050604002016000016020810190610f9e9190612f52565b848484818110610fb157610fb0613b21565b5b90506040020160200135611ecc565b600181610fcd9190613907565b9050610f65565b505050565b610fe1611564565b610feb8282611f32565b5050565b609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000603460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b609960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6110ca611564565b818190508484905014611112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110990613b9c565b60405180910390fd5b600084849050905060005b818110156111835761116f86868381811061113b5761113a613b21565b5b90506020020160208101906111509190612f52565b85858481811061116357611162613b21565b5b90506020020135611f32565b60018161117c9190613907565b905061111d565b505050505050565b611193611564565b61119c81611f90565b50565b6000609860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a69297938360fe60008663ffffffff1663ffffffff168152602001908152602001600020546040518363ffffffff1660e01b815260040161121d929190613bcb565b602060405180830381865afa15801561123a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125e9190613c09565b9050919050565b61126d611564565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036112dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d390613ca8565b60405180910390fd5b6112e581611b5c565b50565b6112f0611564565b6112f981612061565b50565b60008060ff5490506001816113119190613907565b60ff819055506000611330858560018561132b9190613907565b612132565b905061134887611341888885612169565b3433612198565b9250858763ffffffff167fd229aacb94204188fe8042965fa6b269c62dc5818b21238779ab64bdd17efeec876040516113819190612e2d565b60405180910390a35050949350505050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361140a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140190613d3a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147090613dcc565b60405180910390fd5b80603460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115579190612e2d565b60405180910390a3505050565b61156c611393565b73ffffffffffffffffffffffffffffffffffffffff1661158a610ca5565b73ffffffffffffffffffffffffffffffffffffffff16146115e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d790613e38565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806116225750611621816121d0565b5b611661576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165890613ea4565b60405180910390fd5b80609960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167ffec811ed4e60aebdaf7a79cad8a97196bf56e35362f039705598226d30c9d24860405160405180910390a250565b60008585858585604051602001611703959493929190613f63565b60405160208183030381529060405280519060200120905095945050505050565b61172e82826121f3565b5050565b61173c8282611d75565b5050565b600061174c8484611015565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146117c657818110156117b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117af9061400e565b60405180910390fd5b6117c5848484840361139b565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361183b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611832906140a0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036118aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118a190614132565b60405180910390fd5b6118b58383836123c2565b6000603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561193c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611933906141c4565b60405180910390fd5b818103603360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611a2c9190612e2d565b60405180910390a3611a3f8484846123c7565b50505050565b600080611a618360001b856000016123cc90919063ffffffff16565b915091509250929050565b60606000611a798361241b565b9050805167ffffffffffffffff811115611a9657611a956132cb565b5b604051908082528060200260200182016040528015611ac45781602001602082028036833780820191505090505b50915060005b8151811015611b2e57818181518110611ae657611ae5613b21565b5b6020026020010151838281518110611b0157611b00613b21565b5b602002602001019063ffffffff16908163ffffffff16815250508080611b26906141e4565b915050611aca565b5050919050565b600081611b4184610a4f565b14905092915050565b611b56848484846124d8565b50505050565b6000606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080611c2e84612563565b9050611c4686611c3f878785612169565b8533612198565b9150848663ffffffff167fd229aacb94204188fe8042965fa6b269c62dc5818b21238779ab64bdd17efeec86604051611c7f9190612e2d565b60405180910390a350949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611d02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cf99061429e565b60405180910390fd5b611d0b81611f90565b611d1482612586565b5050565b600060019054906101000a900460ff16611d67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5e9061429e565b60405180910390fd5b611d7182826125e9565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611de4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ddb9061430a565b60405180910390fd5b611df0600083836123c2565b8060356000828254611e029190613907565b9250508190555080603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611eb49190612e2d565b60405180910390a3611ec8600083836123c7565b5050565b8060fe60008463ffffffff1663ffffffff168152602001908152602001600020819055508163ffffffff167f90563f253ecb04527a6a7ae1a8cbe2bdc6caefb39d5f7b06a973cf5e7f8035a482604051611f269190612e2d565b60405180910390a25050565b611f4e8263ffffffff168260ca61265c9092919063ffffffff16565b8163ffffffff167f97fd51fef1f80c854cbd0150c248e8b2ac4ecdc97cc05e742b5f61c9f4dc645882604051611f849190612f98565b60405180910390a25050565b80611f9a816121d0565b611fd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd090613ea4565b60405180910390fd5b81609860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fb87f5a0bface22cde699143559fb99f990ae54eea236995fc54178af91af859f60405160405180910390a25050565b8061206b816121d0565b6120aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a190613ea4565b60405180910390fd5b81609760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167f7a61e573722ff8b205c8962b59d37e7d30573f368965597a844a94872204ebd760405160405180910390a25050565b606061213e3385611724565b828260405160200161215192919061432a565b60405160208183030381529060405290509392505050565b6060838383604051602001612180939291906143bb565b60405160208183030381529060405290509392505050565b60006121c6858560fe60008963ffffffff1663ffffffff16815260200190815260200160002054868661267d565b9050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612262576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225990614466565b60405180910390fd5b61226e826000836123c2565b6000603360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156122f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ec906144f8565b60405180910390fd5b818103603360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081603560008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516123a99190612e2d565b60405180910390a36123bd836000846123c7565b505050565b505050565b505050565b60008060008460020160008581526020019081526020016000205490506000801b810361240b576123fd8585612728565b6000801b9250925050612414565b60018192509250505b9250929050565b6060600061242b83600001612748565b90508067ffffffffffffffff811115612447576124466132cb565b5b6040519080825280602002602001820160405280156124755781602001602082028036833780820191505090505b50915060005b818110156124d15761249c818560000160000161275d90919063ffffffff16565b60001c8382815181106124b2576124b1613b21565b5b60200260200101818152505080806124c9906141e4565b91505061247b565b5050919050565b60006124e48383612774565b905060006124f2848461279d565b905036600061250186866127c9565b9150915061251a612511856127ea565b848a85856127f7565b838863ffffffff167fba20947a325f450d232530e5f5fce293e7963499d5309a07cee84a269f2f15a6856040516125519190612e2d565b60405180910390a35050505050505050565b606061256f33836121f3565b604051806020016040528060008152509050919050565b600060019054906101000a900460ff166125d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125cc9061429e565b60405180910390fd5b6125de81612061565b6125e661281a565b50565b600060019054906101000a900460ff16612638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161262f9061429e565b60405180910390fd5b816036908161264791906146ba565b50806037908161265791906146ba565b505050565b6126778260001b82856000016128739092919063ffffffff16565b50505050565b600061268986866128ae565b9050609860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166311bf2c1884838988876040518663ffffffff1660e01b81526004016126ed949392919061478c565b6000604051808303818588803b15801561270657600080fd5b505af115801561271a573d6000803e3d6000fd5b505050505095945050505050565b6000612740828460000161296790919063ffffffff16565b905092915050565b60006127568260000161297e565b9050919050565b600061276c8360000183612993565b905092915050565b6000828260009060209261278a939291906147db565b906127959190614821565b905092915050565b600082826020906040926127b3939291906147db565b906127be9190614821565b60001c905092915050565b366000838360409080926127df939291906147db565b915091509250929050565b60008160001c9050919050565b600061280686868686866129be565b90506128128186611732565b505050505050565b600060019054906101000a900460ff16612869576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128609061429e565b60405180910390fd5b612871612a7c565b565b600081846002016000858152602001908152602001600020819055506128a58385600001612add90919063ffffffff16565b90509392505050565b6000806128ba84612af4565b9050609760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa31de018583866040518463ffffffff1660e01b815260040161291b939291906148ca565b6020604051808303816000875af115801561293a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295e919061491d565b91505092915050565b60006129768360000183612b7d565b905092915050565b600061298c82600001612ba0565b9050919050565b60008260000182815481106129ab576129aa613b21565b5b9060005260206000200154905092915050565b60008083839050036129d257859050612a73565b60008084848101906129e4919061494a565b91509150600061010060006129fc89858c888f6116e8565b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612a6c57809350505050612a73565b8893505050505b95945050505050565b600060019054906101000a900460ff16612acb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ac29061429e565b60405180910390fd5b612adb612ad6611393565b611b5c565b565b6000612aec8360000183612bb1565b905092915050565b6000806000612b138463ffffffff1660ca611a4590919063ffffffff16565b915091508160405180608001604052806043815260200161498b6043913990612b72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b699190612cb1565b60405180910390fd5b508092505050919050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b6000612bbd8383612b7d565b612c16578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612c1b565b600090505b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612c5b578082015181840152602081019050612c40565b60008484015250505050565b6000601f19601f8301169050919050565b6000612c8382612c21565b612c8d8185612c2c565b9350612c9d818560208601612c3d565b612ca681612c67565b840191505092915050565b60006020820190508181036000830152612ccb8184612c78565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d1282612ce7565b9050919050565b612d2281612d07565b8114612d2d57600080fd5b50565b600081359050612d3f81612d19565b92915050565b6000819050919050565b612d5881612d45565b8114612d6357600080fd5b50565b600081359050612d7581612d4f565b92915050565b60008060408385031215612d9257612d91612cdd565b5b6000612da085828601612d30565b9250506020612db185828601612d66565b9150509250929050565b60008115159050919050565b612dd081612dbb565b82525050565b6000602082019050612deb6000830184612dc7565b92915050565b600060208284031215612e0757612e06612cdd565b5b6000612e1584828501612d30565b91505092915050565b612e2781612d45565b82525050565b6000602082019050612e426000830184612e1e565b92915050565b600063ffffffff82169050919050565b612e6181612e48565b8114612e6c57600080fd5b50565b600081359050612e7e81612e58565b92915050565b600080600080600060a08688031215612ea057612e9f612cdd565b5b6000612eae88828901612d30565b9550506020612ebf88828901612d66565b9450506040612ed088828901612d66565b9350506060612ee188828901612e6f565b9250506080612ef288828901612d66565b9150509295509295909350565b600080600060608486031215612f1857612f17612cdd565b5b6000612f2686828701612d30565b9350506020612f3786828701612d30565b9250506040612f4886828701612d66565b9150509250925092565b600060208284031215612f6857612f67612cdd565b5b6000612f7684828501612e6f565b91505092915050565b6000819050919050565b612f9281612f7f565b82525050565b6000602082019050612fad6000830184612f89565b92915050565b600060ff82169050919050565b612fc981612fb3565b82525050565b6000602082019050612fe46000830184612fc0565b92915050565b6000819050919050565b600061300f61300a61300584612ce7565b612fea565b612ce7565b9050919050565b600061302182612ff4565b9050919050565b600061303382613016565b9050919050565b61304381613028565b82525050565b600060208201905061305e600083018461303a565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61309981612e48565b82525050565b60006130ab8383613090565b60208301905092915050565b6000602082019050919050565b60006130cf82613064565b6130d9818561306f565b93506130e483613080565b8060005b838110156131155781516130fc888261309f565b9750613107836130b7565b9250506001810190506130e8565b5085935050505092915050565b6000602082019050818103600083015261313c81846130c4565b905092915050565b61314d81612f7f565b811461315857600080fd5b50565b60008135905061316a81613144565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261319557613194613170565b5b8235905067ffffffffffffffff8111156131b2576131b1613175565b5b6020830191508360018202830111156131ce576131cd61317a565b5b9250929050565b600080600080606085870312156131ef576131ee612cdd565b5b60006131fd87828801612e6f565b945050602061320e8782880161315b565b935050604085013567ffffffffffffffff81111561322f5761322e612ce2565b5b61323b8782880161317f565b925092505092959194509250565b60008060006060848603121561326257613261612cdd565b5b600061327086828701612e6f565b93505060206132818682870161315b565b925050604061329286828701612d66565b9150509250925092565b6132a581612d07565b82525050565b60006020820190506132c0600083018461329c565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61330382612c67565b810181811067ffffffffffffffff82111715613322576133216132cb565b5b80604052505050565b6000613335612cd3565b905061334182826132fa565b919050565b600067ffffffffffffffff821115613361576133606132cb565b5b61336a82612c67565b9050602081019050919050565b82818337600083830152505050565b600061339961339484613346565b61332b565b9050828152602081018484840111156133b5576133b46132c6565b5b6133c0848285613377565b509392505050565b600082601f8301126133dd576133dc613170565b5b81356133ed848260208601613386565b91505092915050565b600080600080600060a0868803121561341257613411612cdd565b5b600061342088828901612d30565b955050602061343188828901612d30565b945050604061344288828901612d66565b935050606086013567ffffffffffffffff81111561346357613462612ce2565b5b61346f888289016133c8565b925050608086013567ffffffffffffffff8111156134905761348f612ce2565b5b61349c888289016133c8565b9150509295509295909350565b60008083601f8401126134bf576134be613170565b5b8235905067ffffffffffffffff8111156134dc576134db613175565b5b6020830191508360408202830111156134f8576134f761317a565b5b9250929050565b6000806020838503121561351657613515612cdd565b5b600083013567ffffffffffffffff81111561353457613533612ce2565b5b613540858286016134a9565b92509250509250929050565b6000806040838503121561356357613562612cdd565b5b600061357185828601612e6f565b92505060206135828582860161315b565b9150509250929050565b600061359782613016565b9050919050565b6135a78161358c565b82525050565b60006020820190506135c2600083018461359e565b92915050565b600080604083850312156135df576135de612cdd565b5b60006135ed85828601612d30565b92505060206135fe85828601612d30565b9150509250929050565b600061361382613016565b9050919050565b61362381613608565b82525050565b600060208201905061363e600083018461361a565b92915050565b60008083601f84011261365a57613659613170565b5b8235905067ffffffffffffffff81111561367757613676613175565b5b6020830191508360208202830111156136935761369261317a565b5b9250929050565b60008083601f8401126136b0576136af613170565b5b8235905067ffffffffffffffff8111156136cd576136cc613175565b5b6020830191508360208202830111156136e9576136e861317a565b5b9250929050565b6000806000806040858703121561370a57613709612cdd565b5b600085013567ffffffffffffffff81111561372857613727612ce2565b5b61373487828801613644565b9450945050602085013567ffffffffffffffff81111561375757613756612ce2565b5b6137638782880161369a565b925092505092959194509250565b6000806000806080858703121561378b5761378a612cdd565b5b600061379987828801612e6f565b94505060206137aa8782880161315b565b93505060406137bb87828801612d66565b92505060606137cc87828801612d66565b91505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061381f57607f821691505b602082108103613832576138316137d8565b5b50919050565b7f7265717565737420616c72656164792066696c6c656400000000000000000000600082015250565b600061386e601683612c2c565b915061387982613838565b602082019050919050565b6000602082019050818103600083015261389d81613861565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006138de82612d45565b91506138e983612d45565b9250828203905081811115613901576139006138a4565b5b92915050565b600061391282612d45565b915061391d83612d45565b9250828201905080821115613935576139346138a4565b5b92915050565b7f216d61696c626f78000000000000000000000000000000000000000000000000600082015250565b6000613971600883612c2c565b915061397c8261393b565b602082019050919050565b600060208201905081810360008301526139a081613964565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000613a03602e83612c2c565b9150613a0e826139a7565b604082019050919050565b60006020820190508181036000830152613a32816139f6565b9050919050565b6000819050919050565b6000613a5e613a59613a5484613a39565b612fea565b612fb3565b9050919050565b613a6e81613a43565b82525050565b6000602082019050613a896000830184613a65565b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000613aeb602583612c2c565b9150613af682613a8f565b604082019050919050565b60006020820190508181036000830152613b1a81613ade565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f216c656e67746800000000000000000000000000000000000000000000000000600082015250565b6000613b86600783612c2c565b9150613b9182613b50565b602082019050919050565b60006020820190508181036000830152613bb581613b79565b9050919050565b613bc581612e48565b82525050565b6000604082019050613be06000830185613bbc565b613bed6020830184612e1e565b9392505050565b600081519050613c0381612d4f565b92915050565b600060208284031215613c1f57613c1e612cdd565b5b6000613c2d84828501613bf4565b91505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613c92602683612c2c565b9150613c9d82613c36565b604082019050919050565b60006020820190508181036000830152613cc181613c85565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613d24602483612c2c565b9150613d2f82613cc8565b604082019050919050565b60006020820190508181036000830152613d5381613d17565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613db6602283612c2c565b9150613dc182613d5a565b604082019050919050565b60006020820190508181036000830152613de581613da9565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613e22602083612c2c565b9150613e2d82613dec565b602082019050919050565b60006020820190508181036000830152613e5181613e15565b9050919050565b7f21636f6e74726163740000000000000000000000000000000000000000000000600082015250565b6000613e8e600983612c2c565b9150613e9982613e58565b602082019050919050565b60006020820190508181036000830152613ebd81613e81565b9050919050565b60008160e01b9050919050565b6000613edc82613ec4565b9050919050565b613ef4613eef82612e48565b613ed1565b82525050565b6000819050919050565b613f15613f1082612d45565b613efa565b82525050565b60008160601b9050919050565b6000613f3382613f1b565b9050919050565b6000613f4582613f28565b9050919050565b613f5d613f5882612d07565b613f3a565b82525050565b6000613f6f8288613ee3565b600482019150613f7f8287613f04565b602082019150613f8f8286613f04565b602082019150613f9f8285613f04565b602082019150613faf8284613f4c565b6014820191508190509695505050505050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000613ff8601d83612c2c565b915061400382613fc2565b602082019050919050565b6000602082019050818103600083015261402781613feb565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061408a602583612c2c565b91506140958261402e565b604082019050919050565b600060208201905081810360008301526140b98161407d565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061411c602383612c2c565b9150614127826140c0565b604082019050919050565b6000602082019050818103600083015261414b8161410f565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006141ae602683612c2c565b91506141b982614152565b604082019050919050565b600060208201905081810360008301526141dd816141a1565b9050919050565b60006141ef82612d45565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614221576142206138a4565b5b600182019050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000614288602b83612c2c565b91506142938261422c565b604082019050919050565b600060208201905081810360008301526142b78161427b565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b60006142f4601f83612c2c565b91506142ff826142be565b602082019050919050565b60006020820190508181036000830152614323816142e7565b9050919050565b600060408201905061433f6000830185612e1e565b61434c6020830184612e1e565b9392505050565b6000819050919050565b61436e61436982612f7f565b614353565b82525050565b600081519050919050565b600081905092915050565b600061439582614374565b61439f818561437f565b93506143af818560208601612c3d565b80840191505092915050565b60006143c7828661435d565b6020820191506143d78285613f04565b6020820191506143e7828461438a565b9150819050949350505050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614450602183612c2c565b915061445b826143f4565b604082019050919050565b6000602082019050818103600083015261447f81614443565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006144e2602283612c2c565b91506144ed82614486565b604082019050919050565b60006020820190508181036000830152614511816144d5565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261457a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261453d565b614584868361453d565b95508019841693508086168417925050509392505050565b60006145b76145b26145ad84612d45565b612fea565b612d45565b9050919050565b6000819050919050565b6145d18361459c565b6145e56145dd826145be565b84845461454a565b825550505050565b600090565b6145fa6145ed565b6146058184846145c8565b505050565b5b818110156146295761461e6000826145f2565b60018101905061460b565b5050565b601f82111561466e5761463f81614518565b6146488461452d565b81016020851015614657578190505b61466b6146638561452d565b83018261460a565b50505b505050565b600082821c905092915050565b600061469160001984600802614673565b1980831691505092915050565b60006146aa8383614680565b9150826002028217905092915050565b6146c382612c21565b67ffffffffffffffff8111156146dc576146db6132cb565b5b6146e68254613807565b6146f182828561462d565b600060209050601f8311600181146147245760008415614712578287015190505b61471c858261469e565b865550614784565b601f19841661473286614518565b60005b8281101561475a57848901518255600182019150602085019450602081019050614735565b868310156147775784890151614773601f891682614680565b8355505b6001600288020188555050505b505050505050565b60006080820190506147a16000830187612f89565b6147ae6020830186613bbc565b6147bb6040830185612e1e565b6147c8606083018461329c565b95945050505050565b600080fd5b600080fd5b600080858511156147ef576147ee6147d1565b5b83861115614800576147ff6147d6565b5b6001850283019150848603905094509492505050565b600082905092915050565b600061482d8383614816565b826148388135612f7f565b92506020821015614878576148737fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8360200360080261453d565b831692505b505092915050565b600082825260208201905092915050565b600061489c82614374565b6148a68185614880565b93506148b6818560208601612c3d565b6148bf81612c67565b840191505092915050565b60006060820190506148df6000830186613bbc565b6148ec6020830185612f89565b81810360408301526148fe8184614891565b9050949350505050565b60008151905061491781613144565b92915050565b60006020828403121561493357614932612cdd565b5b600061494184828501614908565b91505092915050565b6000806040838503121561496157614960612cdd565b5b600061496f85828601612d66565b925050602061498085828601612d66565b915050925092905056fe4e6f20726f7574657220656e726f6c6c656420666f7220646f6d61696e2e2044696420796f7520737065636966792074686520726967687420646f6d61696e2049443fa2646970667358221220c14552771ae4c287924c40d77542afb6211048c2150985141d46033b488eefb664736f6c63430008100033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/rust/abis/FastHypERC20Collateral.json b/rust/abis/FastHypERC20Collateral.json new file mode 100644 index 0000000..519bc24 --- /dev/null +++ b/rust/abis/FastHypERC20Collateral.json @@ -0,0 +1,605 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "FastHypERC20Collateral", + "sourceName": "contracts/FastHypERC20Collateral.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "erc20", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "domain", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "gas", + "type": "uint256" + } + ], + "name": "DestinationGasSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "interchainGasPaymaster", + "type": "address" + } + ], + "name": "InterchainGasPaymasterSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "InterchainSecurityModuleSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "mailbox", + "type": "address" + } + ], + "name": "MailboxSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "origin", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ReceivedTransferRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "domain", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "router", + "type": "bytes32" + } + ], + "name": "RemoteRouterEnrolled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "destination", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "SentTransferRemote", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "name": "destinationGas", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "domains", + "outputs": [ + { + "internalType": "uint32[]", + "name": "", + "type": "uint32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_domain", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_router", + "type": "bytes32" + } + ], + "name": "enrollRemoteRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32[]", + "name": "_domains", + "type": "uint32[]" + }, + { + "internalType": "bytes32[]", + "name": "_addresses", + "type": "bytes32[]" + } + ], + "name": "enrollRemoteRouters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "fastTransferId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_destination", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_recipient", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amountOrId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_fastFee", + "type": "uint256" + } + ], + "name": "fastTransferRemote", + "outputs": [ + { + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_fastFee", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "_origin", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_fastTransferId", + "type": "uint256" + } + ], + "name": "fillFastTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_origin", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_sender", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "handle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_mailbox", + "type": "address" + }, + { + "internalType": "address", + "name": "_interchainGasPaymaster", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "interchainGasPaymaster", + "outputs": [ + { + "internalType": "contract IInterchainGasPaymaster", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "interchainSecurityModule", + "outputs": [ + { + "internalType": "contract IInterchainSecurityModule", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mailbox", + "outputs": [ + { + "internalType": "contract IMailbox", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_destinationDomain", + "type": "uint32" + } + ], + "name": "quoteGasPayment", + "outputs": [ + { + "internalType": "uint256", + "name": "_gasPayment", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_domain", + "type": "uint32" + } + ], + "name": "routers", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint32", + "name": "domain", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + } + ], + "internalType": "struct GasRouter.GasRouterConfig[]", + "name": "gasConfigs", + "type": "tuple[]" + } + ], + "name": "setDestinationGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_interchainGasPaymaster", + "type": "address" + } + ], + "name": "setInterchainGasPaymaster", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_module", + "type": "address" + } + ], + "name": "setInterchainSecurityModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_mailbox", + "type": "address" + } + ], + "name": "setMailbox", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_destination", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_recipient", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amountOrId", + "type": "uint256" + } + ], + "name": "transferRemote", + "outputs": [ + { + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "wrappedToken", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200395e3803806200395e8339818101604052810190620000379190620000de565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000110565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000a68262000079565b9050919050565b620000b88162000099565b8114620000c457600080fd5b50565b600081519050620000d881620000ad565b92915050565b600060208284031215620000f757620000f662000074565b5b60006200010784828501620000c7565b91505092915050565b608051613816620001486000396000818161097e01528181610a8c0152818161102e0152818161107e01526119db01526138166000f3fe60806040526004361061014b5760003560e01c8063996c6cc3116100b6578063e9198bf91161006f578063e9198bf914610471578063f1bd6f0a1461049a578063f2ed8c53146104c3578063f2fde38b14610500578063f3c61d6b14610529578063f5f09f2e146105525761014b565b8063996c6cc314610373578063a478333b1461039e578063b1bd6436146103c9578063b49c53a7146103f2578063d5438eae1461041b578063de523cf3146104465761014b565b806356d5d4751161010857806356d5d4751461025e57806370a0823114610287578063715018a6146102c4578063775313a1146102db57806381b4e8b4146103185780638da5cb5b146103485761014b565b80630e72cc06146101505780631b177491146101795780632ead72f6146101a257806339bb4ad9146101df578063440df4f41461020a578063485cc95514610235575b600080fd5b34801561015c57600080fd5b50610177600480360381019061017291906122d4565b610582565b005b34801561018557600080fd5b506101a0600480360381019061019b9190612373565b610596565b005b3480156101ae57600080fd5b506101c960048036038101906101c491906123ee565b6106cd565b6040516101d69190612434565b60405180910390f35b3480156101eb57600080fd5b506101f46106f6565b60405161020191906124ae565b60405180910390f35b34801561021657600080fd5b5061021f61071c565b60405161022c9190612587565b60405180910390f35b34801561024157600080fd5b5061025c600480360381019061025791906125a9565b61072d565b005b34801561026a57600080fd5b506102856004803603810190610280919061267a565b61086f565b005b34801561029357600080fd5b506102ae60048036038101906102a991906122d4565b61097a565b6040516102bb91906126fd565b60405180910390f35b3480156102d057600080fd5b506102d9610a1d565b005b3480156102e757600080fd5b5061030260048036038101906102fd91906123ee565b610a31565b60405161030f91906126fd565b60405180910390f35b610332600480360381019061032d9190612718565b610a49565b60405161033f9190612434565b60405180910390f35b34801561035457600080fd5b5061035d610a60565b60405161036a919061277a565b60405180910390f35b34801561037f57600080fd5b50610388610a8a565b60405161039591906127b6565b60405180910390f35b3480156103aa57600080fd5b506103b3610aae565b6040516103c091906126fd565b60405180910390f35b3480156103d557600080fd5b506103f060048036038101906103eb9190612827565b610ab4565b005b3480156103fe57600080fd5b5061041960048036038101906104149190612874565b610b33565b005b34801561042757600080fd5b50610430610b49565b60405161043d91906128d5565b60405180910390f35b34801561045257600080fd5b5061045b610b6f565b6040516104689190612911565b60405180910390f35b34801561047d57600080fd5b50610498600480360381019061049391906129d8565b610b95565b005b3480156104a657600080fd5b506104c160048036038101906104bc91906122d4565b610c5e565b005b3480156104cf57600080fd5b506104ea60048036038101906104e591906123ee565b610c72565b6040516104f791906126fd565b60405180910390f35b34801561050c57600080fd5b50610527600480360381019061052291906122d4565b610d38565b005b34801561053557600080fd5b50610550600480360381019061054b91906122d4565b610dbb565b005b61056c60048036038101906105679190612a59565b610dcf565b6040516105799190612434565b60405180910390f35b61058a610e66565b61059381610ee4565b50565b60006105a5838387878a610fea565b9050600073ffffffffffffffffffffffffffffffffffffffff1660ce600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610649576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064090612b1d565b60405180910390fd5b3360ce600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106b03385876106ab9190612b6c565b611026565b6106c58685876106c09190612b6c565b611077565b505050505050565b6000806106ea8363ffffffff1660986110c690919063ffffffff16565b91505080915050919050565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606061072860986110ed565b905090565b60008060019054906101000a900460ff1615905080801561075e5750600160008054906101000a900460ff1660ff16105b8061078b575061076d306111b6565b15801561078a5750600160008054906101000a900460ff1660ff16145b5b6107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c190612c12565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610807576001600060016101000a81548160ff0219169083151502179055505b61081183836111d9565b801561086a5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516108619190612c7a565b60405180910390a15b505050565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690612ce1565b60405180910390fd5b838361090b828261123e565b60405180608001604052806043815260200161379e6043913990610965576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095c9190612d80565b60405180910390fd5b5061097286868686611253565b505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016109d5919061277a565b602060405180830381865afa1580156109f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190612db7565b9050919050565b610a25610e66565b610a2f6000611265565b565b60cc6020528060005260406000206000915090505481565b6000610a578484843461132b565b90509392505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60cd5481565b610abc610e66565b60005b82829050811015610b2e57610b1a838383818110610ae057610adf612de4565b5b9050604002016000016020810190610af891906123ee565b848484818110610b0b57610b0a612de4565b5b90506040020160200135611399565b600181610b279190612e13565b9050610abf565b505050565b610b3b610e66565b610b4582826113ff565b5050565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b9d610e66565b818190508484905014610be5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdc90612e93565b60405180910390fd5b600084849050905060005b81811015610c5657610c42868683818110610c0e57610c0d612de4565b5b9050602002016020810190610c2391906123ee565b858584818110610c3657610c35612de4565b5b905060200201356113ff565b600181610c4f9190612e13565b9050610bf0565b505050505050565b610c66610e66565b610c6f8161145d565b50565b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a69297938360cc60008663ffffffff1663ffffffff168152602001908152602001600020546040518363ffffffff1660e01b8152600401610cf0929190612ec2565b602060405180830381865afa158015610d0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d319190612db7565b9050919050565b610d40610e66565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610daf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da690612f5d565b60405180910390fd5b610db881611265565b50565b610dc3610e66565b610dcc8161152e565b50565b60008060cd549050600181610de49190612e13565b60cd819055506000610e038585600185610dfe9190612e13565b6115ff565b9050610e1b87610e14888885611636565b3433611665565b9250858763ffffffff167fd229aacb94204188fe8042965fa6b269c62dc5818b21238779ab64bdd17efeec87604051610e5491906126fd565b60405180910390a35050949350505050565b610e6e61169d565b73ffffffffffffffffffffffffffffffffffffffff16610e8c610a60565b73ffffffffffffffffffffffffffffffffffffffff1614610ee2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed990612fc9565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610f245750610f23816116a5565b5b610f63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5a90613035565b60405180910390fd5b80606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167ffec811ed4e60aebdaf7a79cad8a97196bf56e35362f039705598226d30c9d24860405160405180910390a250565b600085858585856040516020016110059594939291906130f4565b60405160208183030381529060405280519060200120905095945050505050565b6110738230837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116c8909392919063ffffffff16565b5050565b6110c282827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166117519092919063ffffffff16565b5050565b6000806110e28360001b856000016117d790919063ffffffff16565b915091509250929050565b606060006110fa83611826565b9050805167ffffffffffffffff81111561111757611116613153565b5b6040519080825280602002602001820160405280156111455781602001602082028036833780820191505090505b50915060005b81518110156111af5781818151811061116757611166612de4565b5b602002602001015183828151811061118257611181612de4565b5b602002602001019063ffffffff16908163ffffffff168152505080806111a790613182565b91505061114b565b5050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121f9061323c565b60405180910390fd5b6112318161145d565b61123a826118e3565b5050565b60008161124a846106cd565b14905092915050565b61125f84848484611946565b50505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080611337846119d1565b905061134f86611348878785611636565b8533611665565b9150848663ffffffff167fd229aacb94204188fe8042965fa6b269c62dc5818b21238779ab64bdd17efeec8660405161138891906126fd565b60405180910390a350949350505050565b8060cc60008463ffffffff1663ffffffff168152602001908152602001600020819055508163ffffffff167f90563f253ecb04527a6a7ae1a8cbe2bdc6caefb39d5f7b06a973cf5e7f8035a4826040516113f391906126fd565b60405180910390a25050565b61141b8263ffffffff16826098611a379092919063ffffffff16565b8163ffffffff167f97fd51fef1f80c854cbd0150c248e8b2ac4ecdc97cc05e742b5f61c9f4dc6458826040516114519190612434565b60405180910390a25050565b80611467816116a5565b6114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149d90613035565b60405180910390fd5b81606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fb87f5a0bface22cde699143559fb99f990ae54eea236995fc54178af91af859f60405160405180910390a25050565b80611538816116a5565b611577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156e90613035565b60405180910390fd5b81606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167f7a61e573722ff8b205c8962b59d37e7d30573f368965597a844a94872204ebd760405160405180910390a25050565b606061160b3385611026565b828260405160200161161e92919061325c565b60405160208183030381529060405290509392505050565b606083838360405160200161164d939291906132ed565b60405160208183030381529060405290509392505050565b6000611693858560cc60008963ffffffff1663ffffffff168152602001908152602001600020548686611a58565b9050949350505050565b600033905090565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b61174b846323b872dd60e01b8585856040516024016116e993929190613326565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611b03565b50505050565b6117d28363a9059cbb60e01b848460405160240161177092919061335d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611b03565b505050565b60008060008460020160008581526020019081526020016000205490506000801b8103611816576118088585611bca565b6000801b925092505061181f565b60018192509250505b9250929050565b6060600061183683600001611bea565b90508067ffffffffffffffff81111561185257611851613153565b5b6040519080825280602002602001820160405280156118805781602001602082028036833780820191505090505b50915060005b818110156118dc576118a78185600001600001611bff90919063ffffffff16565b60001c8382815181106118bd576118bc612de4565b5b60200260200101818152505080806118d490613182565b915050611886565b5050919050565b600060019054906101000a900460ff16611932576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119299061323c565b60405180910390fd5b61193b8161152e565b611943611c16565b50565b60006119528383611c6f565b905060006119608484611c98565b905036600061196f8686611cc4565b9150915061198861197f85611ce5565b848a8585611cf2565b838863ffffffff167fba20947a325f450d232530e5f5fce293e7963499d5309a07cee84a269f2f15a6856040516119bf91906126fd565b60405180910390a35050505050505050565b6060611a203330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116c8909392919063ffffffff16565b604051806020016040528060008152509050919050565b611a528260001b8285600001611d159092919063ffffffff16565b50505050565b6000611a648686611d50565b9050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166311bf2c1884838988876040518663ffffffff1660e01b8152600401611ac89493929190613386565b6000604051808303818588803b158015611ae157600080fd5b505af1158015611af5573d6000803e3d6000fd5b505050505095945050505050565b6000611b65826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611e099092919063ffffffff16565b9050600081511115611bc55780806020019051810190611b859190613403565b611bc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbb906134a2565b60405180910390fd5b5b505050565b6000611be28284600001611e2190919063ffffffff16565b905092915050565b6000611bf882600001611e38565b9050919050565b6000611c0e8360000183611e4d565b905092915050565b600060019054906101000a900460ff16611c65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5c9061323c565b60405180910390fd5b611c6d611e78565b565b60008282600090602092611c85939291906134cc565b90611c90919061351f565b905092915050565b60008282602090604092611cae939291906134cc565b90611cb9919061351f565b60001c905092915050565b36600083836040908092611cda939291906134cc565b915091509250929050565b60008160001c9050919050565b6000611d018686868686611ed9565b9050611d0d8186611077565b505050505050565b60008184600201600085815260200190815260200160002081905550611d478385600001611f9690919063ffffffff16565b90509392505050565b600080611d5c84611fad565b9050606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa31de018583866040518463ffffffff1660e01b8152600401611dbd939291906135c8565b6020604051808303816000875af1158015611ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e00919061361b565b91505092915050565b6060611e188484600085612036565b90509392505050565b6000611e308360000183612103565b905092915050565b6000611e4682600001612126565b9050919050565b6000826000018281548110611e6557611e64612de4565b5b9060005260206000200154905092915050565b600060019054906101000a900460ff16611ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ebe9061323c565b60405180910390fd5b611ed7611ed261169d565b611265565b565b6000808383905003611eed57859050611f8d565b6000808484810190611eff9190613648565b91509150600060ce6000611f1689858c888f610fea565b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f8657809350505050611f8d565b8893505050505b95945050505050565b6000611fa58360000183612137565b905092915050565b6000806000611fcc8463ffffffff1660986110c690919063ffffffff16565b915091508160405180608001604052806043815260200161379e604391399061202b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120229190612d80565b60405180910390fd5b508092505050919050565b60608247101561207b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612072906136fa565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516120a4919061371a565b60006040518083038185875af1925050503d80600081146120e1576040519150601f19603f3d011682016040523d82523d6000602084013e6120e6565b606091505b50915091506120f7878383876121a7565b92505050949350505050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b60006121438383612103565b61219c5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506121a1565b600090505b92915050565b60608315612209576000835103612201576121c1856116a5565b612200576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f79061377d565b60405180910390fd5b5b829050612214565b612213838361221c565b5b949350505050565b60008251111561222f5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122639190612d80565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006122a182612276565b9050919050565b6122b181612296565b81146122bc57600080fd5b50565b6000813590506122ce816122a8565b92915050565b6000602082840312156122ea576122e961226c565b5b60006122f8848285016122bf565b91505092915050565b6000819050919050565b61231481612301565b811461231f57600080fd5b50565b6000813590506123318161230b565b92915050565b600063ffffffff82169050919050565b61235081612337565b811461235b57600080fd5b50565b60008135905061236d81612347565b92915050565b600080600080600060a0868803121561238f5761238e61226c565b5b600061239d888289016122bf565b95505060206123ae88828901612322565b94505060406123bf88828901612322565b93505060606123d08882890161235e565b92505060806123e188828901612322565b9150509295509295909350565b6000602082840312156124045761240361226c565b5b60006124128482850161235e565b91505092915050565b6000819050919050565b61242e8161241b565b82525050565b60006020820190506124496000830184612425565b92915050565b6000819050919050565b600061247461246f61246a84612276565b61244f565b612276565b9050919050565b600061248682612459565b9050919050565b60006124988261247b565b9050919050565b6124a88161248d565b82525050565b60006020820190506124c3600083018461249f565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6124fe81612337565b82525050565b600061251083836124f5565b60208301905092915050565b6000602082019050919050565b6000612534826124c9565b61253e81856124d4565b9350612549836124e5565b8060005b8381101561257a5781516125618882612504565b975061256c8361251c565b92505060018101905061254d565b5085935050505092915050565b600060208201905081810360008301526125a18184612529565b905092915050565b600080604083850312156125c0576125bf61226c565b5b60006125ce858286016122bf565b92505060206125df858286016122bf565b9150509250929050565b6125f28161241b565b81146125fd57600080fd5b50565b60008135905061260f816125e9565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261263a57612639612615565b5b8235905067ffffffffffffffff8111156126575761265661261a565b5b6020830191508360018202830111156126735761267261261f565b5b9250929050565b600080600080606085870312156126945761269361226c565b5b60006126a28782880161235e565b94505060206126b387828801612600565b935050604085013567ffffffffffffffff8111156126d4576126d3612271565b5b6126e087828801612624565b925092505092959194509250565b6126f781612301565b82525050565b600060208201905061271260008301846126ee565b92915050565b6000806000606084860312156127315761273061226c565b5b600061273f8682870161235e565b935050602061275086828701612600565b925050604061276186828701612322565b9150509250925092565b61277481612296565b82525050565b600060208201905061278f600083018461276b565b92915050565b60006127a08261247b565b9050919050565b6127b081612795565b82525050565b60006020820190506127cb60008301846127a7565b92915050565b60008083601f8401126127e7576127e6612615565b5b8235905067ffffffffffffffff8111156128045761280361261a565b5b6020830191508360408202830111156128205761281f61261f565b5b9250929050565b6000806020838503121561283e5761283d61226c565b5b600083013567ffffffffffffffff81111561285c5761285b612271565b5b612868858286016127d1565b92509250509250929050565b6000806040838503121561288b5761288a61226c565b5b60006128998582860161235e565b92505060206128aa85828601612600565b9150509250929050565b60006128bf8261247b565b9050919050565b6128cf816128b4565b82525050565b60006020820190506128ea60008301846128c6565b92915050565b60006128fb8261247b565b9050919050565b61290b816128f0565b82525050565b60006020820190506129266000830184612902565b92915050565b60008083601f84011261294257612941612615565b5b8235905067ffffffffffffffff81111561295f5761295e61261a565b5b60208301915083602082028301111561297b5761297a61261f565b5b9250929050565b60008083601f84011261299857612997612615565b5b8235905067ffffffffffffffff8111156129b5576129b461261a565b5b6020830191508360208202830111156129d1576129d061261f565b5b9250929050565b600080600080604085870312156129f2576129f161226c565b5b600085013567ffffffffffffffff811115612a1057612a0f612271565b5b612a1c8782880161292c565b9450945050602085013567ffffffffffffffff811115612a3f57612a3e612271565b5b612a4b87828801612982565b925092505092959194509250565b60008060008060808587031215612a7357612a7261226c565b5b6000612a818782880161235e565b9450506020612a9287828801612600565b9350506040612aa387828801612322565b9250506060612ab487828801612322565b91505092959194509250565b600082825260208201905092915050565b7f7265717565737420616c72656164792066696c6c656400000000000000000000600082015250565b6000612b07601683612ac0565b9150612b1282612ad1565b602082019050919050565b60006020820190508181036000830152612b3681612afa565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612b7782612301565b9150612b8283612301565b9250828203905081811115612b9a57612b99612b3d565b5b92915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000612bfc602e83612ac0565b9150612c0782612ba0565b604082019050919050565b60006020820190508181036000830152612c2b81612bef565b9050919050565b6000819050919050565b600060ff82169050919050565b6000612c64612c5f612c5a84612c32565b61244f565b612c3c565b9050919050565b612c7481612c49565b82525050565b6000602082019050612c8f6000830184612c6b565b92915050565b7f216d61696c626f78000000000000000000000000000000000000000000000000600082015250565b6000612ccb600883612ac0565b9150612cd682612c95565b602082019050919050565b60006020820190508181036000830152612cfa81612cbe565b9050919050565b600081519050919050565b60005b83811015612d2a578082015181840152602081019050612d0f565b60008484015250505050565b6000601f19601f8301169050919050565b6000612d5282612d01565b612d5c8185612ac0565b9350612d6c818560208601612d0c565b612d7581612d36565b840191505092915050565b60006020820190508181036000830152612d9a8184612d47565b905092915050565b600081519050612db18161230b565b92915050565b600060208284031215612dcd57612dcc61226c565b5b6000612ddb84828501612da2565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612e1e82612301565b9150612e2983612301565b9250828201905080821115612e4157612e40612b3d565b5b92915050565b7f216c656e67746800000000000000000000000000000000000000000000000000600082015250565b6000612e7d600783612ac0565b9150612e8882612e47565b602082019050919050565b60006020820190508181036000830152612eac81612e70565b9050919050565b612ebc81612337565b82525050565b6000604082019050612ed76000830185612eb3565b612ee460208301846126ee565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612f47602683612ac0565b9150612f5282612eeb565b604082019050919050565b60006020820190508181036000830152612f7681612f3a565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612fb3602083612ac0565b9150612fbe82612f7d565b602082019050919050565b60006020820190508181036000830152612fe281612fa6565b9050919050565b7f21636f6e74726163740000000000000000000000000000000000000000000000600082015250565b600061301f600983612ac0565b915061302a82612fe9565b602082019050919050565b6000602082019050818103600083015261304e81613012565b9050919050565b60008160e01b9050919050565b600061306d82613055565b9050919050565b61308561308082612337565b613062565b82525050565b6000819050919050565b6130a66130a182612301565b61308b565b82525050565b60008160601b9050919050565b60006130c4826130ac565b9050919050565b60006130d6826130b9565b9050919050565b6130ee6130e982612296565b6130cb565b82525050565b60006131008288613074565b6004820191506131108287613095565b6020820191506131208286613095565b6020820191506131308285613095565b60208201915061314082846130dd565b6014820191508190509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600061318d82612301565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131bf576131be612b3d565b5b600182019050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000613226602b83612ac0565b9150613231826131ca565b604082019050919050565b6000602082019050818103600083015261325581613219565b9050919050565b600060408201905061327160008301856126ee565b61327e60208301846126ee565b9392505050565b6000819050919050565b6132a061329b8261241b565b613285565b82525050565b600081519050919050565b600081905092915050565b60006132c7826132a6565b6132d181856132b1565b93506132e1818560208601612d0c565b80840191505092915050565b60006132f9828661328f565b6020820191506133098285613095565b60208201915061331982846132bc565b9150819050949350505050565b600060608201905061333b600083018661276b565b613348602083018561276b565b61335560408301846126ee565b949350505050565b6000604082019050613372600083018561276b565b61337f60208301846126ee565b9392505050565b600060808201905061339b6000830187612425565b6133a86020830186612eb3565b6133b560408301856126ee565b6133c2606083018461276b565b95945050505050565b60008115159050919050565b6133e0816133cb565b81146133eb57600080fd5b50565b6000815190506133fd816133d7565b92915050565b6000602082840312156134195761341861226c565b5b6000613427848285016133ee565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061348c602a83612ac0565b915061349782613430565b604082019050919050565b600060208201905081810360008301526134bb8161347f565b9050919050565b600080fd5b600080fd5b600080858511156134e0576134df6134c2565b5b838611156134f1576134f06134c7565b5b6001850283019150848603905094509492505050565b600082905092915050565b600082821b905092915050565b600061352b8383613507565b82613536813561241b565b92506020821015613576576135717fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83602003600802613512565b831692505b505092915050565b600082825260208201905092915050565b600061359a826132a6565b6135a4818561357e565b93506135b4818560208601612d0c565b6135bd81612d36565b840191505092915050565b60006060820190506135dd6000830186612eb3565b6135ea6020830185612425565b81810360408301526135fc818461358f565b9050949350505050565b600081519050613615816125e9565b92915050565b6000602082840312156136315761363061226c565b5b600061363f84828501613606565b91505092915050565b6000806040838503121561365f5761365e61226c565b5b600061366d85828601612322565b925050602061367e85828601612322565b9150509250929050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006136e4602683612ac0565b91506136ef82613688565b604082019050919050565b60006020820190508181036000830152613713816136d7565b9050919050565b600061372682846132bc565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000613767601d83612ac0565b915061377282613731565b602082019050919050565b600060208201905081810360008301526137968161375a565b905091905056fe4e6f20726f7574657220656e726f6c6c656420666f7220646f6d61696e2e2044696420796f7520737065636966792074686520726967687420646f6d61696e2049443fa264697066735822122048e10fbf91a17d3effb0a6bf13995a021d36b0f7daf36b98abbac58bd43f7a9964736f6c63430008100033", + "deployedBytecode": "0x60806040526004361061014b5760003560e01c8063996c6cc3116100b6578063e9198bf91161006f578063e9198bf914610471578063f1bd6f0a1461049a578063f2ed8c53146104c3578063f2fde38b14610500578063f3c61d6b14610529578063f5f09f2e146105525761014b565b8063996c6cc314610373578063a478333b1461039e578063b1bd6436146103c9578063b49c53a7146103f2578063d5438eae1461041b578063de523cf3146104465761014b565b806356d5d4751161010857806356d5d4751461025e57806370a0823114610287578063715018a6146102c4578063775313a1146102db57806381b4e8b4146103185780638da5cb5b146103485761014b565b80630e72cc06146101505780631b177491146101795780632ead72f6146101a257806339bb4ad9146101df578063440df4f41461020a578063485cc95514610235575b600080fd5b34801561015c57600080fd5b50610177600480360381019061017291906122d4565b610582565b005b34801561018557600080fd5b506101a0600480360381019061019b9190612373565b610596565b005b3480156101ae57600080fd5b506101c960048036038101906101c491906123ee565b6106cd565b6040516101d69190612434565b60405180910390f35b3480156101eb57600080fd5b506101f46106f6565b60405161020191906124ae565b60405180910390f35b34801561021657600080fd5b5061021f61071c565b60405161022c9190612587565b60405180910390f35b34801561024157600080fd5b5061025c600480360381019061025791906125a9565b61072d565b005b34801561026a57600080fd5b506102856004803603810190610280919061267a565b61086f565b005b34801561029357600080fd5b506102ae60048036038101906102a991906122d4565b61097a565b6040516102bb91906126fd565b60405180910390f35b3480156102d057600080fd5b506102d9610a1d565b005b3480156102e757600080fd5b5061030260048036038101906102fd91906123ee565b610a31565b60405161030f91906126fd565b60405180910390f35b610332600480360381019061032d9190612718565b610a49565b60405161033f9190612434565b60405180910390f35b34801561035457600080fd5b5061035d610a60565b60405161036a919061277a565b60405180910390f35b34801561037f57600080fd5b50610388610a8a565b60405161039591906127b6565b60405180910390f35b3480156103aa57600080fd5b506103b3610aae565b6040516103c091906126fd565b60405180910390f35b3480156103d557600080fd5b506103f060048036038101906103eb9190612827565b610ab4565b005b3480156103fe57600080fd5b5061041960048036038101906104149190612874565b610b33565b005b34801561042757600080fd5b50610430610b49565b60405161043d91906128d5565b60405180910390f35b34801561045257600080fd5b5061045b610b6f565b6040516104689190612911565b60405180910390f35b34801561047d57600080fd5b50610498600480360381019061049391906129d8565b610b95565b005b3480156104a657600080fd5b506104c160048036038101906104bc91906122d4565b610c5e565b005b3480156104cf57600080fd5b506104ea60048036038101906104e591906123ee565b610c72565b6040516104f791906126fd565b60405180910390f35b34801561050c57600080fd5b50610527600480360381019061052291906122d4565b610d38565b005b34801561053557600080fd5b50610550600480360381019061054b91906122d4565b610dbb565b005b61056c60048036038101906105679190612a59565b610dcf565b6040516105799190612434565b60405180910390f35b61058a610e66565b61059381610ee4565b50565b60006105a5838387878a610fea565b9050600073ffffffffffffffffffffffffffffffffffffffff1660ce600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610649576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064090612b1d565b60405180910390fd5b3360ce600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106b03385876106ab9190612b6c565b611026565b6106c58685876106c09190612b6c565b611077565b505050505050565b6000806106ea8363ffffffff1660986110c690919063ffffffff16565b91505080915050919050565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606061072860986110ed565b905090565b60008060019054906101000a900460ff1615905080801561075e5750600160008054906101000a900460ff1660ff16105b8061078b575061076d306111b6565b15801561078a5750600160008054906101000a900460ff1660ff16145b5b6107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c190612c12565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610807576001600060016101000a81548160ff0219169083151502179055505b61081183836111d9565b801561086a5760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249860016040516108619190612c7a565b60405180910390a15b505050565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690612ce1565b60405180910390fd5b838361090b828261123e565b60405180608001604052806043815260200161379e6043913990610965576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095c9190612d80565b60405180910390fd5b5061097286868686611253565b505050505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016109d5919061277a565b602060405180830381865afa1580156109f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190612db7565b9050919050565b610a25610e66565b610a2f6000611265565b565b60cc6020528060005260406000206000915090505481565b6000610a578484843461132b565b90509392505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60cd5481565b610abc610e66565b60005b82829050811015610b2e57610b1a838383818110610ae057610adf612de4565b5b9050604002016000016020810190610af891906123ee565b848484818110610b0b57610b0a612de4565b5b90506040020160200135611399565b600181610b279190612e13565b9050610abf565b505050565b610b3b610e66565b610b4582826113ff565b5050565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b9d610e66565b818190508484905014610be5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdc90612e93565b60405180910390fd5b600084849050905060005b81811015610c5657610c42868683818110610c0e57610c0d612de4565b5b9050602002016020810190610c2391906123ee565b858584818110610c3657610c35612de4565b5b905060200201356113ff565b600181610c4f9190612e13565b9050610bf0565b505050505050565b610c66610e66565b610c6f8161145d565b50565b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a69297938360cc60008663ffffffff1663ffffffff168152602001908152602001600020546040518363ffffffff1660e01b8152600401610cf0929190612ec2565b602060405180830381865afa158015610d0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d319190612db7565b9050919050565b610d40610e66565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610daf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da690612f5d565b60405180910390fd5b610db881611265565b50565b610dc3610e66565b610dcc8161152e565b50565b60008060cd549050600181610de49190612e13565b60cd819055506000610e038585600185610dfe9190612e13565b6115ff565b9050610e1b87610e14888885611636565b3433611665565b9250858763ffffffff167fd229aacb94204188fe8042965fa6b269c62dc5818b21238779ab64bdd17efeec87604051610e5491906126fd565b60405180910390a35050949350505050565b610e6e61169d565b73ffffffffffffffffffffffffffffffffffffffff16610e8c610a60565b73ffffffffffffffffffffffffffffffffffffffff1614610ee2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed990612fc9565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610f245750610f23816116a5565b5b610f63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f5a90613035565b60405180910390fd5b80606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167ffec811ed4e60aebdaf7a79cad8a97196bf56e35362f039705598226d30c9d24860405160405180910390a250565b600085858585856040516020016110059594939291906130f4565b60405160208183030381529060405280519060200120905095945050505050565b6110738230837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116c8909392919063ffffffff16565b5050565b6110c282827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166117519092919063ffffffff16565b5050565b6000806110e28360001b856000016117d790919063ffffffff16565b915091509250929050565b606060006110fa83611826565b9050805167ffffffffffffffff81111561111757611116613153565b5b6040519080825280602002602001820160405280156111455781602001602082028036833780820191505090505b50915060005b81518110156111af5781818151811061116757611166612de4565b5b602002602001015183828151811061118257611181612de4565b5b602002602001019063ffffffff16908163ffffffff168152505080806111a790613182565b91505061114b565b5050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff16611228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121f9061323c565b60405180910390fd5b6112318161145d565b61123a826118e3565b5050565b60008161124a846106cd565b14905092915050565b61125f84848484611946565b50505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080611337846119d1565b905061134f86611348878785611636565b8533611665565b9150848663ffffffff167fd229aacb94204188fe8042965fa6b269c62dc5818b21238779ab64bdd17efeec8660405161138891906126fd565b60405180910390a350949350505050565b8060cc60008463ffffffff1663ffffffff168152602001908152602001600020819055508163ffffffff167f90563f253ecb04527a6a7ae1a8cbe2bdc6caefb39d5f7b06a973cf5e7f8035a4826040516113f391906126fd565b60405180910390a25050565b61141b8263ffffffff16826098611a379092919063ffffffff16565b8163ffffffff167f97fd51fef1f80c854cbd0150c248e8b2ac4ecdc97cc05e742b5f61c9f4dc6458826040516114519190612434565b60405180910390a25050565b80611467816116a5565b6114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149d90613035565b60405180910390fd5b81606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fb87f5a0bface22cde699143559fb99f990ae54eea236995fc54178af91af859f60405160405180910390a25050565b80611538816116a5565b611577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156e90613035565b60405180910390fd5b81606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167f7a61e573722ff8b205c8962b59d37e7d30573f368965597a844a94872204ebd760405160405180910390a25050565b606061160b3385611026565b828260405160200161161e92919061325c565b60405160208183030381529060405290509392505050565b606083838360405160200161164d939291906132ed565b60405160208183030381529060405290509392505050565b6000611693858560cc60008963ffffffff1663ffffffff168152602001908152602001600020548686611a58565b9050949350505050565b600033905090565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b61174b846323b872dd60e01b8585856040516024016116e993929190613326565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611b03565b50505050565b6117d28363a9059cbb60e01b848460405160240161177092919061335d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611b03565b505050565b60008060008460020160008581526020019081526020016000205490506000801b8103611816576118088585611bca565b6000801b925092505061181f565b60018192509250505b9250929050565b6060600061183683600001611bea565b90508067ffffffffffffffff81111561185257611851613153565b5b6040519080825280602002602001820160405280156118805781602001602082028036833780820191505090505b50915060005b818110156118dc576118a78185600001600001611bff90919063ffffffff16565b60001c8382815181106118bd576118bc612de4565b5b60200260200101818152505080806118d490613182565b915050611886565b5050919050565b600060019054906101000a900460ff16611932576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119299061323c565b60405180910390fd5b61193b8161152e565b611943611c16565b50565b60006119528383611c6f565b905060006119608484611c98565b905036600061196f8686611cc4565b9150915061198861197f85611ce5565b848a8585611cf2565b838863ffffffff167fba20947a325f450d232530e5f5fce293e7963499d5309a07cee84a269f2f15a6856040516119bf91906126fd565b60405180910390a35050505050505050565b6060611a203330847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166116c8909392919063ffffffff16565b604051806020016040528060008152509050919050565b611a528260001b8285600001611d159092919063ffffffff16565b50505050565b6000611a648686611d50565b9050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166311bf2c1884838988876040518663ffffffff1660e01b8152600401611ac89493929190613386565b6000604051808303818588803b158015611ae157600080fd5b505af1158015611af5573d6000803e3d6000fd5b505050505095945050505050565b6000611b65826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611e099092919063ffffffff16565b9050600081511115611bc55780806020019051810190611b859190613403565b611bc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbb906134a2565b60405180910390fd5b5b505050565b6000611be28284600001611e2190919063ffffffff16565b905092915050565b6000611bf882600001611e38565b9050919050565b6000611c0e8360000183611e4d565b905092915050565b600060019054906101000a900460ff16611c65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5c9061323c565b60405180910390fd5b611c6d611e78565b565b60008282600090602092611c85939291906134cc565b90611c90919061351f565b905092915050565b60008282602090604092611cae939291906134cc565b90611cb9919061351f565b60001c905092915050565b36600083836040908092611cda939291906134cc565b915091509250929050565b60008160001c9050919050565b6000611d018686868686611ed9565b9050611d0d8186611077565b505050505050565b60008184600201600085815260200190815260200160002081905550611d478385600001611f9690919063ffffffff16565b90509392505050565b600080611d5c84611fad565b9050606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fa31de018583866040518463ffffffff1660e01b8152600401611dbd939291906135c8565b6020604051808303816000875af1158015611ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e00919061361b565b91505092915050565b6060611e188484600085612036565b90509392505050565b6000611e308360000183612103565b905092915050565b6000611e4682600001612126565b9050919050565b6000826000018281548110611e6557611e64612de4565b5b9060005260206000200154905092915050565b600060019054906101000a900460ff16611ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ebe9061323c565b60405180910390fd5b611ed7611ed261169d565b611265565b565b6000808383905003611eed57859050611f8d565b6000808484810190611eff9190613648565b91509150600060ce6000611f1689858c888f610fea565b815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611f8657809350505050611f8d565b8893505050505b95945050505050565b6000611fa58360000183612137565b905092915050565b6000806000611fcc8463ffffffff1660986110c690919063ffffffff16565b915091508160405180608001604052806043815260200161379e604391399061202b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120229190612d80565b60405180910390fd5b508092505050919050565b60608247101561207b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612072906136fa565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516120a4919061371a565b60006040518083038185875af1925050503d80600081146120e1576040519150601f19603f3d011682016040523d82523d6000602084013e6120e6565b606091505b50915091506120f7878383876121a7565b92505050949350505050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b60006121438383612103565b61219c5782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506121a1565b600090505b92915050565b60608315612209576000835103612201576121c1856116a5565b612200576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f79061377d565b60405180910390fd5b5b829050612214565b612213838361221c565b5b949350505050565b60008251111561222f5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122639190612d80565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006122a182612276565b9050919050565b6122b181612296565b81146122bc57600080fd5b50565b6000813590506122ce816122a8565b92915050565b6000602082840312156122ea576122e961226c565b5b60006122f8848285016122bf565b91505092915050565b6000819050919050565b61231481612301565b811461231f57600080fd5b50565b6000813590506123318161230b565b92915050565b600063ffffffff82169050919050565b61235081612337565b811461235b57600080fd5b50565b60008135905061236d81612347565b92915050565b600080600080600060a0868803121561238f5761238e61226c565b5b600061239d888289016122bf565b95505060206123ae88828901612322565b94505060406123bf88828901612322565b93505060606123d08882890161235e565b92505060806123e188828901612322565b9150509295509295909350565b6000602082840312156124045761240361226c565b5b60006124128482850161235e565b91505092915050565b6000819050919050565b61242e8161241b565b82525050565b60006020820190506124496000830184612425565b92915050565b6000819050919050565b600061247461246f61246a84612276565b61244f565b612276565b9050919050565b600061248682612459565b9050919050565b60006124988261247b565b9050919050565b6124a88161248d565b82525050565b60006020820190506124c3600083018461249f565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6124fe81612337565b82525050565b600061251083836124f5565b60208301905092915050565b6000602082019050919050565b6000612534826124c9565b61253e81856124d4565b9350612549836124e5565b8060005b8381101561257a5781516125618882612504565b975061256c8361251c565b92505060018101905061254d565b5085935050505092915050565b600060208201905081810360008301526125a18184612529565b905092915050565b600080604083850312156125c0576125bf61226c565b5b60006125ce858286016122bf565b92505060206125df858286016122bf565b9150509250929050565b6125f28161241b565b81146125fd57600080fd5b50565b60008135905061260f816125e9565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261263a57612639612615565b5b8235905067ffffffffffffffff8111156126575761265661261a565b5b6020830191508360018202830111156126735761267261261f565b5b9250929050565b600080600080606085870312156126945761269361226c565b5b60006126a28782880161235e565b94505060206126b387828801612600565b935050604085013567ffffffffffffffff8111156126d4576126d3612271565b5b6126e087828801612624565b925092505092959194509250565b6126f781612301565b82525050565b600060208201905061271260008301846126ee565b92915050565b6000806000606084860312156127315761273061226c565b5b600061273f8682870161235e565b935050602061275086828701612600565b925050604061276186828701612322565b9150509250925092565b61277481612296565b82525050565b600060208201905061278f600083018461276b565b92915050565b60006127a08261247b565b9050919050565b6127b081612795565b82525050565b60006020820190506127cb60008301846127a7565b92915050565b60008083601f8401126127e7576127e6612615565b5b8235905067ffffffffffffffff8111156128045761280361261a565b5b6020830191508360408202830111156128205761281f61261f565b5b9250929050565b6000806020838503121561283e5761283d61226c565b5b600083013567ffffffffffffffff81111561285c5761285b612271565b5b612868858286016127d1565b92509250509250929050565b6000806040838503121561288b5761288a61226c565b5b60006128998582860161235e565b92505060206128aa85828601612600565b9150509250929050565b60006128bf8261247b565b9050919050565b6128cf816128b4565b82525050565b60006020820190506128ea60008301846128c6565b92915050565b60006128fb8261247b565b9050919050565b61290b816128f0565b82525050565b60006020820190506129266000830184612902565b92915050565b60008083601f84011261294257612941612615565b5b8235905067ffffffffffffffff81111561295f5761295e61261a565b5b60208301915083602082028301111561297b5761297a61261f565b5b9250929050565b60008083601f84011261299857612997612615565b5b8235905067ffffffffffffffff8111156129b5576129b461261a565b5b6020830191508360208202830111156129d1576129d061261f565b5b9250929050565b600080600080604085870312156129f2576129f161226c565b5b600085013567ffffffffffffffff811115612a1057612a0f612271565b5b612a1c8782880161292c565b9450945050602085013567ffffffffffffffff811115612a3f57612a3e612271565b5b612a4b87828801612982565b925092505092959194509250565b60008060008060808587031215612a7357612a7261226c565b5b6000612a818782880161235e565b9450506020612a9287828801612600565b9350506040612aa387828801612322565b9250506060612ab487828801612322565b91505092959194509250565b600082825260208201905092915050565b7f7265717565737420616c72656164792066696c6c656400000000000000000000600082015250565b6000612b07601683612ac0565b9150612b1282612ad1565b602082019050919050565b60006020820190508181036000830152612b3681612afa565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612b7782612301565b9150612b8283612301565b9250828203905081811115612b9a57612b99612b3d565b5b92915050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000612bfc602e83612ac0565b9150612c0782612ba0565b604082019050919050565b60006020820190508181036000830152612c2b81612bef565b9050919050565b6000819050919050565b600060ff82169050919050565b6000612c64612c5f612c5a84612c32565b61244f565b612c3c565b9050919050565b612c7481612c49565b82525050565b6000602082019050612c8f6000830184612c6b565b92915050565b7f216d61696c626f78000000000000000000000000000000000000000000000000600082015250565b6000612ccb600883612ac0565b9150612cd682612c95565b602082019050919050565b60006020820190508181036000830152612cfa81612cbe565b9050919050565b600081519050919050565b60005b83811015612d2a578082015181840152602081019050612d0f565b60008484015250505050565b6000601f19601f8301169050919050565b6000612d5282612d01565b612d5c8185612ac0565b9350612d6c818560208601612d0c565b612d7581612d36565b840191505092915050565b60006020820190508181036000830152612d9a8184612d47565b905092915050565b600081519050612db18161230b565b92915050565b600060208284031215612dcd57612dcc61226c565b5b6000612ddb84828501612da2565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612e1e82612301565b9150612e2983612301565b9250828201905080821115612e4157612e40612b3d565b5b92915050565b7f216c656e67746800000000000000000000000000000000000000000000000000600082015250565b6000612e7d600783612ac0565b9150612e8882612e47565b602082019050919050565b60006020820190508181036000830152612eac81612e70565b9050919050565b612ebc81612337565b82525050565b6000604082019050612ed76000830185612eb3565b612ee460208301846126ee565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612f47602683612ac0565b9150612f5282612eeb565b604082019050919050565b60006020820190508181036000830152612f7681612f3a565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612fb3602083612ac0565b9150612fbe82612f7d565b602082019050919050565b60006020820190508181036000830152612fe281612fa6565b9050919050565b7f21636f6e74726163740000000000000000000000000000000000000000000000600082015250565b600061301f600983612ac0565b915061302a82612fe9565b602082019050919050565b6000602082019050818103600083015261304e81613012565b9050919050565b60008160e01b9050919050565b600061306d82613055565b9050919050565b61308561308082612337565b613062565b82525050565b6000819050919050565b6130a66130a182612301565b61308b565b82525050565b60008160601b9050919050565b60006130c4826130ac565b9050919050565b60006130d6826130b9565b9050919050565b6130ee6130e982612296565b6130cb565b82525050565b60006131008288613074565b6004820191506131108287613095565b6020820191506131208286613095565b6020820191506131308285613095565b60208201915061314082846130dd565b6014820191508190509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600061318d82612301565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131bf576131be612b3d565b5b600182019050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000613226602b83612ac0565b9150613231826131ca565b604082019050919050565b6000602082019050818103600083015261325581613219565b9050919050565b600060408201905061327160008301856126ee565b61327e60208301846126ee565b9392505050565b6000819050919050565b6132a061329b8261241b565b613285565b82525050565b600081519050919050565b600081905092915050565b60006132c7826132a6565b6132d181856132b1565b93506132e1818560208601612d0c565b80840191505092915050565b60006132f9828661328f565b6020820191506133098285613095565b60208201915061331982846132bc565b9150819050949350505050565b600060608201905061333b600083018661276b565b613348602083018561276b565b61335560408301846126ee565b949350505050565b6000604082019050613372600083018561276b565b61337f60208301846126ee565b9392505050565b600060808201905061339b6000830187612425565b6133a86020830186612eb3565b6133b560408301856126ee565b6133c2606083018461276b565b95945050505050565b60008115159050919050565b6133e0816133cb565b81146133eb57600080fd5b50565b6000815190506133fd816133d7565b92915050565b6000602082840312156134195761341861226c565b5b6000613427848285016133ee565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b600061348c602a83612ac0565b915061349782613430565b604082019050919050565b600060208201905081810360008301526134bb8161347f565b9050919050565b600080fd5b600080fd5b600080858511156134e0576134df6134c2565b5b838611156134f1576134f06134c7565b5b6001850283019150848603905094509492505050565b600082905092915050565b600082821b905092915050565b600061352b8383613507565b82613536813561241b565b92506020821015613576576135717fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83602003600802613512565b831692505b505092915050565b600082825260208201905092915050565b600061359a826132a6565b6135a4818561357e565b93506135b4818560208601612d0c565b6135bd81612d36565b840191505092915050565b60006060820190506135dd6000830186612eb3565b6135ea6020830185612425565b81810360408301526135fc818461358f565b9050949350505050565b600081519050613615816125e9565b92915050565b6000602082840312156136315761363061226c565b5b600061363f84828501613606565b91505092915050565b6000806040838503121561365f5761365e61226c565b5b600061366d85828601612322565b925050602061367e85828601612322565b9150509250929050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006136e4602683612ac0565b91506136ef82613688565b604082019050919050565b60006020820190508181036000830152613713816136d7565b9050919050565b600061372682846132bc565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000613767601d83612ac0565b915061377282613731565b602082019050919050565b600060208201905081810360008301526137968161375a565b905091905056fe4e6f20726f7574657220656e726f6c6c656420666f7220646f6d61696e2e2044696420796f7520737065636966792074686520726967687420646f6d61696e2049443fa264697066735822122048e10fbf91a17d3effb0a6bf13995a021d36b0f7daf36b98abbac58bd43f7a9964736f6c63430008100033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/rust/abis/Mailbox.json b/rust/abis/Mailbox.json new file mode 100644 index 0000000..0136118 --- /dev/null +++ b/rust/abis/Mailbox.json @@ -0,0 +1,446 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Mailbox", + "sourceName": "contracts/Mailbox.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "uint32", + "name": "_localDomain", + "type": "uint32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "module", + "type": "address" + } + ], + "name": "DefaultIsmSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "destination", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "recipient", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "Dispatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "name": "DispatchId", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "origin", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "sender", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "Process", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + } + ], + "name": "ProcessId", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "MAX_MESSAGE_BODY_BYTES", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "count", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultIsm", + "outputs": [ + { + "internalType": "contract IInterchainSecurityModule", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "delivered", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_destinationDomain", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_recipientAddress", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_messageBody", + "type": "bytes" + } + ], + "name": "dispatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_defaultIsm", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isPaused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestCheckpoint", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "localDomain", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_metadata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "process", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_recipient", + "type": "address" + } + ], + "name": "recipientIsm", + "outputs": [ + { + "internalType": "contract IInterchainSecurityModule", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "root", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_module", + "type": "address" + } + ], + "name": "setDefaultIsm", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tree", + "outputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60a060405234801561001057600080fd5b5060405162002229380380620022298339810160408190526100319161003f565b63ffffffff1660805261006c565b60006020828403121561005157600080fd5b815163ffffffff8116811461006557600080fd5b9392505050565b6080516121936200009660003960008181610230015281816106300152610d0501526121936000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c8063907c0f92116100cd578063f2fde38b11610081578063fa31de0111610066578063fa31de011461030e578063fd54b22814610321578063ffa1ad741461032b57600080fd5b8063f2fde38b146102e8578063f794687a146102fb57600080fd5b8063e495f1d4116100b2578063e495f1d4146102aa578063e70f48ac146102cd578063ebf0c717146102e057600080fd5b8063907c0f9214610270578063b187bd261461029257600080fd5b8063715018a6116101245780638456cb59116101095780638456cb59146102235780638d3638f41461022b5780638da5cb5b1461025257600080fd5b8063715018a6146102085780637c39d1301461021057600080fd5b8063485cc95511610155578063485cc95514610199578063522ae002146101ac5780636e5f516e146101c357600080fd5b806306661abd146101715780633f4ba83a1461018f575b600080fd5b60b8545b60405163ffffffff90911681526020015b60405180910390f35b610197610345565b005b6101976101a7366004611a93565b610380565b6101b561080081565b604051908152602001610186565b6097546101e39073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b610197610533565b61019761021e366004611b0e565b610547565b6101976109fa565b6101757f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff166101e3565b610278610a35565b6040805192835263ffffffff909116602083015201610186565b61029a610a5d565b6040519015158152602001610186565b61029a6102b8366004611b7a565b60b96020526000908152604090205460ff1681565b6101e36102db366004611b93565b610a70565b6101b5610b3e565b6101976102f6366004611b93565b610b4a565b610197610309366004611b93565b610c01565b6101b561031c366004611bb0565b610c12565b60b8546101b59081565b610333600081565b60405160ff9091168152602001610186565b61034d610dce565b610355610e4f565b6040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b600054610100900460ff16158080156103a05750600054600160ff909116105b806103ba5750303b1580156103ba575060005460ff166001145b61044b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156104a957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6104b1610ec2565b6104b9610f59565b6104c283610b4a565b6104cb82610ff8565b801561052e57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61053b610dce565b61054560006110e5565b565b6001606554146105b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f7265656e7472616e742063616c6c20286f7220706175736564290000000000006044820152606401610442565b600060658190556105c4838361115c565b60ff161461062e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2176657273696f6e0000000000000000000000000000000000000000000000006044820152606401610442565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff1661065f8383611180565b63ffffffff16146106cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f2164657374696e6174696f6e00000000000000000000000000000000000000006044820152606401610442565b600061070d83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506111a392505050565b600081815260b9602052604090205490915060ff1615610789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f64656c69766572656400000000000000000000000000000000000000000000006044820152606401610442565b600081815260b96020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556107cd6102db85856111ae565b6040517ff7e83aee00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f7e83aee90610828908990899089908990600401611c52565b6020604051808303816000875af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b9190611c84565b6108d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f216d6f64756c65000000000000000000000000000000000000000000000000006044820152606401610442565b60006108dd85856111c7565b905060006108eb86866111d7565b905060006108f987876111ae565b90508073ffffffffffffffffffffffffffffffffffffffff166356d5d47584846109238b8b6111f0565b6040518563ffffffff1660e01b81526004016109429493929190611ca6565b600060405180830381600087803b15801561095c57600080fd5b505af1158015610970573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff16828463ffffffff167f0d381c2a574ae8f04e213db7cfb4df8df712cdbd427d9868ffef380660ca657460405160405180910390a460405185907f1cae38cdd3d3919489272725a5ae62a4f48b2989b0dae843d3c279fee18073a990600090a25050600160655550505050505050565b610a02610dce565b610a0a61120c565b6040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600080610a40610b3e565b6001610a4b60b85490565b610a559190611d05565b915091509091565b6000610a6b60655460021490565b905090565b60008173ffffffffffffffffffffffffffffffffffffffff1663de523cf36040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610af7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610af491810190611d29565b60015b15610b205773ffffffffffffffffffffffffffffffffffffffff811615610b1e5792915050565b505b505060975473ffffffffffffffffffffffffffffffffffffffff1690565b6000610a6b609861127f565b610b52610dce565b73ffffffffffffffffffffffffffffffffffffffff8116610bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610442565b610bfe816110e5565b50565b610c09610dce565b610bfe81610ff8565b6000610c2060655460021490565b15610c87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f70617573656400000000000000000000000000000000000000000000000000006044820152606401610442565b610800821115610cf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d736720746f6f206c6f6e6700000000000000000000000000000000000000006044820152606401610442565b6000610d2e6000610d0360b85490565b7f0000000000000000000000000000000000000000000000000000000000000000338a8a8a8a611292565b80516020820120909150610d436098826112d0565b858763ffffffff163373ffffffffffffffffffffffffffffffffffffffff167f769f711d20c679153d382254f59892613b58a97cc876b249134ac25c80f9c81485604051610d919190611d46565b60405180910390a460405181907f788dbc1b7152732178210e7f4d9d010ef016f9eafbe66786bd7169f56e0c353a90600090a29695505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610442565b606554600214610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f21706175736564000000000000000000000000000000000000000000000000006044820152606401610442565b6001606555565b600054610100900460ff16610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b600054610100900460ff16610ff0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b61054561140f565b73ffffffffffffffffffffffffffffffffffffffff81163b611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21636f6e747261637400000000000000000000000000000000000000000000006044820152606401610442565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa76ad0adbf45318f8633aa0210f711273d50fbb6fef76ed95bbae97082c75daa90600090a250565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061116b6001828486611db2565b61117491611ddc565b60f81c90505b92915050565b6000611190602d60298486611db2565b61119991611e22565b60e01c9392505050565b805160209091012090565b60006111c06111bd84846114af565b90565b9392505050565b6000611190600960058486611db2565b60006111e7602960098486611db2565b6111c091611e68565b36600061120083604d8187611db2565b915091505b9250929050565b606554600203611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f70617573656400000000000000000000000000000000000000000000000000006044820152606401610442565b6002606555565b600061117a8261128d6114bf565b611980565b606088888888888888886040516020016112b3989796959493929190611ea4565b604051602081830303815290604052905098975050505050505050565b60016112de6020600261205a565b6112e89190612066565b826020015410611354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d65726b6c6520747265652066756c6c000000000000000000000000000000006044820152606401610442565b60018260200160008282546113699190612079565b9091555050602082015460005b602081101561140657816001166001036113a5578284826020811061139d5761139d61208c565b015550505050565b8381602081106113b7576113b761208c565b015460408051602081019290925281018490526060016040516020818303038152906040528051906020012092506002826113f291906120bb565b9150806113fe816120f6565b915050611376565b5061052e61212e565b600054610100900460ff166114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b610545336110e5565b60006111e7604d602d8486611db2565b6114c7611a52565b600081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb560208201527fb4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3060408201527f21ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba8560608201527fe58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a1934460808201527f0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d60a08201527f887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a196860c08201527fffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f8360e08201527f9867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af6101008201527fcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e06101208201527ff9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a56101408201527ff8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8926101608201527f3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99c6101808201527fc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb6101a08201527f5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8becc6101c08201527fda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d26101e08201527f2733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981f6102008201527fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a6102208201527f5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a06102408201527fb46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa06102608201527fc65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e26102808201527ff4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd96102a08201527f5a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3776102c08201527f4df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee6526102e08201527fcdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef6103008201527f0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618d6103208201527fb8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d06103408201527f838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e6103608201527f662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e6103808201527f388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea3226103a08201527f93237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7356103c08201527f8448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a96103e082015290565b6020820154600090815b6020811015611a4a57600182821c1660008683602081106119ad576119ad61208c565b01549050816001036119ea576040805160208101839052908101869052606001604051602081830303815290604052805190602001209450611a35565b848684602081106119fd576119fd61208c565b6020020151604051602001611a1c929190918252602082015260400190565b6040516020818303038152906040528051906020012094505b50508080611a42906120f6565b91505061198a565b505092915050565b6040518061040001604052806020906020820280368337509192915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610bfe57600080fd5b60008060408385031215611aa657600080fd5b8235611ab181611a71565b91506020830135611ac181611a71565b809150509250929050565b60008083601f840112611ade57600080fd5b50813567ffffffffffffffff811115611af657600080fd5b60208301915083602082850101111561120557600080fd5b60008060008060408587031215611b2457600080fd5b843567ffffffffffffffff80821115611b3c57600080fd5b611b4888838901611acc565b90965094506020870135915080821115611b6157600080fd5b50611b6e87828801611acc565b95989497509550505050565b600060208284031215611b8c57600080fd5b5035919050565b600060208284031215611ba557600080fd5b81356111c081611a71565b60008060008060608587031215611bc657600080fd5b843563ffffffff81168114611bda57600080fd5b935060208501359250604085013567ffffffffffffffff811115611bfd57600080fd5b611b6e87828801611acc565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611c66604083018688611c09565b8281036020840152611c79818587611c09565b979650505050505050565b600060208284031215611c9657600080fd5b815180151581146111c057600080fd5b63ffffffff85168152836020820152606060408201526000611ccc606083018486611c09565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff828116828216039080821115611d2257611d22611cd6565b5092915050565b600060208284031215611d3b57600080fd5b81516111c081611a71565b600060208083528351808285015260005b81811015611d7357858101830151858201604001528201611d57565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008085851115611dc257600080fd5b83861115611dcf57600080fd5b5050820193919092039150565b7fff000000000000000000000000000000000000000000000000000000000000008135818116916001851015611a4a5760019490940360031b84901b1690921692915050565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611a4a5760049490940360031b84901b1690921692915050565b8035602083101561117a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7fff000000000000000000000000000000000000000000000000000000000000008960f81b16815260007fffffffff00000000000000000000000000000000000000000000000000000000808a60e01b166001840152808960e01b166005840152876009840152808760e01b1660298401525084602d8301528284604d8401375060009101604d01908152979650505050505050565b600181815b80851115611f9357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611f7957611f79611cd6565b80851615611f8657918102915b93841c9390800290611f3f565b509250929050565b600082611faa5750600161117a565b81611fb75750600061117a565b8160018114611fcd5760028114611fd757611ff3565b600191505061117a565b60ff841115611fe857611fe8611cd6565b50506001821b61117a565b5060208310610133831016604e8410600b8410161715612016575081810a61117a565b6120208383611f3a565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561205257612052611cd6565b029392505050565b60006111c08383611f9b565b8181038181111561117a5761117a611cd6565b8082018082111561117a5761117a611cd6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000826120f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361212757612127611cd6565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220d6f190bbbc6dd5996396b02e3f879b34f377436d5eb95ba31ba46f98da84871764736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061016c5760003560e01c8063907c0f92116100cd578063f2fde38b11610081578063fa31de0111610066578063fa31de011461030e578063fd54b22814610321578063ffa1ad741461032b57600080fd5b8063f2fde38b146102e8578063f794687a146102fb57600080fd5b8063e495f1d4116100b2578063e495f1d4146102aa578063e70f48ac146102cd578063ebf0c717146102e057600080fd5b8063907c0f9214610270578063b187bd261461029257600080fd5b8063715018a6116101245780638456cb59116101095780638456cb59146102235780638d3638f41461022b5780638da5cb5b1461025257600080fd5b8063715018a6146102085780637c39d1301461021057600080fd5b8063485cc95511610155578063485cc95514610199578063522ae002146101ac5780636e5f516e146101c357600080fd5b806306661abd146101715780633f4ba83a1461018f575b600080fd5b60b8545b60405163ffffffff90911681526020015b60405180910390f35b610197610345565b005b6101976101a7366004611a93565b610380565b6101b561080081565b604051908152602001610186565b6097546101e39073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b610197610533565b61019761021e366004611b0e565b610547565b6101976109fa565b6101757f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff166101e3565b610278610a35565b6040805192835263ffffffff909116602083015201610186565b61029a610a5d565b6040519015158152602001610186565b61029a6102b8366004611b7a565b60b96020526000908152604090205460ff1681565b6101e36102db366004611b93565b610a70565b6101b5610b3e565b6101976102f6366004611b93565b610b4a565b610197610309366004611b93565b610c01565b6101b561031c366004611bb0565b610c12565b60b8546101b59081565b610333600081565b60405160ff9091168152602001610186565b61034d610dce565b610355610e4f565b6040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b600054610100900460ff16158080156103a05750600054600160ff909116105b806103ba5750303b1580156103ba575060005460ff166001145b61044b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156104a957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6104b1610ec2565b6104b9610f59565b6104c283610b4a565b6104cb82610ff8565b801561052e57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61053b610dce565b61054560006110e5565b565b6001606554146105b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f7265656e7472616e742063616c6c20286f7220706175736564290000000000006044820152606401610442565b600060658190556105c4838361115c565b60ff161461062e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2176657273696f6e0000000000000000000000000000000000000000000000006044820152606401610442565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff1661065f8383611180565b63ffffffff16146106cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f2164657374696e6174696f6e00000000000000000000000000000000000000006044820152606401610442565b600061070d83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506111a392505050565b600081815260b9602052604090205490915060ff1615610789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f64656c69766572656400000000000000000000000000000000000000000000006044820152606401610442565b600081815260b96020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556107cd6102db85856111ae565b6040517ff7e83aee00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f7e83aee90610828908990899089908990600401611c52565b6020604051808303816000875af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b9190611c84565b6108d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f216d6f64756c65000000000000000000000000000000000000000000000000006044820152606401610442565b60006108dd85856111c7565b905060006108eb86866111d7565b905060006108f987876111ae565b90508073ffffffffffffffffffffffffffffffffffffffff166356d5d47584846109238b8b6111f0565b6040518563ffffffff1660e01b81526004016109429493929190611ca6565b600060405180830381600087803b15801561095c57600080fd5b505af1158015610970573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff16828463ffffffff167f0d381c2a574ae8f04e213db7cfb4df8df712cdbd427d9868ffef380660ca657460405160405180910390a460405185907f1cae38cdd3d3919489272725a5ae62a4f48b2989b0dae843d3c279fee18073a990600090a25050600160655550505050505050565b610a02610dce565b610a0a61120c565b6040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600080610a40610b3e565b6001610a4b60b85490565b610a559190611d05565b915091509091565b6000610a6b60655460021490565b905090565b60008173ffffffffffffffffffffffffffffffffffffffff1663de523cf36040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610af7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610af491810190611d29565b60015b15610b205773ffffffffffffffffffffffffffffffffffffffff811615610b1e5792915050565b505b505060975473ffffffffffffffffffffffffffffffffffffffff1690565b6000610a6b609861127f565b610b52610dce565b73ffffffffffffffffffffffffffffffffffffffff8116610bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610442565b610bfe816110e5565b50565b610c09610dce565b610bfe81610ff8565b6000610c2060655460021490565b15610c87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f70617573656400000000000000000000000000000000000000000000000000006044820152606401610442565b610800821115610cf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d736720746f6f206c6f6e6700000000000000000000000000000000000000006044820152606401610442565b6000610d2e6000610d0360b85490565b7f0000000000000000000000000000000000000000000000000000000000000000338a8a8a8a611292565b80516020820120909150610d436098826112d0565b858763ffffffff163373ffffffffffffffffffffffffffffffffffffffff167f769f711d20c679153d382254f59892613b58a97cc876b249134ac25c80f9c81485604051610d919190611d46565b60405180910390a460405181907f788dbc1b7152732178210e7f4d9d010ef016f9eafbe66786bd7169f56e0c353a90600090a29695505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610442565b606554600214610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f21706175736564000000000000000000000000000000000000000000000000006044820152606401610442565b6001606555565b600054610100900460ff16610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b600054610100900460ff16610ff0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b61054561140f565b73ffffffffffffffffffffffffffffffffffffffff81163b611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21636f6e747261637400000000000000000000000000000000000000000000006044820152606401610442565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa76ad0adbf45318f8633aa0210f711273d50fbb6fef76ed95bbae97082c75daa90600090a250565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061116b6001828486611db2565b61117491611ddc565b60f81c90505b92915050565b6000611190602d60298486611db2565b61119991611e22565b60e01c9392505050565b805160209091012090565b60006111c06111bd84846114af565b90565b9392505050565b6000611190600960058486611db2565b60006111e7602960098486611db2565b6111c091611e68565b36600061120083604d8187611db2565b915091505b9250929050565b606554600203611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f70617573656400000000000000000000000000000000000000000000000000006044820152606401610442565b6002606555565b600061117a8261128d6114bf565b611980565b606088888888888888886040516020016112b3989796959493929190611ea4565b604051602081830303815290604052905098975050505050505050565b60016112de6020600261205a565b6112e89190612066565b826020015410611354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d65726b6c6520747265652066756c6c000000000000000000000000000000006044820152606401610442565b60018260200160008282546113699190612079565b9091555050602082015460005b602081101561140657816001166001036113a5578284826020811061139d5761139d61208c565b015550505050565b8381602081106113b7576113b761208c565b015460408051602081019290925281018490526060016040516020818303038152906040528051906020012092506002826113f291906120bb565b9150806113fe816120f6565b915050611376565b5061052e61212e565b600054610100900460ff166114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b610545336110e5565b60006111e7604d602d8486611db2565b6114c7611a52565b600081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb560208201527fb4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3060408201527f21ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba8560608201527fe58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a1934460808201527f0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d60a08201527f887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a196860c08201527fffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f8360e08201527f9867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af6101008201527fcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e06101208201527ff9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a56101408201527ff8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8926101608201527f3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99c6101808201527fc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb6101a08201527f5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8becc6101c08201527fda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d26101e08201527f2733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981f6102008201527fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a6102208201527f5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a06102408201527fb46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa06102608201527fc65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e26102808201527ff4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd96102a08201527f5a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3776102c08201527f4df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee6526102e08201527fcdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef6103008201527f0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618d6103208201527fb8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d06103408201527f838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e6103608201527f662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e6103808201527f388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea3226103a08201527f93237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7356103c08201527f8448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a96103e082015290565b6020820154600090815b6020811015611a4a57600182821c1660008683602081106119ad576119ad61208c565b01549050816001036119ea576040805160208101839052908101869052606001604051602081830303815290604052805190602001209450611a35565b848684602081106119fd576119fd61208c565b6020020151604051602001611a1c929190918252602082015260400190565b6040516020818303038152906040528051906020012094505b50508080611a42906120f6565b91505061198a565b505092915050565b6040518061040001604052806020906020820280368337509192915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610bfe57600080fd5b60008060408385031215611aa657600080fd5b8235611ab181611a71565b91506020830135611ac181611a71565b809150509250929050565b60008083601f840112611ade57600080fd5b50813567ffffffffffffffff811115611af657600080fd5b60208301915083602082850101111561120557600080fd5b60008060008060408587031215611b2457600080fd5b843567ffffffffffffffff80821115611b3c57600080fd5b611b4888838901611acc565b90965094506020870135915080821115611b6157600080fd5b50611b6e87828801611acc565b95989497509550505050565b600060208284031215611b8c57600080fd5b5035919050565b600060208284031215611ba557600080fd5b81356111c081611a71565b60008060008060608587031215611bc657600080fd5b843563ffffffff81168114611bda57600080fd5b935060208501359250604085013567ffffffffffffffff811115611bfd57600080fd5b611b6e87828801611acc565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611c66604083018688611c09565b8281036020840152611c79818587611c09565b979650505050505050565b600060208284031215611c9657600080fd5b815180151581146111c057600080fd5b63ffffffff85168152836020820152606060408201526000611ccc606083018486611c09565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff828116828216039080821115611d2257611d22611cd6565b5092915050565b600060208284031215611d3b57600080fd5b81516111c081611a71565b600060208083528351808285015260005b81811015611d7357858101830151858201604001528201611d57565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008085851115611dc257600080fd5b83861115611dcf57600080fd5b5050820193919092039150565b7fff000000000000000000000000000000000000000000000000000000000000008135818116916001851015611a4a5760019490940360031b84901b1690921692915050565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611a4a5760049490940360031b84901b1690921692915050565b8035602083101561117a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7fff000000000000000000000000000000000000000000000000000000000000008960f81b16815260007fffffffff00000000000000000000000000000000000000000000000000000000808a60e01b166001840152808960e01b166005840152876009840152808760e01b1660298401525084602d8301528284604d8401375060009101604d01908152979650505050505050565b600181815b80851115611f9357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611f7957611f79611cd6565b80851615611f8657918102915b93841c9390800290611f3f565b509250929050565b600082611faa5750600161117a565b81611fb75750600061117a565b8160018114611fcd5760028114611fd757611ff3565b600191505061117a565b60ff841115611fe857611fe8611cd6565b50506001821b61117a565b5060208310610133831016604e8410600b8410161715612016575081810a61117a565b6120208383611f3a565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561205257612052611cd6565b029392505050565b60006111c08383611f9b565b8181038181111561117a5761117a611cd6565b8082018082111561117a5761117a611cd6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000826120f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361212757612127611cd6565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220d6f190bbbc6dd5996396b02e3f879b34f377436d5eb95ba31ba46f98da84871764736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/rust/abis/TestMultisigIsm.json b/rust/abis/TestMultisigIsm.json new file mode 100644 index 0000000..228c511 --- /dev/null +++ b/rust/abis/TestMultisigIsm.json @@ -0,0 +1,103 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TestMultisigIsm", + "sourceName": "contracts/test/TestMultisigIsm.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "accept", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "moduleType", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_val", + "type": "bool" + } + ], + "name": "setAccept", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "validatorsAndThreshold", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + }, + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "verify", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506000805460ff191660011790556103778061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80634fc3aa7c116100505780634fc3aa7c146100af5780636465e69f146100f0578063f7e83aee1461010a57600080fd5b80632852b71c1461006c5780632e0ed2341461008e575b600080fd5b6000546100799060ff1681565b60405190151581526020015b60405180910390f35b6100a161009c3660046101d7565b610126565b604051610085929190610219565b6100ee6100bd36600461027d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b005b6100f8600481565b60405160ff9091168152602001610085565b6100796101183660046102a6565b60005460ff16949350505050565b60408051600180825281830190925260609160009182916020808301908036833701905050905060008160008151811061016257610162610312565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101529150600190505b9250929050565b60008083601f8401126101a757600080fd5b50813567ffffffffffffffff8111156101bf57600080fd5b60208301915083602082850101111561018e57600080fd5b600080602083850312156101ea57600080fd5b823567ffffffffffffffff81111561020157600080fd5b61020d85828601610195565b90969095509350505050565b604080825283519082018190526000906020906060840190828701845b8281101561026857815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101610236565b50505060ff9490941692019190915250919050565b60006020828403121561028f57600080fd5b8135801515811461029f57600080fd5b9392505050565b600080600080604085870312156102bc57600080fd5b843567ffffffffffffffff808211156102d457600080fd5b6102e088838901610195565b909650945060208701359150808211156102f957600080fd5b5061030687828801610195565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea264697066735822122017c3918e1ebea8ac9a9de746c40c8b031b8fef948d0933d04030e580d6ee3bfa64736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100675760003560e01c80634fc3aa7c116100505780634fc3aa7c146100af5780636465e69f146100f0578063f7e83aee1461010a57600080fd5b80632852b71c1461006c5780632e0ed2341461008e575b600080fd5b6000546100799060ff1681565b60405190151581526020015b60405180910390f35b6100a161009c3660046101d7565b610126565b604051610085929190610219565b6100ee6100bd36600461027d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b005b6100f8600481565b60405160ff9091168152602001610085565b6100796101183660046102a6565b60005460ff16949350505050565b60408051600180825281830190925260609160009182916020808301908036833701905050905060008160008151811061016257610162610312565b73ffffffffffffffffffffffffffffffffffffffff909216602092830291909101909101529150600190505b9250929050565b60008083601f8401126101a757600080fd5b50813567ffffffffffffffff8111156101bf57600080fd5b60208301915083602082850101111561018e57600080fd5b600080602083850312156101ea57600080fd5b823567ffffffffffffffff81111561020157600080fd5b61020d85828601610195565b90969095509350505050565b604080825283519082018190526000906020906060840190828701845b8281101561026857815173ffffffffffffffffffffffffffffffffffffffff1684529284019290840190600101610236565b50505060ff9490941692019190915250919050565b60006020828403121561028f57600080fd5b8135801515811461029f57600080fd5b9392505050565b600080600080604085870312156102bc57600080fd5b843567ffffffffffffffff808211156102d457600080fd5b6102e088838901610195565b909650945060208701359150808211156102f957600080fd5b5061030687828801610195565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea264697066735822122017c3918e1ebea8ac9a9de746c40c8b031b8fef948d0933d04030e580d6ee3bfa64736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/rust/abis/TestRecipient.json b/rust/abis/TestRecipient.json new file mode 100644 index 0000000..e29e600 --- /dev/null +++ b/rust/abis/TestRecipient.json @@ -0,0 +1,232 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TestRecipient", + "sourceName": "contracts/test/TestRecipient.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "ReceivedCall", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "origin", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "sender", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "ReceivedMessage", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "fooBar", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_origin", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "_sender", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "handle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "interchainSecurityModule", + "outputs": [ + { + "internalType": "contract IInterchainSecurityModule", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastCallMessage", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastCaller", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastSender", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_ism", + "type": "address" + } + ], + "name": "setInterchainSecurityModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109d38061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100c85760003560e01c8063715018a611610081578063de523cf31161005b578063de523cf31461019d578063f07c1f47146101bd578063f2fde38b146101d057600080fd5b8063715018a61461016f5780638da5cb5b14610177578063a4982fde1461019557600080fd5b80632113522a116100b25780632113522a14610100578063256fec881461014557806356d5d4751461015c57600080fd5b80626e75ec146100cd5780630e72cc06146100eb575b600080fd5b6100d56101e3565b6040516100e291906105e0565b60405180910390f35b6100fe6100f93660046105fa565b610271565b005b6004546101209073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b61014e60025481565b6040519081526020016100e2565b6100fe61016a366004610679565b6102c0565b6100fe61031a565b60005473ffffffffffffffffffffffffffffffffffffffff16610120565b6100d561032e565b6001546101209073ffffffffffffffffffffffffffffffffffffffff1681565b6100fe6101cb3660046106de565b61033b565b6100fe6101de3660046105fa565b6103ca565b600380546101f09061072a565b80601f016020809104026020016040519081016040528092919081815260200182805461021c9061072a565b80156102695780601f1061023e57610100808354040283529160200191610269565b820191906000526020600020905b81548152906001019060200180831161024c57829003601f168201915b505050505081565b610279610486565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b828463ffffffff167fba67744c899113a84f615d51af5d82f5fedcf26c9a474d9363c3ad9b0bd501ac84846040516102f99291906107c6565b60405180910390a360028390556003610313828483610860565b5050505050565b610322610486565b61032c6000610507565b565b600580546101f09061072a565b3373ffffffffffffffffffffffffffffffffffffffff167f97d8367a1f39eb9e97f262fafbb05925c0bcfe120aaad7b9737cae34f749c2068484846040516103859392919061097a565b60405180910390a2600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905560056103c4828483610860565b50505050565b6103d2610486565b73ffffffffffffffffffffffffffffffffffffffff811661047a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61048381610507565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461032c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610471565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000815180845260005b818110156105a257602081850181015186830182015201610586565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006105f3602083018461057c565b9392505050565b60006020828403121561060c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146105f357600080fd5b60008083601f84011261064257600080fd5b50813567ffffffffffffffff81111561065a57600080fd5b60208301915083602082850101111561067257600080fd5b9250929050565b6000806000806060858703121561068f57600080fd5b843563ffffffff811681146106a357600080fd5b935060208501359250604085013567ffffffffffffffff8111156106c657600080fd5b6106d287828801610630565b95989497509550505050565b6000806000604084860312156106f357600080fd5b83359250602084013567ffffffffffffffff81111561071157600080fd5b61071d86828701610630565b9497909650939450505050565b600181811c9082168061073e57607f821691505b602082108103610777577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006107da60208301848661077d565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82111561085b57600081815260208120601f850160051c810160208610156108385750805b601f850160051c820191505b8181101561085757828155600101610844565b5050505b505050565b67ffffffffffffffff831115610878576108786107e2565b61088c83610886835461072a565b83610811565b6000601f8411600181146108de57600085156108a85750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610313565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561092d578685013582556020948501946001909201910161090d565b5086821015610968577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152600061099460408301848661077d565b9594505050505056fea26469706673582212205d3d83431969180ff80771b45e9b5540042b30ba13ab0219d5790e9d60e8bfec64736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c85760003560e01c8063715018a611610081578063de523cf31161005b578063de523cf31461019d578063f07c1f47146101bd578063f2fde38b146101d057600080fd5b8063715018a61461016f5780638da5cb5b14610177578063a4982fde1461019557600080fd5b80632113522a116100b25780632113522a14610100578063256fec881461014557806356d5d4751461015c57600080fd5b80626e75ec146100cd5780630e72cc06146100eb575b600080fd5b6100d56101e3565b6040516100e291906105e0565b60405180910390f35b6100fe6100f93660046105fa565b610271565b005b6004546101209073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b61014e60025481565b6040519081526020016100e2565b6100fe61016a366004610679565b6102c0565b6100fe61031a565b60005473ffffffffffffffffffffffffffffffffffffffff16610120565b6100d561032e565b6001546101209073ffffffffffffffffffffffffffffffffffffffff1681565b6100fe6101cb3660046106de565b61033b565b6100fe6101de3660046105fa565b6103ca565b600380546101f09061072a565b80601f016020809104026020016040519081016040528092919081815260200182805461021c9061072a565b80156102695780601f1061023e57610100808354040283529160200191610269565b820191906000526020600020905b81548152906001019060200180831161024c57829003601f168201915b505050505081565b610279610486565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b828463ffffffff167fba67744c899113a84f615d51af5d82f5fedcf26c9a474d9363c3ad9b0bd501ac84846040516102f99291906107c6565b60405180910390a360028390556003610313828483610860565b5050505050565b610322610486565b61032c6000610507565b565b600580546101f09061072a565b3373ffffffffffffffffffffffffffffffffffffffff167f97d8367a1f39eb9e97f262fafbb05925c0bcfe120aaad7b9737cae34f749c2068484846040516103859392919061097a565b60405180910390a2600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905560056103c4828483610860565b50505050565b6103d2610486565b73ffffffffffffffffffffffffffffffffffffffff811661047a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61048381610507565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461032c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610471565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000815180845260005b818110156105a257602081850181015186830182015201610586565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006105f3602083018461057c565b9392505050565b60006020828403121561060c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146105f357600080fd5b60008083601f84011261064257600080fd5b50813567ffffffffffffffff81111561065a57600080fd5b60208301915083602082850101111561067257600080fd5b9250929050565b6000806000806060858703121561068f57600080fd5b843563ffffffff811681146106a357600080fd5b935060208501359250604085013567ffffffffffffffff8111156106c657600080fd5b6106d287828801610630565b95989497509550505050565b6000806000604084860312156106f357600080fd5b83359250602084013567ffffffffffffffff81111561071157600080fd5b61071d86828701610630565b9497909650939450505050565b600181811c9082168061073e57607f821691505b602082108103610777577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006107da60208301848661077d565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82111561085b57600081815260208120601f850160051c810160208610156108385750805b601f850160051c820191505b8181101561085757828155600101610844565b5050505b505050565b67ffffffffffffffff831115610878576108786107e2565b61088c83610886835461072a565b83610811565b6000601f8411600181146108de57600085156108a85750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610313565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561092d578685013582556020948501946001909201910161090d565b5086821015610968577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152600061099460408301848661077d565b9594505050505056fea26469706673582212205d3d83431969180ff80771b45e9b5540042b30ba13ab0219d5790e9d60e8bfec64736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/rust/build.rs b/rust/build.rs new file mode 100644 index 0000000..f91e73e --- /dev/null +++ b/rust/build.rs @@ -0,0 +1,39 @@ +use std::{env::current_dir, path::PathBuf}; + +use ethers::prelude::Abigen; + +fn generate_bind(name: &str, abi_file: &str, bind_out: PathBuf) { + if bind_out.exists() { + std::fs::remove_file(&bind_out).unwrap(); + } + + Abigen::new(name, abi_file) + .unwrap() + .generate() + .unwrap() + .write_to_file(bind_out) + .unwrap(); +} + +fn main() { + let abi_base = current_dir().unwrap().join("abis"); + let bind_base = current_dir() + .unwrap() + .join("tests") + .join("contracts/eth/bind"); + let deployments = [ + ("Mailbox", "mailbox"), + ("FastHypERC20", "fast_hyp_erc20"), + ("FastHypERC20Collateral", "fast_hyp_erc20_collateral"), + ("TestMultisigIsm", "test_mock_ism"), + ("TestRecipient", "test_mock_msg_receiver"), + ]; + + for (abi_file, bind_out) in deployments { + generate_bind( + abi_file, + abi_base.join(format!("{abi_file}.json")).to_str().unwrap(), + bind_base.join(format!("{bind_out}.rs")), + ); + } +} diff --git a/rust/src/lib.rs b/rust/src/lib.rs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/rust/src/lib.rs @@ -0,0 +1 @@ + diff --git a/rust/tests/constants.rs b/rust/tests/constants.rs new file mode 100644 index 0000000..fe32976 --- /dev/null +++ b/rust/tests/constants.rs @@ -0,0 +1,7 @@ +pub const DOMAIN_EVM: u32 = 1; + +pub const DOMAIN_OSMO: u32 = 2; +pub const PREFIX_OSMO: &str = "osmo"; + +pub const DOMAIN_NTRN: u32 = 3; +pub const PREFIX_NTRN: &str = "neutron"; diff --git a/rust/tests/contracts/eth/bind/mod.rs b/rust/tests/contracts/eth/bind/mod.rs new file mode 100644 index 0000000..153c5d2 --- /dev/null +++ b/rust/tests/contracts/eth/bind/mod.rs @@ -0,0 +1,10 @@ +#[allow(clippy::all)] +pub mod fast_hyp_erc20; +#[allow(clippy::all)] +pub mod fast_hyp_erc20_collateral; +#[allow(clippy::all)] +pub mod mailbox; +#[allow(clippy::all)] +pub mod test_mock_ism; +#[allow(clippy::all)] +pub mod test_mock_msg_receiver; diff --git a/rust/tests/contracts/eth/deploy.rs b/rust/tests/contracts/eth/deploy.rs new file mode 100644 index 0000000..883abf7 --- /dev/null +++ b/rust/tests/contracts/eth/deploy.rs @@ -0,0 +1,36 @@ +use std::sync::Arc; + +use ethers::{prelude::SignerMiddleware, providers::Middleware, signers::Signer}; + +use super::{mailbox, test_mock_ism, test_mock_msg_receiver, types}; + +pub async fn deploy<'a, M: Middleware + 'static, S: Signer + 'static>( + signer: Arc>, + evm_domain: u32, +) -> eyre::Result> { + let ism_multisig_contract = test_mock_ism::TestMultisigIsm::deploy(signer.clone(), ())? + .send() + .await?; + + let msg_receiver_contract = test_mock_msg_receiver::TestRecipient::deploy(signer.clone(), ())? + .send() + .await?; + + let mailbox_contract = mailbox::Mailbox::deploy(signer.clone(), evm_domain)? + .send() + .await?; + + let _ = mailbox_contract + .initialize(signer.address(), ism_multisig_contract.address()) + .send() + .await? + .await?; + + let deployments = types::Deployments { + mailbox: mailbox_contract, + ism: ism_multisig_contract, + msg_receiver: msg_receiver_contract, + }; + + Ok(deployments) +} diff --git a/rust/tests/contracts/eth/mod.rs b/rust/tests/contracts/eth/mod.rs new file mode 100644 index 0000000..a6bb6f2 --- /dev/null +++ b/rust/tests/contracts/eth/mod.rs @@ -0,0 +1,8 @@ +mod bind; +mod deploy; +mod setup; +mod types; + +pub use bind::*; +pub use deploy::deploy; +pub use setup::{setup_env, Env}; diff --git a/rust/tests/contracts/eth/setup.rs b/rust/tests/contracts/eth/setup.rs new file mode 100644 index 0000000..6c4d025 --- /dev/null +++ b/rust/tests/contracts/eth/setup.rs @@ -0,0 +1,39 @@ +use std::{sync::Arc, time::Duration}; + +use ethers::{ + prelude::{k256::ecdsa::SigningKey, SignerMiddleware}, + providers::{Http, Middleware, Provider}, + signers::{LocalWallet, Signer, Wallet}, + utils::{Anvil, AnvilInstance}, +}; + +use super::{deploy, types::Deployments}; + +pub struct Env { + pub app: AnvilInstance, + pub core: Deployments, + pub domain: u32, + + pub acc_owner: S, +} + +pub async fn setup_env(domain: u32) -> eyre::Result, Wallet>> { + let app = Anvil::new().spawn(); + + let wallet = LocalWallet::from(app.keys()[0].clone()); + let wallet = wallet.with_chain_id(app.chain_id()); + + let provider = + Provider::::try_from(&app.endpoint())?.interval(Duration::from_millis(10u64)); + let signer = Arc::new(SignerMiddleware::new(provider, wallet.clone())); + + let core = deploy(signer.clone(), domain).await?; + + Ok(Env { + app, + core, + domain, + + acc_owner: wallet, + }) +} diff --git a/rust/tests/contracts/eth/types.rs b/rust/tests/contracts/eth/types.rs new file mode 100644 index 0000000..0f7f298 --- /dev/null +++ b/rust/tests/contracts/eth/types.rs @@ -0,0 +1,12 @@ +use ethers::{prelude::SignerMiddleware, providers::Middleware, signers::Signer}; + +use super::{ + mailbox::Mailbox, test_mock_ism::TestMultisigIsm, test_mock_msg_receiver::TestRecipient, +}; + +pub struct Deployments { + pub mailbox: Mailbox>, + + pub ism: TestMultisigIsm>, + pub msg_receiver: TestRecipient>, +} diff --git a/rust/tests/contracts/mod.rs b/rust/tests/contracts/mod.rs new file mode 100644 index 0000000..b4d1e5c --- /dev/null +++ b/rust/tests/contracts/mod.rs @@ -0,0 +1 @@ +pub mod eth; diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs new file mode 100644 index 0000000..7c7853b --- /dev/null +++ b/rust/tests/mailbox.rs @@ -0,0 +1,2 @@ +mod constants; +mod contracts; From 78cc61fd3b268bb20e20cc9794f981786f33f3ce Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Wed, 15 May 2024 16:43:20 +0100 Subject: [PATCH 02/26] feat: strk env setup --- rust/.gitignore | 2 + rust/Cargo.lock | 341 +++++++++++++++++++++++++- rust/Cargo.toml | 6 + rust/build.rs | 75 +++++- rust/tests/contracts/mod.rs | 1 + rust/tests/contracts/strk/bind/mod.rs | 10 + rust/tests/contracts/strk/deploy.rs | 13 + rust/tests/contracts/strk/hook.rs | 130 ++++++++++ rust/tests/contracts/strk/mod.rs | 11 + rust/tests/contracts/strk/setup.rs | 77 ++++++ rust/tests/contracts/strk/types.rs | 68 +++++ rust/tests/contracts/strk/utils.rs | 71 ++++++ rust/tests/mailbox.rs | 1 + rust/tests/validator.rs | 204 +++++++++++++++ 14 files changed, 994 insertions(+), 16 deletions(-) create mode 100644 rust/tests/contracts/strk/bind/mod.rs create mode 100644 rust/tests/contracts/strk/deploy.rs create mode 100644 rust/tests/contracts/strk/hook.rs create mode 100644 rust/tests/contracts/strk/mod.rs create mode 100644 rust/tests/contracts/strk/setup.rs create mode 100644 rust/tests/contracts/strk/types.rs create mode 100644 rust/tests/contracts/strk/utils.rs create mode 100644 rust/tests/validator.rs diff --git a/rust/.gitignore b/rust/.gitignore index 266a5cb..0ea9ce1 100644 --- a/rust/.gitignore +++ b/rust/.gitignore @@ -1,3 +1,5 @@ tests/contracts/eth/bind/*.rs !tests/contracts/eth/bind/mod.rs +tests/contracts/strk/bind/*.rs +!tests/contracts/strk/bind/mod.rs target/ \ No newline at end of file diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 0c34d59..320a914 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -62,6 +62,55 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.83" @@ -352,6 +401,87 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "cainome" +version = "0.2.3" +source = "git+https://github.com/cartridge-gg/cainome?tag=v0.2.9#33f054dadad4df7e7cd16a73bb75a2f90620d5ea" +dependencies = [ + "anyhow", + "async-trait", + "cainome-cairo-serde", + "cainome-parser", + "cainome-rs", + "cainome-rs-macro", + "camino", + "clap", + "clap_complete", + "convert_case", + "serde", + "serde_json", + "starknet", + "thiserror", + "tracing", + "tracing-subscriber", + "url", +] + +[[package]] +name = "cainome-cairo-serde" +version = "0.1.0" +source = "git+https://github.com/cartridge-gg/cainome?tag=v0.2.9#33f054dadad4df7e7cd16a73bb75a2f90620d5ea" +dependencies = [ + "starknet", + "thiserror", +] + +[[package]] +name = "cainome-parser" +version = "0.1.0" +source = "git+https://github.com/cartridge-gg/cainome?tag=v0.2.9#33f054dadad4df7e7cd16a73bb75a2f90620d5ea" +dependencies = [ + "convert_case", + "quote", + "serde_json", + "starknet", + "syn 2.0.63", + "thiserror", +] + +[[package]] +name = "cainome-rs" +version = "0.1.0" +source = "git+https://github.com/cartridge-gg/cainome?tag=v0.2.9#33f054dadad4df7e7cd16a73bb75a2f90620d5ea" +dependencies = [ + "anyhow", + "cainome-cairo-serde", + "cainome-parser", + "camino", + "prettyplease", + "proc-macro2", + "quote", + "serde_json", + "starknet", + "syn 2.0.63", + "thiserror", +] + +[[package]] +name = "cainome-rs-macro" +version = "0.1.0" +source = "git+https://github.com/cartridge-gg/cainome?tag=v0.2.9#33f054dadad4df7e7cd16a73bb75a2f90620d5ea" +dependencies = [ + "anyhow", + "cainome-cairo-serde", + "cainome-parser", + "cainome-rs", + "proc-macro2", + "quote", + "serde_json", + "starknet", + "syn 2.0.63", + "thiserror", +] + [[package]] name = "camino" version = "1.1.7" @@ -424,6 +554,55 @@ dependencies = [ "inout", ] +[[package]] +name = "clap" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_complete" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" +dependencies = [ + "clap", +] + +[[package]] +name = "clap_derive" +version = "4.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + [[package]] name = "coins-bip32" version = "0.8.7" @@ -476,6 +655,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + [[package]] name = "const-hex" version = "1.11.3" @@ -501,6 +686,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1457,6 +1651,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -1564,6 +1764,7 @@ name = "hyperlane-starknet" version = "0.0.2" dependencies = [ "anyhow", + "cainome", "ethers", "eyre", "rstest", @@ -1701,6 +1902,12 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + [[package]] name = "itertools" version = "0.10.5" @@ -1793,7 +2000,7 @@ dependencies = [ "lalrpop-util", "petgraph", "regex", - "regex-syntax", + "regex-syntax 0.8.3", "string_cache", "term", "tiny-keccak", @@ -1807,7 +2014,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata", + "regex-automata 0.4.6", ] [[package]] @@ -1860,6 +2067,15 @@ version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "md-5" version = "0.10.6" @@ -1908,6 +2124,16 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.5" @@ -2020,6 +2246,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "parity-scale-codec" version = "3.6.12" @@ -2320,7 +2552,7 @@ dependencies = [ "rand", "rand_chacha", "rand_xorshift", - "regex-syntax", + "regex-syntax 0.8.3", "unarray", ] @@ -2426,8 +2658,17 @@ checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -2438,9 +2679,15 @@ checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.3", ] +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + [[package]] name = "regex-syntax" version = "0.8.3" @@ -2899,6 +3146,15 @@ dependencies = [ "keccak", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "signature" version = "2.2.0" @@ -3192,7 +3448,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", @@ -3323,6 +3579,16 @@ dependencies = [ "syn 2.0.63", ] +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + [[package]] name = "time" version = "0.3.36" @@ -3512,6 +3778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", ] [[package]] @@ -3524,6 +3791,48 @@ dependencies = [ "tracing", ] +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -3595,6 +3904,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + [[package]] name = "unicode-xid" version = "0.2.4" @@ -3630,6 +3945,12 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "0.8.2" @@ -3640,6 +3961,12 @@ dependencies = [ "serde", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "version_check" version = "0.9.4" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 2925352..96f31e5 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -36,6 +36,9 @@ starknet = "0.10.0" [dev_dependencies] starknet = "0.10.0" +cainome = { git = "https://github.com/cartridge-gg/cainome", tag = "v0.2.9", features = [ + "abigen-rs", +] } ethers = "2.0.7" serde = { version = "1.0.162", default-features = false, features = ["derive"] } serde_json = "1.0.96" @@ -49,3 +52,6 @@ rstest = "0.18.2" [build-dependencies] ethers = "2.0.7" +cainome = { git = "https://github.com/cartridge-gg/cainome", tag = "v0.2.9", features = [ + "abigen-rs", +] } diff --git a/rust/build.rs b/rust/build.rs index f91e73e..25e2d46 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -1,8 +1,8 @@ -use std::{env::current_dir, path::PathBuf}; +use std::{collections::HashMap, env::current_dir, path::PathBuf}; use ethers::prelude::Abigen; -fn generate_bind(name: &str, abi_file: &str, bind_out: PathBuf) { +fn generate_eth_bind(name: &str, abi_file: &str, bind_out: PathBuf) { if bind_out.exists() { std::fs::remove_file(&bind_out).unwrap(); } @@ -15,13 +15,38 @@ fn generate_bind(name: &str, abi_file: &str, bind_out: PathBuf) { .unwrap(); } +fn generate_strk_bind(name: &str, abi_file: &str, bind_out: PathBuf) { + if bind_out.exists() { + std::fs::remove_file(&bind_out).unwrap(); + } + + let mut aliases = HashMap::new(); + aliases.insert( + String::from("openzeppelin::access::ownable::ownable::OwnableComponent::Event"), + String::from("OwnableCptEvent"), + ); + aliases.insert( + String::from("openzeppelin::upgrades::upgradeable::UpgradeableComponent::Event"), + String::from("UpgradeableCptEvent"), + ); + + let abigen = cainome::rs::Abigen::new(name, abi_file).with_types_aliases(aliases); + + abigen + .generate() + .expect("Fail to generate bindings") + .write_to_file(&bind_out.to_str().expect("valid utf8 path")) + .expect("Fail to write bindings to file"); +} + fn main() { - let abi_base = current_dir().unwrap().join("abis"); - let bind_base = current_dir() + // Generate Ethereum bindings + let eth_abi_base = current_dir().unwrap().join("abis"); + let eth_bind_base = current_dir() .unwrap() .join("tests") .join("contracts/eth/bind"); - let deployments = [ + let eth_deployments = [ ("Mailbox", "mailbox"), ("FastHypERC20", "fast_hyp_erc20"), ("FastHypERC20Collateral", "fast_hyp_erc20_collateral"), @@ -29,11 +54,43 @@ fn main() { ("TestRecipient", "test_mock_msg_receiver"), ]; - for (abi_file, bind_out) in deployments { - generate_bind( + for (abi_file, bind_out) in eth_deployments { + generate_eth_bind( + abi_file, + eth_abi_base + .join(format!("{abi_file}.json")) + .to_str() + .unwrap(), + eth_bind_base.join(format!("{bind_out}.rs")), + ); + } + + // Generate Starknet bindings + let strk_abi_base = current_dir() + .unwrap() + .parent() + .unwrap() + .join("contracts/target/dev"); + let strk_bind_base = current_dir() + .unwrap() + .join("tests") + .join("contracts/strk/bind"); + let strk_deployments = [ + ("mailbox", "mailbox"), + ("domain_routing_ism", "routing"), + ("ism", "ism"), + ("messageid_multisig_ism", "multisig_ism"), + ("validator_announce", "validator_announce"), + ]; + + for (abi_file, bind_out) in strk_deployments { + generate_strk_bind( abi_file, - abi_base.join(format!("{abi_file}.json")).to_str().unwrap(), - bind_base.join(format!("{bind_out}.rs")), + strk_abi_base + .join(format!("hyperlane_starknet_{abi_file}.contract_class.json")) + .to_str() + .unwrap(), + strk_bind_base.join(format!("{bind_out}.rs")), ); } } diff --git a/rust/tests/contracts/mod.rs b/rust/tests/contracts/mod.rs index b4d1e5c..630c1b4 100644 --- a/rust/tests/contracts/mod.rs +++ b/rust/tests/contracts/mod.rs @@ -1 +1,2 @@ pub mod eth; +pub mod strk; diff --git a/rust/tests/contracts/strk/bind/mod.rs b/rust/tests/contracts/strk/bind/mod.rs new file mode 100644 index 0000000..3ccdbe9 --- /dev/null +++ b/rust/tests/contracts/strk/bind/mod.rs @@ -0,0 +1,10 @@ +#[allow(clippy::all)] +pub mod ism; +#[allow(clippy::all)] +pub mod mailbox; +#[allow(clippy::all)] +pub mod multisig_ism; +#[allow(clippy::all)] +pub mod routing; +#[allow(clippy::all)] +pub mod validator_announce; diff --git a/rust/tests/contracts/strk/deploy.rs b/rust/tests/contracts/strk/deploy.rs new file mode 100644 index 0000000..344c58f --- /dev/null +++ b/rust/tests/contracts/strk/deploy.rs @@ -0,0 +1,13 @@ +use super::{hook::Hook, types::Codes, StarknetAccount}; + +pub fn deploy_core( + owner: StarknetAccount, + deployer: StarknetAccount, + codes: &Codes, + domain: u32, + default_ism: String, + default_hook: Hook, + required_hook: Hook, +) { + // deploy mailbox +} diff --git a/rust/tests/contracts/strk/hook.rs b/rust/tests/contracts/strk/hook.rs new file mode 100644 index 0000000..d16c32f --- /dev/null +++ b/rust/tests/contracts/strk/hook.rs @@ -0,0 +1,130 @@ +use std::collections::BTreeMap; + +use starknet::core::types::FieldElement; + +use super::{types::Codes, StarknetAccount}; + +#[allow(dead_code)] +pub enum Hook { + Mock { + gas: FieldElement, + }, + + Merkle {}, + + Pausable {}, + + Routing { + routes: Vec<(u32, Self)>, + }, + + RoutingCustom { + routes: Vec<(u32, Self)>, + custom_hooks: BTreeMap<(u32, FieldElement), Self>, + }, + + RoutingFallback { + routes: Vec<(u32, Self)>, + fallback_hook: Box, + }, + + Aggregate { + hooks: Vec, + }, +} + +#[allow(dead_code)] +impl Hook { + pub fn mock(gas: FieldElement) -> Self { + Self::Mock { gas } + } + + pub fn routing(routes: Vec<(u32, Self)>) -> Self { + Self::Routing { routes } + } +} + +impl Hook { + fn deploy_mock( + codes: &Codes, + gas: FieldElement, + deployer: &StarknetAccount, + ) -> eyre::Result { + // deploy mock hook + + // invoke set gas amount + + Ok("mock".to_string()) + } + + fn deploy_merkle( + codes: &Codes, + mailbox: String, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + // deploy merkle hook + + Ok("merkle".to_string()) + } + + fn deploy_pausable( + codes: &Codes, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + todo!("not implemented") + } + + fn deploy_routing( + code: u64, + codes: &Codes, + mailbox: String, + routes: Vec<(u32, Self)>, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + todo!("not implemented") + } + + fn deploy_aggregate( + code: u64, + codes: &Codes, + mailbox: String, + hooks: Vec, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + todo!("not implemented") + } + + pub fn deploy( + self, + + codes: &Codes, + mailbox: String, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + match self { + Hook::Mock { gas } => Self::deploy_mock(codes, gas, deployer), + Hook::Igp(igp) => todo!("not implemented"), + Hook::Merkle {} => Self::deploy_merkle(codes, mailbox, owner, deployer), + Hook::Pausable {} => Self::deploy_pausable(codes, owner, deployer), + Hook::Routing { routes } => todo!("not implemented"), + Hook::RoutingCustom { + routes, + custom_hooks, + } => { + todo!("not implemented") + } + Hook::RoutingFallback { + routes, + fallback_hook, + } => { + todo!("not implemented") + } + Hook::Aggregate { hooks } => todo!("not implemented"), + } + } +} diff --git a/rust/tests/contracts/strk/mod.rs b/rust/tests/contracts/strk/mod.rs new file mode 100644 index 0000000..b4763a1 --- /dev/null +++ b/rust/tests/contracts/strk/mod.rs @@ -0,0 +1,11 @@ +mod bind; +mod deploy; +mod hook; +mod setup; +mod types; +mod utils; + +pub use deploy::*; +pub use setup::{setup_env, Env}; +pub use types::StarknetAccount; +pub use utils::*; diff --git a/rust/tests/contracts/strk/setup.rs b/rust/tests/contracts/strk/setup.rs new file mode 100644 index 0000000..13930f6 --- /dev/null +++ b/rust/tests/contracts/strk/setup.rs @@ -0,0 +1,77 @@ +use std::{collections::BTreeMap, path::PathBuf}; + +use starknet::core::types::FieldElement; + +use crate::validator::TestValidators; + +use super::{ + deploy_core, get_dev_account, + hook::Hook, + types::{Codes, CoreDeployments}, + StarknetAccount, +}; + +const DEFAULT_GAS: u128 = 300_000; + +pub struct Env { + validators: BTreeMap, + + pub core: CoreDeployments, + pub declared_classes: Codes, + pub domain: u32, + + pub acc_owner: StarknetAccount, + pub acc_tester: StarknetAccount, + pub acc_deployer: StarknetAccount, +} + +impl Env { + pub fn get_validator_set(&self, domain: u32) -> eyre::Result<&TestValidators> { + self.validators + .get(&domain) + .ok_or(eyre::eyre!("no validator set found")) + } +} + +pub fn setup_env( + artifacts: Option>, + hrp: &str, + domain: u32, + validators: &[TestValidators], +) -> eyre::Result { + let owner = get_dev_account(0); + let deployer = get_dev_account(1); + let tester = get_dev_account(2); + + let default_ism = + prepare_routing_ism(validators.iter().map(|v| (v.domain, v.clone())).collect()); + + let default_hook = Hook::mock(FieldElement::from(DEFAULT_GAS)); + + let required_hook = Hook::Aggregate { + hooks: vec![Hook::Merkle {}], + }; + + let declared_classes = declare_all(&deployer, artifacts)?; + let core = deploy_core( + &owner, + &deployer, + &declared_classes, + domain, + default_ism, + default_hook, + required_hook, + )?; + + Ok(Env { + validators: validators.iter().map(|v| (v.domain, v.clone())).collect(), + + core, + declared_classes, + domain, + + acc_owner: owner, + acc_tester: tester, + acc_deployer: deployer, + }) +} diff --git a/rust/tests/contracts/strk/types.rs b/rust/tests/contracts/strk/types.rs new file mode 100644 index 0000000..9c141b8 --- /dev/null +++ b/rust/tests/contracts/strk/types.rs @@ -0,0 +1,68 @@ +use std::collections::BTreeMap; + +use starknet::{accounts::SingleOwnerAccount, providers::AnyProvider, signers::LocalWallet}; + +pub type StarknetAccount = SingleOwnerAccount; + +#[derive(serde::Serialize, serde::Deserialize)] +pub struct CodesMap(pub BTreeMap); + +impl FromIterator<(String, u64)> for CodesMap { + fn from_iter>(iter: T) -> Self { + Self(iter.into_iter().collect()) + } +} + +#[derive(serde::Serialize, serde::Deserialize)] +pub struct Codes { + pub mailbox: String, + #[serde(rename = "validator_announce")] + pub va: String, + + pub hook_aggregate: String, + pub hook_merkle: String, + pub hook_pausable: String, + pub hook_routing: String, + pub hook_routing_custom: String, + pub hook_routing_fallback: String, + + pub igp: String, + pub igp_oracle: String, + + pub ism_aggregate: String, + pub ism_multisig: String, + pub ism_routing: String, + + pub test_mock_hook: String, + pub test_mock_ism: String, + pub test_mock_msg_receiver: String, + + pub warp_strk20: String, + pub warp_native: String, + + pub strk20_base: String, +} + +impl TryFrom for Codes { + type Error = eyre::Error; + + fn try_from(v: CodesMap) -> Result { + let bin = serde_json::to_vec(&v)?; + + let ret = serde_json::from_slice(&bin)?; + + Ok(ret) + } +} + +#[derive(serde::Serialize, serde::Deserialize)] +pub struct CoreDeployments { + pub mailbox: String, + pub default_ism: String, + pub default_hook: String, + pub required_hook: String, + pub msg_receiver: String, +} + +#[derive(serde::Serialize, serde::Deserialize)] +pub struct WarpDeployments(pub BTreeMap); diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs new file mode 100644 index 0000000..03b2c57 --- /dev/null +++ b/rust/tests/contracts/strk/utils.rs @@ -0,0 +1,71 @@ +use starknet::{ + accounts::SingleOwnerAccount, + core::types::FieldElement, + providers::{jsonrpc::HttpTransport, AnyProvider, JsonRpcClient, Url}, + signers::LocalWallet, +}; + +use super::StarknetAccount; + +const KATANA_RPC_URL: &str = "http://localhost:5050"; + +const KATANA_PREFUNDED_ACCOUNTS: [(&str, &str); 3] = [ + ( + "0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca", + "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a", + ), + ( + "0xe29882a1fcba1e7e10cad46212257fea5c752a4f9b1b1ec683c503a2cf5c8a", + "0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642", + ), + ( + "0x29873c310fbefde666dc32a1554fea6bb45eecc84f680f8a2b0a8fbb8cb89af", + "0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912", + ), +]; + +const KATANA_CHAIN_ID: u32 = 82743958523457; + +/// Returns a pre-funded account for a local katana chain. +pub fn get_dev_account(index: u32) -> StarknetAccount { + let (address, private_key) = KATANA_PREFUNDED_ACCOUNTS + .get(index as usize) + .expect("Invalid index"); + + let signer = LocalWallet::from_signing_key(private_key); + build_single_owner_account(KATANA_RPC_URL, signer, address, false, KATANA_CHAIN_ID) +} + +/// Creates a single owner account for a given signer and account address. +/// +/// # Arguments +/// +/// * `rpc_url` - The rpc url of the chain. +/// * `signer` - The signer of the account. +/// * `account_address` - The address of the account. +/// * `is_legacy` - Whether the account is legacy (Cairo 0) or not. +/// * `domain_id` - The hyperlane domain id of the chain. +pub fn build_single_owner_account( + rpc_url: &Url, + signer: LocalWallet, + account_address: &FieldElement, + is_legacy: bool, + chain_id: u32, +) -> StarknetAccount { + let rpc_client = + AnyProvider::JsonRpcHttp(JsonRpcClient::new(HttpTransport::new(rpc_url.clone()))); + + let execution_encoding = if is_legacy { + starknet::accounts::ExecutionEncoding::Legacy + } else { + starknet::accounts::ExecutionEncoding::New + }; + + SingleOwnerAccount::new( + rpc_client, + signer, + *account_address, + chain_id, + execution_encoding, + ) +} diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs index 7c7853b..4659d6f 100644 --- a/rust/tests/mailbox.rs +++ b/rust/tests/mailbox.rs @@ -1,2 +1,3 @@ mod constants; mod contracts; +mod validator; diff --git a/rust/tests/validator.rs b/rust/tests/validator.rs new file mode 100644 index 0000000..5368c0e --- /dev/null +++ b/rust/tests/validator.rs @@ -0,0 +1,204 @@ +use ethers::types::{Address, H160}; +use ethers::utils::hex::FromHex; +use k256::{ + ecdsa::{RecoveryId, SigningKey, VerifyingKey}, + elliptic_curve::rand_core::OsRng, +}; + +#[derive(Clone)] +pub struct TestValidator { + pub priv_key: SigningKey, + pub pub_key: VerifyingKey, +} + +#[allow(dead_code)] +impl TestValidator { + fn random() -> Self { + let priv_key = SigningKey::random(&mut OsRng); + Self { + pub_key: VerifyingKey::from(&priv_key), + priv_key, + } + } + + fn from_key(priv_key_hex: &str) -> Self { + let h = >::from_hex(priv_key_hex).unwrap(); + let priv_key = SigningKey::from_bytes(h.as_slice().into()).unwrap(); + let pub_key = VerifyingKey::from(&priv_key); + + Self { priv_key, pub_key } + } + + fn pub_key_to_binary(&self) -> HexBinary { + self.pub_key + .to_encoded_point(true) + .as_bytes() + .to_vec() + .into() + } + + pub fn addr(&self, hrp: &str) -> String { + bech32_encode( + hrp, + pub_to_addr(self.pub_key_to_binary()).unwrap().as_slice(), + ) + .unwrap() + .into() + } + + pub fn to_val(&self, domain: u32) -> ValidatorSet { + ValidatorSet { + domain, + validator: eth_addr(self.pub_key.to_encoded_point(false).as_bytes().into()).unwrap(), + } + } + + pub fn sign(&self, digest: [u8; 32]) -> (Binary, RecoveryId) { + let (sign, recov_id) = self.priv_key.sign_prehash_recoverable(&digest).unwrap(); + + (Binary(sign.to_bytes().to_vec()), recov_id) + } +} + +#[derive(Clone)] +pub struct TestValidators { + pub domain: u32, + pub validators: Vec, + pub threshold: u8, +} + +impl TestValidators { + pub fn new(domain: u32, num: u8, threshold: u8) -> Self { + assert!(num >= threshold); + + let validators = vec![0; num as usize] + .into_iter() + .map(|_| TestValidator::random()) + .collect::>(); + + Self { + domain, + validators, + threshold, + } + } + + #[allow(dead_code)] + pub fn from_keys(domain: u32, keys: &[String], threshold: u8) -> Self { + assert!(keys.len() as u8 >= threshold); + + let validators = keys + .iter() + .map(|k| TestValidator::from_key(k)) + .collect::>(); + + Self { + domain, + validators, + threshold, + } + } + + pub fn to_set(&self) -> Vec { + self.validators + .iter() + .map(|v| v.to_val(self.domain)) + .collect::>() + } + + pub fn sign(&self, num: u8, digest: [u8; 32]) -> Vec { + let num = num as usize; + assert!(self.validators.len() >= num); + + let signatures = &self.validators[0..num] + .iter() + .map(|v| { + let (mut signature, recov_id) = v.sign(digest); + signature.0.extend(vec![recov_id.to_byte() + 27]); + signature.into() + }) + .collect::>(); + + signatures.clone() + } + + pub fn make_metadata( + &self, + origin_merkle_tree: Address, + merkle_root: [u8; 32], + merkle_index: u32, + message_id: [u8; 32], + is_passed: bool, + ) -> eyre::Result { + let mut addr = [0u8; 32]; + addr[32 - origin_merkle_tree.0.len()..].copy_from_slice(&origin_merkle_tree.0); + + let multisig_hash = hpl_ism_multisig::multisig_hash( + hpl_ism_multisig::domain_hash(self.domain, addr.to_vec().into())?.to_vec(), + merkle_root.to_vec(), + merkle_index, + message_id.to_vec(), + )?; + + let hashed_message = eth_hash(multisig_hash)?; + + let signatures = if is_passed { + self.sign(self.threshold, hashed_message.as_slice().try_into()?) + } else { + self.sign(self.threshold - 1, hashed_message.as_slice().try_into()?) + }; + + Ok(MessageIdMultisigIsmMetadata { + origin_merkle_tree: origin_merkle_tree.0.to_vec().into(), + merkle_root: merkle_root.to_vec().into(), + merkle_index: merkle_index.to_be_bytes().to_vec().into(), + signatures, + }) + } +} + +#[test] +fn test_validator() { + let owner = addr("owner"); + let validators = TestValidators::new(2, 5, 3); + + let mut deps = mock_dependencies(); + + hpl_ownable::initialize(deps.as_mut().storage, &owner).unwrap(); + + hpl_ism_multisig::contract::execute( + deps.as_mut(), + mock_env(), + mock_info(owner.as_str(), &[]), + hpl_interface::ism::multisig::ExecuteMsg::SetValidators { + domain: validators.domain, + threshold: validators.threshold, + validators: validators + .to_set() + .iter() + .map(|v| v.validator.clone()) + .collect(), + }, + ) + .unwrap(); + + let mut message: Message = gen_bz(100).into(); + message.origin_domain = validators.domain; + + let message_id = message.id(); + + let metadata = validators + .make_metadata( + H160::from_slice(gen_bz(20).as_slice()), + gen_bz(32).as_slice().try_into().unwrap(), + 0, + message_id.as_slice().try_into().unwrap(), + true, + ) + .unwrap(); + + let res = + hpl_ism_multisig::query::verify_message(deps.as_ref(), metadata.into(), message.into()) + .unwrap(); + assert!(res.verified); +} From 751b22256e9139c78223ec9e68301af76e7e7aa9 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 14:25:51 +0100 Subject: [PATCH 03/26] feat: ism deployment --- contracts/Scarb.toml | 6 + rust/Cargo.lock | 2 + rust/Cargo.toml | 4 + rust/tests/contracts/strk/deploy.rs | 16 ++- rust/tests/contracts/strk/hook.rs | 1 + rust/tests/contracts/strk/ism.rs | 173 ++++++++++++++++++++++++++++ rust/tests/contracts/strk/mod.rs | 1 + rust/tests/contracts/strk/setup.rs | 1 + rust/tests/contracts/strk/types.rs | 55 ++++----- rust/tests/contracts/strk/utils.rs | 46 +++++++- rust/tests/validator.rs | 136 +--------------------- 11 files changed, 274 insertions(+), 167 deletions(-) create mode 100644 rust/tests/contracts/strk/ism.rs diff --git a/contracts/Scarb.toml b/contracts/Scarb.toml index b3b678a..4b75385 100644 --- a/contracts/Scarb.toml +++ b/contracts/Scarb.toml @@ -20,4 +20,10 @@ snforge_std = { git = "https://github.com/foundry-rs/starknet-foundry", tag = "v sort-module-level-items = true [[target.starknet-contract]] +# Enable Sierra codegen. +sierra = true + +# Enable CASM codegen. casm = true +# Emit Python-powered hints in order to run compiled CASM class with legacy Cairo VM. +casm-add-pythonic-hints = true diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 320a914..a0a052d 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1767,6 +1767,8 @@ dependencies = [ "cainome", "ethers", "eyre", + "futures", + "k256", "rstest", "serde", "serde_json", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 96f31e5..08eb6f4 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -42,12 +42,16 @@ cainome = { git = "https://github.com/cartridge-gg/cainome", tag = "v0.2.9", fea ethers = "2.0.7" serde = { version = "1.0.162", default-features = false, features = ["derive"] } serde_json = "1.0.96" +futures = "0.3.30" # utilities thiserror = { version = "1.0.37" } anyhow = { version = "1.0.71", features = ["backtrace"] } eyre = { version = "0.6.8" } +# crypto +k256 = { version = "0.13.1", default-features = false, features = ["ecdsa"] } + rstest = "0.18.2" [build-dependencies] diff --git a/rust/tests/contracts/strk/deploy.rs b/rust/tests/contracts/strk/deploy.rs index 344c58f..da510b5 100644 --- a/rust/tests/contracts/strk/deploy.rs +++ b/rust/tests/contracts/strk/deploy.rs @@ -1,13 +1,19 @@ -use super::{hook::Hook, types::Codes, StarknetAccount}; +use super::{ + hook::Hook, + ism::Ism, + types::{Codes, CoreDeployments}, + StarknetAccount, +}; pub fn deploy_core( - owner: StarknetAccount, - deployer: StarknetAccount, + owner: &StarknetAccount, + deployer: &StarknetAccount, codes: &Codes, domain: u32, - default_ism: String, + default_ism: Ism, default_hook: Hook, required_hook: Hook, -) { +) -> eyre::Result { // deploy mailbox + Ok(CoreDeployments::default()) } diff --git a/rust/tests/contracts/strk/hook.rs b/rust/tests/contracts/strk/hook.rs index d16c32f..14f7965 100644 --- a/rust/tests/contracts/strk/hook.rs +++ b/rust/tests/contracts/strk/hook.rs @@ -11,6 +11,7 @@ pub enum Hook { }, Merkle {}, + Igp(u32), Pausable {}, diff --git a/rust/tests/contracts/strk/ism.rs b/rust/tests/contracts/strk/ism.rs new file mode 100644 index 0000000..1f458b9 --- /dev/null +++ b/rust/tests/contracts/strk/ism.rs @@ -0,0 +1,173 @@ +use cainome::cairo_serde::ContractAddress; +use futures::{stream::FuturesUnordered, StreamExt}; +use starknet::{accounts::Account, core::types::FieldElement, macros::felt}; + +use super::bind::multisig_ism::messageid_multisig_ism; +use super::bind::routing::domain_routing_ism; +use crate::validator::{self, TestValidators}; + +use super::{deploy_contract, types::Codes, StarknetAccount}; + +#[derive(Clone)] +pub enum Ism { + Routing(Vec<(u32, Self)>), + + Multisig { + validators: validator::TestValidators, + }, + + Aggregate { + isms: Vec, + threshold: u8, + }, + + #[allow(dead_code)] + Mock, +} + +impl Ism { + pub fn routing(isms: Vec<(u32, Self)>) -> Self { + Self::Routing(isms) + } + + pub fn multisig(validators: validator::TestValidators) -> Self { + Self::Multisig { validators } + } +} + +impl Ism { + async fn deploy_mock(codes: &Codes, deployer: &StarknetAccount) -> eyre::Result { + let res = deploy_contract(codes.test_mock_ism, vec![], felt!("0"), deployer).await; + Ok(res.0) + } + + async fn deploy_multisig( + codes: &Codes, + set: validator::TestValidators, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + let res = deploy_contract( + codes.ism_multisig, + vec![owner.address()], + felt!("0"), + deployer, + ) + .await; + + let contract = messageid_multisig_ism::new(res.0, owner); + contract + .set_validators( + &set.validators + .iter() + .map(|v| v.eth_addr()) + .collect::>(), + ) + .send() + .await?; + + Ok(res.0) + } + + async fn deploy_routing( + codes: &Codes, + isms: Vec<(u32, Self)>, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + let res = deploy_contract( + codes.ism_routing, + vec![owner.address()], + felt!("0"), + deployer, + ) + .await; + + let futures = FuturesUnordered::new(); + + for i in isms.iter() { + let future = async move { + ::clone(&i.1) + .deploy(codes, owner, deployer) + .await + }; + futures.push(future); + } + + let results = futures.collect::>().await; + + let modules: Vec<_> = results + .iter() + .map(|a| ContractAddress(*a.as_ref().unwrap())) + .collect(); + + let contract = domain_routing_ism::new(res.0, owner); + contract + .initialize(&isms.iter().map(|i| i.0).collect::>(), &modules) + .send() + .await?; + + Ok(res.0) + } + + async fn deploy_aggregate( + codes: &Codes, + isms: Vec, + threshold: u8, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + let futures = FuturesUnordered::new(); + + for i in isms.iter() { + let future = async move { + ::clone(&i) + .deploy(codes, owner, deployer) + .await + }; + futures.push(future); + } + + let results = futures.collect::>().await; + + let ism_addrs: Vec<_> = results.iter().map(|a| *a.as_ref().unwrap()).collect(); + + let res = deploy_contract(codes.ism_aggregate, ism_addrs, felt!("0"), deployer).await; + + Ok(res.0) + } + + pub async fn deploy( + self, + codes: &Codes, + owner: &StarknetAccount, + deployer: &StarknetAccount, + ) -> eyre::Result { + match self { + Self::Mock => Self::deploy_mock(codes, deployer).await, + Self::Multisig { validators: set } => { + Self::deploy_multisig(codes, set, owner, deployer).await + } + Self::Aggregate { isms, threshold } => { + Self::deploy_aggregate(codes, isms, threshold, owner, deployer).await + } + Self::Routing(isms) => Self::deploy_routing(codes, isms, owner, deployer).await, + } + } +} + +pub fn prepare_routing_ism(info: Vec<(u32, TestValidators)>) -> Ism { + let mut isms = vec![]; + + for (domain, set) in info { + isms.push(( + domain, + Ism::Aggregate { + isms: vec![Ism::multisig(set)], + threshold: 1, + }, + )); + } + + Ism::routing(isms) +} diff --git a/rust/tests/contracts/strk/mod.rs b/rust/tests/contracts/strk/mod.rs index b4763a1..8b6c8d8 100644 --- a/rust/tests/contracts/strk/mod.rs +++ b/rust/tests/contracts/strk/mod.rs @@ -1,6 +1,7 @@ mod bind; mod deploy; mod hook; +mod ism; mod setup; mod types; mod utils; diff --git a/rust/tests/contracts/strk/setup.rs b/rust/tests/contracts/strk/setup.rs index 13930f6..eb38106 100644 --- a/rust/tests/contracts/strk/setup.rs +++ b/rust/tests/contracts/strk/setup.rs @@ -7,6 +7,7 @@ use crate::validator::TestValidators; use super::{ deploy_core, get_dev_account, hook::Hook, + ism::prepare_routing_ism, types::{Codes, CoreDeployments}, StarknetAccount, }; diff --git a/rust/tests/contracts/strk/types.rs b/rust/tests/contracts/strk/types.rs index 9c141b8..d565c61 100644 --- a/rust/tests/contracts/strk/types.rs +++ b/rust/tests/contracts/strk/types.rs @@ -1,6 +1,9 @@ use std::collections::BTreeMap; -use starknet::{accounts::SingleOwnerAccount, providers::AnyProvider, signers::LocalWallet}; +use starknet::{ + accounts::SingleOwnerAccount, core::types::FieldElement, providers::AnyProvider, + signers::LocalWallet, +}; pub type StarknetAccount = SingleOwnerAccount; @@ -15,32 +18,32 @@ impl FromIterator<(String, u64)> for CodesMap { #[derive(serde::Serialize, serde::Deserialize)] pub struct Codes { - pub mailbox: String, + pub mailbox: FieldElement, #[serde(rename = "validator_announce")] - pub va: String, + pub va: FieldElement, - pub hook_aggregate: String, - pub hook_merkle: String, - pub hook_pausable: String, - pub hook_routing: String, - pub hook_routing_custom: String, - pub hook_routing_fallback: String, + pub hook_aggregate: FieldElement, + pub hook_merkle: FieldElement, + pub hook_pausable: FieldElement, + pub hook_routing: FieldElement, + pub hook_routing_custom: FieldElement, + pub hook_routing_fallback: FieldElement, - pub igp: String, - pub igp_oracle: String, + pub igp: FieldElement, + pub igp_oracle: FieldElement, - pub ism_aggregate: String, - pub ism_multisig: String, - pub ism_routing: String, + pub ism_aggregate: FieldElement, + pub ism_multisig: FieldElement, + pub ism_routing: FieldElement, - pub test_mock_hook: String, - pub test_mock_ism: String, - pub test_mock_msg_receiver: String, + pub test_mock_hook: FieldElement, + pub test_mock_ism: FieldElement, + pub test_mock_msg_receiver: FieldElement, - pub warp_strk20: String, - pub warp_native: String, + pub warp_strk20: FieldElement, + pub warp_native: FieldElement, - pub strk20_base: String, + pub strk20_base: FieldElement, } impl TryFrom for Codes { @@ -55,13 +58,13 @@ impl TryFrom for Codes { } } -#[derive(serde::Serialize, serde::Deserialize)] +#[derive(Default, serde::Serialize, serde::Deserialize)] pub struct CoreDeployments { - pub mailbox: String, - pub default_ism: String, - pub default_hook: String, - pub required_hook: String, - pub msg_receiver: String, + pub mailbox: FieldElement, + pub default_ism: FieldElement, + pub default_hook: FieldElement, + pub required_hook: FieldElement, + pub msg_receiver: FieldElement, } #[derive(serde::Serialize, serde::Deserialize)] diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 03b2c57..4ce59a8 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -1,8 +1,9 @@ use starknet::{ accounts::SingleOwnerAccount, - core::types::FieldElement, + contract::ContractFactory, + core::types::{BlockId, BlockTag, FieldElement, InvokeTransactionResult}, providers::{jsonrpc::HttpTransport, AnyProvider, JsonRpcClient, Url}, - signers::LocalWallet, + signers::{LocalWallet, SigningKey}, }; use super::StarknetAccount; @@ -28,12 +29,27 @@ const KATANA_CHAIN_ID: u32 = 82743958523457; /// Returns a pre-funded account for a local katana chain. pub fn get_dev_account(index: u32) -> StarknetAccount { - let (address, private_key) = KATANA_PREFUNDED_ACCOUNTS + let (address, private_key) = *KATANA_PREFUNDED_ACCOUNTS .get(index as usize) .expect("Invalid index"); - let signer = LocalWallet::from_signing_key(private_key); - build_single_owner_account(KATANA_RPC_URL, signer, address, false, KATANA_CHAIN_ID) + let signer = LocalWallet::from_signing_key(SigningKey::from_secret_scalar( + FieldElement::from_hex_be(&private_key).unwrap(), + )); + + let mut account = build_single_owner_account( + &Url::parse(KATANA_RPC_URL).expect("Invalid rpc url"), + signer, + &FieldElement::from_hex_be(address).unwrap(), + false, + KATANA_CHAIN_ID, + ); + + // `SingleOwnerAccount` defaults to checking nonce and estimating fees against the latest + // block. Optionally change the target block to pending with the following line: + account.set_block_id(BlockId::Tag(BlockTag::Pending)); + + account } /// Creates a single owner account for a given signer and account address. @@ -65,7 +81,25 @@ pub fn build_single_owner_account( rpc_client, signer, *account_address, - chain_id, + chain_id.into(), execution_encoding, ) } + +/// Deploys a contract with the given class hash, constructor calldata, and salt. +/// Returns the deployed address and the transaction result. +pub async fn deploy_contract( + class_hash: FieldElement, + constructor_calldata: Vec, + salt: FieldElement, + deployer: &StarknetAccount, +) -> (FieldElement, InvokeTransactionResult) { + let contract_factory = ContractFactory::new(class_hash, deployer); + + let deployment = contract_factory.deploy(constructor_calldata, salt, false); + + ( + deployment.deployed_address(), + deployment.send().await.expect("Failed to deploy contract"), + ) +} diff --git a/rust/tests/validator.rs b/rust/tests/validator.rs index 5368c0e..cb17dd3 100644 --- a/rust/tests/validator.rs +++ b/rust/tests/validator.rs @@ -1,9 +1,11 @@ +use cainome::cairo_serde::EthAddress; use ethers::types::{Address, H160}; use ethers::utils::hex::FromHex; use k256::{ ecdsa::{RecoveryId, SigningKey, VerifyingKey}, elliptic_curve::rand_core::OsRng, }; +use starknet::core::types::FieldElement; #[derive(Clone)] pub struct TestValidator { @@ -29,34 +31,11 @@ impl TestValidator { Self { priv_key, pub_key } } - fn pub_key_to_binary(&self) -> HexBinary { - self.pub_key - .to_encoded_point(true) - .as_bytes() - .to_vec() - .into() - } - - pub fn addr(&self, hrp: &str) -> String { - bech32_encode( - hrp, - pub_to_addr(self.pub_key_to_binary()).unwrap().as_slice(), + pub fn eth_addr(&self) -> EthAddress { + EthAddress( + FieldElement::from_byte_slice_be(&self.pub_key.to_encoded_point(false).as_bytes()) + .unwrap(), ) - .unwrap() - .into() - } - - pub fn to_val(&self, domain: u32) -> ValidatorSet { - ValidatorSet { - domain, - validator: eth_addr(self.pub_key.to_encoded_point(false).as_bytes().into()).unwrap(), - } - } - - pub fn sign(&self, digest: [u8; 32]) -> (Binary, RecoveryId) { - let (sign, recov_id) = self.priv_key.sign_prehash_recoverable(&digest).unwrap(); - - (Binary(sign.to_bytes().to_vec()), recov_id) } } @@ -98,107 +77,4 @@ impl TestValidators { threshold, } } - - pub fn to_set(&self) -> Vec { - self.validators - .iter() - .map(|v| v.to_val(self.domain)) - .collect::>() - } - - pub fn sign(&self, num: u8, digest: [u8; 32]) -> Vec { - let num = num as usize; - assert!(self.validators.len() >= num); - - let signatures = &self.validators[0..num] - .iter() - .map(|v| { - let (mut signature, recov_id) = v.sign(digest); - signature.0.extend(vec![recov_id.to_byte() + 27]); - signature.into() - }) - .collect::>(); - - signatures.clone() - } - - pub fn make_metadata( - &self, - origin_merkle_tree: Address, - merkle_root: [u8; 32], - merkle_index: u32, - message_id: [u8; 32], - is_passed: bool, - ) -> eyre::Result { - let mut addr = [0u8; 32]; - addr[32 - origin_merkle_tree.0.len()..].copy_from_slice(&origin_merkle_tree.0); - - let multisig_hash = hpl_ism_multisig::multisig_hash( - hpl_ism_multisig::domain_hash(self.domain, addr.to_vec().into())?.to_vec(), - merkle_root.to_vec(), - merkle_index, - message_id.to_vec(), - )?; - - let hashed_message = eth_hash(multisig_hash)?; - - let signatures = if is_passed { - self.sign(self.threshold, hashed_message.as_slice().try_into()?) - } else { - self.sign(self.threshold - 1, hashed_message.as_slice().try_into()?) - }; - - Ok(MessageIdMultisigIsmMetadata { - origin_merkle_tree: origin_merkle_tree.0.to_vec().into(), - merkle_root: merkle_root.to_vec().into(), - merkle_index: merkle_index.to_be_bytes().to_vec().into(), - signatures, - }) - } -} - -#[test] -fn test_validator() { - let owner = addr("owner"); - let validators = TestValidators::new(2, 5, 3); - - let mut deps = mock_dependencies(); - - hpl_ownable::initialize(deps.as_mut().storage, &owner).unwrap(); - - hpl_ism_multisig::contract::execute( - deps.as_mut(), - mock_env(), - mock_info(owner.as_str(), &[]), - hpl_interface::ism::multisig::ExecuteMsg::SetValidators { - domain: validators.domain, - threshold: validators.threshold, - validators: validators - .to_set() - .iter() - .map(|v| v.validator.clone()) - .collect(), - }, - ) - .unwrap(); - - let mut message: Message = gen_bz(100).into(); - message.origin_domain = validators.domain; - - let message_id = message.id(); - - let metadata = validators - .make_metadata( - H160::from_slice(gen_bz(20).as_slice()), - gen_bz(32).as_slice().try_into().unwrap(), - 0, - message_id.as_slice().try_into().unwrap(), - true, - ) - .unwrap(); - - let res = - hpl_ism_multisig::query::verify_message(deps.as_ref(), metadata.into(), message.into()) - .unwrap(); - assert!(res.verified); } From 81fa5dd1844af2c3a0692fec89cb26def4ad8741 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 15:29:46 +0100 Subject: [PATCH 04/26] feat: declare all --- rust/tests/contracts/strk/setup.rs | 11 +-- rust/tests/contracts/strk/utils.rs | 120 +++++++++++++++++++++++++++-- 2 files changed, 117 insertions(+), 14 deletions(-) diff --git a/rust/tests/contracts/strk/setup.rs b/rust/tests/contracts/strk/setup.rs index eb38106..e2ccc4f 100644 --- a/rust/tests/contracts/strk/setup.rs +++ b/rust/tests/contracts/strk/setup.rs @@ -5,7 +5,7 @@ use starknet::core::types::FieldElement; use crate::validator::TestValidators; use super::{ - deploy_core, get_dev_account, + declare_all, deploy_core, get_dev_account, hook::Hook, ism::prepare_routing_ism, types::{Codes, CoreDeployments}, @@ -34,12 +34,7 @@ impl Env { } } -pub fn setup_env( - artifacts: Option>, - hrp: &str, - domain: u32, - validators: &[TestValidators], -) -> eyre::Result { +pub async fn setup_env(hrp: &str, domain: u32, validators: &[TestValidators]) -> eyre::Result { let owner = get_dev_account(0); let deployer = get_dev_account(1); let tester = get_dev_account(2); @@ -53,7 +48,7 @@ pub fn setup_env( hooks: vec![Hook::Merkle {}], }; - let declared_classes = declare_all(&deployer, artifacts)?; + let declared_classes = declare_all(&deployer).await?; let core = deploy_core( &owner, &deployer, diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 4ce59a8..28aa11c 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -1,12 +1,19 @@ +use std::sync::Arc; + use starknet::{ - accounts::SingleOwnerAccount, + accounts::{Account, ConnectedAccount, SingleOwnerAccount}, contract::ContractFactory, - core::types::{BlockId, BlockTag, FieldElement, InvokeTransactionResult}, - providers::{jsonrpc::HttpTransport, AnyProvider, JsonRpcClient, Url}, + core::types::{ + contract::SierraClass, BlockId, BlockTag, FieldElement, InvokeTransactionResult, + StarknetError, + }, + providers::{jsonrpc::HttpTransport, AnyProvider, JsonRpcClient, Provider, ProviderError, Url}, signers::{LocalWallet, SigningKey}, }; -use super::StarknetAccount; +use super::{types::Codes, StarknetAccount}; + +const BUILD_PATH_PREFIX: &str = "../target/dev/hyperlane_starknet_"; const KATANA_RPC_URL: &str = "http://localhost:5050"; @@ -25,7 +32,7 @@ const KATANA_PREFUNDED_ACCOUNTS: [(&str, &str); 3] = [ ), ]; -const KATANA_CHAIN_ID: u32 = 82743958523457; +const KATANA_CHAIN_ID: u64 = 82743958523457; /// Returns a pre-funded account for a local katana chain. pub fn get_dev_account(index: u32) -> StarknetAccount { @@ -66,7 +73,7 @@ pub fn build_single_owner_account( signer: LocalWallet, account_address: &FieldElement, is_legacy: bool, - chain_id: u32, + chain_id: u64, ) -> StarknetAccount { let rpc_client = AnyProvider::JsonRpcHttp(JsonRpcClient::new(HttpTransport::new(rpc_url.clone()))); @@ -86,6 +93,22 @@ pub fn build_single_owner_account( ) } +/// Get the contract artifact from the build directory. +/// # Arguments +/// * `path` - The path to the contract artifact. +/// # Returns +/// The contract artifact. +fn contract_artifact(contract_name: &str) -> eyre::Result { + let artifact_path = format!("{BUILD_PATH_PREFIX}{contract_name}.contract_class.json"); + let file = std::fs::File::open(artifact_path).unwrap_or_else(|_| { + panic!( + "Compiled contract {} not found: run `scarb build` in ../contracts", + contract_name + ) + }); + serde_json::from_reader(file).map_err(Into::into) +} + /// Deploys a contract with the given class hash, constructor calldata, and salt. /// Returns the deployed address and the transaction result. pub async fn deploy_contract( @@ -103,3 +126,88 @@ pub async fn deploy_contract( deployment.send().await.expect("Failed to deploy contract"), ) } + +/// Check if a contract class is already declared. +/// # Arguments +/// * `provider` - The StarkNet provider. +/// * `class_hash` - The contract class hash. +/// # Returns +/// `true` if the contract class is already declared, `false` otherwise. +async fn is_already_declared

(provider: &P, class_hash: &FieldElement) -> eyre::Result +where + P: Provider, +{ + match provider + .get_class(BlockId::Tag(BlockTag::Pending), class_hash) + .await + { + Ok(_) => { + eprintln!("Not declaring class as it's already declared. Class hash:"); + println!("{}", format!("{:#064x}", class_hash)); + + Ok(true) + } + Err(ProviderError::StarknetError(StarknetError::ClassHashNotFound)) => Ok(false), + Err(err) => Err(err.into()), + } +} + +/// Declare a contract class. If the contract class is already declared, do nothing. +/// # Arguments +/// * `account` - The StarkNet account. +/// * `contract_name` - The contract name. +/// # Returns +/// The contract class hash. +async fn declare_contract( + account: &StarknetAccount, + contract_name: &str, +) -> eyre::Result { + // Load the contract artifact. + let contract_artifact = contract_artifact(contract_name)?; + + // Compute the contract class hash. + let class_hash = contract_artifact.class_hash()?; + + // Declare the contract class if it is not already declared. + if !is_already_declared(account.provider(), &class_hash).await? { + println!("\n==> Declaring Contract: {contract_name}"); + let flattened_class = contract_artifact.flatten()?; + account + .declare(Arc::new(flattened_class), class_hash) + .send() + .await?; + println!("Declared Class Hash: {}", format!("{:#064x}", class_hash)); + }; + + Ok(class_hash) +} + +pub async fn declare_all(deployer: &StarknetAccount) -> eyre::Result { + let mailbox = declare_contract(deployer, "mailbox").await?; + let va = declare_contract(deployer, "validator_announce").await?; + let ism_multisig = declare_contract(deployer, "messageid_multisig_ism").await?; + let test_mock_ism = declare_contract(deployer, "ism").await?; + let ism_routing = declare_contract(deployer, "domain_routing_ism").await?; + + Ok(Codes { + mailbox, + va, + hook_aggregate: FieldElement::ZERO, + hook_merkle: FieldElement::ZERO, + hook_pausable: FieldElement::ZERO, + hook_routing: FieldElement::ZERO, + hook_routing_custom: FieldElement::ZERO, + hook_routing_fallback: FieldElement::ZERO, + igp: FieldElement::ZERO, + igp_oracle: FieldElement::ZERO, + ism_aggregate: FieldElement::ZERO, + ism_multisig, + ism_routing, + test_mock_hook: FieldElement::ZERO, + test_mock_ism, + test_mock_msg_receiver: FieldElement::ZERO, + warp_strk20: FieldElement::ZERO, + warp_native: FieldElement::ZERO, + strk20_base: FieldElement::ZERO, + }) +} From 5767e3c10fd19c8aa7471929aadd95b688d061f1 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 15:45:04 +0100 Subject: [PATCH 05/26] feat: deploy core --- rust/tests/contracts/strk/deploy.rs | 54 +++++++++++++++++++++++++++-- rust/tests/contracts/strk/hook.rs | 43 +++++++++++------------ rust/tests/contracts/strk/setup.rs | 3 +- 3 files changed, 75 insertions(+), 25 deletions(-) diff --git a/rust/tests/contracts/strk/deploy.rs b/rust/tests/contracts/strk/deploy.rs index da510b5..096c205 100644 --- a/rust/tests/contracts/strk/deploy.rs +++ b/rust/tests/contracts/strk/deploy.rs @@ -1,11 +1,15 @@ +use starknet::accounts::{Account, ConnectedAccount}; + use super::{ + bind::mailbox::mailbox, + deploy_contract, hook::Hook, ism::Ism, types::{Codes, CoreDeployments}, StarknetAccount, }; -pub fn deploy_core( +pub async fn deploy_core( owner: &StarknetAccount, deployer: &StarknetAccount, codes: &Codes, @@ -15,5 +19,51 @@ pub fn deploy_core( required_hook: Hook, ) -> eyre::Result { // deploy mailbox - Ok(CoreDeployments::default()) + let (mailbox, _) = deploy_contract( + codes.mailbox, + vec![domain.into(), owner.address()], + deployer.get_nonce().await?, + deployer, + ) + .await; + + // set default ism, hook, igp + let default_ism = default_ism.deploy(codes, owner, deployer).await?; + let default_hook = default_hook + .deploy(codes, mailbox.clone(), owner, deployer) + .await?; + let required_hook = required_hook + .deploy(codes, mailbox.clone(), owner, deployer) + .await?; + + let mailbox_contract = mailbox::new(mailbox, owner); + mailbox_contract + .set_default_ism(&default_ism.into()) + .send() + .await?; + mailbox_contract + .set_default_hook(&default_hook.into()) + .send() + .await?; + mailbox_contract + .set_required_hook(&required_hook.into()) + .send() + .await?; + + // deploy test message receiver + let (msg_receiver, _) = deploy_contract( + codes.test_mock_msg_receiver, + vec![mailbox.clone()], + deployer.get_nonce().await?, + deployer, + ) + .await; + + Ok(CoreDeployments { + mailbox, + default_ism, + default_hook, + required_hook, + msg_receiver, + }) } diff --git a/rust/tests/contracts/strk/hook.rs b/rust/tests/contracts/strk/hook.rs index 14f7965..7d55686 100644 --- a/rust/tests/contracts/strk/hook.rs +++ b/rust/tests/contracts/strk/hook.rs @@ -46,72 +46,71 @@ impl Hook { } impl Hook { - fn deploy_mock( + async fn deploy_mock( codes: &Codes, gas: FieldElement, deployer: &StarknetAccount, - ) -> eyre::Result { + ) -> eyre::Result { // deploy mock hook // invoke set gas amount - Ok("mock".to_string()) + Ok(FieldElement::ZERO) } - fn deploy_merkle( + async fn deploy_merkle( codes: &Codes, - mailbox: String, + mailbox: FieldElement, owner: &StarknetAccount, deployer: &StarknetAccount, - ) -> eyre::Result { + ) -> eyre::Result { // deploy merkle hook - Ok("merkle".to_string()) + Ok(FieldElement::ZERO) } - fn deploy_pausable( + async fn deploy_pausable( codes: &Codes, owner: &StarknetAccount, deployer: &StarknetAccount, - ) -> eyre::Result { + ) -> eyre::Result { todo!("not implemented") } - fn deploy_routing( + async fn deploy_routing( code: u64, codes: &Codes, - mailbox: String, + mailbox: FieldElement, routes: Vec<(u32, Self)>, owner: &StarknetAccount, deployer: &StarknetAccount, - ) -> eyre::Result { + ) -> eyre::Result { todo!("not implemented") } - fn deploy_aggregate( + async fn deploy_aggregate( code: u64, codes: &Codes, - mailbox: String, + mailbox: FieldElement, hooks: Vec, owner: &StarknetAccount, deployer: &StarknetAccount, - ) -> eyre::Result { + ) -> eyre::Result { todo!("not implemented") } - pub fn deploy( + pub async fn deploy( self, - codes: &Codes, - mailbox: String, + mailbox: FieldElement, owner: &StarknetAccount, deployer: &StarknetAccount, - ) -> eyre::Result { + ) -> eyre::Result { match self { - Hook::Mock { gas } => Self::deploy_mock(codes, gas, deployer), + Hook::Mock { gas } => Self::deploy_mock(codes, gas, deployer).await, Hook::Igp(igp) => todo!("not implemented"), - Hook::Merkle {} => Self::deploy_merkle(codes, mailbox, owner, deployer), - Hook::Pausable {} => Self::deploy_pausable(codes, owner, deployer), + Hook::Merkle {} => Self::deploy_merkle(codes, mailbox, owner, deployer).await, + Hook::Pausable {} => Self::deploy_pausable(codes, owner, deployer).await, Hook::Routing { routes } => todo!("not implemented"), Hook::RoutingCustom { routes, diff --git a/rust/tests/contracts/strk/setup.rs b/rust/tests/contracts/strk/setup.rs index e2ccc4f..0ca88d4 100644 --- a/rust/tests/contracts/strk/setup.rs +++ b/rust/tests/contracts/strk/setup.rs @@ -57,7 +57,8 @@ pub async fn setup_env(hrp: &str, domain: u32, validators: &[TestValidators]) -> default_ism, default_hook, required_hook, - )?; + ) + .await?; Ok(Env { validators: validators.iter().map(|v| (v.domain, v.clone())).collect(), From a16c57d491b7da31949a5ea081df489115b3c077 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 16:29:49 +0100 Subject: [PATCH 06/26] feat: message sending + event parsing --- rust/Cargo.lock | 24 +++++++++ rust/Cargo.toml | 13 +++-- rust/tests/constants.rs | 7 +-- rust/tests/contracts/strk/mod.rs | 1 + rust/tests/contracts/strk/setup.rs | 2 +- rust/tests/contracts/strk/utils.rs | 2 +- rust/tests/event.rs | 14 +++++ rust/tests/mailbox.rs | 85 ++++++++++++++++++++++++++++++ 8 files changed, 138 insertions(+), 10 deletions(-) create mode 100644 rust/tests/event.rs diff --git a/rust/Cargo.lock b/rust/Cargo.lock index a0a052d..e3d8244 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1774,6 +1774,7 @@ dependencies = [ "serde_json", "starknet", "thiserror", + "tokio", ] [[package]] @@ -3157,6 +3158,15 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + [[package]] name = "signature" version = "2.2.0" @@ -3657,11 +3667,25 @@ dependencies = [ "libc", "mio", "num_cpus", + "parking_lot", "pin-project-lite", + "signal-hook-registry", "socket2", + "tokio-macros", "windows-sys 0.48.0", ] +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + [[package]] name = "tokio-rustls" version = "0.24.1" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 08eb6f4..69f478c 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -35,14 +35,22 @@ crate-type = ["cdylib", "rlib"] starknet = "0.10.0" [dev_dependencies] -starknet = "0.10.0" + +# starknet cainome = { git = "https://github.com/cartridge-gg/cainome", tag = "v0.2.9", features = [ "abigen-rs", ] } +starknet = "0.10.0" + +# eth ethers = "2.0.7" + +# testing +futures = "0.3.30" +rstest = "0.18.2" serde = { version = "1.0.162", default-features = false, features = ["derive"] } serde_json = "1.0.96" -futures = "0.3.30" +tokio = { version = "1", features = ["full"] } # utilities thiserror = { version = "1.0.37" } @@ -52,7 +60,6 @@ eyre = { version = "0.6.8" } # crypto k256 = { version = "0.13.1", default-features = false, features = ["ecdsa"] } -rstest = "0.18.2" [build-dependencies] ethers = "2.0.7" diff --git a/rust/tests/constants.rs b/rust/tests/constants.rs index fe32976..66616c5 100644 --- a/rust/tests/constants.rs +++ b/rust/tests/constants.rs @@ -1,7 +1,4 @@ pub const DOMAIN_EVM: u32 = 1; -pub const DOMAIN_OSMO: u32 = 2; -pub const PREFIX_OSMO: &str = "osmo"; - -pub const DOMAIN_NTRN: u32 = 3; -pub const PREFIX_NTRN: &str = "neutron"; +pub const DOMAIN_STRK: u32 = 2; +pub const PREFIX_STRK: &str = "strk"; diff --git a/rust/tests/contracts/strk/mod.rs b/rust/tests/contracts/strk/mod.rs index 8b6c8d8..12456b7 100644 --- a/rust/tests/contracts/strk/mod.rs +++ b/rust/tests/contracts/strk/mod.rs @@ -6,6 +6,7 @@ mod setup; mod types; mod utils; +pub use bind::*; pub use deploy::*; pub use setup::{setup_env, Env}; pub use types::StarknetAccount; diff --git a/rust/tests/contracts/strk/setup.rs b/rust/tests/contracts/strk/setup.rs index 0ca88d4..cdafce3 100644 --- a/rust/tests/contracts/strk/setup.rs +++ b/rust/tests/contracts/strk/setup.rs @@ -34,7 +34,7 @@ impl Env { } } -pub async fn setup_env(hrp: &str, domain: u32, validators: &[TestValidators]) -> eyre::Result { +pub async fn setup_env(domain: u32, validators: &[TestValidators]) -> eyre::Result { let owner = get_dev_account(0); let deployer = get_dev_account(1); let tester = get_dev_account(2); diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 28aa11c..d298b52 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -13,7 +13,7 @@ use starknet::{ use super::{types::Codes, StarknetAccount}; -const BUILD_PATH_PREFIX: &str = "../target/dev/hyperlane_starknet_"; +const BUILD_PATH_PREFIX: &str = "../contracts/target/dev/hyperlane_starknet_"; const KATANA_RPC_URL: &str = "http://localhost:5050"; diff --git a/rust/tests/event.rs b/rust/tests/event.rs new file mode 100644 index 0000000..e72a569 --- /dev/null +++ b/rust/tests/event.rs @@ -0,0 +1,14 @@ +use crate::strk::mailbox::Dispatch as DispatchEvent; +use starknet::core::{types::Event, utils::get_selector_from_name}; + +pub fn parse_dispatch_from_res(events: &[Event]) -> DispatchEvent { + let key = get_selector_from_name("Dispatch").unwrap(); // safe to unwrap + let found = events.iter().find(|v| v.keys.contains(&key)).unwrap(); + + DispatchEvent { + sender: cainome::cairo_serde::ContractAddress(found.data[0]), + destination_domain: found.data[1].try_into().unwrap(), + recipient_address: cainome::cairo_serde::ContractAddress(found.data[2]), + message: (found.data[3], found.data[4]).try_into().unwrap(), + } +} diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs index 4659d6f..bf8e7a2 100644 --- a/rust/tests/mailbox.rs +++ b/rust/tests/mailbox.rs @@ -1,3 +1,88 @@ +use contracts::strk::mailbox::{mailbox, Bytes}; +use ethers::{ + prelude::parse_log, providers::Middleware, signers::Signer, types::TransactionReceipt, +}; +use event::parse_dispatch_from_res; +use starknet::{ + accounts::{Account, ConnectedAccount}, + core::types::{FieldElement, MaybePendingTransactionReceipt}, + providers::{AnyProvider, Provider}, +}; + +use crate::{ + constants::{DOMAIN_EVM, DOMAIN_STRK}, + contracts::{eth, strk}, + validator::TestValidators, +}; + mod constants; mod contracts; +mod event; mod validator; + +async fn send_msg_strk_to_evm( + from: &strk::Env, + to: ð::Env, +) -> eyre::Result +where + M: Middleware + 'static, + S: Signer + 'static, +{ + let mut receiver = [0u8; 32]; + receiver[12..].copy_from_slice(&to.core.msg_receiver.address().0); + let _sender = from.acc_tester.address(); + let msg_body = b"hello world"; + + // dispatch + let mailbox_contract = mailbox::new(from.core.mailbox, &from.acc_tester); + let dispatch_res = mailbox_contract + .dispatch( + &DOMAIN_EVM, + &cainome::cairo_serde::ContractAddress(FieldElement::from_bytes_be(&receiver).unwrap()), + &Bytes { + size: msg_body.len() as u32, + data: msg_body.iter().map(|b| *b as u128).collect(), + }, + &None, + &None, + ) + .send() + .await?; + let strk_provider: &AnyProvider = from.acc_owner.provider(); + let dispatch_receipt = strk_provider + .get_transaction_receipt(dispatch_res.transaction_hash) + .await?; + + let dispatch = match dispatch_receipt { + MaybePendingTransactionReceipt::PendingReceipt(_) => { + return Err(eyre::eyre!("Transaction is pending")) + } + MaybePendingTransactionReceipt::Receipt(receipt) => match receipt { + starknet::core::types::TransactionReceipt::Invoke(receipt) => { + parse_dispatch_from_res(&receipt.events) + } + _ => return Err(eyre::eyre!("Unexpected receipt type, check the hash")), + }, + }; + + let process_tx = to.core.mailbox.process( + vec![].into(), + dispatch.message.to_bytes_be().as_slice().to_vec().into(), + ); + let process_tx_res = process_tx.send().await?.await?.unwrap(); + + Ok(process_tx_res) +} + +#[tokio::test] +async fn test_mailbox_cw_to_evm() -> eyre::Result<()> { + // init starknet env + let strk = strk::setup_env(DOMAIN_STRK, &[TestValidators::new(DOMAIN_EVM, 5, 3)]).await?; + + // init eth env + let anvil = eth::setup_env(DOMAIN_EVM).await?; + + let _ = send_msg_strk_to_evm(&strk, &anvil).await?; + + Ok(()) +} From 241a5ae1e23f2f83baf7f7eca62790c8e081660c Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 16:59:26 +0100 Subject: [PATCH 07/26] fix: compiled class hash --- contracts/Scarb.toml | 2 +- rust/Cargo.lock | 842 ++++++++++++++++++++++++++++- rust/Cargo.toml | 1 + rust/tests/contracts/strk/utils.rs | 27 +- 4 files changed, 847 insertions(+), 25 deletions(-) diff --git a/contracts/Scarb.toml b/contracts/Scarb.toml index 4b75385..45f91f2 100644 --- a/contracts/Scarb.toml +++ b/contracts/Scarb.toml @@ -26,4 +26,4 @@ sierra = true # Enable CASM codegen. casm = true # Emit Python-powered hints in order to run compiled CASM class with legacy Cairo VM. -casm-add-pythonic-hints = true +casm-add-pythonic-hints = false diff --git a/rust/Cargo.lock b/rust/Cargo.lock index e3d8244..3ea7a6f 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -38,6 +38,18 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.3" @@ -47,6 +59,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -134,7 +152,7 @@ dependencies = [ "digest", "itertools 0.10.5", "num-bigint", - "num-traits", + "num-traits 0.2.19", "paste", "rustc_version", "zeroize", @@ -157,7 +175,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ "num-bigint", - "num-traits", + "num-traits 0.2.19", "proc-macro2", "quote", "syn 1.0.109", @@ -180,7 +198,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ - "num-traits", + "num-traits 0.2.19", "rand", ] @@ -199,6 +217,12 @@ dependencies = [ "term", ] +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + [[package]] name = "async-trait" version = "0.1.80" @@ -291,7 +315,7 @@ checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" dependencies = [ "num-bigint", "num-integer", - "num-traits", + "num-traits 0.2.19", "serde", ] @@ -482,6 +506,439 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cairo-felt" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae932292b9ba497a4e892b56aa4e0c6f329a455180fdbdc132700dfe68d9b153" +dependencies = [ + "lazy_static", + "num-bigint", + "num-integer", + "num-traits 0.2.19", + "serde", +] + +[[package]] +name = "cairo-lang-casm" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d9c31baeb6b52586b5adc88f01e90f86389d63d94363c562de5c79352e545b" +dependencies = [ + "cairo-lang-utils", + "indoc", + "num-bigint", + "num-traits 0.2.19", + "parity-scale-codec", + "serde", +] + +[[package]] +name = "cairo-lang-compiler" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7148cb2d72a3db24a6d2ef2b2602102cc5099cb9f6b913e5047fb009cb3a22a1" +dependencies = [ + "anyhow", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-parser", + "cairo-lang-project", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-syntax", + "cairo-lang-utils", + "salsa", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-debug" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a761eb8e31ea65a2dd45f729c74f1770315f97124dad93d1f6853a10d460c6b" +dependencies = [ + "cairo-lang-utils", +] + +[[package]] +name = "cairo-lang-defs" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d60bc5d72fe7a95ba34e041dcbdf1cf3bfccb87008a515514b74913fa8ff05" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "itertools 0.11.0", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-diagnostics" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356089e1b0a0ba9e115566191745613b3806a20259ad76764df82ab534d5412a" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-filesystem", + "cairo-lang-utils", + "itertools 0.11.0", +] + +[[package]] +name = "cairo-lang-eq-solver" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc43246cc2e5afd5a028bcdd63876ac3f8b1f4fb3ff785daaa0f0fbb51c9d906" +dependencies = [ + "cairo-lang-utils", + "good_lp", +] + +[[package]] +name = "cairo-lang-filesystem" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bcb9a4a40e53fa099774bd08bbcc3430f51213cc7fb1b50c2e9d01155731798" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-utils", + "path-clean", + "salsa", + "serde", + "smol_str", +] + +[[package]] +name = "cairo-lang-lowering" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba60e1e2477aa0f610ccf29189097d580464607c94b51741e1c18e64d6cee5f" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-proc-macros", + "cairo-lang-semantic", + "cairo-lang-syntax", + "cairo-lang-utils", + "id-arena", + "itertools 0.11.0", + "log", + "num-bigint", + "num-traits 0.2.19", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-parser" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f16ba1535e0cc5e79c2eff6592859bbdac03dc53d4dcdd26dbdbc04a77c3f5c" +dependencies = [ + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-syntax", + "cairo-lang-syntax-codegen", + "cairo-lang-utils", + "colored", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.19", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-plugins" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81c8cf6e0ee3d6b19429cc1663738b22f1ecea7d51bf7452e8e1086f08798baf" +dependencies = [ + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "indent", + "indoc", + "itertools 0.11.0", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-proc-macros" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67f9da66325ce7ed6c002360f26106fe79deb9f8a2fca30abdbb8d388da7bb46" +dependencies = [ + "cairo-lang-debug", + "quote", + "syn 2.0.63", +] + +[[package]] +name = "cairo-lang-project" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e198af1ab3d05c7fb8b6a9a7a2e9bce245a6c855df5f770b751d29874a23b152" +dependencies = [ + "cairo-lang-filesystem", + "cairo-lang-utils", + "serde", + "smol_str", + "thiserror", + "toml", +] + +[[package]] +name = "cairo-lang-semantic" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d7df81521c2125e3e95b683cc99374db1aebd7ddb317c5ca3dd92a235a9eb13" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-plugins", + "cairo-lang-proc-macros", + "cairo-lang-syntax", + "cairo-lang-utils", + "id-arena", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.19", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-sierra" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07da3ca1434c62a7cc7cd77d2941ef47a1c23b37325781b59407b78d8c61d863" +dependencies = [ + "anyhow", + "cairo-felt", + "cairo-lang-utils", + "const-fnv1a-hash", + "convert_case", + "derivative", + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "num-bigint", + "num-traits 0.2.19", + "regex", + "salsa", + "serde", + "serde_json", + "sha3", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-ap-change" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "122c9055eb609a511178e3dce577de061819fd4c4c6b7452804557f76ca43bbf" +dependencies = [ + "cairo-lang-eq-solver", + "cairo-lang-sierra", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "itertools 0.11.0", + "num-traits 0.2.19", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-gas" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf049d9aea65c6e38da219a3700c72f78795d11449d9adcec28047ef8d63bd23" +dependencies = [ + "cairo-lang-eq-solver", + "cairo-lang-sierra", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "itertools 0.11.0", + "num-traits 0.2.19", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-generator" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1d75e0830279ca1bd0189e3326720d6e081225f7d81ed060bbd22c6b37e980" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-parser", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-syntax", + "cairo-lang-utils", + "itertools 0.11.0", + "num-traits 0.2.19", + "once_cell", + "salsa", + "smol_str", +] + +[[package]] +name = "cairo-lang-sierra-to-casm" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a3c3be88c8562fbf93b0803c186e7282f6daad93576c07f61b04a591fde468f" +dependencies = [ + "assert_matches", + "cairo-felt", + "cairo-lang-casm", + "cairo-lang-sierra", + "cairo-lang-sierra-ap-change", + "cairo-lang-sierra-gas", + "cairo-lang-sierra-type-size", + "cairo-lang-utils", + "indoc", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.19", + "thiserror", +] + +[[package]] +name = "cairo-lang-sierra-type-size" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38da6f98c6b16945c89d2ae351c82d636ed38d3e6eb02f7c8679e3e03a63988" +dependencies = [ + "cairo-lang-sierra", + "cairo-lang-utils", +] + +[[package]] +name = "cairo-lang-starknet" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9ffa8b3b8c47138c36b1907cebb5047dfc4de29ec10ece5bd6d6853243ec50" +dependencies = [ + "anyhow", + "cairo-felt", + "cairo-lang-compiler", + "cairo-lang-defs", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-lowering", + "cairo-lang-plugins", + "cairo-lang-semantic", + "cairo-lang-sierra", + "cairo-lang-sierra-generator", + "cairo-lang-starknet-classes", + "cairo-lang-syntax", + "cairo-lang-utils", + "const_format", + "indent", + "indoc", + "itertools 0.11.0", + "once_cell", + "serde", + "serde_json", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-starknet-classes" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47c64ae2bb00173e3a88760128bf72de356fa80eb19fa47602479063648b4003" +dependencies = [ + "cairo-felt", + "cairo-lang-casm", + "cairo-lang-sierra", + "cairo-lang-sierra-to-casm", + "cairo-lang-utils", + "convert_case", + "itertools 0.11.0", + "num-bigint", + "num-integer", + "num-traits 0.2.19", + "once_cell", + "serde", + "serde_json", + "sha3", + "smol_str", + "starknet-crypto", + "thiserror", +] + +[[package]] +name = "cairo-lang-syntax" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8262c426a57e1e5ec297db24278464841500613445e2cb1c43d5f71ad91ee8d6" +dependencies = [ + "cairo-lang-debug", + "cairo-lang-filesystem", + "cairo-lang-utils", + "num-bigint", + "num-traits 0.2.19", + "salsa", + "smol_str", + "unescaper", +] + +[[package]] +name = "cairo-lang-syntax-codegen" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e2d692eae4bb4179a4a1148fd5eb738a91653d86750c813658ffad4a99fa97" +dependencies = [ + "genco", + "xshell", +] + +[[package]] +name = "cairo-lang-utils" +version = "2.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf733a7cdc4166d0baf0ed8a98d9ada827daee6653b37d9326e334e53481c6d3" +dependencies = [ + "hashbrown 0.14.5", + "indexmap 2.2.6", + "itertools 0.11.0", + "num-bigint", + "num-traits 0.2.19", + "schemars", + "serde", +] + [[package]] name = "camino" version = "1.1.7" @@ -539,7 +996,7 @@ checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", - "num-traits", + "num-traits 0.2.19", "serde", "windows-targets 0.52.5", ] @@ -661,6 +1118,22 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +[[package]] +name = "colored" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +dependencies = [ + "lazy_static", + "windows-sys 0.48.0", +] + +[[package]] +name = "const-fnv1a-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b13ea120a812beba79e34316b3942a857c86ec1593cb34f27bb28272ce2cca" + [[package]] name = "const-hex" version = "1.11.3" @@ -680,6 +1153,26 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const_format" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -934,6 +1427,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "ecdsa" version = "0.16.9" @@ -1546,6 +2045,28 @@ dependencies = [ "byteorder", ] +[[package]] +name = "genco" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d7af598790738fee616426e669360fa361273b1b9c9b7f30c92fa627605cad" +dependencies = [ + "genco-macros", + "relative-path", + "smallvec", +] + +[[package]] +name = "genco-macros" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4cf186fea4af17825116f72932fe52cce9a13bae39ff63b4dc0cfdb3fb4bde1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1594,6 +2115,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "good_lp" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3198bd13dea84c76a64621d6ee8ee26a4960a9a0d538eca95ca8f1320a469ac9" +dependencies = [ + "fnv", + "minilp", +] + [[package]] name = "group" version = "0.13.0" @@ -1635,6 +2166,11 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", + "serde", +] [[package]] name = "hashers" @@ -1645,6 +2181,15 @@ dependencies = [ "fxhash", ] +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "heck" version = "0.4.1" @@ -1765,6 +2310,7 @@ version = "0.0.2" dependencies = [ "anyhow", "cainome", + "cairo-lang-starknet", "ethers", "eyre", "futures", @@ -1800,6 +2346,12 @@ dependencies = [ "cc", ] +[[package]] +name = "id-arena" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" + [[package]] name = "ident_case" version = "1.0.1" @@ -1854,6 +2406,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "indent" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f1a0777d972970f204fdf8ef319f1f4f8459131636d7e3c96c5d59570d0fa6" + [[package]] name = "indenter" version = "0.3.3" @@ -1879,8 +2437,15 @@ checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.5", + "serde", ] +[[package]] +name = "indoc" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" + [[package]] name = "inout" version = "0.1.3" @@ -2002,6 +2567,7 @@ dependencies = [ "itertools 0.11.0", "lalrpop-util", "petgraph", + "pico-args", "regex", "regex-syntax 0.8.3", "string_cache", @@ -2025,6 +2591,9 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin 0.5.2", +] [[package]] name = "libc" @@ -2079,6 +2648,15 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matrixmultiply" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916806ba0031cd542105d916a97c8572e1fa6dd79c9c51e7eb43a09ec2dd84c1" +dependencies = [ + "rawpointer", +] + [[package]] name = "md-5" version = "0.10.6" @@ -2101,6 +2679,16 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minilp" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82a7750a9e5076c660b7bec5e6457b4dbff402b9863c8d112891434e18fd5385" +dependencies = [ + "log", + "sprs", +] + [[package]] name = "miniz_oxide" version = "0.7.2" @@ -2121,6 +2709,19 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ndarray" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac06db03ec2f46ee0ecdca1a1c34a99c0d188a0d83439b84bf0cb4b386e4ab09" +dependencies = [ + "matrixmultiply", + "num-complex", + "num-integer", + "num-traits 0.2.19", + "rawpointer", +] + [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -2144,7 +2745,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" dependencies = [ "num-integer", - "num-traits", + "num-traits 0.2.19", + "serde", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits 0.2.19", ] [[package]] @@ -2159,7 +2771,16 @@ version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "num-traits", + "num-traits 0.2.19", +] + +[[package]] +name = "num-traits" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +dependencies = [ + "num-traits 0.2.19", ] [[package]] @@ -2218,6 +2839,12 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "oorandom" +version = "11.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" + [[package]] name = "open-fastrlp" version = "0.1.4" @@ -2281,6 +2908,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.2" @@ -2288,7 +2926,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.10", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec", + "winapi", ] [[package]] @@ -2299,7 +2951,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.1", "smallvec", "windows-targets 0.52.5", ] @@ -2321,6 +2973,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "path-clean" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" + [[package]] name = "path-slash" version = "0.2.1" @@ -2435,6 +3093,12 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + [[package]] name = "pin-project" version = "1.1.5" @@ -2551,7 +3215,7 @@ checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ "bitflags 2.5.0", "lazy_static", - "num-traits", + "num-traits 0.2.19", "rand", "rand_chacha", "rand_xorshift", @@ -2613,6 +3277,12 @@ dependencies = [ "rand_core", ] +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + [[package]] name = "rayon" version = "1.10.0" @@ -2633,6 +3303,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.5.1" @@ -2850,6 +3529,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -2921,6 +3606,35 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "salsa" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b84d9f96071f3f3be0dc818eae3327625d8ebc95b58da37d6850724f31d3403" +dependencies = [ + "crossbeam-utils", + "indexmap 1.9.3", + "lock_api", + "log", + "oorandom", + "parking_lot 0.11.2", + "rustc-hash", + "salsa-macros", + "smallvec", +] + +[[package]] +name = "salsa-macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3904a4ba0a9d0211816177fd34b04c7095443f8cdacd11175064fe541c8fe2" +dependencies = [ + "heck 0.3.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "salsa20" version = "0.10.2" @@ -2963,6 +3677,31 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "schemars" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6e7ed6919cb46507fb01ff1654309219f62b4d603822501b0b80d42f6f21ef" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185f2b7aa7e02d418e453790dde16890256bbd2bcd04b7dc5348811052b53f49" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.63", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -3046,6 +3785,17 @@ dependencies = [ "syn 2.0.63", ] +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + [[package]] name = "serde_json" version = "1.0.117" @@ -3184,7 +3934,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ "num-bigint", - "num-traits", + "num-traits 0.2.19", "thiserror", "time", ] @@ -3210,6 +3960,15 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + [[package]] name = "socket2" version = "0.5.7" @@ -3256,6 +4015,17 @@ dependencies = [ "der", ] +[[package]] +name = "sprs" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec63571489873d4506683915840eeb1bb16b3198ee4894cc6f2fe3013d505e56" +dependencies = [ + "ndarray", + "num-complex", + "num-traits 0.1.43", +] + [[package]] name = "starknet" version = "0.10.0" @@ -3330,7 +4100,7 @@ dependencies = [ "hmac", "num-bigint", "num-integer", - "num-traits", + "num-traits 0.2.19", "rfc6979", "sha2", "starknet-crypto-codegen", @@ -3434,7 +4204,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot", + "parking_lot 0.12.2", "phf_shared 0.10.0", "precomputed-hash", ] @@ -3667,7 +4437,7 @@ dependencies = [ "libc", "mio", "num_cpus", - "parking_lot", + "parking_lot 0.12.2", "pin-project-lite", "signal-hook-registry", "socket2", @@ -3909,6 +4679,15 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unescaper" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0adf6ad32eb5b3cadff915f7b770faaac8f7ff0476633aa29eb0d9584d889d34" +dependencies = [ + "thiserror", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -4341,12 +5120,47 @@ dependencies = [ "tap", ] +[[package]] +name = "xshell" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db0ab86eae739efd1b054a8d3d16041914030ac4e01cd1dca0cf252fd8b6437" +dependencies = [ + "xshell-macros", +] + +[[package]] +name = "xshell-macros" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" + [[package]] name = "yansi" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.63", +] + [[package]] name = "zeroize" version = "1.7.0" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 69f478c..a09497e 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -41,6 +41,7 @@ cainome = { git = "https://github.com/cartridge-gg/cainome", tag = "v0.2.9", fea "abigen-rs", ] } starknet = "0.10.0" +cairo-lang-starknet = "2.6.3" # eth ethers = "2.0.7" diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index d298b52..387de6d 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -1,11 +1,13 @@ use std::sync::Arc; +use cairo_lang_starknet::casm_contract_class::CasmContractClass; use starknet::{ accounts::{Account, ConnectedAccount, SingleOwnerAccount}, contract::ContractFactory, core::types::{ - contract::SierraClass, BlockId, BlockTag, FieldElement, InvokeTransactionResult, - StarknetError, + contract::{CompiledClass, SierraClass}, + BlockId, BlockTag, ContractClass, FieldElement, FlattenedSierraClass, + InvokeTransactionResult, StarknetError, }, providers::{jsonrpc::HttpTransport, AnyProvider, JsonRpcClient, Provider, ProviderError, Url}, signers::{LocalWallet, SigningKey}, @@ -98,7 +100,7 @@ pub fn build_single_owner_account( /// * `path` - The path to the contract artifact. /// # Returns /// The contract artifact. -fn contract_artifact(contract_name: &str) -> eyre::Result { +fn contract_artifact(contract_name: &str) -> eyre::Result<(FlattenedSierraClass, FieldElement)> { let artifact_path = format!("{BUILD_PATH_PREFIX}{contract_name}.contract_class.json"); let file = std::fs::File::open(artifact_path).unwrap_or_else(|_| { panic!( @@ -106,7 +108,15 @@ fn contract_artifact(contract_name: &str) -> eyre::Result { contract_name ) }); - serde_json::from_reader(file).map_err(Into::into) + let sierra_class: SierraClass = serde_json::from_reader(file)?; + + let casm_contract_class: ContractClass = serde_json::from_reader(file)?; + let casm_contract = CasmContractClass::from_contract_class(casm_contract_class, true) + .map_err(|e| eyre::eyre!("CasmContractClass from ContractClass error: {e}"))?; + let res = serde_json::to_string_pretty(&casm_contract)?; + let compiled_class: CompiledClass = serde_json::from_str(&res)?; + + Ok((sierra_class.flatten()?, compiled_class.class_hash()?)) } /// Deploys a contract with the given class hash, constructor calldata, and salt. @@ -163,17 +173,14 @@ async fn declare_contract( contract_name: &str, ) -> eyre::Result { // Load the contract artifact. - let contract_artifact = contract_artifact(contract_name)?; - - // Compute the contract class hash. - let class_hash = contract_artifact.class_hash()?; + let (flattened_class, compiled_class_hash) = contract_artifact(contract_name)?; + let class_hash = flattened_class.class_hash(); // Declare the contract class if it is not already declared. if !is_already_declared(account.provider(), &class_hash).await? { println!("\n==> Declaring Contract: {contract_name}"); - let flattened_class = contract_artifact.flatten()?; account - .declare(Arc::new(flattened_class), class_hash) + .declare(Arc::new(flattened_class), compiled_class_hash) .send() .await?; println!("Declared Class Hash: {}", format!("{:#064x}", class_hash)); From 5a4edbc49db967f3e2cf92e2bbd4fe3a1bd0b443 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 17:04:15 +0100 Subject: [PATCH 08/26] fix: dep --- rust/Cargo.lock | 365 +---------------------------- rust/Cargo.toml | 2 +- rust/tests/contracts/strk/utils.rs | 2 +- 3 files changed, 3 insertions(+), 366 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 3ea7a6f..53bc00f 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -533,67 +533,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cairo-lang-compiler" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7148cb2d72a3db24a6d2ef2b2602102cc5099cb9f6b913e5047fb009cb3a22a1" -dependencies = [ - "anyhow", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-lowering", - "cairo-lang-parser", - "cairo-lang-project", - "cairo-lang-semantic", - "cairo-lang-sierra", - "cairo-lang-sierra-generator", - "cairo-lang-syntax", - "cairo-lang-utils", - "salsa", - "smol_str", - "thiserror", -] - -[[package]] -name = "cairo-lang-debug" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a761eb8e31ea65a2dd45f729c74f1770315f97124dad93d1f6853a10d460c6b" -dependencies = [ - "cairo-lang-utils", -] - -[[package]] -name = "cairo-lang-defs" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d60bc5d72fe7a95ba34e041dcbdf1cf3bfccb87008a515514b74913fa8ff05" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-parser", - "cairo-lang-syntax", - "cairo-lang-utils", - "itertools 0.11.0", - "salsa", - "smol_str", -] - -[[package]] -name = "cairo-lang-diagnostics" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356089e1b0a0ba9e115566191745613b3806a20259ad76764df82ab534d5412a" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-filesystem", - "cairo-lang-utils", - "itertools 0.11.0", -] - [[package]] name = "cairo-lang-eq-solver" version = "2.6.3" @@ -604,134 +543,6 @@ dependencies = [ "good_lp", ] -[[package]] -name = "cairo-lang-filesystem" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bcb9a4a40e53fa099774bd08bbcc3430f51213cc7fb1b50c2e9d01155731798" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-utils", - "path-clean", - "salsa", - "serde", - "smol_str", -] - -[[package]] -name = "cairo-lang-lowering" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba60e1e2477aa0f610ccf29189097d580464607c94b51741e1c18e64d6cee5f" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-parser", - "cairo-lang-proc-macros", - "cairo-lang-semantic", - "cairo-lang-syntax", - "cairo-lang-utils", - "id-arena", - "itertools 0.11.0", - "log", - "num-bigint", - "num-traits 0.2.19", - "once_cell", - "salsa", - "smol_str", -] - -[[package]] -name = "cairo-lang-parser" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f16ba1535e0cc5e79c2eff6592859bbdac03dc53d4dcdd26dbdbc04a77c3f5c" -dependencies = [ - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-syntax", - "cairo-lang-syntax-codegen", - "cairo-lang-utils", - "colored", - "itertools 0.11.0", - "num-bigint", - "num-traits 0.2.19", - "salsa", - "smol_str", - "unescaper", -] - -[[package]] -name = "cairo-lang-plugins" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c8cf6e0ee3d6b19429cc1663738b22f1ecea7d51bf7452e8e1086f08798baf" -dependencies = [ - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-parser", - "cairo-lang-syntax", - "cairo-lang-utils", - "indent", - "indoc", - "itertools 0.11.0", - "salsa", - "smol_str", -] - -[[package]] -name = "cairo-lang-proc-macros" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67f9da66325ce7ed6c002360f26106fe79deb9f8a2fca30abdbb8d388da7bb46" -dependencies = [ - "cairo-lang-debug", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "cairo-lang-project" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e198af1ab3d05c7fb8b6a9a7a2e9bce245a6c855df5f770b751d29874a23b152" -dependencies = [ - "cairo-lang-filesystem", - "cairo-lang-utils", - "serde", - "smol_str", - "thiserror", - "toml", -] - -[[package]] -name = "cairo-lang-semantic" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7df81521c2125e3e95b683cc99374db1aebd7ddb317c5ca3dd92a235a9eb13" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-parser", - "cairo-lang-plugins", - "cairo-lang-proc-macros", - "cairo-lang-syntax", - "cairo-lang-utils", - "id-arena", - "indoc", - "itertools 0.11.0", - "num-bigint", - "num-traits 0.2.19", - "once_cell", - "salsa", - "smol_str", -] - [[package]] name = "cairo-lang-sierra" version = "2.6.3" @@ -788,29 +599,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cairo-lang-sierra-generator" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e1d75e0830279ca1bd0189e3326720d6e081225f7d81ed060bbd22c6b37e980" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-lowering", - "cairo-lang-parser", - "cairo-lang-semantic", - "cairo-lang-sierra", - "cairo-lang-syntax", - "cairo-lang-utils", - "itertools 0.11.0", - "num-traits 0.2.19", - "once_cell", - "salsa", - "smol_str", -] - [[package]] name = "cairo-lang-sierra-to-casm" version = "2.6.3" @@ -842,37 +630,6 @@ dependencies = [ "cairo-lang-utils", ] -[[package]] -name = "cairo-lang-starknet" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9ffa8b3b8c47138c36b1907cebb5047dfc4de29ec10ece5bd6d6853243ec50" -dependencies = [ - "anyhow", - "cairo-felt", - "cairo-lang-compiler", - "cairo-lang-defs", - "cairo-lang-diagnostics", - "cairo-lang-filesystem", - "cairo-lang-lowering", - "cairo-lang-plugins", - "cairo-lang-semantic", - "cairo-lang-sierra", - "cairo-lang-sierra-generator", - "cairo-lang-starknet-classes", - "cairo-lang-syntax", - "cairo-lang-utils", - "const_format", - "indent", - "indoc", - "itertools 0.11.0", - "once_cell", - "serde", - "serde_json", - "smol_str", - "thiserror", -] - [[package]] name = "cairo-lang-starknet-classes" version = "2.6.3" @@ -898,32 +655,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "cairo-lang-syntax" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8262c426a57e1e5ec297db24278464841500613445e2cb1c43d5f71ad91ee8d6" -dependencies = [ - "cairo-lang-debug", - "cairo-lang-filesystem", - "cairo-lang-utils", - "num-bigint", - "num-traits 0.2.19", - "salsa", - "smol_str", - "unescaper", -] - -[[package]] -name = "cairo-lang-syntax-codegen" -version = "2.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e2d692eae4bb4179a4a1148fd5eb738a91653d86750c813658ffad4a99fa97" -dependencies = [ - "genco", - "xshell", -] - [[package]] name = "cairo-lang-utils" version = "2.6.3" @@ -1118,16 +849,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" -[[package]] -name = "colored" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" -dependencies = [ - "lazy_static", - "windows-sys 0.48.0", -] - [[package]] name = "const-fnv1a-hash" version = "1.1.0" @@ -1153,26 +874,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "const_format" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" -dependencies = [ - "const_format_proc_macros", -] - -[[package]] -name = "const_format_proc_macros" -version = "0.2.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -2045,28 +1746,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "genco" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98d7af598790738fee616426e669360fa361273b1b9c9b7f30c92fa627605cad" -dependencies = [ - "genco-macros", - "relative-path", - "smallvec", -] - -[[package]] -name = "genco-macros" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4cf186fea4af17825116f72932fe52cce9a13bae39ff63b4dc0cfdb3fb4bde1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -2310,7 +1989,7 @@ version = "0.0.2" dependencies = [ "anyhow", "cainome", - "cairo-lang-starknet", + "cairo-lang-starknet-classes", "ethers", "eyre", "futures", @@ -2346,12 +2025,6 @@ dependencies = [ "cc", ] -[[package]] -name = "id-arena" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" - [[package]] name = "ident_case" version = "1.0.1" @@ -2406,12 +2079,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "indent" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9f1a0777d972970f204fdf8ef319f1f4f8459131636d7e3c96c5d59570d0fa6" - [[package]] name = "indenter" version = "0.3.3" @@ -2973,12 +2640,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "path-clean" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" - [[package]] name = "path-slash" version = "0.2.1" @@ -4679,15 +4340,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unescaper" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0adf6ad32eb5b3cadff915f7b770faaac8f7ff0476633aa29eb0d9584d889d34" -dependencies = [ - "thiserror", -] - [[package]] name = "unicode-bidi" version = "0.3.15" @@ -5120,21 +4772,6 @@ dependencies = [ "tap", ] -[[package]] -name = "xshell" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db0ab86eae739efd1b054a8d3d16041914030ac4e01cd1dca0cf252fd8b6437" -dependencies = [ - "xshell-macros", -] - -[[package]] -name = "xshell-macros" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" - [[package]] name = "yansi" version = "0.5.1" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index a09497e..e940f61 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -41,7 +41,7 @@ cainome = { git = "https://github.com/cartridge-gg/cainome", tag = "v0.2.9", fea "abigen-rs", ] } starknet = "0.10.0" -cairo-lang-starknet = "2.6.3" +cairo-lang-starknet-classes = "2.6.3" # eth ethers = "2.0.7" diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 387de6d..c25da8e 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -1,6 +1,6 @@ use std::sync::Arc; -use cairo_lang_starknet::casm_contract_class::CasmContractClass; +use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; use starknet::{ accounts::{Account, ConnectedAccount, SingleOwnerAccount}, contract::ContractFactory, From 7e65fd213aeb82f2c9cd1536adb3d5bceec7a287 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 17:09:23 +0100 Subject: [PATCH 09/26] fix: compile --- rust/tests/contracts/strk/utils.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index c25da8e..5a5d9d2 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -1,13 +1,14 @@ use std::sync::Arc; use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; +use cairo_lang_starknet_classes::contract_class::ContractClass; use starknet::{ accounts::{Account, ConnectedAccount, SingleOwnerAccount}, contract::ContractFactory, core::types::{ contract::{CompiledClass, SierraClass}, - BlockId, BlockTag, ContractClass, FieldElement, FlattenedSierraClass, - InvokeTransactionResult, StarknetError, + BlockId, BlockTag, FieldElement, FlattenedSierraClass, InvokeTransactionResult, + StarknetError, }, providers::{jsonrpc::HttpTransport, AnyProvider, JsonRpcClient, Provider, ProviderError, Url}, signers::{LocalWallet, SigningKey}, @@ -102,17 +103,14 @@ pub fn build_single_owner_account( /// The contract artifact. fn contract_artifact(contract_name: &str) -> eyre::Result<(FlattenedSierraClass, FieldElement)> { let artifact_path = format!("{BUILD_PATH_PREFIX}{contract_name}.contract_class.json"); - let file = std::fs::File::open(artifact_path).unwrap_or_else(|_| { - panic!( - "Compiled contract {} not found: run `scarb build` in ../contracts", - contract_name - ) - }); + let file = std::fs::File::open(artifact_path.clone())?; let sierra_class: SierraClass = serde_json::from_reader(file)?; + let file = std::fs::File::open(artifact_path)?; let casm_contract_class: ContractClass = serde_json::from_reader(file)?; - let casm_contract = CasmContractClass::from_contract_class(casm_contract_class, true) - .map_err(|e| eyre::eyre!("CasmContractClass from ContractClass error: {e}"))?; + let casm_contract = + CasmContractClass::from_contract_class(casm_contract_class, true, usize::MAX) + .map_err(|e| eyre::eyre!("CasmContractClass from ContractClass error: {e}"))?; let res = serde_json::to_string_pretty(&casm_contract)?; let compiled_class: CompiledClass = serde_json::from_str(&res)?; From 4854216313abfbd6961a7963b0e322ce567c382a Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 17:19:39 +0100 Subject: [PATCH 10/26] feat(ci): build workflow --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ .github/workflows/test.yml | 22 ++++++++++++++++++++-- rust/tests/mailbox.rs | 11 ++++++----- 3 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..fba5401 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +--- +name: Task - Build Rust + +on: + push: + pull_request: + +jobs: + rust_build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cd rust + + # selecting a toolchain either by action or manual `rustup` calls should happen + # before the plugin, as the cache uses the current rustc version as its cache key + - run: rustup show + + - uses: Swatinem/rust-cache@v2 + + - name: Build the project + run: | + cargo build --release \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d503ab..8b92e3d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,8 +2,9 @@ name: tests on: push: pull_request: + jobs: - check: + contracts: runs-on: ubuntu-latest env: working-directory: ./contracts @@ -16,4 +17,21 @@ jobs: - working-directory: ${{ env.working-directory}} run: scarb build - working-directory: ${{ env.working-directory}} - run: snforge test \ No newline at end of file + run: snforge test + + rust_build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cd rust + + # selecting a toolchain either by action or manual `rustup` calls should happen + # before the plugin, as the cache uses the current rustc version as its cache key + - run: rustup show + + - uses: Swatinem/rust-cache@v2 + + - name: Build the project + run: | + cargo build --release + diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs index bf8e7a2..be73da0 100644 --- a/rust/tests/mailbox.rs +++ b/rust/tests/mailbox.rs @@ -1,3 +1,9 @@ +#[allow(dead_code)] +mod constants; +mod contracts; +mod event; +mod validator; + use contracts::strk::mailbox::{mailbox, Bytes}; use ethers::{ prelude::parse_log, providers::Middleware, signers::Signer, types::TransactionReceipt, @@ -15,11 +21,6 @@ use crate::{ validator::TestValidators, }; -mod constants; -mod contracts; -mod event; -mod validator; - async fn send_msg_strk_to_evm( from: &strk::Env, to: ð::Env, From 480e7f9545710447432ce97fa8999f57a927243d Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 17:22:46 +0100 Subject: [PATCH 11/26] fix: org --- rust/tests/event.rs | 14 -------------- rust/tests/mailbox.rs | 20 ++++++++++++++++---- 2 files changed, 16 insertions(+), 18 deletions(-) delete mode 100644 rust/tests/event.rs diff --git a/rust/tests/event.rs b/rust/tests/event.rs deleted file mode 100644 index e72a569..0000000 --- a/rust/tests/event.rs +++ /dev/null @@ -1,14 +0,0 @@ -use crate::strk::mailbox::Dispatch as DispatchEvent; -use starknet::core::{types::Event, utils::get_selector_from_name}; - -pub fn parse_dispatch_from_res(events: &[Event]) -> DispatchEvent { - let key = get_selector_from_name("Dispatch").unwrap(); // safe to unwrap - let found = events.iter().find(|v| v.keys.contains(&key)).unwrap(); - - DispatchEvent { - sender: cainome::cairo_serde::ContractAddress(found.data[0]), - destination_domain: found.data[1].try_into().unwrap(), - recipient_address: cainome::cairo_serde::ContractAddress(found.data[2]), - message: (found.data[3], found.data[4]).try_into().unwrap(), - } -} diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs index be73da0..3c940ae 100644 --- a/rust/tests/mailbox.rs +++ b/rust/tests/mailbox.rs @@ -1,17 +1,16 @@ #[allow(dead_code)] mod constants; mod contracts; -mod event; mod validator; -use contracts::strk::mailbox::{mailbox, Bytes}; +use contracts::strk::mailbox::{mailbox, Bytes, Dispatch as DispatchEvent}; use ethers::{ prelude::parse_log, providers::Middleware, signers::Signer, types::TransactionReceipt, }; -use event::parse_dispatch_from_res; use starknet::{ accounts::{Account, ConnectedAccount}, - core::types::{FieldElement, MaybePendingTransactionReceipt}, + core::types::{Event, FieldElement, MaybePendingTransactionReceipt}, + core::utils::get_selector_from_name, providers::{AnyProvider, Provider}, }; @@ -21,6 +20,19 @@ use crate::{ validator::TestValidators, }; +/// Parse the dispatch event from the receipt events +pub fn parse_dispatch_from_res(events: &[Event]) -> DispatchEvent { + let key = get_selector_from_name("Dispatch").unwrap(); // safe to unwrap + let found = events.iter().find(|v| v.keys.contains(&key)).unwrap(); + + DispatchEvent { + sender: cainome::cairo_serde::ContractAddress(found.data[0]), + destination_domain: found.data[1].try_into().unwrap(), + recipient_address: cainome::cairo_serde::ContractAddress(found.data[2]), + message: (found.data[3], found.data[4]).try_into().unwrap(), + } +} + async fn send_msg_strk_to_evm( from: &strk::Env, to: ð::Env, From 8722a67ec45a46667b6650e44a78ab31740ee9f3 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 17:39:47 +0100 Subject: [PATCH 12/26] cleanup --- rust/tests/contracts/strk/utils.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 5a5d9d2..8cd082b 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -101,18 +101,16 @@ pub fn build_single_owner_account( /// * `path` - The path to the contract artifact. /// # Returns /// The contract artifact. -fn contract_artifact(contract_name: &str) -> eyre::Result<(FlattenedSierraClass, FieldElement)> { +fn contract_artifacts(contract_name: &str) -> eyre::Result<(FlattenedSierraClass, FieldElement)> { let artifact_path = format!("{BUILD_PATH_PREFIX}{contract_name}.contract_class.json"); + let file = std::fs::File::open(artifact_path.clone())?; let sierra_class: SierraClass = serde_json::from_reader(file)?; + let artifact_path = format!("{BUILD_PATH_PREFIX}{contract_name}.compiled_contract_class.json"); let file = std::fs::File::open(artifact_path)?; - let casm_contract_class: ContractClass = serde_json::from_reader(file)?; - let casm_contract = - CasmContractClass::from_contract_class(casm_contract_class, true, usize::MAX) - .map_err(|e| eyre::eyre!("CasmContractClass from ContractClass error: {e}"))?; - let res = serde_json::to_string_pretty(&casm_contract)?; - let compiled_class: CompiledClass = serde_json::from_str(&res)?; + + let compiled_class: CompiledClass = serde_json::from_reader(file)?; Ok((sierra_class.flatten()?, compiled_class.class_hash()?)) } @@ -171,7 +169,7 @@ async fn declare_contract( contract_name: &str, ) -> eyre::Result { // Load the contract artifact. - let (flattened_class, compiled_class_hash) = contract_artifact(contract_name)?; + let (flattened_class, compiled_class_hash) = contract_artifacts(contract_name)?; let class_hash = flattened_class.class_hash(); // Declare the contract class if it is not already declared. From cb67454b6654905e832c8ddba5aa751cda7c27ed Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Thu, 16 May 2024 17:40:12 +0100 Subject: [PATCH 13/26] clean --- rust/tests/contracts/strk/utils.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 8cd082b..1f35490 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -1,7 +1,5 @@ use std::sync::Arc; -use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; -use cairo_lang_starknet_classes::contract_class::ContractClass; use starknet::{ accounts::{Account, ConnectedAccount, SingleOwnerAccount}, contract::ContractFactory, From 9bb0eeb8331207cd0fcd66fdc2bc0ea985fa6b69 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Fri, 17 May 2024 00:19:42 +0100 Subject: [PATCH 14/26] fix: ci rust build --- .github/workflows/build.yml | 7 +++++-- .github/workflows/test.yml | 18 +----------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fba5401..9faa4d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,16 +8,19 @@ on: jobs: rust_build: runs-on: ubuntu-latest + env: + working-directory: ./rust steps: - uses: actions/checkout@v3 - - run: cd rust # selecting a toolchain either by action or manual `rustup` calls should happen # before the plugin, as the cache uses the current rustc version as its cache key - - run: rustup show + - working-directory: ${{ env.working-directory}} + run: rustup show - uses: Swatinem/rust-cache@v2 - name: Build the project + working-directory: ${{ env.working-directory}} run: | cargo build --release \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8b92e3d..c8b07d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: tests on: push: pull_request: - + jobs: contracts: runs-on: ubuntu-latest @@ -18,20 +18,4 @@ jobs: run: scarb build - working-directory: ${{ env.working-directory}} run: snforge test - - rust_build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - run: cd rust - - # selecting a toolchain either by action or manual `rustup` calls should happen - # before the plugin, as the cache uses the current rustc version as its cache key - - run: rustup show - - - uses: Swatinem/rust-cache@v2 - - - name: Build the project - run: | - cargo build --release From 7a50c10814d113c712b0082be0bd29344113e8dc Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Fri, 17 May 2024 01:21:33 +0100 Subject: [PATCH 15/26] fix: eth address --- rust/Cargo.lock | 1 + rust/Cargo.toml | 1 + rust/tests/contracts/strk/deploy.rs | 12 +++++++++--- rust/tests/contracts/strk/ism.rs | 30 ++++++----------------------- rust/tests/contracts/strk/utils.rs | 27 +++++++++++++++++++------- rust/tests/validator.rs | 27 +++++++++++++++++++++++--- 6 files changed, 61 insertions(+), 37 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 53bc00f..7683666 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1997,6 +1997,7 @@ dependencies = [ "rstest", "serde", "serde_json", + "sha3", "starknet", "thiserror", "tokio", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index e940f61..d907824 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -59,6 +59,7 @@ anyhow = { version = "1.0.71", features = ["backtrace"] } eyre = { version = "0.6.8" } # crypto +sha3 = "0.10.8" k256 = { version = "0.13.1", default-features = false, features = ["ecdsa"] } diff --git a/rust/tests/contracts/strk/deploy.rs b/rust/tests/contracts/strk/deploy.rs index 096c205..6fc31cc 100644 --- a/rust/tests/contracts/strk/deploy.rs +++ b/rust/tests/contracts/strk/deploy.rs @@ -1,4 +1,4 @@ -use starknet::accounts::{Account, ConnectedAccount}; +use starknet::accounts::Account; use super::{ bind::mailbox::mailbox, @@ -19,15 +19,17 @@ pub async fn deploy_core( required_hook: Hook, ) -> eyre::Result { // deploy mailbox + println!("\n==> Deploying Mailbox"); let (mailbox, _) = deploy_contract( codes.mailbox, vec![domain.into(), owner.address()], - deployer.get_nonce().await?, deployer, ) .await; + println!("Deployed Contract Address {:x?}", mailbox); // set default ism, hook, igp + println!("\n==> Deploying default ism, hook, igp"); let default_ism = default_ism.deploy(codes, owner, deployer).await?; let default_hook = default_hook .deploy(codes, mailbox.clone(), owner, deployer) @@ -35,6 +37,9 @@ pub async fn deploy_core( let required_hook = required_hook .deploy(codes, mailbox.clone(), owner, deployer) .await?; + println!("Default ISM: {:x?}", default_ism); + println!("Default Hook: {:x?}", default_hook); + println!("Required Hook: {:x?}", required_hook); let mailbox_contract = mailbox::new(mailbox, owner); mailbox_contract @@ -51,13 +56,14 @@ pub async fn deploy_core( .await?; // deploy test message receiver + println!("\n==> Deploying test message receiver"); let (msg_receiver, _) = deploy_contract( codes.test_mock_msg_receiver, vec![mailbox.clone()], - deployer.get_nonce().await?, deployer, ) .await; + println!("Deployed Contract Address {:x?}", msg_receiver); Ok(CoreDeployments { mailbox, diff --git a/rust/tests/contracts/strk/ism.rs b/rust/tests/contracts/strk/ism.rs index 1f458b9..028a236 100644 --- a/rust/tests/contracts/strk/ism.rs +++ b/rust/tests/contracts/strk/ism.rs @@ -37,7 +37,7 @@ impl Ism { impl Ism { async fn deploy_mock(codes: &Codes, deployer: &StarknetAccount) -> eyre::Result { - let res = deploy_contract(codes.test_mock_ism, vec![], felt!("0"), deployer).await; + let res = deploy_contract(codes.test_mock_ism, vec![], deployer).await; Ok(res.0) } @@ -47,13 +47,7 @@ impl Ism { owner: &StarknetAccount, deployer: &StarknetAccount, ) -> eyre::Result { - let res = deploy_contract( - codes.ism_multisig, - vec![owner.address()], - felt!("0"), - deployer, - ) - .await; + let res = deploy_contract(codes.ism_multisig, vec![owner.address()], deployer).await; let contract = messageid_multisig_ism::new(res.0, owner); contract @@ -75,13 +69,7 @@ impl Ism { owner: &StarknetAccount, deployer: &StarknetAccount, ) -> eyre::Result { - let res = deploy_contract( - codes.ism_routing, - vec![owner.address()], - felt!("0"), - deployer, - ) - .await; + let res = deploy_contract(codes.ism_routing, vec![owner.address()], deployer).await; let futures = FuturesUnordered::new(); @@ -98,7 +86,7 @@ impl Ism { let modules: Vec<_> = results .iter() - .map(|a| ContractAddress(*a.as_ref().unwrap())) + .map(|a| ContractAddress(*a.as_ref().expect("Failed to deploy ISM"))) .collect(); let contract = domain_routing_ism::new(res.0, owner); @@ -132,7 +120,7 @@ impl Ism { let ism_addrs: Vec<_> = results.iter().map(|a| *a.as_ref().unwrap()).collect(); - let res = deploy_contract(codes.ism_aggregate, ism_addrs, felt!("0"), deployer).await; + let res = deploy_contract(codes.ism_aggregate, ism_addrs, deployer).await; Ok(res.0) } @@ -160,13 +148,7 @@ pub fn prepare_routing_ism(info: Vec<(u32, TestValidators)>) -> Ism { let mut isms = vec![]; for (domain, set) in info { - isms.push(( - domain, - Ism::Aggregate { - isms: vec![Ism::multisig(set)], - threshold: 1, - }, - )); + isms.push((domain, Ism::multisig(set))); } Ism::routing(isms) diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 1f35490..0db3b4e 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -5,9 +5,10 @@ use starknet::{ contract::ContractFactory, core::types::{ contract::{CompiledClass, SierraClass}, - BlockId, BlockTag, FieldElement, FlattenedSierraClass, InvokeTransactionResult, - StarknetError, + BlockId, BlockTag, ExecutionResult, FieldElement, FlattenedSierraClass, + InvokeTransactionResult, StarknetError, }, + macros::felt, providers::{jsonrpc::HttpTransport, AnyProvider, JsonRpcClient, Provider, ProviderError, Url}, signers::{LocalWallet, SigningKey}, }; @@ -118,17 +119,29 @@ fn contract_artifacts(contract_name: &str) -> eyre::Result<(FlattenedSierraClass pub async fn deploy_contract( class_hash: FieldElement, constructor_calldata: Vec, - salt: FieldElement, deployer: &StarknetAccount, ) -> (FieldElement, InvokeTransactionResult) { let contract_factory = ContractFactory::new(class_hash, deployer); + let salt = felt!("0"); let deployment = contract_factory.deploy(constructor_calldata, salt, false); - ( - deployment.deployed_address(), - deployment.send().await.expect("Failed to deploy contract"), - ) + let deploy_res = deployment.send().await.expect("Failed to deploy contract"); + + let receipt = deployer + .provider() + .get_transaction_receipt(deploy_res.transaction_hash) + .await + .expect("Failed to get transaction receipt"); + + match receipt.execution_result() { + ExecutionResult::Reverted { reason } => { + panic!("Deployment reverted: {}", reason) + } + _ => {} + } + + (deployment.deployed_address(), deploy_res) } /// Check if a contract class is already declared. diff --git a/rust/tests/validator.rs b/rust/tests/validator.rs index cb17dd3..0b68fa2 100644 --- a/rust/tests/validator.rs +++ b/rust/tests/validator.rs @@ -32,9 +32,20 @@ impl TestValidator { } pub fn eth_addr(&self) -> EthAddress { - EthAddress( - FieldElement::from_byte_slice_be(&self.pub_key.to_encoded_point(false).as_bytes()) - .unwrap(), + let hash = keccak256_hash(&self.pub_key.to_encoded_point(false).as_bytes()[1..]); + + let mut bytes = [0u8; 20]; + bytes.copy_from_slice(&hash.as_slice()[12..]); + + EthAddress(FieldElement::from_byte_slice_be(&bytes).unwrap()) + } + + pub fn sign(&self, digest: [u8; 32]) -> (FieldElement, RecoveryId) { + let (sign, recov_id) = self.priv_key.sign_prehash_recoverable(&digest).unwrap(); + + ( + FieldElement::from_byte_slice_be(sign.to_bytes().as_slice()).unwrap(), + recov_id, ) } } @@ -78,3 +89,13 @@ impl TestValidators { } } } + +pub fn keccak256_hash(bz: &[u8]) -> Vec { + use sha3::{Digest, Keccak256}; + + let mut hasher = Keccak256::new(); + hasher.update(bz); + let hash = hasher.finalize().to_vec(); + + hash +} From 0710de6d8f8543e023c5016be2a36ae5757c0b84 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Fri, 17 May 2024 01:59:17 +0100 Subject: [PATCH 16/26] fix: small fixes --- rust/tests/contracts/strk/deploy.rs | 28 ++++++++---------- rust/tests/contracts/strk/utils.rs | 44 +++++++++++++++++++++++++---- rust/tests/mailbox.rs | 11 ++++++-- 3 files changed, 59 insertions(+), 24 deletions(-) diff --git a/rust/tests/contracts/strk/deploy.rs b/rust/tests/contracts/strk/deploy.rs index 6fc31cc..2026a7e 100644 --- a/rust/tests/contracts/strk/deploy.rs +++ b/rust/tests/contracts/strk/deploy.rs @@ -1,4 +1,4 @@ -use starknet::accounts::Account; +use starknet::{accounts::Account, core::types::FieldElement}; use super::{ bind::mailbox::mailbox, @@ -34,14 +34,15 @@ pub async fn deploy_core( let default_hook = default_hook .deploy(codes, mailbox.clone(), owner, deployer) .await?; - let required_hook = required_hook - .deploy(codes, mailbox.clone(), owner, deployer) - .await?; + // let required_hook = required_hook + // .deploy(codes, mailbox.clone(), owner, deployer) + // .await?; println!("Default ISM: {:x?}", default_ism); println!("Default Hook: {:x?}", default_hook); - println!("Required Hook: {:x?}", required_hook); + // println!("Required Hook: {:x?}", required_hook); let mailbox_contract = mailbox::new(mailbox, owner); + mailbox_contract .set_default_ism(&default_ism.into()) .send() @@ -50,26 +51,21 @@ pub async fn deploy_core( .set_default_hook(&default_hook.into()) .send() .await?; - mailbox_contract - .set_required_hook(&required_hook.into()) - .send() - .await?; + // mailbox_contract + // .set_required_hook(&required_hook.into()) + // .send() + // .await?; // deploy test message receiver println!("\n==> Deploying test message receiver"); - let (msg_receiver, _) = deploy_contract( - codes.test_mock_msg_receiver, - vec![mailbox.clone()], - deployer, - ) - .await; + let (msg_receiver, _) = deploy_contract(codes.test_mock_msg_receiver, vec![], deployer).await; println!("Deployed Contract Address {:x?}", msg_receiver); Ok(CoreDeployments { mailbox, default_ism, default_hook, - required_hook, + required_hook: FieldElement::ZERO, msg_receiver, }) } diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 0db3b4e..9ce22a6 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -1,3 +1,4 @@ +use std::future::Future; use std::sync::Arc; use starknet::{ @@ -6,7 +7,7 @@ use starknet::{ core::types::{ contract::{CompiledClass, SierraClass}, BlockId, BlockTag, ExecutionResult, FieldElement, FlattenedSierraClass, - InvokeTransactionResult, StarknetError, + InvokeTransactionResult, MaybePendingTransactionReceipt, StarknetError, }, macros::felt, providers::{jsonrpc::HttpTransport, AnyProvider, JsonRpcClient, Provider, ProviderError, Url}, @@ -36,6 +37,40 @@ const KATANA_PREFUNDED_ACCOUNTS: [(&str, &str); 3] = [ const KATANA_CHAIN_ID: u64 = 82743958523457; +pub async fn assert_poll(f: F, polling_time_ms: u64, max_poll_count: u32) +where + F: Fn() -> Fut, + Fut: Future, +{ + for _poll_count in 0..max_poll_count { + if f().await { + return; // The provided function returned true, exit safely. + } + + tokio::time::sleep(tokio::time::Duration::from_millis(polling_time_ms)).await; + } + + panic!("Max poll count exceeded."); +} + +type TransactionReceiptResult = Result; + +pub async fn get_transaction_receipt( + rpc: &AnyProvider, + transaction_hash: FieldElement, +) -> TransactionReceiptResult { + // there is a delay between the transaction being available at the client + // and the sealing of the block, hence sleeping for 100ms + assert_poll( + || async { rpc.get_transaction_receipt(transaction_hash).await.is_ok() }, + 100, + 20, + ) + .await; + + rpc.get_transaction_receipt(transaction_hash).await +} + /// Returns a pre-funded account for a local katana chain. pub fn get_dev_account(index: u32) -> StarknetAccount { let (address, private_key) = *KATANA_PREFUNDED_ACCOUNTS @@ -128,9 +163,7 @@ pub async fn deploy_contract( let deploy_res = deployment.send().await.expect("Failed to deploy contract"); - let receipt = deployer - .provider() - .get_transaction_receipt(deploy_res.transaction_hash) + let receipt = get_transaction_receipt(deployer.provider(), deploy_res.transaction_hash) .await .expect("Failed to get transaction receipt"); @@ -202,6 +235,7 @@ pub async fn declare_all(deployer: &StarknetAccount) -> eyre::Result { let ism_multisig = declare_contract(deployer, "messageid_multisig_ism").await?; let test_mock_ism = declare_contract(deployer, "ism").await?; let ism_routing = declare_contract(deployer, "domain_routing_ism").await?; + let test_mock_msg_receiver = declare_contract(deployer, "message_recipient").await?; Ok(Codes { mailbox, @@ -219,7 +253,7 @@ pub async fn declare_all(deployer: &StarknetAccount) -> eyre::Result { ism_routing, test_mock_hook: FieldElement::ZERO, test_mock_ism, - test_mock_msg_receiver: FieldElement::ZERO, + test_mock_msg_receiver, warp_strk20: FieldElement::ZERO, warp_native: FieldElement::ZERO, strk20_base: FieldElement::ZERO, diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs index 3c940ae..07d2bc8 100644 --- a/rust/tests/mailbox.rs +++ b/rust/tests/mailbox.rs @@ -67,9 +67,12 @@ where .await?; let dispatch = match dispatch_receipt { - MaybePendingTransactionReceipt::PendingReceipt(_) => { - return Err(eyre::eyre!("Transaction is pending")) - } + MaybePendingTransactionReceipt::PendingReceipt(pending_receipt) => match pending_receipt { + starknet::core::types::PendingTransactionReceipt::Invoke(receipt) => { + parse_dispatch_from_res(&receipt.events) + } + _ => return Err(eyre::eyre!("Unexpected receipt type, check the hash")), + }, MaybePendingTransactionReceipt::Receipt(receipt) => match receipt { starknet::core::types::TransactionReceipt::Invoke(receipt) => { parse_dispatch_from_res(&receipt.events) @@ -78,6 +81,8 @@ where }, }; + println!("\nDispatched: {:?}", dispatch); + let process_tx = to.core.mailbox.process( vec![].into(), dispatch.message.to_bytes_be().as_slice().to_vec().into(), From 16c1261454c73014fa399a04e6dcc34636387797 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 16:07:41 +0100 Subject: [PATCH 17/26] feat: message format --- rust/Cargo.lock | 1 + rust/Cargo.toml | 1 + rust/tests/mailbox.rs | 74 ++++++++++++++++++++++++++++++++++++------- 3 files changed, 65 insertions(+), 11 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 7683666..788055c 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1988,6 +1988,7 @@ name = "hyperlane-starknet" version = "0.0.2" dependencies = [ "anyhow", + "bytes", "cainome", "cairo-lang-starknet-classes", "ethers", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index d907824..d0f7560 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -57,6 +57,7 @@ tokio = { version = "1", features = ["full"] } thiserror = { version = "1.0.37" } anyhow = { version = "1.0.71", features = ["backtrace"] } eyre = { version = "0.6.8" } +bytes = "1.6.0" # crypto sha3 = "0.10.8" diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs index 07d2bc8..b3d9441 100644 --- a/rust/tests/mailbox.rs +++ b/rust/tests/mailbox.rs @@ -3,7 +3,9 @@ mod constants; mod contracts; mod validator; -use contracts::strk::mailbox::{mailbox, Bytes, Dispatch as DispatchEvent}; +use bytes::{BufMut, BytesMut}; +use cainome::cairo_serde::CairoSerde; +use contracts::strk::mailbox::{mailbox, Bytes, Dispatch as DispatchEvent, Message}; use ethers::{ prelude::parse_log, providers::Middleware, signers::Signer, types::TransactionReceipt, }; @@ -29,7 +31,60 @@ pub fn parse_dispatch_from_res(events: &[Event]) -> DispatchEvent { sender: cainome::cairo_serde::ContractAddress(found.data[0]), destination_domain: found.data[1].try_into().unwrap(), recipient_address: cainome::cairo_serde::ContractAddress(found.data[2]), - message: (found.data[3], found.data[4]).try_into().unwrap(), + message: Message::cairo_deserialize(&found.data, 3).expect("Failed to deserialize message"), + } +} + +fn u128_vec_to_u8_vec(input: Vec) -> Vec { + let mut output = Vec::with_capacity(input.len() * 16); + for value in input { + output.extend_from_slice(&value.to_be_bytes()); + } + output +} + +/// Convert a starknet message to eth message bytes +fn to_eth_message_bytes(starknet_message: Message) -> Vec { + let mut buf = + BytesMut::with_capacity(1 + 4 + 4 + 32 + 4 + 32 + starknet_message.body.size as usize); + + buf.put_u8(starknet_message.version); + buf.put_u32(starknet_message.nonce); + buf.put_u32(starknet_message.origin); + buf.put_slice(&starknet_message.sender.0.to_bytes_be().as_slice()); + buf.put_u32(starknet_message.destination); + buf.put_slice(starknet_message.recipient.0.to_bytes_be().as_slice()); + buf.put_slice(&u128_vec_to_u8_vec(starknet_message.body.data)); + + println!("ETH message bytes: {:?}", buf.to_vec()); + + buf.to_vec() +} + +/// Convert a byte slice to a starknet message +/// We have to pad the bytes to 16 bytes chunks +/// see here for more info https://github.com/keep-starknet-strange/alexandria/blob/main/src/bytes/src/bytes.cairo#L16 +fn to_strk_message_bytes(bytes: &[u8]) -> Bytes { + // Calculate the required padding + let padding = (16 - (bytes.len() % 16)) % 16; + let total_len = bytes.len() + padding; + + // Create a new byte vector with the necessary padding + let mut padded_bytes = Vec::with_capacity(total_len); + padded_bytes.extend_from_slice(bytes); + padded_bytes.extend(std::iter::repeat(0).take(padding)); + + let mut result = Vec::with_capacity(total_len / 16); + for chunk in padded_bytes.chunks_exact(16) { + // Convert each 16-byte chunk into a u128 + let mut array = [0u8; 16]; + array.copy_from_slice(chunk); + result.push(u128::from_be_bytes(array)); + } + + Bytes { + size: bytes.len() as u32, + data: result, } } @@ -52,10 +107,7 @@ where .dispatch( &DOMAIN_EVM, &cainome::cairo_serde::ContractAddress(FieldElement::from_bytes_be(&receiver).unwrap()), - &Bytes { - size: msg_body.len() as u32, - data: msg_body.iter().map(|b| *b as u128).collect(), - }, + &to_strk_message_bytes(msg_body), &None, &None, ) @@ -83,17 +135,17 @@ where println!("\nDispatched: {:?}", dispatch); - let process_tx = to.core.mailbox.process( - vec![].into(), - dispatch.message.to_bytes_be().as_slice().to_vec().into(), - ); + let process_tx = to + .core + .mailbox + .process(vec![].into(), to_eth_message_bytes(dispatch.message).into()); let process_tx_res = process_tx.send().await?.await?.unwrap(); Ok(process_tx_res) } #[tokio::test] -async fn test_mailbox_cw_to_evm() -> eyre::Result<()> { +async fn test_mailbox_strk_to_evm() -> eyre::Result<()> { // init starknet env let strk = strk::setup_env(DOMAIN_STRK, &[TestValidators::new(DOMAIN_EVM, 5, 3)]).await?; From 3701a5e012209dfc8bd19b78b0372a0873fe5601 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 17:41:00 +0100 Subject: [PATCH 18/26] feat: evm -> strk --- rust/tests/contracts/strk/utils.rs | 1 + rust/tests/mailbox.rs | 99 +++++++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 1 deletion(-) diff --git a/rust/tests/contracts/strk/utils.rs b/rust/tests/contracts/strk/utils.rs index 9ce22a6..3f10319 100644 --- a/rust/tests/contracts/strk/utils.rs +++ b/rust/tests/contracts/strk/utils.rs @@ -161,6 +161,7 @@ pub async fn deploy_contract( let deployment = contract_factory.deploy(constructor_calldata, salt, false); + tokio::time::sleep(tokio::time::Duration::from_millis(1000)).await; let deploy_res = deployment.send().await.expect("Failed to deploy contract"); let receipt = get_transaction_receipt(deployer.provider(), deploy_res.transaction_hash) diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs index b3d9441..b56ec07 100644 --- a/rust/tests/mailbox.rs +++ b/rust/tests/mailbox.rs @@ -5,7 +5,10 @@ mod validator; use bytes::{BufMut, BytesMut}; use cainome::cairo_serde::CairoSerde; -use contracts::strk::mailbox::{mailbox, Bytes, Dispatch as DispatchEvent, Message}; +use contracts::{ + eth::mailbox::{DispatchFilter, DispatchIdFilter}, + strk::mailbox::{mailbox, Bytes, Dispatch as DispatchEvent, Message}, +}; use ethers::{ prelude::parse_log, providers::Middleware, signers::Signer, types::TransactionReceipt, }; @@ -61,6 +64,36 @@ fn to_eth_message_bytes(starknet_message: Message) -> Vec { buf.to_vec() } +/// Convert a dispatch event to a starknet message +fn eth_dispatch_event_to_strk_message(event: DispatchFilter) -> Message { + let sender = cainome::cairo_serde::ContractAddress( + FieldElement::from_byte_slice_be(event.sender.as_bytes()).expect("Invalid sender"), + ); + let recipient = cainome::cairo_serde::ContractAddress( + FieldElement::from_bytes_be(&event.recipient).expect("Invalid recipient"), + ); + let destination = event.destination; + + let m = event.message; + + let version = m[0]; + let nonce = u32::from_be_bytes(m[1..5].try_into().unwrap()); + let origin = u32::from_be_bytes(m[5..9].try_into().unwrap()); + let body = m[77..].try_into().unwrap(); + + println!("Starknet message: {:?}", m); + + Message { + version, + nonce, + origin, + sender, + destination, + recipient, + body: to_strk_message_bytes(body), + } +} + /// Convert a byte slice to a starknet message /// We have to pad the bytes to 16 bytes chunks /// see here for more info https://github.com/keep-starknet-strange/alexandria/blob/main/src/bytes/src/bytes.cairo#L16 @@ -144,6 +177,57 @@ where Ok(process_tx_res) } +async fn send_msg_evm_to_strk( + from: ð::Env, + to: &strk::Env, +) -> eyre::Result +where + M: Middleware + 'static, + S: Signer + 'static, +{ + // prepare message arguments + // let sender = bech32_encode("osmo", from.acc_owner.address().as_bytes())?; + let receiver = to.core.msg_receiver.to_bytes_be(); + let msg_body = b"hello world"; + + let version = from.core.mailbox.version().call().await?; + println!("version: {:?}", version); + + // dispatch + let dispatch_tx_call = from + .core + .mailbox + .dispatch(DOMAIN_STRK, receiver, msg_body.into()); + let dispatch_res = dispatch_tx_call.send().await?.await?.unwrap(); + + let dispatch: DispatchFilter = parse_log(dispatch_res.logs[0].clone())?; + let dispatch_id: DispatchIdFilter = parse_log(dispatch_res.logs[1].clone())?; + + // dispatch + let mailbox_contract = mailbox::new(to.core.mailbox, &to.acc_tester); + println!( + "message: {:?}", + eth_dispatch_event_to_strk_message(dispatch.clone()) + ); + let process_res = mailbox_contract + .process( + &Bytes { + size: 0, + data: vec![], + }, + ð_dispatch_event_to_strk_message(dispatch), + ) + .send() + .await?; + + let strk_provider: &AnyProvider = to.acc_owner.provider(); + let process_receipt = strk_provider + .get_transaction_receipt(process_res.transaction_hash) + .await?; + + Ok(process_receipt) +} + #[tokio::test] async fn test_mailbox_strk_to_evm() -> eyre::Result<()> { // init starknet env @@ -156,3 +240,16 @@ async fn test_mailbox_strk_to_evm() -> eyre::Result<()> { Ok(()) } + +#[tokio::test] +async fn test_mailbox_evm_to_strk() -> eyre::Result<()> { + // init starknet env + let strk = strk::setup_env(DOMAIN_STRK, &[TestValidators::new(DOMAIN_EVM, 5, 3)]).await?; + + // init eth env + let anvil = eth::setup_env(DOMAIN_EVM).await?; + + let _ = send_msg_evm_to_strk(&anvil, &strk).await?; + + Ok(()) +} From 344588080d630eec24d619936a1c21c2208392f2 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 17:54:40 +0100 Subject: [PATCH 19/26] fix: ci --- .github/workflows/build.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9faa4d9..7c24c35 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,19 +8,15 @@ on: jobs: rust_build: runs-on: ubuntu-latest - env: - working-directory: ./rust steps: - uses: actions/checkout@v3 # selecting a toolchain either by action or manual `rustup` calls should happen # before the plugin, as the cache uses the current rustc version as its cache key - - working-directory: ${{ env.working-directory}} - run: rustup show + - run: rustup show - uses: Swatinem/rust-cache@v2 - name: Build the project - working-directory: ${{ env.working-directory}} run: | - cargo build --release \ No newline at end of file + cd rust && cargo build --release \ No newline at end of file From 39db69998ee1ca3be8410303a51b1ca47af0193a Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 18:11:53 +0100 Subject: [PATCH 20/26] fix: ci --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c24c35..1f6ab4d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,12 @@ jobs: - run: rustup show - uses: Swatinem/rust-cache@v2 + - uses: software-mansion/setup-scarb@v1 - - name: Build the project + - name: Build contracts + run: | + cd contracts && scarb build + + - name: Build the rust code run: | cd rust && cargo build --release \ No newline at end of file From eac9cbedea2cfbbb5f04ec990c866143ef25f185 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 19:02:20 +0100 Subject: [PATCH 21/26] =?UTF-8?q?=F0=9F=8E=89=20integration=20tests=20pass?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rust/abis/Mailbox.json | 351 ++++++++++++++++++++----- rust/abis/TestMerkleTreeHook.json | 366 +++++++++++++++++++++++++++ rust/abis/TestRecipient.json | 12 +- rust/build.rs | 1 + rust/tests/contracts/eth/bind/mod.rs | 2 + rust/tests/contracts/eth/deploy.rs | 17 +- rust/tests/contracts/eth/types.rs | 4 +- rust/tests/mailbox.rs | 2 +- 8 files changed, 688 insertions(+), 67 deletions(-) create mode 100644 rust/abis/TestMerkleTreeHook.json diff --git a/rust/abis/Mailbox.json b/rust/abis/Mailbox.json index 0136118..ba6d132 100644 --- a/rust/abis/Mailbox.json +++ b/rust/abis/Mailbox.json @@ -14,6 +14,19 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "hook", + "type": "address" + } + ], + "name": "DefaultHookSet", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -103,12 +116,6 @@ "name": "OwnershipTransferred", "type": "event" }, - { - "anonymous": false, - "inputs": [], - "name": "Paused", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -149,22 +156,16 @@ }, { "anonymous": false, - "inputs": [], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "MAX_MESSAGE_BODY_BYTES", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "hook", + "type": "address" } ], - "stateMutability": "view", - "type": "function" + "name": "RequiredHookSet", + "type": "event" }, { "inputs": [], @@ -181,12 +182,12 @@ }, { "inputs": [], - "name": "count", + "name": "defaultHook", "outputs": [ { - "internalType": "uint32", + "internalType": "contract IPostDispatchHook", "name": "", - "type": "uint32" + "type": "address" } ], "stateMutability": "view", @@ -209,7 +210,7 @@ "inputs": [ { "internalType": "bytes32", - "name": "", + "name": "_id", "type": "bytes32" } ], @@ -224,6 +225,92 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "deployedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "destinationDomain", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "recipientAddress", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "messageBody", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + }, + { + "internalType": "contract IPostDispatchHook", + "name": "hook", + "type": "address" + } + ], + "name": "dispatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "destinationDomain", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "recipientAddress", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "messageBody", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "hookMetadata", + "type": "bytes" + } + ], + "name": "dispatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, { "inputs": [ { @@ -250,7 +337,7 @@ "type": "bytes32" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { @@ -264,6 +351,16 @@ "internalType": "address", "name": "_defaultIsm", "type": "address" + }, + { + "internalType": "address", + "name": "_defaultHook", + "type": "address" + }, + { + "internalType": "address", + "name": "_requiredHook", + "type": "address" } ], "name": "initialize", @@ -273,12 +370,12 @@ }, { "inputs": [], - "name": "isPaused", + "name": "latestDispatchedId", "outputs": [ { - "internalType": "bool", + "internalType": "bytes32", "name": "", - "type": "bool" + "type": "bytes32" } ], "stateMutability": "view", @@ -286,13 +383,8 @@ }, { "inputs": [], - "name": "latestCheckpoint", + "name": "localDomain", "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, { "internalType": "uint32", "name": "", @@ -304,7 +396,7 @@ }, { "inputs": [], - "name": "localDomain", + "name": "nonce", "outputs": [ { "internalType": "uint32", @@ -328,13 +420,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -350,7 +435,147 @@ ], "name": "process", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_id", + "type": "bytes32" + } + ], + "name": "processedAt", + "outputs": [ + { + "internalType": "uint48", + "name": "", + "type": "uint48" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_id", + "type": "bytes32" + } + ], + "name": "processor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "destinationDomain", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "recipientAddress", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "messageBody", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + }, + { + "internalType": "contract IPostDispatchHook", + "name": "hook", + "type": "address" + } + ], + "name": "quoteDispatch", + "outputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "destinationDomain", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "recipientAddress", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "messageBody", + "type": "bytes" + } + ], + "name": "quoteDispatch", + "outputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "destinationDomain", + "type": "uint32" + }, + { + "internalType": "bytes32", + "name": "recipientAddress", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "messageBody", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "defaultHookMetadata", + "type": "bytes" + } + ], + "name": "quoteDispatch", + "outputs": [ + { + "internalType": "uint256", + "name": "fee", + "type": "uint256" + } + ], + "stateMutability": "view", "type": "function" }, { @@ -381,12 +606,12 @@ }, { "inputs": [], - "name": "root", + "name": "requiredHook", "outputs": [ { - "internalType": "bytes32", + "internalType": "contract IPostDispatchHook", "name": "", - "type": "bytes32" + "type": "address" } ], "stateMutability": "view", @@ -396,11 +621,11 @@ "inputs": [ { "internalType": "address", - "name": "_module", + "name": "_hook", "type": "address" } ], - "name": "setDefaultIsm", + "name": "setDefaultHook", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -409,38 +634,44 @@ "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "_module", "type": "address" } ], - "name": "transferOwnership", + "name": "setDefaultIsm", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "tree", - "outputs": [ + "inputs": [ { - "internalType": "uint256", - "name": "count", - "type": "uint256" + "internalType": "address", + "name": "_hook", + "type": "address" } ], - "stateMutability": "view", + "name": "setRequiredHook", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "unpause", + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], - "bytecode": "0x60a060405234801561001057600080fd5b5060405162002229380380620022298339810160408190526100319161003f565b63ffffffff1660805261006c565b60006020828403121561005157600080fd5b815163ffffffff8116811461006557600080fd5b9392505050565b6080516121936200009660003960008181610230015281816106300152610d0501526121936000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c8063907c0f92116100cd578063f2fde38b11610081578063fa31de0111610066578063fa31de011461030e578063fd54b22814610321578063ffa1ad741461032b57600080fd5b8063f2fde38b146102e8578063f794687a146102fb57600080fd5b8063e495f1d4116100b2578063e495f1d4146102aa578063e70f48ac146102cd578063ebf0c717146102e057600080fd5b8063907c0f9214610270578063b187bd261461029257600080fd5b8063715018a6116101245780638456cb59116101095780638456cb59146102235780638d3638f41461022b5780638da5cb5b1461025257600080fd5b8063715018a6146102085780637c39d1301461021057600080fd5b8063485cc95511610155578063485cc95514610199578063522ae002146101ac5780636e5f516e146101c357600080fd5b806306661abd146101715780633f4ba83a1461018f575b600080fd5b60b8545b60405163ffffffff90911681526020015b60405180910390f35b610197610345565b005b6101976101a7366004611a93565b610380565b6101b561080081565b604051908152602001610186565b6097546101e39073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b610197610533565b61019761021e366004611b0e565b610547565b6101976109fa565b6101757f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff166101e3565b610278610a35565b6040805192835263ffffffff909116602083015201610186565b61029a610a5d565b6040519015158152602001610186565b61029a6102b8366004611b7a565b60b96020526000908152604090205460ff1681565b6101e36102db366004611b93565b610a70565b6101b5610b3e565b6101976102f6366004611b93565b610b4a565b610197610309366004611b93565b610c01565b6101b561031c366004611bb0565b610c12565b60b8546101b59081565b610333600081565b60405160ff9091168152602001610186565b61034d610dce565b610355610e4f565b6040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b600054610100900460ff16158080156103a05750600054600160ff909116105b806103ba5750303b1580156103ba575060005460ff166001145b61044b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156104a957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6104b1610ec2565b6104b9610f59565b6104c283610b4a565b6104cb82610ff8565b801561052e57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61053b610dce565b61054560006110e5565b565b6001606554146105b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f7265656e7472616e742063616c6c20286f7220706175736564290000000000006044820152606401610442565b600060658190556105c4838361115c565b60ff161461062e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2176657273696f6e0000000000000000000000000000000000000000000000006044820152606401610442565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff1661065f8383611180565b63ffffffff16146106cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f2164657374696e6174696f6e00000000000000000000000000000000000000006044820152606401610442565b600061070d83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506111a392505050565b600081815260b9602052604090205490915060ff1615610789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f64656c69766572656400000000000000000000000000000000000000000000006044820152606401610442565b600081815260b96020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556107cd6102db85856111ae565b6040517ff7e83aee00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f7e83aee90610828908990899089908990600401611c52565b6020604051808303816000875af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b9190611c84565b6108d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f216d6f64756c65000000000000000000000000000000000000000000000000006044820152606401610442565b60006108dd85856111c7565b905060006108eb86866111d7565b905060006108f987876111ae565b90508073ffffffffffffffffffffffffffffffffffffffff166356d5d47584846109238b8b6111f0565b6040518563ffffffff1660e01b81526004016109429493929190611ca6565b600060405180830381600087803b15801561095c57600080fd5b505af1158015610970573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff16828463ffffffff167f0d381c2a574ae8f04e213db7cfb4df8df712cdbd427d9868ffef380660ca657460405160405180910390a460405185907f1cae38cdd3d3919489272725a5ae62a4f48b2989b0dae843d3c279fee18073a990600090a25050600160655550505050505050565b610a02610dce565b610a0a61120c565b6040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600080610a40610b3e565b6001610a4b60b85490565b610a559190611d05565b915091509091565b6000610a6b60655460021490565b905090565b60008173ffffffffffffffffffffffffffffffffffffffff1663de523cf36040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610af7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610af491810190611d29565b60015b15610b205773ffffffffffffffffffffffffffffffffffffffff811615610b1e5792915050565b505b505060975473ffffffffffffffffffffffffffffffffffffffff1690565b6000610a6b609861127f565b610b52610dce565b73ffffffffffffffffffffffffffffffffffffffff8116610bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610442565b610bfe816110e5565b50565b610c09610dce565b610bfe81610ff8565b6000610c2060655460021490565b15610c87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f70617573656400000000000000000000000000000000000000000000000000006044820152606401610442565b610800821115610cf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d736720746f6f206c6f6e6700000000000000000000000000000000000000006044820152606401610442565b6000610d2e6000610d0360b85490565b7f0000000000000000000000000000000000000000000000000000000000000000338a8a8a8a611292565b80516020820120909150610d436098826112d0565b858763ffffffff163373ffffffffffffffffffffffffffffffffffffffff167f769f711d20c679153d382254f59892613b58a97cc876b249134ac25c80f9c81485604051610d919190611d46565b60405180910390a460405181907f788dbc1b7152732178210e7f4d9d010ef016f9eafbe66786bd7169f56e0c353a90600090a29695505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610442565b606554600214610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f21706175736564000000000000000000000000000000000000000000000000006044820152606401610442565b6001606555565b600054610100900460ff16610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b600054610100900460ff16610ff0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b61054561140f565b73ffffffffffffffffffffffffffffffffffffffff81163b611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21636f6e747261637400000000000000000000000000000000000000000000006044820152606401610442565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa76ad0adbf45318f8633aa0210f711273d50fbb6fef76ed95bbae97082c75daa90600090a250565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061116b6001828486611db2565b61117491611ddc565b60f81c90505b92915050565b6000611190602d60298486611db2565b61119991611e22565b60e01c9392505050565b805160209091012090565b60006111c06111bd84846114af565b90565b9392505050565b6000611190600960058486611db2565b60006111e7602960098486611db2565b6111c091611e68565b36600061120083604d8187611db2565b915091505b9250929050565b606554600203611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f70617573656400000000000000000000000000000000000000000000000000006044820152606401610442565b6002606555565b600061117a8261128d6114bf565b611980565b606088888888888888886040516020016112b3989796959493929190611ea4565b604051602081830303815290604052905098975050505050505050565b60016112de6020600261205a565b6112e89190612066565b826020015410611354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d65726b6c6520747265652066756c6c000000000000000000000000000000006044820152606401610442565b60018260200160008282546113699190612079565b9091555050602082015460005b602081101561140657816001166001036113a5578284826020811061139d5761139d61208c565b015550505050565b8381602081106113b7576113b761208c565b015460408051602081019290925281018490526060016040516020818303038152906040528051906020012092506002826113f291906120bb565b9150806113fe816120f6565b915050611376565b5061052e61212e565b600054610100900460ff166114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b610545336110e5565b60006111e7604d602d8486611db2565b6114c7611a52565b600081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb560208201527fb4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3060408201527f21ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba8560608201527fe58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a1934460808201527f0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d60a08201527f887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a196860c08201527fffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f8360e08201527f9867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af6101008201527fcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e06101208201527ff9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a56101408201527ff8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8926101608201527f3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99c6101808201527fc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb6101a08201527f5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8becc6101c08201527fda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d26101e08201527f2733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981f6102008201527fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a6102208201527f5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a06102408201527fb46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa06102608201527fc65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e26102808201527ff4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd96102a08201527f5a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3776102c08201527f4df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee6526102e08201527fcdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef6103008201527f0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618d6103208201527fb8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d06103408201527f838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e6103608201527f662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e6103808201527f388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea3226103a08201527f93237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7356103c08201527f8448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a96103e082015290565b6020820154600090815b6020811015611a4a57600182821c1660008683602081106119ad576119ad61208c565b01549050816001036119ea576040805160208101839052908101869052606001604051602081830303815290604052805190602001209450611a35565b848684602081106119fd576119fd61208c565b6020020151604051602001611a1c929190918252602082015260400190565b6040516020818303038152906040528051906020012094505b50508080611a42906120f6565b91505061198a565b505092915050565b6040518061040001604052806020906020820280368337509192915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610bfe57600080fd5b60008060408385031215611aa657600080fd5b8235611ab181611a71565b91506020830135611ac181611a71565b809150509250929050565b60008083601f840112611ade57600080fd5b50813567ffffffffffffffff811115611af657600080fd5b60208301915083602082850101111561120557600080fd5b60008060008060408587031215611b2457600080fd5b843567ffffffffffffffff80821115611b3c57600080fd5b611b4888838901611acc565b90965094506020870135915080821115611b6157600080fd5b50611b6e87828801611acc565b95989497509550505050565b600060208284031215611b8c57600080fd5b5035919050565b600060208284031215611ba557600080fd5b81356111c081611a71565b60008060008060608587031215611bc657600080fd5b843563ffffffff81168114611bda57600080fd5b935060208501359250604085013567ffffffffffffffff811115611bfd57600080fd5b611b6e87828801611acc565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611c66604083018688611c09565b8281036020840152611c79818587611c09565b979650505050505050565b600060208284031215611c9657600080fd5b815180151581146111c057600080fd5b63ffffffff85168152836020820152606060408201526000611ccc606083018486611c09565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff828116828216039080821115611d2257611d22611cd6565b5092915050565b600060208284031215611d3b57600080fd5b81516111c081611a71565b600060208083528351808285015260005b81811015611d7357858101830151858201604001528201611d57565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008085851115611dc257600080fd5b83861115611dcf57600080fd5b5050820193919092039150565b7fff000000000000000000000000000000000000000000000000000000000000008135818116916001851015611a4a5760019490940360031b84901b1690921692915050565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611a4a5760049490940360031b84901b1690921692915050565b8035602083101561117a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7fff000000000000000000000000000000000000000000000000000000000000008960f81b16815260007fffffffff00000000000000000000000000000000000000000000000000000000808a60e01b166001840152808960e01b166005840152876009840152808760e01b1660298401525084602d8301528284604d8401375060009101604d01908152979650505050505050565b600181815b80851115611f9357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611f7957611f79611cd6565b80851615611f8657918102915b93841c9390800290611f3f565b509250929050565b600082611faa5750600161117a565b81611fb75750600061117a565b8160018114611fcd5760028114611fd757611ff3565b600191505061117a565b60ff841115611fe857611fe8611cd6565b50506001821b61117a565b5060208310610133831016604e8410600b8410161715612016575081810a61117a565b6120208383611f3a565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561205257612052611cd6565b029392505050565b60006111c08383611f9b565b8181038181111561117a5761117a611cd6565b8082018082111561117a5761117a611cd6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000826120f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361212757612127611cd6565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220d6f190bbbc6dd5996396b02e3f879b34f377436d5eb95ba31ba46f98da84871764736f6c63430008110033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061016c5760003560e01c8063907c0f92116100cd578063f2fde38b11610081578063fa31de0111610066578063fa31de011461030e578063fd54b22814610321578063ffa1ad741461032b57600080fd5b8063f2fde38b146102e8578063f794687a146102fb57600080fd5b8063e495f1d4116100b2578063e495f1d4146102aa578063e70f48ac146102cd578063ebf0c717146102e057600080fd5b8063907c0f9214610270578063b187bd261461029257600080fd5b8063715018a6116101245780638456cb59116101095780638456cb59146102235780638d3638f41461022b5780638da5cb5b1461025257600080fd5b8063715018a6146102085780637c39d1301461021057600080fd5b8063485cc95511610155578063485cc95514610199578063522ae002146101ac5780636e5f516e146101c357600080fd5b806306661abd146101715780633f4ba83a1461018f575b600080fd5b60b8545b60405163ffffffff90911681526020015b60405180910390f35b610197610345565b005b6101976101a7366004611a93565b610380565b6101b561080081565b604051908152602001610186565b6097546101e39073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b610197610533565b61019761021e366004611b0e565b610547565b6101976109fa565b6101757f000000000000000000000000000000000000000000000000000000000000000081565b60335473ffffffffffffffffffffffffffffffffffffffff166101e3565b610278610a35565b6040805192835263ffffffff909116602083015201610186565b61029a610a5d565b6040519015158152602001610186565b61029a6102b8366004611b7a565b60b96020526000908152604090205460ff1681565b6101e36102db366004611b93565b610a70565b6101b5610b3e565b6101976102f6366004611b93565b610b4a565b610197610309366004611b93565b610c01565b6101b561031c366004611bb0565b610c12565b60b8546101b59081565b610333600081565b60405160ff9091168152602001610186565b61034d610dce565b610355610e4f565b6040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b600054610100900460ff16158080156103a05750600054600160ff909116105b806103ba5750303b1580156103ba575060005460ff166001145b61044b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156104a957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6104b1610ec2565b6104b9610f59565b6104c283610b4a565b6104cb82610ff8565b801561052e57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b61053b610dce565b61054560006110e5565b565b6001606554146105b3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f7265656e7472616e742063616c6c20286f7220706175736564290000000000006044820152606401610442565b600060658190556105c4838361115c565b60ff161461062e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2176657273696f6e0000000000000000000000000000000000000000000000006044820152606401610442565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff1661065f8383611180565b63ffffffff16146106cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f2164657374696e6174696f6e00000000000000000000000000000000000000006044820152606401610442565b600061070d83838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506111a392505050565b600081815260b9602052604090205490915060ff1615610789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f64656c69766572656400000000000000000000000000000000000000000000006044820152606401610442565b600081815260b96020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556107cd6102db85856111ae565b6040517ff7e83aee00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff82169063f7e83aee90610828908990899089908990600401611c52565b6020604051808303816000875af1158015610847573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086b9190611c84565b6108d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f216d6f64756c65000000000000000000000000000000000000000000000000006044820152606401610442565b60006108dd85856111c7565b905060006108eb86866111d7565b905060006108f987876111ae565b90508073ffffffffffffffffffffffffffffffffffffffff166356d5d47584846109238b8b6111f0565b6040518563ffffffff1660e01b81526004016109429493929190611ca6565b600060405180830381600087803b15801561095c57600080fd5b505af1158015610970573d6000803e3d6000fd5b505050508073ffffffffffffffffffffffffffffffffffffffff16828463ffffffff167f0d381c2a574ae8f04e213db7cfb4df8df712cdbd427d9868ffef380660ca657460405160405180910390a460405185907f1cae38cdd3d3919489272725a5ae62a4f48b2989b0dae843d3c279fee18073a990600090a25050600160655550505050505050565b610a02610dce565b610a0a61120c565b6040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600080610a40610b3e565b6001610a4b60b85490565b610a559190611d05565b915091509091565b6000610a6b60655460021490565b905090565b60008173ffffffffffffffffffffffffffffffffffffffff1663de523cf36040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610af7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610af491810190611d29565b60015b15610b205773ffffffffffffffffffffffffffffffffffffffff811615610b1e5792915050565b505b505060975473ffffffffffffffffffffffffffffffffffffffff1690565b6000610a6b609861127f565b610b52610dce565b73ffffffffffffffffffffffffffffffffffffffff8116610bf5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610442565b610bfe816110e5565b50565b610c09610dce565b610bfe81610ff8565b6000610c2060655460021490565b15610c87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f70617573656400000000000000000000000000000000000000000000000000006044820152606401610442565b610800821115610cf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6d736720746f6f206c6f6e6700000000000000000000000000000000000000006044820152606401610442565b6000610d2e6000610d0360b85490565b7f0000000000000000000000000000000000000000000000000000000000000000338a8a8a8a611292565b80516020820120909150610d436098826112d0565b858763ffffffff163373ffffffffffffffffffffffffffffffffffffffff167f769f711d20c679153d382254f59892613b58a97cc876b249134ac25c80f9c81485604051610d919190611d46565b60405180910390a460405181907f788dbc1b7152732178210e7f4d9d010ef016f9eafbe66786bd7169f56e0c353a90600090a29695505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610545576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610442565b606554600214610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f21706175736564000000000000000000000000000000000000000000000000006044820152606401610442565b6001606555565b600054610100900460ff16610ebb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b600054610100900460ff16610ff0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b61054561140f565b73ffffffffffffffffffffffffffffffffffffffff81163b611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21636f6e747261637400000000000000000000000000000000000000000000006044820152606401610442565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa76ad0adbf45318f8633aa0210f711273d50fbb6fef76ed95bbae97082c75daa90600090a250565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061116b6001828486611db2565b61117491611ddc565b60f81c90505b92915050565b6000611190602d60298486611db2565b61119991611e22565b60e01c9392505050565b805160209091012090565b60006111c06111bd84846114af565b90565b9392505050565b6000611190600960058486611db2565b60006111e7602960098486611db2565b6111c091611e68565b36600061120083604d8187611db2565b915091505b9250929050565b606554600203611278576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f70617573656400000000000000000000000000000000000000000000000000006044820152606401610442565b6002606555565b600061117a8261128d6114bf565b611980565b606088888888888888886040516020016112b3989796959493929190611ea4565b604051602081830303815290604052905098975050505050505050565b60016112de6020600261205a565b6112e89190612066565b826020015410611354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d65726b6c6520747265652066756c6c000000000000000000000000000000006044820152606401610442565b60018260200160008282546113699190612079565b9091555050602082015460005b602081101561140657816001166001036113a5578284826020811061139d5761139d61208c565b015550505050565b8381602081106113b7576113b761208c565b015460408051602081019290925281018490526060016040516020818303038152906040528051906020012092506002826113f291906120bb565b9150806113fe816120f6565b915050611376565b5061052e61212e565b600054610100900460ff166114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610442565b610545336110e5565b60006111e7604d602d8486611db2565b6114c7611a52565b600081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb560208201527fb4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3060408201527f21ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba8560608201527fe58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a1934460808201527f0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d60a08201527f887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a196860c08201527fffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f8360e08201527f9867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af6101008201527fcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e06101208201527ff9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a56101408201527ff8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8926101608201527f3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99c6101808201527fc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb6101a08201527f5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8becc6101c08201527fda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d26101e08201527f2733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981f6102008201527fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a6102208201527f5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a06102408201527fb46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa06102608201527fc65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e26102808201527ff4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd96102a08201527f5a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3776102c08201527f4df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee6526102e08201527fcdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef6103008201527f0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618d6103208201527fb8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d06103408201527f838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e6103608201527f662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e6103808201527f388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea3226103a08201527f93237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7356103c08201527f8448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a96103e082015290565b6020820154600090815b6020811015611a4a57600182821c1660008683602081106119ad576119ad61208c565b01549050816001036119ea576040805160208101839052908101869052606001604051602081830303815290604052805190602001209450611a35565b848684602081106119fd576119fd61208c565b6020020151604051602001611a1c929190918252602082015260400190565b6040516020818303038152906040528051906020012094505b50508080611a42906120f6565b91505061198a565b505092915050565b6040518061040001604052806020906020820280368337509192915050565b73ffffffffffffffffffffffffffffffffffffffff81168114610bfe57600080fd5b60008060408385031215611aa657600080fd5b8235611ab181611a71565b91506020830135611ac181611a71565b809150509250929050565b60008083601f840112611ade57600080fd5b50813567ffffffffffffffff811115611af657600080fd5b60208301915083602082850101111561120557600080fd5b60008060008060408587031215611b2457600080fd5b843567ffffffffffffffff80821115611b3c57600080fd5b611b4888838901611acc565b90965094506020870135915080821115611b6157600080fd5b50611b6e87828801611acc565b95989497509550505050565b600060208284031215611b8c57600080fd5b5035919050565b600060208284031215611ba557600080fd5b81356111c081611a71565b60008060008060608587031215611bc657600080fd5b843563ffffffff81168114611bda57600080fd5b935060208501359250604085013567ffffffffffffffff811115611bfd57600080fd5b611b6e87828801611acc565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611c66604083018688611c09565b8281036020840152611c79818587611c09565b979650505050505050565b600060208284031215611c9657600080fd5b815180151581146111c057600080fd5b63ffffffff85168152836020820152606060408201526000611ccc606083018486611c09565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff828116828216039080821115611d2257611d22611cd6565b5092915050565b600060208284031215611d3b57600080fd5b81516111c081611a71565b600060208083528351808285015260005b81811015611d7357858101830151858201604001528201611d57565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008085851115611dc257600080fd5b83861115611dcf57600080fd5b5050820193919092039150565b7fff000000000000000000000000000000000000000000000000000000000000008135818116916001851015611a4a5760019490940360031b84901b1690921692915050565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611a4a5760049490940360031b84901b1690921692915050565b8035602083101561117a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7fff000000000000000000000000000000000000000000000000000000000000008960f81b16815260007fffffffff00000000000000000000000000000000000000000000000000000000808a60e01b166001840152808960e01b166005840152876009840152808760e01b1660298401525084602d8301528284604d8401375060009101604d01908152979650505050505050565b600181815b80851115611f9357817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611f7957611f79611cd6565b80851615611f8657918102915b93841c9390800290611f3f565b509250929050565b600082611faa5750600161117a565b81611fb75750600061117a565b8160018114611fcd5760028114611fd757611ff3565b600191505061117a565b60ff841115611fe857611fe8611cd6565b50506001821b61117a565b5060208310610133831016604e8410600b8410161715612016575081810a61117a565b6120208383611f3a565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561205257612052611cd6565b029392505050565b60006111c08383611f9b565b8181038181111561117a5761117a611cd6565b8082018082111561117a5761117a611cd6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000826120f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361212757612127611cd6565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fdfea2646970667358221220d6f190bbbc6dd5996396b02e3f879b34f377436d5eb95ba31ba46f98da84871764736f6c63430008110033", + "bytecode": "0x60c060405234801561001057600080fd5b50604051620021e7380380620021e783398101604081905261003191610043565b4360805263ffffffff1660a052610070565b60006020828403121561005557600080fd5b815163ffffffff8116811461006957600080fd5b9392505050565b60805160a051612143620000a4600039600081816103cb01528181610aae01526117000152600061039701526121436000f3fe6080604052600436106101a15760003560e01c80638da5cb5b116100e1578063e70f48ac1161008a578063f7ccd32111610064578063f7ccd32114610576578063f8c8765e14610596578063fa31de01146105b6578063ffa1ad74146105c957600080fd5b8063e70f48ac14610516578063f2fde38b14610536578063f794687a1461055657600080fd5b8063affed0e0116100bb578063affed0e01461046d578063d6d08a091461048a578063e495f1d4146104b757600080fd5b80638da5cb5b1461040257806399b048091461042d5780639c42bd181461044d57600080fd5b80635d1fe5a91161014e5780637c39d130116101285780637c39d1301461035257806381d2ea951461036557806382ea7bfe146103855780638d3638f4146103b957600080fd5b80635d1fe5a9146102cd5780636e5f516e14610310578063715018a61461033d57600080fd5b80631426b7f41161017f5780631426b7f4146102465780633d1250b71461026857806348aee8d4146102ba57600080fd5b806307a2fda1146101a657806310b83dc01461020f578063134fbb4f14610230575b600080fd5b3480156101b257600080fd5b506101f36101c1366004611a5e565b6000908152606a602052604090205474010000000000000000000000000000000000000000900465ffffffffffff1690565b60405165ffffffffffff90911681526020015b60405180910390f35b61022261021d366004611af4565b6105f0565b604051908152602001610206565b34801561023c57600080fd5b5061022260665481565b34801561025257600080fd5b50610266610261366004611b92565b6108c4565b005b34801561027457600080fd5b506068546102959073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b6102226102c8366004611baf565b6109e4565b3480156102d957600080fd5b506102956102e8366004611a5e565b6000908152606a602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b34801561031c57600080fd5b506067546102959073ffffffffffffffffffffffffffffffffffffffff1681565b34801561034957600080fd5b50610266610a22565b610266610360366004611c39565b610a36565b34801561037157600080fd5b50610222610380366004611af4565b610ed8565b34801561039157600080fd5b506102227f000000000000000000000000000000000000000000000000000000000000000081565b3480156103c557600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610206565b34801561040e57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff16610295565b34801561043957600080fd5b50610266610448366004611b92565b61106b565b34801561045957600080fd5b50610222610468366004611ca5565b611186565b34801561047957600080fd5b506065546103ed9063ffffffff1681565b34801561049657600080fd5b506069546102959073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104c357600080fd5b506105066104d2366004611a5e565b6000908152606a602052604090205474010000000000000000000000000000000000000000900465ffffffffffff16151590565b6040519015158152602001610206565b34801561052257600080fd5b50610295610531366004611b92565b6111c2565b34801561054257600080fd5b50610266610551366004611b92565b6112f9565b34801561056257600080fd5b50610266610571366004611b92565b6113b0565b34801561058257600080fd5b50610222610591366004611baf565b6114cb565b3480156105a257600080fd5b506102666105b1366004611cf3565b6114fe565b6102226105c4366004611ca5565b6116b8565b3480156105d557600080fd5b506105de600381565b60405160ff9091168152602001610206565b600073ffffffffffffffffffffffffffffffffffffffff82166106295760685473ffffffffffffffffffffffffffffffffffffffff1691505b6000610637898989896116eb565b8051602082012060668190556065805492935090916001919060009061066490849063ffffffff16611d7e565b92506101000a81548163ffffffff021916908363ffffffff160217905550888a63ffffffff163373ffffffffffffffffffffffffffffffffffffffff167f769f711d20c679153d382254f59892613b58a97cc876b249134ac25c80f9c814856040516106d09190611e10565b60405180910390a460405181907f788dbc1b7152732178210e7f4d9d010ef016f9eafbe66786bd7169f56e0c353a90600090a26069546040517faaccd23000000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff169063aaccd2309061075e908a908a908890600401611e6c565b602060405180830381865afa15801561077b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079f9190611e9c565b9050803410156107ac5750345b6069546040517f086011b900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063086011b9908390610808908b908b908990600401611e6c565b6000604051808303818588803b15801561082157600080fd5b505af1158015610835573d6000803e3d6000fd5b50505050508473ffffffffffffffffffffffffffffffffffffffff1663086011b982346108629190611eb5565b8989876040518563ffffffff1660e01b815260040161088393929190611e6c565b6000604051808303818588803b15801561089c57600080fd5b505af11580156108b0573d6000803e3d6000fd5b50949e9d5050505050505050505050505050565b6108cc611734565b73ffffffffffffffffffffffffffffffffffffffff81163b610975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d61696c626f783a20726571756972656420686f6f6b206e6f7420636f6e747260448201527f616374000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f329ec8e2438a73828ecf31a6568d7a91d7b1d79e342b0692914fd053d1a002b190600090a250565b6000610a17878787878787606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166105f0565b979650505050505050565b610a2a611734565b610a3460006117b5565b565b6003610a42838361182c565b60ff1614610aac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4d61696c626f783a206261642076657273696f6e000000000000000000000000604482015260640161096c565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff16610add8383611850565b63ffffffff1614610b4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4d61696c626f783a20756e65787065637465642064657374696e6174696f6e00604482015260640161096c565b6000610b8b83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061172992505050565b6000818152606a602052604090205490915074010000000000000000000000000000000000000000900465ffffffffffff1615610c24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d61696c626f783a20616c72656164792064656c697665726564000000000000604482015260640161096c565b6000610c308484611873565b90506000610c3d826111c2565b60408051808201825233815265ffffffffffff43811660208084019182526000898152606a9091529390932091518254935190911674010000000000000000000000000000000000000000027fffffffffffff000000000000000000000000000000000000000000000000000090931673ffffffffffffffffffffffffffffffffffffffff918216179290921790559091508216610cdb868661188c565b610ce587876118a5565b63ffffffff167f0d381c2a574ae8f04e213db7cfb4df8df712cdbd427d9868ffef380660ca657460405160405180910390a460405183907f1cae38cdd3d3919489272725a5ae62a4f48b2989b0dae843d3c279fee18073a990600090a26040517ff7e83aee00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063f7e83aee90610d9a908a908a908a908a90600401611ec8565b6020604051808303816000875af1158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190611eef565b610e43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4d61696c626f783a2049534d20766572696669636174696f6e206661696c6564604482015260640161096c565b8173ffffffffffffffffffffffffffffffffffffffff166356d5d47534610e6a88886118a5565b610e74898961188c565b610e7e8a8a6118b5565b6040518663ffffffff1660e01b8152600401610e9d9493929190611f11565b6000604051808303818588803b158015610eb657600080fd5b505af1158015610eca573d6000803e3d6000fd5b505050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216610f115760685473ffffffffffffffffffffffffffffffffffffffff1691505b6000610f1f898989896116eb565b6040517faaccd23000000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff84169063aaccd23090610f7890889088908690600401611e6c565b602060405180830381865afa158015610f95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb99190611e9c565b6069546040517faaccd23000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063aaccd2309061101390899089908790600401611e6c565b602060405180830381865afa158015611030573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110549190611e9c565b61105e9190611f37565b9998505050505050505050565b611073611734565b73ffffffffffffffffffffffffffffffffffffffff81163b611117576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4d61696c626f783a2064656661756c7420686f6f6b206e6f7420636f6e74726160448201527f6374000000000000000000000000000000000000000000000000000000000000606482015260840161096c565b606880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f65a63e5066ee2fcdf9d32a7f1bf7ce71c76066f19d0609dddccd334ab87237d790600090a250565b60006111b98585858561119b86808385611f4a565b60685473ffffffffffffffffffffffffffffffffffffffff16610ed8565b95945050505050565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fde523cf30000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff8616916112439190611f74565b600060405180830381855afa9150503d806000811461127e576040519150601f19603f3d011682016040523d82523d6000602084013e611283565b606091505b50915091508180156112955750805115155b156112d8576000818060200190518101906112b09190611f90565b905073ffffffffffffffffffffffffffffffffffffffff8116156112d657949350505050565b505b505060675473ffffffffffffffffffffffffffffffffffffffff1692915050565b611301611734565b73ffffffffffffffffffffffffffffffffffffffff81166113a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161096c565b6113ad816117b5565b50565b6113b8611734565b73ffffffffffffffffffffffffffffffffffffffff81163b61145c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4d61696c626f783a2064656661756c742049534d206e6f7420636f6e7472616360448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161096c565b606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa76ad0adbf45318f8633aa0210f711273d50fbb6fef76ed95bbae97082c75daa90600090a250565b6000610a17878787878787606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610ed8565b600054610100900460ff161580801561151e5750600054600160ff909116105b806115385750303b158015611538575060005460ff166001145b6115c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161096c565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561162257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61162a6118d1565b611633846113b0565b61163c8361106b565b611645826108c4565b61164e856112f9565b80156116b157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60006111b9858585856116cd86808385611f4a565b60685473ffffffffffffffffffffffffffffffffffffffff166105f0565b6065546060906111b99060039063ffffffff167f00000000000000000000000000000000000000000000000000000000000000003389898989611970565b805160209091012090565b60335473ffffffffffffffffffffffffffffffffffffffff163314610a34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161096c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061183b6001828486611f4a565b61184491611fad565b60f81c90505b92915050565b6000611860602d60298486611f4a565b61186991611ff5565b60e01c9392505050565b600061188561188284846119ae565b90565b9392505050565b600061189c602960098486611f4a565b6118859161203b565b6000611860600960058486611f4a565b3660006118c583604d8187611f4a565b915091505b9250929050565b600054610100900460ff16611968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161096c565b610a346119be565b60608888888888888888604051602001611991989796959493929190612077565b604051602081830303815290604052905098975050505050505050565b600061189c604d602d8486611f4a565b600054610100900460ff16611a55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161096c565b610a34336117b5565b600060208284031215611a7057600080fd5b5035919050565b803563ffffffff81168114611a8b57600080fd5b919050565b60008083601f840112611aa257600080fd5b50813567ffffffffffffffff811115611aba57600080fd5b6020830191508360208285010111156118ca57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811681146113ad57600080fd5b600080600080600080600060a0888a031215611b0f57600080fd5b611b1888611a77565b965060208801359550604088013567ffffffffffffffff80821115611b3c57600080fd5b611b488b838c01611a90565b909750955060608a0135915080821115611b6157600080fd5b50611b6e8a828b01611a90565b9094509250506080880135611b8281611ad2565b8091505092959891949750929550565b600060208284031215611ba457600080fd5b813561188581611ad2565b60008060008060008060808789031215611bc857600080fd5b611bd187611a77565b955060208701359450604087013567ffffffffffffffff80821115611bf557600080fd5b611c018a838b01611a90565b90965094506060890135915080821115611c1a57600080fd5b50611c2789828a01611a90565b979a9699509497509295939492505050565b60008060008060408587031215611c4f57600080fd5b843567ffffffffffffffff80821115611c6757600080fd5b611c7388838901611a90565b90965094506020870135915080821115611c8c57600080fd5b50611c9987828801611a90565b95989497509550505050565b60008060008060608587031215611cbb57600080fd5b611cc485611a77565b935060208501359250604085013567ffffffffffffffff811115611ce757600080fd5b611c9987828801611a90565b60008060008060808587031215611d0957600080fd5b8435611d1481611ad2565b93506020850135611d2481611ad2565b92506040850135611d3481611ad2565b91506060850135611d4481611ad2565b939692955090935050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff818116838216019080821115611d9b57611d9b611d4f565b5092915050565b60005b83811015611dbd578181015183820152602001611da5565b50506000910152565b60008151808452611dde816020860160208601611da2565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006118856020830184611dc6565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611e80604083018587611e23565b8281036020840152611e928185611dc6565b9695505050505050565b600060208284031215611eae57600080fd5b5051919050565b8181038181111561184a5761184a611d4f565b604081526000611edc604083018688611e23565b8281036020840152610a17818587611e23565b600060208284031215611f0157600080fd5b8151801515811461188557600080fd5b63ffffffff85168152836020820152606060408201526000611e92606083018486611e23565b8082018082111561184a5761184a611d4f565b60008085851115611f5a57600080fd5b83861115611f6757600080fd5b5050820193919092039150565b60008251611f86818460208701611da2565b9190910192915050565b600060208284031215611fa257600080fd5b815161188581611ad2565b7fff000000000000000000000000000000000000000000000000000000000000008135818116916001851015611fed5780818660010360031b1b83161692505b505092915050565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611fed5760049490940360031b84901b1690921692915050565b8035602083101561184a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7fff000000000000000000000000000000000000000000000000000000000000008960f81b16815260007fffffffff00000000000000000000000000000000000000000000000000000000808a60e01b166001840152808960e01b166005840152876009840152808760e01b1660298401525084602d8301528284604d8401375060009101604d0190815297965050505050505056fea2646970667358221220a3bd007f29b39684a36f8fb812241ff360dff1922dcb296613bda3147a13049264736f6c63430008130033", + "deployedBytecode": "0x6080604052600436106101a15760003560e01c80638da5cb5b116100e1578063e70f48ac1161008a578063f7ccd32111610064578063f7ccd32114610576578063f8c8765e14610596578063fa31de01146105b6578063ffa1ad74146105c957600080fd5b8063e70f48ac14610516578063f2fde38b14610536578063f794687a1461055657600080fd5b8063affed0e0116100bb578063affed0e01461046d578063d6d08a091461048a578063e495f1d4146104b757600080fd5b80638da5cb5b1461040257806399b048091461042d5780639c42bd181461044d57600080fd5b80635d1fe5a91161014e5780637c39d130116101285780637c39d1301461035257806381d2ea951461036557806382ea7bfe146103855780638d3638f4146103b957600080fd5b80635d1fe5a9146102cd5780636e5f516e14610310578063715018a61461033d57600080fd5b80631426b7f41161017f5780631426b7f4146102465780633d1250b71461026857806348aee8d4146102ba57600080fd5b806307a2fda1146101a657806310b83dc01461020f578063134fbb4f14610230575b600080fd5b3480156101b257600080fd5b506101f36101c1366004611a5e565b6000908152606a602052604090205474010000000000000000000000000000000000000000900465ffffffffffff1690565b60405165ffffffffffff90911681526020015b60405180910390f35b61022261021d366004611af4565b6105f0565b604051908152602001610206565b34801561023c57600080fd5b5061022260665481565b34801561025257600080fd5b50610266610261366004611b92565b6108c4565b005b34801561027457600080fd5b506068546102959073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610206565b6102226102c8366004611baf565b6109e4565b3480156102d957600080fd5b506102956102e8366004611a5e565b6000908152606a602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b34801561031c57600080fd5b506067546102959073ffffffffffffffffffffffffffffffffffffffff1681565b34801561034957600080fd5b50610266610a22565b610266610360366004611c39565b610a36565b34801561037157600080fd5b50610222610380366004611af4565b610ed8565b34801561039157600080fd5b506102227f000000000000000000000000000000000000000000000000000000000000000081565b3480156103c557600080fd5b506103ed7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff9091168152602001610206565b34801561040e57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff16610295565b34801561043957600080fd5b50610266610448366004611b92565b61106b565b34801561045957600080fd5b50610222610468366004611ca5565b611186565b34801561047957600080fd5b506065546103ed9063ffffffff1681565b34801561049657600080fd5b506069546102959073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104c357600080fd5b506105066104d2366004611a5e565b6000908152606a602052604090205474010000000000000000000000000000000000000000900465ffffffffffff16151590565b6040519015158152602001610206565b34801561052257600080fd5b50610295610531366004611b92565b6111c2565b34801561054257600080fd5b50610266610551366004611b92565b6112f9565b34801561056257600080fd5b50610266610571366004611b92565b6113b0565b34801561058257600080fd5b50610222610591366004611baf565b6114cb565b3480156105a257600080fd5b506102666105b1366004611cf3565b6114fe565b6102226105c4366004611ca5565b6116b8565b3480156105d557600080fd5b506105de600381565b60405160ff9091168152602001610206565b600073ffffffffffffffffffffffffffffffffffffffff82166106295760685473ffffffffffffffffffffffffffffffffffffffff1691505b6000610637898989896116eb565b8051602082012060668190556065805492935090916001919060009061066490849063ffffffff16611d7e565b92506101000a81548163ffffffff021916908363ffffffff160217905550888a63ffffffff163373ffffffffffffffffffffffffffffffffffffffff167f769f711d20c679153d382254f59892613b58a97cc876b249134ac25c80f9c814856040516106d09190611e10565b60405180910390a460405181907f788dbc1b7152732178210e7f4d9d010ef016f9eafbe66786bd7169f56e0c353a90600090a26069546040517faaccd23000000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff169063aaccd2309061075e908a908a908890600401611e6c565b602060405180830381865afa15801561077b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079f9190611e9c565b9050803410156107ac5750345b6069546040517f086011b900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063086011b9908390610808908b908b908990600401611e6c565b6000604051808303818588803b15801561082157600080fd5b505af1158015610835573d6000803e3d6000fd5b50505050508473ffffffffffffffffffffffffffffffffffffffff1663086011b982346108629190611eb5565b8989876040518563ffffffff1660e01b815260040161088393929190611e6c565b6000604051808303818588803b15801561089c57600080fd5b505af11580156108b0573d6000803e3d6000fd5b50949e9d5050505050505050505050505050565b6108cc611734565b73ffffffffffffffffffffffffffffffffffffffff81163b610975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d61696c626f783a20726571756972656420686f6f6b206e6f7420636f6e747260448201527f616374000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b606980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f329ec8e2438a73828ecf31a6568d7a91d7b1d79e342b0692914fd053d1a002b190600090a250565b6000610a17878787878787606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166105f0565b979650505050505050565b610a2a611734565b610a3460006117b5565b565b6003610a42838361182c565b60ff1614610aac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f4d61696c626f783a206261642076657273696f6e000000000000000000000000604482015260640161096c565b7f000000000000000000000000000000000000000000000000000000000000000063ffffffff16610add8383611850565b63ffffffff1614610b4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4d61696c626f783a20756e65787065637465642064657374696e6174696f6e00604482015260640161096c565b6000610b8b83838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061172992505050565b6000818152606a602052604090205490915074010000000000000000000000000000000000000000900465ffffffffffff1615610c24576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d61696c626f783a20616c72656164792064656c697665726564000000000000604482015260640161096c565b6000610c308484611873565b90506000610c3d826111c2565b60408051808201825233815265ffffffffffff43811660208084019182526000898152606a9091529390932091518254935190911674010000000000000000000000000000000000000000027fffffffffffff000000000000000000000000000000000000000000000000000090931673ffffffffffffffffffffffffffffffffffffffff918216179290921790559091508216610cdb868661188c565b610ce587876118a5565b63ffffffff167f0d381c2a574ae8f04e213db7cfb4df8df712cdbd427d9868ffef380660ca657460405160405180910390a460405183907f1cae38cdd3d3919489272725a5ae62a4f48b2989b0dae843d3c279fee18073a990600090a26040517ff7e83aee00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82169063f7e83aee90610d9a908a908a908a908a90600401611ec8565b6020604051808303816000875af1158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190611eef565b610e43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4d61696c626f783a2049534d20766572696669636174696f6e206661696c6564604482015260640161096c565b8173ffffffffffffffffffffffffffffffffffffffff166356d5d47534610e6a88886118a5565b610e74898961188c565b610e7e8a8a6118b5565b6040518663ffffffff1660e01b8152600401610e9d9493929190611f11565b6000604051808303818588803b158015610eb657600080fd5b505af1158015610eca573d6000803e3d6000fd5b505050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216610f115760685473ffffffffffffffffffffffffffffffffffffffff1691505b6000610f1f898989896116eb565b6040517faaccd23000000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff84169063aaccd23090610f7890889088908690600401611e6c565b602060405180830381865afa158015610f95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb99190611e9c565b6069546040517faaccd23000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063aaccd2309061101390899089908790600401611e6c565b602060405180830381865afa158015611030573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110549190611e9c565b61105e9190611f37565b9998505050505050505050565b611073611734565b73ffffffffffffffffffffffffffffffffffffffff81163b611117576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4d61696c626f783a2064656661756c7420686f6f6b206e6f7420636f6e74726160448201527f6374000000000000000000000000000000000000000000000000000000000000606482015260840161096c565b606880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f65a63e5066ee2fcdf9d32a7f1bf7ce71c76066f19d0609dddccd334ab87237d790600090a250565b60006111b98585858561119b86808385611f4a565b60685473ffffffffffffffffffffffffffffffffffffffff16610ed8565b95945050505050565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fde523cf30000000000000000000000000000000000000000000000000000000017905290516000918291829173ffffffffffffffffffffffffffffffffffffffff8616916112439190611f74565b600060405180830381855afa9150503d806000811461127e576040519150601f19603f3d011682016040523d82523d6000602084013e611283565b606091505b50915091508180156112955750805115155b156112d8576000818060200190518101906112b09190611f90565b905073ffffffffffffffffffffffffffffffffffffffff8116156112d657949350505050565b505b505060675473ffffffffffffffffffffffffffffffffffffffff1692915050565b611301611734565b73ffffffffffffffffffffffffffffffffffffffff81166113a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161096c565b6113ad816117b5565b50565b6113b8611734565b73ffffffffffffffffffffffffffffffffffffffff81163b61145c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4d61696c626f783a2064656661756c742049534d206e6f7420636f6e7472616360448201527f7400000000000000000000000000000000000000000000000000000000000000606482015260840161096c565b606780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa76ad0adbf45318f8633aa0210f711273d50fbb6fef76ed95bbae97082c75daa90600090a250565b6000610a17878787878787606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610ed8565b600054610100900460ff161580801561151e5750600054600160ff909116105b806115385750303b158015611538575060005460ff166001145b6115c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161096c565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561162257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61162a6118d1565b611633846113b0565b61163c8361106b565b611645826108c4565b61164e856112f9565b80156116b157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b60006111b9858585856116cd86808385611f4a565b60685473ffffffffffffffffffffffffffffffffffffffff166105f0565b6065546060906111b99060039063ffffffff167f00000000000000000000000000000000000000000000000000000000000000003389898989611970565b805160209091012090565b60335473ffffffffffffffffffffffffffffffffffffffff163314610a34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161096c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061183b6001828486611f4a565b61184491611fad565b60f81c90505b92915050565b6000611860602d60298486611f4a565b61186991611ff5565b60e01c9392505050565b600061188561188284846119ae565b90565b9392505050565b600061189c602960098486611f4a565b6118859161203b565b6000611860600960058486611f4a565b3660006118c583604d8187611f4a565b915091505b9250929050565b600054610100900460ff16611968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161096c565b610a346119be565b60608888888888888888604051602001611991989796959493929190612077565b604051602081830303815290604052905098975050505050505050565b600061189c604d602d8486611f4a565b600054610100900460ff16611a55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161096c565b610a34336117b5565b600060208284031215611a7057600080fd5b5035919050565b803563ffffffff81168114611a8b57600080fd5b919050565b60008083601f840112611aa257600080fd5b50813567ffffffffffffffff811115611aba57600080fd5b6020830191508360208285010111156118ca57600080fd5b73ffffffffffffffffffffffffffffffffffffffff811681146113ad57600080fd5b600080600080600080600060a0888a031215611b0f57600080fd5b611b1888611a77565b965060208801359550604088013567ffffffffffffffff80821115611b3c57600080fd5b611b488b838c01611a90565b909750955060608a0135915080821115611b6157600080fd5b50611b6e8a828b01611a90565b9094509250506080880135611b8281611ad2565b8091505092959891949750929550565b600060208284031215611ba457600080fd5b813561188581611ad2565b60008060008060008060808789031215611bc857600080fd5b611bd187611a77565b955060208701359450604087013567ffffffffffffffff80821115611bf557600080fd5b611c018a838b01611a90565b90965094506060890135915080821115611c1a57600080fd5b50611c2789828a01611a90565b979a9699509497509295939492505050565b60008060008060408587031215611c4f57600080fd5b843567ffffffffffffffff80821115611c6757600080fd5b611c7388838901611a90565b90965094506020870135915080821115611c8c57600080fd5b50611c9987828801611a90565b95989497509550505050565b60008060008060608587031215611cbb57600080fd5b611cc485611a77565b935060208501359250604085013567ffffffffffffffff811115611ce757600080fd5b611c9987828801611a90565b60008060008060808587031215611d0957600080fd5b8435611d1481611ad2565b93506020850135611d2481611ad2565b92506040850135611d3481611ad2565b91506060850135611d4481611ad2565b939692955090935050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff818116838216019080821115611d9b57611d9b611d4f565b5092915050565b60005b83811015611dbd578181015183820152602001611da5565b50506000910152565b60008151808452611dde816020860160208601611da2565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006118856020830184611dc6565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000611e80604083018587611e23565b8281036020840152611e928185611dc6565b9695505050505050565b600060208284031215611eae57600080fd5b5051919050565b8181038181111561184a5761184a611d4f565b604081526000611edc604083018688611e23565b8281036020840152610a17818587611e23565b600060208284031215611f0157600080fd5b8151801515811461188557600080fd5b63ffffffff85168152836020820152606060408201526000611e92606083018486611e23565b8082018082111561184a5761184a611d4f565b60008085851115611f5a57600080fd5b83861115611f6757600080fd5b5050820193919092039150565b60008251611f86818460208701611da2565b9190910192915050565b600060208284031215611fa257600080fd5b815161188581611ad2565b7fff000000000000000000000000000000000000000000000000000000000000008135818116916001851015611fed5780818660010360031b1b83161692505b505092915050565b7fffffffff000000000000000000000000000000000000000000000000000000008135818116916004851015611fed5760049490940360031b84901b1690921692915050565b8035602083101561184a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7fff000000000000000000000000000000000000000000000000000000000000008960f81b16815260007fffffffff00000000000000000000000000000000000000000000000000000000808a60e01b166001840152808960e01b166005840152876009840152808760e01b1660298401525084602d8301528284604d8401375060009101604d0190815297965050505050505056fea2646970667358221220a3bd007f29b39684a36f8fb812241ff360dff1922dcb296613bda3147a13049264736f6c63430008130033", "linkReferences": {}, "deployedLinkReferences": {} } \ No newline at end of file diff --git a/rust/abis/TestMerkleTreeHook.json b/rust/abis/TestMerkleTreeHook.json new file mode 100644 index 0000000..f7bb508 --- /dev/null +++ b/rust/abis/TestMerkleTreeHook.json @@ -0,0 +1,366 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "TestMerkleTreeHook", + "sourceName": "contracts/test/TestMerkleTreeHook.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_mailbox", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "messageId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "index", + "type": "uint32" + } + ], + "name": "InsertedIntoTree", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "count", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deployedBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hook", + "outputs": [ + { + "internalType": "contract IPostDispatchHook", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "hookType", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_id", + "type": "bytes32" + } + ], + "name": "insert", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "interchainSecurityModule", + "outputs": [ + { + "internalType": "contract IInterchainSecurityModule", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestCheckpoint", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "localDomain", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mailbox", + "outputs": [ + { + "internalType": "contract IMailbox", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "postDispatch", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "proof", + "outputs": [ + { + "internalType": "bytes32[32]", + "name": "", + "type": "bytes32[32]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + } + ], + "name": "quoteDispatch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "root", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_hook", + "type": "address" + } + ], + "name": "setHook", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_module", + "type": "address" + } + ], + "name": "setInterchainSecurityModule", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "metadata", + "type": "bytes" + } + ], + "name": "supportsMetadata", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tree", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32[32]", + "name": "branch", + "type": "bytes32[32]" + }, + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "internalType": "struct MerkleLib.Tree", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60e06040523480156200001157600080fd5b5060405162001c2a38038062001c2a833981016040819052620000349162000179565b8080806001600160a01b0381163b620000935760405162461bcd60e51b815260206004820152601e60248201527f4d61696c626f78436c69656e743a20696e76616c6964206d61696c626f780000604482015260640160405180910390fd5b6001600160a01b03821660808190526040805163234d8e3d60e21b81529051638d3638f4916004808201926020929091908290030181865afa158015620000de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001049190620001ab565b63ffffffff1660a052620001183362000127565b50504360c05250620001d39050565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200018c57600080fd5b81516001600160a01b0381168114620001a457600080fd5b9392505050565b600060208284031215620001be57600080fd5b815163ffffffff81168114620001a457600080fd5b60805160a05160c051611a206200020a600039600061027d015260006102bf01526000818161036d01526113670152611a206000f3fe60806040526004361061015f5760003560e01c8063907c0f92116100c0578063e5320bb911610074578063f2fde38b11610059578063f2fde38b14610428578063faf924cf14610448578063fd54b2281461046a57600080fd5b8063e5320bb9146103e3578063ebf0c7171461041357600080fd5b8063d5438eae116100a5578063d5438eae1461035b578063de523cf31461038f578063e445e7dd146103bc57600080fd5b8063907c0f921461030c578063aaccd2301461033b57600080fd5b8063715018a61161011757806382ea7bfe116100fc57806382ea7bfe1461026b5780638d3638f4146102ad5780638da5cb5b146102e157600080fd5b8063715018a6146102045780637f5a7c7b1461021957600080fd5b80630e72cc06116101485780630e72cc06146101a45780632d287e43146101c45780633dfd3873146101e457600080fd5b806306661abd14610164578063086011b91461018f575b600080fd5b34801561017057600080fd5b5060b7545b60405163ffffffff90911681526020015b60405180910390f35b6101a261019d366004611555565b61048c565b005b3480156101b057600080fd5b506101a26101bf3660046115c1565b610539565b3480156101d057600080fd5b506101a26101df3660046115fe565b61064f565b3480156101f057600080fd5b506101a26101ff3660046115c1565b61065d565b34801561021057600080fd5b506101a2610773565b34801561022557600080fd5b506065546102469073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b34801561027757600080fd5b5061029f7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610186565b3480156102b957600080fd5b506101757f000000000000000000000000000000000000000000000000000000000000000081565b3480156102ed57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff16610246565b34801561031857600080fd5b50610321610787565b6040805192835263ffffffff909116602083015201610186565b34801561034757600080fd5b5061029f610356366004611555565b6107af565b34801561036757600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561039b57600080fd5b506066546102469073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103c857600080fd5b506103d1610852565b60405160ff9091168152602001610186565b3480156103ef57600080fd5b506104036103fe366004611617565b61085c565b6040519015158152602001610186565b34801561041f57600080fd5b5061029f610881565b34801561043457600080fd5b506101a26104433660046115c1565b61088d565b34801561045457600080fd5b5061045d610941565b6040516101869190611659565b34801561047657600080fd5b5061047f610a09565b604051610186919061168f565b610496848461085c565b610527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4162737472616374506f73744469737061746368486f6f6b3a20696e76616c6960448201527f64206d657461646174612076617269616e74000000000000000000000000000060648201526084015b60405180910390fd5b61053384848484610a58565b50505050565b8073ffffffffffffffffffffffffffffffffffffffff81163b151580610573575073ffffffffffffffffffffffffffffffffffffffff8116155b6105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d61696c626f78436c69656e743a20696e76616c696420636f6e74726163742060448201527f73657474696e6700000000000000000000000000000000000000000000000000606482015260840161051e565b610607610bf6565b50606680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61065a609782610c77565b50565b8073ffffffffffffffffffffffffffffffffffffffff81163b151580610697575073ffffffffffffffffffffffffffffffffffffffff8116155b610723576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d61696c626f78436c69656e743a20696e76616c696420636f6e74726163742060448201527f73657474696e6700000000000000000000000000000000000000000000000000606482015260840161051e565b61072b610bf6565b50606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61077b610bf6565b6107856000610dbb565b565b600080610792610881565b600161079d60b75490565b6107a79190611701565b915091509091565b60006107bb858561085c565b610847576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4162737472616374506f73744469737061746368486f6f6b3a20696e76616c6960448201527f64206d657461646174612076617269616e740000000000000000000000000000606482015260840161051e565b600095945050505050565b600060035b905090565b6000811580610878575060016108728484610e32565b61ffff16145b90505b92915050565b60006108576097610e83565b610895610bf6565b73ffffffffffffffffffffffffffffffffffffffff8116610938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161051e565b61065a81610dbb565b6109496114cd565b6000610953610e96565b9050600060016097602001546109699190611725565b90506109736114cd565b60005b6020811015610a0157600183821c8116908190036109bf57609782602081106109a1576109a1611738565b01548383602081106109b5576109b5611738565b60200201526109ee565b8482602081106109d1576109d1611738565b60200201518383602081106109e8576109e8611738565b60200201525b50806109f981611767565b915050610976565b509392505050565b610a116114ec565b60408051610440810180835290916097918391820190839060209082845b815481526020019060010190808311610a2f575050509183525050602091820154910152919050565b3415610ae6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4d65726b6c6554726565486f6f6b3a206e6f2076616c7565206578706563746560448201527f6400000000000000000000000000000000000000000000000000000000000000606482015260840161051e565b6000610b2783838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061135792505050565b9050610b3281611362565b610b98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6d657373616765206e6f74206469737061746368696e67000000000000000000604482015260640161051e565b6000610ba360b75490565b9050610bb0609783610c77565b6040805183815263ffffffff831660208201527f253a3a04cab70d47c1504809242d9350cd81627b4f1d50753e159cf8cd76ed33910160405180910390a1505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161051e565b6001610c85602060026118bf565b610c8f9190611725565b826020015410610cfb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d65726b6c6520747265652066756c6c00000000000000000000000000000000604482015260640161051e565b6001826020016000828254610d1091906118cb565b9091555050602082015460005b6020811015610dad5781600116600103610d4c5782848260208110610d4457610d44611738565b015550505050565b838160208110610d5e57610d5e611738565b01546040805160208101929092528101849052606001604051602081830303815290604052805190602001209250600282610d9991906118de565b915080610da581611767565b915050610d1d565b50610db6611919565b505050565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610e3f816002611948565b60ff16821015610e515750600061087b565b82600083610e60826002611948565b60ff1692610e7093929190611961565b610e799161198b565b60f01c9392505050565b600061087b82610e91610e96565b6113fb565b610e9e6114cd565b600081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb560208201527fb4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3060408201527f21ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba8560608201527fe58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a1934460808201527f0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d60a08201527f887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a196860c08201527fffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f8360e08201527f9867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af6101008201527fcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e06101208201527ff9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a56101408201527ff8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8926101608201527f3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99c6101808201527fc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb6101a08201527f5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8becc6101c08201527fda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d26101e08201527f2733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981f6102008201527fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a6102208201527f5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a06102408201527fb46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa06102608201527fc65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e26102808201527ff4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd96102a08201527f5a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3776102c08201527f4df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee6526102e08201527fcdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef6103008201527f0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618d6103208201527fb8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d06103408201527f838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e6103608201527f662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e6103808201527f388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea3226103a08201527f93237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7356103c08201527f8448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a96103e082015290565b805160209091012090565b6000817f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663134fbb4f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f491906119d1565b1492915050565b6020820154600090815b60208110156114c557600182821c16600086836020811061142857611428611738565b01549050816001036114655760408051602081018390529081018690526060016040516020818303038152906040528051906020012094506114b0565b8486846020811061147857611478611738565b6020020151604051602001611497929190918252602082015260400190565b6040516020818303038152906040528051906020012094505b505080806114bd90611767565b915050611405565b505092915050565b6040518061040001604052806020906020820280368337509192915050565b60405180604001604052806114ff6114cd565b8152602001600081525090565b60008083601f84011261151e57600080fd5b50813567ffffffffffffffff81111561153657600080fd5b60208301915083602082850101111561154e57600080fd5b9250929050565b6000806000806040858703121561156b57600080fd5b843567ffffffffffffffff8082111561158357600080fd5b61158f8883890161150c565b909650945060208701359150808211156115a857600080fd5b506115b58782880161150c565b95989497509550505050565b6000602082840312156115d357600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146115f757600080fd5b9392505050565b60006020828403121561161057600080fd5b5035919050565b6000806020838503121561162a57600080fd5b823567ffffffffffffffff81111561164157600080fd5b61164d8582860161150c565b90969095509350505050565b6104008101818360005b60208082106116725750611686565b825184529283019290910190600101611663565b50505092915050565b81516104208201908260005b60208082106116aa57506116be565b83518352928301929091019060010161169b565b505050602083015161040083015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff82811682821603908082111561171e5761171e6116d2565b5092915050565b8181038181111561087b5761087b6116d2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611798576117986116d2565b5060010190565b600181815b808511156117f857817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156117de576117de6116d2565b808516156117eb57918102915b93841c93908002906117a4565b509250929050565b60008261180f5750600161087b565b8161181c5750600061087b565b8160018114611832576002811461183c57611858565b600191505061087b565b60ff84111561184d5761184d6116d2565b50506001821b61087b565b5060208310610133831016604e8410600b841016171561187b575081810a61087b565b611885838361179f565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156118b7576118b76116d2565b029392505050565b60006108788383611800565b8082018082111561087b5761087b6116d2565b600082611914577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60ff818116838216019081111561087b5761087b6116d2565b6000808585111561197157600080fd5b8386111561197e57600080fd5b5050820193919092039150565b7fffff00000000000000000000000000000000000000000000000000000000000081358181169160028510156114c55760029490940360031b84901b1690921692915050565b6000602082840312156119e357600080fd5b505191905056fea264697066735822122081c9d1d2c0f263e1ffab284d5d9291956804d1a8232a39a66ce087a23312891e64736f6c63430008130033", + "deployedBytecode": "0x60806040526004361061015f5760003560e01c8063907c0f92116100c0578063e5320bb911610074578063f2fde38b11610059578063f2fde38b14610428578063faf924cf14610448578063fd54b2281461046a57600080fd5b8063e5320bb9146103e3578063ebf0c7171461041357600080fd5b8063d5438eae116100a5578063d5438eae1461035b578063de523cf31461038f578063e445e7dd146103bc57600080fd5b8063907c0f921461030c578063aaccd2301461033b57600080fd5b8063715018a61161011757806382ea7bfe116100fc57806382ea7bfe1461026b5780638d3638f4146102ad5780638da5cb5b146102e157600080fd5b8063715018a6146102045780637f5a7c7b1461021957600080fd5b80630e72cc06116101485780630e72cc06146101a45780632d287e43146101c45780633dfd3873146101e457600080fd5b806306661abd14610164578063086011b91461018f575b600080fd5b34801561017057600080fd5b5060b7545b60405163ffffffff90911681526020015b60405180910390f35b6101a261019d366004611555565b61048c565b005b3480156101b057600080fd5b506101a26101bf3660046115c1565b610539565b3480156101d057600080fd5b506101a26101df3660046115fe565b61064f565b3480156101f057600080fd5b506101a26101ff3660046115c1565b61065d565b34801561021057600080fd5b506101a2610773565b34801561022557600080fd5b506065546102469073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610186565b34801561027757600080fd5b5061029f7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610186565b3480156102b957600080fd5b506101757f000000000000000000000000000000000000000000000000000000000000000081565b3480156102ed57600080fd5b5060335473ffffffffffffffffffffffffffffffffffffffff16610246565b34801561031857600080fd5b50610321610787565b6040805192835263ffffffff909116602083015201610186565b34801561034757600080fd5b5061029f610356366004611555565b6107af565b34801561036757600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561039b57600080fd5b506066546102469073ffffffffffffffffffffffffffffffffffffffff1681565b3480156103c857600080fd5b506103d1610852565b60405160ff9091168152602001610186565b3480156103ef57600080fd5b506104036103fe366004611617565b61085c565b6040519015158152602001610186565b34801561041f57600080fd5b5061029f610881565b34801561043457600080fd5b506101a26104433660046115c1565b61088d565b34801561045457600080fd5b5061045d610941565b6040516101869190611659565b34801561047657600080fd5b5061047f610a09565b604051610186919061168f565b610496848461085c565b610527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4162737472616374506f73744469737061746368486f6f6b3a20696e76616c6960448201527f64206d657461646174612076617269616e74000000000000000000000000000060648201526084015b60405180910390fd5b61053384848484610a58565b50505050565b8073ffffffffffffffffffffffffffffffffffffffff81163b151580610573575073ffffffffffffffffffffffffffffffffffffffff8116155b6105ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d61696c626f78436c69656e743a20696e76616c696420636f6e74726163742060448201527f73657474696e6700000000000000000000000000000000000000000000000000606482015260840161051e565b610607610bf6565b50606680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61065a609782610c77565b50565b8073ffffffffffffffffffffffffffffffffffffffff81163b151580610697575073ffffffffffffffffffffffffffffffffffffffff8116155b610723576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d61696c626f78436c69656e743a20696e76616c696420636f6e74726163742060448201527f73657474696e6700000000000000000000000000000000000000000000000000606482015260840161051e565b61072b610bf6565b50606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61077b610bf6565b6107856000610dbb565b565b600080610792610881565b600161079d60b75490565b6107a79190611701565b915091509091565b60006107bb858561085c565b610847576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4162737472616374506f73744469737061746368486f6f6b3a20696e76616c6960448201527f64206d657461646174612076617269616e740000000000000000000000000000606482015260840161051e565b600095945050505050565b600060035b905090565b6000811580610878575060016108728484610e32565b61ffff16145b90505b92915050565b60006108576097610e83565b610895610bf6565b73ffffffffffffffffffffffffffffffffffffffff8116610938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161051e565b61065a81610dbb565b6109496114cd565b6000610953610e96565b9050600060016097602001546109699190611725565b90506109736114cd565b60005b6020811015610a0157600183821c8116908190036109bf57609782602081106109a1576109a1611738565b01548383602081106109b5576109b5611738565b60200201526109ee565b8482602081106109d1576109d1611738565b60200201518383602081106109e8576109e8611738565b60200201525b50806109f981611767565b915050610976565b509392505050565b610a116114ec565b60408051610440810180835290916097918391820190839060209082845b815481526020019060010190808311610a2f575050509183525050602091820154910152919050565b3415610ae6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4d65726b6c6554726565486f6f6b3a206e6f2076616c7565206578706563746560448201527f6400000000000000000000000000000000000000000000000000000000000000606482015260840161051e565b6000610b2783838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061135792505050565b9050610b3281611362565b610b98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6d657373616765206e6f74206469737061746368696e67000000000000000000604482015260640161051e565b6000610ba360b75490565b9050610bb0609783610c77565b6040805183815263ffffffff831660208201527f253a3a04cab70d47c1504809242d9350cd81627b4f1d50753e159cf8cd76ed33910160405180910390a1505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161051e565b6001610c85602060026118bf565b610c8f9190611725565b826020015410610cfb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d65726b6c6520747265652066756c6c00000000000000000000000000000000604482015260640161051e565b6001826020016000828254610d1091906118cb565b9091555050602082015460005b6020811015610dad5781600116600103610d4c5782848260208110610d4457610d44611738565b015550505050565b838160208110610d5e57610d5e611738565b01546040805160208101929092528101849052606001604051602081830303815290604052805190602001209250600282610d9991906118de565b915080610da581611767565b915050610d1d565b50610db6611919565b505050565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610e3f816002611948565b60ff16821015610e515750600061087b565b82600083610e60826002611948565b60ff1692610e7093929190611961565b610e799161198b565b60f01c9392505050565b600061087b82610e91610e96565b6113fb565b610e9e6114cd565b600081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb560208201527fb4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3060408201527f21ddb9a356815c3fac1026b6dec5df3124afbadb485c9ba5a3e3398a04b7ba8560608201527fe58769b32a1beaf1ea27375a44095a0d1fb664ce2dd358e7fcbfb78c26a1934460808201527f0eb01ebfc9ed27500cd4dfc979272d1f0913cc9f66540d7e8005811109e1cf2d60a08201527f887c22bd8750d34016ac3c66b5ff102dacdd73f6b014e710b51e8022af9a196860c08201527fffd70157e48063fc33c97a050f7f640233bf646cc98d9524c6b92bcf3ab56f8360e08201527f9867cc5f7f196b93bae1e27e6320742445d290f2263827498b54fec539f756af6101008201527fcefad4e508c098b9a7e1d8feb19955fb02ba9675585078710969d3440f5054e06101208201527ff9dc3e7fe016e050eff260334f18a5d4fe391d82092319f5964f2e2eb7c1c3a56101408201527ff8b13a49e282f609c317a833fb8d976d11517c571d1221a265d25af778ecf8926101608201527f3490c6ceeb450aecdc82e28293031d10c7d73bf85e57bf041a97360aa2c5d99c6101808201527fc1df82d9c4b87413eae2ef048f94b4d3554cea73d92b0f7af96e0271c691e2bb6101a08201527f5c67add7c6caf302256adedf7ab114da0acfe870d449a3a489f781d659e8becc6101c08201527fda7bce9f4e8618b6bd2f4132ce798cdc7a60e7e1460a7299e3c6342a579626d26101e08201527f2733e50f526ec2fa19a22b31e8ed50f23cd1fdf94c9154ed3a7609a2f1ff981f6102008201527fe1d3b5c807b281e4683cc6d6315cf95b9ade8641defcb32372f1c126e398ef7a6102208201527f5a2dce0a8a7f68bb74560f8f71837c2c2ebbcbf7fffb42ae1896f13f7c7479a06102408201527fb46a28b6f55540f89444f63de0378e3d121be09e06cc9ded1c20e65876d36aa06102608201527fc65e9645644786b620e2dd2ad648ddfcbf4a7e5b1a3a4ecfe7f64667a3f0b7e26102808201527ff4418588ed35a2458cffeb39b93d26f18d2ab13bdce6aee58e7b99359ec2dfd96102a08201527f5a9c16dc00d6ef18b7933a6f8dc65ccb55667138776f7dea101070dc8796e3776102c08201527f4df84f40ae0c8229d0d6069e5c8f39a7c299677a09d367fc7b05e3bc380ee6526102e08201527fcdc72595f74c7b1043d0e1ffbab734648c838dfb0527d971b602bc216c9619ef6103008201527f0abf5ac974a1ed57f4050aa510dd9c74f508277b39d7973bb2dfccc5eeb0618d6103208201527fb8cd74046ff337f0a7bf2c8e03e10f642c1886798d71806ab1e888d9e5ee87d06103408201527f838c5655cb21c6cb83313b5a631175dff4963772cce9108188b34ac87c81c41e6103608201527f662ee4dd2dd7b2bc707961b1e646c4047669dcb6584f0d8d770daf5d7e7deb2e6103808201527f388ab20e2573d171a88108e79d820e98f26c0b84aa8b2f4aa4968dbb818ea3226103a08201527f93237c50ba75ee485f4c22adf2f741400bdf8d6a9cc7df7ecae576221665d7356103c08201527f8448818bb4ae4562849e949e17ac16e0be16688e156b5cf15e098c627c0056a96103e082015290565b805160209091012090565b6000817f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663134fbb4f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f491906119d1565b1492915050565b6020820154600090815b60208110156114c557600182821c16600086836020811061142857611428611738565b01549050816001036114655760408051602081018390529081018690526060016040516020818303038152906040528051906020012094506114b0565b8486846020811061147857611478611738565b6020020151604051602001611497929190918252602082015260400190565b6040516020818303038152906040528051906020012094505b505080806114bd90611767565b915050611405565b505092915050565b6040518061040001604052806020906020820280368337509192915050565b60405180604001604052806114ff6114cd565b8152602001600081525090565b60008083601f84011261151e57600080fd5b50813567ffffffffffffffff81111561153657600080fd5b60208301915083602082850101111561154e57600080fd5b9250929050565b6000806000806040858703121561156b57600080fd5b843567ffffffffffffffff8082111561158357600080fd5b61158f8883890161150c565b909650945060208701359150808211156115a857600080fd5b506115b58782880161150c565b95989497509550505050565b6000602082840312156115d357600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146115f757600080fd5b9392505050565b60006020828403121561161057600080fd5b5035919050565b6000806020838503121561162a57600080fd5b823567ffffffffffffffff81111561164157600080fd5b61164d8582860161150c565b90969095509350505050565b6104008101818360005b60208082106116725750611686565b825184529283019290910190600101611663565b50505092915050565b81516104208201908260005b60208082106116aa57506116be565b83518352928301929091019060010161169b565b505050602083015161040083015292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff82811682821603908082111561171e5761171e6116d2565b5092915050565b8181038181111561087b5761087b6116d2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611798576117986116d2565b5060010190565b600181815b808511156117f857817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156117de576117de6116d2565b808516156117eb57918102915b93841c93908002906117a4565b509250929050565b60008261180f5750600161087b565b8161181c5750600061087b565b8160018114611832576002811461183c57611858565b600191505061087b565b60ff84111561184d5761184d6116d2565b50506001821b61087b565b5060208310610133831016604e8410600b841016171561187b575081810a61087b565b611885838361179f565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156118b7576118b76116d2565b029392505050565b60006108788383611800565b8082018082111561087b5761087b6116d2565b600082611914577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b60ff818116838216019081111561087b5761087b6116d2565b6000808585111561197157600080fd5b8386111561197e57600080fd5b5050820193919092039150565b7fffff00000000000000000000000000000000000000000000000000000000000081358181169160028510156114c55760029490940360031b84901b1690921692915050565b6000602082840312156119e357600080fd5b505191905056fea264697066735822122081c9d1d2c0f263e1ffab284d5d9291956804d1a8232a39a66ce087a23312891e64736f6c63430008130033", + "linkReferences": {}, + "deployedLinkReferences": {} +} \ No newline at end of file diff --git a/rust/abis/TestRecipient.json b/rust/abis/TestRecipient.json index e29e600..ebfebc9 100644 --- a/rust/abis/TestRecipient.json +++ b/rust/abis/TestRecipient.json @@ -62,6 +62,12 @@ "name": "sender", "type": "bytes32" }, + { + "indexed": true, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, { "indexed": false, "internalType": "string", @@ -110,7 +116,7 @@ ], "name": "handle", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { @@ -225,8 +231,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109d38061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100c85760003560e01c8063715018a611610081578063de523cf31161005b578063de523cf31461019d578063f07c1f47146101bd578063f2fde38b146101d057600080fd5b8063715018a61461016f5780638da5cb5b14610177578063a4982fde1461019557600080fd5b80632113522a116100b25780632113522a14610100578063256fec881461014557806356d5d4751461015c57600080fd5b80626e75ec146100cd5780630e72cc06146100eb575b600080fd5b6100d56101e3565b6040516100e291906105e0565b60405180910390f35b6100fe6100f93660046105fa565b610271565b005b6004546101209073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b61014e60025481565b6040519081526020016100e2565b6100fe61016a366004610679565b6102c0565b6100fe61031a565b60005473ffffffffffffffffffffffffffffffffffffffff16610120565b6100d561032e565b6001546101209073ffffffffffffffffffffffffffffffffffffffff1681565b6100fe6101cb3660046106de565b61033b565b6100fe6101de3660046105fa565b6103ca565b600380546101f09061072a565b80601f016020809104026020016040519081016040528092919081815260200182805461021c9061072a565b80156102695780601f1061023e57610100808354040283529160200191610269565b820191906000526020600020905b81548152906001019060200180831161024c57829003601f168201915b505050505081565b610279610486565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b828463ffffffff167fba67744c899113a84f615d51af5d82f5fedcf26c9a474d9363c3ad9b0bd501ac84846040516102f99291906107c6565b60405180910390a360028390556003610313828483610860565b5050505050565b610322610486565b61032c6000610507565b565b600580546101f09061072a565b3373ffffffffffffffffffffffffffffffffffffffff167f97d8367a1f39eb9e97f262fafbb05925c0bcfe120aaad7b9737cae34f749c2068484846040516103859392919061097a565b60405180910390a2600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905560056103c4828483610860565b50505050565b6103d2610486565b73ffffffffffffffffffffffffffffffffffffffff811661047a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61048381610507565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461032c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610471565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000815180845260005b818110156105a257602081850181015186830182015201610586565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006105f3602083018461057c565b9392505050565b60006020828403121561060c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146105f357600080fd5b60008083601f84011261064257600080fd5b50813567ffffffffffffffff81111561065a57600080fd5b60208301915083602082850101111561067257600080fd5b9250929050565b6000806000806060858703121561068f57600080fd5b843563ffffffff811681146106a357600080fd5b935060208501359250604085013567ffffffffffffffff8111156106c657600080fd5b6106d287828801610630565b95989497509550505050565b6000806000604084860312156106f357600080fd5b83359250602084013567ffffffffffffffff81111561071157600080fd5b61071d86828701610630565b9497909650939450505050565b600181811c9082168061073e57607f821691505b602082108103610777577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006107da60208301848661077d565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82111561085b57600081815260208120601f850160051c810160208610156108385750805b601f850160051c820191505b8181101561085757828155600101610844565b5050505b505050565b67ffffffffffffffff831115610878576108786107e2565b61088c83610886835461072a565b83610811565b6000601f8411600181146108de57600085156108a85750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610313565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561092d578685013582556020948501946001909201910161090d565b5086821015610968577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152600061099460408301848661077d565b9594505050505056fea26469706673582212205d3d83431969180ff80771b45e9b5540042b30ba13ab0219d5790e9d60e8bfec64736f6c63430008110033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c85760003560e01c8063715018a611610081578063de523cf31161005b578063de523cf31461019d578063f07c1f47146101bd578063f2fde38b146101d057600080fd5b8063715018a61461016f5780638da5cb5b14610177578063a4982fde1461019557600080fd5b80632113522a116100b25780632113522a14610100578063256fec881461014557806356d5d4751461015c57600080fd5b80626e75ec146100cd5780630e72cc06146100eb575b600080fd5b6100d56101e3565b6040516100e291906105e0565b60405180910390f35b6100fe6100f93660046105fa565b610271565b005b6004546101209073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b61014e60025481565b6040519081526020016100e2565b6100fe61016a366004610679565b6102c0565b6100fe61031a565b60005473ffffffffffffffffffffffffffffffffffffffff16610120565b6100d561032e565b6001546101209073ffffffffffffffffffffffffffffffffffffffff1681565b6100fe6101cb3660046106de565b61033b565b6100fe6101de3660046105fa565b6103ca565b600380546101f09061072a565b80601f016020809104026020016040519081016040528092919081815260200182805461021c9061072a565b80156102695780601f1061023e57610100808354040283529160200191610269565b820191906000526020600020905b81548152906001019060200180831161024c57829003601f168201915b505050505081565b610279610486565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b828463ffffffff167fba67744c899113a84f615d51af5d82f5fedcf26c9a474d9363c3ad9b0bd501ac84846040516102f99291906107c6565b60405180910390a360028390556003610313828483610860565b5050505050565b610322610486565b61032c6000610507565b565b600580546101f09061072a565b3373ffffffffffffffffffffffffffffffffffffffff167f97d8367a1f39eb9e97f262fafbb05925c0bcfe120aaad7b9737cae34f749c2068484846040516103859392919061097a565b60405180910390a2600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905560056103c4828483610860565b50505050565b6103d2610486565b73ffffffffffffffffffffffffffffffffffffffff811661047a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61048381610507565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461032c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610471565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000815180845260005b818110156105a257602081850181015186830182015201610586565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006105f3602083018461057c565b9392505050565b60006020828403121561060c57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146105f357600080fd5b60008083601f84011261064257600080fd5b50813567ffffffffffffffff81111561065a57600080fd5b60208301915083602082850101111561067257600080fd5b9250929050565b6000806000806060858703121561068f57600080fd5b843563ffffffff811681146106a357600080fd5b935060208501359250604085013567ffffffffffffffff8111156106c657600080fd5b6106d287828801610630565b95989497509550505050565b6000806000604084860312156106f357600080fd5b83359250602084013567ffffffffffffffff81111561071157600080fd5b61071d86828701610630565b9497909650939450505050565b600181811c9082168061073e57607f821691505b602082108103610777577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006107da60208301848661077d565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82111561085b57600081815260208120601f850160051c810160208610156108385750805b601f850160051c820191505b8181101561085757828155600101610844565b5050505b505050565b67ffffffffffffffff831115610878576108786107e2565b61088c83610886835461072a565b83610811565b6000601f8411600181146108de57600085156108a85750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610313565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561092d578685013582556020948501946001909201910161090d565b5086821015610968577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b83815260406020820152600061099460408301848661077d565b9594505050505056fea26469706673582212205d3d83431969180ff80771b45e9b5540042b30ba13ab0219d5790e9d60e8bfec64736f6c63430008110033", + "bytecode": "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610a498061007e6000396000f3fe6080604052600436106100bb5760003560e01c8063715018a611610074578063de523cf31161004e578063de523cf3146101eb578063f07c1f4714610218578063f2fde38b1461023857600080fd5b8063715018a6146101965780638da5cb5b146101ab578063a4982fde146101d657600080fd5b80632113522a116100a55780632113522a1461010d578063256fec881461015f57806356d5d4751461018357600080fd5b80626e75ec146100c05780630e72cc06146100eb575b600080fd5b3480156100cc57600080fd5b506100d5610258565b6040516100e29190610656565b60405180910390f35b3480156100f757600080fd5b5061010b610106366004610670565b6102e6565b005b34801561011957600080fd5b5060045461013a9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b34801561016b57600080fd5b5061017560025481565b6040519081526020016100e2565b61010b6101913660046106ef565b610335565b3480156101a257600080fd5b5061010b610390565b3480156101b757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661013a565b3480156101e257600080fd5b506100d56103a4565b3480156101f757600080fd5b5060015461013a9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561022457600080fd5b5061010b610233366004610754565b6103b1565b34801561024457600080fd5b5061010b610253366004610670565b610440565b60038054610265906107a0565b80601f0160208091040260200160405190810160405280929190818152602001828054610291906107a0565b80156102de5780601f106102b3576101008083540402835291602001916102de565b820191906000526020600020905b8154815290600101906020018083116102c157829003601f168201915b505050505081565b6102ee6104fc565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b34838563ffffffff167fecdc36fa3681f5d9c559dcbc399417db6f0ac0d81a78529685a1150265971d55858560405161036f92919061083c565b60405180910390a4600283905560036103898284836108d6565b5050505050565b6103986104fc565b6103a2600061057d565b565b60058054610265906107a0565b3373ffffffffffffffffffffffffffffffffffffffff167f97d8367a1f39eb9e97f262fafbb05925c0bcfe120aaad7b9737cae34f749c2068484846040516103fb939291906109f0565b60405180910390a2600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600561043a8284836108d6565b50505050565b6104486104fc565b73ffffffffffffffffffffffffffffffffffffffff81166104f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104f98161057d565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e7565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000815180845260005b81811015610618576020818501810151868301820152016105fc565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061066960208301846105f2565b9392505050565b60006020828403121561068257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461066957600080fd5b60008083601f8401126106b857600080fd5b50813567ffffffffffffffff8111156106d057600080fd5b6020830191508360208285010111156106e857600080fd5b9250929050565b6000806000806060858703121561070557600080fd5b843563ffffffff8116811461071957600080fd5b935060208501359250604085013567ffffffffffffffff81111561073c57600080fd5b610748878288016106a6565b95989497509550505050565b60008060006040848603121561076957600080fd5b83359250602084013567ffffffffffffffff81111561078757600080fd5b610793868287016106a6565b9497909650939450505050565b600181811c908216806107b457607f821691505b6020821081036107ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006108506020830184866107f3565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f8211156108d157600081815260208120601f850160051c810160208610156108ae5750805b601f850160051c820191505b818110156108cd578281556001016108ba565b5050505b505050565b67ffffffffffffffff8311156108ee576108ee610858565b610902836108fc83546107a0565b83610887565b6000601f841160018114610954576000851561091e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610389565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156109a35786850135825560209485019460019092019101610983565b50868210156109de577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b838152604060208201526000610a0a6040830184866107f3565b9594505050505056fea26469706673582212201d5dbf5840e6e35df440152ffc6903c5683717336fcff2071e06453cc6f8e28664736f6c63430008130033", + "deployedBytecode": "0x6080604052600436106100bb5760003560e01c8063715018a611610074578063de523cf31161004e578063de523cf3146101eb578063f07c1f4714610218578063f2fde38b1461023857600080fd5b8063715018a6146101965780638da5cb5b146101ab578063a4982fde146101d657600080fd5b80632113522a116100a55780632113522a1461010d578063256fec881461015f57806356d5d4751461018357600080fd5b80626e75ec146100c05780630e72cc06146100eb575b600080fd5b3480156100cc57600080fd5b506100d5610258565b6040516100e29190610656565b60405180910390f35b3480156100f757600080fd5b5061010b610106366004610670565b6102e6565b005b34801561011957600080fd5b5060045461013a9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b34801561016b57600080fd5b5061017560025481565b6040519081526020016100e2565b61010b6101913660046106ef565b610335565b3480156101a257600080fd5b5061010b610390565b3480156101b757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661013a565b3480156101e257600080fd5b506100d56103a4565b3480156101f757600080fd5b5060015461013a9073ffffffffffffffffffffffffffffffffffffffff1681565b34801561022457600080fd5b5061010b610233366004610754565b6103b1565b34801561024457600080fd5b5061010b610253366004610670565b610440565b60038054610265906107a0565b80601f0160208091040260200160405190810160405280929190818152602001828054610291906107a0565b80156102de5780601f106102b3576101008083540402835291602001916102de565b820191906000526020600020905b8154815290600101906020018083116102c157829003601f168201915b505050505081565b6102ee6104fc565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b34838563ffffffff167fecdc36fa3681f5d9c559dcbc399417db6f0ac0d81a78529685a1150265971d55858560405161036f92919061083c565b60405180910390a4600283905560036103898284836108d6565b5050505050565b6103986104fc565b6103a2600061057d565b565b60058054610265906107a0565b3373ffffffffffffffffffffffffffffffffffffffff167f97d8367a1f39eb9e97f262fafbb05925c0bcfe120aaad7b9737cae34f749c2068484846040516103fb939291906109f0565b60405180910390a2600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055600561043a8284836108d6565b50505050565b6104486104fc565b73ffffffffffffffffffffffffffffffffffffffff81166104f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6104f98161057d565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e7565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000815180845260005b81811015610618576020818501810151868301820152016105fc565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061066960208301846105f2565b9392505050565b60006020828403121561068257600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461066957600080fd5b60008083601f8401126106b857600080fd5b50813567ffffffffffffffff8111156106d057600080fd5b6020830191508360208285010111156106e857600080fd5b9250929050565b6000806000806060858703121561070557600080fd5b843563ffffffff8116811461071957600080fd5b935060208501359250604085013567ffffffffffffffff81111561073c57600080fd5b610748878288016106a6565b95989497509550505050565b60008060006040848603121561076957600080fd5b83359250602084013567ffffffffffffffff81111561078757600080fd5b610793868287016106a6565b9497909650939450505050565b600181811c908216806107b457607f821691505b6020821081036107ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6020815260006108506020830184866107f3565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f8211156108d157600081815260208120601f850160051c810160208610156108ae5750805b601f850160051c820191505b818110156108cd578281556001016108ba565b5050505b505050565b67ffffffffffffffff8311156108ee576108ee610858565b610902836108fc83546107a0565b83610887565b6000601f841160018114610954576000851561091e5750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610389565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156109a35786850135825560209485019460019092019101610983565b50868210156109de577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b838152604060208201526000610a0a6040830184866107f3565b9594505050505056fea26469706673582212201d5dbf5840e6e35df440152ffc6903c5683717336fcff2071e06453cc6f8e28664736f6c63430008130033", "linkReferences": {}, "deployedLinkReferences": {} } \ No newline at end of file diff --git a/rust/build.rs b/rust/build.rs index 25e2d46..df9a530 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -52,6 +52,7 @@ fn main() { ("FastHypERC20Collateral", "fast_hyp_erc20_collateral"), ("TestMultisigIsm", "test_mock_ism"), ("TestRecipient", "test_mock_msg_receiver"), + ("TestMerkleTreeHook", "test_merkle_tree_hook"), ]; for (abi_file, bind_out) in eth_deployments { diff --git a/rust/tests/contracts/eth/bind/mod.rs b/rust/tests/contracts/eth/bind/mod.rs index 153c5d2..561c559 100644 --- a/rust/tests/contracts/eth/bind/mod.rs +++ b/rust/tests/contracts/eth/bind/mod.rs @@ -8,3 +8,5 @@ pub mod mailbox; pub mod test_mock_ism; #[allow(clippy::all)] pub mod test_mock_msg_receiver; +#[allow(clippy::all)] +pub mod test_merkle_tree_hook; diff --git a/rust/tests/contracts/eth/deploy.rs b/rust/tests/contracts/eth/deploy.rs index 883abf7..26dae23 100644 --- a/rust/tests/contracts/eth/deploy.rs +++ b/rust/tests/contracts/eth/deploy.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use ethers::{prelude::SignerMiddleware, providers::Middleware, signers::Signer}; -use super::{mailbox, test_mock_ism, test_mock_msg_receiver, types}; +use super::{mailbox, test_merkle_tree_hook, test_mock_ism, test_mock_msg_receiver, types}; pub async fn deploy<'a, M: Middleware + 'static, S: Signer + 'static>( signer: Arc>, @@ -20,8 +20,20 @@ pub async fn deploy<'a, M: Middleware + 'static, S: Signer + 'static>( .send() .await?; + let merkle_tree_hook_contract = test_merkle_tree_hook::TestMerkleTreeHook::deploy( + signer.clone(), + mailbox_contract.address(), + )? + .send() + .await?; + let _ = mailbox_contract - .initialize(signer.address(), ism_multisig_contract.address()) + .initialize( + signer.address(), + ism_multisig_contract.address(), + merkle_tree_hook_contract.address(), + merkle_tree_hook_contract.address(), + ) .send() .await? .await?; @@ -30,6 +42,7 @@ pub async fn deploy<'a, M: Middleware + 'static, S: Signer + 'static>( mailbox: mailbox_contract, ism: ism_multisig_contract, msg_receiver: msg_receiver_contract, + hook: merkle_tree_hook_contract, }; Ok(deployments) diff --git a/rust/tests/contracts/eth/types.rs b/rust/tests/contracts/eth/types.rs index 0f7f298..c48b624 100644 --- a/rust/tests/contracts/eth/types.rs +++ b/rust/tests/contracts/eth/types.rs @@ -1,7 +1,8 @@ use ethers::{prelude::SignerMiddleware, providers::Middleware, signers::Signer}; use super::{ - mailbox::Mailbox, test_mock_ism::TestMultisigIsm, test_mock_msg_receiver::TestRecipient, + mailbox::Mailbox, test_merkle_tree_hook::TestMerkleTreeHook, test_mock_ism::TestMultisigIsm, + test_mock_msg_receiver::TestRecipient, }; pub struct Deployments { @@ -9,4 +10,5 @@ pub struct Deployments { pub ism: TestMultisigIsm>, pub msg_receiver: TestRecipient>, + pub hook: TestMerkleTreeHook>, } diff --git a/rust/tests/mailbox.rs b/rust/tests/mailbox.rs index b56ec07..1743fd6 100644 --- a/rust/tests/mailbox.rs +++ b/rust/tests/mailbox.rs @@ -197,7 +197,7 @@ where let dispatch_tx_call = from .core .mailbox - .dispatch(DOMAIN_STRK, receiver, msg_body.into()); + .dispatch_0(DOMAIN_STRK, receiver, msg_body.into()); let dispatch_res = dispatch_tx_call.send().await?.await?.unwrap(); let dispatch: DispatchFilter = parse_log(dispatch_res.logs[0].clone())?; From f2d9e77c9bfdbeea8f4325a9f1d45f16ffed7f7c Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 19:02:35 +0100 Subject: [PATCH 22/26] feat: add integration tests to CI --- .github/workflows/build.yml | 27 ----------------- .github/workflows/rust.yml | 58 +++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 14 ++++++++- 3 files changed, 71 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 1f6ab4d..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Task - Build Rust - -on: - push: - pull_request: - -jobs: - rust_build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - # selecting a toolchain either by action or manual `rustup` calls should happen - # before the plugin, as the cache uses the current rustc version as its cache key - - run: rustup show - - - uses: Swatinem/rust-cache@v2 - - uses: software-mansion/setup-scarb@v1 - - - name: Build contracts - run: | - cd contracts && scarb build - - - name: Build the rust code - run: | - cd rust && cargo build --release \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..73ace9d --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,58 @@ +--- +name: Task - Build Rust + +on: + push: + pull_request: + +jobs: + rust_build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + # selecting a toolchain either by action or manual `rustup` calls should happen + # before the plugin, as the cache uses the current rustc version as its cache key + - run: rustup show + + - uses: Swatinem/rust-cache@v2 + - uses: software-mansion/setup-scarb@v1 + + - name: Build contracts + run: | + cd contracts && scarb build + + - name: Build the rust code + run: | + cd rust && cargo build --release + + - name: Install dojoup + run: | + curl -L https://install.dojoengine.org | bash + + - name: Install dojo + run: |- + /home/runner/.config/.dojo/bin/dojoup -v 0.6.1-alpha.3 + sudo mv /home/runner/.config/.dojo/bin/katana /usr/local/bin/ + + - name: Run katana + run: | + katana -b 1000 + + - name: Run evm -> strk test + run: | + cd rust && cargo test -- test_mailbox_evm_to_strk + + - name: Kill katana + run: | + pkill katana + + - name: run katana + run: | + katana -b 1000 + + - name: Run strk -> evm test + run: | + cd rust && cargo test -- test_mailbox_strk_to_evm + + \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c8b07d2..84cc095 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: tests +name: contracts-tests on: push: pull_request: @@ -10,12 +10,24 @@ jobs: working-directory: ./contracts steps: - uses: actions/checkout@v3 + - uses: software-mansion/setup-scarb@v1 - uses: foundry-rs/setup-snfoundry@v3 + - working-directory: ${{ env.working-directory}} run: scarb fmt --check + + - name: Cache contracts + id: cache-contracts + uses: actions/cache@v3 + with: + path: ./target + key: ${{ runner.os }}-contracts-${{ hashFiles('./src', 'Scarb.lock') }} + - working-directory: ${{ env.working-directory}} run: scarb build - working-directory: ${{ env.working-directory}} run: snforge test + + From 9aeff0fc525f0859fbe11dacb02ef508e074573c Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 19:04:07 +0100 Subject: [PATCH 23/26] fix: ci name --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 73ace9d..00b532e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,12 +1,12 @@ --- -name: Task - Build Rust +name: Rust on: push: pull_request: jobs: - rust_build: + integration_test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 23c12e9034794d8063a3d6f6f1ab76eab8fc9605 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 19:09:37 +0100 Subject: [PATCH 24/26] fix: run katana in background in ci --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 00b532e..e220ac0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -37,7 +37,7 @@ jobs: - name: Run katana run: | - katana -b 1000 + katana -b 1000 & - name: Run evm -> strk test run: | @@ -49,7 +49,7 @@ jobs: - name: run katana run: | - katana -b 1000 + katana -b 1000 & - name: Run strk -> evm test run: | From e71972bc3074461e442d1c0ab45695ec15fdf180 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Mon, 20 May 2024 20:15:15 +0100 Subject: [PATCH 25/26] fix: ci dojo version --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e220ac0..aca5c23 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -32,7 +32,7 @@ jobs: - name: Install dojo run: |- - /home/runner/.config/.dojo/bin/dojoup -v 0.6.1-alpha.3 + /home/runner/.config/.dojo/bin/dojoup -v 0.7.0-alpha.2 sudo mv /home/runner/.config/.dojo/bin/katana /usr/local/bin/ - name: Run katana From 26bf57b31213005a4ddc9c708d67421bbdabe6fb Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Tue, 21 May 2024 11:34:19 +0100 Subject: [PATCH 26/26] fix: install foundry in ci --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index aca5c23..265dd27 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -35,6 +35,9 @@ jobs: /home/runner/.config/.dojo/bin/dojoup -v 0.7.0-alpha.2 sudo mv /home/runner/.config/.dojo/bin/katana /usr/local/bin/ + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + - name: Run katana run: | katana -b 1000 &