From cd9ae28f5158fcca093e74740823ced94e477c2c Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 9 Nov 2023 08:07:29 +0200 Subject: [PATCH 01/10] fixes --- parachain/Cargo.lock | 449 ++++++++++++++++++++++++++++++++++++------- smoketest/Cargo.lock | 311 +++++++++++++++++++++++++++++- 2 files changed, 681 insertions(+), 79 deletions(-) diff --git a/parachain/Cargo.lock b/parachain/Cargo.lock index 8732841b3f..05eb75af54 100644 --- a/parachain/Cargo.lock +++ b/parachain/Cargo.lock @@ -126,6 +126,18 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-bls12-381" version = "0.4.0" @@ -138,6 +150,45 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -152,9 +203,35 @@ dependencies = [ "hashbrown 0.13.2", "itertools", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -167,6 +244,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -210,6 +300,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", +] + [[package]] name = "ark-poly" version = "0.4.2" @@ -240,7 +343,7 @@ dependencies = [ [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ec", "ark-ff", @@ -283,12 +386,13 @@ checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", "rand 0.8.5", + "rayon", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ff", "ark-serialize", @@ -373,8 +477,8 @@ dependencies = [ [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +version = "0.0.3" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-bls12-381", "ark-ec", @@ -389,6 +493,8 @@ dependencies = [ "rand_core 0.6.4", "ring", "sha2 0.10.7", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -544,7 +650,7 @@ dependencies = [ "sp-io", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", "trie-db", ] @@ -754,6 +860,39 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -977,7 +1116,7 @@ dependencies = [ [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ec", "ark-ff", @@ -1298,9 +1437,9 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "static_assertions", ] @@ -1340,7 +1479,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", - "sp-debug-derive", + "sp-debug-derive 8.0.0", "sp-genesis-builder", "sp-inherents", "sp-io", @@ -1348,8 +1487,8 @@ dependencies = [ "sp-runtime", "sp-staking", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-weights", "static_assertions", "tt-call", @@ -1406,7 +1545,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-version", "sp-weights", ] @@ -2081,6 +2220,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "memory-db" version = "0.32.0" @@ -2281,7 +2429,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -2298,7 +2446,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", ] @@ -2316,8 +2464,8 @@ dependencies = [ "sp-inherents", "sp-io", "sp-runtime", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", "sp-timestamp", ] @@ -2333,7 +2481,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -2455,7 +2603,7 @@ dependencies = [ "scale-info", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -2470,7 +2618,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", ] @@ -2496,7 +2644,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-staking", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -2674,6 +2822,26 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" +[[package]] +name = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -3110,7 +3278,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "ssz_rs", "ssz_rs_derive", "static_assertions", @@ -3138,7 +3306,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3152,7 +3320,7 @@ dependencies = [ "snowbridge-core", "sp-api", "sp-core", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] @@ -3173,7 +3341,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] @@ -3197,7 +3365,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "wasm-bindgen-test", ] @@ -3226,7 +3394,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "ssz_rs", "ssz_rs_derive", "static_assertions", @@ -3255,7 +3423,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", ] @@ -3280,7 +3448,7 @@ dependencies = [ "sp-io", "sp-keyring", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] @@ -3308,7 +3476,7 @@ dependencies = [ "snowbridge-outbound-queue-merkle-tree", "sp-api", "sp-core", - "sp-std", + "sp-std 8.0.0", "staging-xcm", ] @@ -3329,7 +3497,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -3345,11 +3513,11 @@ dependencies = [ "scale-info", "sp-api-proc-macro", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-metadata-ir", "sp-runtime", "sp-state-machine", - "sp-std", + "sp-std 8.0.0", "sp-trie", "sp-version", "thiserror", @@ -3377,7 +3545,7 @@ dependencies = [ "serde", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3389,10 +3557,28 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" @@ -3402,7 +3588,7 @@ dependencies = [ "sp-api", "sp-application-crypto", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3412,7 +3598,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std", + "sp-std 8.0.0", "sp-timestamp", ] @@ -3450,11 +3636,11 @@ dependencies = [ "secrecy", "serde", "sp-core-hashing", - "sp-debug-derive", - "sp-externalities", - "sp-runtime-interface", - "sp-std", - "sp-storage", + "sp-debug-derive 8.0.0", + "sp-externalities 0.19.0", + "sp-runtime-interface 17.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", "ss58-registry", "substrate-bip39", "thiserror", @@ -3484,9 +3670,40 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "sp-crypto-ec-utils" +version = "0.4.1" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "sp-debug-derive" version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" dependencies = [ "proc-macro2", "quote", @@ -3499,8 +3716,19 @@ version = "0.19.0" dependencies = [ "environmental", "parity-scale-codec", - "sp-std", - "sp-storage", + "sp-std 8.0.0", + "sp-storage 13.0.0", +] + +[[package]] +name = "sp-externalities" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] @@ -3510,7 +3738,7 @@ dependencies = [ "serde_json", "sp-api", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3522,7 +3750,7 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] @@ -3538,12 +3766,12 @@ dependencies = [ "rustversion", "secp256k1", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-keystore", - "sp-runtime-interface", + "sp-runtime-interface 17.0.0", "sp-state-machine", - "sp-std", - "sp-tracing", + "sp-std 8.0.0", + "sp-tracing 10.0.0", "sp-trie", "tracing", "tracing-core", @@ -3566,7 +3794,7 @@ dependencies = [ "parity-scale-codec", "parking_lot", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "thiserror", ] @@ -3577,7 +3805,7 @@ dependencies = [ "frame-metadata", "parity-scale-codec", "scale-info", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3606,7 +3834,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-io", - "sp-std", + "sp-std 8.0.0", "sp-weights", ] @@ -3618,12 +3846,30 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities", - "sp-runtime-interface-proc-macro", - "sp-std", - "sp-storage", - "sp-tracing", - "sp-wasm-interface", + "sp-externalities 0.19.0", + "sp-runtime-interface-proc-macro 11.0.0", + "sp-std 8.0.0", + "sp-storage 13.0.0", + "sp-tracing 10.0.0", + "sp-wasm-interface 14.0.0", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "static_assertions", ] @@ -3638,6 +3884,18 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "sp-staking" version = "4.0.0-dev" @@ -3648,7 +3906,7 @@ dependencies = [ "serde", "sp-core", "sp-runtime", - "sp-std", + "sp-std 8.0.0", ] [[package]] @@ -3662,9 +3920,9 @@ dependencies = [ "rand 0.8.5", "smallvec", "sp-core", - "sp-externalities", + "sp-externalities 0.19.0", "sp-panic-handler", - "sp-std", + "sp-std 8.0.0", "sp-trie", "thiserror", "tracing", @@ -3675,6 +3933,11 @@ dependencies = [ name = "sp-std" version = "8.0.0" +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" + [[package]] name = "sp-storage" version = "13.0.0" @@ -3683,8 +3946,21 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", +] + +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", ] [[package]] @@ -3695,7 +3971,7 @@ dependencies = [ "parity-scale-codec", "sp-inherents", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "thiserror", ] @@ -3704,7 +3980,19 @@ name = "sp-tracing" version = "10.0.0" dependencies = [ "parity-scale-codec", - "sp-std", + "sp-std 8.0.0", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "sp-tracing" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "tracing", "tracing-core", "tracing-subscriber", @@ -3726,7 +4014,7 @@ dependencies = [ "scale-info", "schnellru", "sp-core", - "sp-std", + "sp-std 8.0.0", "thiserror", "tracing", "trie-db", @@ -3744,7 +4032,7 @@ dependencies = [ "serde", "sp-core-hashing-proc-macro", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-version-proc-macro", "thiserror", ] @@ -3767,7 +4055,20 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std", + "sp-std 8.0.0", + "wasmtime", +] + +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#1bc08858292b88b6c834fbc9f72d61e692363e4a" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", "wasmtime", ] @@ -3781,8 +4082,8 @@ dependencies = [ "smallvec", "sp-arithmetic", "sp-core", - "sp-debug-derive", - "sp-std", + "sp-debug-derive 8.0.0", + "sp-std 8.0.0", ] [[package]] @@ -3870,7 +4171,7 @@ dependencies = [ "sp-arithmetic", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", "staging-xcm", "staging-xcm-executor", @@ -3891,7 +4192,7 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "sp-std", + "sp-std 8.0.0", "sp-weights", "staging-xcm", ] @@ -4550,7 +4851,7 @@ dependencies = [ "log", "mach", "memfd", - "memoffset", + "memoffset 0.8.0", "paste", "rand 0.8.5", "rustix", diff --git a/smoketest/Cargo.lock b/smoketest/Cargo.lock index 6d737b6665..de74291c9e 100644 --- a/smoketest/Cargo.lock +++ b/smoketest/Cargo.lock @@ -114,6 +114,18 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c7021f180a0cbea0380eba97c2af3c57074cdaffe0eef7e840e1c9f2841e55" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-bls12-381" version = "0.4.0" @@ -126,6 +138,45 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-bls12-381-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" +dependencies = [ + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-bw6-761" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bw6-761-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" +dependencies = [ + "ark-bw6-761", + "ark-ec", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ec" version = "0.4.2" @@ -140,9 +191,35 @@ dependencies = [ "hashbrown 0.13.2", "itertools", "num-traits", + "rayon", "zeroize", ] +[[package]] +name = "ark-ed-on-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" +dependencies = [ + "ark-bls12-377", + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ed-on-bls12-377-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ed-on-bls12-381-bandersnatch" version = "0.4.0" @@ -155,6 +232,19 @@ dependencies = [ "ark-std", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff", + "ark-models-ext", + "ark-std", +] + [[package]] name = "ark-ff" version = "0.4.2" @@ -198,6 +288,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-models-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", +] + [[package]] name = "ark-poly" version = "0.4.2" @@ -228,7 +331,7 @@ dependencies = [ [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ec", "ark-ff", @@ -271,12 +374,13 @@ checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", "rand 0.8.5", + "rayon", ] [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ff", "ark-serialize", @@ -391,8 +495,8 @@ dependencies = [ [[package]] name = "bandersnatch_vrfs" -version = "0.0.1" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +version = "0.0.3" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-bls12-381", "ark-ec", @@ -407,6 +511,8 @@ dependencies = [ "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.8", + "sp-ark-bls12-381", + "sp-ark-ed-on-bls12-381-bandersnatch", "zeroize", ] @@ -859,6 +965,39 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-deque" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.9.0", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +dependencies = [ + "cfg-if", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -1091,7 +1230,7 @@ dependencies = [ [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f/ring-vrf?rev=4b09416#4b09416fd23383ec436ddac127d58c7b7cd392c6" +source = "git+https://github.com/w3f/ring-vrf?rev=cbc342e#cbc342e95d3cbcd3c5ba8d45af7200eb58e63502" dependencies = [ "ark-ec", "ark-ff", @@ -2519,6 +2658,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "memory-db" version = "0.31.0" @@ -3076,6 +3224,26 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rayon" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -3870,6 +4038,24 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-ark-bls12-381" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-bls12-381-ext", + "sp-crypto-ec-utils", +] + +[[package]] +name = "sp-ark-ed-on-bls12-381-bandersnatch" +version = "0.4.2" +source = "git+https://github.com/paritytech/arkworks-substrate#caa2eed74beb885dd07c7db5f916f2281dad818f" +dependencies = [ + "ark-ed-on-bls12-381-bandersnatch-ext", + "sp-crypto-ec-utils", +] + [[package]] name = "sp-core" version = "16.0.0" @@ -3988,6 +4174,27 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "sp-crypto-ec-utils" +version = "0.4.1" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +dependencies = [ + "ark-bls12-377", + "ark-bls12-377-ext", + "ark-bls12-381", + "ark-bls12-381-ext", + "ark-bw6-761", + "ark-bw6-761-ext", + "ark-ec", + "ark-ed-on-bls12-377", + "ark-ed-on-bls12-377-ext", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ed-on-bls12-381-bandersnatch-ext", + "ark-scale", + "sp-runtime-interface 17.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + [[package]] name = "sp-debug-derive" version = "6.0.0" @@ -4008,6 +4215,16 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "sp-debug-derive" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "sp-externalities" version = "0.17.0" @@ -4030,6 +4247,17 @@ dependencies = [ "sp-storage 13.0.0", ] +[[package]] +name = "sp-externalities" +version = "0.19.0" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +dependencies = [ + "environmental", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + [[package]] name = "sp-io" version = "17.0.0" @@ -4143,6 +4371,24 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-runtime-interface" +version = "17.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "primitive-types", + "sp-externalities 0.19.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-runtime-interface-proc-macro 11.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-tracing 10.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-wasm-interface 14.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "static_assertions", +] + [[package]] name = "sp-runtime-interface-proc-macro" version = "9.0.0" @@ -4167,6 +4413,18 @@ dependencies = [ "syn 2.0.38", ] +[[package]] +name = "sp-runtime-interface-proc-macro" +version = "11.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +dependencies = [ + "Inflector", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.38", +] + [[package]] name = "sp-state-machine" version = "0.22.0" @@ -4198,6 +4456,11 @@ checksum = "af0ee286f98455272f64ac5bb1384ff21ac029fbb669afbaf48477faff12760e" name = "sp-std" version = "8.0.0" +[[package]] +name = "sp-std" +version = "8.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" + [[package]] name = "sp-storage" version = "11.0.0" @@ -4224,6 +4487,19 @@ dependencies = [ "sp-std 8.0.0", ] +[[package]] +name = "sp-storage" +version = "13.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "ref-cast", + "serde", + "sp-debug-derive 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", +] + [[package]] name = "sp-tracing" version = "8.0.0" @@ -4248,6 +4524,18 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "sp-tracing" +version = "10.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +dependencies = [ + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "tracing", + "tracing-core", + "tracing-subscriber", +] + [[package]] name = "sp-trie" version = "16.0.0" @@ -4299,6 +4587,19 @@ dependencies = [ "wasmtime 8.0.1", ] +[[package]] +name = "sp-wasm-interface" +version = "14.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +dependencies = [ + "anyhow", + "impl-trait-for-tuples", + "log", + "parity-scale-codec", + "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", + "wasmtime 8.0.1", +] + [[package]] name = "sp-weights" version = "14.0.0" From 8c8afc5d63384a157a72df76bf53eba3c20dd906 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 9 Nov 2023 09:43:32 +0200 Subject: [PATCH 02/10] attempting to fix message queue things --- .../outbound-queue/src/benchmarking.rs | 6 ++-- parachain/pallets/outbound-queue/src/lib.rs | 12 +++---- .../src/queue_paused_query_impl.rs | 10 +++--- .../outbound-queue/src/send_message_impl.rs | 12 +++---- parachain/pallets/outbound-queue/src/test.rs | 14 ++++---- parachain/primitives/core/src/outbound.rs | 33 +++++++++++-------- polkadot-sdk | 2 +- web/packages/test/scripts/build-binary.sh | 4 +-- 8 files changed, 51 insertions(+), 42 deletions(-) diff --git a/parachain/pallets/outbound-queue/src/benchmarking.rs b/parachain/pallets/outbound-queue/src/benchmarking.rs index 9fead12bfc..f6e8970c19 100644 --- a/parachain/pallets/outbound-queue/src/benchmarking.rs +++ b/parachain/pallets/outbound-queue/src/benchmarking.rs @@ -4,7 +4,9 @@ use super::*; use codec::Encode; use frame_benchmarking::v2::*; -use snowbridge_core::outbound::{AggregateMessageOrigin, Command, ExportOrigin, Initializer}; +use snowbridge_core::outbound::{ + AggregateMessageOrigin, Command, Initializer, SnowbridgeMessageOrigin, +}; use sp_core::{H160, H256}; #[allow(unused_imports)] @@ -32,7 +34,7 @@ mod benchmarks { }), }, }; - let origin = AggregateMessageOrigin::Export(ExportOrigin::Here); + let origin = AggregateMessageOrigin::Snowbridge(SnowbridgeMessageOrigin::Here); let encoded_enqueued_message = enqueued_message.encode(); #[block] diff --git a/parachain/pallets/outbound-queue/src/lib.rs b/parachain/pallets/outbound-queue/src/lib.rs index 283e13d9c6..6cf1cd2520 100644 --- a/parachain/pallets/outbound-queue/src/lib.rs +++ b/parachain/pallets/outbound-queue/src/lib.rs @@ -104,7 +104,7 @@ use frame_support::{ }; use snowbridge_core::{ outbound::{ - AggregateMessageOrigin, Command, ExportOrigin, Fee, GasMeter, QueuedMessage, + AggregateMessageOrigin, Command, Fee, GasMeter, QueuedMessage, SnowbridgeMessageOrigin, VersionedQueuedMessage, ETHER_DECIMALS, }, BasicOperatingMode, ParaId, GWEI, METH, @@ -313,7 +313,7 @@ pub mod pallet { pub(crate) fn commit() { let count = MessageLeaves::::decode_len().unwrap_or_default() as u64; if count == 0 { - return + return; } // Create merkle root of messages @@ -333,19 +333,19 @@ pub mod pallet { mut message: &[u8], ) -> Result { use AggregateMessageOrigin::*; - use ExportOrigin::*; use ProcessMessageError::*; + use SnowbridgeMessageOrigin::*; // Yield if the maximum number of messages has been processed this block. // This ensures that the weight of `on_finalize` has a known maximum bound. ensure!( - MessageLeaves::::decode_len().unwrap_or(0) < - T::MaxMessagesPerBlock::get() as usize, + MessageLeaves::::decode_len().unwrap_or(0) + < T::MaxMessagesPerBlock::get() as usize, Yield ); // If this is a high priority message, mark it as processed - if let Export(Here) = origin { + if let Snowbridge(Here) = origin { PendingHighPriorityMessageCount::::mutate(|count| { *count = count.saturating_sub(1) }); diff --git a/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs b/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs index d23eb69d78..1f1e5169a8 100644 --- a/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs +++ b/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs @@ -1,7 +1,7 @@ //! Implementation for [`frame_support::traits::QueuePausedQuery`] use super::*; use frame_support::traits::QueuePausedQuery; -use snowbridge_core::outbound::{AggregateMessageOrigin, ExportOrigin}; +use snowbridge_core::outbound::{AggregateMessageOrigin, SnowbridgeMessageOrigin}; impl QueuePausedQuery for Pallet where @@ -9,17 +9,17 @@ where { fn is_paused(origin: &AggregateMessageOrigin) -> bool { use AggregateMessageOrigin::*; - use ExportOrigin::*; + use SnowbridgeMessageOrigin::*; // Queues for sibling parachains are paused when: // 1. The pallet is halted // 2. A higher-priority queue has pending messages - if let Export(Sibling(_)) = origin { + if let Snowbridge(Sibling(_)) = origin { if Self::operating_mode().is_halted() { - return true + return true; } if PendingHighPriorityMessageCount::::get() > 0 { - return true + return true; } } diff --git a/parachain/pallets/outbound-queue/src/send_message_impl.rs b/parachain/pallets/outbound-queue/src/send_message_impl.rs index 4912b9100e..ad531903b5 100644 --- a/parachain/pallets/outbound-queue/src/send_message_impl.rs +++ b/parachain/pallets/outbound-queue/src/send_message_impl.rs @@ -7,8 +7,8 @@ use frame_support::{ CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, }; use snowbridge_core::outbound::{ - AggregateMessageOrigin, ExportOrigin, Fee, Message, QueuedMessage, SendError, SendMessage, - VersionedQueuedMessage, + AggregateMessageOrigin, Fee, Message, QueuedMessage, SendError, SendMessage, + SnowbridgeMessageOrigin, VersionedQueuedMessage, }; use sp_core::H256; use sp_runtime::BoundedVec; @@ -58,18 +58,18 @@ impl SendMessage for Pallet { fn deliver(ticket: Self::Ticket) -> Result { use AggregateMessageOrigin::*; - use ExportOrigin::*; + use SnowbridgeMessageOrigin::*; // Assign an `AggregateMessageOrigin` to track the message within the MessageQueue // pallet. Governance commands are assigned origin `ExportOrigin::Here`. In other words // emitted from BridgeHub itself. let origin = if ticket.origin == T::OwnParaId::get() { - Export(Here) + Snowbridge(Here) } else { - Export(Sibling(ticket.origin)) + Snowbridge(Sibling(ticket.origin)) }; - if let Export(Here) = origin { + if let Snowbridge(Here) = origin { // Increase PendingHighPriorityMessageCount by one PendingHighPriorityMessageCount::::mutate(|count| *count = count.saturating_add(1)); } else { diff --git a/parachain/pallets/outbound-queue/src/test.rs b/parachain/pallets/outbound-queue/src/test.rs index 618671b572..5f3bdc4596 100644 --- a/parachain/pallets/outbound-queue/src/test.rs +++ b/parachain/pallets/outbound-queue/src/test.rs @@ -9,7 +9,7 @@ use frame_support::{ }; use codec::Encode; -use snowbridge_core::outbound::{Command, ExportOrigin, SendError, SendMessage}; +use snowbridge_core::outbound::{Command, SendError, SendMessage, SnowbridgeMessageOrigin}; use sp_core::H256; use sp_runtime::{AccountId32, DispatchError}; @@ -83,7 +83,8 @@ fn process_message_yields_on_max_messages_per_block() { MessageLeaves::::append(H256::zero()) } - let origin = AggregateMessageOrigin::Export(ExportOrigin::Sibling(1000.into())); + let origin = + AggregateMessageOrigin::Snowbridge(SnowbridgeMessageOrigin::Sibling(1000.into())); let message = QueuedMessage { id: Default::default(), origin: 1000.into(), @@ -108,7 +109,8 @@ fn process_message_yields_on_max_messages_per_block() { fn process_message_fails_on_overweight_message() { new_tester().execute_with(|| { let sibling_id = 1000; - let origin = AggregateMessageOrigin::Export(ExportOrigin::Sibling(sibling_id.into())); + let origin = + AggregateMessageOrigin::Snowbridge(SnowbridgeMessageOrigin::Sibling(sibling_id.into())); let message = mock_message(sibling_id).encode(); let mut meter = WeightMeter::with_limit(Weight::from_parts(1, 1)); assert_noop!( @@ -157,11 +159,11 @@ fn set_fee_config_invalid() { #[test] fn low_priority_messages_are_processed_last() { use AggregateMessageOrigin::*; - use ExportOrigin::*; + use SnowbridgeMessageOrigin::*; let sibling_id = 1000; - let high_priority_queue = Export(Here); - let low_priority_queue = Export(Sibling(sibling_id.into())); + let high_priority_queue = Snowbridge(Here); + let low_priority_queue = Snowbridge(Sibling(sibling_id.into())); new_tester().execute_with(|| { // submit a lot of high priority messages from asset_hub which will need multiple blocks to diff --git a/parachain/primitives/core/src/outbound.rs b/parachain/primitives/core/src/outbound.rs index 21964e758e..cbbd356a8f 100644 --- a/parachain/primitives/core/src/outbound.rs +++ b/parachain/primitives/core/src/outbound.rs @@ -138,23 +138,26 @@ mod v1 { /// ABI-encode the Command. pub fn abi_encode(&self) -> Vec { match self { - Command::AgentExecute { agent_id, command } => + Command::AgentExecute { agent_id, command } => { ethabi::encode(&[Token::Tuple(vec![ Token::FixedBytes(agent_id.as_bytes().to_owned()), Token::Bytes(command.abi_encode()), - ])]), - Command::Upgrade { impl_address, impl_code_hash, initializer, .. } => + ])]) + }, + Command::Upgrade { impl_address, impl_code_hash, initializer, .. } => { ethabi::encode(&[Token::Tuple(vec![ Token::Address(*impl_address), Token::FixedBytes(impl_code_hash.as_bytes().to_owned()), initializer .clone() .map_or(Token::Bytes(vec![]), |i| Token::Bytes(i.params)), - ])]), - Command::CreateAgent { agent_id } => + ])]) + }, + Command::CreateAgent { agent_id } => { ethabi::encode(&[Token::Tuple(vec![Token::FixedBytes( agent_id.as_bytes().to_owned(), - )])]), + )])]) + }, Command::CreateChannel { para_id, agent_id } => { let para_id: u32 = (*para_id).into(); ethabi::encode(&[Token::Tuple(vec![ @@ -170,9 +173,10 @@ mod v1 { Token::Uint(U256::from(*fee)), ])]) }, - Command::SetOperatingMode { mode } => - ethabi::encode(&[Token::Tuple(vec![Token::Uint(U256::from((*mode) as u64))])]), - Command::TransferNativeFromAgent { agent_id, recipient, amount } => + Command::SetOperatingMode { mode } => { + ethabi::encode(&[Token::Tuple(vec![Token::Uint(U256::from((*mode) as u64))])]) + }, + Command::TransferNativeFromAgent { agent_id, recipient, amount } => { ethabi::encode(&[Token::Tuple(vec![ Token::FixedBytes(agent_id.as_bytes().to_owned()), Token::Address(*recipient), @@ -221,7 +225,7 @@ mod v1 { /// ABI-encode the sub-command pub fn abi_encode(&self) -> Vec { match self { - AgentExecuteCommand::TransferToken { token, recipient, amount } => + AgentExecuteCommand::TransferToken { token, recipient, amount } => { ethabi::encode(&[ Token::Uint(self.index().into()), Token::Bytes(ethabi::encode(&[ @@ -229,7 +233,8 @@ mod v1 { Token::Address(*recipient), Token::Uint(U256::from(*amount)), ])), - ]), + ]) + }, } } } @@ -363,12 +368,12 @@ impl GasMeter for () { impl From for AggregateMessageOrigin { fn from(value: u32) -> Self { - AggregateMessageOrigin::Export(ExportOrigin::Sibling(value.into())) + AggregateMessageOrigin::Snowbridge(SnowbridgeMessageOrigin::Sibling(value.into())) } } #[derive(Encode, Decode, Clone, Copy, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] -pub enum ExportOrigin { +pub enum SnowbridgeMessageOrigin { Here, Sibling(ParaId), } @@ -377,7 +382,7 @@ pub enum ExportOrigin { #[derive(Encode, Decode, Clone, Copy, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub enum AggregateMessageOrigin { /// Message is to be exported via a bridge - Export(ExportOrigin), + Snowbridge(SnowbridgeMessageOrigin), } pub const ETHER_DECIMALS: u8 = 18; diff --git a/polkadot-sdk b/polkadot-sdk index cc24f53f01..10461ccaf7 160000 --- a/polkadot-sdk +++ b/polkadot-sdk @@ -1 +1 @@ -Subproject commit cc24f53f01101260aa41432c3b67211c9d363fac +Subproject commit 10461ccaf7d679d98bb2f5c9b931ad812d976cc2 diff --git a/web/packages/test/scripts/build-binary.sh b/web/packages/test/scripts/build-binary.sh index 7984d330ce..902af6b10b 100755 --- a/web/packages/test/scripts/build-binary.sh +++ b/web/packages/test/scripts/build-binary.sh @@ -12,14 +12,14 @@ build_binaries() { fi echo "Building polkadot binary and parachain template node" - cargo build --release --workspace --locked --bin polkadot --bin polkadot-execute-worker --bin polkadot-prepare-worker --bin parachain-template-node + cargo build --release --workspace --bin polkadot --bin polkadot-execute-worker --bin polkadot-prepare-worker --bin parachain-template-node cp target/release/polkadot $output_bin_dir/polkadot cp target/release/polkadot-execute-worker $output_bin_dir/polkadot-execute-worker cp target/release/polkadot-prepare-worker $output_bin_dir/polkadot-prepare-worker cp target/release/parachain-template-node $output_bin_dir/parachain-template-node echo "Building polkadot-parachain binary" - cargo build --release --workspace --locked --bin polkadot-parachain $features + cargo build --release --workspace --bin polkadot-parachain $features cp target/release/polkadot-parachain $output_bin_dir/polkadot-parachain popd From dcf6c7a7b4a878f6d25f3bf8b2952cb6f8a4e83b Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 9 Nov 2023 10:36:22 +0200 Subject: [PATCH 03/10] fix message queue things --- parachain/Cargo.lock | 35 +++++++++++++++++-- parachain/pallets/outbound-queue/Cargo.toml | 3 ++ parachain/pallets/outbound-queue/src/lib.rs | 10 +++--- .../src/process_message_impl.rs | 4 +-- .../src/queue_paused_query_impl.rs | 5 +-- .../outbound-queue/src/send_message_impl.rs | 11 +++--- parachain/pallets/outbound-queue/src/test.rs | 30 ++++++++-------- parachain/primitives/core/src/outbound.rs | 21 +---------- 8 files changed, 66 insertions(+), 53 deletions(-) diff --git a/parachain/Cargo.lock b/parachain/Cargo.lock index 05eb75af54..886be514f0 100644 --- a/parachain/Cargo.lock +++ b/parachain/Cargo.lock @@ -655,6 +655,19 @@ dependencies = [ "trie-db", ] +[[package]] +name = "bridge-hub-common" +version = "0.1.0" +dependencies = [ + "cumulus-primitives-core", + "frame-support", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std 8.0.0", + "staging-xcm", +] + [[package]] name = "bs58" version = "0.5.0" @@ -941,6 +954,22 @@ dependencies = [ "subtle", ] +[[package]] +name = "cumulus-primitives-core" +version = "0.1.0" +dependencies = [ + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "scale-info", + "sp-api", + "sp-runtime", + "sp-std 8.0.0", + "sp-trie", + "staging-xcm", +] + [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -1460,6 +1489,7 @@ name = "frame-support" version = "4.0.0-dev" dependencies = [ "aquamarine", + "array-bytes 6.1.0", "bitflags", "docify", "environmental", @@ -3149,9 +3179,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -3432,6 +3462,7 @@ dependencies = [ name = "snowbridge-outbound-queue" version = "0.1.1" dependencies = [ + "bridge-hub-common", "ethabi-decode", "frame-benchmarking", "frame-support", diff --git a/parachain/pallets/outbound-queue/Cargo.toml b/parachain/pallets/outbound-queue/Cargo.toml index 2426274d15..f4523de6f5 100644 --- a/parachain/pallets/outbound-queue/Cargo.toml +++ b/parachain/pallets/outbound-queue/Cargo.toml @@ -23,6 +23,7 @@ sp-std = { path = "../../../polkadot-sdk/substrate/primitives/std", default-feat sp-runtime = { path = "../../../polkadot-sdk/substrate/primitives/runtime", default-features = false } sp-io = { path = "../../../polkadot-sdk/substrate/primitives/io", default-features = false } sp-arithmetic = { path = "../../../polkadot-sdk/substrate/primitives/arithmetic", default-features = false } +bridge-hub-common = { path = "../../../polkadot-sdk/cumulus/parachains/runtimes/bridge-hubs/common", default-features = false } snowbridge-core = { path = "../../primitives/core", features = ["serde"], default-features = false } snowbridge-outbound-queue-merkle-tree = { path = "merkle-tree", default-features = false } @@ -53,11 +54,13 @@ std = [ "snowbridge-outbound-queue-merkle-tree/std", "ethabi/std", "xcm/std", + "bridge-hub-common/std", ] runtime-benchmarks = [ "snowbridge-core/runtime-benchmarks", "frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "bridge-hub-common/runtime-benchmarks", "hex-literal", ] diff --git a/parachain/pallets/outbound-queue/src/lib.rs b/parachain/pallets/outbound-queue/src/lib.rs index 6cf1cd2520..60a2960e0f 100644 --- a/parachain/pallets/outbound-queue/src/lib.rs +++ b/parachain/pallets/outbound-queue/src/lib.rs @@ -96,6 +96,9 @@ mod mock; #[cfg(test)] mod test; +use bridge_hub_common::{ + AggregateMessageOrigin, AggregateMessageOrigin::Snowbridge, SnowbridgeMessageOrigin::Here, +}; use codec::Decode; use frame_support::{ storage::StorageStreamIter, @@ -103,10 +106,7 @@ use frame_support::{ weights::{Weight, WeightToFee}, }; use snowbridge_core::{ - outbound::{ - AggregateMessageOrigin, Command, Fee, GasMeter, QueuedMessage, SnowbridgeMessageOrigin, - VersionedQueuedMessage, ETHER_DECIMALS, - }, + outbound::{Command, Fee, GasMeter, QueuedMessage, VersionedQueuedMessage, ETHER_DECIMALS}, BasicOperatingMode, ParaId, GWEI, METH, }; use snowbridge_outbound_queue_merkle_tree::merkle_root; @@ -332,9 +332,7 @@ pub mod pallet { origin: ProcessMessageOriginOf, mut message: &[u8], ) -> Result { - use AggregateMessageOrigin::*; use ProcessMessageError::*; - use SnowbridgeMessageOrigin::*; // Yield if the maximum number of messages has been processed this block. // This ensures that the weight of `on_finalize` has a known maximum bound. diff --git a/parachain/pallets/outbound-queue/src/process_message_impl.rs b/parachain/pallets/outbound-queue/src/process_message_impl.rs index 42e781fb65..c74f94b731 100644 --- a/parachain/pallets/outbound-queue/src/process_message_impl.rs +++ b/parachain/pallets/outbound-queue/src/process_message_impl.rs @@ -1,11 +1,11 @@ //! Implementation for [`frame_support::traits::ProcessMessage`] use super::*; use crate::weights::WeightInfo; +use bridge_hub_common::AggregateMessageOrigin; use frame_support::{ traits::{ProcessMessage, ProcessMessageError}, weights::WeightMeter, }; -use snowbridge_core::outbound::AggregateMessageOrigin; impl ProcessMessage for Pallet { type Origin = AggregateMessageOrigin; @@ -17,7 +17,7 @@ impl ProcessMessage for Pallet { ) -> Result { let weight = T::WeightInfo::do_process_message(); if meter.try_consume(weight).is_err() { - return Err(ProcessMessageError::Overweight(weight)) + return Err(ProcessMessageError::Overweight(weight)); } Self::do_process_message(origin, message) } diff --git a/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs b/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs index 1f1e5169a8..03aa05013f 100644 --- a/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs +++ b/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs @@ -1,16 +1,13 @@ //! Implementation for [`frame_support::traits::QueuePausedQuery`] use super::*; +use bridge_hub_common::{AggregateMessageOrigin, SnowbridgeMessageOrigin::Sibling}; use frame_support::traits::QueuePausedQuery; -use snowbridge_core::outbound::{AggregateMessageOrigin, SnowbridgeMessageOrigin}; impl QueuePausedQuery for Pallet where T: Config, { fn is_paused(origin: &AggregateMessageOrigin) -> bool { - use AggregateMessageOrigin::*; - use SnowbridgeMessageOrigin::*; - // Queues for sibling parachains are paused when: // 1. The pallet is halted // 2. A higher-priority queue has pending messages diff --git a/parachain/pallets/outbound-queue/src/send_message_impl.rs b/parachain/pallets/outbound-queue/src/send_message_impl.rs index ad531903b5..22be2af9df 100644 --- a/parachain/pallets/outbound-queue/src/send_message_impl.rs +++ b/parachain/pallets/outbound-queue/src/send_message_impl.rs @@ -1,5 +1,10 @@ //! Implementation for [`snowbridge_core::outbound::SendMessage`] use super::*; +use bridge_hub_common::{ + AggregateMessageOrigin, + AggregateMessageOrigin::Snowbridge, + SnowbridgeMessageOrigin::{Here, Sibling}, +}; use codec::Encode; use frame_support::{ ensure, @@ -7,8 +12,7 @@ use frame_support::{ CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, }; use snowbridge_core::outbound::{ - AggregateMessageOrigin, Fee, Message, QueuedMessage, SendError, SendMessage, - SnowbridgeMessageOrigin, VersionedQueuedMessage, + Fee, Message, QueuedMessage, SendError, SendMessage, VersionedQueuedMessage, }; use sp_core::H256; use sp_runtime::BoundedVec; @@ -57,9 +61,6 @@ impl SendMessage for Pallet { } fn deliver(ticket: Self::Ticket) -> Result { - use AggregateMessageOrigin::*; - use SnowbridgeMessageOrigin::*; - // Assign an `AggregateMessageOrigin` to track the message within the MessageQueue // pallet. Governance commands are assigned origin `ExportOrigin::Here`. In other words // emitted from BridgeHub itself. diff --git a/parachain/pallets/outbound-queue/src/test.rs b/parachain/pallets/outbound-queue/src/test.rs index 5f3bdc4596..44acae164a 100644 --- a/parachain/pallets/outbound-queue/src/test.rs +++ b/parachain/pallets/outbound-queue/src/test.rs @@ -8,8 +8,12 @@ use frame_support::{ weights::WeightMeter, }; +use bridge_hub_common::{ + AggregateMessageOrigin, AggregateMessageOrigin::Snowbridge, SnowbridgeMessageOrigin, + SnowbridgeMessageOrigin::Sibling, +}; use codec::Encode; -use snowbridge_core::outbound::{Command, SendError, SendMessage, SnowbridgeMessageOrigin}; +use snowbridge_core::outbound::{Command, SendError, SendMessage}; use sp_core::H256; use sp_runtime::{AccountId32, DispatchError}; @@ -158,11 +162,9 @@ fn set_fee_config_invalid() { #[test] fn low_priority_messages_are_processed_last() { - use AggregateMessageOrigin::*; - use SnowbridgeMessageOrigin::*; - let sibling_id = 1000; - let high_priority_queue = Snowbridge(Here); + let high_priority_queue = + Snowbridge(bridge_hub_common::message_queue::SnowbridgeMessageOrigin::Here); let low_priority_queue = Snowbridge(Sibling(sibling_id.into())); new_tester().execute_with(|| { @@ -175,41 +177,41 @@ fn low_priority_messages_are_processed_last() { OutboundQueue::deliver(ticket).unwrap(); } let footprint = MessageQueue::footprint(high_priority_queue); - assert_eq!(footprint.count, (max_messages) as u64); + assert_eq!(footprint.storage.count, (max_messages) as u64); // submit low priority message let message = mock_message(sibling_id); let (ticket, _) = OutboundQueue::validate(&message).unwrap(); OutboundQueue::deliver(ticket).unwrap(); let footprint = MessageQueue::footprint(low_priority_queue); - assert_eq!(footprint.count, 1); + assert_eq!(footprint.storage.count, 1); // run to next block; only high priority messages should have been processed ServiceWeight::set(Some(Weight::MAX)); run_to_end_of_next_block(); let footprint = MessageQueue::footprint(high_priority_queue); - assert_eq!(footprint.count, 40); + assert_eq!(footprint.storage.count, 40); let footprint = MessageQueue::footprint(low_priority_queue); - assert_eq!(footprint.count, 1); + assert_eq!(footprint.storage.count, 1); // move to the next block, some high priority messages get executed ServiceWeight::set(Some(Weight::MAX)); run_to_end_of_next_block(); let footprint = MessageQueue::footprint(high_priority_queue); - assert_eq!(footprint.count, 20); + assert_eq!(footprint.storage.count, 20); let footprint = MessageQueue::footprint(low_priority_queue); - assert_eq!(footprint.count, 1); + assert_eq!(footprint.storage.count, 1); // move to the next block, some high priority messages get executed ServiceWeight::set(Some(Weight::MAX)); run_to_end_of_next_block(); let footprint = MessageQueue::footprint(high_priority_queue); - assert_eq!(footprint.count, 0); + assert_eq!(footprint.storage.count, 0); let footprint = MessageQueue::footprint(low_priority_queue); - assert_eq!(footprint.count, 1); + assert_eq!(footprint.storage.count, 1); // move to the next block, the last remaining pending message, // a lower priority one, is processed @@ -217,7 +219,7 @@ fn low_priority_messages_are_processed_last() { run_to_end_of_next_block(); let footprint = MessageQueue::footprint(low_priority_queue); - assert_eq!(footprint.count, 0); + assert_eq!(footprint.storage.count, 0); }); } diff --git a/parachain/primitives/core/src/outbound.rs b/parachain/primitives/core/src/outbound.rs index cbbd356a8f..59a1bf6e48 100644 --- a/parachain/primitives/core/src/outbound.rs +++ b/parachain/primitives/core/src/outbound.rs @@ -1,4 +1,4 @@ -use codec::{Decode, Encode, MaxEncodedLen}; +use codec::{Decode, Encode}; use frame_support::PalletError; pub use polkadot_parachain_primitives::primitives::Id as ParaId; use scale_info::TypeInfo; @@ -366,23 +366,4 @@ impl GasMeter for () { } } -impl From for AggregateMessageOrigin { - fn from(value: u32) -> Self { - AggregateMessageOrigin::Snowbridge(SnowbridgeMessageOrigin::Sibling(value.into())) - } -} - -#[derive(Encode, Decode, Clone, Copy, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] -pub enum SnowbridgeMessageOrigin { - Here, - Sibling(ParaId), -} - -/// Aggregate message origin for the `MessageQueue` pallet. -#[derive(Encode, Decode, Clone, Copy, MaxEncodedLen, Eq, PartialEq, RuntimeDebug, TypeInfo)] -pub enum AggregateMessageOrigin { - /// Message is to be exported via a bridge - Snowbridge(SnowbridgeMessageOrigin), -} - pub const ETHER_DECIMALS: u8 = 18; From 64d07e77219825ac6d533641b9777a1de3d5fb2e Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 9 Nov 2023 15:19:00 +0200 Subject: [PATCH 04/10] fixes --- web/packages/test/scripts/deploy-polkadot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/packages/test/scripts/deploy-polkadot.sh b/web/packages/test/scripts/deploy-polkadot.sh index 7090decf80..2e6df644d8 100755 --- a/web/packages/test/scripts/deploy-polkadot.sh +++ b/web/packages/test/scripts/deploy-polkadot.sh @@ -4,7 +4,7 @@ set -eu source scripts/set-env.sh zombienet_launch() { - npx zombienet spawn config/launch-config.toml --provider=native --dir="$zombienet_data_dir" 2>&1 & + zombienet-macos spawn config/launch-config.toml --provider=native --dir="$zombienet_data_dir" 2>&1 & scripts/wait-for-it.sh -t 120 127.0.0.1:13144 } From da0f4264267b7a1ca8e9e1a87b1747063c04da0a Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 9 Nov 2023 19:02:13 +0200 Subject: [PATCH 05/10] cleanup --- parachain/primitives/core/src/outbound.rs | 8 +++++--- polkadot-sdk | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/parachain/primitives/core/src/outbound.rs b/parachain/primitives/core/src/outbound.rs index 59a1bf6e48..66f0362b59 100644 --- a/parachain/primitives/core/src/outbound.rs +++ b/parachain/primitives/core/src/outbound.rs @@ -181,12 +181,14 @@ mod v1 { Token::FixedBytes(agent_id.as_bytes().to_owned()), Token::Address(*recipient), Token::Uint(U256::from(*amount)), - ])]), - Command::SetTokenTransferFees { register, send } => + ])]) + }, + Command::SetTokenTransferFees { register, send } => { ethabi::encode(&[Token::Tuple(vec![ Token::Uint(U256::from(*register)), Token::Uint(U256::from(*send)), - ])]), + ])]) + }, } } } diff --git a/polkadot-sdk b/polkadot-sdk index 10461ccaf7..9e2bef307e 160000 --- a/polkadot-sdk +++ b/polkadot-sdk @@ -1 +1 @@ -Subproject commit 10461ccaf7d679d98bb2f5c9b931ad812d976cc2 +Subproject commit 9e2bef307ef5129d7b532177be14b53fe6be32c8 From 6fbaf31a52a4f516efaf0a079308c5e312d056aa Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 9 Nov 2023 19:39:34 +0200 Subject: [PATCH 06/10] merge --- contracts/src/Assets.sol | 1 + contracts/src/DeployScript.sol | 15 +- contracts/src/Gateway.sol | 13 +- contracts/src/Types.sol | 2 + contracts/src/interfaces/IGateway.sol | 25 +- contracts/test/Gateway.t.sol | 54 ++-- parachain/pallets/control/src/lib.rs | 2 +- parachain/pallets/control/src/tests.rs | 8 +- .../pallets/ethereum-beacon-client/Cargo.toml | 2 +- .../ethereum-beacon-client/src/impls.rs | 23 +- .../pallets/ethereum-beacon-client/src/lib.rs | 3 - .../ethereum-beacon-client/src/tests.rs | 15 +- parachain/pallets/inbound-queue/Cargo.toml | 16 +- .../src/benchmarking/fixtures.rs | 2 +- .../pallets/inbound-queue/src/envelope.rs | 62 ++-- parachain/pallets/inbound-queue/src/lib.rs | 50 +-- parachain/pallets/inbound-queue/src/test.rs | 112 +------ .../outbound-queue/src/benchmarking.rs | 2 +- parachain/pallets/outbound-queue/src/lib.rs | 25 +- parachain/pallets/outbound-queue/src/mock.rs | 3 + .../outbound-queue/src/send_message_impl.rs | 30 +- parachain/pallets/outbound-queue/src/types.rs | 4 + parachain/primitives/core/src/inbound.rs | 37 ++- parachain/primitives/core/src/outbound.rs | 25 +- parachain/primitives/ethereum/Cargo.toml | 3 +- parachain/primitives/router/Cargo.toml | 1 + .../primitives/router/src/inbound/mod.rs | 1 + .../primitives/router/src/outbound/mod.rs | 36 ++- relayer/contracts/gateway.go | 299 ++++++++++-------- relayer/relays/execution/main.go | 2 +- relayer/relays/parachain/types.go | 2 + smoketest/Cargo.lock | 18 +- .../test/scripts/configure-bridgehub.sh | 1 - web/packages/test/scripts/set-env.sh | 1 + 34 files changed, 447 insertions(+), 448 deletions(-) diff --git a/contracts/src/Assets.sol b/contracts/src/Assets.sol index ed489fddca..b53a6f6ff5 100644 --- a/contracts/src/Assets.sol +++ b/contracts/src/Assets.sol @@ -71,6 +71,7 @@ library Assets { payload = SubstrateTypes.SendToken(address(this), token, destinationChain, destinationAddress, amount); extraFee = $.sendTokenFee; + emit IGateway.TokenSent(sender, token, destinationChain, abi.encodePacked(destinationAddress), amount); } diff --git a/contracts/src/DeployScript.sol b/contracts/src/DeployScript.sol index 2efddbe9f9..813a5c3388 100644 --- a/contracts/src/DeployScript.sol +++ b/contracts/src/DeployScript.sol @@ -12,7 +12,7 @@ import {Gateway} from "./Gateway.sol"; import {GatewayUpgradeMock} from "../test/mocks/GatewayUpgradeMock.sol"; import {Agent} from "./Agent.sol"; import {AgentExecutor} from "./AgentExecutor.sol"; -import {ParaID, Config} from "./Types.sol"; +import {ParaID, Config, OperatingMode} from "./Types.sol"; import {SafeNativeTransfer} from "./utils/SafeTransfer.sol"; import {stdJson} from "forge-std/StdJson.sol"; @@ -66,8 +66,19 @@ contract DeployScript is Script { assetHubAgentID ); + bool rejectOutboundMessages = vm.envBool("REJECT_OUTBOUND_MESSAGES"); + OperatingMode defaultOperatingMode; + if (rejectOutboundMessages) { + defaultOperatingMode = OperatingMode.RejectingOutboundMessages; + } else { + defaultOperatingMode = OperatingMode.Normal; + } + bytes memory initParams = abi.encode( - vm.envUint("DEFAULT_FEE"), vm.envUint("REGISTER_NATIVE_TOKEN_FEE"), vm.envUint("SEND_NATIVE_TOKEN_FEE") + defaultOperatingMode, + vm.envUint("DEFAULT_FEE"), + vm.envUint("REGISTER_NATIVE_TOKEN_FEE"), + vm.envUint("SEND_NATIVE_TOKEN_FEE") ); GatewayProxy gateway = new GatewayProxy(address(gatewayLogic), initParams); diff --git a/contracts/src/Gateway.sol b/contracts/src/Gateway.sol index 281304e73c..876a64db32 100644 --- a/contracts/src/Gateway.sol +++ b/contracts/src/Gateway.sol @@ -200,7 +200,7 @@ contract Gateway is IGateway, IInitializable { _transferNativeFromAgent(channel.agent, payable(msg.sender), amount); } - emit IGateway.InboundMessageDispatched(message.origin, message.nonce, success); + emit IGateway.InboundMessageDispatched(message.origin, message.nonce, message.id, success); } /** @@ -512,7 +512,10 @@ contract Gateway is IGateway, IInitializable { payable(msg.sender).safeNativeTransfer(msg.value - channel.fee - extraFee); } - emit IGateway.OutboundMessageAccepted(dest, channel.outboundNonce, payload); + // Generate a unique ID for this message + bytes32 messageID = keccak256(abi.encodePacked(dest, channel.outboundNonce)); + + emit IGateway.OutboundMessageAccepted(dest, channel.outboundNonce, messageID, payload); } /// @dev Outbound message can be disabled globally or on a per-channel basis. @@ -569,12 +572,12 @@ contract Gateway is IGateway, IInitializable { revert Unauthorized(); } - (uint256 defaultFee, uint256 registerTokenFee, uint256 sendTokenFee) = - abi.decode(data, (uint256, uint256, uint256)); + (OperatingMode defaultMode, uint256 defaultFee, uint256 registerTokenFee, uint256 sendTokenFee) = + abi.decode(data, (OperatingMode, uint256, uint256, uint256)); CoreStorage.Layout storage $ = CoreStorage.layout(); - $.mode = OperatingMode.RejectingOutboundMessages; + $.mode = defaultMode; $.defaultFee = defaultFee; // Initialize an agent & channel for BridgeHub diff --git a/contracts/src/Types.sol b/contracts/src/Types.sol index 6da4a56b5d..f38abdea44 100644 --- a/contracts/src/Types.sol +++ b/contracts/src/Types.sol @@ -45,6 +45,8 @@ struct InboundMessage { uint256 maxRefund; /// @dev The reward for message submission uint256 reward; + /// @dev ID for this message + bytes32 id; } enum OperatingMode { diff --git a/contracts/src/interfaces/IGateway.sol b/contracts/src/interfaces/IGateway.sol index 9230a29e5d..de7bad478c 100644 --- a/contracts/src/interfaces/IGateway.sol +++ b/contracts/src/interfaces/IGateway.sol @@ -11,10 +11,10 @@ interface IGateway { */ // Emitted when inbound message has been dispatched - event InboundMessageDispatched(ParaID indexed origin, uint64 nonce, bool success); + event InboundMessageDispatched(ParaID indexed origin, uint64 nonce, bytes32 indexed messageID, bool success); // Emitted when an outbound message has been accepted for delivery to a Polkadot parachain - event OutboundMessageAccepted(ParaID indexed destination, uint64 nonce, bytes payload); + event OutboundMessageAccepted(ParaID indexed destination, uint64 nonce, bytes32 indexed messageID, bytes payload); // Emitted when an agent has been created for a consensus system on Polkadot event AgentCreated(bytes32 agentID, address agent); @@ -34,14 +34,6 @@ interface IGateway { // Emitted when funds are withdrawn from an agent event AgentFundsWithdrawn(bytes32 indexed agentID, address indexed recipient, uint256 amount); - // Emitted when the fees updated - event TokenTransferFeesChanged(uint256 register, uint256 send); - /// @dev Emitted once the funds are locked and a message is successfully queued. - event TokenSent( - address indexed token, address indexed sender, ParaID destinationChain, bytes destinationAddress, uint128 amount - ); - event TokenRegistrationSent(address token); - /** * Getters */ @@ -67,6 +59,19 @@ interface IGateway { /** * Token Transfers */ + + // @dev Emitted when the fees updated + event TokenTransferFeesChanged(uint256 register, uint256 send); + + /// @dev Emitted once the funds are locked and an outbound message is successfully queued. + event TokenSent( + address indexed token, address indexed sender, ParaID destinationChain, bytes destinationAddress, uint128 amount + ); + + /// @dev Emitted when a command is sent to register a new wrapped token on AssetHub + event TokenRegistrationSent(address token); + + // @dev Fees in Ether for registering and sending tokens respectively function tokenTransferFees() external view returns (uint256, uint256); /// @dev Send a message to the AssetHub parachain to register a new fungible asset diff --git a/contracts/test/Gateway.t.sol b/contracts/test/Gateway.t.sol index 2b1bcb573b..c53dc88bfe 100644 --- a/contracts/test/Gateway.t.sol +++ b/contracts/test/Gateway.t.sol @@ -28,20 +28,6 @@ import {WETH9} from "canonical-weth/WETH9.sol"; import "./mocks/GatewayUpgradeMock.sol"; contract GatewayTest is Test { - event InboundMessageDispatched(ParaID indexed origin, uint64 nonce, bool result); - event OutboundMessageAccepted(ParaID indexed dest, uint64 nonce, bytes payload); - event NativeTokensUnlocked(address token, address recipient, uint256 amount); - event TokenRegistrationSent(address token); - event TokenSent( - address indexed sender, address indexed token, ParaID destinationChain, bytes destinationAddress, uint128 amount - ); - event AgentCreated(bytes32 agentID, address agent); - event ChannelCreated(ParaID indexed paraID); - event ChannelUpdated(ParaID indexed paraID); - - event Upgraded(address indexed implementation); - event Initialized(uint256 d0, uint256 d1); - ParaID public bridgeHubParaID = ParaID.wrap(1001); bytes32 public bridgeHubAgentID = keccak256("1001"); address public bridgeHubAgent; @@ -66,6 +52,7 @@ contract GatewayTest is Test { uint256 public maxDispatchGas = 500_000; uint256 public maxRefund = 1 ether; uint256 public reward = 1 ether; + bytes32 public messageID = keccak256("cabbage"); uint256 public baseFee = 1 ether; uint256 public registerNativeTokenFee = 1 ether; @@ -84,6 +71,7 @@ contract GatewayTest is Test { gateway = new GatewayProxy( address(gatewayLogic), abi.encode( + OperatingMode.Normal, baseFee, registerNativeTokenFee, sendNativeTokenFee @@ -156,11 +144,11 @@ contract GatewayTest is Test { // Expect the gateway to emit `InboundMessageDispatched` vm.expectEmit(true, false, false, false); - emit IGateway.InboundMessageDispatched(bridgeHubParaID, 1, true); + emit IGateway.InboundMessageDispatched(bridgeHubParaID, 1, messageID, true); hoax(relayer, 1 ether); IGateway(address(gateway)).submitInbound( - InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward), + InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward, messageID), proof, makeMockProof() ); @@ -173,7 +161,7 @@ contract GatewayTest is Test { hoax(relayer, 1 ether); IGateway(address(gateway)).submitInbound( - InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward), + InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward, messageID), proof, makeMockProof() ); @@ -182,7 +170,7 @@ contract GatewayTest is Test { vm.expectRevert(Gateway.InvalidNonce.selector); hoax(relayer, 1 ether); IGateway(address(gateway)).submitInbound( - InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward), + InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward, messageID), proof, makeMockProof() ); @@ -194,7 +182,9 @@ contract GatewayTest is Test { vm.expectRevert(Gateway.ChannelDoesNotExist.selector); hoax(relayer); IGateway(address(gateway)).submitInbound( - InboundMessage(ParaID.wrap(42), 1, command, "", maxDispatchGas, maxRefund, reward), proof, makeMockProof() + InboundMessage(ParaID.wrap(42), 1, command, "", maxDispatchGas, maxRefund, reward, messageID), + proof, + makeMockProof() ); } @@ -208,7 +198,7 @@ contract GatewayTest is Test { hoax(relayer, 1 ether); IGateway(address(gateway)).submitInbound( - InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward), + InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward, messageID), proof, makeMockProof() ); @@ -231,7 +221,7 @@ contract GatewayTest is Test { uint256 startGas = gasleft(); IGateway(address(gateway)).submitInbound( - InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward), + InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward, messageID), proof, makeMockProof() ); @@ -257,7 +247,7 @@ contract GatewayTest is Test { hoax(relayer, 1 ether); IGateway(address(gateway)).submitInbound( - InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward), + InboundMessage(bridgeHubParaID, 1, command, params, maxDispatchGas, maxRefund, reward, messageID), proof, makeMockProof() ); @@ -532,10 +522,10 @@ contract GatewayTest is Test { function testRegisterToken() public { vm.expectEmit(false, false, false, true); - emit TokenRegistrationSent(address(token)); + emit IGateway.TokenRegistrationSent(address(token)); vm.expectEmit(true, false, false, false); - emit IGateway.OutboundMessageAccepted(assetHubParaID, 1, SubstrateTypes.RegisterToken(address(token))); + emit IGateway.OutboundMessageAccepted(assetHubParaID, 1, messageID, bytes("")); IGateway(address(gateway)).registerToken{value: 2 ether}(address(token)); } @@ -545,7 +535,7 @@ contract GatewayTest is Test { emit IGateway.TokenRegistrationSent(address(token)); vm.expectEmit(true, false, false, false); - emit IGateway.OutboundMessageAccepted(assetHubParaID, 1, SubstrateTypes.RegisterToken(address(token))); + emit IGateway.OutboundMessageAccepted(assetHubParaID, 1, messageID, bytes("")); uint256 totalFee = baseFee + registerNativeTokenFee; uint256 balanceBefore = address(this).balance; @@ -571,9 +561,7 @@ contract GatewayTest is Test { // Expect the gateway to emit `OutboundMessageAccepted` vm.expectEmit(true, false, false, false); - emit IGateway.OutboundMessageAccepted( - assetHubParaID, 1, SubstrateTypes.SendToken(address(token), destPara, destAddress, 1) - ); + emit IGateway.OutboundMessageAccepted(assetHubParaID, 1, messageID, bytes("")); IGateway(address(gateway)).sendToken{value: 2 ether}(address(token), destPara, destAddress, 1); } @@ -591,9 +579,7 @@ contract GatewayTest is Test { // Expect the gateway to emit `OutboundMessageAccepted` vm.expectEmit(true, false, false, false); - emit IGateway.OutboundMessageAccepted( - assetHubParaID, 1, SubstrateTypes.SendToken(address(token), destAddress, 1) - ); + emit IGateway.OutboundMessageAccepted(assetHubParaID, 1, messageID, bytes("")); IGateway(address(gateway)).sendToken{value: 2 ether}(address(token), destPara, destAddress, 1); } @@ -611,7 +597,7 @@ contract GatewayTest is Test { // Expect the gateway to emit `OutboundMessageAccepted` vm.expectEmit(true, false, false, false); - emit IGateway.OutboundMessageAccepted(assetHubParaID, 1, hex""); + emit IGateway.OutboundMessageAccepted(assetHubParaID, 1, messageID, bytes("")); IGateway(address(gateway)).sendToken{value: 2 ether}(address(token), destPara, destAddress, 1); } @@ -743,10 +729,10 @@ contract GatewayTest is Test { vm.expectEmit(true, false, false, true); // Expect dispatch result as false for `OutOfGas` - emit IGateway.InboundMessageDispatched(bridgeHubParaID, 1, false); + emit IGateway.InboundMessageDispatched(bridgeHubParaID, 1, messageID, false); // maxDispatchGas as 1 for `create_agent` is definitely not enough IGateway(address(gateway)).submitInbound( - InboundMessage(bridgeHubParaID, 1, command, params, 1, maxRefund, reward), proof, makeMockProof() + InboundMessage(bridgeHubParaID, 1, command, params, 1, maxRefund, reward, messageID), proof, makeMockProof() ); } diff --git a/parachain/pallets/control/src/lib.rs b/parachain/pallets/control/src/lib.rs index 57a62d46f9..9e632b03c3 100644 --- a/parachain/pallets/control/src/lib.rs +++ b/parachain/pallets/control/src/lib.rs @@ -459,7 +459,7 @@ pub mod pallet { impl Pallet { /// Send `command` to the Gateway on the channel identified by `origin`. fn send(origin: ParaId, command: Command, pays_fee: PaysFee) -> DispatchResult { - let message = Message { origin, command }; + let message = Message { id: None, origin, command }; let (ticket, fee) = T::OutboundQueue::validate(&message).map_err(|err| Error::::Send(err))?; diff --git a/parachain/pallets/control/src/tests.rs b/parachain/pallets/control/src/tests.rs index 92548f9ee9..10be9b3a65 100644 --- a/parachain/pallets/control/src/tests.rs +++ b/parachain/pallets/control/src/tests.rs @@ -520,8 +520,11 @@ fn charge_fee_for_create_agent() { assert_ok!(EthereumControl::create_agent(origin.clone())); // assert sovereign_balance decreased by (fee.base_fee + fee.delivery_fee) - let message = - Message { origin: para_id.into(), command: Command::CreateAgent { agent_id } }; + let message = Message { + id: None, + origin: para_id.into(), + command: Command::CreateAgent { agent_id }, + }; let (_, fee) = OutboundQueue::validate(&message).unwrap(); let sovereign_balance = Balances::balance(&sovereign_account); assert_eq!(sovereign_balance + fee.local + fee.remote, InitialFunding::get()); @@ -555,6 +558,7 @@ fn charge_fee_for_transfer_native_from_agent() { let sovereign_balance_before = Balances::balance(&sovereign_account); assert_ok!(EthereumControl::transfer_native_from_agent(origin.clone(), recipient, amount)); let message = Message { + id: None, origin: para_id.into(), command: Command::TransferNativeFromAgent { agent_id, recipient, amount }, }; diff --git a/parachain/pallets/ethereum-beacon-client/Cargo.toml b/parachain/pallets/ethereum-beacon-client/Cargo.toml index e3a20829cb..f4318a293c 100644 --- a/parachain/pallets/ethereum-beacon-client/Cargo.toml +++ b/parachain/pallets/ethereum-beacon-client/Cargo.toml @@ -18,7 +18,7 @@ scale-info = { version = "2.9.0", default-features = false, features = [ "derive ssz_rs = { version="0.9.0", default-features = false } ssz_rs_derive = { version="0.9.0", default-features = false } byte-slice-cast = { version = "1.2.1", default-features = false } -rlp = { version = "0.5", default-features = false } +rlp = { version = "0.5.2", default-features = false } hex-literal = { version = "0.4.1", optional = true } log = { version = "0.4.20", default-features = false } diff --git a/parachain/pallets/ethereum-beacon-client/src/impls.rs b/parachain/pallets/ethereum-beacon-client/src/impls.rs index 571c0f9f7c..35b2e287de 100644 --- a/parachain/pallets/ethereum-beacon-client/src/impls.rs +++ b/parachain/pallets/ethereum-beacon-client/src/impls.rs @@ -2,23 +2,23 @@ // SPDX-FileCopyrightText: 2023 Snowfork use super::*; -use snowbridge_ethereum::{Log, Receipt}; -use sp_runtime::DispatchError; +use snowbridge_core::inbound::VerificationError::{self, *}; +use snowbridge_ethereum::Receipt; impl Verifier for Pallet { /// Verify a message by verifying the existence of the corresponding /// Ethereum log in a block. Returns the log if successful. The execution header containing /// the log should be in the beacon client storage, meaning it has been verified and is an /// ancestor of a finalized beacon block. - fn verify(message: &Message) -> Result { + fn verify(message: &Message) -> Result<(), VerificationError> { log::info!( target: "ethereum-beacon-client", "💫 Verifying message with block hash {}", message.proof.block_hash, ); - let header = >::get(message.proof.block_hash) - .ok_or(Error::::MissingHeader)?; + let header = + >::get(message.proof.block_hash).ok_or(HeaderNotFound)?; let receipt = match Self::verify_receipt_inclusion(header.receipts_root, &message.proof) { Ok(receipt) => receipt, @@ -48,7 +48,7 @@ impl Verifier for Pallet { message.proof.block_hash, err ); - return Err(Error::::DecodeFailed.into()) + return Err(InvalidLog) }, }; @@ -58,7 +58,7 @@ impl Verifier for Pallet { "💫 Event log not found in receipt for transaction at index {} in block {}", message.proof.tx_index, message.proof.block_hash, ); - return Err(Error::::InvalidProof.into()) + return Err(LogNotFound) } log::info!( @@ -67,7 +67,7 @@ impl Verifier for Pallet { message.proof.block_hash, ); - Ok(log) + Ok(()) } } @@ -77,9 +77,8 @@ impl Pallet { pub fn verify_receipt_inclusion( receipts_root: H256, proof: &Proof, - ) -> Result { - let result = - verify_receipt_proof(receipts_root, &proof.data.1).ok_or(Error::::InvalidProof)?; + ) -> Result { + let result = verify_receipt_proof(receipts_root, &proof.data.1).ok_or(InvalidProof)?; match result { Ok(receipt) => Ok(receipt), @@ -89,7 +88,7 @@ impl Pallet { "💫 Failed to decode transaction receipt: {}", err ); - Err(Error::::InvalidProof.into()) + Err(InvalidProof) }, } } diff --git a/parachain/pallets/ethereum-beacon-client/src/lib.rs b/parachain/pallets/ethereum-beacon-client/src/lib.rs index 9c0d435624..0f3cf025b5 100644 --- a/parachain/pallets/ethereum-beacon-client/src/lib.rs +++ b/parachain/pallets/ethereum-beacon-client/src/lib.rs @@ -134,9 +134,6 @@ pub mod pallet { InvalidAncestryMerkleProof, InvalidBlockRootsRootMerkleProof, HeaderNotFinalized, - MissingHeader, - InvalidProof, - DecodeFailed, BlockBodyHashTreeRootFailed, HeaderHashTreeRootFailed, SyncCommitteeHashTreeRootFailed, diff --git a/parachain/pallets/ethereum-beacon-client/src/tests.rs b/parachain/pallets/ethereum-beacon-client/src/tests.rs index 32cf0d485d..95a7c38229 100644 --- a/parachain/pallets/ethereum-beacon-client/src/tests.rs +++ b/parachain/pallets/ethereum-beacon-client/src/tests.rs @@ -16,7 +16,10 @@ use primitives::{ CompactExecutionHeader, ExecutionHeaderState, Fork, ForkVersions, NextSyncCommitteeUpdate, }; use rand::{thread_rng, Rng}; -use snowbridge_core::{inbound::Verifier, RingBufferMap}; +use snowbridge_core::{ + inbound::{VerificationError, Verifier}, + RingBufferMap, +}; use sp_core::H256; use sp_runtime::DispatchError; @@ -922,7 +925,7 @@ fn verify_message_missing_header() { let message = get_message_verification_payload(); new_tester().execute_with(|| { - assert_err!(EthereumBeaconClient::verify(&message), Error::::MissingHeader); + assert_err!(EthereumBeaconClient::verify(&message), VerificationError::HeaderNotFound); }); } @@ -935,7 +938,7 @@ fn verify_message_invalid_proof() { new_tester().execute_with(|| { >::insert(block_hash, header); - assert_err!(EthereumBeaconClient::verify(&message), Error::::InvalidProof); + assert_err!(EthereumBeaconClient::verify(&message), VerificationError::InvalidProof); }); } @@ -948,7 +951,7 @@ fn verify_message_invalid_receipts_root() { new_tester().execute_with(|| { >::insert(block_hash, header); - assert_err!(EthereumBeaconClient::verify(&message), Error::::InvalidProof); + assert_err!(EthereumBeaconClient::verify(&message), VerificationError::InvalidProof); }); } @@ -961,7 +964,7 @@ fn verify_message_invalid_message_data() { new_tester().execute_with(|| { >::insert(block_hash, header); - assert_err!(EthereumBeaconClient::verify(&message), Error::::DecodeFailed); + assert_err!(EthereumBeaconClient::verify(&message), VerificationError::InvalidLog); }); } @@ -974,7 +977,7 @@ fn verify_message_receipt_does_not_contain_log() { new_tester().execute_with(|| { >::insert(block_hash, header); - assert_err!(EthereumBeaconClient::verify(&message), Error::::InvalidProof); + assert_err!(EthereumBeaconClient::verify(&message), VerificationError::LogNotFound); }); } diff --git a/parachain/pallets/inbound-queue/Cargo.toml b/parachain/pallets/inbound-queue/Cargo.toml index 0f3da50660..688d392499 100644 --- a/parachain/pallets/inbound-queue/Cargo.toml +++ b/parachain/pallets/inbound-queue/Cargo.toml @@ -14,7 +14,11 @@ serde = { version = "1.0.188", optional = true } codec = { version = "3.6.1", package = "parity-scale-codec", default-features = false, features = [ "derive" ] } scale-info = { version = "2.9.0", default-features = false, features = [ "derive" ] } hex-literal = { version = "0.4.1", optional = true } -rlp = { version = "0.5", default-features = false, optional = true } +log = { version = "0.4.20", default-features = false } +alloy-primitives = { version = "0.4.2", default-features = false, features = ["rlp"] } +alloy-sol-types = { version = "0.4.2", default-features = false } +alloy-rlp = { version = "0.3.3", default-features = false, features = ["derive"] } +num-traits = { version = "0.2.16", default-features = false } frame-benchmarking = { path = "../../../polkadot-sdk/substrate/frame/benchmarking", default-features = false, optional = true } frame-support = { path = "../../../polkadot-sdk/substrate/frame/support", default-features = false } @@ -31,7 +35,6 @@ xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot-sdk/p snowbridge-core = { path = "../../primitives/core", default-features = false } snowbridge-ethereum = { path = "../../primitives/ethereum", default-features = false } snowbridge-router-primitives = { path = "../../primitives/router", default-features = false } -ethabi = { git = "https://github.com/Snowfork/ethabi-decode.git", package = "ethabi-decode", branch = "master", default-features = false } snowbridge-beacon-primitives = { path = "../../primitives/beacon", default-features = false, optional = true } [dev-dependencies] @@ -39,16 +42,18 @@ frame-benchmarking = { path = "../../../polkadot-sdk/substrate/frame/benchmarkin sp-keyring = { path = "../../../polkadot-sdk/substrate/primitives/keyring" } snowbridge-beacon-primitives = { path = "../../primitives/beacon" } snowbridge-ethereum-beacon-client = { path = "../../pallets/ethereum-beacon-client" } - hex-literal = { version = "0.4.1" } -rlp = { version = "0.5" } [features] default = ["std"] std = [ "serde", + "log/std", "codec/std", "scale-info/std", + "alloy-primitives/std", + "alloy-sol-types/std", + "alloy-rlp/std", "frame-support/std", "frame-system/std", "pallet-balances/std", @@ -57,10 +62,10 @@ std = [ "sp-runtime/std", "sp-std/std", "sp-io/std", + "num-traits/std", "snowbridge-core/std", "snowbridge-ethereum/std", "snowbridge-router-primitives/std", - "ethabi/std", "xcm/std", "xcm-builder/std", ] @@ -70,7 +75,6 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "hex-literal", - "rlp", "snowbridge-beacon-primitives", "xcm-builder/runtime-benchmarks", ] diff --git a/parachain/pallets/inbound-queue/src/benchmarking/fixtures.rs b/parachain/pallets/inbound-queue/src/benchmarking/fixtures.rs index ae1e00fb2a..11da799df8 100644 --- a/parachain/pallets/inbound-queue/src/benchmarking/fixtures.rs +++ b/parachain/pallets/inbound-queue/src/benchmarking/fixtures.rs @@ -17,7 +17,7 @@ pub fn make_create_message() -> InboundQueueTest { receipts_root: hex!("0115ab735d37c5e4cdb0374d8bb547c6dd6ccaa996d996d1eabc5399a719219e").into(), }, message: Message { - data: hex!("f8db94eda338e4dc46038493b885327842fd3e301cab39f842a0d56f1b8dfd3ba41f19c499ceec5f9546f61befa5f10398a75d7dba53a219fecea000000000000000000000000000000000000000000000000000000000000003e8b88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e000f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000").to_vec(), + data: hex!("f8fc94eda338e4dc46038493b885327842fd3e301cab39f863a05066fbba677e15936860e04088ca4cad3acd4c19706962196a5346f1457f7169a000000000000000000000000000000000000000000000000000000000000003e8a0afad3c9777134532ae230b4fad334eef2e0dacbb965920412a7eaa59b07d640fb88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e000f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000").to_vec(), proof: Proof { block_hash: hex!("5f465744c166e9d10dc0031942a59ff82b640053253da517a1b576afdadb0363").into(), tx_index: 0, diff --git a/parachain/pallets/inbound-queue/src/envelope.rs b/parachain/pallets/inbound-queue/src/envelope.rs index 3ce9dfd71d..e12ecf6c0f 100644 --- a/parachain/pallets/inbound-queue/src/envelope.rs +++ b/parachain/pallets/inbound-queue/src/envelope.rs @@ -1,22 +1,24 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: 2023 Snowfork -use ethabi::{Event, Param, ParamKind, Token}; use snowbridge_core::ParaId; -use snowbridge_ethereum::{log::Log, H160}; -use sp_core::RuntimeDebug; +use sp_core::{RuntimeDebug, H160, H256}; use sp_std::{convert::TryFrom, prelude::*}; -// Used to decode an OutboundMessageAccepted log into an [`Envelope`]. -static EVENT_ABI: &Event = &Event { - signature: "OutboundMessageAccepted(uint256,uint64,bytes)", - inputs: &[ - Param { kind: ParamKind::Uint(256), indexed: true }, - Param { kind: ParamKind::Uint(64), indexed: false }, - Param { kind: ParamKind::Bytes, indexed: false }, - ], - anonymous: false, -}; +use alloy_primitives::{Address, Bytes, B256}; +use alloy_rlp::RlpDecodable; +use alloy_sol_types::{sol, SolEvent}; + +#[derive(RlpDecodable, RuntimeDebug)] +pub struct Log { + pub address: Address, + pub topics: Vec, + pub data: Bytes, +} + +sol! { + event OutboundMessageAccepted(uint256 indexed destination, uint64 nonce, bytes32 indexed messageID, bytes payload); +} /// An inbound message that has had its outer envelope decoded. #[derive(Clone, RuntimeDebug)] @@ -27,36 +29,28 @@ pub struct Envelope { pub dest: ParaId, /// A nonce for enforcing replay protection and ordering. pub nonce: u64, + /// An id for tracing the message on its route (has no role in bridge consensus) + pub message_id: H256, /// The inner payload generated from the source application. pub payload: Vec, } -#[derive(Copy, Clone, PartialEq, Eq, RuntimeDebug)] +#[derive(Copy, Clone, RuntimeDebug)] pub struct EnvelopeDecodeError; impl TryFrom for Envelope { type Error = EnvelopeDecodeError; fn try_from(log: Log) -> Result { - let tokens = EVENT_ABI.decode(log.topics, log.data).map_err(|_| EnvelopeDecodeError)?; - - let mut iter = tokens.into_iter(); - - let dest = match iter.next().ok_or(EnvelopeDecodeError)? { - Token::Uint(dest) => dest.low_u32().into(), - _ => return Err(EnvelopeDecodeError), - }; - - let nonce = match iter.next().ok_or(EnvelopeDecodeError)? { - Token::Uint(nonce) => nonce.low_u64(), - _ => return Err(EnvelopeDecodeError), - }; - - let payload = match iter.next().ok_or(EnvelopeDecodeError)? { - Token::Bytes(payload) => payload, - _ => return Err(EnvelopeDecodeError), - }; - - Ok(Self { gateway: log.address, dest, nonce, payload }) + let event = OutboundMessageAccepted::decode_log(log.topics, &log.data, true) + .map_err(|_| EnvelopeDecodeError)?; + + Ok(Self { + gateway: H160::from(log.address.as_ref()), + dest: event.destination.saturating_to::().into(), + nonce: event.nonce, + message_id: H256::from(event.messageID.as_ref()), + payload: event.payload, + }) } } diff --git a/parachain/pallets/inbound-queue/src/lib.rs b/parachain/pallets/inbound-queue/src/lib.rs index d937efe8b7..6cdef8eb29 100644 --- a/parachain/pallets/inbound-queue/src/lib.rs +++ b/parachain/pallets/inbound-queue/src/lib.rs @@ -30,42 +30,42 @@ mod benchmarking; #[cfg(feature = "runtime-benchmarks")] use snowbridge_beacon_primitives::CompactExecutionHeader; -#[cfg(feature = "runtime-benchmarks")] -use snowbridge_ethereum::H256; pub mod weights; #[cfg(test)] mod test; +use alloy_rlp::Decodable as RlpDecodable; use codec::{Decode, DecodeAll, Encode}; +use envelope::{Envelope, Log}; use frame_support::{ - traits::fungible::{Inspect, Mutate}, + traits::{ + fungible::{Inspect, Mutate}, + tokens::Preservation, + }, + weights::WeightToFee, PalletError, }; use frame_system::ensure_signed; use scale_info::TypeInfo; -use sp_core::H160; -use sp_std::convert::TryFrom; +use sp_core::{H160, H256}; +use sp_std::{convert::TryFrom, vec}; use xcm::prelude::{ - send_xcm, Junction::*, Junctions::*, MultiLocation, SendError as XcmpSendError, SendXcm, Xcm, - XcmHash, + send_xcm, Instruction::SetTopic, Junction::*, Junctions::*, MultiLocation, + SendError as XcmpSendError, SendXcm, Xcm, XcmHash, }; -use envelope::Envelope; use snowbridge_core::{ - inbound::{Message, Verifier}, + inbound::{Message, VerificationError, Verifier}, sibling_sovereign_account, BasicOperatingMode, ParaId, }; use snowbridge_router_primitives::{ inbound, inbound::{ConvertMessage, ConvertMessageError}, }; - use sp_runtime::traits::Saturating; -use frame_support::{traits::tokens::Preservation, weights::WeightToFee}; - pub use weights::WeightInfo; type BalanceOf = @@ -136,8 +136,8 @@ pub mod pallet { dest: ParaId, /// The message nonce nonce: u64, - /// XCM hash - xcm_hash: XcmHash, + /// ID of the XCM message which was forwarded to the final destination parachain + message_id: [u8; 32], }, /// Set OperatingMode OperatingModeChanged { mode: BasicOperatingMode }, @@ -159,6 +159,8 @@ pub mod pallet { InvalidAccountConversion, /// Pallet is halted Halted, + /// Message verification error, + Verification(VerificationError), /// XCMP send failure Send(SendError), /// Message conversion error @@ -211,7 +213,10 @@ pub mod pallet { ensure!(!Self::operating_mode().is_halted(), Error::::Halted); // submit message to verifier for verification - let log = T::Verifier::verify(&message)?; + T::Verifier::verify(&message).map_err(|e| Error::::Verification(e))?; + + let log = Log::decode(&mut message.data.as_slice()) + .map_err(|_| Error::::InvalidEnvelope)?; // Decode log into an Envelope let envelope = Envelope::try_from(log).map_err(|_| Error::::InvalidEnvelope)?; @@ -245,17 +250,17 @@ pub mod pallet { // Decode message into XCM let xcm = match inbound::VersionedMessage::decode_all(&mut envelope.payload.as_ref()) { - Ok(message) => Self::do_convert(message)?, + Ok(message) => Self::do_convert(envelope.message_id, message)?, Err(_) => return Err(Error::::InvalidPayload.into()), }; // Attempt to send XCM to a dest parachain - let xcm_hash = Self::send_xcm(xcm, envelope.dest)?; + let message_id = Self::send_xcm(xcm, envelope.dest)?; Self::deposit_event(Event::MessageReceived { dest: envelope.dest, nonce: envelope.nonce, - xcm_hash, + message_id, }); Ok(()) @@ -276,9 +281,14 @@ pub mod pallet { } impl Pallet { - pub fn do_convert(message: inbound::VersionedMessage) -> Result, Error> { - let xcm = + pub fn do_convert( + message_id: H256, + message: inbound::VersionedMessage, + ) -> Result, Error> { + let mut xcm = T::MessageConverter::convert(message).map_err(|e| Error::::ConvertMessage(e))?; + // Append the message id as an XCM topic + xcm.inner_mut().extend(vec![SetTopic(message_id.into())]); Ok(xcm) } diff --git a/parachain/pallets/inbound-queue/src/test.rs b/parachain/pallets/inbound-queue/src/test.rs index 59db735ffa..e7b3224b65 100644 --- a/parachain/pallets/inbound-queue/src/test.rs +++ b/parachain/pallets/inbound-queue/src/test.rs @@ -10,10 +10,9 @@ use frame_support::{ use hex_literal::hex; use snowbridge_beacon_primitives::{Fork, ForkVersions}; use snowbridge_core::{ - inbound::{Message, Proof}, + inbound::{Message, Proof, VerificationError}, ParaId, }; -use snowbridge_ethereum::Log; use snowbridge_router_primitives::inbound::MessageToXcm; use sp_core::{H160, H256}; use sp_keyring::AccountKeyring as Keyring; @@ -24,7 +23,7 @@ use sp_runtime::{ use sp_std::convert::From; use xcm::v3::{prelude::*, MultiAssets, SendXcm}; -use crate::{self as inbound_queue, envelope::Envelope, Error, Event as InboundQueueEvent}; +use crate::{self as inbound_queue, Error, Event as InboundQueueEvent}; type Block = frame_system::mocking::MockBlock; @@ -121,9 +120,8 @@ impl snowbridge_ethereum_beacon_client::Config for Test { pub struct MockVerifier; impl Verifier for MockVerifier { - fn verify(message: &Message) -> Result { - let log: Log = rlp::decode(&message.data).unwrap(); - Ok(log) + fn verify(_: &Message) -> Result<(), VerificationError> { + Ok(()) } } @@ -221,53 +219,30 @@ pub fn new_tester() -> sp_io::TestExternalities { ext } -fn parse_dest(message: Message) -> ParaId { - let log = MockVerifier::verify(&message) - .map_err(|err| { - println!("mock verify: {:?}", err); - err - }) - .unwrap(); - let envelope = Envelope::try_from(log) - .map_err(|err| { - println!("envelope: {:?}", err); - err - }) - .unwrap(); - envelope.dest -} - // dest para is 1000 -const OUTBOUND_QUEUE_EVENT_LOG: [u8; 221] = hex!( +const OUTBOUND_QUEUE_EVENT_LOG: [u8; 254] = hex!( " - f8db94eda338e4dc46038493b885327842fd3e301cab39f842a0d56f1b8dfd3ba41f19c499ceec5f9546f61befa5f10398a75d7dba53a219fecea000000000000000000000000000000000000000000000000000000000000003e8b88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e000f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000 + f8fc94eda338e4dc46038493b885327842fd3e301cab39f863a05066fbba677e15936860e04088ca4cad3acd4c19706962196a5346f1457f7169a000000000000000000000000000000000000000000000000000000000000003e8a0afad3c9777134532ae230b4fad334eef2e0dacbb965920412a7eaa59b07d640fb88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e000f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000 " ); // dest para is 1001 -const OUTBOUND_QUEUE_EVENT_LOG_INVALID_DEST: [u8; 221] = hex!( +const OUTBOUND_QUEUE_EVENT_LOG_INVALID_DEST: [u8; 254] = hex!( " - f8db94eda338e4dc46038493b885327842fd3e301cab39f842a0d56f1b8dfd3ba41f19c499ceec5f9546f61befa5f10398a75d7dba53a219fecea000000000000000000000000000000000000000000000000000000000000003e9b88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e000f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000 + f8fc94eda338e4dc46038493b885327842fd3e301cab39f863a05066fbba677e15936860e04088ca4cad3acd4c19706962196a5346f1457f7169a000000000000000000000000000000000000000000000000000000000000003e9a0afad3c9777134532ae230b4fad334eef2e0dacbb965920412a7eaa59b07d640fb88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e000f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000 " ); -// gateway in message does not match configured gateway in runtime -const BAD_OUTBOUND_QUEUE_EVENT_LOG: [u8; 221] = hex!( +// gateway in message does not match configured gateway in runtimeå +const BAD_OUTBOUND_QUEUE_EVENT_LOG: [u8; 254] = hex!( " - f8db940000000000000000000000000000000000000000f842a0d56f1b8dfd3ba41f19c499ceec5f9546f61befa5f10398a75d7dba53a219fecea000000000000000000000000000000000000000000000000000000000000003e8b88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e000f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000 - " -); - -// invalid payload with unsupported version -const BAD_OUTBOUND_QUEUE_LOG_UNSUPPORTED_VERSION: [u8; 221] = hex!( - " - f8db94eda338e4dc46038493b885327842fd3e301cab39f842a0d56f1b8dfd3ba41f19c499ceec5f9546f61befa5f10398a75d7dba53a219fecea000000000000000000000000000000000000000000000000000000000000003e8b88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e010f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000 + f8fc940000000000000000000000000000000000000000f863a05066fbba677e15936860e04088ca4cad3acd4c19706962196a5346f1457f7169a000000000000000000000000000000000000000000000000000000000000003e8a0afad3c9777134532ae230b4fad334eef2e0dacbb965920412a7eaa59b07d640fb88000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001e000f000000000000000087d1f7fdfee7f651fabc8bfcb6e086c278b77a7d0000 " ); const XCM_HASH: [u8; 32] = [ - 186, 27, 67, 39, 117, 164, 224, 191, 202, 232, 218, 108, 34, 65, 36, 199, 247, 19, 150, 198, - 182, 180, 39, 112, 150, 64, 84, 15, 174, 213, 183, 207, + 201, 101, 244, 67, 153, 61, 253, 203, 92, 23, 197, 172, 112, 209, 53, 248, 118, 25, 253, 110, + 168, 201, 60, 156, 227, 26, 55, 145, 5, 177, 78, 189, ]; const ASSET_HUB_PARAID: u32 = 1000u32; const TEMPLATE_PARAID: u32 = 1001u32; @@ -296,7 +271,7 @@ fn test_submit_happy_path() { expect_events(vec![InboundQueueEvent::MessageReceived { dest: ASSET_HUB_PARAID.into(), nonce: 1, - xcm_hash: XCM_HASH, + message_id: XCM_HASH, } .into()]); }); @@ -376,8 +351,7 @@ fn test_submit_with_invalid_nonce() { }; assert_ok!(InboundQueue::submit(origin.clone(), message.clone())); - let event_dest = parse_dest(message.clone()); - let nonce: u64 = >::get(event_dest); + let nonce: u64 = >::get(ParaId::from(1000)); assert_eq!(nonce, 1); // Submit the same again @@ -414,62 +388,6 @@ fn test_submit_no_funds_to_reward_relayers() { }); } -#[test] -fn test_convert_xcm_message() { - new_tester().execute_with(|| { - // Submit message - let message = Message { - data: OUTBOUND_QUEUE_EVENT_LOG.into(), - proof: Proof { - block_hash: Default::default(), - tx_index: Default::default(), - data: Default::default(), - }, - }; - let log = ::Verifier::verify(&message).unwrap(); - - // Decode log into an Envelope - let envelope = Envelope::try_from(log).map_err(|_| Error::::InvalidEnvelope).unwrap(); - - let message = - inbound::VersionedMessage::decode_all(&mut envelope.payload.as_ref()).unwrap(); - - let xcm = ::MessageConverter::convert(message).unwrap(); - - println!("xcm: {:?}", xcm); - - let hash = xcm.using_encoded(sp_io::hashing::blake2_256); - - assert_eq!(hash, XCM_HASH); - }) -} - -#[test] -fn test_submit_with_invalid_payload_unsupported_version() { - new_tester().execute_with(|| { - let relayer: AccountId = Keyring::Bob.into(); - let origin = RuntimeOrigin::signed(relayer); - - // Deposit funds into sovereign account of Asset Hub (Statemint) - let sovereign_account = sibling_sovereign_account::(ASSET_HUB_PARAID.into()); - let _ = Balances::mint_into(&sovereign_account, 10000); - - // Submit message - let message = Message { - data: BAD_OUTBOUND_QUEUE_LOG_UNSUPPORTED_VERSION.into(), - proof: Proof { - block_hash: Default::default(), - tx_index: Default::default(), - data: Default::default(), - }, - }; - assert_noop!( - InboundQueue::submit(origin.clone(), message.clone()), - Error::::InvalidPayload - ); - }); -} - #[test] fn test_set_operating_mode() { new_tester().execute_with(|| { diff --git a/parachain/pallets/outbound-queue/src/benchmarking.rs b/parachain/pallets/outbound-queue/src/benchmarking.rs index f6e8970c19..aec4db05a2 100644 --- a/parachain/pallets/outbound-queue/src/benchmarking.rs +++ b/parachain/pallets/outbound-queue/src/benchmarking.rs @@ -23,7 +23,7 @@ mod benchmarks { #[benchmark] fn do_process_message() -> Result<(), BenchmarkError> { let enqueued_message = QueuedMessage { - id: H256::zero().into(), + id: H256::zero(), origin: 1000.into(), command: Command::Upgrade { impl_address: H160::zero(), diff --git a/parachain/pallets/outbound-queue/src/lib.rs b/parachain/pallets/outbound-queue/src/lib.rs index 60a2960e0f..8c4d2f3571 100644 --- a/parachain/pallets/outbound-queue/src/lib.rs +++ b/parachain/pallets/outbound-queue/src/lib.rs @@ -173,7 +173,7 @@ pub mod pallet { pub enum Event { /// Message has been queued and will be processed in the future MessageQueued { - /// ID of the message. Usually the XCM message hash. + /// ID of the message. Usually the XCM message hash or a SetTopic. id: H256, }, /// Message will be committed at the end of current block. From now on, to track the @@ -350,30 +350,31 @@ pub mod pallet { } // Decode bytes into versioned message - let versioned_enqueued_message: VersionedQueuedMessage = + let versioned_queued_message: VersionedQueuedMessage = VersionedQueuedMessage::decode(&mut message).map_err(|_| Corrupt)?; // Convert versioned message into latest supported message version - let enqueued_message: QueuedMessage = - versioned_enqueued_message.try_into().map_err(|_| Unsupported)?; + let queued_message: QueuedMessage = + versioned_queued_message.try_into().map_err(|_| Unsupported)?; - let next_nonce = Nonce::::get(enqueued_message.origin).saturating_add(1); + let next_nonce = Nonce::::get(queued_message.origin).saturating_add(1); - let command = enqueued_message.command.index(); - let params = enqueued_message.command.abi_encode(); - let max_dispatch_gas = T::GasMeter::maximum_required(&enqueued_message.command) as u128; - let max_refund = Self::calculate_maximum_gas_refund(&enqueued_message.command); + let command = queued_message.command.index(); + let params = queued_message.command.abi_encode(); + let max_dispatch_gas = T::GasMeter::maximum_required(&queued_message.command) as u128; + let max_refund = Self::calculate_maximum_gas_refund(&queued_message.command); let reward = Self::fee_config().reward; // Construct the final committed message let message = CommittedMessage { - origin: enqueued_message.origin, + origin: queued_message.origin, nonce: next_nonce, command, params, max_dispatch_gas, max_refund, reward, + id: queued_message.id, }; // ABI-encode and hash the prepared message @@ -382,10 +383,10 @@ pub mod pallet { Messages::::append(Box::new(message)); MessageLeaves::::append(message_abi_encoded_hash); - Nonce::::set(enqueued_message.origin, next_nonce); + Nonce::::set(queued_message.origin, next_nonce); Self::deposit_event(Event::MessageAccepted { - id: enqueued_message.id, + id: queued_message.id, nonce: next_nonce, }); diff --git a/parachain/pallets/outbound-queue/src/mock.rs b/parachain/pallets/outbound-queue/src/mock.rs index 8b7d0b3f30..1bd5dbfd43 100644 --- a/parachain/pallets/outbound-queue/src/mock.rs +++ b/parachain/pallets/outbound-queue/src/mock.rs @@ -127,6 +127,7 @@ where T: Config, { Message { + id: None, origin: OwnParaIdOf::::get(), command: Command::Upgrade { impl_address: H160::zero(), @@ -142,6 +143,7 @@ where T: Config, { Message { + id: None, origin: OwnParaIdOf::::get(), command: Command::Upgrade { impl_address: H160::zero(), @@ -156,6 +158,7 @@ where pub fn mock_message(sibling_para_id: u32) -> Message { Message { + id: None, origin: sibling_para_id.into(), command: Command::AgentExecute { agent_id: Default::default(), diff --git a/parachain/pallets/outbound-queue/src/send_message_impl.rs b/parachain/pallets/outbound-queue/src/send_message_impl.rs index 22be2af9df..c60fed7e87 100644 --- a/parachain/pallets/outbound-queue/src/send_message_impl.rs +++ b/parachain/pallets/outbound-queue/src/send_message_impl.rs @@ -11,6 +11,7 @@ use frame_support::{ traits::{EnqueueMessage, Get}, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound, }; +use frame_system::unique; use snowbridge_core::outbound::{ Fee, Message, QueuedMessage, SendError, SendMessage, VersionedQueuedMessage, }; @@ -22,28 +23,35 @@ pub type MaxEnqueuedMessageSizeOf = <::MessageQueue as EnqueueMessage>::MaxMessageLen; #[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, RuntimeDebugNoBound)] -pub struct Ticket> { - pub id: H256, +pub struct Ticket +where + T: Config, +{ + pub message_id: H256, pub origin: ParaId, - pub message: BoundedVec, + pub message: BoundedVec>, } -impl SendMessage for Pallet { - type Ticket = Ticket>; +impl SendMessage for Pallet +where + T: Config, +{ + type Ticket = Ticket; type Balance = T::Balance; fn validate(message: &Message) -> Result<(Self::Ticket, Fee), SendError> { // The inner payload should not be too large let payload = message.command.abi_encode(); - // Create a message id for tracking progress in submission pipeline - let message_id: H256 = sp_io::hashing::blake2_256(&(message.encode())).into(); - ensure!( payload.len() < T::MaxMessagePayloadSize::get() as usize, SendError::MessageTooLarge ); + // Generate a unique message id unless one is provided + let message_id: H256 = + message.id.unwrap_or_else(|| unique((message.origin, &message.command)).into()); + let fee = Self::calculate_fee(&message.command); let queued_message: VersionedQueuedMessage = QueuedMessage { @@ -55,7 +63,7 @@ impl SendMessage for Pallet { // The whole message should not be too large let encoded = queued_message.encode().try_into().map_err(|_| SendError::MessageTooLarge)?; - let ticket = Ticket { id: message_id, origin: message.origin, message: encoded }; + let ticket = Ticket { message_id, origin: message.origin, message: encoded }; Ok((ticket, fee)) } @@ -80,7 +88,7 @@ impl SendMessage for Pallet { let message = ticket.message.as_bounded_slice(); T::MessageQueue::enqueue_message(message, origin); - Self::deposit_event(Event::MessageQueued { id: ticket.id }); - Ok(ticket.id) + Self::deposit_event(Event::MessageQueued { id: ticket.message_id }); + Ok(ticket.message_id) } } diff --git a/parachain/pallets/outbound-queue/src/types.rs b/parachain/pallets/outbound-queue/src/types.rs index bdfd51e942..db75a2c6b5 100644 --- a/parachain/pallets/outbound-queue/src/types.rs +++ b/parachain/pallets/outbound-queue/src/types.rs @@ -4,6 +4,7 @@ use frame_support::traits::ProcessMessage; use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_arithmetic::FixedU128; +use sp_core::H256; use sp_runtime::{traits::Zero, RuntimeDebug}; use sp_std::prelude::*; @@ -33,6 +34,8 @@ pub struct CommittedMessage { pub max_refund: u128, /// Reward in ether for delivering this message, in addition to the gas refund pub reward: u128, + /// Message ID (Used for tracing messages across route, has no role in consensus) + pub id: H256, } /// Convert message into an ABI-encoded form for delivery to the InboundQueue contract on Ethereum @@ -46,6 +49,7 @@ impl From for Token { Token::Uint(x.max_dispatch_gas.into()), Token::Uint(x.max_refund.into()), Token::Uint(x.reward.into()), + Token::FixedBytes(Vec::from(x.id.as_ref())), ]) } } diff --git a/parachain/primitives/core/src/inbound.rs b/parachain/primitives/core/src/inbound.rs index 5e7b10c25b..bc28c7e3bb 100644 --- a/parachain/primitives/core/src/inbound.rs +++ b/parachain/primitives/core/src/inbound.rs @@ -3,36 +3,43 @@ //! Types for representing inbound messages use codec::{Decode, Encode}; +use frame_support::PalletError; use scale_info::TypeInfo; -use snowbridge_ethereum::Log; use sp_core::H256; -use sp_runtime::{DispatchError, RuntimeDebug}; +use sp_runtime::RuntimeDebug; use sp_std::vec::Vec; /// A trait for verifying inbound messages from Ethereum. -/// -/// This trait should be implemented by runtime modules that wish to provide message verification -/// functionality. pub trait Verifier { - fn verify(message: &Message) -> Result; + fn verify(message: &Message) -> Result<(), VerificationError>; +} + +#[derive(Clone, Encode, Decode, RuntimeDebug, PalletError, TypeInfo)] +#[cfg_attr(feature = "std", derive(PartialEq))] +pub enum VerificationError { + /// Execution header is missing + HeaderNotFound, + /// Log was not found in the verified transaction receipt + LogNotFound, + /// Data payload does not decode into a valid Log + InvalidLog, + /// Unable to verify the transaction receipt with the provided proof + InvalidProof, } pub type MessageNonce = u64; -/// A message relayed from Ethereum. -#[derive(PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +/// A bridge message from the Gateway contract on Ethereum +#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] pub struct Message { - /// The raw RLP-encoded message data. + /// RLP-encoded event log pub data: Vec, - /// Input to the message verifier + /// Inclusion proof for a transaction receipt containing the event log pub proof: Proof, } -/// Verification input for the message verifier. -/// -/// This data type allows us to support multiple verification schemes. In the near future, -/// A light-client scheme will be added too. -#[derive(PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +/// Inclusion proof for a transaction receipt +#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] pub struct Proof { // The block hash of the block in which the receipt was included. pub block_hash: H256, diff --git a/parachain/primitives/core/src/outbound.rs b/parachain/primitives/core/src/outbound.rs index 66f0362b59..23d95818e3 100644 --- a/parachain/primitives/core/src/outbound.rs +++ b/parachain/primitives/core/src/outbound.rs @@ -4,7 +4,6 @@ pub use polkadot_parachain_primitives::primitives::Id as ParaId; use scale_info::TypeInfo; use sp_arithmetic::traits::{BaseArithmetic, Unsigned}; use sp_core::{RuntimeDebug, H256}; - pub use v1::{AgentExecuteCommand, Command, Initializer, Message, OperatingMode, QueuedMessage}; /// Enqueued outbound messages need to be versioned to prevent data corruption @@ -39,10 +38,17 @@ mod v1 { use sp_core::{RuntimeDebug, H160, H256, U256}; use sp_std::{borrow::ToOwned, vec, vec::Vec}; - /// A message which can be accepted by the [`OutboundQueue`] + /// A message which can be accepted by implementations of [`SendMessage`] #[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct Message { + /// ID for this message. One will be automatically generated if not provided. + /// + /// When this message is created from an XCM message, the ID should be extracted + /// from the `SetTopic` instruction. + /// + /// The ID plays no role in bridge consensus, and is purely meant for message tracing. + pub id: Option, /// The parachain from which the message originated pub origin: ParaId, /// The stable ID for a receiving gateway contract @@ -56,7 +62,7 @@ mod v1 { } /// A command which is executable by the Gateway contract on Ethereum - #[derive(Encode, Decode, TypeInfo, Clone, RuntimeDebug)] + #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub enum Command { /// Execute a sub-command within an agent for a consensus system in Polkadot @@ -195,7 +201,7 @@ mod v1 { /// Representation of a call to the initializer of an implementation contract. /// The initializer has the following ABI signature: `initialize(bytes)`. - #[derive(Encode, Decode, TypeInfo, PartialEq, Clone, RuntimeDebug)] + #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] pub struct Initializer { /// ABI-encoded params of type `bytes` to pass to the initializer pub params: Vec, @@ -204,7 +210,8 @@ mod v1 { } /// A Sub-command executable within an agent - #[derive(Encode, Decode, Clone, PartialEq, RuntimeDebug, TypeInfo)] + #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] + #[cfg_attr(feature = "std", derive(PartialEq))] pub enum AgentExecuteCommand { /// Transfer ERC20 tokens TransferToken { @@ -242,10 +249,10 @@ mod v1 { } /// Message which is awaiting processing in the MessageQueue pallet - #[derive(Encode, Decode, Clone, RuntimeDebug, TypeInfo)] + #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] #[cfg_attr(feature = "std", derive(PartialEq))] pub struct QueuedMessage { - /// Message ID (usually hash of message) + /// Message ID pub id: H256, /// ID of source parachain pub origin: ParaId, @@ -298,6 +305,10 @@ pub trait SendMessage { fn deliver(ticket: Self::Ticket) -> Result; } +pub trait Ticket: Encode + Decode + Clone { + fn message_id(&self) -> H256; +} + /// Reasons why sending to Ethereum could not be initiated #[derive(Copy, Clone, Encode, Decode, PartialEq, Eq, RuntimeDebug, PalletError, TypeInfo)] pub enum SendError { diff --git a/parachain/primitives/ethereum/Cargo.toml b/parachain/primitives/ethereum/Cargo.toml index 7ff906b19a..832a7bffe0 100644 --- a/parachain/primitives/ethereum/Cargo.toml +++ b/parachain/primitives/ethereum/Cargo.toml @@ -14,8 +14,7 @@ ethereum-types = { version = "0.14.1", default-features = false, features = [ "c hex = { package = "rustc-hex", version = "2.1.0", default-features = false } hex-literal = { version = "0.4.1", default-features = false } parity-bytes = { version = "0.1.2", default-features = false } -rlp = { version = "0.5", default-features = false } -#getrandom = { version = "0.2.1", features = [ "js" ] } +rlp = { version = "0.5.2", default-features = false } sp-io = { path = "../../../polkadot-sdk/substrate/primitives/io", default-features = false } sp-std = { path = "../../../polkadot-sdk/substrate/primitives/std", default-features = false } diff --git a/parachain/primitives/router/Cargo.toml b/parachain/primitives/router/Cargo.toml index 3a93e709bf..056a33d2ca 100644 --- a/parachain/primitives/router/Cargo.toml +++ b/parachain/primitives/router/Cargo.toml @@ -47,6 +47,7 @@ std = [ "xcm-executor/std", "snowbridge-core/std", "ethabi/std", + "log/std", ] runtime-benchmarks = [ "snowbridge-core/runtime-benchmarks", diff --git a/parachain/primitives/router/src/inbound/mod.rs b/parachain/primitives/router/src/inbound/mod.rs index 54447cb01f..235ea98c71 100644 --- a/parachain/primitives/router/src/inbound/mod.rs +++ b/parachain/primitives/router/src/inbound/mod.rs @@ -83,6 +83,7 @@ pub enum ConvertMessageError { /// convert the inbound message to xcm which will be forwarded to the destination chain pub trait ConvertMessage { + /// Converts a versioned message into an XCM message and an optional topicID fn convert(message: VersionedMessage) -> Result, ConvertMessageError>; } diff --git a/parachain/primitives/router/src/outbound/mod.rs b/parachain/primitives/router/src/outbound/mod.rs index 99bb027664..80e61dae5c 100644 --- a/parachain/primitives/router/src/outbound/mod.rs +++ b/parachain/primitives/router/src/outbound/mod.rs @@ -25,7 +25,6 @@ where UniversalLocation: Get, EthereumNetwork: Get, OutboundQueue: SendMessage, - OutboundQueue::Ticket: Encode + Decode, AgentHashedDescription: ConvertLocation, { type Ticket = (Vec, XcmHash); @@ -82,7 +81,7 @@ where })?; let mut converter = XcmConverter::new(&message, &expected_network); - let agent_execute_command = converter.convert().map_err(|err|{ + let (agent_execute_command, message_id) = converter.convert().map_err(|err|{ log::error!(target: "xcm::ethereum_blob_exporter", "unroutable due to pattern matching error '{err:?}'."); SendError::Unroutable })?; @@ -98,6 +97,7 @@ where }; let outbound_message = Message { + id: Some(message_id.into()), origin: para_id.into(), command: Command::AgentExecute { agent_id, command: agent_execute_command }, }; @@ -111,7 +111,7 @@ where // convert fee to MultiAsset let fee = MultiAsset::from((MultiLocation::parent(), fee.total())).into(); - Ok(((ticket.encode(), XcmHash::default()), fee)) + Ok(((ticket.encode(), message_id), fee)) } fn deliver(blob: (Vec, XcmHash)) -> Result { @@ -121,13 +121,13 @@ where SendError::NotApplicable })?; - let message_hash = OutboundQueue::deliver(ticket).map_err(|_| { + let message_id = OutboundQueue::deliver(ticket).map_err(|_| { log::error!(target: "xcm::ethereum_blob_exporter", "OutboundQueue submit of message failed"); SendError::Transport("other transport error") })?; - log::info!(target: "xcm::ethereum_blob_exporter", "message delivered {message_hash:#?}."); - Ok(message_hash.into()) + log::info!(target: "xcm::ethereum_blob_exporter", "message delivered {message_id:#?}."); + Ok(message_id.into()) } } @@ -166,7 +166,7 @@ impl<'a, Call> XcmConverter<'a, Call> { Self { iter: message.inner().iter().peekable(), ethereum_network } } - fn convert(&mut self) -> Result { + fn convert(&mut self) -> Result<(AgentExecuteCommand, [u8; 32]), XcmConverterError> { // Get withdraw/deposit and make native tokens create message. let result = self.native_tokens_unlock_message()?; @@ -178,7 +178,9 @@ impl<'a, Call> XcmConverter<'a, Call> { Ok(result) } - fn native_tokens_unlock_message(&mut self) -> Result { + fn native_tokens_unlock_message( + &mut self, + ) -> Result<(AgentExecuteCommand, [u8; 32]), XcmConverterError> { use XcmConverterError::*; // Get the reserve assets from WithdrawAsset. @@ -249,10 +251,9 @@ impl<'a, Call> XcmConverter<'a, Call> { ensure!(amount > 0, ZeroAssetTransfer); // Check if there is a SetTopic and skip over it if found. - let _topic_id = - match_expression!(self.next()?, SetTopic(id), id).ok_or(SetTopicExpected)?; + let topic_id = match_expression!(self.next()?, SetTopic(id), id).ok_or(SetTopicExpected)?; - Ok(AgentExecuteCommand::TransferToken { token, recipient, amount }) + Ok((AgentExecuteCommand::TransferToken { token, recipient, amount }, *topic_id)) } fn next(&mut self) -> Result<&'a Instruction, XcmConverterError> { @@ -285,6 +286,7 @@ mod tests { use super::*; parameter_types! { + const MaxMessageSize: u32 = u32::MAX; const RelayNetwork: NetworkId = Polkadot; const UniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(RelayNetwork::get()), Parachain(1013)); const BridgedNetwork: NetworkId = Ethereum{ chain_id: 1 }; @@ -296,7 +298,7 @@ mod tests { type Ticket = (); type Balance = u128; - fn validate(_: &Message) -> Result<((), Fee), SendError> { + fn validate(_: &Message) -> Result<(Self::Ticket, Fee), SendError> { Ok(((), Fee { local: 1, remote: 1 })) } @@ -309,7 +311,7 @@ mod tests { type Ticket = (); type Balance = u128; - fn validate(_: &Message) -> Result<((), Fee), SendError> { + fn validate(_: &Message) -> Result<(Self::Ticket, Fee), SendError> { Err(SendError::MessageTooLarge) } @@ -683,7 +685,7 @@ mod tests { amount: 1000, }; let result = converter.convert(); - assert_eq!(result, Ok(expected_payload)); + assert_eq!(result, Ok((expected_payload, [0; 32]))); } #[test] @@ -716,7 +718,7 @@ mod tests { amount: 1000, }; let result = converter.convert(); - assert_eq!(result, Ok(expected_payload)); + assert_eq!(result, Ok((expected_payload, [0; 32]))); } #[test] @@ -751,7 +753,7 @@ mod tests { amount: 1000, }; let result = converter.convert(); - assert_eq!(result, Ok(expected_payload)); + assert_eq!(result, Ok((expected_payload, [0; 32]))); } #[test] @@ -787,7 +789,7 @@ mod tests { amount: 1000, }; let result = converter.convert(); - assert_eq!(result, Ok(expected_payload)); + assert_eq!(result, Ok((expected_payload, [0; 32]))); } #[test] diff --git a/relayer/contracts/gateway.go b/relayer/contracts/gateway.go index dd85c3d772..7b01b9f831 100644 --- a/relayer/contracts/gateway.go +++ b/relayer/contracts/gateway.go @@ -38,6 +38,7 @@ type InboundMessage struct { MaxDispatchGas *big.Int MaxRefund *big.Int Reward *big.Int + Id [32]byte } // VerificationDigestItem is an auto generated low-level Go binding around an user-defined struct. @@ -84,7 +85,7 @@ type VerificationProof struct { // GatewayMetaData contains all meta data concerning the Gateway contract. var GatewayMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"agentID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"}],\"name\":\"AgentCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"agentID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"AgentFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"ChannelCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"ChannelUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"ParaID\",\"name\":\"origin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"InboundMessageDispatched\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enumOperatingMode\",\"name\":\"mode\",\"type\":\"uint8\"}],\"name\":\"OperatingModeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"ParaID\",\"name\":\"destination\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"OutboundMessageAccepted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"register\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"send\",\"type\":\"uint256\"}],\"name\":\"SetTokenTransferFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenRegistrationSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"ParaID\",\"name\":\"destinationChain\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"TokenSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"agentID\",\"type\":\"bytes32\"}],\"name\":\"agentOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"channelFeeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"channelNoncesOf\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"channelOperatingModeOf\",\"outputs\":[{\"internalType\":\"enumOperatingMode\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"operatingMode\",\"outputs\":[{\"internalType\":\"enumOperatingMode\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"registerToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"ParaID\",\"name\":\"destinationChain\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"destinationAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"sendToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"ParaID\",\"name\":\"destinationChain\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"sendToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"ParaID\",\"name\":\"origin\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"enumCommand\",\"name\":\"command\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"params\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maxDispatchGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxRefund\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"internalType\":\"structInboundMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"leafProof\",\"type\":\"bytes32[]\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extrinsicsRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"kind\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"consensusEngineID\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structVerification.DigestItem[]\",\"name\":\"digestItems\",\"type\":\"tuple[]\"}],\"internalType\":\"structVerification.ParachainHeader\",\"name\":\"header\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"pos\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"width\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"}],\"internalType\":\"structVerification.HeadProof\",\"name\":\"headProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"parentNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"nextAuthoritySetID\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nextAuthoritySetLen\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nextAuthoritySetRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structVerification.MMRLeafPartial\",\"name\":\"leafPartial\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"leafProof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"leafProofOrder\",\"type\":\"uint256\"}],\"internalType\":\"structVerification.Proof\",\"name\":\"headerProof\",\"type\":\"tuple\"}],\"name\":\"submitInbound\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenTransferFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"agentID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"agent\",\"type\":\"address\"}],\"name\":\"AgentCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"agentID\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"AgentFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"ChannelCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"ChannelUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"ParaID\",\"name\":\"origin\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"InboundMessageDispatched\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enumOperatingMode\",\"name\":\"mode\",\"type\":\"uint8\"}],\"name\":\"OperatingModeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"ParaID\",\"name\":\"destination\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"OutboundMessageAccepted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenRegistrationSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"ParaID\",\"name\":\"destinationChain\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"destinationAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"TokenSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"register\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"send\",\"type\":\"uint256\"}],\"name\":\"TokenTransferFeesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"agentID\",\"type\":\"bytes32\"}],\"name\":\"agentOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"channelFeeOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"channelNoncesOf\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"ParaID\",\"name\":\"paraID\",\"type\":\"uint256\"}],\"name\":\"channelOperatingModeOf\",\"outputs\":[{\"internalType\":\"enumOperatingMode\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"operatingMode\",\"outputs\":[{\"internalType\":\"enumOperatingMode\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"registerToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"ParaID\",\"name\":\"destinationChain\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"destinationAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"sendToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"ParaID\",\"name\":\"destinationChain\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destinationAddress\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"}],\"name\":\"sendToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"ParaID\",\"name\":\"origin\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"enumCommand\",\"name\":\"command\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"params\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maxDispatchGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxRefund\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"internalType\":\"structInboundMessage\",\"name\":\"message\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"leafProof\",\"type\":\"bytes32[]\"},{\"components\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"extrinsicsRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"kind\",\"type\":\"uint256\"},{\"internalType\":\"bytes4\",\"name\":\"consensusEngineID\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structVerification.DigestItem[]\",\"name\":\"digestItems\",\"type\":\"tuple[]\"}],\"internalType\":\"structVerification.ParachainHeader\",\"name\":\"header\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"pos\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"width\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"}],\"internalType\":\"structVerification.HeadProof\",\"name\":\"headProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"parentNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"nextAuthoritySetID\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nextAuthoritySetLen\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"nextAuthoritySetRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structVerification.MMRLeafPartial\",\"name\":\"leafPartial\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"leafProof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256\",\"name\":\"leafProofOrder\",\"type\":\"uint256\"}],\"internalType\":\"structVerification.Proof\",\"name\":\"headerProof\",\"type\":\"tuple\"}],\"name\":\"submitInbound\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tokenTransferFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } // GatewayABI is the input ABI used to generate the binding from. @@ -515,23 +516,23 @@ func (_Gateway *GatewayTransactorSession) SendToken0(token common.Address, desti return _Gateway.Contract.SendToken0(&_Gateway.TransactOpts, token, destinationChain, destinationAddress, amount) } -// SubmitInbound is a paid mutator transaction binding the contract method 0xa7397d76. +// SubmitInbound is a paid mutator transaction binding the contract method 0x5a058f67. // -// Solidity: function submitInbound((uint256,uint64,uint8,bytes,uint256,uint256,uint256) message, bytes32[] leafProof, ((bytes32,uint256,bytes32,bytes32,(uint256,bytes4,bytes)[]),(uint256,uint256,bytes32[]),(uint8,uint32,bytes32,uint64,uint32,bytes32),bytes32[],uint256) headerProof) returns() +// Solidity: function submitInbound((uint256,uint64,uint8,bytes,uint256,uint256,uint256,bytes32) message, bytes32[] leafProof, ((bytes32,uint256,bytes32,bytes32,(uint256,bytes4,bytes)[]),(uint256,uint256,bytes32[]),(uint8,uint32,bytes32,uint64,uint32,bytes32),bytes32[],uint256) headerProof) returns() func (_Gateway *GatewayTransactor) SubmitInbound(opts *bind.TransactOpts, message InboundMessage, leafProof [][32]byte, headerProof VerificationProof) (*types.Transaction, error) { return _Gateway.contract.Transact(opts, "submitInbound", message, leafProof, headerProof) } -// SubmitInbound is a paid mutator transaction binding the contract method 0xa7397d76. +// SubmitInbound is a paid mutator transaction binding the contract method 0x5a058f67. // -// Solidity: function submitInbound((uint256,uint64,uint8,bytes,uint256,uint256,uint256) message, bytes32[] leafProof, ((bytes32,uint256,bytes32,bytes32,(uint256,bytes4,bytes)[]),(uint256,uint256,bytes32[]),(uint8,uint32,bytes32,uint64,uint32,bytes32),bytes32[],uint256) headerProof) returns() +// Solidity: function submitInbound((uint256,uint64,uint8,bytes,uint256,uint256,uint256,bytes32) message, bytes32[] leafProof, ((bytes32,uint256,bytes32,bytes32,(uint256,bytes4,bytes)[]),(uint256,uint256,bytes32[]),(uint8,uint32,bytes32,uint64,uint32,bytes32),bytes32[],uint256) headerProof) returns() func (_Gateway *GatewaySession) SubmitInbound(message InboundMessage, leafProof [][32]byte, headerProof VerificationProof) (*types.Transaction, error) { return _Gateway.Contract.SubmitInbound(&_Gateway.TransactOpts, message, leafProof, headerProof) } -// SubmitInbound is a paid mutator transaction binding the contract method 0xa7397d76. +// SubmitInbound is a paid mutator transaction binding the contract method 0x5a058f67. // -// Solidity: function submitInbound((uint256,uint64,uint8,bytes,uint256,uint256,uint256) message, bytes32[] leafProof, ((bytes32,uint256,bytes32,bytes32,(uint256,bytes4,bytes)[]),(uint256,uint256,bytes32[]),(uint8,uint32,bytes32,uint64,uint32,bytes32),bytes32[],uint256) headerProof) returns() +// Solidity: function submitInbound((uint256,uint64,uint8,bytes,uint256,uint256,uint256,bytes32) message, bytes32[] leafProof, ((bytes32,uint256,bytes32,bytes32,(uint256,bytes4,bytes)[]),(uint256,uint256,bytes32[]),(uint8,uint32,bytes32,uint64,uint32,bytes32),bytes32[],uint256) headerProof) returns() func (_Gateway *GatewayTransactorSession) SubmitInbound(message InboundMessage, leafProof [][32]byte, headerProof VerificationProof) (*types.Transaction, error) { return _Gateway.Contract.SubmitInbound(&_Gateway.TransactOpts, message, leafProof, headerProof) } @@ -1182,40 +1183,51 @@ func (it *GatewayInboundMessageDispatchedIterator) Close() error { // GatewayInboundMessageDispatched represents a InboundMessageDispatched event raised by the Gateway contract. type GatewayInboundMessageDispatched struct { - Origin *big.Int - Nonce uint64 - Success bool - Raw types.Log // Blockchain specific contextual infos + Origin *big.Int + Nonce uint64 + MessageID [32]byte + Success bool + Raw types.Log // Blockchain specific contextual infos } -// FilterInboundMessageDispatched is a free log retrieval operation binding the contract event 0xc413674585e5f4244fd69ce2c9587aac57f3fdaf6b337a1f39317d2ffa1279f1. +// FilterInboundMessageDispatched is a free log retrieval operation binding the contract event 0xe88d4734b8bcb71455d9b1ece51ef7aae126a1b670e20b299eb98d606ff7a5dc. // -// Solidity: event InboundMessageDispatched(uint256 indexed origin, uint64 nonce, bool success) -func (_Gateway *GatewayFilterer) FilterInboundMessageDispatched(opts *bind.FilterOpts, origin []*big.Int) (*GatewayInboundMessageDispatchedIterator, error) { +// Solidity: event InboundMessageDispatched(uint256 indexed origin, uint64 nonce, bytes32 indexed messageID, bool success) +func (_Gateway *GatewayFilterer) FilterInboundMessageDispatched(opts *bind.FilterOpts, origin []*big.Int, messageID [][32]byte) (*GatewayInboundMessageDispatchedIterator, error) { var originRule []interface{} for _, originItem := range origin { originRule = append(originRule, originItem) } - logs, sub, err := _Gateway.contract.FilterLogs(opts, "InboundMessageDispatched", originRule) + var messageIDRule []interface{} + for _, messageIDItem := range messageID { + messageIDRule = append(messageIDRule, messageIDItem) + } + + logs, sub, err := _Gateway.contract.FilterLogs(opts, "InboundMessageDispatched", originRule, messageIDRule) if err != nil { return nil, err } return &GatewayInboundMessageDispatchedIterator{contract: _Gateway.contract, event: "InboundMessageDispatched", logs: logs, sub: sub}, nil } -// WatchInboundMessageDispatched is a free log subscription operation binding the contract event 0xc413674585e5f4244fd69ce2c9587aac57f3fdaf6b337a1f39317d2ffa1279f1. +// WatchInboundMessageDispatched is a free log subscription operation binding the contract event 0xe88d4734b8bcb71455d9b1ece51ef7aae126a1b670e20b299eb98d606ff7a5dc. // -// Solidity: event InboundMessageDispatched(uint256 indexed origin, uint64 nonce, bool success) -func (_Gateway *GatewayFilterer) WatchInboundMessageDispatched(opts *bind.WatchOpts, sink chan<- *GatewayInboundMessageDispatched, origin []*big.Int) (event.Subscription, error) { +// Solidity: event InboundMessageDispatched(uint256 indexed origin, uint64 nonce, bytes32 indexed messageID, bool success) +func (_Gateway *GatewayFilterer) WatchInboundMessageDispatched(opts *bind.WatchOpts, sink chan<- *GatewayInboundMessageDispatched, origin []*big.Int, messageID [][32]byte) (event.Subscription, error) { var originRule []interface{} for _, originItem := range origin { originRule = append(originRule, originItem) } - logs, sub, err := _Gateway.contract.WatchLogs(opts, "InboundMessageDispatched", originRule) + var messageIDRule []interface{} + for _, messageIDItem := range messageID { + messageIDRule = append(messageIDRule, messageIDItem) + } + + logs, sub, err := _Gateway.contract.WatchLogs(opts, "InboundMessageDispatched", originRule, messageIDRule) if err != nil { return nil, err } @@ -1247,9 +1259,9 @@ func (_Gateway *GatewayFilterer) WatchInboundMessageDispatched(opts *bind.WatchO }), nil } -// ParseInboundMessageDispatched is a log parse operation binding the contract event 0xc413674585e5f4244fd69ce2c9587aac57f3fdaf6b337a1f39317d2ffa1279f1. +// ParseInboundMessageDispatched is a log parse operation binding the contract event 0xe88d4734b8bcb71455d9b1ece51ef7aae126a1b670e20b299eb98d606ff7a5dc. // -// Solidity: event InboundMessageDispatched(uint256 indexed origin, uint64 nonce, bool success) +// Solidity: event InboundMessageDispatched(uint256 indexed origin, uint64 nonce, bytes32 indexed messageID, bool success) func (_Gateway *GatewayFilterer) ParseInboundMessageDispatched(log types.Log) (*GatewayInboundMessageDispatched, error) { event := new(GatewayInboundMessageDispatched) if err := _Gateway.contract.UnpackLog(event, "InboundMessageDispatched", log); err != nil { @@ -1464,38 +1476,49 @@ func (it *GatewayOutboundMessageAcceptedIterator) Close() error { type GatewayOutboundMessageAccepted struct { Destination *big.Int Nonce uint64 + MessageID [32]byte Payload []byte Raw types.Log // Blockchain specific contextual infos } -// FilterOutboundMessageAccepted is a free log retrieval operation binding the contract event 0xd56f1b8dfd3ba41f19c499ceec5f9546f61befa5f10398a75d7dba53a219fece. +// FilterOutboundMessageAccepted is a free log retrieval operation binding the contract event 0x5066fbba677e15936860e04088ca4cad3acd4c19706962196a5346f1457f7169. // -// Solidity: event OutboundMessageAccepted(uint256 indexed destination, uint64 nonce, bytes payload) -func (_Gateway *GatewayFilterer) FilterOutboundMessageAccepted(opts *bind.FilterOpts, destination []*big.Int) (*GatewayOutboundMessageAcceptedIterator, error) { +// Solidity: event OutboundMessageAccepted(uint256 indexed destination, uint64 nonce, bytes32 indexed messageID, bytes payload) +func (_Gateway *GatewayFilterer) FilterOutboundMessageAccepted(opts *bind.FilterOpts, destination []*big.Int, messageID [][32]byte) (*GatewayOutboundMessageAcceptedIterator, error) { var destinationRule []interface{} for _, destinationItem := range destination { destinationRule = append(destinationRule, destinationItem) } - logs, sub, err := _Gateway.contract.FilterLogs(opts, "OutboundMessageAccepted", destinationRule) + var messageIDRule []interface{} + for _, messageIDItem := range messageID { + messageIDRule = append(messageIDRule, messageIDItem) + } + + logs, sub, err := _Gateway.contract.FilterLogs(opts, "OutboundMessageAccepted", destinationRule, messageIDRule) if err != nil { return nil, err } return &GatewayOutboundMessageAcceptedIterator{contract: _Gateway.contract, event: "OutboundMessageAccepted", logs: logs, sub: sub}, nil } -// WatchOutboundMessageAccepted is a free log subscription operation binding the contract event 0xd56f1b8dfd3ba41f19c499ceec5f9546f61befa5f10398a75d7dba53a219fece. +// WatchOutboundMessageAccepted is a free log subscription operation binding the contract event 0x5066fbba677e15936860e04088ca4cad3acd4c19706962196a5346f1457f7169. // -// Solidity: event OutboundMessageAccepted(uint256 indexed destination, uint64 nonce, bytes payload) -func (_Gateway *GatewayFilterer) WatchOutboundMessageAccepted(opts *bind.WatchOpts, sink chan<- *GatewayOutboundMessageAccepted, destination []*big.Int) (event.Subscription, error) { +// Solidity: event OutboundMessageAccepted(uint256 indexed destination, uint64 nonce, bytes32 indexed messageID, bytes payload) +func (_Gateway *GatewayFilterer) WatchOutboundMessageAccepted(opts *bind.WatchOpts, sink chan<- *GatewayOutboundMessageAccepted, destination []*big.Int, messageID [][32]byte) (event.Subscription, error) { var destinationRule []interface{} for _, destinationItem := range destination { destinationRule = append(destinationRule, destinationItem) } - logs, sub, err := _Gateway.contract.WatchLogs(opts, "OutboundMessageAccepted", destinationRule) + var messageIDRule []interface{} + for _, messageIDItem := range messageID { + messageIDRule = append(messageIDRule, messageIDItem) + } + + logs, sub, err := _Gateway.contract.WatchLogs(opts, "OutboundMessageAccepted", destinationRule, messageIDRule) if err != nil { return nil, err } @@ -1527,9 +1550,9 @@ func (_Gateway *GatewayFilterer) WatchOutboundMessageAccepted(opts *bind.WatchOp }), nil } -// ParseOutboundMessageAccepted is a log parse operation binding the contract event 0xd56f1b8dfd3ba41f19c499ceec5f9546f61befa5f10398a75d7dba53a219fece. +// ParseOutboundMessageAccepted is a log parse operation binding the contract event 0x5066fbba677e15936860e04088ca4cad3acd4c19706962196a5346f1457f7169. // -// Solidity: event OutboundMessageAccepted(uint256 indexed destination, uint64 nonce, bytes payload) +// Solidity: event OutboundMessageAccepted(uint256 indexed destination, uint64 nonce, bytes32 indexed messageID, bytes payload) func (_Gateway *GatewayFilterer) ParseOutboundMessageAccepted(log types.Log) (*GatewayOutboundMessageAccepted, error) { event := new(GatewayOutboundMessageAccepted) if err := _Gateway.contract.UnpackLog(event, "OutboundMessageAccepted", log); err != nil { @@ -1539,9 +1562,9 @@ func (_Gateway *GatewayFilterer) ParseOutboundMessageAccepted(log types.Log) (*G return event, nil } -// GatewaySetTokenTransferFeesIterator is returned from FilterSetTokenTransferFees and is used to iterate over the raw logs and unpacked data for SetTokenTransferFees events raised by the Gateway contract. -type GatewaySetTokenTransferFeesIterator struct { - Event *GatewaySetTokenTransferFees // Event containing the contract specifics and raw log +// GatewayTokenRegistrationSentIterator is returned from FilterTokenRegistrationSent and is used to iterate over the raw logs and unpacked data for TokenRegistrationSent events raised by the Gateway contract. +type GatewayTokenRegistrationSentIterator struct { + Event *GatewayTokenRegistrationSent // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1555,7 +1578,7 @@ type GatewaySetTokenTransferFeesIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *GatewaySetTokenTransferFeesIterator) Next() bool { +func (it *GatewayTokenRegistrationSentIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1564,7 +1587,7 @@ func (it *GatewaySetTokenTransferFeesIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(GatewaySetTokenTransferFees) + it.Event = new(GatewayTokenRegistrationSent) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1579,7 +1602,7 @@ func (it *GatewaySetTokenTransferFeesIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(GatewaySetTokenTransferFees) + it.Event = new(GatewayTokenRegistrationSent) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1595,42 +1618,41 @@ func (it *GatewaySetTokenTransferFeesIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *GatewaySetTokenTransferFeesIterator) Error() error { +func (it *GatewayTokenRegistrationSentIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *GatewaySetTokenTransferFeesIterator) Close() error { +func (it *GatewayTokenRegistrationSentIterator) Close() error { it.sub.Unsubscribe() return nil } -// GatewaySetTokenTransferFees represents a SetTokenTransferFees event raised by the Gateway contract. -type GatewaySetTokenTransferFees struct { - Register *big.Int - Send *big.Int - Raw types.Log // Blockchain specific contextual infos +// GatewayTokenRegistrationSent represents a TokenRegistrationSent event raised by the Gateway contract. +type GatewayTokenRegistrationSent struct { + Token common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterSetTokenTransferFees is a free log retrieval operation binding the contract event 0xe1a86b0b703265be7e2b8f52a38625965fc66f6d52413944bdb9c815caaa932a. +// FilterTokenRegistrationSent is a free log retrieval operation binding the contract event 0xf78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7e. // -// Solidity: event SetTokenTransferFees(uint256 register, uint256 send) -func (_Gateway *GatewayFilterer) FilterSetTokenTransferFees(opts *bind.FilterOpts) (*GatewaySetTokenTransferFeesIterator, error) { +// Solidity: event TokenRegistrationSent(address token) +func (_Gateway *GatewayFilterer) FilterTokenRegistrationSent(opts *bind.FilterOpts) (*GatewayTokenRegistrationSentIterator, error) { - logs, sub, err := _Gateway.contract.FilterLogs(opts, "SetTokenTransferFees") + logs, sub, err := _Gateway.contract.FilterLogs(opts, "TokenRegistrationSent") if err != nil { return nil, err } - return &GatewaySetTokenTransferFeesIterator{contract: _Gateway.contract, event: "SetTokenTransferFees", logs: logs, sub: sub}, nil + return &GatewayTokenRegistrationSentIterator{contract: _Gateway.contract, event: "TokenRegistrationSent", logs: logs, sub: sub}, nil } -// WatchSetTokenTransferFees is a free log subscription operation binding the contract event 0xe1a86b0b703265be7e2b8f52a38625965fc66f6d52413944bdb9c815caaa932a. +// WatchTokenRegistrationSent is a free log subscription operation binding the contract event 0xf78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7e. // -// Solidity: event SetTokenTransferFees(uint256 register, uint256 send) -func (_Gateway *GatewayFilterer) WatchSetTokenTransferFees(opts *bind.WatchOpts, sink chan<- *GatewaySetTokenTransferFees) (event.Subscription, error) { +// Solidity: event TokenRegistrationSent(address token) +func (_Gateway *GatewayFilterer) WatchTokenRegistrationSent(opts *bind.WatchOpts, sink chan<- *GatewayTokenRegistrationSent) (event.Subscription, error) { - logs, sub, err := _Gateway.contract.WatchLogs(opts, "SetTokenTransferFees") + logs, sub, err := _Gateway.contract.WatchLogs(opts, "TokenRegistrationSent") if err != nil { return nil, err } @@ -1640,8 +1662,8 @@ func (_Gateway *GatewayFilterer) WatchSetTokenTransferFees(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(GatewaySetTokenTransferFees) - if err := _Gateway.contract.UnpackLog(event, "SetTokenTransferFees", log); err != nil { + event := new(GatewayTokenRegistrationSent) + if err := _Gateway.contract.UnpackLog(event, "TokenRegistrationSent", log); err != nil { return err } event.Raw = log @@ -1662,21 +1684,21 @@ func (_Gateway *GatewayFilterer) WatchSetTokenTransferFees(opts *bind.WatchOpts, }), nil } -// ParseSetTokenTransferFees is a log parse operation binding the contract event 0xe1a86b0b703265be7e2b8f52a38625965fc66f6d52413944bdb9c815caaa932a. +// ParseTokenRegistrationSent is a log parse operation binding the contract event 0xf78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7e. // -// Solidity: event SetTokenTransferFees(uint256 register, uint256 send) -func (_Gateway *GatewayFilterer) ParseSetTokenTransferFees(log types.Log) (*GatewaySetTokenTransferFees, error) { - event := new(GatewaySetTokenTransferFees) - if err := _Gateway.contract.UnpackLog(event, "SetTokenTransferFees", log); err != nil { +// Solidity: event TokenRegistrationSent(address token) +func (_Gateway *GatewayFilterer) ParseTokenRegistrationSent(log types.Log) (*GatewayTokenRegistrationSent, error) { + event := new(GatewayTokenRegistrationSent) + if err := _Gateway.contract.UnpackLog(event, "TokenRegistrationSent", log); err != nil { return nil, err } event.Raw = log return event, nil } -// GatewayTokenRegistrationSentIterator is returned from FilterTokenRegistrationSent and is used to iterate over the raw logs and unpacked data for TokenRegistrationSent events raised by the Gateway contract. -type GatewayTokenRegistrationSentIterator struct { - Event *GatewayTokenRegistrationSent // Event containing the contract specifics and raw log +// GatewayTokenSentIterator is returned from FilterTokenSent and is used to iterate over the raw logs and unpacked data for TokenSent events raised by the Gateway contract. +type GatewayTokenSentIterator struct { + Event *GatewayTokenSent // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1690,7 +1712,7 @@ type GatewayTokenRegistrationSentIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *GatewayTokenRegistrationSentIterator) Next() bool { +func (it *GatewayTokenSentIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1699,7 +1721,7 @@ func (it *GatewayTokenRegistrationSentIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(GatewayTokenRegistrationSent) + it.Event = new(GatewayTokenSent) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1714,7 +1736,7 @@ func (it *GatewayTokenRegistrationSentIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(GatewayTokenRegistrationSent) + it.Event = new(GatewayTokenSent) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1730,41 +1752,63 @@ func (it *GatewayTokenRegistrationSentIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *GatewayTokenRegistrationSentIterator) Error() error { +func (it *GatewayTokenSentIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *GatewayTokenRegistrationSentIterator) Close() error { +func (it *GatewayTokenSentIterator) Close() error { it.sub.Unsubscribe() return nil } -// GatewayTokenRegistrationSent represents a TokenRegistrationSent event raised by the Gateway contract. -type GatewayTokenRegistrationSent struct { - Token common.Address - Raw types.Log // Blockchain specific contextual infos +// GatewayTokenSent represents a TokenSent event raised by the Gateway contract. +type GatewayTokenSent struct { + Token common.Address + Sender common.Address + DestinationChain *big.Int + DestinationAddress []byte + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterTokenRegistrationSent is a free log retrieval operation binding the contract event 0xf78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7e. +// FilterTokenSent is a free log retrieval operation binding the contract event 0x37ae4af9ee081dc143413d47231db2ed06e556615d5164b33c40142e1d4c46f5. // -// Solidity: event TokenRegistrationSent(address token) -func (_Gateway *GatewayFilterer) FilterTokenRegistrationSent(opts *bind.FilterOpts) (*GatewayTokenRegistrationSentIterator, error) { +// Solidity: event TokenSent(address indexed token, address indexed sender, uint256 destinationChain, bytes destinationAddress, uint128 amount) +func (_Gateway *GatewayFilterer) FilterTokenSent(opts *bind.FilterOpts, token []common.Address, sender []common.Address) (*GatewayTokenSentIterator, error) { - logs, sub, err := _Gateway.contract.FilterLogs(opts, "TokenRegistrationSent") + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Gateway.contract.FilterLogs(opts, "TokenSent", tokenRule, senderRule) if err != nil { return nil, err } - return &GatewayTokenRegistrationSentIterator{contract: _Gateway.contract, event: "TokenRegistrationSent", logs: logs, sub: sub}, nil + return &GatewayTokenSentIterator{contract: _Gateway.contract, event: "TokenSent", logs: logs, sub: sub}, nil } -// WatchTokenRegistrationSent is a free log subscription operation binding the contract event 0xf78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7e. +// WatchTokenSent is a free log subscription operation binding the contract event 0x37ae4af9ee081dc143413d47231db2ed06e556615d5164b33c40142e1d4c46f5. // -// Solidity: event TokenRegistrationSent(address token) -func (_Gateway *GatewayFilterer) WatchTokenRegistrationSent(opts *bind.WatchOpts, sink chan<- *GatewayTokenRegistrationSent) (event.Subscription, error) { +// Solidity: event TokenSent(address indexed token, address indexed sender, uint256 destinationChain, bytes destinationAddress, uint128 amount) +func (_Gateway *GatewayFilterer) WatchTokenSent(opts *bind.WatchOpts, sink chan<- *GatewayTokenSent, token []common.Address, sender []common.Address) (event.Subscription, error) { - logs, sub, err := _Gateway.contract.WatchLogs(opts, "TokenRegistrationSent") + var tokenRule []interface{} + for _, tokenItem := range token { + tokenRule = append(tokenRule, tokenItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Gateway.contract.WatchLogs(opts, "TokenSent", tokenRule, senderRule) if err != nil { return nil, err } @@ -1774,8 +1818,8 @@ func (_Gateway *GatewayFilterer) WatchTokenRegistrationSent(opts *bind.WatchOpts select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(GatewayTokenRegistrationSent) - if err := _Gateway.contract.UnpackLog(event, "TokenRegistrationSent", log); err != nil { + event := new(GatewayTokenSent) + if err := _Gateway.contract.UnpackLog(event, "TokenSent", log); err != nil { return err } event.Raw = log @@ -1796,21 +1840,21 @@ func (_Gateway *GatewayFilterer) WatchTokenRegistrationSent(opts *bind.WatchOpts }), nil } -// ParseTokenRegistrationSent is a log parse operation binding the contract event 0xf78bb28d4b1d7da699e5c0bc2be29c2b04b5aab6aacf6298fe5304f9db9c6d7e. +// ParseTokenSent is a log parse operation binding the contract event 0x37ae4af9ee081dc143413d47231db2ed06e556615d5164b33c40142e1d4c46f5. // -// Solidity: event TokenRegistrationSent(address token) -func (_Gateway *GatewayFilterer) ParseTokenRegistrationSent(log types.Log) (*GatewayTokenRegistrationSent, error) { - event := new(GatewayTokenRegistrationSent) - if err := _Gateway.contract.UnpackLog(event, "TokenRegistrationSent", log); err != nil { +// Solidity: event TokenSent(address indexed token, address indexed sender, uint256 destinationChain, bytes destinationAddress, uint128 amount) +func (_Gateway *GatewayFilterer) ParseTokenSent(log types.Log) (*GatewayTokenSent, error) { + event := new(GatewayTokenSent) + if err := _Gateway.contract.UnpackLog(event, "TokenSent", log); err != nil { return nil, err } event.Raw = log return event, nil } -// GatewayTokenSentIterator is returned from FilterTokenSent and is used to iterate over the raw logs and unpacked data for TokenSent events raised by the Gateway contract. -type GatewayTokenSentIterator struct { - Event *GatewayTokenSent // Event containing the contract specifics and raw log +// GatewayTokenTransferFeesChangedIterator is returned from FilterTokenTransferFeesChanged and is used to iterate over the raw logs and unpacked data for TokenTransferFeesChanged events raised by the Gateway contract. +type GatewayTokenTransferFeesChangedIterator struct { + Event *GatewayTokenTransferFeesChanged // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1824,7 +1868,7 @@ type GatewayTokenSentIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *GatewayTokenSentIterator) Next() bool { +func (it *GatewayTokenTransferFeesChangedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1833,7 +1877,7 @@ func (it *GatewayTokenSentIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(GatewayTokenSent) + it.Event = new(GatewayTokenTransferFeesChanged) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1848,7 +1892,7 @@ func (it *GatewayTokenSentIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(GatewayTokenSent) + it.Event = new(GatewayTokenTransferFeesChanged) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1864,63 +1908,42 @@ func (it *GatewayTokenSentIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *GatewayTokenSentIterator) Error() error { +func (it *GatewayTokenTransferFeesChangedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *GatewayTokenSentIterator) Close() error { +func (it *GatewayTokenTransferFeesChangedIterator) Close() error { it.sub.Unsubscribe() return nil } -// GatewayTokenSent represents a TokenSent event raised by the Gateway contract. -type GatewayTokenSent struct { - Token common.Address - Sender common.Address - DestinationChain *big.Int - DestinationAddress []byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos +// GatewayTokenTransferFeesChanged represents a TokenTransferFeesChanged event raised by the Gateway contract. +type GatewayTokenTransferFeesChanged struct { + Register *big.Int + Send *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterTokenSent is a free log retrieval operation binding the contract event 0x37ae4af9ee081dc143413d47231db2ed06e556615d5164b33c40142e1d4c46f5. +// FilterTokenTransferFeesChanged is a free log retrieval operation binding the contract event 0xf8b9e90b8d22eedd745a43851ee14b456fc1ca0e7248defe1ee10a9619c897ed. // -// Solidity: event TokenSent(address indexed token, address indexed sender, uint256 destinationChain, bytes destinationAddress, uint128 amount) -func (_Gateway *GatewayFilterer) FilterTokenSent(opts *bind.FilterOpts, token []common.Address, sender []common.Address) (*GatewayTokenSentIterator, error) { +// Solidity: event TokenTransferFeesChanged(uint256 register, uint256 send) +func (_Gateway *GatewayFilterer) FilterTokenTransferFeesChanged(opts *bind.FilterOpts) (*GatewayTokenTransferFeesChangedIterator, error) { - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Gateway.contract.FilterLogs(opts, "TokenSent", tokenRule, senderRule) + logs, sub, err := _Gateway.contract.FilterLogs(opts, "TokenTransferFeesChanged") if err != nil { return nil, err } - return &GatewayTokenSentIterator{contract: _Gateway.contract, event: "TokenSent", logs: logs, sub: sub}, nil + return &GatewayTokenTransferFeesChangedIterator{contract: _Gateway.contract, event: "TokenTransferFeesChanged", logs: logs, sub: sub}, nil } -// WatchTokenSent is a free log subscription operation binding the contract event 0x37ae4af9ee081dc143413d47231db2ed06e556615d5164b33c40142e1d4c46f5. +// WatchTokenTransferFeesChanged is a free log subscription operation binding the contract event 0xf8b9e90b8d22eedd745a43851ee14b456fc1ca0e7248defe1ee10a9619c897ed. // -// Solidity: event TokenSent(address indexed token, address indexed sender, uint256 destinationChain, bytes destinationAddress, uint128 amount) -func (_Gateway *GatewayFilterer) WatchTokenSent(opts *bind.WatchOpts, sink chan<- *GatewayTokenSent, token []common.Address, sender []common.Address) (event.Subscription, error) { +// Solidity: event TokenTransferFeesChanged(uint256 register, uint256 send) +func (_Gateway *GatewayFilterer) WatchTokenTransferFeesChanged(opts *bind.WatchOpts, sink chan<- *GatewayTokenTransferFeesChanged) (event.Subscription, error) { - var tokenRule []interface{} - for _, tokenItem := range token { - tokenRule = append(tokenRule, tokenItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Gateway.contract.WatchLogs(opts, "TokenSent", tokenRule, senderRule) + logs, sub, err := _Gateway.contract.WatchLogs(opts, "TokenTransferFeesChanged") if err != nil { return nil, err } @@ -1930,8 +1953,8 @@ func (_Gateway *GatewayFilterer) WatchTokenSent(opts *bind.WatchOpts, sink chan< select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(GatewayTokenSent) - if err := _Gateway.contract.UnpackLog(event, "TokenSent", log); err != nil { + event := new(GatewayTokenTransferFeesChanged) + if err := _Gateway.contract.UnpackLog(event, "TokenTransferFeesChanged", log); err != nil { return err } event.Raw = log @@ -1952,12 +1975,12 @@ func (_Gateway *GatewayFilterer) WatchTokenSent(opts *bind.WatchOpts, sink chan< }), nil } -// ParseTokenSent is a log parse operation binding the contract event 0x37ae4af9ee081dc143413d47231db2ed06e556615d5164b33c40142e1d4c46f5. +// ParseTokenTransferFeesChanged is a log parse operation binding the contract event 0xf8b9e90b8d22eedd745a43851ee14b456fc1ca0e7248defe1ee10a9619c897ed. // -// Solidity: event TokenSent(address indexed token, address indexed sender, uint256 destinationChain, bytes destinationAddress, uint128 amount) -func (_Gateway *GatewayFilterer) ParseTokenSent(log types.Log) (*GatewayTokenSent, error) { - event := new(GatewayTokenSent) - if err := _Gateway.contract.UnpackLog(event, "TokenSent", log); err != nil { +// Solidity: event TokenTransferFeesChanged(uint256 register, uint256 send) +func (_Gateway *GatewayFilterer) ParseTokenTransferFeesChanged(log types.Log) (*GatewayTokenTransferFeesChanged, error) { + event := new(GatewayTokenTransferFeesChanged) + if err := _Gateway.contract.UnpackLog(event, "TokenTransferFeesChanged", log); err != nil { return nil, err } event.Raw = log diff --git a/relayer/relays/execution/main.go b/relayer/relays/execution/main.go index 2519b88837..c39a7fa18e 100644 --- a/relayer/relays/execution/main.go +++ b/relayer/relays/execution/main.go @@ -255,7 +255,7 @@ func (r *Relay) findEvents( } func (r *Relay) findEventsWithFilter(opts *bind.FilterOpts, paraID uint32, start uint64) (bool, []*contracts.GatewayOutboundMessageAccepted, error) { - iter, err := r.gatewayContract.FilterOutboundMessageAccepted(opts, []*big.Int{big.NewInt(int64(paraID))}) + iter, err := r.gatewayContract.FilterOutboundMessageAccepted(opts, []*big.Int{big.NewInt(int64(paraID))}, [][32]byte{}) if err != nil { return false, nil, err } diff --git a/relayer/relays/parachain/types.go b/relayer/relays/parachain/types.go index 9bdff130e8..f002002236 100644 --- a/relayer/relays/parachain/types.go +++ b/relayer/relays/parachain/types.go @@ -90,6 +90,7 @@ type OutboundQueueMessage struct { MaxDispatchGas types.U128 MaxRefund types.U128 Reward types.U128 + ID types.Bytes32 } func (m OutboundQueueMessage) IntoInboundMessage() contracts.InboundMessage { @@ -101,6 +102,7 @@ func (m OutboundQueueMessage) IntoInboundMessage() contracts.InboundMessage { MaxDispatchGas: m.MaxDispatchGas.Int, MaxRefund: m.MaxRefund.Int, Reward: m.Reward.Int, + Id: m.ID, } } diff --git a/smoketest/Cargo.lock b/smoketest/Cargo.lock index de74291c9e..5756cc7756 100644 --- a/smoketest/Cargo.lock +++ b/smoketest/Cargo.lock @@ -4177,7 +4177,7 @@ dependencies = [ [[package]] name = "sp-crypto-ec-utils" version = "0.4.1" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -4218,7 +4218,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" dependencies = [ "proc-macro2", "quote", @@ -4250,7 +4250,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" dependencies = [ "environmental", "parity-scale-codec", @@ -4374,7 +4374,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -4416,7 +4416,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" dependencies = [ "Inflector", "proc-macro-crate", @@ -4459,7 +4459,7 @@ version = "8.0.0" [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" [[package]] name = "sp-storage" @@ -4490,7 +4490,7 @@ dependencies = [ [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" dependencies = [ "impl-serde", "parity-scale-codec", @@ -4527,7 +4527,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" dependencies = [ "parity-scale-codec", "sp-std 8.0.0 (git+https://github.com/paritytech/polkadot-sdk)", @@ -4590,7 +4590,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk#0524aa51d3b253dd94a60a026c7b7c5a850bf297" +source = "git+https://github.com/paritytech/polkadot-sdk#48ea86f0e86c0cef21a8df978307d93d7fbc19f6" dependencies = [ "anyhow", "impl-trait-for-tuples", diff --git a/web/packages/test/scripts/configure-bridgehub.sh b/web/packages/test/scripts/configure-bridgehub.sh index 83fb369362..c43625d42c 100755 --- a/web/packages/test/scripts/configure-bridgehub.sh +++ b/web/packages/test/scripts/configure-bridgehub.sh @@ -74,7 +74,6 @@ configure_bridgehub() { wait_beacon_chain_ready config_beacon_checkpoint open_hrmp_channels - enable_gateway } if [ -z "${from_start_services:-}" ]; then diff --git a/web/packages/test/scripts/set-env.sh b/web/packages/test/scripts/set-env.sh index 74a703ced2..21585af512 100755 --- a/web/packages/test/scripts/set-env.sh +++ b/web/packages/test/scripts/set-env.sh @@ -77,6 +77,7 @@ export RANDAO_COMMIT_DELAY="${ETH_RANDAO_DELAY:-3}" export RANDAO_COMMIT_EXP="${ETH_RANDAO_EXP:-3}" export MINIMUM_REQUIRED_SIGNATURES="${MINIMUM_REQUIRED_SIGNATURES:-16}" +export REJECT_OUTBOUND_MESSAGES=false export DEFAULT_FEE="${ETH_DEFAULT_FEE:-1}" export CREATE_CALL_INDEX="${ETH_CREATE_CALL_INDEX:-0x3500}" From 50b47ac7cd5c4a40ef48013afa1a417403c1ae96 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 10 Nov 2023 13:07:15 +0200 Subject: [PATCH 07/10] latest updates and fmt --- parachain/Cargo.lock | 58 +++++++++---------- .../src/process_message_impl.rs | 2 +- .../src/queue_paused_query_impl.rs | 4 +- parachain/primitives/core/src/outbound.rs | 35 +++++------ relayer/cmd/generate_beacon_data.go | 2 +- 5 files changed, 47 insertions(+), 54 deletions(-) diff --git a/parachain/Cargo.lock b/parachain/Cargo.lock index 4d7fc38a48..f7ce860f78 100644 --- a/parachain/Cargo.lock +++ b/parachain/Cargo.lock @@ -207,7 +207,7 @@ dependencies = [ "ark-bls12-377", "ark-ec", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -230,10 +230,10 @@ checksum = "b1dc4b3d08f19e8ec06e949712f95b8361e43f1391d94f65e4234df03480631c" dependencies = [ "ark-bls12-381", "ark-ec", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-serialize", - "ark-std", + "ark-serialize 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -244,8 +244,8 @@ checksum = "2e0605daf0cc5aa2034b78d008aaf159f56901d92a52ee4f6ecdfdac4f426700" dependencies = [ "ark-bls12-377", "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -256,9 +256,9 @@ checksum = "ccee5fba47266f460067588ee1bf070a9c760bf2050c1c509982c5719aadb4f2" dependencies = [ "ark-bw6-761", "ark-ec", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -287,8 +287,8 @@ checksum = "b10d901b9ac4b38f9c32beacedfadcdd64e46f8d7f8e88c1ae1060022cf6f6c6" dependencies = [ "ark-bls12-377", "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] @@ -299,9 +299,9 @@ checksum = "524a4fb7540df2e1a8c2e67a83ba1d1e6c3947f4f9342cc2359fc2e789ad731d" dependencies = [ "ark-ec", "ark-ed-on-bls12-377", - "ark-ff", + "ark-ff 0.4.2", "ark-models-ext", - "ark-std", + "ark-std 0.4.0", ] [[package]] @@ -316,6 +316,19 @@ dependencies = [ "ark-std 0.4.0", ] +[[package]] +name = "ark-ed-on-bls12-381-bandersnatch-ext" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" +dependencies = [ + "ark-ec", + "ark-ed-on-bls12-381-bandersnatch", + "ark-ff 0.4.2", + "ark-models-ext", + "ark-std 0.4.0", +] + [[package]] name = "ark-ff" version = "0.3.0" @@ -334,19 +347,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ark-ed-on-bls12-381-bandersnatch-ext" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15185f1acb49a07ff8cbe5f11a1adc5a93b19e211e325d826ae98e98e124346" -dependencies = [ - "ark-ec", - "ark-ed-on-bls12-381-bandersnatch", - "ark-ff", - "ark-models-ext", - "ark-std", -] - [[package]] name = "ark-ff" version = "0.4.2" @@ -419,9 +419,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e9eab5d4b5ff2f228b763d38442adc9b084b0a465409b059fac5c2308835ec2" dependencies = [ "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", ] @@ -1707,8 +1707,8 @@ name = "frame-support" version = "4.0.0-dev" dependencies = [ "aquamarine", - "bitflags 1.3.2", "array-bytes 6.1.0", + "bitflags 1.3.2", "docify", "environmental", "frame-metadata", diff --git a/parachain/pallets/outbound-queue/src/process_message_impl.rs b/parachain/pallets/outbound-queue/src/process_message_impl.rs index c74f94b731..6bda5a7879 100644 --- a/parachain/pallets/outbound-queue/src/process_message_impl.rs +++ b/parachain/pallets/outbound-queue/src/process_message_impl.rs @@ -17,7 +17,7 @@ impl ProcessMessage for Pallet { ) -> Result { let weight = T::WeightInfo::do_process_message(); if meter.try_consume(weight).is_err() { - return Err(ProcessMessageError::Overweight(weight)); + return Err(ProcessMessageError::Overweight(weight)) } Self::do_process_message(origin, message) } diff --git a/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs b/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs index 03aa05013f..e2f34edd65 100644 --- a/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs +++ b/parachain/pallets/outbound-queue/src/queue_paused_query_impl.rs @@ -13,10 +13,10 @@ where // 2. A higher-priority queue has pending messages if let Snowbridge(Sibling(_)) = origin { if Self::operating_mode().is_halted() { - return true; + return true } if PendingHighPriorityMessageCount::::get() > 0 { - return true; + return true } } diff --git a/parachain/primitives/core/src/outbound.rs b/parachain/primitives/core/src/outbound.rs index 23d95818e3..aa6470f87a 100644 --- a/parachain/primitives/core/src/outbound.rs +++ b/parachain/primitives/core/src/outbound.rs @@ -144,26 +144,23 @@ mod v1 { /// ABI-encode the Command. pub fn abi_encode(&self) -> Vec { match self { - Command::AgentExecute { agent_id, command } => { + Command::AgentExecute { agent_id, command } => ethabi::encode(&[Token::Tuple(vec![ Token::FixedBytes(agent_id.as_bytes().to_owned()), Token::Bytes(command.abi_encode()), - ])]) - }, - Command::Upgrade { impl_address, impl_code_hash, initializer, .. } => { + ])]), + Command::Upgrade { impl_address, impl_code_hash, initializer, .. } => ethabi::encode(&[Token::Tuple(vec![ Token::Address(*impl_address), Token::FixedBytes(impl_code_hash.as_bytes().to_owned()), initializer .clone() .map_or(Token::Bytes(vec![]), |i| Token::Bytes(i.params)), - ])]) - }, - Command::CreateAgent { agent_id } => { + ])]), + Command::CreateAgent { agent_id } => ethabi::encode(&[Token::Tuple(vec![Token::FixedBytes( agent_id.as_bytes().to_owned(), - )])]) - }, + )])]), Command::CreateChannel { para_id, agent_id } => { let para_id: u32 = (*para_id).into(); ethabi::encode(&[Token::Tuple(vec![ @@ -179,22 +176,19 @@ mod v1 { Token::Uint(U256::from(*fee)), ])]) }, - Command::SetOperatingMode { mode } => { - ethabi::encode(&[Token::Tuple(vec![Token::Uint(U256::from((*mode) as u64))])]) - }, - Command::TransferNativeFromAgent { agent_id, recipient, amount } => { + Command::SetOperatingMode { mode } => + ethabi::encode(&[Token::Tuple(vec![Token::Uint(U256::from((*mode) as u64))])]), + Command::TransferNativeFromAgent { agent_id, recipient, amount } => ethabi::encode(&[Token::Tuple(vec![ Token::FixedBytes(agent_id.as_bytes().to_owned()), Token::Address(*recipient), Token::Uint(U256::from(*amount)), - ])]) - }, - Command::SetTokenTransferFees { register, send } => { + ])]), + Command::SetTokenTransferFees { register, send } => ethabi::encode(&[Token::Tuple(vec![ Token::Uint(U256::from(*register)), Token::Uint(U256::from(*send)), - ])]) - }, + ])]), } } } @@ -234,7 +228,7 @@ mod v1 { /// ABI-encode the sub-command pub fn abi_encode(&self) -> Vec { match self { - AgentExecuteCommand::TransferToken { token, recipient, amount } => { + AgentExecuteCommand::TransferToken { token, recipient, amount } => ethabi::encode(&[ Token::Uint(self.index().into()), Token::Bytes(ethabi::encode(&[ @@ -242,8 +236,7 @@ mod v1 { Token::Address(*recipient), Token::Uint(U256::from(*amount)), ])), - ]) - }, + ]), } } } diff --git a/relayer/cmd/generate_beacon_data.go b/relayer/cmd/generate_beacon_data.go index 483fe733cd..f29df537ed 100644 --- a/relayer/cmd/generate_beacon_data.go +++ b/relayer/cmd/generate_beacon_data.go @@ -125,7 +125,7 @@ func generateBeaconCheckpoint(cmd *cobra.Command, _ []string) error { } checkPointBytes, _ := types.EncodeToBytes(checkPointScale) // Call index for EthereumBeaconClient.force_checkpoint - checkPointCallIndex := "0x3200" + checkPointCallIndex := "0x3900" checkPointUpdateCall := checkPointCallIndex + hex.EncodeToString(checkPointBytes) fmt.Println(checkPointUpdateCall) return nil From 89ec707f94d2369cfda727280c2c6bb5d3ea82de Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Fri, 10 Nov 2023 17:21:13 +0200 Subject: [PATCH 08/10] updates pallet indices --- relayer/cmd/generate_beacon_data.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relayer/cmd/generate_beacon_data.go b/relayer/cmd/generate_beacon_data.go index f29df537ed..bb626a77ec 100644 --- a/relayer/cmd/generate_beacon_data.go +++ b/relayer/cmd/generate_beacon_data.go @@ -125,7 +125,7 @@ func generateBeaconCheckpoint(cmd *cobra.Command, _ []string) error { } checkPointBytes, _ := types.EncodeToBytes(checkPointScale) // Call index for EthereumBeaconClient.force_checkpoint - checkPointCallIndex := "0x3900" + checkPointCallIndex := "0x3E00" checkPointUpdateCall := checkPointCallIndex + hex.EncodeToString(checkPointBytes) fmt.Println(checkPointUpdateCall) return nil From 1638d4422517f30caf6256ba404e317602300338 Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Mon, 13 Nov 2023 19:02:07 +0200 Subject: [PATCH 09/10] adds test back and fmt --- parachain/pallets/outbound-queue/src/lib.rs | 6 +++--- parachain/pallets/outbound-queue/src/send_message_impl.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/parachain/pallets/outbound-queue/src/lib.rs b/parachain/pallets/outbound-queue/src/lib.rs index a43793cca5..b14cb52d7a 100644 --- a/parachain/pallets/outbound-queue/src/lib.rs +++ b/parachain/pallets/outbound-queue/src/lib.rs @@ -313,7 +313,7 @@ pub mod pallet { pub(crate) fn commit() { let count = MessageLeaves::::decode_len().unwrap_or_default() as u64; if count == 0 { - return; + return } // Create merkle root of messages @@ -337,8 +337,8 @@ pub mod pallet { // Yield if the maximum number of messages has been processed this block. // This ensures that the weight of `on_finalize` has a known maximum bound. ensure!( - MessageLeaves::::decode_len().unwrap_or(0) - < T::MaxMessagesPerBlock::get() as usize, + MessageLeaves::::decode_len().unwrap_or(0) < + T::MaxMessagesPerBlock::get() as usize, Yield ); diff --git a/parachain/pallets/outbound-queue/src/send_message_impl.rs b/parachain/pallets/outbound-queue/src/send_message_impl.rs index c400dfaebc..8a8fedff5a 100644 --- a/parachain/pallets/outbound-queue/src/send_message_impl.rs +++ b/parachain/pallets/outbound-queue/src/send_message_impl.rs @@ -13,8 +13,8 @@ use frame_support::{ }; use frame_system::unique; use snowbridge_core::outbound::{ - AggregateMessageOrigin, ExportOrigin, Fee, Message, QueuedMessage, SendError, SendMessage, - SendMessageFeeProvider, VersionedQueuedMessage, + Fee, Message, QueuedMessage, SendError, SendMessage, SendMessageFeeProvider, + VersionedQueuedMessage, }; use sp_core::H256; use sp_runtime::BoundedVec; From a924c7a97084b93a8a4712b1fda5b71711d1f987 Mon Sep 17 00:00:00 2001 From: Alistair Singh Date: Tue, 14 Nov 2023 14:26:40 +0200 Subject: [PATCH 10/10] update zombienet --- polkadot-sdk | 2 +- web/packages/api/package.json | 16 +- web/packages/test-helpers/package.json | 22 +- .../src/generateBeefyCheckpoint.ts | 9 +- web/packages/test/package.json | 13 +- web/packages/test/scripts/deploy-polkadot.sh | 2 +- web/pnpm-lock.yaml | 1271 +++++++++-------- 7 files changed, 684 insertions(+), 651 deletions(-) diff --git a/polkadot-sdk b/polkadot-sdk index 018e50ab6d..9846b377b1 160000 --- a/polkadot-sdk +++ b/polkadot-sdk @@ -1 +1 @@ -Subproject commit 018e50ab6d10691dbb63e66ab31aa081be0713f3 +Subproject commit 9846b377b1f9098158b1982aca711137d4c4e7c4 diff --git a/web/packages/api/package.json b/web/packages/api/package.json index 6159bb6db1..bf7841a7f3 100644 --- a/web/packages/api/package.json +++ b/web/packages/api/package.json @@ -22,18 +22,18 @@ "eslint-config-prettier": "^8.5.0", "prettier": "^2.7.1", "ts-node": "^10.9.1", - "typescript": "^5.1.6", - "tsconfig-paths": "^4.2.0" + "tsconfig-paths": "^4.2.0", + "typescript": "^5.1.6" }, "dependencies": { - "@polkadot/api": "^10.9.1", - "@polkadot/types": "^10.9.1", - "@snowbridge/contract-types": "workspace:*", - "@typechain/ethers-v5": "^11.1.1", - "ethers": "^5.7.0", + "@ethersproject/abi": "^5.7.0", "@ethersproject/bytes": "^5.7.0", "@ethersproject/providers": "^5.7.0", "@ethersproject/units": "^5.7.0", - "@ethersproject/abi": "^5.7.0" + "@polkadot/api": "^10.10.1", + "@polkadot/types": "^10.10.1", + "@snowbridge/contract-types": "workspace:*", + "@typechain/ethers-v5": "^11.1.1", + "ethers": "^5.7.0" } } diff --git a/web/packages/test-helpers/package.json b/web/packages/test-helpers/package.json index 86c28c7a5f..9bc6bda851 100644 --- a/web/packages/test-helpers/package.json +++ b/web/packages/test-helpers/package.json @@ -22,33 +22,33 @@ "eslint": "^8.26.0", "eslint-config-prettier": "^8.5.0", "ts-node": "^10.9.1", - "typescript": "^5.1.6", - "tsconfig-paths": "^4.2.0" + "tsconfig-paths": "^4.2.0", + "typescript": "^5.1.6" }, "dependencies": { - "bitfield": "^4.1.0", "@ethersproject/abi": "^5.0.0", - "@polkadot/api": "^10.9.1", - "@polkadot/types": "^10.9.1", + "@ethersproject/bytes": "^5.0.0", + "@ethersproject/providers": "^5.4.7", + "@ethersproject/units": "^5.4.7", + "@polkadot/api": "^10.10.1", + "@polkadot/types": "^10.10.1", "@polkadot/types-codec": "^10.9.1", + "@snowbridge/contract-types": "workspace:*", "@typechain/ethers-v5": "^10.1.1", "@types/keccak": "^3.0.1", "@types/lodash": "^4.14.186", "@types/node": "^18.13.0", "@types/secp256k1": "^4.0.3", "@types/seedrandom": "^3.0.2", - "@ethersproject/bytes": "^5.0.0", - "@ethersproject/providers": "^5.4.7", - "@ethersproject/units": "^5.4.7", - "ethers": "^5.7.2", + "bitfield": "^4.1.0", "ethereumjs-abi": "^0.6.8", "ethereumjs-util": "^7.0.10", + "ethers": "^5.7.2", "keccak": "^3.0.2", "lodash": "^4.17.21", "merkletreejs": "^0.2.18", "rlp": "^2.2.6", "secp256k1": "^4.0.2", - "seedrandom": "^3.0.5", - "@snowbridge/contract-types": "workspace:*" + "seedrandom": "^3.0.5" } } diff --git a/web/packages/test-helpers/src/generateBeefyCheckpoint.ts b/web/packages/test-helpers/src/generateBeefyCheckpoint.ts index a3c5ee47e1..f624cf8581 100755 --- a/web/packages/test-helpers/src/generateBeefyCheckpoint.ts +++ b/web/packages/test-helpers/src/generateBeefyCheckpoint.ts @@ -4,16 +4,15 @@ import createKeccakHash from "keccak" import { publicKeyConvert } from "secp256k1" import type { ValidatorSetId, - BeefyNextAuthoritySet, BeefyId, } from "@polkadot/types/interfaces/beefy/types" import fs from "fs" import path from "path" -import {u32, u64} from "@polkadot/types-codec"; -import {H256} from "@polkadot/types/interfaces"; -import {Codec} from "@polkadot/types-codec/types"; +import { u32, u64 } from "@polkadot/types-codec"; +import { H256 } from "@polkadot/types/interfaces"; +import { Struct } from "@polkadot/types"; -interface NextAuthoritySet extends Codec{ +interface NextAuthoritySet extends Struct { id: u64; len: u32; keysetCommitment: H256; diff --git a/web/packages/test/package.json b/web/packages/test/package.json index 4f92dec59f..70937d4c4d 100644 --- a/web/packages/test/package.json +++ b/web/packages/test/package.json @@ -10,15 +10,16 @@ }, "devDependencies": { "@chainsafe/lodestar": "1.8.0", - "@polkadot/api": "^10.7.1", + "@polkadot/api": "^10.10.1", "@polkadot/api-cli": "^0.54.4", - "@polkadot/types": "^10.7.1", - "@polkadot/util": "^12.2.1", - "@polkadot/util-crypto": "^12.2.1", + "@polkadot/keyring": "^12.5.1", + "@polkadot/types": "^10.10.1", + "@polkadot/util": "^12.5.1", + "@polkadot/util-crypto": "^12.5.1", "@types/keccak": "^3.0.1", "@types/node": "^18.16.8", "@types/yargs": "^17.0.24", - "@zombienet/cli": "^1.3.52", + "@zombienet/cli": "^1.3.79", "bignumber.js": "^9.1.1", "bn.js": "^5.2.1", "c-kzg": "^1.1.3", @@ -27,7 +28,7 @@ "chai-bignumber": "^3.1.0", "esm": "^3.2.25", "ethers": "^5.7.2", - "fastify": "3.15.1", + "fastify": "4.24.3", "keccak": "^3.0.3", "mocha": "^8.4.0", "node-fetch": "^3.3.1", diff --git a/web/packages/test/scripts/deploy-polkadot.sh b/web/packages/test/scripts/deploy-polkadot.sh index 2e6df644d8..7090decf80 100755 --- a/web/packages/test/scripts/deploy-polkadot.sh +++ b/web/packages/test/scripts/deploy-polkadot.sh @@ -4,7 +4,7 @@ set -eu source scripts/set-env.sh zombienet_launch() { - zombienet-macos spawn config/launch-config.toml --provider=native --dir="$zombienet_data_dir" 2>&1 & + npx zombienet spawn config/launch-config.toml --provider=native --dir="$zombienet_data_dir" 2>&1 & scripts/wait-for-it.sh -t 120 127.0.0.1:13144 } diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index d7496f5a61..12ade7b2ed 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -30,17 +30,17 @@ importers: specifier: ^5.7.0 version: 5.7.0 '@polkadot/api': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/types': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@snowbridge/contract-types': specifier: workspace:* version: link:../contract-types '@typechain/ethers-v5': specifier: ^11.1.1 - version: 11.1.1(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.1)(typescript@5.1.6) + version: 11.1.1(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.1.6) ethers: specifier: ^5.7.0 version: 5.7.2 @@ -111,22 +111,25 @@ importers: devDependencies: '@chainsafe/lodestar': specifier: 1.8.0 - version: 1.8.0(c-kzg@1.1.3)(fastify@3.15.1) + version: 1.8.0(c-kzg@1.1.3)(fastify@4.24.3) '@polkadot/api': - specifier: ^10.7.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/api-cli': specifier: ^0.54.4 version: 0.54.4 + '@polkadot/keyring': + specifier: ^12.5.1 + version: 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/types': - specifier: ^10.7.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/util': - specifier: ^12.2.1 - version: 12.3.2 + specifier: ^12.5.1 + version: 12.5.1 '@polkadot/util-crypto': - specifier: ^12.2.1 - version: 12.3.2(@polkadot/util@12.3.2) + specifier: ^12.5.1 + version: 12.5.1(@polkadot/util@12.5.1) '@types/keccak': specifier: ^3.0.1 version: 3.0.1 @@ -137,8 +140,8 @@ importers: specifier: ^17.0.24 version: 17.0.24 '@zombienet/cli': - specifier: ^1.3.52 - version: 1.3.63(@polkadot/util@12.3.2)(@types/node@18.16.8) + specifier: ^1.3.79 + version: 1.3.79(@polkadot/util@12.5.1)(@types/node@18.16.8) bignumber.js: specifier: ^9.1.1 version: 9.1.1 @@ -164,8 +167,8 @@ importers: specifier: ^5.7.2 version: 5.7.2 fastify: - specifier: 3.15.1 - version: 3.15.1 + specifier: 4.24.3 + version: 4.24.3 keccak: specifier: ^3.0.3 version: 3.0.3 @@ -206,11 +209,11 @@ importers: specifier: ^5.4.7 version: 5.7.0 '@polkadot/api': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/types': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/types-codec': specifier: ^10.9.1 version: 10.9.1 @@ -219,7 +222,7 @@ importers: version: link:../contract-types '@typechain/ethers-v5': specifier: ^10.1.1 - version: 10.1.1(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.1)(typescript@5.1.6) + version: 10.1.1(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.1.6) '@types/keccak': specifier: ^3.0.1 version: 3.0.1 @@ -423,7 +426,7 @@ packages: /@chainsafe/fast-crc32c@4.0.0: resolution: {integrity: sha512-N4gUwrL3yGgLgbXsCZObUh+RZw9aIA1yQ41yH/2V4MFYUj90LCTv8IfZmqIes5VLcEQ2kgPSs34OTmQRrG4PHQ==} optionalDependencies: - '@node-rs/crc32': 1.7.0 + '@node-rs/crc32': 1.7.2 dev: true /@chainsafe/is-ip@2.0.1: @@ -489,7 +492,7 @@ packages: - supports-color dev: true - /@chainsafe/lodestar@1.8.0(c-kzg@1.1.3)(fastify@3.15.1): + /@chainsafe/lodestar@1.8.0(c-kzg@1.1.3)(fastify@4.24.3): resolution: {integrity: sha512-ckFCz6bx1nteXrHaAOcQoEFfu1sdnW6hyMuzZv2ugd6SLHgrmmSkDa7kka2e8TcFJVJtqrXDohTd09muOWtBjg==} hasBin: true dependencies: @@ -501,16 +504,16 @@ packages: '@chainsafe/discv5': 3.0.0 '@chainsafe/ssz': 0.10.2 '@libp2p/peer-id-factory': 2.0.3 - '@lodestar/api': 1.8.0(fastify@3.15.1) + '@lodestar/api': 1.8.0(fastify@4.24.3) '@lodestar/beacon-node': 1.8.0(@chainsafe/blst@0.2.8)(c-kzg@1.1.3) '@lodestar/config': 1.8.0 '@lodestar/db': 1.8.0 - '@lodestar/light-client': 1.8.0(@chainsafe/blst@0.2.8)(fastify@3.15.1) + '@lodestar/light-client': 1.8.0(@chainsafe/blst@0.2.8)(fastify@4.24.3) '@lodestar/params': 1.8.0 '@lodestar/state-transition': 1.8.0(@chainsafe/blst@0.2.8) '@lodestar/types': 1.8.0 '@lodestar/utils': 1.8.0 - '@lodestar/validator': 1.8.0(@chainsafe/blst@0.2.8)(fastify@3.15.1) + '@lodestar/validator': 1.8.0(@chainsafe/blst@0.2.8)(fastify@4.24.3) '@multiformats/multiaddr': 11.6.1 '@types/lockfile': 1.0.2 bip39: 3.1.0 @@ -917,7 +920,7 @@ packages: dependencies: ajv: 8.12.0 ajv-formats: 2.1.1(ajv@8.12.0) - fast-uri: 2.2.0 + fast-uri: 2.3.0 dev: true /@fastify/bearer-auth@9.0.0: @@ -937,26 +940,14 @@ packages: resolution: {integrity: sha512-J8TOSBq3SoZbDhM9+R/u77hP93gz/rajSA+K2kGyijPpORPWUXHUpTaleoj+92As0S9uPRP7Oi8IqMf0u+ro6A==} dev: true - /@fastify/error@3.2.0: - resolution: {integrity: sha512-KAfcLa+CnknwVi5fWogrLXgidLic+GXnLjijXdpl8pvkvbXU5BGa37iZO9FGvsh9ZL4y+oFi5cbHBm5UOG+dmQ==} + /@fastify/error@3.4.1: + resolution: {integrity: sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ==} dev: true /@fastify/fast-json-stringify-compiler@4.3.0: resolution: {integrity: sha512-aZAXGYo6m22Fk1zZzEUKBvut/CIIQe/BapEORnxiD5Qr0kPHqqI69NtEMCme74h+at72sPhbkb4ZrLd1W3KRLA==} dependencies: - fast-json-stringify: 5.7.0 - dev: true - - /@fastify/forwarded@1.0.0: - resolution: {integrity: sha512-VoO+6WD0aRz8bwgJZ8pkkxjq7o/782cQ1j945HWg0obZMgIadYW3Pew0+an+k1QL7IPZHM3db5WF6OP6x4ymMA==} - engines: {node: '>= 10'} - dev: true - - /@fastify/proxy-addr@3.0.0: - resolution: {integrity: sha512-ty7wnUd/GeSqKTC2Jozsl5xGbnxUnEFC0On2/zPv/8ixywipQmVZwuWvNGnBoitJ2wixwVqofwXNua8j6Y62lQ==} - dependencies: - '@fastify/forwarded': 1.0.0 - ipaddr.js: 2.0.1 + fast-json-stringify: 5.9.1 dev: true /@gar/promisify@1.1.3: @@ -1565,7 +1556,7 @@ packages: - supports-color dev: true - /@lodestar/api@1.8.0(fastify@3.15.1): + /@lodestar/api@1.8.0(fastify@4.24.3): resolution: {integrity: sha512-Jdf2YQZx7ISd2ECCiGX3bhKFfsH/5jLq5hWoLLlbJtYAzDLH2pS0idV+eiXzR+W6alcI8J03mfQvgM+rc8MSLA==} peerDependencies: fastify: ^4.15.0 @@ -1578,26 +1569,7 @@ packages: '@lodestar/utils': 1.8.0 cross-fetch: 3.1.6 eventsource: 2.0.2 - fastify: 3.15.1 - qs: 6.11.2 - transitivePeerDependencies: - - encoding - dev: true - - /@lodestar/api@1.8.0(fastify@4.17.0): - resolution: {integrity: sha512-Jdf2YQZx7ISd2ECCiGX3bhKFfsH/5jLq5hWoLLlbJtYAzDLH2pS0idV+eiXzR+W6alcI8J03mfQvgM+rc8MSLA==} - peerDependencies: - fastify: ^4.15.0 - dependencies: - '@chainsafe/persistent-merkle-tree': 0.5.0 - '@chainsafe/ssz': 0.10.2 - '@lodestar/config': 1.8.0 - '@lodestar/params': 1.8.0 - '@lodestar/types': 1.8.0 - '@lodestar/utils': 1.8.0 - cross-fetch: 3.1.6 - eventsource: 2.0.2 - fastify: 4.17.0 + fastify: 4.24.3 qs: 6.11.2 transitivePeerDependencies: - encoding @@ -1632,17 +1604,17 @@ packages: '@libp2p/peer-id-factory': 2.0.3 '@libp2p/prometheus-metrics': 1.1.4(prom-client@14.2.0) '@libp2p/tcp': 6.1.0 - '@lodestar/api': 1.8.0(fastify@4.17.0) + '@lodestar/api': 1.8.0(fastify@4.24.3) '@lodestar/config': 1.8.0 '@lodestar/db': 1.8.0 '@lodestar/fork-choice': 1.8.0(@chainsafe/blst@0.2.8) - '@lodestar/light-client': 1.8.0(@chainsafe/blst@0.2.8)(fastify@4.17.0) + '@lodestar/light-client': 1.8.0(@chainsafe/blst@0.2.8)(fastify@4.24.3) '@lodestar/params': 1.8.0 '@lodestar/reqresp': 1.8.0(libp2p@0.42.2) '@lodestar/state-transition': 1.8.0(@chainsafe/blst@0.2.8) '@lodestar/types': 1.8.0 '@lodestar/utils': 1.8.0 - '@lodestar/validator': 1.8.0(@chainsafe/blst@0.2.8)(fastify@4.17.0) + '@lodestar/validator': 1.8.0(@chainsafe/blst@0.2.8)(fastify@4.24.3) '@multiformats/multiaddr': 11.6.1 '@types/datastore-level': 3.0.0 buffer-xor: 2.0.2 @@ -1651,7 +1623,7 @@ packages: datastore-core: 8.0.4 datastore-level: 9.0.4 deepmerge: 4.3.1 - fastify: 4.17.0 + fastify: 4.24.3 gc-stats: 1.4.0 interface-datastore: 7.0.4 it-all: 3.0.2 @@ -1707,34 +1679,13 @@ packages: - '@chainsafe/blst' dev: true - /@lodestar/light-client@1.8.0(@chainsafe/blst@0.2.8)(fastify@3.15.1): - resolution: {integrity: sha512-AyXSjKj2i0GtsYWsShmk2gpN9nZOh3nAMNUoXNZzxvyjAReABtlHwvmsMzGiA2DmyX4usuxFJEdDwNIRFBniZA==} - dependencies: - '@chainsafe/bls': 7.1.1(@chainsafe/blst@0.2.8) - '@chainsafe/persistent-merkle-tree': 0.5.0 - '@chainsafe/ssz': 0.10.2 - '@lodestar/api': 1.8.0(fastify@3.15.1) - '@lodestar/config': 1.8.0 - '@lodestar/params': 1.8.0 - '@lodestar/state-transition': 1.8.0(@chainsafe/blst@0.2.8) - '@lodestar/types': 1.8.0 - '@lodestar/utils': 1.8.0 - cross-fetch: 3.1.6 - mitt: 3.0.0 - strict-event-emitter-types: 2.0.0 - transitivePeerDependencies: - - '@chainsafe/blst' - - encoding - - fastify - dev: true - - /@lodestar/light-client@1.8.0(@chainsafe/blst@0.2.8)(fastify@4.17.0): + /@lodestar/light-client@1.8.0(@chainsafe/blst@0.2.8)(fastify@4.24.3): resolution: {integrity: sha512-AyXSjKj2i0GtsYWsShmk2gpN9nZOh3nAMNUoXNZzxvyjAReABtlHwvmsMzGiA2DmyX4usuxFJEdDwNIRFBniZA==} dependencies: '@chainsafe/bls': 7.1.1(@chainsafe/blst@0.2.8) '@chainsafe/persistent-merkle-tree': 0.5.0 '@chainsafe/ssz': 0.10.2 - '@lodestar/api': 1.8.0(fastify@4.17.0) + '@lodestar/api': 1.8.0(fastify@4.24.3) '@lodestar/config': 1.8.0 '@lodestar/params': 1.8.0 '@lodestar/state-transition': 1.8.0(@chainsafe/blst@0.2.8) @@ -1812,33 +1763,12 @@ packages: winston: 3.8.2 dev: true - /@lodestar/validator@1.8.0(@chainsafe/blst@0.2.8)(fastify@3.15.1): + /@lodestar/validator@1.8.0(@chainsafe/blst@0.2.8)(fastify@4.24.3): resolution: {integrity: sha512-5c/kOVioiVsau6DEybK85D6DuLyGU/o4IR0DbTA4xI3lP4TtXQ1pRiqFhFhWh7LF8mTdrcoiSdV/0+aOruY3jw==} dependencies: '@chainsafe/bls': 7.1.1(@chainsafe/blst@0.2.8) '@chainsafe/ssz': 0.10.2 - '@lodestar/api': 1.8.0(fastify@3.15.1) - '@lodestar/config': 1.8.0 - '@lodestar/db': 1.8.0 - '@lodestar/params': 1.8.0 - '@lodestar/state-transition': 1.8.0(@chainsafe/blst@0.2.8) - '@lodestar/types': 1.8.0 - '@lodestar/utils': 1.8.0 - bigint-buffer: 1.1.5 - cross-fetch: 3.1.6 - strict-event-emitter-types: 2.0.0 - transitivePeerDependencies: - - '@chainsafe/blst' - - encoding - - fastify - dev: true - - /@lodestar/validator@1.8.0(@chainsafe/blst@0.2.8)(fastify@4.17.0): - resolution: {integrity: sha512-5c/kOVioiVsau6DEybK85D6DuLyGU/o4IR0DbTA4xI3lP4TtXQ1pRiqFhFhWh7LF8mTdrcoiSdV/0+aOruY3jw==} - dependencies: - '@chainsafe/bls': 7.1.1(@chainsafe/blst@0.2.8) - '@chainsafe/ssz': 0.10.2 - '@lodestar/api': 1.8.0(fastify@4.17.0) + '@lodestar/api': 1.8.0(fastify@4.24.3) '@lodestar/config': 1.8.0 '@lodestar/db': 1.8.0 '@lodestar/params': 1.8.0 @@ -1900,10 +1830,10 @@ packages: - supports-color dev: true - /@noble/curves@1.1.0: - resolution: {integrity: sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==} + /@noble/curves@1.2.0: + resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} dependencies: - '@noble/hashes': 1.3.1 + '@noble/hashes': 1.3.2 /@noble/ed25519@1.7.3: resolution: {integrity: sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==} @@ -1912,13 +1842,18 @@ packages: /@noble/hashes@1.3.1: resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} engines: {node: '>= 16'} + dev: true + + /@noble/hashes@1.3.2: + resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} + engines: {node: '>= 16'} /@noble/secp256k1@1.7.1: resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} dev: true - /@node-rs/crc32-android-arm-eabi@1.7.0: - resolution: {integrity: sha512-a0ligyBGOUT3xcVPo9Ozt2KdrmHFu9jYj2dxqxWFndEM+R6576tOAq2xBIotmpRgKK30KObPz83FFyul1rksbQ==} + /@node-rs/crc32-android-arm-eabi@1.7.2: + resolution: {integrity: sha512-6IoXQTHt9U/1Ejz/MPbAk3mtcAGcS1WUvg2YfEtezLCmzbDpQO3OTA9fZpu3z2AhBuLHiKMKDVcfrWybRiWBJw==} engines: {node: '>= 10'} cpu: [arm] os: [android] @@ -1926,8 +1861,8 @@ packages: dev: true optional: true - /@node-rs/crc32-android-arm64@1.7.0: - resolution: {integrity: sha512-UU0vc7mERSd+SbuKU1uuB3t+t2PS89Z2ehmSwqMfFewIPTLno5OkO7VeNdDSp+qrOv0f/mbB+j2LMhYOIxAU9Q==} + /@node-rs/crc32-android-arm64@1.7.2: + resolution: {integrity: sha512-SMEd6cN+034LTv9kFmCGMZjBNTf39xXIcgqq05JM9A55ywUvXdoXnFOttrQ9x/iZgqANNU6Ms5uZCAJbNA2dZA==} engines: {node: '>= 10'} cpu: [arm64] os: [android] @@ -1935,8 +1870,8 @@ packages: dev: true optional: true - /@node-rs/crc32-darwin-arm64@1.7.0: - resolution: {integrity: sha512-VJVi5VSihwXz2fwkYaxypR+WaqTtNGJlC3UEN+R41ftvpZ8U/tp48hjLGnWcPApAfnhBEOrEvnpH2Tv4+XVW/Q==} + /@node-rs/crc32-darwin-arm64@1.7.2: + resolution: {integrity: sha512-sPJisK5pyZ+iBs9KuGsvu0Z+Qshw4GvOgaHjPktQ+suz0p00Yts3zl5D6PpGaaW4EAKTo8zCUIlVEArV0vglvw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1944,8 +1879,8 @@ packages: dev: true optional: true - /@node-rs/crc32-darwin-x64@1.7.0: - resolution: {integrity: sha512-6W6mPsUB5612A3VIOIVOiWsjtV34Efo4DC7+/Hg/l14F0xVh2agJA8wMpq8jByPZNZ+LV3kunCR7HB2hGY68YQ==} + /@node-rs/crc32-darwin-x64@1.7.2: + resolution: {integrity: sha512-+/lgHYJaZdXU+7fhGYTnXvGkeSqZE3UwPyKAUO5YSL0nIpFHMybZMnvqjcoxrfx0QfMFOwVEbd7vfVh+1GpwhA==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1953,8 +1888,8 @@ packages: dev: true optional: true - /@node-rs/crc32-freebsd-x64@1.7.0: - resolution: {integrity: sha512-Roua2jhneDWnKMRoJI7ruHeiimkrbd6U2c0+S42AgL4Io4177B7+DVZoebHvW0ozuAQFqYj9WE8R/uXU88mcpA==} + /@node-rs/crc32-freebsd-x64@1.7.2: + resolution: {integrity: sha512-OgkxnkiGdztcBilm7m31Sb6zx89ghK4WpZz9WVVU86PIHQH0sfrZEebdomw6R7mMnQuqbnRwjTS5r1nchVMPzQ==} engines: {node: '>= 10'} cpu: [x64] os: [freebsd] @@ -1962,8 +1897,8 @@ packages: dev: true optional: true - /@node-rs/crc32-linux-arm-gnueabihf@1.7.0: - resolution: {integrity: sha512-6jB+NWDnlcA3tuo9cLCmj2h53btYBurdkHfbcg6RasP0i1c7azE5+J7NXXZyZhUHmzmbf7P+ce6gG3PRQl8ncA==} + /@node-rs/crc32-linux-arm-gnueabihf@1.7.2: + resolution: {integrity: sha512-hTY83MQML8WrMnD3dmzjrcCn0Sqgw0w2wRc1Ji2dCaE0fDqra47W5KBQXx4hKZYFwNr5KreTqdvD3Ejf/mKzEA==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -1971,8 +1906,8 @@ packages: dev: true optional: true - /@node-rs/crc32-linux-arm64-gnu@1.7.0: - resolution: {integrity: sha512-ZrlmD+sEyuDNQ+SibtwCy1dUn0hD7AM2YYovL5qw7sX6moqodloaipAAlDTyah2YGnhPKZMklgR2dxxj5Um1ag==} + /@node-rs/crc32-linux-arm64-gnu@1.7.2: + resolution: {integrity: sha512-4p6DZ9YT+CBSi+72OclzI5hBin15brqrbLLHFePPl4AhAazg6+ReTv3C4DnyJqyL0ZHZamiA9zDtOlvHo0nk0Q==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1980,8 +1915,8 @@ packages: dev: true optional: true - /@node-rs/crc32-linux-arm64-musl@1.7.0: - resolution: {integrity: sha512-81s43ZWAB9xxn4lyyjUlLSXKov1iMkS1RBrfgKXGtaVQLHB0c39qYL4rPvSwicEO3DvZsmHKASlGDgTctl5oag==} + /@node-rs/crc32-linux-arm64-musl@1.7.2: + resolution: {integrity: sha512-/shZkkNyDyDjaxU5rYFY4aoajLjBqdfKQYZCcA6XS27FiGzHQ3petgP0I5Zjm+Jf75G7gLT8NQXiQWIzkgo2xw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1989,8 +1924,8 @@ packages: dev: true optional: true - /@node-rs/crc32-linux-x64-gnu@1.7.0: - resolution: {integrity: sha512-MpMThABlKf0WDKnJdJ26mUGYTnMOnupNiGKessH93UgyEjq9gZBpbtuXE/9N8PoAl5ItyjjmCsg1g4ZVjuqb6w==} + /@node-rs/crc32-linux-x64-gnu@1.7.2: + resolution: {integrity: sha512-rzoqXqPLjx5sx8jzEg/xRAdBDkjnaM+D3Nrm9xJckHWzeeUB0FC0E4QGrdtqFo15lQ1GDVV/q6n93mLSK5vCkQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1998,8 +1933,8 @@ packages: dev: true optional: true - /@node-rs/crc32-linux-x64-musl@1.7.0: - resolution: {integrity: sha512-9EvPtWTLCsxyuNBz7/uLKDlSowgIHZeQRN/lQhw4ez/r6vKE5VQpS8ZtXlAUcSGoloXNxpZ/6zIcv21J7KWhzQ==} + /@node-rs/crc32-linux-x64-musl@1.7.2: + resolution: {integrity: sha512-Hwim1Wc8LoNqG53qX8Dm3VY32ClbKWpdi9pkbJU4/aG5RFUfd3k/x9WSeATlBx+K36Tc1XsrWvbsf1eWwryEYA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -2007,8 +1942,8 @@ packages: dev: true optional: true - /@node-rs/crc32-win32-arm64-msvc@1.7.0: - resolution: {integrity: sha512-i/IC2TrEBJ3tr44leBUejLbfK22EY7s6AWngspLejh81obvC4GUAUPn13HaNBcTtngjWwLX+V+Q97ibmCNEshA==} + /@node-rs/crc32-win32-arm64-msvc@1.7.2: + resolution: {integrity: sha512-vj+HWzwy86wNBY+1vW+QPje/MrJppufGCYIisFwvghBzk6WtClNGEjbQqotieIxDNohcmHREQEeg8wY8PMCvew==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -2016,8 +1951,8 @@ packages: dev: true optional: true - /@node-rs/crc32-win32-ia32-msvc@1.7.0: - resolution: {integrity: sha512-nI5MiJfPDX0elHE/sDJGNWNlIYLORKRxhPTLvMp3Z+IdiUHu+6BrH21ymCN5ap+k45acUKAUOb7d9ctjN+9jBg==} + /@node-rs/crc32-win32-ia32-msvc@1.7.2: + resolution: {integrity: sha512-YQQtPkHvqbMEJmaMzEH3diYHk0q9zWb+Tkzij9d4OZZzpt4HM6j8FuiIB37BJ0CQmgMiDZEBYsX3KOfYxxO0VA==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -2025,8 +1960,8 @@ packages: dev: true optional: true - /@node-rs/crc32-win32-x64-msvc@1.7.0: - resolution: {integrity: sha512-TdRNLPQ7DCt401nKU0c9ZbG8ITRO9WG7bV3Xgwgd8eK/jvfuqNC0Oy1o8uTzuagUqqAMXuSNbZ2nsDKARTzvHQ==} + /@node-rs/crc32-win32-x64-msvc@1.7.2: + resolution: {integrity: sha512-DnluAFM6X8qsYVI1VaFQtI6ukigIQ2P4eVcEuNQ3d1lF5fs0RYAKY7Ajqrdk298TSGZ2joMiqfJksTHBsQoxtA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -2034,24 +1969,24 @@ packages: dev: true optional: true - /@node-rs/crc32@1.7.0: - resolution: {integrity: sha512-cEvvgaA+amK2LO54E3eHFlXg9kqXR27qTRaQjJyW0Ra2x+aAdbio7CICy7JughiYv6f/79FrTpYdtmsW9jkHjA==} + /@node-rs/crc32@1.7.2: + resolution: {integrity: sha512-SmWxRftq+zYSv4qfhdFHM8ruBqY8eVTnIs43dFUWAyD0x6a7LpzNd8KHWqKxlaly8QGpGxBv2Dol/3gs5DeknA==} engines: {node: '>= 10'} requiresBuild: true optionalDependencies: - '@node-rs/crc32-android-arm-eabi': 1.7.0 - '@node-rs/crc32-android-arm64': 1.7.0 - '@node-rs/crc32-darwin-arm64': 1.7.0 - '@node-rs/crc32-darwin-x64': 1.7.0 - '@node-rs/crc32-freebsd-x64': 1.7.0 - '@node-rs/crc32-linux-arm-gnueabihf': 1.7.0 - '@node-rs/crc32-linux-arm64-gnu': 1.7.0 - '@node-rs/crc32-linux-arm64-musl': 1.7.0 - '@node-rs/crc32-linux-x64-gnu': 1.7.0 - '@node-rs/crc32-linux-x64-musl': 1.7.0 - '@node-rs/crc32-win32-arm64-msvc': 1.7.0 - '@node-rs/crc32-win32-ia32-msvc': 1.7.0 - '@node-rs/crc32-win32-x64-msvc': 1.7.0 + '@node-rs/crc32-android-arm-eabi': 1.7.2 + '@node-rs/crc32-android-arm64': 1.7.2 + '@node-rs/crc32-darwin-arm64': 1.7.2 + '@node-rs/crc32-darwin-x64': 1.7.2 + '@node-rs/crc32-freebsd-x64': 1.7.2 + '@node-rs/crc32-linux-arm-gnueabihf': 1.7.2 + '@node-rs/crc32-linux-arm64-gnu': 1.7.2 + '@node-rs/crc32-linux-arm64-musl': 1.7.2 + '@node-rs/crc32-linux-x64-gnu': 1.7.2 + '@node-rs/crc32-linux-x64-musl': 1.7.2 + '@node-rs/crc32-win32-arm64-msvc': 1.7.2 + '@node-rs/crc32-win32-ia32-msvc': 1.7.2 + '@node-rs/crc32-win32-x64-msvc': 1.7.2 dev: true optional: true @@ -2092,31 +2027,31 @@ packages: rimraf: 3.0.2 dev: true - /@polkadot/api-augment@10.9.1: - resolution: {integrity: sha512-kRZZvCFVcN4hAH4dJ+Qzfdy27/4EEq3oLDf3ihj0LTVrAezSWcKPGE3EVFy+Mn6Lo4SUc7RVyoKvIUhSk2l4Dg==} + /@polkadot/api-augment@10.10.1: + resolution: {integrity: sha512-J0r1DT1M5y75iO1iwcpUBokKD3q6b22kWlPfiHEDNFydVw5vm7OTRBk9Njjl8rOnlSzcW/Ya8qWfV/wkrqHxUQ==} engines: {node: '>=16'} dependencies: - '@polkadot/api-base': 10.9.1 - '@polkadot/rpc-augment': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.3.2 - tslib: 2.6.1 + '@polkadot/api-base': 10.10.1 + '@polkadot/rpc-augment': 10.10.1 + '@polkadot/types': 10.10.1 + '@polkadot/types-augment': 10.10.1 + '@polkadot/types-codec': 10.10.1 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - /@polkadot/api-base@10.9.1: - resolution: {integrity: sha512-Q3m2KzlceMK2kX8bhnUZWk3RT6emmijeeFZZQgCePpEcrSeNjnqG4qjuTPgkveaOkUT8MAoDc5Avuzcc2jlW9g==} + /@polkadot/api-base@10.10.1: + resolution: {integrity: sha512-joH2Ywxnn+AStkw+JWAdF3i3WJy4NcBYp0SWJM/WqGafWR/FuHnati2pcj/MHzkHT8JkBippmSSJFvsqRhlwcQ==} engines: {node: '>=16'} dependencies: - '@polkadot/rpc-core': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/util': 12.3.2 + '@polkadot/rpc-core': 10.10.1 + '@polkadot/types': 10.10.1 + '@polkadot/util': 12.5.1 rxjs: 7.8.1 - tslib: 2.6.1 + tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color @@ -2127,11 +2062,11 @@ packages: engines: {node: '>=16'} hasBin: true dependencies: - '@polkadot/api': 10.9.1 - '@polkadot/keyring': 12.3.2(@polkadot/util-crypto@12.3.2)(@polkadot/util@12.3.2) - '@polkadot/types': 10.9.1 - '@polkadot/util': 12.3.2 - '@polkadot/util-crypto': 12.3.2(@polkadot/util@12.3.2) + '@polkadot/api': 10.10.1 + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + '@polkadot/types': 10.10.1 + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) tslib: 2.6.1 yargs: 17.7.2 transitivePeerDependencies: @@ -2140,332 +2075,356 @@ packages: - utf-8-validate dev: true - /@polkadot/api-derive@10.9.1: - resolution: {integrity: sha512-mRud1UZCFIc4Z63qAoGSIHh/foyUYADfy1RQYCmPpeFKfIdCIrHpd7xFdJXTOMYOS0BwlM6u4qli/ZT4XigezQ==} + /@polkadot/api-derive@10.10.1: + resolution: {integrity: sha512-Q9Ibs4eRPqdV8qnRzFPD3dlWNbLHxRqMqNTNPmNQwKPo5m6fcQbZ0UZy3yJ+PI9S4AQHGhsWtfoi5qW8006GHQ==} engines: {node: '>=16'} dependencies: - '@polkadot/api': 10.9.1 - '@polkadot/api-augment': 10.9.1 - '@polkadot/api-base': 10.9.1 - '@polkadot/rpc-core': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.3.2 - '@polkadot/util-crypto': 12.3.2(@polkadot/util@12.3.2) + '@polkadot/api': 10.10.1 + '@polkadot/api-augment': 10.10.1 + '@polkadot/api-base': 10.10.1 + '@polkadot/rpc-core': 10.10.1 + '@polkadot/types': 10.10.1 + '@polkadot/types-codec': 10.10.1 + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) rxjs: 7.8.1 - tslib: 2.6.1 + tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - /@polkadot/api@10.9.1: - resolution: {integrity: sha512-ND/2UqZBWvtt4PfV03OStTKg0mxmPk4UpMAgJKutdgsz/wP9CYJ1KbjwFgPNekL9JnzbKQsWyQNPVrcw7kQk8A==} + /@polkadot/api@10.10.1: + resolution: {integrity: sha512-YHVkmNvjGF4Eg3thAbVhj9UX3SXx+Yxk6yVuzsEcckEudIRHzL2ikIWGCfUprfzSeFNpUCKdJIi1tsxVHtA7Tg==} engines: {node: '>=16'} dependencies: - '@polkadot/api-augment': 10.9.1 - '@polkadot/api-base': 10.9.1 - '@polkadot/api-derive': 10.9.1 - '@polkadot/keyring': 12.3.2(@polkadot/util-crypto@12.3.2)(@polkadot/util@12.3.2) - '@polkadot/rpc-augment': 10.9.1 - '@polkadot/rpc-core': 10.9.1 - '@polkadot/rpc-provider': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/types-known': 10.9.1 - '@polkadot/util': 12.3.2 - '@polkadot/util-crypto': 12.3.2(@polkadot/util@12.3.2) + '@polkadot/api-augment': 10.10.1 + '@polkadot/api-base': 10.10.1 + '@polkadot/api-derive': 10.10.1 + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + '@polkadot/rpc-augment': 10.10.1 + '@polkadot/rpc-core': 10.10.1 + '@polkadot/rpc-provider': 10.10.1 + '@polkadot/types': 10.10.1 + '@polkadot/types-augment': 10.10.1 + '@polkadot/types-codec': 10.10.1 + '@polkadot/types-create': 10.10.1 + '@polkadot/types-known': 10.10.1 + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) eventemitter3: 5.0.1 rxjs: 7.8.1 - tslib: 2.6.1 + tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - /@polkadot/keyring@12.3.2(@polkadot/util-crypto@12.3.2)(@polkadot/util@12.3.2): - resolution: {integrity: sha512-NTdtDeI0DP9l/45hXynNABeP5VB8piw5YR+CbUxK2e36xpJWVXwbcOepzslg5ghE9rs8UKJb30Z/HqTU4sBY0Q==} + /@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1): + resolution: {integrity: sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA==} engines: {node: '>=16'} peerDependencies: - '@polkadot/util': 12.3.2 - '@polkadot/util-crypto': 12.3.2 + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1 dependencies: - '@polkadot/util': 12.3.2 - '@polkadot/util-crypto': 12.3.2(@polkadot/util@12.3.2) - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) + tslib: 2.6.2 - /@polkadot/networks@12.3.2: - resolution: {integrity: sha512-uCkyybKoeEm1daKr0uT/9oNDHDDzCy2/ZdVl346hQqfdR1Ct3BaxMjxqvdmb5N8aCw0cBWSfgsxAYtw8ESmllQ==} + /@polkadot/networks@12.5.1: + resolution: {integrity: sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ==} engines: {node: '>=16'} dependencies: - '@polkadot/util': 12.3.2 - '@substrate/ss58-registry': 1.40.0 - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + '@substrate/ss58-registry': 1.44.0 + tslib: 2.6.2 - /@polkadot/rpc-augment@10.9.1: - resolution: {integrity: sha512-MaLHkNlyqN20ZRYr6uNd1BZr1OsrnX9qLAmsl0mcrri1vPGRH6VHjfFH1RBLkikpWD82v17g0l2hLwdV1ZHMcw==} + /@polkadot/rpc-augment@10.10.1: + resolution: {integrity: sha512-PcvsX8DNV8BNDXXnY2K8F4mE7cWz7fKg8ykXNZTN8XUN6MrI4k/ohv7itYic7X5LaP25ZmQt5UiGyjKDGIELow==} engines: {node: '>=16'} dependencies: - '@polkadot/rpc-core': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.3.2 - tslib: 2.6.1 + '@polkadot/rpc-core': 10.10.1 + '@polkadot/types': 10.10.1 + '@polkadot/types-codec': 10.10.1 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - /@polkadot/rpc-core@10.9.1: - resolution: {integrity: sha512-ZtA8B8SfXSAwVkBlCcKRHw0eSM7ec/sbiNOM5GasXPeRujUgT7lOwSH2GbUZSqe9RfRDMp6DvO9c2JoGc3LLWw==} + /@polkadot/rpc-core@10.10.1: + resolution: {integrity: sha512-awfFfJYsVF6W4DrqTj5RP00SSDRNB770FIoe1QE1Op4NcSrfeLpwh54HUJS716f4l5mOSYuvMp+zCbKzt8zKow==} engines: {node: '>=16'} dependencies: - '@polkadot/rpc-augment': 10.9.1 - '@polkadot/rpc-provider': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/util': 12.3.2 + '@polkadot/rpc-augment': 10.10.1 + '@polkadot/rpc-provider': 10.10.1 + '@polkadot/types': 10.10.1 + '@polkadot/util': 12.5.1 rxjs: 7.8.1 - tslib: 2.6.1 + tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - /@polkadot/rpc-provider@10.9.1: - resolution: {integrity: sha512-4QzT2QzD+320+eT6b79sGAA85Tt3Bb8fQvse4r5Mom2iiBd2SO81vOhxSAOaIe4GUsw25VzFJmsbe7+OObItdg==} + /@polkadot/rpc-provider@10.10.1: + resolution: {integrity: sha512-VMDWoJgx6/mPHAOT66Sq+Jf2lJABfV/ZUIXtT2k8HjOndbm6oKrFqGEOSSLvB2q4olDee3FkFFxkyW1s6k4JaQ==} engines: {node: '>=16'} dependencies: - '@polkadot/keyring': 12.3.2(@polkadot/util-crypto@12.3.2)(@polkadot/util@12.3.2) - '@polkadot/types': 10.9.1 - '@polkadot/types-support': 10.9.1 - '@polkadot/util': 12.3.2 - '@polkadot/util-crypto': 12.3.2(@polkadot/util@12.3.2) - '@polkadot/x-fetch': 12.3.2 - '@polkadot/x-global': 12.3.2 - '@polkadot/x-ws': 12.3.2 + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + '@polkadot/types': 10.10.1 + '@polkadot/types-support': 10.10.1 + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) + '@polkadot/x-fetch': 12.5.1 + '@polkadot/x-global': 12.5.1 + '@polkadot/x-ws': 12.5.1 eventemitter3: 5.0.1 - mock-socket: 9.2.1 - nock: 13.3.1 - tslib: 2.6.1 + mock-socket: 9.3.1 + nock: 13.3.8 + tslib: 2.6.2 optionalDependencies: - '@substrate/connect': 0.7.26 + '@substrate/connect': 0.7.33 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - /@polkadot/types-augment@10.9.1: - resolution: {integrity: sha512-OY9/jTMFRFqYdkUnfcGwqMLC64A0Q25bjvCuVQCVjsPFKE3wl0Kt5rNT01eV2UmLXrR6fY0xWbR2w80bLA7CIQ==} + /@polkadot/types-augment@10.10.1: + resolution: {integrity: sha512-XRHE75IocXfFE6EADYov3pqXCyBk5SWbiHoZ0+4WYWP9SwMuzsBaAy84NlhLBlkG3+ehIqi0HpAd/qrljJGZbg==} engines: {node: '>=16'} dependencies: - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.3.2 - tslib: 2.6.1 + '@polkadot/types': 10.10.1 + '@polkadot/types-codec': 10.10.1 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 + + /@polkadot/types-codec@10.10.1: + resolution: {integrity: sha512-ETPG0wzWzt/bDKRQmYbO7CLe/0lUt8VrG6/bECdv+Kye+8Qedba2LZyTWm/9f2ngms8TZ82yI8mPv/mozdtfnw==} + engines: {node: '>=16'} + dependencies: + '@polkadot/util': 12.5.1 + '@polkadot/x-bigint': 12.5.1 + tslib: 2.6.2 /@polkadot/types-codec@10.9.1: resolution: {integrity: sha512-mJ5OegKGraY1FLvEa8FopRCr3pQrhDkcn5RNOjmgJQozENVeRaxhk0NwxYz7IojFvSDnKnc6lNQfKaaSe5pLHg==} engines: {node: '>=16'} dependencies: - '@polkadot/util': 12.3.2 + '@polkadot/util': 12.5.1 '@polkadot/x-bigint': 12.3.2 tslib: 2.6.1 + dev: false - /@polkadot/types-create@10.9.1: - resolution: {integrity: sha512-OVz50MGTTuiuVnRP/zAx4CTuLioc0hsiwNwqN2lNhmIJGtnQ4Vy/7mQRsIWehiYz6g0Vzzm5B3qWkTXO1NSN5w==} + /@polkadot/types-create@10.10.1: + resolution: {integrity: sha512-7OiLzd+Ter5zrpjP7fDwA1m89kd38VvMVixfOSv8x7ld2pDT+yyyKl14TCwRSWrKWCMtIb6M3iasPhq5cUa7cw==} engines: {node: '>=16'} dependencies: - '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.3.2 - tslib: 2.6.1 + '@polkadot/types-codec': 10.10.1 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 - /@polkadot/types-known@10.9.1: - resolution: {integrity: sha512-zCMVWc4pJtkbMFPu72bD4IhvV/gkHXPX3C5uu92WdmCfnn0vEIEsMKWlVXVVvQQZKAqvs/awpqIfrUtEViOGEA==} + /@polkadot/types-known@10.10.1: + resolution: {integrity: sha512-yRa1lbDRqg3V/zoa0vSwdGOiYTIWktILW8OfkaLDExTu0GZBSbVHZlLAta52XVpA9Zww7mrUUC9+iernOwk//w==} engines: {node: '>=16'} dependencies: - '@polkadot/networks': 12.3.2 - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/util': 12.3.2 - tslib: 2.6.1 + '@polkadot/networks': 12.5.1 + '@polkadot/types': 10.10.1 + '@polkadot/types-codec': 10.10.1 + '@polkadot/types-create': 10.10.1 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 - /@polkadot/types-support@10.9.1: - resolution: {integrity: sha512-XsieuLDsszvMZQlleacQBfx07i/JkwQV/UxH9q8Hz7Okmaz9pEVEW1h3ka2/cPuC7a4l32JhaORBUYshBZNdJg==} + /@polkadot/types-support@10.10.1: + resolution: {integrity: sha512-Cd2mwk9RG6LlX8X3H0bRY7wCTbZPqU3z38CMFhvNkFDAyjqKjtn8hpS4n8mMrZK2EwCs/MjQH1wb7rtFkaWmJw==} engines: {node: '>=16'} dependencies: - '@polkadot/util': 12.3.2 - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 - /@polkadot/types@10.9.1: - resolution: {integrity: sha512-AG33i2ZGGfq7u+5rkAdGrXAQHHl844/Yv+junH5ZzX69xiCoWO1bH/yzDUNBdpki2GlACWvF9nLYh3F2tVF93w==} + /@polkadot/types@10.10.1: + resolution: {integrity: sha512-Ben62P1tjYEhKag34GBGcLX6NqcFR1VD5nNbWaxgr+t36Jl/tlHs6P9DlbFqQP7Tt9FmGrAYY0m3oTkhjG1NzA==} engines: {node: '>=16'} dependencies: - '@polkadot/keyring': 12.3.2(@polkadot/util-crypto@12.3.2)(@polkadot/util@12.3.2) - '@polkadot/types-augment': 10.9.1 - '@polkadot/types-codec': 10.9.1 - '@polkadot/types-create': 10.9.1 - '@polkadot/util': 12.3.2 - '@polkadot/util-crypto': 12.3.2(@polkadot/util@12.3.2) + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + '@polkadot/types-augment': 10.10.1 + '@polkadot/types-codec': 10.10.1 + '@polkadot/types-create': 10.10.1 + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) rxjs: 7.8.1 - tslib: 2.6.1 + tslib: 2.6.2 - /@polkadot/util-crypto@12.3.2(@polkadot/util@12.3.2): - resolution: {integrity: sha512-pTpx+YxolY0BDT4RcGmgeKbHHD/dI6Ll9xRsqmVdIjpcVVY20uDNTyXs81ZNtfKgyod1y9JQkfNv2Dz9iEpTkQ==} + /@polkadot/util-crypto@12.5.1(@polkadot/util@12.5.1): + resolution: {integrity: sha512-Y8ORbMcsM/VOqSG3DgqutRGQ8XXK+X9M3C8oOEI2Tji65ZsXbh9Yh+ryPLM0oBp/9vqOXjkLgZJbbVuQceOw0A==} engines: {node: '>=16'} peerDependencies: - '@polkadot/util': 12.3.2 - dependencies: - '@noble/curves': 1.1.0 - '@noble/hashes': 1.3.1 - '@polkadot/networks': 12.3.2 - '@polkadot/util': 12.3.2 - '@polkadot/wasm-crypto': 7.2.1(@polkadot/util@12.3.2)(@polkadot/x-randomvalues@12.3.2) - '@polkadot/wasm-util': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/x-bigint': 12.3.2 - '@polkadot/x-randomvalues': 12.3.2(@polkadot/util@12.3.2)(@polkadot/wasm-util@7.2.1) - '@scure/base': 1.1.1 - tslib: 2.6.1 - - /@polkadot/util@12.3.2: - resolution: {integrity: sha512-y/JShcGyOamCUiSIg++XZuLHt1ktSKBaSH2K5Nw5NXlgP0+7am+GZzqPB8fQ4qhYLruEOv+YRiz0GC1Zr9S+wg==} + '@polkadot/util': 12.5.1 + dependencies: + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@polkadot/networks': 12.5.1 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-crypto': 7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-bigint': 12.5.1 + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) + '@scure/base': 1.1.3 + tslib: 2.6.2 + + /@polkadot/util@12.5.1: + resolution: {integrity: sha512-fDBZL7D4/baMG09Qowseo884m3QBzErGkRWNBId1UjWR99kyex+cIY9fOSzmuQxo6nLdJlLHw1Nz2caN3+Bq0A==} engines: {node: '>=16'} dependencies: - '@polkadot/x-bigint': 12.3.2 - '@polkadot/x-global': 12.3.2 - '@polkadot/x-textdecoder': 12.3.2 - '@polkadot/x-textencoder': 12.3.2 - '@types/bn.js': 5.1.1 + '@polkadot/x-bigint': 12.5.1 + '@polkadot/x-global': 12.5.1 + '@polkadot/x-textdecoder': 12.5.1 + '@polkadot/x-textencoder': 12.5.1 + '@types/bn.js': 5.1.5 bn.js: 5.2.1 - tslib: 2.6.1 + tslib: 2.6.2 - /@polkadot/wasm-bridge@7.2.1(@polkadot/util@12.3.2)(@polkadot/x-randomvalues@12.3.2): - resolution: {integrity: sha512-uV/LHREDBGBbHrrv7HTki+Klw0PYZzFomagFWII4lp6Toj/VCvRh5WMzooVC+g/XsBGosAwrvBhoModabyHx+A==} + /@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: - '@polkadot/util': 12.3.2 - '@polkadot/wasm-util': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/x-randomvalues': 12.3.2(@polkadot/util@12.3.2)(@polkadot/wasm-util@7.2.1) - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) + tslib: 2.6.2 - /@polkadot/wasm-crypto-asmjs@7.2.1(@polkadot/util@12.3.2): - resolution: {integrity: sha512-z/d21bmxyVfkzGsKef/FWswKX02x5lK97f4NPBZ9XBeiFkmzlXhdSnu58/+b1sKsRAGdW/Rn/rTNRDhW0GqCAg==} + /@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.5.1): + resolution: {integrity: sha512-wKg+cpsWQCTSVhjlHuNeB/184rxKqY3vaklacbLOMbUXieIfuDBav5PJdzS3yeiVE60TpYaHW4iX/5OYHS82gg==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' dependencies: - '@polkadot/util': 12.3.2 - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 - /@polkadot/wasm-crypto-init@7.2.1(@polkadot/util@12.3.2)(@polkadot/x-randomvalues@12.3.2): - resolution: {integrity: sha512-GcEXtwN9LcSf32V9zSaYjHImFw16hCyo2Xzg4GLLDPPeaAAfbFr2oQMgwyDbvBrBjLKHVHjsPZyGhXae831amw==} + /@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-vD4iPIp9x+SssUIWUenxWLPw4BVIwhXHNMpsV81egK990tvpyIxL205/EF5QRb1mKn8WfWcNFm5tYwwh9NdnnA==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: - '@polkadot/util': 12.3.2 - '@polkadot/wasm-bridge': 7.2.1(@polkadot/util@12.3.2)(@polkadot/x-randomvalues@12.3.2) - '@polkadot/wasm-crypto-asmjs': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/wasm-crypto-wasm': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/wasm-util': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/x-randomvalues': 12.3.2(@polkadot/util@12.3.2)(@polkadot/wasm-util@7.2.1) - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) + tslib: 2.6.2 - /@polkadot/wasm-crypto-wasm@7.2.1(@polkadot/util@12.3.2): - resolution: {integrity: sha512-DqyXE4rSD0CVlLIw88B58+HHNyrvm+JAnYyuEDYZwCvzUWOCNos/DDg9wi/K39VAIsCCKDmwKqkkfIofuOj/lA==} + /@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.5.1): + resolution: {integrity: sha512-3efoIB6jA3Hhv6k0YIBwCtlC8gCSWCk+R296yIXRLLr3cGN415KM/PO/d1JIXYI64lbrRzWRmZRhllw3jf6Atg==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' dependencies: - '@polkadot/util': 12.3.2 - '@polkadot/wasm-util': 7.2.1(@polkadot/util@12.3.2) - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + tslib: 2.6.2 - /@polkadot/wasm-crypto@7.2.1(@polkadot/util@12.3.2)(@polkadot/x-randomvalues@12.3.2): - resolution: {integrity: sha512-SA2+33S9TAwGhniKgztVN6pxUKpGfN4Tre/eUZGUfpgRkT92wIUT2GpGWQE+fCCqGQgADrNiBcwt6XwdPqMQ4Q==} + /@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): + resolution: {integrity: sha512-1ZY1rxUTawYm0m1zylvBMFovNIHYgG2v/XoASNp/EMG5c8FQIxCbhJRaTBA983GVq4lN/IAKREKEp9ZbLLqssA==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' '@polkadot/x-randomvalues': '*' dependencies: - '@polkadot/util': 12.3.2 - '@polkadot/wasm-bridge': 7.2.1(@polkadot/util@12.3.2)(@polkadot/x-randomvalues@12.3.2) - '@polkadot/wasm-crypto-asmjs': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/wasm-crypto-init': 7.2.1(@polkadot/util@12.3.2)(@polkadot/x-randomvalues@12.3.2) - '@polkadot/wasm-crypto-wasm': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/wasm-util': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/x-randomvalues': 12.3.2(@polkadot/util@12.3.2)(@polkadot/wasm-util@7.2.1) - tslib: 2.6.1 - - /@polkadot/wasm-util@7.2.1(@polkadot/util@12.3.2): - resolution: {integrity: sha512-FBSn/3aYJzhN0sYAYhHB8y9JL8mVgxLy4M1kUXYbyo+8GLRQEN5rns8Vcb8TAlIzBWgVTOOptYBvxo0oj0h7Og==} + '@polkadot/util': 12.5.1 + '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/wasm-crypto-init': 7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1) + '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) + tslib: 2.6.2 + + /@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1): + resolution: {integrity: sha512-N/25960ifCc56sBlJZ2h5UBpEPvxBmMLgwYsl7CUuT+ea2LuJW9Xh8VHDN/guYXwmm92/KvuendYkEUykpm/JQ==} engines: {node: '>=16'} peerDependencies: '@polkadot/util': '*' dependencies: - '@polkadot/util': 12.3.2 - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + tslib: 2.6.2 /@polkadot/x-bigint@12.3.2: resolution: {integrity: sha512-JLqLgfGXe/x+hZJETd5ZqfpVsbwyMsH5Nn1Q20ineMMjXN/ig+kVR8Mc15LXBMuw4g7LldFW6UUrotWnuMI8Yw==} engines: {node: '>=16'} dependencies: '@polkadot/x-global': 12.3.2 - tslib: 2.6.1 + tslib: 2.6.2 + dev: false - /@polkadot/x-fetch@12.3.2: - resolution: {integrity: sha512-3IEuZ5S+RI/t33NsdPLIIa5COfDCfpUW2sbaByEczn75aD1jLqJZSEDwiBniJ2osyNd4uUxBf6e5jw7LAZeZJg==} + /@polkadot/x-bigint@12.5.1: + resolution: {integrity: sha512-Fw39eoN9v0sqxSzfSC5awaDVdzojIiE7d1hRSQgVSrES+8whWvtbYMR0qwbVhTuW7DvogHmye41P9xKMlXZysg==} engines: {node: '>=16'} dependencies: - '@polkadot/x-global': 12.3.2 - node-fetch: 3.3.1 - tslib: 2.6.1 + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 + + /@polkadot/x-fetch@12.5.1: + resolution: {integrity: sha512-Bc019lOKCoQJrthiS+H3LwCahGtl5tNnb2HK7xe3DBQIUx9r2HsF/uEngNfMRUFkUYg5TPCLFbEWU8NIREBS1A==} + engines: {node: '>=16'} + dependencies: + '@polkadot/x-global': 12.5.1 + node-fetch: 3.3.2 + tslib: 2.6.2 /@polkadot/x-global@12.3.2: resolution: {integrity: sha512-yVZq6oIegjlyh5rUZiTklgu+fL+W/DG1ypEa02683tUCB3avV5cA3PAHKptMSlb6FpweHu37lKKrqfAWrraDxg==} engines: {node: '>=16'} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 + dev: false + + /@polkadot/x-global@12.5.1: + resolution: {integrity: sha512-6K0YtWEg0eXInDOihU5aSzeb1t9TiDdX9ZuRly+58ALSqw5kPZYmQLbzE1d8HWzyXRXK+YH65GtLzfMGqfYHmw==} + engines: {node: '>=16'} + dependencies: + tslib: 2.6.2 - /@polkadot/x-randomvalues@12.3.2(@polkadot/util@12.3.2)(@polkadot/wasm-util@7.2.1): - resolution: {integrity: sha512-ywjIs8CWpvOGmq+3cGCNPOHxAjPHdBUiXyDccftx5BRVdmtbt36gK/V84bKr6Xs73FGu0jprUAOSRRsLZX/3dg==} + /@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2): + resolution: {integrity: sha512-UsMb1d+77EPNjW78BpHjZLIm4TaIpfqq89OhZP/6gDIoS2V9iE/AK3jOWKm1G7Y2F8XIoX1qzQpuMakjfagFoQ==} engines: {node: '>=16'} peerDependencies: - '@polkadot/util': 12.3.2 + '@polkadot/util': 12.5.1 '@polkadot/wasm-util': '*' dependencies: - '@polkadot/util': 12.3.2 - '@polkadot/wasm-util': 7.2.1(@polkadot/util@12.3.2) - '@polkadot/x-global': 12.3.2 - tslib: 2.6.1 + '@polkadot/util': 12.5.1 + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 - /@polkadot/x-textdecoder@12.3.2: - resolution: {integrity: sha512-lY5bfA5xArJRWEJlYOlQQMJeTjWD8s0yMhchirVgf5xj8Id9vPGeUoneH+VFDEwgXxrqBvDFJ4smN4T/r6a/fg==} + /@polkadot/x-textdecoder@12.5.1: + resolution: {integrity: sha512-j2YZGWfwhMC8nHW3BXq10fAPY02ObLL/qoTjCMJ1Cmc/OGq18Ep7k9cXXbjFAq3wf3tUUewt/u/hStKCk3IvfQ==} engines: {node: '>=16'} dependencies: - '@polkadot/x-global': 12.3.2 - tslib: 2.6.1 + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 - /@polkadot/x-textencoder@12.3.2: - resolution: {integrity: sha512-iP3qEBiHzBckQ9zeY7ZHRWuu7mCEg5SMpOugs6UODRk8sx6KHzGQYlghBbWLit0uppPDVE0ifEwZ2n73djJHWQ==} + /@polkadot/x-textencoder@12.5.1: + resolution: {integrity: sha512-1JNNpOGb4wD+c7zFuOqjibl49LPnHNr4rj4s3WflLUIZvOMY6euoDuN3ISjQSHCLlVSoH0sOCWA3qXZU4bCTDQ==} engines: {node: '>=16'} dependencies: - '@polkadot/x-global': 12.3.2 - tslib: 2.6.1 + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 - /@polkadot/x-ws@12.3.2: - resolution: {integrity: sha512-yM9Z64pLNlHpJE43+Xtr+iUXmYpFFY5u5hrke2PJt13O48H8f9Vb9cRaIh94appLyICoS0aekGhDkGH+MCspBA==} + /@polkadot/x-ws@12.5.1: + resolution: {integrity: sha512-efNMhB3Lh6pW2iTipMkqwrjpuUtb3EwR/jYZftiIGo5tDPB7rqoMOp9s6KRFJEIUfZkLnMUtbkZ5fHzUJaCjmQ==} engines: {node: '>=16'} dependencies: - '@polkadot/x-global': 12.3.2 - tslib: 2.6.1 - ws: 8.13.0 + '@polkadot/x-global': 12.5.1 + tslib: 2.6.2 + ws: 8.14.2 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -2569,6 +2528,10 @@ packages: /@scure/base@1.1.1: resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} + dev: true + + /@scure/base@1.1.3: + resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} /@scure/bip39@1.2.0: resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==} @@ -2691,20 +2654,19 @@ packages: resolution: {integrity: sha512-161JhCC1csjH3GE5mPLEd7HbWtwNSPJBg3p1Ksz9SFlTzj/bgEwudiRN2y5i0MoLGCIJRYKyKGMxVnd29PzNjg==} optional: true - /@substrate/connect@0.7.26: - resolution: {integrity: sha512-uuGSiroGuKWj1+38n1kY5HReer5iL9bRwPCzuoLtqAOmI1fGI0hsSI2LlNQMAbfRgr7VRHXOk5MTuQf5ulsFRw==} + /@substrate/connect@0.7.33: + resolution: {integrity: sha512-1B984/bmXVQvTT9oV3c3b7215lvWmulP9rfP3T3Ri+OU3uIsyCzYw0A+XG6J8/jgO2FnroeNIBWlgoLaUM1uzw==} requiresBuild: true dependencies: '@substrate/connect-extension-protocol': 1.0.1 - eventemitter3: 4.0.7 - smoldot: 1.0.4 + smoldot: 2.0.1 transitivePeerDependencies: - bufferutil - utf-8-validate optional: true - /@substrate/ss58-registry@1.40.0: - resolution: {integrity: sha512-QuU2nBql3J4KCnOWtWDw4n1K4JU0T79j54ZZvm/9nhsX6AIar13FyhsaBfs6QkJ2ixTQAnd7TocJIoJRWbqMZA==} + /@substrate/ss58-registry@1.44.0: + resolution: {integrity: sha512-7lQ/7mMCzVNSEfDS4BCqnRnKCFKpcOaPrxMeGTXHX1YQzM/m2BBHjbK2C3dJvjv7GYxMiaTq/HdWQj1xS6ss+A==} /@szmarczak/http-timer@1.1.2: resolution: {integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==} @@ -2746,7 +2708,7 @@ packages: resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} dev: true - /@typechain/ethers-v5@10.1.1(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.1)(typescript@5.1.6): + /@typechain/ethers-v5@10.1.1(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.1.6): resolution: {integrity: sha512-o6nffJBxwmeX1ZiZpdnP/tqGd/7M7iYvQC88ZXaFFoyAGh7eYncynzVjOJV0XmaKzAc6puqyqZrnva+gJbk4sw==} peerDependencies: '@ethersproject/abi': ^5.0.0 @@ -2762,7 +2724,7 @@ packages: ethers: 5.7.2 lodash: 4.17.21 ts-essentials: 7.0.3(typescript@5.1.6) - typechain: 8.3.1(typescript@5.1.6) + typechain: 8.3.2(typescript@5.1.6) typescript: 5.1.6 dev: false @@ -2784,6 +2746,24 @@ packages: typescript: 5.1.6 dev: false + /@typechain/ethers-v5@11.1.1(@ethersproject/abi@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.1.6): + resolution: {integrity: sha512-D9WyUrCJ4Z5Gg8T00HWLpuqn1CqSDXlCiUOOpLaWoCbnZrE2jSIOUwR9blBZNo6LE5058e3niVu6xk205Et7tg==} + peerDependencies: + '@ethersproject/abi': ^5.0.0 + '@ethersproject/providers': ^5.0.0 + ethers: ^5.1.3 + typechain: ^8.3.1 + typescript: '>=4.3.0' + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/providers': 5.7.2 + ethers: 5.7.2 + lodash: 4.17.21 + ts-essentials: 7.0.3(typescript@5.1.6) + typechain: 8.3.2(typescript@5.1.6) + typescript: 5.1.6 + dev: false + /@types/abstract-leveldown@7.2.1: resolution: {integrity: sha512-YK8irIC+eMrrmtGx0H4ISn9GgzLd9dojZWJaMbjp1YHLl2VqqNFBNrL5Q3KjGf4VE3sf/4hmq6EhQZ7kZp1NoQ==} dev: true @@ -2798,6 +2778,12 @@ packages: resolution: {integrity: sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==} dependencies: '@types/node': 18.16.8 + dev: false + + /@types/bn.js@5.1.5: + resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} + dependencies: + '@types/node': 18.16.8 /@types/cacheable-request@6.0.3: resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} @@ -2884,6 +2870,10 @@ packages: /@types/prettier@2.7.1: resolution: {integrity: sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==} + /@types/prettier@2.7.3: + resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} + dev: false + /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: @@ -3058,19 +3048,19 @@ packages: resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} dev: true - /@zombienet/cli@1.3.63(@polkadot/util@12.3.2)(@types/node@18.16.8): - resolution: {integrity: sha512-0SiPqPU5Y3ucHwVUGthleUa5UBdEMOOGxuNvdKlxHEoundqm8NleXes8otgRnRNBLyCgpHZn9A6Fuh7fp+ZqFw==} + /@zombienet/cli@1.3.79(@polkadot/util@12.5.1)(@types/node@18.16.8): + resolution: {integrity: sha512-v75zQBbKJTfJp47PyirDe6RD5bkAjswGOF0sVWB/lfydqzgl6qnMQdaQ+cTTy5jc5wKwT+swM9Q/BcAClRG7yQ==} engines: {node: '>=18'} hasBin: true dependencies: '@zombienet/dsl-parser-wrapper': 0.1.10 - '@zombienet/orchestrator': 0.0.50(@polkadot/util@12.3.2)(@types/node@18.16.8) - '@zombienet/utils': 0.0.21(@types/node@18.16.8)(typescript@5.1.6) + '@zombienet/orchestrator': 0.0.62(@polkadot/util@12.5.1)(@types/node@18.16.8) + '@zombienet/utils': 0.0.24(@types/node@18.16.8)(typescript@5.2.2) cli-progress: 3.12.0 - commander: 11.0.0 + commander: 11.1.0 debug: 4.3.4(supports-color@8.1.1) nunjucks: 3.2.4 - typescript: 5.1.6 + typescript: 5.2.2 transitivePeerDependencies: - '@polkadot/util' - '@swc/core' @@ -3087,16 +3077,16 @@ packages: resolution: {integrity: sha512-2r2SjanMcNTQiiwTtj/TRO89ek4KoIKGKhgcdHm8+uXPVWuU3tIh/unN8+m51Jnm2jhCLkQQwa5aidvSC02wOg==} dev: true - /@zombienet/orchestrator@0.0.50(@polkadot/util@12.3.2)(@types/node@18.16.8): - resolution: {integrity: sha512-phpyoUmC2Kv+IJ8naqvaJ/CIT0DT+WNpACa22LTdx4ZukJWXbVfTkWm1imejApUyk7NmLK92OlwCdUOGdyOATg==} + /@zombienet/orchestrator@0.0.62(@polkadot/util@12.5.1)(@types/node@18.16.8): + resolution: {integrity: sha512-nUX9/UrEv4k2kW7zOPBKIK6opaQ/7/QWQ4ZRfWooihM0k2cZ+HVeJ1AVXeDKnnbvaxfHG2/jrhIx5btuRYvbyQ==} engines: {node: '>=18'} dependencies: - '@polkadot/api': 10.9.1 - '@polkadot/keyring': 12.3.2(@polkadot/util-crypto@12.3.2)(@polkadot/util@12.3.2) - '@polkadot/util-crypto': 12.3.2(@polkadot/util@12.3.2) - '@zombienet/utils': 0.0.21(@types/node@18.16.8)(typescript@5.1.6) + '@polkadot/api': 10.10.1 + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) + '@zombienet/utils': 0.0.24(@types/node@18.16.8)(typescript@5.2.2) JSONStream: 1.3.5 - chai: 4.3.7 + chai: 4.3.10 debug: 4.3.4(supports-color@8.1.1) execa: 5.1.1 fs-extra: 11.1.1 @@ -3108,8 +3098,8 @@ packages: napi-maybe-compressed-blob: 0.0.11 peer-id: 0.16.0 tmp-promise: 3.0.3 - typescript: 5.1.6 - yaml: 2.3.1 + typescript: 5.2.2 + yaml: 2.3.4 transitivePeerDependencies: - '@polkadot/util' - '@swc/core' @@ -3122,15 +3112,16 @@ packages: - utf-8-validate dev: true - /@zombienet/utils@0.0.21(@types/node@18.16.8)(typescript@5.1.6): - resolution: {integrity: sha512-31fMNlITzmj1gPha2CcihDE6nON94r8ixZTZbWa2g0nacS0nnoTKUNFukw9vg+aGF5QkwSevy+eobOQEb/jhjg==} + /@zombienet/utils@0.0.24(@types/node@18.16.8)(typescript@5.2.2): + resolution: {integrity: sha512-CUHn4u04ryfRqCQQsZHSpMIpMxzdMvSZR86Gp3Hwexf7wZTkHNZ5hsJnQO+J/yl28ny0GcjLJSU1hZ2kMV+hqw==} + engines: {node: '>=18'} dependencies: cli-table3: 0.6.3 debug: 4.3.4(supports-color@8.1.1) mocha: 10.2.0 nunjucks: 3.2.4 toml: 3.0.0 - ts-node: 10.9.1(@types/node@18.16.8)(typescript@5.1.6) + ts-node: 10.9.1(@types/node@18.16.8)(typescript@5.2.2) transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -3338,6 +3329,14 @@ packages: picomatch: 2.3.1 dev: true + /anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + /aproba@1.2.0: resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} dev: true @@ -3456,17 +3455,6 @@ packages: engines: {node: '>= 0.4'} dev: true - /avvio@7.2.5: - resolution: {integrity: sha512-AOhBxyLVdpOad3TujtC9kL/9r3HnTkxwQ5ggOsYrvvZP1cCFvzHWJd5XxZDFuTn+IN8vkKSG5SEJrd27vCSbeA==} - dependencies: - archy: 1.0.0 - debug: 4.3.4(supports-color@8.1.1) - fastq: 1.15.0 - queue-microtask: 1.2.3 - transitivePeerDependencies: - - supports-color - dev: true - /avvio@8.2.1: resolution: {integrity: sha512-TAlMYvOuwGyLK3PfBb5WKBXZmXz2fVCgv23d6zZFdle/q3gPjmxBaeuC0pY0Dzs5PWMSgfqqEZkrye19GlDTgw==} dependencies: @@ -3874,6 +3862,19 @@ packages: resolution: {integrity: sha512-omxEc80jAU+pZwRmoWr3aEzeLad4JW3iBhLRQlgISvghBdIxrMT7mVAGsDz4WSyCkKowENshH2j9OABAhld7QQ==} dev: true + /chai@4.3.10: + resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.3 + get-func-name: 2.0.2 + loupe: 2.3.7 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + /chai@4.3.7: resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} engines: {node: '>=4'} @@ -3915,6 +3916,12 @@ packages: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} dev: true + /check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + dependencies: + get-func-name: 2.0.2 + dev: true + /chokidar@2.1.8: resolution: {integrity: sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==} deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies @@ -3948,14 +3955,14 @@ packages: normalize-path: 3.0.0 readdirp: 3.5.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} dependencies: - anymatch: 3.1.2 + anymatch: 3.1.3 braces: 3.0.2 glob-parent: 5.1.2 is-binary-path: 2.1.0 @@ -3963,7 +3970,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /chownr@1.1.4: @@ -4154,8 +4161,8 @@ packages: table-layout: 1.0.2 typical: 5.2.0 - /commander@11.0.0: - resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==} + /commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} engines: {node: '>=16'} dev: true @@ -4248,6 +4255,11 @@ packages: /data-uri-to-buffer@4.0.0: resolution: {integrity: sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==} engines: {node: '>= 12'} + dev: true + + /data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} /data-urls@4.0.0: resolution: {integrity: sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==} @@ -4558,8 +4570,8 @@ packages: once: 1.4.0 dev: true - /entities@4.4.0: - resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==} + /entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} dev: true @@ -4854,6 +4866,7 @@ packages: /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + dev: true /eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} @@ -4961,8 +4974,8 @@ packages: - supports-color dev: true - /fast-content-type-parse@1.0.0: - resolution: {integrity: sha512-Xbc4XcysUXcsP5aHUU7Nq3OwvHq97C+WnbkeIefpeYLX+ryzFJlU6OStFJhs6Ol0LkUGpcK+wL0JwfM+FCU5IA==} + /fast-content-type-parse@1.1.0: + resolution: {integrity: sha512-fBHHqSTFLVnR61C+gltJuE5GkVQMV0S2nqUO8TJ+5Z3qAKG8vAx4FKai1s5jq/inV1+sREynIWSuQ6HgoSXpDQ==} dev: true /fast-decode-uri-component@1.0.1: @@ -4992,24 +5005,15 @@ packages: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true - /fast-json-stringify@2.7.13: - resolution: {integrity: sha512-ar+hQ4+OIurUGjSJD1anvYSDcUflywhKjfxnsW4TBTD7+u0tJufv6DKRWoQk3vI6YBOWMoz0TQtfbe7dxbQmvA==} - engines: {node: '>= 10.0.0'} - dependencies: - ajv: 6.12.6 - deepmerge: 4.3.1 - rfdc: 1.3.0 - string-similarity: 4.0.4 - dev: true - - /fast-json-stringify@5.7.0: - resolution: {integrity: sha512-sBVPTgnAZseLu1Qgj6lUbQ0HfjFhZWXAmpZ5AaSGkyLh5gAXBga/uPJjQPHpDFjC9adWIpdOcCLSDTgrZ7snoQ==} + /fast-json-stringify@5.9.1: + resolution: {integrity: sha512-NMrf+uU9UJnTzfxaumMDXK1NWqtPCfGoM9DYIE+ESlaTQqjlANFBy0VAbsm6FB88Mx0nceyi18zTo5kIEUlzxg==} dependencies: '@fastify/deepmerge': 1.3.0 ajv: 8.12.0 ajv-formats: 2.1.1(ajv@8.12.0) fast-deep-equal: 3.1.3 - fast-uri: 2.2.0 + fast-uri: 2.3.0 + json-schema-ref-resolver: 1.0.1 rfdc: 1.3.0 dev: true @@ -5017,81 +5021,44 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true - /fast-querystring@1.1.1: - resolution: {integrity: sha512-qR2r+e3HvhEFmpdHMv//U8FnFlnYjaC6QKDuaXALDkw2kvHO8WDjxH+f/rHGR4Me4pnk8p9JAkRNTjYHAKRn2Q==} + /fast-querystring@1.1.2: + resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} dependencies: fast-decode-uri-component: 1.0.1 dev: true - /fast-redact@3.2.0: - resolution: {integrity: sha512-zaTadChr+NekyzallAMXATXLOR8MNx3zqpZ0MUF2aGf4EathnG0f32VLODNlY8IuGY3HoRO2L6/6fSzNsLaHIw==} + /fast-redact@3.3.0: + resolution: {integrity: sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==} engines: {node: '>=6'} dev: true - /fast-safe-stringify@2.1.1: - resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} - dev: true - - /fast-uri@2.2.0: - resolution: {integrity: sha512-cIusKBIt/R/oI6z/1nyfe2FvGKVTohVRfvkOhvx0nCEW+xf5NoCXjAHcWp93uOUBchzYcsvPlrapAdX1uW+YGg==} - dev: true - - /fastify-error@0.3.1: - resolution: {integrity: sha512-oCfpcsDndgnDVgiI7bwFKAun2dO+4h84vBlkWsWnz/OUK9Reff5UFoFl241xTiLeHWX/vU9zkDVXqYUxjOwHcQ==} + /fast-uri@2.3.0: + resolution: {integrity: sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw==} dev: true /fastify-plugin@4.5.0: resolution: {integrity: sha512-79ak0JxddO0utAXAQ5ccKhvs6vX2MGyHHMMsmZkBANrq3hXc1CHzvNPHOcvTsVMEPl5I+NT+RO4YKMGehOfSIg==} dev: true - /fastify-warning@0.2.0: - resolution: {integrity: sha512-s1EQguBw/9qtc1p/WTY4eq9WMRIACkj+HTcOIK1in4MV5aFaQC9ZCIt0dJ7pr5bIf4lPpHvAtP2ywpTNgs7hqw==} - deprecated: This module renamed to process-warning - dev: true - - /fastify@3.15.1: - resolution: {integrity: sha512-QZBGrSOwcR+IJF5OwYTZ5662wEd68SqC6sG4aMu0GncKbYlG9GF88EF2PzN2HfXCCD9K0d/+ZNowuF8S893mOg==} - engines: {node: '>=10.16.0'} - dependencies: - '@fastify/proxy-addr': 3.0.0 - abstract-logging: 2.0.1 - ajv: 6.12.6 - avvio: 7.2.5 - fast-json-stringify: 2.7.13 - fastify-error: 0.3.1 - fastify-warning: 0.2.0 - find-my-way: 4.5.1 - flatstr: 1.0.12 - light-my-request: 4.12.0 - pino: 6.14.0 - readable-stream: 3.6.2 - rfdc: 1.3.0 - secure-json-parse: 2.7.0 - semver: 7.5.1 - tiny-lru: 7.0.6 - transitivePeerDependencies: - - supports-color - dev: true - - /fastify@4.17.0: - resolution: {integrity: sha512-tzuY1tgWJo2Y6qEKwmLhFvACUmr68Io2pqP/sDKU71KRM6A6R3DrCDqLGqANbeLZcKUfdfY58ut35CGqemcTgg==} + /fastify@4.24.3: + resolution: {integrity: sha512-6HHJ+R2x2LS3y1PqxnwEIjOTZxFl+8h4kSC/TuDPXtA+v2JnV9yEtOsNSKK1RMD7sIR2y1ZsA4BEFaid/cK5pg==} dependencies: '@fastify/ajv-compiler': 3.5.0 - '@fastify/error': 3.2.0 + '@fastify/error': 3.4.1 '@fastify/fast-json-stringify-compiler': 4.3.0 abstract-logging: 2.0.1 avvio: 8.2.1 - fast-content-type-parse: 1.0.0 - fast-json-stringify: 5.7.0 - find-my-way: 7.6.2 - light-my-request: 5.9.1 - pino: 8.14.1 - process-warning: 2.2.0 + fast-content-type-parse: 1.1.0 + fast-json-stringify: 5.9.1 + find-my-way: 7.7.0 + light-my-request: 5.11.0 + pino: 8.16.1 + process-warning: 2.3.0 proxy-addr: 2.0.7 rfdc: 1.3.0 secure-json-parse: 2.7.0 - semver: 7.5.1 - tiny-lru: 11.0.1 + semver: 7.5.4 + toad-cache: 3.3.0 transitivePeerDependencies: - supports-color dev: true @@ -5161,22 +5128,12 @@ packages: to-regex-range: 5.0.1 dev: true - /find-my-way@4.5.1: - resolution: {integrity: sha512-kE0u7sGoUFbMXcOG/xpkmz4sRLCklERnBcg7Ftuu1iAxsfEt2S46RLJ3Sq7vshsEy2wJT2hZxE58XZK27qa8kg==} - engines: {node: '>=10'} - dependencies: - fast-decode-uri-component: 1.0.1 - fast-deep-equal: 3.1.3 - safe-regex2: 2.0.0 - semver-store: 0.3.0 - dev: true - - /find-my-way@7.6.2: - resolution: {integrity: sha512-0OjHn1b1nCX3eVbm9ByeEHiscPYiHLfhei1wOUU9qffQkk98wE0Lo8VrVYfSGMgnSnDh86DxedduAnBf4nwUEw==} + /find-my-way@7.7.0: + resolution: {integrity: sha512-+SrHpvQ52Q6W9f3wJoJBbAQULJuNEEQwBvlvYwACDhBTLOTMiQ0HYWh4+vC3OivGP2ENcTI1oKlFA2OepJNjhQ==} engines: {node: '>=14'} dependencies: fast-deep-equal: 3.1.3 - fast-querystring: 1.1.1 + fast-querystring: 1.1.2 safe-regex2: 2.0.0 dev: true @@ -5215,10 +5172,6 @@ packages: hasBin: true dev: true - /flatstr@1.0.12: - resolution: {integrity: sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==} - dev: true - /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true @@ -5295,7 +5248,7 @@ packages: dependencies: graceful-fs: 4.2.11 jsonfile: 6.1.0 - universalify: 2.0.0 + universalify: 2.0.1 dev: true /fs-extra@3.0.1: @@ -5342,8 +5295,8 @@ packages: dev: true optional: true - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -5403,6 +5356,10 @@ packages: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} dev: true + /get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + dev: true + /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -6404,18 +6361,18 @@ packages: http-proxy-agent: 5.0.0 https-proxy-agent: 5.0.1 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.4 + nwsapi: 2.2.7 parse5: 7.1.2 rrweb-cssom: 0.6.0 saxes: 6.0.0 symbol-tree: 3.2.4 - tough-cookie: 4.1.2 + tough-cookie: 4.1.3 w3c-xmlserializer: 4.0.0 webidl-conversions: 7.0.0 whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 whatwg-url: 12.0.1 - ws: 8.13.0 + ws: 8.14.2 xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -6437,6 +6394,12 @@ packages: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true + /json-schema-ref-resolver@1.0.1: + resolution: {integrity: sha512-EJAj1pgHc1hxF6vo2Z3s69fMjO1INq6eGHXZ8Z6wCQeldCuwxGK9Sxf4/cScGn3FZubCVUehfWtcDM/PLteCQw==} + dependencies: + fast-deep-equal: 3.1.3 + dev: true + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -6461,7 +6424,7 @@ packages: /jsonfile@3.0.1: resolution: {integrity: sha512-oBko6ZHlubVB5mRFkur5vgYR1UyqX+S6Y/oCfLhqNdcc2fYFlDpIoNc7AfKS1KOGcnNAkvsr0grLck9ANM815w==} optionalDependencies: - graceful-fs: 4.2.11 + graceful-fs: 4.2.10 dev: true /jsonfile@4.0.0: @@ -6472,7 +6435,7 @@ packages: /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: - universalify: 2.0.0 + universalify: 2.0.1 optionalDependencies: graceful-fs: 4.2.11 dev: true @@ -6582,7 +6545,7 @@ packages: iso-random-stream: 2.0.2 multiformats: 9.9.0 node-forge: 1.3.1 - protobufjs: 6.11.3 + protobufjs: 6.11.4 uint8arrays: 3.1.1 dev: true @@ -6662,20 +6625,11 @@ packages: - supports-color dev: true - /light-my-request@4.12.0: - resolution: {integrity: sha512-0y+9VIfJEsPVzK5ArSIJ8Dkxp8QMP7/aCuxCUtG/tr9a2NoOf/snATE/OUc05XUplJCEnRh6gTkH7xh9POt1DQ==} - dependencies: - ajv: 8.12.0 - cookie: 0.5.0 - process-warning: 1.0.0 - set-cookie-parser: 2.6.0 - dev: true - - /light-my-request@5.9.1: - resolution: {integrity: sha512-UT7pUk8jNCR1wR7w3iWfIjx32DiB2f3hFdQSOwy3/EPQ3n3VocyipUxcyRZR0ahoev+fky69uA+GejPa9KuHKg==} + /light-my-request@5.11.0: + resolution: {integrity: sha512-qkFCeloXCOMpmEdZ/MV91P8AT4fjwFXWaAFz3lUeStM8RcoM1ks4J/F8r1b3r6y/H4u3ACEJ1T+Gv5bopj7oDA==} dependencies: cookie: 0.5.0 - process-warning: 2.2.0 + process-warning: 2.3.0 set-cookie-parser: 2.6.0 dev: true @@ -6762,6 +6716,12 @@ packages: get-func-name: 2.0.0 dev: true + /loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + dependencies: + get-func-name: 2.0.2 + dev: true + /lowercase-keys@1.0.1: resolution: {integrity: sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==} engines: {node: '>=0.10.0'} @@ -7138,8 +7098,8 @@ packages: yargs-unparser: 2.0.0 dev: true - /mock-socket@9.2.1: - resolution: {integrity: sha512-aw9F9T9G2zpGipLLhSNh6ZpgUyUl4frcVmRN08uE1NWPWg43Wx6+sGPDbQ7E5iFZZDJW5b5bypMeAEHqTbIFag==} + /mock-socket@9.3.1: + resolution: {integrity: sha512-qxBgB7Qa2sEQgHFjj0dSigq7fX4k6Saisd5Nelwp2q8mlbAFh5dHV9JTTlF8viYJLSSWgMCZFUom8PJcMNBoJw==} engines: {node: '>= 8'} /module-error@1.0.2: @@ -7327,13 +7287,12 @@ packages: engines: {node: '>= 0.4.0'} dev: true - /nock@13.3.1: - resolution: {integrity: sha512-vHnopocZuI93p2ccivFyGuUfzjq2fxNyNurp7816mlT5V5HF4SzXu8lvLrVzBbNqzs+ODooZ6OksuSUNM7Njkw==} + /nock@13.3.8: + resolution: {integrity: sha512-96yVFal0c/W1lG7mmfRe7eO+hovrhJYd2obzzOZ90f6fjpeU/XNvd9cYHZKZAQJumDfhXgoTpkpJ9pvMj+hqHw==} engines: {node: '>= 10.13'} dependencies: debug: 4.3.4(supports-color@8.1.1) json-stringify-safe: 5.0.1 - lodash: 4.17.21 propagate: 2.0.1 transitivePeerDependencies: - supports-color @@ -7374,6 +7333,15 @@ packages: data-uri-to-buffer: 4.0.0 fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 + dev: true + + /node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 /node-forge@1.3.1: resolution: {integrity: sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==} @@ -7537,8 +7505,8 @@ packages: commander: 5.1.0 dev: true - /nwsapi@2.2.4: - resolution: {integrity: sha512-NHj4rzRo0tQdijE9ZqAx6kYDcoRwYwSYzCA8MY3JzfxlrvEU0jhnhJT9BhqhJs7I/dKcrDm6TyulaRqZPIhN5g==} + /nwsapi@2.2.7: + resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true /object-assign@4.1.1: @@ -7604,8 +7572,9 @@ packages: engines: {node: '>=16.0.0', npm: '>=7.0.0'} dev: true - /on-exit-leak-free@2.1.0: - resolution: {integrity: sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w==} + /on-exit-leak-free@2.1.2: + resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} + engines: {node: '>=14.0.0'} dev: true /once@1.4.0: @@ -7785,10 +7754,6 @@ packages: semver: 6.3.0 dev: true - /pako@2.0.4: - resolution: {integrity: sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==} - optional: true - /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -7804,7 +7769,7 @@ packages: /parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} dependencies: - entities: 4.4.0 + entities: 4.5.0 dev: true /pascalcase@0.1.1: @@ -7869,7 +7834,7 @@ packages: class-is: 1.1.0 libp2p-crypto: 0.21.2 multiformats: 9.9.0 - protobufjs: 6.11.3 + protobufjs: 6.11.4 uint8arrays: 3.1.1 dev: true @@ -7878,49 +7843,32 @@ packages: engines: {node: '>=8.6'} dev: true - /pino-abstract-transport@1.0.0: - resolution: {integrity: sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==} + /pino-abstract-transport@1.1.0: + resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} dependencies: - readable-stream: 4.4.0 + readable-stream: 4.4.2 split2: 4.2.0 dev: true - /pino-std-serializers@3.2.0: - resolution: {integrity: sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==} - dev: true - - /pino-std-serializers@6.2.1: - resolution: {integrity: sha512-wHuWB+CvSVb2XqXM0W/WOYUkVSPbiJb9S5fNB7TBhd8s892Xq910bRxwHtC4l71hgztObTjXL6ZheZXFjhDrDQ==} + /pino-std-serializers@6.2.2: + resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} dev: true - /pino@6.14.0: - resolution: {integrity: sha512-iuhEDel3Z3hF9Jfe44DPXR8l07bhjuFY3GMHIXbjnY9XcafbyDDwl2sN2vw2GjMPf5Nkoe+OFao7ffn9SXaKDg==} - hasBin: true - dependencies: - fast-redact: 3.2.0 - fast-safe-stringify: 2.1.1 - flatstr: 1.0.12 - pino-std-serializers: 3.2.0 - process-warning: 1.0.0 - quick-format-unescaped: 4.0.4 - sonic-boom: 1.4.1 - dev: true - - /pino@8.14.1: - resolution: {integrity: sha512-8LYNv7BKWXSfS+k6oEc6occy5La+q2sPwU3q2ljTX5AZk7v+5kND2o5W794FyRaqha6DJajmkNRsWtPpFyMUdw==} + /pino@8.16.1: + resolution: {integrity: sha512-3bKsVhBmgPjGV9pyn4fO/8RtoVDR8ssW1ev819FsRXlRNgW8gR/9Kx+gCK4UPWd4JjrRDLWpzd/pb1AyWm3MGA==} hasBin: true dependencies: atomic-sleep: 1.0.0 - fast-redact: 3.2.0 - on-exit-leak-free: 2.1.0 - pino-abstract-transport: 1.0.0 - pino-std-serializers: 6.2.1 - process-warning: 2.2.0 + fast-redact: 3.3.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 1.1.0 + pino-std-serializers: 6.2.2 + process-warning: 2.3.0 quick-format-unescaped: 4.0.4 real-require: 0.2.0 safe-stable-stringify: 2.4.3 - sonic-boom: 3.3.0 - thread-stream: 2.3.0 + sonic-boom: 3.7.0 + thread-stream: 2.4.1 dev: true /platform@1.3.6: @@ -7970,6 +7918,12 @@ packages: engines: {node: '>=10.13.0'} hasBin: true + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: false + /private-ip@3.0.0: resolution: {integrity: sha512-HkMBs4nMtrP+cvcw0bDi2BAZIGgiKI4Zq8Oc+dMqNBpHS8iGL4+WO/pRtc8Bwnv9rjnV0QwMDwEBymFtqv7Kww==} engines: {node: '>=14.16'} @@ -7984,12 +7938,8 @@ packages: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true - /process-warning@1.0.0: - resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} - dev: true - - /process-warning@2.2.0: - resolution: {integrity: sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg==} + /process-warning@2.3.0: + resolution: {integrity: sha512-N6mp1+2jpQr3oCFMz6SeHRGbv6Slb20bRhj4v3xR99HqNToAcOe1MFOp4tytyzOfJn+QtN8Rf7U/h2KAn4kC6g==} dev: true /process@0.11.10: @@ -8059,6 +8009,26 @@ packages: long: 4.0.0 dev: true + /protobufjs@6.11.4: + resolution: {integrity: sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==} + hasBin: true + requiresBuild: true + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/long': 4.0.2 + '@types/node': 18.16.8 + long: 4.0.0 + dev: true + /protobufjs@7.2.3: resolution: {integrity: sha512-TtpvOqwB5Gdz/PQmOjgsrGH1nHjAQVCN7JG4A6r1sXRWESL5rNMAiRcBQlCAdKxZcAbstExQePYG8xof/JVRgg==} engines: {node: '>=12.0.0'} @@ -8140,6 +8110,11 @@ packages: engines: {node: '>=6'} dev: true + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + dev: true + /qs@6.11.2: resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} engines: {node: '>=0.6'} @@ -8203,14 +8178,15 @@ packages: string_decoder: 1.3.0 util-deprecate: 1.0.2 - /readable-stream@4.4.0: - resolution: {integrity: sha512-kDMOq0qLtxV9f/SQv522h8cxZBqNZXuXNyjyezmfAAuribMyVXziljpQ/uQhfE1XLg2/TLTW2DsnoE4VAi/krg==} + /readable-stream@4.4.2: + resolution: {integrity: sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: abort-controller: 3.0.0 buffer: 6.0.3 events: 3.3.0 process: 0.11.10 + string_decoder: 1.3.0 dev: true /readdirp@2.2.1: @@ -8440,7 +8416,7 @@ packages: /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} dependencies: - tslib: 2.6.1 + tslib: 2.6.2 /safe-buffer@5.1.2: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} @@ -8507,10 +8483,6 @@ packages: resolution: {integrity: sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==} dev: false - /semver-store@0.3.0: - resolution: {integrity: sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg==} - dev: true - /semver@5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true @@ -8537,6 +8509,14 @@ packages: lru-cache: 6.0.0 dev: true + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /serialize-javascript@5.0.1: resolution: {integrity: sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==} dependencies: @@ -8633,11 +8613,10 @@ packages: engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} dev: true - /smoldot@1.0.4: - resolution: {integrity: sha512-N3TazI1C4GGrseFH/piWyZCCCRJTRx2QhDfrUKRT4SzILlW5m8ayZ3QTKICcz1C/536T9cbHHJyP7afxI6Mi1A==} + /smoldot@2.0.1: + resolution: {integrity: sha512-Wqw2fL/sELQByLSeeTX1Z/d0H4McmphPMx8vh6UZS/bIIDx81oU7s/drmx2iL/ME36uk++YxpRuJey8/MOyfOA==} dependencies: - pako: 2.0.4 - ws: 8.13.0 + ws: 8.14.2 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -8707,15 +8686,8 @@ packages: smart-buffer: 4.2.0 dev: true - /sonic-boom@1.4.1: - resolution: {integrity: sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==} - dependencies: - atomic-sleep: 1.0.0 - flatstr: 1.0.12 - dev: true - - /sonic-boom@3.3.0: - resolution: {integrity: sha512-LYxp34KlZ1a2Jb8ZQgFCK3niIHzibdwtwNUWKg0qQRzsDoJ3Gfgkf8KdBTFU3SkejDEIlWwnSnpVdOZIhFMl/g==} + /sonic-boom@3.7.0: + resolution: {integrity: sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==} dependencies: atomic-sleep: 1.0.0 dev: true @@ -8806,11 +8778,6 @@ packages: /string-format@2.0.0: resolution: {integrity: sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==} - /string-similarity@4.0.4: - resolution: {integrity: sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==} - deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. - dev: true - /string-width@1.0.2: resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} engines: {node: '>=0.10.0'} @@ -8980,8 +8947,8 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true - /thread-stream@2.3.0: - resolution: {integrity: sha512-kaDqm1DET9pp3NXwR8382WHbnpXnRkN9xGN9dQt3B2+dmXiW8X1SOwmFOxAErEQ47ObhZ96J6yhZNXuyCOL7KA==} + /thread-stream@2.4.1: + resolution: {integrity: sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==} dependencies: real-require: 0.2.0 dev: true @@ -9000,16 +8967,6 @@ packages: retimer: 3.0.0 dev: true - /tiny-lru@11.0.1: - resolution: {integrity: sha512-iNgFugVuQgBKrqeO/mpiTTgmBsTP0WL6yeuLfLs/Ctf0pI/ixGqIRm8sDCwMcXGe9WWvt2sGXI5mNqZbValmJg==} - engines: {node: '>=12'} - dev: true - - /tiny-lru@7.0.6: - resolution: {integrity: sha512-zNYO0Kvgn5rXzWpL0y3RS09sMK67eGaQj9805jlK9G6pSadfriTczzLHFXa/xcW4mIRfmlB9HyQ/+SgL0V1uow==} - engines: {node: '>=6'} - dev: true - /tiny-worker@2.3.0: resolution: {integrity: sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g==} requiresBuild: true @@ -9079,16 +9036,21 @@ packages: safe-regex: 1.1.0 dev: true + /toad-cache@3.3.0: + resolution: {integrity: sha512-3oDzcogWGHZdkwrHyvJVpPjA7oNzY6ENOV3PsWJY9XYPZ6INo94Yd47s5may1U+nleBPwDhrRiTPMIvKaa3MQg==} + engines: {node: '>=12'} + dev: true + /toml@3.0.0: resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} dev: true - /tough-cookie@4.1.2: - resolution: {integrity: sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==} + /tough-cookie@4.1.3: + resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} engines: {node: '>=6'} dependencies: psl: 1.9.0 - punycode: 2.3.0 + punycode: 2.3.1 universalify: 0.2.0 url-parse: 1.5.10 dev: true @@ -9101,7 +9063,7 @@ packages: resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} engines: {node: '>=14'} dependencies: - punycode: 2.3.0 + punycode: 2.3.1 dev: true /treeify@1.1.0: @@ -9128,6 +9090,16 @@ packages: command-line-usage: 6.1.3 string-format: 2.0.0 + /ts-command-line-args@2.5.1: + resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==} + hasBin: true + dependencies: + chalk: 4.1.2 + command-line-args: 5.2.1 + command-line-usage: 6.1.3 + string-format: 2.0.0 + dev: false + /ts-essentials@7.0.3(typescript@5.1.6): resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} peerDependencies: @@ -9197,6 +9169,37 @@ packages: yn: 3.1.1 dev: true + /ts-node@10.9.1(@types/node@18.16.8)(typescript@5.2.2): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.3 + '@types/node': 18.16.8 + acorn: 8.8.2 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.2.2 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /tsconfig-paths@4.2.0: resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} engines: {node: '>=6'} @@ -9217,6 +9220,9 @@ packages: /tslib@2.6.1: resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + /tsutils@3.21.0(typescript@5.1.6): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -9336,6 +9342,27 @@ packages: transitivePeerDependencies: - supports-color + /typechain@8.3.2(typescript@5.1.6): + resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} + hasBin: true + peerDependencies: + typescript: '>=4.3.0' + dependencies: + '@types/prettier': 2.7.3 + debug: 4.3.4(supports-color@8.1.1) + fs-extra: 7.0.1 + glob: 7.1.7 + js-sha3: 0.8.0 + lodash: 4.17.21 + mkdirp: 1.0.4 + prettier: 2.8.8 + ts-command-line-args: 2.5.1 + ts-essentials: 7.0.3(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: false + /typescript@4.9.5: resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} engines: {node: '>=4.2.0'} @@ -9347,6 +9374,12 @@ packages: engines: {node: '>=14.17'} hasBin: true + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /typical@4.0.0: resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} engines: {node: '>=8'} @@ -9423,8 +9456,8 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /universalify@2.0.0: - resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} dev: true @@ -9733,8 +9766,8 @@ packages: optional: true dev: true - /ws@8.13.0: - resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -9793,8 +9826,8 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true - /yaml@2.3.1: - resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} + /yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} dev: true