diff --git a/Cargo.lock b/Cargo.lock index 35f664bd6a..c6befb6a3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -159,7 +159,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "parachain-info", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-runtime-common", "runtime-common", @@ -456,6 +456,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "auto_impl" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "autocfg" version = "1.1.0" @@ -521,7 +533,7 @@ dependencies = [ "futures-timer", "hex", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sc-chain-spec", "sc-client-api", @@ -554,7 +566,7 @@ dependencies = [ "futures 0.3.24", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sc-rpc", "sc-utils", @@ -578,7 +590,7 @@ name = "beefy-primitives" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-application-crypto", @@ -627,16 +639,28 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitvec" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +dependencies = [ + "funty 1.1.0", + "radium 0.6.2", + "tap", + "wyz 0.2.0", +] + [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty", - "radium", + "funty 2.0.0", + "radium 0.7.0", "tap", - "wyz", + "wyz 0.5.0", ] [[package]] @@ -908,7 +932,7 @@ dependencies = [ "pallet-pools", "pallet-transaction-payment", "pallet-transaction-payment-rpc", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-cli", "polkadot-parachain", "polkadot-primitives", @@ -1046,7 +1070,7 @@ dependencies = [ "pallet-vesting", "pallet-xcm", "parachain-info", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-runtime-common", "runtime-common", @@ -1106,7 +1130,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-collective", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-consensus-aura", @@ -1123,7 +1147,7 @@ dependencies = [ "frame-support", "impl-trait-for-tuples", "orml-asset-registry", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -1140,7 +1164,7 @@ dependencies = [ "frame-support", "frame-system", "orml-asset-registry", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "scale-info", "serde", @@ -1190,7 +1214,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -1642,7 +1666,7 @@ version = "0.1.0" source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.26#e43b8b878a6fd0ca8b5e88d19822c4d777d3c677" dependencies = [ "clap", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-chain-spec", "sc-cli", "sc-service", @@ -1661,7 +1685,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -1684,7 +1708,7 @@ dependencies = [ "cumulus-client-consensus-common", "cumulus-primitives-core", "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-consensus", "sc-consensus-aura", @@ -1713,7 +1737,7 @@ dependencies = [ "cumulus-relay-chain-interface", "dyn-clone", "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "sc-client-api", "sc-consensus", @@ -1759,7 +1783,7 @@ dependencies = [ "derive_more", "futures 0.3.24", "futures-timer", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "polkadot-node-primitives", "polkadot-parachain", @@ -1783,7 +1807,7 @@ dependencies = [ "cumulus-relay-chain-interface", "futures 0.3.24", "futures-timer", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-overseer", @@ -1835,7 +1859,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-aura", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-application-crypto", @@ -1853,7 +1877,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -1876,7 +1900,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "scale-info", "serde", @@ -1911,7 +1935,7 @@ dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-io", @@ -1929,7 +1953,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand_chacha 0.3.1", "scale-info", "sp-runtime", @@ -1944,7 +1968,7 @@ version = "0.1.0" source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.26#e43b8b878a6fd0ca8b5e88d19822c4d777d3c677" dependencies = [ "frame-support", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-core-primitives", "polkadot-parachain", "polkadot-primitives", @@ -1963,7 +1987,7 @@ dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-test-relay-sproof-builder", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "scale-info", "sp-api", @@ -1984,7 +2008,7 @@ source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.26#e43b dependencies = [ "cumulus-primitives-core", "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-inherents", "sp-std", "sp-timestamp", @@ -1997,7 +2021,7 @@ source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.26#e43b dependencies = [ "cumulus-primitives-core", "frame-support", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-core-primitives", "polkadot-parachain", "polkadot-primitives", @@ -2047,7 +2071,7 @@ dependencies = [ "derive_more", "futures 0.3.24", "jsonrpsee-core", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "polkadot-overseer", "polkadot-service", @@ -2066,7 +2090,7 @@ version = "0.1.0" source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.26#e43b8b878a6fd0ca8b5e88d19822c4d777d3c677" dependencies = [ "cumulus-primitives-core", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "sp-runtime", "sp-state-machine", @@ -2213,6 +2237,7 @@ dependencies = [ "pallet-collator-allowlist", "pallet-collator-selection", "pallet-collective", + "pallet-connectors", "pallet-crowdloan-claim", "pallet-crowdloan-reward", "pallet-democracy", @@ -2251,8 +2276,9 @@ dependencies = [ "pallet-utility", "pallet-vesting", "pallet-xcm", + "pallet-xcm-transactor", "parachain-info", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-runtime-common", "runtime-common", @@ -2282,6 +2308,7 @@ dependencies = [ "xcm", "xcm-builder", "xcm-executor", + "xcm-primitives", ] [[package]] @@ -2545,12 +2572,152 @@ dependencies = [ "libc", ] +[[package]] +name = "ethabi" +version = "16.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c98847055d934070b90e806e12d3936b787d0a115068981c1d8dfd5dfef5a5" +dependencies = [ + "ethereum-types 0.12.1", + "hex", + "sha3 0.9.1", + "thiserror", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +dependencies = [ + "crunchy", + "fixed-hash", + "tiny-keccak", +] + +[[package]] +name = "ethbloom" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" +dependencies = [ + "crunchy", + "fixed-hash", + "impl-codec 0.6.0", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak", +] + +[[package]] +name = "ethereum" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" +dependencies = [ + "bytes", + "ethereum-types 0.13.1", + "hash-db", + "hash256-std-hasher", + "parity-scale-codec 3.1.5", + "rlp", + "rlp-derive", + "scale-info", + "serde", + "sha3 0.10.2", + "triehash", +] + +[[package]] +name = "ethereum-types" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +dependencies = [ + "ethbloom 0.11.1", + "fixed-hash", + "primitive-types 0.10.1", + "uint", +] + +[[package]] +name = "ethereum-types" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" +dependencies = [ + "ethbloom 0.12.1", + "fixed-hash", + "impl-codec 0.6.0", + "impl-rlp", + "impl-serde", + "primitive-types 0.11.1", + "scale-info", + "uint", +] + [[package]] name = "event-listener" version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "evm" +version = "0.35.0" +source = "git+https://github.com/NunoAlexandre/evm?branch=polkadot-v0.9.26#51b8c2ce3104265e1fd5bb0fe5cdfd2e0938239c" +dependencies = [ + "auto_impl", + "environmental", + "ethereum", + "evm-core", + "evm-gasometer", + "evm-runtime", + "log", + "parity-scale-codec 3.1.5", + "primitive-types 0.11.1", + "rlp", + "scale-info", + "serde", + "sha3 0.10.2", +] + +[[package]] +name = "evm-core" +version = "0.35.0" +source = "git+https://github.com/NunoAlexandre/evm?branch=polkadot-v0.9.26#51b8c2ce3104265e1fd5bb0fe5cdfd2e0938239c" +dependencies = [ + "parity-scale-codec 3.1.5", + "primitive-types 0.11.1", + "scale-info", + "serde", +] + +[[package]] +name = "evm-gasometer" +version = "0.35.0" +source = "git+https://github.com/NunoAlexandre/evm?branch=polkadot-v0.9.26#51b8c2ce3104265e1fd5bb0fe5cdfd2e0938239c" +dependencies = [ + "environmental", + "evm-core", + "evm-runtime", + "primitive-types 0.11.1", +] + +[[package]] +name = "evm-runtime" +version = "0.35.0" +source = "git+https://github.com/NunoAlexandre/evm?branch=polkadot-v0.9.26#51b8c2ce3104265e1fd5bb0fe5cdfd2e0938239c" +dependencies = [ + "auto_impl", + "environmental", + "evm-core", + "primitive-types 0.11.1", + "sha3 0.10.2", +] + [[package]] name = "exit-future" version = "0.2.0" @@ -2683,7 +2850,7 @@ dependencies = [ "futures-timer", "log", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "scale-info", ] @@ -2728,7 +2895,7 @@ name = "fork-tree" version = "3.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", ] [[package]] @@ -2741,6 +2908,85 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fp-consensus" +version = "2.0.0-dev" +source = "git+https://github.com/NunoAlexandre/frontier?branch=polkadot-v0.9.26#30012e0009a9c4888dffbf04a35adf565aba3552" +dependencies = [ + "ethereum", + "parity-scale-codec 3.1.5", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "fp-ethereum" +version = "1.0.0-dev" +source = "git+https://github.com/NunoAlexandre/frontier?branch=polkadot-v0.9.26#30012e0009a9c4888dffbf04a35adf565aba3552" +dependencies = [ + "ethereum", + "ethereum-types 0.13.1", + "fp-evm", + "frame-support", + "parity-scale-codec 3.1.5", + "sp-core", + "sp-std", +] + +[[package]] +name = "fp-evm" +version = "3.0.0-dev" +source = "git+https://github.com/NunoAlexandre/frontier?branch=polkadot-v0.9.26#30012e0009a9c4888dffbf04a35adf565aba3552" +dependencies = [ + "evm", + "frame-support", + "parity-scale-codec 3.1.5", + "serde", + "sp-core", + "sp-std", +] + +[[package]] +name = "fp-rpc" +version = "3.0.0-dev" +source = "git+https://github.com/NunoAlexandre/frontier?branch=polkadot-v0.9.26#30012e0009a9c4888dffbf04a35adf565aba3552" +dependencies = [ + "ethereum", + "ethereum-types 0.13.1", + "fp-evm", + "parity-scale-codec 3.1.5", + "scale-info", + "sp-api", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "fp-self-contained" +version = "1.0.0-dev" +source = "git+https://github.com/NunoAlexandre/frontier?branch=polkadot-v0.9.26#30012e0009a9c4888dffbf04a35adf565aba3552" +dependencies = [ + "ethereum", + "frame-support", + "parity-scale-codec 3.1.5", + "parity-util-mem", + "scale-info", + "serde", + "sp-runtime", +] + +[[package]] +name = "fp-storage" +version = "2.0.0" +source = "git+https://github.com/NunoAlexandre/frontier?branch=polkadot-v0.9.26#30012e0009a9c4888dffbf04a35adf565aba3552" +dependencies = [ + "parity-scale-codec 3.1.5", + "serde", +] + [[package]] name = "frame-benchmarking" version = "4.0.0-dev" @@ -2750,7 +2996,7 @@ dependencies = [ "frame-system", "linregress", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "paste", "scale-info", "serde", @@ -2785,7 +3031,7 @@ dependencies = [ "linked-hash-map", "log", "memory-db", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand 0.8.5", "rand_pcg 0.3.1", "sc-block-builder", @@ -2833,7 +3079,7 @@ dependencies = [ "frame-election-provider-solution-type", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-arithmetic", "sp-npos-elections", @@ -2848,7 +3094,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -2864,7 +3110,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" dependencies = [ "cfg-if 1.0.0", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", ] @@ -2881,7 +3127,7 @@ dependencies = [ "k256", "log", "once_cell", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "paste", "scale-info", "serde", @@ -2940,7 +3186,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "frame-support", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -2958,7 +3204,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-runtime", @@ -2970,7 +3216,7 @@ name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-api", ] @@ -3058,7 +3304,7 @@ dependencies = [ "lazy_static", "node-primitives", "pallet-babe", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "polkadot-core-primitives", "polkadot-parachain", @@ -3097,6 +3343,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "funty" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" + [[package]] name = "funty" version = "2.0.0" @@ -3658,13 +3910,31 @@ dependencies = [ "windows", ] +[[package]] +name = "impl-codec" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec 2.3.1", +] + [[package]] name = "impl-codec" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", +] + +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", ] [[package]] @@ -3959,7 +4229,7 @@ version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ "beefy-primitives", - "bitvec", + "bitvec 1.0.1", "frame-election-provider-support", "frame-executive", "frame-support", @@ -4004,7 +4274,7 @@ dependencies = [ "pallet-utility", "pallet-vesting", "pallet-xcm", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-parachains", @@ -5195,7 +5465,7 @@ version = "0.9.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "clap", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-cli", "sc-client-api", "sc-executor", @@ -5212,7 +5482,7 @@ version = "2.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-core", @@ -5324,6 +5594,27 @@ dependencies = [ "libc", ] +[[package]] +name = "num_enum" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "object" version = "0.28.4" @@ -5417,7 +5708,7 @@ dependencies = [ "frame-system", "orml-traits", "pallet-xcm", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -5435,7 +5726,7 @@ dependencies = [ "frame-support", "frame-system", "orml-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -5451,7 +5742,7 @@ dependencies = [ "impl-trait-for-tuples", "num-traits", "orml-utilities", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-io", @@ -5466,7 +5757,7 @@ version = "0.4.1-dev" source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.26#33dbc5e35305d0cf5937c896dae8655ca7da95d8" dependencies = [ "frame-support", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-io", @@ -5482,7 +5773,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-xcm", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-std", "xcm", @@ -5495,7 +5786,7 @@ source = "git+https://github.com/open-web3-stack/open-runtime-module-library?bra dependencies = [ "frame-support", "orml-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-runtime", "sp-std", "xcm", @@ -5513,7 +5804,7 @@ dependencies = [ "orml-traits", "orml-xcm-support", "pallet-xcm", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-io", @@ -5550,7 +5841,7 @@ dependencies = [ "pallet-balances", "pallet-randomness-collective-flip", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-arithmetic", @@ -5568,7 +5859,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5584,7 +5875,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-consensus-aura", @@ -5600,7 +5891,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-authority-discovery", @@ -5616,7 +5907,7 @@ dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-authorship", "sp-runtime", @@ -5635,7 +5926,7 @@ dependencies = [ "pallet-authorship", "pallet-session", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-consensus-babe", @@ -5656,7 +5947,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -5671,7 +5962,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -5686,7 +5977,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -5707,7 +5998,7 @@ dependencies = [ "pallet-beefy", "pallet-mmr", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -5725,7 +6016,7 @@ dependencies = [ "frame-system", "log", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5747,7 +6038,7 @@ dependencies = [ "pallet-balances", "pallet-fees", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "runtime-common", "scale-info", "sp-core", @@ -5771,7 +6062,7 @@ dependencies = [ "pallet-balances", "pallet-nft", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5788,7 +6079,7 @@ dependencies = [ "log", "pallet-bounties", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5805,7 +6096,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5821,7 +6112,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5840,7 +6131,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand 0.8.5", "scale-info", "serde", @@ -5858,12 +6149,48 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-connectors" +version = "0.0.1" +dependencies = [ + "cfg-primitives", + "cfg-traits", + "cfg-types", + "ethabi", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex", + "orml-tokens", + "orml-traits", + "pallet-balances", + "pallet-ethereum", + "pallet-ethereum-xcm", + "pallet-interest-accrual", + "pallet-loans", + "pallet-permissions", + "pallet-pools", + "pallet-timestamp", + "pallet-uniques", + "pallet-xcm-transactor", + "parity-scale-codec 3.1.5", + "runtime-common", "scale-info", + "serde", "sp-core", "sp-io", "sp-runtime", "sp-std", + "xcm", + "xcm-primitives", ] [[package]] @@ -5879,7 +6206,7 @@ dependencies = [ "pallet-balances", "pallet-crowdloan-reward", "pallet-vesting", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "proofs", "scale-info", "serde", @@ -5900,7 +6227,7 @@ dependencies = [ "frame-system", "pallet-balances", "pallet-vesting", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -5917,7 +6244,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-io", @@ -5935,7 +6262,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand 0.7.3", "scale-info", "sp-arithmetic", @@ -5957,7 +6284,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5966,6 +6293,83 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-ethereum" +version = "4.0.0-dev" +source = "git+https://github.com/NunoAlexandre/frontier?branch=polkadot-v0.9.26#30012e0009a9c4888dffbf04a35adf565aba3552" +dependencies = [ + "ethereum", + "ethereum-types 0.13.1", + "evm", + "fp-consensus", + "fp-ethereum", + "fp-evm", + "fp-rpc", + "fp-self-contained", + "fp-storage", + "frame-support", + "frame-system", + "num_enum", + "pallet-evm", + "pallet-timestamp", + "parity-scale-codec 3.1.5", + "rlp", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-ethereum-xcm" +version = "1.0.0-dev" +source = "git+https://github.com/NunoAlexandre/moonbeam?branch=unfork#37b09687a4513c6541694c8a1bc755dbb662b850" +dependencies = [ + "ethereum", + "ethereum-types 0.13.1", + "fp-ethereum", + "fp-evm", + "fp-rpc", + "fp-self-contained", + "frame-support", + "frame-system", + "pallet-evm", + "pallet-timestamp", + "parity-scale-codec 3.1.5", + "rlp", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", + "xcm-primitives", +] + +[[package]] +name = "pallet-evm" +version = "6.0.0-dev" +source = "git+https://github.com/NunoAlexandre/frontier?branch=polkadot-v0.9.26#30012e0009a9c4888dffbf04a35adf565aba3552" +dependencies = [ + "evm", + "fp-evm", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex", + "log", + "pallet-timestamp", + "parity-scale-codec 3.1.5", + "primitive-types 0.11.1", + "rlp", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-fees" version = "2.0.0" @@ -5977,7 +6381,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -5993,7 +6397,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-arithmetic", "sp-runtime", @@ -6011,7 +6415,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-core", @@ -6032,7 +6436,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -6048,7 +6452,7 @@ dependencies = [ "frame-system", "log", "pallet-authorship", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-application-crypto", "sp-core", @@ -6065,7 +6469,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -6086,7 +6490,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-arithmetic", @@ -6111,7 +6515,7 @@ dependencies = [ "pallet-permissions", "pallet-restricted-tokens", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand 0.8.5", "runtime-common", "scale-info", @@ -6131,7 +6535,7 @@ dependencies = [ "frame-support", "frame-system", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -6160,7 +6564,7 @@ dependencies = [ "pallet-timestamp", "pallet-uniques", "parachain-info", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-arithmetic", @@ -6180,7 +6584,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -6200,7 +6604,7 @@ dependencies = [ "pallet-balances", "pallet-proxy", "pallet-vesting", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand 0.8.5", "scale-info", "sp-core", @@ -6219,7 +6623,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -6234,7 +6638,7 @@ version = "3.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "jsonrpsee", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "serde", "sp-api", "sp-blockchain", @@ -6251,7 +6655,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -6273,7 +6677,7 @@ dependencies = [ "pallet-authorship", "pallet-balances", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "proofs", "scale-info", "sp-core", @@ -6295,7 +6699,7 @@ dependencies = [ "orml-traits", "pallet-balances", "pallet-uniques", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -6311,7 +6715,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -6329,7 +6733,7 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -6347,7 +6751,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -6372,7 +6776,7 @@ dependencies = [ "pallet-restricted-tokens", "pallet-timestamp", "parachain-info", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "rand 0.8.5", "rev_slice", @@ -6394,7 +6798,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -6410,7 +6814,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -6424,7 +6828,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "safe-mix", "scale-info", "sp-runtime", @@ -6439,7 +6843,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -6460,7 +6864,7 @@ dependencies = [ "orml-traits", "pallet-balances", "pallet-permissions", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-io", @@ -6477,7 +6881,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -6494,7 +6898,7 @@ dependencies = [ "impl-trait-for-tuples", "log", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -6528,7 +6932,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand_chacha 0.2.2", "scale-info", "sp-runtime", @@ -6547,7 +6951,7 @@ dependencies = [ "log", "pallet-authorship", "pallet-session", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand_chacha 0.2.2", "scale-info", "serde", @@ -6585,7 +6989,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-io", "sp-runtime", @@ -6601,7 +7005,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-inherents", "sp-io", @@ -6619,7 +7023,7 @@ dependencies = [ "frame-system", "log", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -6635,7 +7039,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -6651,7 +7055,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-api", "sp-blockchain", "sp-core", @@ -6665,7 +7069,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-api", "sp-runtime", ] @@ -6680,7 +7084,7 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "pallet-balances", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-runtime", @@ -6696,7 +7100,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -6710,7 +7114,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-io", @@ -6727,7 +7131,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -6741,7 +7145,7 @@ dependencies = [ "frame-support", "frame-system", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -6751,6 +7155,29 @@ dependencies = [ "xcm-executor", ] +[[package]] +name = "pallet-xcm-transactor" +version = "0.2.0" +source = "git+https://github.com/NunoAlexandre/moonbeam?branch=unfork#37b09687a4513c6541694c8a1bc755dbb662b850" +dependencies = [ + "cumulus-primitives-core", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "orml-traits", + "parity-scale-codec 3.1.5", + "scale-info", + "serde", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", + "xcm-builder", + "xcm-executor", + "xcm-primitives", +] + [[package]] name = "parachain-info" version = "0.1.0" @@ -6759,7 +7186,7 @@ dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", ] @@ -6783,6 +7210,20 @@ dependencies = [ "snap", ] +[[package]] +name = "parity-scale-codec" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec 0.7.2", + "bitvec 0.20.4", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 2.3.1", + "serde", +] + [[package]] name = "parity-scale-codec" version = "3.1.5" @@ -6790,13 +7231,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" dependencies = [ "arrayvec 0.7.2", - "bitvec", + "bitvec 1.0.1", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive", + "parity-scale-codec-derive 3.1.3", "serde", ] +[[package]] +name = "parity-scale-codec-derive" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "parity-scale-codec-derive" version = "3.1.3" @@ -6822,11 +7275,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" dependencies = [ "cfg-if 1.0.0", + "ethereum-types 0.13.1", "hashbrown 0.12.3", "impl-trait-for-tuples", + "lru 0.7.8", "parity-util-mem-derive", "parking_lot 0.12.1", - "primitive-types", + "primitive-types 0.11.1", "smallvec", "winapi", ] @@ -7089,7 +7544,7 @@ dependencies = [ "fatality", "futures 0.3.24", "lru 0.7.8", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7111,7 +7566,7 @@ dependencies = [ "fatality", "futures 0.3.24", "lru 0.7.8", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7215,7 +7670,7 @@ name = "polkadot-core-primitives" version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "scale-info", "sp-core", @@ -7232,7 +7687,7 @@ dependencies = [ "fatality", "futures 0.3.24", "lru 0.7.8", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -7251,7 +7706,7 @@ name = "polkadot-erasure-coding" version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-node-primitives", "polkadot-primitives", "reed-solomon-novelpoly", @@ -7289,7 +7744,7 @@ dependencies = [ "async-trait", "bytes", "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "polkadot-node-network-protocol", "polkadot-node-subsystem", @@ -7307,7 +7762,7 @@ version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7324,14 +7779,14 @@ name = "polkadot-node-core-approval-voting" version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ - "bitvec", + "bitvec 1.0.1", "derive_more", "futures 0.3.24", "futures-timer", "kvdb", "lru 0.7.8", "merlin", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7353,11 +7808,11 @@ name = "polkadot-node-core-av-store" version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ - "bitvec", + "bitvec 1.0.1", "futures 0.3.24", "futures-timer", "kvdb", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-erasure-coding", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7373,7 +7828,7 @@ name = "polkadot-node-core-backing" version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ - "bitvec", + "bitvec 1.0.1", "fatality", "futures 0.3.24", "polkadot-erasure-coding", @@ -7409,7 +7864,7 @@ source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d878 dependencies = [ "async-trait", "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-node-core-pvf", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -7443,7 +7898,7 @@ dependencies = [ "futures 0.3.24", "futures-timer", "kvdb", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7461,7 +7916,7 @@ dependencies = [ "futures 0.3.24", "kvdb", "lru 0.7.8", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-node-primitives", "polkadot-node-subsystem", "polkadot-node-subsystem-util", @@ -7493,7 +7948,7 @@ name = "polkadot-node-core-provisioner" version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ - "bitvec", + "bitvec 1.0.1", "fatality", "futures 0.3.24", "futures-timer", @@ -7517,7 +7972,7 @@ dependencies = [ "async-std", "futures 0.3.24", "futures-timer", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "pin-project", "polkadot-core-primitives", "polkadot-node-subsystem-util", @@ -7580,7 +8035,7 @@ dependencies = [ "lazy_static", "log", "mick-jaeger", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "polkadot-node-primitives", "polkadot-primitives", @@ -7598,7 +8053,7 @@ dependencies = [ "futures 0.3.24", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "prioritized-metered-channel", "sc-cli", @@ -7617,7 +8072,7 @@ dependencies = [ "derive_more", "fatality", "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-node-jaeger", "polkadot-node-primitives", "polkadot-primitives", @@ -7636,7 +8091,7 @@ source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d878 dependencies = [ "bounded-vec", "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-primitives", "schnorrkel", @@ -7693,7 +8148,7 @@ dependencies = [ "kvdb", "lru 0.7.8", "parity-db", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "parking_lot 0.11.2", "pin-project", @@ -7742,7 +8197,7 @@ source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d878 dependencies = [ "derive_more", "frame-support", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "polkadot-core-primitives", "scale-info", @@ -7772,10 +8227,10 @@ name = "polkadot-primitives" version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ - "bitvec", + "bitvec 1.0.1", "frame-system", "hex-literal 0.3.4", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "polkadot-core-primitives", "polkadot-parachain", @@ -7835,7 +8290,7 @@ version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ "beefy-primitives", - "bitvec", + "bitvec 1.0.1", "frame-election-provider-support", "frame-executive", "frame-support", @@ -7875,7 +8330,7 @@ dependencies = [ "pallet-utility", "pallet-vesting", "pallet-xcm", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-runtime-common", "polkadot-runtime-constants", @@ -7914,7 +8369,7 @@ version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ "beefy-primitives", - "bitvec", + "bitvec 1.0.1", "frame-election-provider-support", "frame-support", "frame-system", @@ -7932,7 +8387,7 @@ dependencies = [ "pallet-transaction-payment", "pallet-treasury", "pallet-vesting", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-runtime-parachains", "rustc-hex", @@ -7971,7 +8426,7 @@ version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ "bs58", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "sp-std", "sp-tracing", @@ -7983,7 +8438,7 @@ version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ "bitflags", - "bitvec", + "bitvec 1.0.1", "derive_more", "frame-support", "frame-system", @@ -7996,7 +8451,7 @@ dependencies = [ "pallet-staking", "pallet-timestamp", "pallet-vesting", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "polkadot-runtime-metrics", "rand 0.8.5", @@ -8126,7 +8581,7 @@ dependencies = [ "fatality", "futures 0.3.24", "indexmap", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-node-network-protocol", "polkadot-node-primitives", "polkadot-node-subsystem", @@ -8143,7 +8598,7 @@ name = "polkadot-statement-table" version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-primitives", "sp-core", ] @@ -8191,6 +8646,17 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +[[package]] +name = "primitive-types" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash", + "impl-codec 0.5.1", + "uint", +] + [[package]] name = "primitive-types" version = "0.11.1" @@ -8198,7 +8664,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", + "impl-rlp", "impl-serde", "scale-info", "uint", @@ -8310,7 +8777,7 @@ dependencies = [ name = "proofs" version = "2.0.0" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-std", @@ -8419,6 +8886,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" + [[package]] name = "radium" version = "0.7.0" @@ -8666,7 +9139,7 @@ dependencies = [ "env_logger", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "serde", "serde_json", "sp-core", @@ -8732,6 +9205,27 @@ dependencies = [ "winapi", ] +[[package]] +name = "rlp" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" +dependencies = [ + "bytes", + "rustc-hex", +] + +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "rocksdb" version = "0.18.0" @@ -8777,7 +9271,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-utility", "pallet-xcm", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "polkadot-primitives", "polkadot-runtime-common", @@ -8863,7 +9357,7 @@ dependencies = [ "pallet-permissions", "pallet-pools", "pallet-treasury", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "smallvec", @@ -8892,6 +9386,7 @@ dependencies = [ "frame-support", "frame-system", "fudge", + "hex", "kusama-runtime", "lazy_static", "node-primitives", @@ -8904,6 +9399,7 @@ dependencies = [ "pallet-aura", "pallet-babe", "pallet-balances", + "pallet-connectors", "pallet-loans", "pallet-permissions", "pallet-pools", @@ -8911,7 +9407,7 @@ dependencies = [ "pallet-uniques", "pallet-xcm", "parachain-info", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-core-primitives", "polkadot-parachain", "polkadot-primitives", @@ -9114,7 +9610,7 @@ dependencies = [ "ip_network", "libp2p", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "prost", "prost-build", "rand 0.7.3", @@ -9138,7 +9634,7 @@ dependencies = [ "futures 0.3.24", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-block-builder", "sc-client-api", "sc-proposer-metrics", @@ -9158,7 +9654,7 @@ name = "sc-block-builder" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "sp-api", "sp-block-builder", @@ -9176,7 +9672,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "impl-trait-for-tuples", "memmap2", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-chain-spec-derive", "sc-network", "sc-telemetry", @@ -9210,7 +9706,7 @@ dependencies = [ "libp2p", "log", "names", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rand 0.7.3", "regex", "rpassword", @@ -9245,7 +9741,7 @@ dependencies = [ "futures 0.3.24", "hash-db", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sc-executor", "sc-transaction-pool-api", @@ -9276,7 +9772,7 @@ dependencies = [ "linked-hash-map", "log", "parity-db", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sc-client-api", "sc-state-db", @@ -9321,7 +9817,7 @@ dependencies = [ "async-trait", "futures 0.3.24", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -9355,7 +9851,7 @@ dependencies = [ "num-bigint", "num-rational 0.2.4", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "rand 0.7.3", "retain_mut", @@ -9413,7 +9909,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "fork-tree", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-consensus", "sp-blockchain", @@ -9429,7 +9925,7 @@ dependencies = [ "futures 0.3.24", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-consensus", "sc-telemetry", @@ -9463,7 +9959,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "lazy_static", "lru 0.7.8", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sc-executor-common", "sc-executor-wasmi", @@ -9489,7 +9985,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "environmental", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-allocator", "sp-maybe-compressed-blob", "sp-sandbox", @@ -9506,7 +10002,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -9524,7 +10020,7 @@ dependencies = [ "libc", "log", "once_cell", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-wasm 0.42.2", "rustix 0.35.9", "sc-allocator", @@ -9549,7 +10045,7 @@ dependencies = [ "futures-timer", "hex", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "rand 0.8.5", "sc-block-builder", @@ -9584,7 +10080,7 @@ dependencies = [ "futures 0.3.24", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-finality-grandpa", "sc-rpc", @@ -9650,7 +10146,7 @@ dependencies = [ "linked_hash_set", "log", "lru 0.7.8", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "pin-project", "prost", @@ -9687,7 +10183,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "futures 0.3.24", "libp2p", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "prost-build", "sc-peerset", "smallvec", @@ -9718,7 +10214,7 @@ dependencies = [ "futures 0.3.24", "libp2p", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "prost", "prost-build", "sc-client-api", @@ -9742,7 +10238,7 @@ dependencies = [ "libp2p", "log", "lru 0.7.8", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "prost", "prost-build", "sc-client-api", @@ -9773,7 +10269,7 @@ dependencies = [ "hyper-rustls", "num_cpus", "once_cell", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "rand 0.7.3", "sc-client-api", @@ -9818,7 +10314,7 @@ dependencies = [ "hash-db", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sc-block-builder", "sc-chain-spec", @@ -9847,7 +10343,7 @@ dependencies = [ "futures 0.3.24", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sc-chain-spec", "sc-transaction-pool-api", @@ -9888,7 +10384,7 @@ dependencies = [ "hash-db", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "parking_lot 0.12.1", "pin-project", @@ -9950,7 +10446,7 @@ dependencies = [ "hex", "hex-literal 0.3.4", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sc-block-builder", "sc-client-api", @@ -9983,7 +10479,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "parity-util-mem-derive", "parking_lot 0.12.1", @@ -9997,7 +10493,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "jsonrpsee", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-chain-spec", "sc-client-api", "sc-consensus-babe", @@ -10098,7 +10594,7 @@ dependencies = [ "futures-timer", "linked-hash-map", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "parking_lot 0.12.1", "retain_mut", @@ -10148,10 +10644,10 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" dependencies = [ - "bitvec", + "bitvec 1.0.1", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info-derive", "serde", ] @@ -10407,6 +10903,19 @@ dependencies = [ "digest 0.10.3", ] +[[package]] +name = "sha3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +dependencies = [ + "block-buffer 0.7.3", + "byte-tools", + "digest 0.8.1", + "keccak", + "opaque-debug 0.2.3", +] + [[package]] name = "sha3" version = "0.9.1" @@ -10506,7 +11015,7 @@ version = "0.9.26" source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.26#d8785970175dce344f2a6ad1cd88297529a6dd59" dependencies = [ "enumn", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "paste", "sp-runtime", "sp-std", @@ -10583,7 +11092,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "hash-db", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-api-proc-macro", "sp-core", "sp-runtime", @@ -10610,7 +11119,7 @@ name = "sp-application-crypto" version = "6.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-core", @@ -10625,7 +11134,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "integer-sqrt", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-debug-derive", @@ -10638,7 +11147,7 @@ name = "sp-authority-discovery" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-application-crypto", @@ -10652,7 +11161,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "async-trait", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-inherents", "sp-runtime", "sp-std", @@ -10663,7 +11172,7 @@ name = "sp-block-builder" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-api", "sp-inherents", "sp-runtime", @@ -10678,7 +11187,7 @@ dependencies = [ "futures 0.3.24", "log", "lru 0.7.8", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "sp-api", "sp-consensus", @@ -10697,7 +11206,7 @@ dependencies = [ "futures 0.3.24", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-core", "sp-inherents", "sp-runtime", @@ -10713,7 +11222,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "async-trait", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-application-crypto", @@ -10732,7 +11241,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "async-trait", "merlin", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-api", @@ -10753,7 +11262,7 @@ name = "sp-consensus-slots" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-arithmetic", @@ -10767,7 +11276,7 @@ name = "sp-consensus-vrf" version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "schnorrkel", "sp-core", @@ -10796,10 +11305,10 @@ dependencies = [ "log", "merlin", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "parking_lot 0.12.1", - "primitive-types", + "primitive-types 0.11.1", "rand 0.7.3", "regex", "scale-info", @@ -10871,7 +11380,7 @@ version = "0.12.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "environmental", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-std", "sp-storage", ] @@ -10883,7 +11392,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "finality-grandpa", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-api", @@ -10901,7 +11410,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "async-trait", "impl-trait-for-tuples", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-core", "sp-runtime", "sp-std", @@ -10917,7 +11426,7 @@ dependencies = [ "hash-db", "libsecp256k1", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "secp256k1", "sp-core", @@ -10952,7 +11461,7 @@ dependencies = [ "async-trait", "futures 0.3.24", "merlin", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "schnorrkel", "serde", @@ -10976,7 +11485,7 @@ version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "serde", "sp-api", "sp-core", @@ -10990,7 +11499,7 @@ name = "sp-npos-elections" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "serde", "sp-arithmetic", @@ -11038,7 +11547,7 @@ dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "paste", "rand 0.7.3", @@ -11057,8 +11566,8 @@ version = "6.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", + "parity-scale-codec 3.1.5", + "primitive-types 0.11.1", "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std", @@ -11086,7 +11595,7 @@ version = "0.10.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-core", "sp-io", "sp-std", @@ -11108,7 +11617,7 @@ name = "sp-session" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-api", "sp-core", @@ -11122,7 +11631,7 @@ name = "sp-staking" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "sp-std", @@ -11136,7 +11645,7 @@ dependencies = [ "hash-db", "log", "num-traits", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parking_lot 0.12.1", "rand 0.7.3", "smallvec", @@ -11161,7 +11670,7 @@ version = "6.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "impl-serde", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "ref-cast", "serde", "sp-debug-derive", @@ -11189,7 +11698,7 @@ dependencies = [ "async-trait", "futures-timer", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-api", "sp-inherents", "sp-runtime", @@ -11202,7 +11711,7 @@ name = "sp-tracing" version = "5.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-std", "tracing", "tracing-core", @@ -11225,7 +11734,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "async-trait", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-inherents", @@ -11241,7 +11750,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "hash-db", "memory-db", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-core", "sp-std", @@ -11256,7 +11765,7 @@ version = "5.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "impl-serde", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-wasm 0.42.2", "scale-info", "serde", @@ -11272,7 +11781,7 @@ name = "sp-version-proc-macro" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", "proc-macro2", "quote", "syn", @@ -11285,7 +11794,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "impl-trait-for-tuples", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-std", "wasmi", "wasmtime", @@ -11442,7 +11951,7 @@ dependencies = [ "futures 0.3.24", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-rpc-api", "sc-transaction-pool-api", @@ -11474,7 +11983,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8 dependencies = [ "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-rpc-api", "scale-info", @@ -11496,7 +12005,7 @@ dependencies = [ "async-trait", "futures 0.3.24", "hex", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-client-api", "sc-client-db", "sc-consensus", @@ -11529,7 +12038,7 @@ dependencies = [ "memory-db", "pallet-babe", "pallet-timestamp", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "parity-util-mem", "sc-service", "scale-info", @@ -11564,7 +12073,7 @@ version = "2.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.26#e8a7d161f39db70cb27fdad6c6e215cf493ebc3b" dependencies = [ "futures 0.3.24", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -11789,6 +12298,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -12022,6 +12540,16 @@ dependencies = [ "hash-db", ] +[[package]] +name = "triehash" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" +dependencies = [ + "hash-db", + "rlp", +] + [[package]] name = "trust-dns-proto" version = "0.21.2" @@ -12079,7 +12607,7 @@ dependencies = [ "clap", "jsonrpsee", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "remote-externalities", "sc-chain-spec", "sc-cli", @@ -12108,9 +12636,9 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", "digest 0.10.3", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] @@ -12800,6 +13328,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + [[package]] name = "wyz" version = "0.5.0" @@ -12828,7 +13362,7 @@ dependencies = [ "derivative", "impl-trait-for-tuples", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info", "sp-runtime", "xcm-procedural", @@ -12843,7 +13377,7 @@ dependencies = [ "frame-system", "log", "pallet-transaction-payment", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "polkadot-parachain", "scale-info", "sp-arithmetic", @@ -12868,7 +13402,7 @@ dependencies = [ "frame-support", "frame-system", "parachain-info", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "paste", "polkadot-primitives", "polkadot-runtime-parachains", @@ -12887,7 +13421,7 @@ dependencies = [ "frame-support", "impl-trait-for-tuples", "log", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "sp-arithmetic", "sp-core", "sp-io", @@ -12896,6 +13430,30 @@ dependencies = [ "xcm", ] +[[package]] +name = "xcm-primitives" +version = "0.1.0" +source = "git+https://github.com/NunoAlexandre/moonbeam?branch=unfork#37b09687a4513c6541694c8a1bc755dbb662b850" +dependencies = [ + "ethereum", + "ethereum-types 0.13.1", + "frame-support", + "frame-system", + "hex", + "log", + "orml-traits", + "parity-scale-codec 3.1.5", + "scale-info", + "serde", + "sha3 0.8.2", + "sp-io", + "sp-runtime", + "sp-std", + "xcm", + "xcm-builder", + "xcm-executor", +] + [[package]] name = "xcm-procedural" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 82e9ef69bf..bf8b8fba4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,7 @@ members = [ "pallets/anchors", "pallets/claims", "pallets/collator-allowlist", + "pallets/connectors", "pallets/crowdloan-claim", "pallets/crowdloan-reward", "pallets/migration", diff --git a/flake.nix b/flake.nix index ef25f7e11b..9eb3fd5854 100644 --- a/flake.nix +++ b/flake.nix @@ -96,7 +96,7 @@ }; # This is a hash of all the Cargo dependencies, for reproducibility. - cargoSha256 = "sha256-q3gwCT8dCrkMshGhHnMDPjuYXjbZJbyJwcnCaRElcIU="; + cargoSha256 = "sha256-B2BrlXTxOrWA1GPCxPEIPIAgv5xVy6xJcdVGcZyiHeA="; nativeBuildInputs = with pkgs; [ clang git-mock pkg-config ]; buildInputs = with pkgs; [ openssl ] ++ ( diff --git a/libs/traits/src/lib.rs b/libs/traits/src/lib.rs index 6b1289c164..41b240aa4b 100644 --- a/libs/traits/src/lib.rs +++ b/libs/traits/src/lib.rs @@ -108,7 +108,7 @@ pub trait PoolNAV { /// A trait that support pool inspection operations such as pool existence checks and pool admin of permission set. pub trait PoolInspect { - type PoolId: Parameter + Member + Debug + Copy + Default + TypeInfo; + type PoolId: Parameter + Member + Debug + Copy + Default + TypeInfo + Encode + Decode; type TrancheId: Parameter + Member + Debug + Copy + Default + TypeInfo; type Rate; type Moment; diff --git a/pallets/connectors/Cargo.toml b/pallets/connectors/Cargo.toml new file mode 100644 index 0000000000..5c41ea7389 --- /dev/null +++ b/pallets/connectors/Cargo.toml @@ -0,0 +1,102 @@ +[package] +authors = ["Centrifuge "] +description = 'Centrifuge Connectors Pallet' +edition = '2018' +license = "LGPL-3.0" +name = 'pallet-connectors' +repository = "https://github.com/centrifuge/centrifuge-chain/pallets/connectors" +version = '0.0.1' + +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] + +[dependencies] +codec = { package = 'parity-scale-codec', version = '3.0.0', features = ['derive'] , default-features = false } +hex = { version = "0.4.3", default_features = false } +ethabi = { version = "16.0", default-features = false } +scale-info = { version = "2.0", default-features = false, features = ["derive"] } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } +frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } +sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } + +# Substrate crates +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } + +# Optional dependencies for benchmarking +frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true , branch = "polkadot-v0.9.26" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true, branch = "polkadot-v0.9.26" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true, branch = "polkadot-v0.9.26" } +orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, optional = true, branch = "polkadot-v0.9.26" } +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, optional = true, branch = "polkadot-v0.9.26" } + +# Our custom pallets +cfg-primitives = { path = "../../libs/primitives", default-features = false } +cfg-types = { path = "../../libs/types", default-features = false } +cfg-traits = { path = "../../libs/traits", default-features = false } +runtime-common = { path = "../../runtime/common", default-features = false } + +# Polkadot +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.26" } + +pallet-xcm-transactor = { git = "https://github.com/NunoAlexandre/moonbeam", default-features = false, branch = "unfork" } +pallet-ethereum-xcm = { git = "https://github.com/NunoAlexandre/moonbeam", default-features = false, branch = "unfork" } +xcm-primitives = { git = "https://github.com/NunoAlexandre/moonbeam", default-features = false, branch = "unfork" } +pallet-ethereum = { git = "https://github.com/NunoAlexandre/frontier", branch = "polkadot-v0.9.26", default-features = false } + +[dev-dependencies] +hex = "0.4.3" +serde = { version = "1.0.102" } + +# Our pallets +pallet-pools = { path = "../pools", default-features = false} +pallet-loans = { path = "../loans", default-features = false} +pallet-interest-accrual = { path = "../interest-accrual", default-features = false} +pallet-permissions = { path = "../permissions", default-features = false} + +# Substrate crates & pallets +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } +sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } +pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } +pallet-uniques = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.26" } + +# Orml crates +orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = true, branch = "polkadot-v0.9.26" } +orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v0.9.26" } + +# Local crates +runtime-common = { path = "../../runtime/common", default-features = true } + +[features] +default = ['std'] +runtime-benchmarks = [ + "frame-benchmarking", + "pallet-balances", + "orml-tokens", + "orml-traits", +] +std = [ + 'codec/std', + 'cfg-types/std', + 'cfg-traits/std', + 'frame-support/std', + 'frame-system/std', + 'sp-std/std', + 'sp-runtime/std', + 'orml-tokens/std', + 'orml-traits/std', + 'pallet-balances/std', + 'runtime-common/std', + 'xcm/std', + 'pallet-xcm-transactor/std', + 'pallet-ethereum-xcm/std', + 'pallet-ethereum/std', + 'xcm-primitives/std', + 'ethabi/std', + 'pallet-interest-accrual/std', + 'pallet-permissions/std', + 'pallet-loans/std', + 'pallet-pools/std', + 'pallet-uniques/std' +] diff --git a/pallets/connectors/src/lib.rs b/pallets/connectors/src/lib.rs new file mode 100644 index 0000000000..46cf453ccc --- /dev/null +++ b/pallets/connectors/src/lib.rs @@ -0,0 +1,507 @@ +// Copyright 2022 Centrifuge Foundation (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +#![cfg_attr(not(feature = "std"), no_std)] +use cfg_traits::PoolInspect; +use codec::{Decode, Encode}; +use ethabi::{Bytes, Contract}; +use frame_support::traits::{ + fungibles::{Inspect, Mutate, Transfer}, + OriginTrait, +}; +pub use pallet::*; +use scale_info::TypeInfo; +use sp_core::{TypeId, U256}; +use sp_runtime::{traits::AtLeast32BitUnsigned, FixedPointNumber}; +use sp_std::{boxed::Box, convert::TryInto, vec, vec::Vec}; + +pub mod weights; + +mod message; +pub use message::*; + +mod routers; +pub use routers::*; + +/// A Domain is a chain or network we can send a Connectors message to. +/// The domain indices need to match those used in the EVM contracts and these +/// need to pass the Centrifuge domain to send tranche tokens from the other +/// domain here. Therefore, DO NOT remove or move variants around. +#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)] +#[cfg_attr(feature = "std", derive(Debug))] +pub enum Domain { + Centrifuge, + Moonbeam, + Ethereum, + Avalanche, + Gnosis, +} + +#[derive(Encode, Decode, Clone, Eq, PartialEq, TypeInfo)] +pub struct DomainLocator { + pub domain: Domain, +} + +impl TypeId for DomainLocator { + const TYPE_ID: [u8; 4] = *b"domn"; +} + +#[derive(Encode, Decode, Default, Clone, PartialEq, TypeInfo)] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct DomainAddress { + pub domain: Domain, + pub address: [u8; 32], +} + +impl TypeId for DomainAddress { + const TYPE_ID: [u8; 4] = *b"dadr"; +} + +// Type aliases +pub type PoolIdOf = <::PoolInspect as PoolInspect< + ::AccountId, + ::CurrencyId, +>>::PoolId; + +pub type TrancheIdOf = <::PoolInspect as PoolInspect< + ::AccountId, + ::CurrencyId, +>>::TrancheId; + +pub type MessageOf = + Message, TrancheIdOf, ::Balance, ::Rate>; + +pub type CurrencyIdOf = ::CurrencyId; + +#[frame_support::pallet] +pub mod pallet { + use cfg_primitives::Moment; + use cfg_traits::{Permissions, PoolInspect}; + use cfg_types::{PermissionScope, PoolRole, Role}; + use frame_support::{error::BadOrigin, pallet_prelude::*, traits::UnixTime}; + use frame_system::pallet_prelude::*; + use pallet_xcm_transactor::{Currency, CurrencyPayment, TransactWeights}; + use sp_runtime::traits::{AccountIdConversion, Zero}; + use xcm::latest::OriginKind; + + use super::*; + use crate::weights::WeightInfo; + + #[pallet::pallet] + #[pallet::generate_store(pub (super) trait Store)] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config + pallet_xcm_transactor::Config { + type Event: From> + IsType<::Event>; + + type WeightInfo: WeightInfo; + + type Balance: Parameter + + Member + + AtLeast32BitUnsigned + + Default + + Copy + + MaybeSerializeDeserialize + + MaxEncodedLen; + + type Rate: Parameter + Member + MaybeSerializeDeserialize + FixedPointNumber + TypeInfo; + + type CurrencyId: Parameter + + Copy + + Default + + IsType<::CurrencyId>; + + /// The origin allowed to make admin-like changes, such calling `set_domain_router`. + type AdminOrigin: EnsureOrigin; + + type PoolInspect: PoolInspect< + Self::AccountId, + ::CurrencyId, + Rate = Self::Rate, + >; + + type Permission: Permissions< + Self::AccountId, + Scope = PermissionScope, ::CurrencyId>, + Role = Role, Moment>, + Error = DispatchError, + >; + + type Time: UnixTime; + + type Tokens: Mutate + + Inspect< + Self::AccountId, + AssetId = ::CurrencyId, + Balance = ::Balance, + > + Transfer; + } + + #[pallet::event] + #[pallet::generate_deposit(pub (super) fn deposit_event)] + pub enum Event { + /// A message was sent to a domain + MessageSent { + message: MessageOf, + domain: Domain, + }, + + /// The Router for a given domain was set + SetDomainRouter { + domain: Domain, + router: Router>, + }, + } + + #[pallet::storage] + pub(crate) type DomainRouter = + StorageMap<_, Blake2_128Concat, Domain, Router>>; + + #[pallet::error] + pub enum Error { + /// A pool could not be found + PoolNotFound, + /// A tranche could not be found + TrancheNotFound, + /// Token price is not set + MissingPrice, + /// Router not set for a given domain + MissingRouter, + /// Transfer amount must be non-zero + InvalidTransferAmount, + /// Failed to build Ethereum_Xcm call + FailedToBuildEthereumXcmCall, + } + + #[pallet::call] + impl Pallet { + /// Set a Domain's router + #[pallet::weight(< T as Config >::WeightInfo::set_domain_router())] + pub fn set_domain_router( + origin: OriginFor, + domain: Domain, + router: Router>, + ) -> DispatchResult { + T::AdminOrigin::ensure_origin(origin.clone())?; + + >::insert(domain.clone(), router.clone()); + Self::deposit_event(Event::SetDomainRouter { domain, router }); + + Ok(()) + } + + /// Add a pool to a given domain + #[pallet::weight(< T as Config >::WeightInfo::add_pool())] + pub fn add_pool( + origin: OriginFor, + pool_id: PoolIdOf, + domain: Domain, + ) -> DispatchResult { + let who = ensure_signed(origin.clone())?; + + ensure!( + T::PoolInspect::pool_exists(pool_id), + Error::::PoolNotFound + ); + + Self::do_send_message(who, Message::AddPool { pool_id }, domain)?; + + Ok(()) + } + + /// Add a tranche to a given domain + #[pallet::weight(< T as Config >::WeightInfo::add_tranche())] + pub fn add_tranche( + origin: OriginFor, + pool_id: PoolIdOf, + tranche_id: TrancheIdOf, + domain: Domain, + ) -> DispatchResult { + let who = ensure_signed(origin.clone())?; + + ensure!( + T::PoolInspect::tranche_exists(pool_id, tranche_id), + Error::::TrancheNotFound + ); + + // Send the message through the router + // + // TODO: retrieve token name and symbol from asset-registry + // Depends on https://github.com/centrifuge/centrifuge-chain/issues/842 + // + // TODO: only allow calling add_tranche when + // both the name and symbol are non-zero values. + Self::do_send_message( + who, + Message::AddTranche { + pool_id, + tranche_id, + token_name: [0; 32], + token_symbol: [0; 32], + }, + domain, + )?; + + Ok(()) + } + + /// Update a token price + #[pallet::weight(< T as Config >::WeightInfo::update_token_price())] + pub fn update_token_price( + origin: OriginFor, + pool_id: PoolIdOf, + tranche_id: TrancheIdOf, + domain: Domain, + ) -> DispatchResult { + let who = ensure_signed(origin.clone())?; + + ensure!( + T::PoolInspect::tranche_exists(pool_id, tranche_id), + Error::::TrancheNotFound + ); + + let latest_price = T::PoolInspect::get_tranche_token_price(pool_id, tranche_id) + .ok_or(Error::::MissingPrice)?; + + Self::do_send_message( + who, + Message::UpdateTokenPrice { + pool_id, + tranche_id, + price: latest_price.price, + }, + domain, + )?; + + Ok(()) + } + + /// Update a member + #[pallet::weight(< T as Config >::WeightInfo::update_member())] + pub fn update_member( + origin: OriginFor, + address: DomainAddress, + pool_id: PoolIdOf, + tranche_id: TrancheIdOf, + valid_until: Moment, + ) -> DispatchResult { + let who = ensure_signed(origin.clone())?; + + // Check that the origin is a member of this tranche token or + // is a MemberListAdmin and thus allowed to add other members. + ensure!( + T::Permission::has( + PermissionScope::Pool(pool_id), + who.clone(), + Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, Self::now())) + ) || T::Permission::has( + PermissionScope::Pool(pool_id), + who.clone(), + Role::PoolRole(PoolRole::MemberListAdmin) + ), + BadOrigin + ); + + T::Permission::add( + PermissionScope::Pool(pool_id), + address.into_account_truncating(), + Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, valid_until)), + )?; + + Self::do_send_message( + who, + Message::UpdateMember { + pool_id, + tranche_id, + valid_until, + address: address.address, + }, + address.domain, + )?; + + Ok(()) + } + + /// Transfer tranche tokens to a given address + #[pallet::weight(< T as Config >::WeightInfo::transfer())] + pub fn transfer( + origin: OriginFor, + pool_id: PoolIdOf, + tranche_id: TrancheIdOf, + address: DomainAddress, + amount: ::Balance, + ) -> DispatchResult { + let who = ensure_signed(origin.clone())?; + + // Check that the destination is a member of this tranche token + ensure!( + T::Permission::has( + PermissionScope::Pool(pool_id), + address.into_account_truncating(), + Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, Self::now())) + ), + BadOrigin + ); + + ensure!(!amount.is_zero(), Error::::InvalidTransferAmount); + + // TODO: Transfer to the domain account for bookkeeping + // T::Tokens::transfer( + // T::CurrencyId::Tranche(pool_id, tranche_id), + // &who, + // &DomainLocator { + // domain: address.domain, + // } + // .into_account_truncating(), + // amount, + // false, + // )?; + + Self::do_send_message( + who, + Message::Transfer { + pool_id, + tranche_id, + amount, + domain: address.clone().domain, + destination: address.clone().address, + }, + address.domain, + )?; + + Ok(()) + } + } + + impl Pallet { + pub(crate) fn now() -> Moment { + T::Time::now().as_secs() + } + + /// Send the `message` to the given domain. + pub fn do_send_message( + fee_payer: T::AccountId, + message: MessageOf, + domain: Domain, + ) -> DispatchResult { + let Router::Xcm(xcm_domain) = + >::get(domain.clone()).ok_or(Error::::MissingRouter)?; + + let contract_call = Self::encoded_contract_call(message.encode()); + let ethereum_xcm_call = + Self::encoded_ethereum_xcm_call(xcm_domain.clone(), contract_call); + + pallet_xcm_transactor::Pallet::::transact_through_sovereign( + T::Origin::root(), + // The destination to which the message should be sent + Box::new(xcm_domain.location), + fee_payer, + // The currency in which we want to pay fees + CurrencyPayment { + currency: Currency::AsCurrencyId(xcm_domain.fee_currency), + fee_amount: None, + }, + // The call to be executed in the destination chain + ethereum_xcm_call, + OriginKind::SovereignAccount, + TransactWeights { + // Specify a conservative max weight + transact_required_weight_at_most: 8_000_000_000, + overall_weight: None, + }, + )?; + + Self::deposit_event(Event::MessageSent { message, domain }); + + Ok(()) + } + + /// Build the encoded `ethereum_xcm::transact(eth_tx)` call that should + /// request to execute `evm_call`. + /// + /// * `xcm_domain` - All the necessary info regarding the xcm-based domain + /// where this `ethereum_xcm` call is to be executed + /// * `evm_call` - The encoded EVM call calling ConnectorsXcmRouter::handle(msg) + pub fn encoded_ethereum_xcm_call( + xcm_domain: XcmDomain>, + evm_call: Vec, + ) -> Vec { + let mut encoded: Vec = Vec::new(); + + encoded.append(&mut xcm_domain.ethereum_xcm_transact_call_index.clone()); + encoded.append( + &mut xcm_primitives::EthereumXcmTransaction::V1( + xcm_primitives::EthereumXcmTransactionV1 { + gas_limit: U256::from(80_000), + fee_payment: xcm_primitives::EthereumXcmFee::Auto, + action: pallet_ethereum::TransactionAction::Call( + xcm_domain.contract_address, + ), + value: U256::zero(), + input: evm_call, + access_list: None, + }, + ) + .encode(), + ); + + encoded + } + + /// Return the encoded contract call, i.e, ConnectorsXcmRouter::handle(encoded_msg). + pub fn encoded_contract_call(encoded_msg: Vec) -> Bytes { + let contract = xcm_router_contract(); + let encoded_contract_call = contract + .function("handle") + .expect("Known at compilation time") + .encode_input(&[ethabi::Token::Bytes(encoded_msg)]) + .expect("Known at compilation time"); + + encoded_contract_call + } + } +} + +/// The ConnectorsXcmRouter Abi as in ethabi::Contract +/// Note: We only concern ourselves with the `handle` function of the contract +/// since that's all we need to build the calls for remote EVM execution. +pub fn xcm_router_contract() -> Contract { + use sp_std::collections::btree_map::BTreeMap; + + let mut functions = BTreeMap::new(); + #[allow(deprecated)] + functions.insert( + "handle".into(), + vec![ethabi::Function { + name: "handle".into(), + inputs: vec![ethabi::Param { + name: "message".into(), + kind: ethabi::ParamType::Bytes, + internal_type: None, + }], + outputs: vec![], + constant: false, + state_mutability: Default::default(), + }], + ); + + ethabi::Contract { + constructor: None, + functions, + events: Default::default(), + errors: Default::default(), + receive: false, + fallback: false, + } +} diff --git a/pallets/connectors/src/message.rs b/pallets/connectors/src/message.rs new file mode 100644 index 0000000000..344b812a2c --- /dev/null +++ b/pallets/connectors/src/message.rs @@ -0,0 +1,282 @@ +use cfg_primitives::Moment; +use sp_std::{vec, vec::Vec}; + +use crate::*; + +#[derive(Decode, Clone, PartialEq, TypeInfo)] +#[cfg_attr(feature = "std", derive(Debug))] +pub enum Message +where + Domain: Encode + Decode, + PoolId: Encode + Decode, + TrancheId: Encode + Decode, + Balance: Encode + Decode, + Rate: Encode + Decode, +{ + Invalid, + AddPool { + pool_id: PoolId, + }, + AddTranche { + pool_id: PoolId, + tranche_id: TrancheId, + token_name: [u8; 32], + token_symbol: [u8; 32], + }, + UpdateTokenPrice { + pool_id: PoolId, + tranche_id: TrancheId, + price: Rate, + }, + UpdateMember { + pool_id: PoolId, + tranche_id: TrancheId, + address: [u8; 32], + valid_until: Moment, + }, + Transfer { + pool_id: PoolId, + tranche_id: TrancheId, + domain: Domain, + destination: [u8; 32], + amount: Balance, + }, +} + +impl< + Domain: Encode + Decode, + PoolId: Encode + Decode, + TrancheId: Encode + Decode, + Balance: Encode + Decode, + Rate: Encode + Decode, + > Message +{ + /// The call type that identifies a specific Message variant. This value is used + /// to encode/decode a Message to/from a bytearray, whereas the head of the bytearray + /// is the call type, followed by each message's param values. + /// + /// NOTE: Each message must immutably map to the same u8. Messages are decoded + /// in other domains and MUST follow the defined standard. + fn call_type(&self) -> u8 { + match self { + Self::Invalid => 0, + Self::AddPool { .. } => 1, + Self::AddTranche { .. } => 2, + Self::UpdateTokenPrice { .. } => 3, + Self::UpdateMember { .. } => 4, + Self::Transfer { .. } => 5, + } + } +} + +impl< + Domain: Encode + Decode, + PoolId: Encode + Decode, + TrancheId: Encode + Decode, + Balance: Encode + Decode, + Rate: Encode + Decode, + > Encode for Message +{ + fn encode(&self) -> Vec { + match self { + Message::Invalid => vec![self.call_type()], + Message::AddPool { pool_id } => { + let mut message: Vec = vec![]; + message.push(self.call_type()); + + let mut encoded_pool_id = pool_id.encode(); + encoded_pool_id.reverse(); + message.append(&mut encoded_pool_id); + + message + } + Message::AddTranche { + pool_id, + tranche_id, + token_name, + token_symbol, + } => { + let mut message: Vec = vec![]; + message.push(self.call_type()); + + let mut encoded_pool_id = pool_id.encode(); + encoded_pool_id.reverse(); + message.append(&mut encoded_pool_id); + + message.append(&mut tranche_id.encode()); + message.append(&mut token_name.encode()); + message.append(&mut token_symbol.encode()); + + message + } + Message::UpdateTokenPrice { + pool_id, + tranche_id, + price, + } => { + let mut message: Vec = vec![]; + message.push(self.call_type()); + + let mut encoded_pool_id = pool_id.encode(); + encoded_pool_id.reverse(); + message.append(&mut encoded_pool_id); + + message.append(&mut tranche_id.encode()); + message.append(&mut price.encode()); + + message + } + Message::UpdateMember { + pool_id, + tranche_id, + address, + valid_until, + } => { + let mut message: Vec = vec![]; + message.push(self.call_type()); + + let mut encoded_pool_id = pool_id.encode(); + encoded_pool_id.reverse(); + message.append(&mut encoded_pool_id); + + message.append(&mut tranche_id.encode()); + message.append(&mut address.encode()); + message.append(&mut valid_until.encode()); + + message + } + Message::Transfer { + pool_id, + tranche_id, + domain, + destination, + amount, + } => { + let mut message: Vec = vec![]; + message.push(self.call_type()); + + let mut encoded_pool_id = pool_id.encode(); + encoded_pool_id.reverse(); + message.append(&mut encoded_pool_id); + + message.append(&mut tranche_id.encode()); + message.append(&mut domain.encode()); + message.append(&mut destination.encode()); + message.append(&mut amount.encode()); + + message + } + } + } +} + +#[cfg(test)] +mod tests { + use codec::Encode; + use hex::FromHex; + use sp_runtime::traits::One; + + use crate::Message; + + type PoolId = u64; + type TrancheId = [u8; 16]; + type Balance = cfg_primitives::Balance; + type Rate = cfg_types::Rate; + + const CURRENCY: Balance = 1_000_000_000_000_000_000; + + pub mod encode { + use super::*; + use crate::Domain; + + #[test] + fn invalid() { + let msg = Message::::Invalid; + assert_eq!(msg.encode(), vec![msg.call_type()]); + assert_eq!(msg.encode(), vec![0]); + } + + #[test] + fn add_pool_zero() { + let msg = Message::::AddPool { pool_id: 0 }; + let encoded = msg.encode(); + + let expected_hex = "010000000000000000"; + let expected = <[u8; 9]>::from_hex(expected_hex).expect("Decoding failed"); + assert_eq!(encoded, expected); + } + + #[test] + fn add_pool_long() { + let msg = + Message::::AddPool { pool_id: 12378532 }; + let encoded = msg.encode(); + + let expected_hex = "010000000000bce1a4"; + let expected = <[u8; 9]>::from_hex(expected_hex).expect("Decoding failed"); + assert_eq!(encoded, expected); + } + + #[test] + fn add_tranche() { + let msg = Message::::AddTranche { + pool_id: 12378532, + tranche_id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], + token_name: [0; 32], + token_symbol: [0; 32], + }; + let encoded = msg.encode(); + + let expected_hex = "020000000000bce1a40000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; + let expected = <[u8; 89]>::from_hex(expected_hex).expect("Decoding failed"); + assert_eq!(encoded, expected); + } + + #[test] + fn update_token_price() { + let msg = Message::::UpdateTokenPrice { + pool_id: 1, + tranche_id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], + price: Rate::one(), + }; + let encoded = msg.encode(); + + let input = "03000000000000000100000000000000000000000000000001000000e83c80d09f3c2e3b0300000000"; + let expected = <[u8; 41]>::from_hex(input).expect("Decoding failed"); + assert_eq!(encoded, expected); + } + + #[test] + fn update_member() { + let msg = Message::::UpdateMember { + pool_id: 1, + tranche_id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], + address: [1; 32], + valid_until: 100, + }; + let encoded = msg.encode(); + + let input = "0400000000000000010000000000000000000000000000000101010101010101010101010101010101010101010101010101010101010101016400000000000000"; + let expected = <[u8; 65]>::from_hex(input).expect("Decoding failed"); + assert_eq!(encoded, expected); + } + + #[test] + #[ignore = "wip"] + fn transfer() { + let msg = Message::::Transfer { + pool_id: 1, + tranche_id: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], + domain: Domain::Moonbeam, + destination: [1; 32], + amount: 100 * CURRENCY, + }; + let encoded = msg.encode(); + println!("{}", hex::encode(encoded.clone())); + + let input = "0500000000000000010000000000000000000000000000000101010101010101010101010101010101010101010101010101010101010101016400000000000000"; + let expected = <[u8; 65]>::from_hex(input).expect("Decoding failed"); + assert_eq!(encoded, expected); + } + } +} diff --git a/pallets/connectors/src/routers.rs b/pallets/connectors/src/routers.rs new file mode 100644 index 0000000000..5f1d170f6a --- /dev/null +++ b/pallets/connectors/src/routers.rs @@ -0,0 +1,30 @@ +use codec::{Decode, Encode}; +use scale_info::TypeInfo; +use sp_core::H160; +use sp_std::vec::Vec; +use xcm::VersionedMultiLocation; + +#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)] +#[cfg_attr(feature = "std", derive(Debug))] +pub enum Router { + // An XCM-based router + Xcm(XcmDomain), +} + +/// XcmDomain gathers all the required fields to build and send remote +/// calls to a specific XCM-based Domain. +#[derive(Encode, Decode, Clone, PartialEq, TypeInfo)] +#[cfg_attr(feature = "std", derive(Debug))] +pub struct XcmDomain { + /// the xcm multilocation of the domain + pub location: VersionedMultiLocation, + /// The ethereum_xcm::Call::transact call index on a given domain. + /// It should contain the pallet index + the `transact` call index, to which + /// we will append the eth_tx param. You can obtain this value by building + /// an ethereum_xcm::transact call with Polkadot JS on the target chain. + pub ethereum_xcm_transact_call_index: Vec, + /// The ConnectorsXcmRouter contract address on a given domain + pub contract_address: H160, + /// The currency in which execution fees will be paid on + pub fee_currency: CurrencyId, +} diff --git a/pallets/connectors/src/weights.rs b/pallets/connectors/src/weights.rs new file mode 100644 index 0000000000..52315e7e22 --- /dev/null +++ b/pallets/connectors/src/weights.rs @@ -0,0 +1,117 @@ +//! Autogenerated weights for pallet_connectors +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2022-03-02, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("development-local"), DB CACHE: 1024 + +// Executed Command: +// target/release/centrifuge-chain +// benchmark +// --chain=development-local +// --steps=50 +// --repeat=20 +// --pallet=pallet-connectors +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./pallets/connectors/src/weights.rs +// --template=./scripts/frame-weight-template.hbs + +#![allow(unused_parens)] +#![allow(unused_imports)] + +use frame_support::{ + traits::Get, + weights::{constants::RocksDbWeight, Weight}, +}; +use sp_std::marker::PhantomData; + +/// Weight functions needed for pallet_connectors. +pub trait WeightInfo { + fn add_pool() -> Weight; + fn add_tranche() -> Weight; + fn update_token_price() -> Weight; + fn update_member() -> Weight; + fn transfer() -> Weight; + fn set_domain_router() -> Weight; +} + +/// Weights for pallet_connectors using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl WeightInfo for SubstrateWeight { + fn set_domain_router() -> Weight { + (32_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } + + fn add_pool() -> Weight { + (32_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } + + fn add_tranche() -> Weight { + (32_000_000 as Weight) + .saturating_add(T::DbWeight::get().reads(3 as Weight)) + .saturating_add(T::DbWeight::get().writes(5 as Weight)) + } + + fn update_token_price() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } + + fn update_member() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } + + fn transfer() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + fn set_domain_router() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } + + fn add_pool() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } + + fn add_tranche() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } + + fn update_token_price() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } + + fn update_member() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } + + fn transfer() -> Weight { + (32_000_000 as Weight) + .saturating_add(RocksDbWeight::get().reads(3 as Weight)) + .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + } +} diff --git a/runtime/altair/src/xcm.rs b/runtime/altair/src/xcm.rs index 903f066e54..ddbd89b162 100644 --- a/runtime/altair/src/xcm.rs +++ b/runtime/altair/src/xcm.rs @@ -146,7 +146,7 @@ pub type Barrier = ( AllowSubscriptionsFrom, ); -/// Means for transacting the fungibles assets of ths parachain. +/// Means for transacting the fungibles assets of this parachain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation Tokens, diff --git a/runtime/centrifuge/src/xcm.rs b/runtime/centrifuge/src/xcm.rs index 272fb14623..2dc73513c2 100644 --- a/runtime/centrifuge/src/xcm.rs +++ b/runtime/centrifuge/src/xcm.rs @@ -143,7 +143,7 @@ pub type Barrier = ( AllowSubscriptionsFrom, ); -/// Means for transacting the fungibles assets of ths parachain. +/// Means for transacting the fungibles assets of this parachain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation Tokens, diff --git a/runtime/development/Cargo.toml b/runtime/development/Cargo.toml index 607d08ef77..38192fc170 100644 --- a/runtime/development/Cargo.toml +++ b/runtime/development/Cargo.toml @@ -131,6 +131,10 @@ pallet-bridge = { path = "../../pallets/bridge", default-features = false } pallet-nft = { path = "../../pallets/nft", default-features = false } pallet-interest-accrual = { path = "../../pallets/interest-accrual", default-features = false } pallet-keystore = { path = "../../pallets/keystore", default-features = false } +pallet-connectors = { path = "../../pallets/connectors", default-features = false } + +xcm-primitives = { git = "https://github.com/NunoAlexandre/moonbeam", default-features = false, branch = "unfork" } +pallet-xcm-transactor = { git = "https://github.com/NunoAlexandre/moonbeam", default-features = false, branch = "unfork" } [build-dependencies] substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" } @@ -227,6 +231,9 @@ std = [ "pallet-bridge/std", "pallet-keystore/std", "pallet-interest-accrual/std", + "pallet-connectors/std", + "pallet-xcm-transactor/std", + "xcm-primitives/std", ] runtime-benchmarks = [ diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 30fae82188..ae5136ed19 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -16,6 +16,7 @@ // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. #![recursion_limit = "256"] +use ::xcm::v2::MultiLocation; pub use cfg_primitives::{ constants::*, types::{PoolId, *}, @@ -82,6 +83,7 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use static_assertions::const_assert; use xcm_executor::XcmExecutor; +use xcm_primitives::{UtilityAvailableCalls, UtilityEncodeCall}; pub mod xcm; pub use crate::xcm::*; @@ -104,7 +106,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("centrifuge-devel"), impl_name: create_runtime_str!("centrifuge-devel"), authoring_version: 1, - spec_version: 1004, + spec_version: 1007, impl_version: 1, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, @@ -1107,6 +1109,40 @@ impl pallet_collator_selection::Config for Runtime { type WeightInfo = pallet_collator_selection::weights::SubstrateWeight; } +#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)] +pub struct NullTransactor {} + +impl UtilityEncodeCall for NullTransactor { + fn encode_call(self, _call: UtilityAvailableCalls) -> Vec { + unimplemented!("XcmTransactor feature not used") + } +} + +impl xcm_primitives::XcmTransact for NullTransactor { + fn destination(self) -> MultiLocation { + unimplemented!("XcmTransactor feature not used") + } +} + +impl pallet_xcm_transactor::Config for Runtime { + type AccountIdToMultiLocation = xcm::AccountIdToMultiLocation; + type AssetTransactor = xcm::FungiblesTransactor; + type Balance = Balance; + type BaseXcmWeight = BaseXcmWeight; + type CurrencyId = CurrencyId; + type CurrencyIdToMultiLocation = xcm::CurrencyIdConvert; + type DerivativeAddressRegistrationOrigin = EnsureRoot; + type Event = Event; + type LocationInverter = xcm_builder::LocationInverter; + type ReserveProvider = xcm_primitives::AbsoluteAndRelativeReserve; + type SelfLocation = SelfLocation; + type SovereignAccountDispatcherOrigin = EnsureRoot; + type Transactor = NullTransactor; + type Weigher = xcm_builder::FixedWeightBounds; + type WeightInfo = (); + type XcmSender = XcmRouter; +} + parameter_types! { pub const LoansPalletId: PalletId = cfg_types::ids::LOANS_PALLET_ID; pub const MaxActiveLoansPerPool: u32 = 50; @@ -1302,6 +1338,19 @@ impl pallet_interest_accrual::Config for Runtime { type Weights = (); } +impl pallet_connectors::Config for Runtime { + type AdminOrigin = EnsureRoot; + type Balance = Balance; + type CurrencyId = CurrencyId; + type Event = Event; + type Permission = Permissions; + type PoolInspect = Pools; + type Rate = Rate; + type Time = Timestamp; + type Tokens = Tokens; + type WeightInfo = (); +} + parameter_types! { pub const BridgePalletId: PalletId = cfg_types::ids::BRIDGE_PALLET_ID; pub NativeTokenId: chainbridge::ResourceId = chainbridge::derive_resource_id(1, &sp_io::hashing::blake2_128(b"xRAD")); @@ -1432,6 +1481,7 @@ construct_runtime!( Bridge: pallet_bridge::{Pallet, Call, Storage, Config, Event} = 101, InterestAccrual: pallet_interest_accrual::{Pallet, Storage, Event, Config} = 102, Keystore: pallet_keystore::{Pallet, Call, Storage, Event} = 104, + Connectors: pallet_connectors::{Pallet, Call, Storage, Event} = 105, // XCM XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 120, @@ -1439,6 +1489,7 @@ construct_runtime!( CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 122, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event} = 123, XTokens: orml_xtokens::{Pallet, Storage, Call, Event} = 124, + XcmTransactor: pallet_xcm_transactor::{Pallet, Call, Storage, Event} = 125, // 3rd party pallets OrmlTokens: orml_tokens::{Pallet, Storage, Event, Config} = 150, diff --git a/runtime/development/src/xcm.rs b/runtime/development/src/xcm.rs index c9eb2e557b..82c9a8b8a5 100644 --- a/runtime/development/src/xcm.rs +++ b/runtime/development/src/xcm.rs @@ -146,7 +146,7 @@ pub type Barrier = ( AllowSubscriptionsFrom, ); -/// Means for transacting the fungibles assets of ths parachain. +/// Means for transacting the fungibles assets of this parachain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation Tokens, diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index d028eda56f..f363dcb0fa 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -84,6 +84,7 @@ altair-runtime = { path = "../altair" } centrifuge-runtime = { path = "../centrifuge" } [dev-dependencies] +hex = { version = "0.4.3", default_features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.26" } xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.26" } cfg-traits = { path = "../../libs/traits" } @@ -91,6 +92,7 @@ cfg-types = { path = "../../libs/types" } pallet-pools = { path = "../../pallets/pools" } pallet-loans = { path = "../../pallets/loans" } pallet-permissions = { path = "../../pallets/permissions" } +pallet-connectors = { path = "../../pallets/connectors" } [features] default = [ "runtime-development" ] diff --git a/runtime/integration-tests/src/xcm/development/mod.rs b/runtime/integration-tests/src/xcm/development/mod.rs new file mode 100644 index 0000000000..34f13591a7 --- /dev/null +++ b/runtime/integration-tests/src/xcm/development/mod.rs @@ -0,0 +1,3 @@ +mod setup; +mod test_net; +mod tests; diff --git a/runtime/integration-tests/src/xcm/development/setup.rs b/runtime/integration-tests/src/xcm/development/setup.rs new file mode 100644 index 0000000000..cb7d0c94cb --- /dev/null +++ b/runtime/integration-tests/src/xcm/development/setup.rs @@ -0,0 +1,121 @@ +// Copyright 2021 Centrifuge Foundation (centrifuge.io). +// +// This file is part of the Centrifuge chain project. +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +pub use altair_runtime::{AccountId, CurrencyId, Origin, Runtime, System}; +use cfg_primitives::{currency_decimals, parachains, Balance}; +use cfg_types::CustomMetadata; +use frame_support::traits::GenesisBuild; +use orml_traits::asset_registry::AssetMetadata; + +/// Accounts +pub const ALICE: [u8; 32] = [4u8; 32]; +pub const BOB: [u8; 32] = [5u8; 32]; + +/// A PARA ID used for a sibling parachain emulating Moonbeam. +/// It must be one that doesn't collide with any other in use. +pub const PARA_ID_MOONBEAM: u32 = 2023; + +pub struct ExtBuilder { + balances: Vec<(AccountId, CurrencyId, Balance)>, + parachain_id: u32, +} + +impl Default for ExtBuilder { + fn default() -> Self { + Self { + balances: vec![], + parachain_id: parachains::polkadot::centrifuge::ID, + } + } +} + +impl ExtBuilder { + pub fn balances(mut self, balances: Vec<(AccountId, CurrencyId, Balance)>) -> Self { + self.balances = balances; + self + } + + pub fn parachain_id(mut self, parachain_id: u32) -> Self { + self.parachain_id = parachain_id; + self + } + + pub fn build(self) -> sp_io::TestExternalities { + let mut t = frame_system::GenesisConfig::default() + .build_storage::() + .unwrap(); + let native_currency_id = development_runtime::NativeToken::get(); + pallet_balances::GenesisConfig:: { + balances: self + .balances + .clone() + .into_iter() + .filter(|(_, currency_id, _)| *currency_id == native_currency_id) + .map(|(account_id, _, initial_balance)| (account_id, initial_balance)) + .collect::>(), + } + .assimilate_storage(&mut t) + .unwrap(); + + orml_tokens::GenesisConfig:: { + balances: self + .balances + .into_iter() + .filter(|(_, currency_id, _)| *currency_id != native_currency_id) + .collect::>(), + } + .assimilate_storage(&mut t) + .unwrap(); + + >::assimilate_storage( + ¶chain_info::GenesisConfig { + parachain_id: self.parachain_id.into(), + }, + &mut t, + ) + .unwrap(); + + >::assimilate_storage( + &pallet_xcm::GenesisConfig { + safe_xcm_version: Some(2), + }, + &mut t, + ) + .unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| System::set_block_number(1)); + ext + } +} + +pub fn cfg(amount: Balance) -> Balance { + amount * dollar(currency_decimals::NATIVE) +} + +pub fn dollar(decimals: u32) -> Balance { + 10u128.saturating_pow(decimals.into()) +} + +pub fn moonbeam_account() -> AccountId { + parachain_account(PARA_ID_MOONBEAM.into()) +} + +pub fn centrifuge_account() -> AccountId { + parachain_account(parachains::polkadot::centrifuge::ID.into()) +} + +fn parachain_account(id: u32) -> AccountId { + use sp_runtime::traits::AccountIdConversion; + + polkadot_parachain::primitives::Sibling::from(id).into_account_truncating() +} diff --git a/runtime/integration-tests/src/xcm/development/test_net.rs b/runtime/integration-tests/src/xcm/development/test_net.rs new file mode 100644 index 0000000000..5e92125299 --- /dev/null +++ b/runtime/integration-tests/src/xcm/development/test_net.rs @@ -0,0 +1,158 @@ +// Copyright 2021 Centrifuge GmbH (centrifuge.io). +// This file is part of Centrifuge chain project. + +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). + +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +//! Relay chain and parachains emulation. + +use cfg_primitives::{parachains, AccountId}; +use cumulus_primitives_core::ParaId; +use development_runtime::CurrencyId; +use frame_support::traits::GenesisBuild; +use polkadot_primitives::v2::{BlockNumber, MAX_CODE_SIZE, MAX_POV_SIZE}; +use polkadot_runtime_parachains::configuration::HostConfiguration; +use sp_runtime::traits::AccountIdConversion; +use xcm_emulator::{decl_test_network, decl_test_parachain, decl_test_relay_chain}; + +use super::setup::{cfg, ExtBuilder, ALICE, BOB, PARA_ID_MOONBEAM}; + +decl_test_relay_chain! { + pub struct RelayChain { + Runtime = polkadot_runtime::Runtime, + XcmConfig = polkadot_runtime::xcm_config::XcmConfig, + new_ext = relay_ext(), + } +} + +decl_test_parachain! { + pub struct Development { + Runtime = development_runtime::Runtime, + Origin = development_runtime::Origin, + XcmpMessageHandler = development_runtime::XcmpQueue, + DmpMessageHandler = development_runtime::DmpQueue, + new_ext = para_ext(parachains::polkadot::centrifuge::ID), + } +} + +decl_test_parachain! { + pub struct Moonbeam { + Runtime = development_runtime::Runtime, + Origin = development_runtime::Origin, + XcmpMessageHandler = development_runtime::XcmpQueue, + DmpMessageHandler = development_runtime::DmpQueue, + new_ext = para_ext(PARA_ID_MOONBEAM), + } +} + +decl_test_network! { + pub struct TestNet { + relay_chain = RelayChain, + parachains = vec![ + // N.B: Ideally, we could use the defined para id constants but doing so + // fails with: "error: arbitrary expressions aren't allowed in patterns" + + // Be sure to use `parachains::polkadot::centrifuge::ID` + (2031, Development), + // Be sure to use `PARA_ID_MOONBEAM` + (2023, Moonbeam), + ], + } +} + +pub fn relay_ext() -> sp_io::TestExternalities { + use polkadot_runtime::{Runtime, System}; + + let mut t = frame_system::GenesisConfig::default() + .build_storage::() + .unwrap(); + + pallet_balances::GenesisConfig:: { + balances: vec![ + (AccountId::from(ALICE), cfg(2002)), + ( + ParaId::from(parachains::polkadot::centrifuge::ID).into_account_truncating(), + cfg(7), + ), + ( + ParaId::from(PARA_ID_MOONBEAM).into_account_truncating(), + cfg(7), + ), + ], + } + .assimilate_storage(&mut t) + .unwrap(); + + polkadot_runtime_parachains::configuration::GenesisConfig:: { + config: default_parachains_host_configuration(), + } + .assimilate_storage(&mut t) + .unwrap(); + + >::assimilate_storage( + &pallet_xcm::GenesisConfig { + safe_xcm_version: Some(2), + }, + &mut t, + ) + .unwrap(); + + let mut ext = sp_io::TestExternalities::new(t); + ext.execute_with(|| System::set_block_number(1)); + ext +} + +pub fn para_ext(parachain_id: u32) -> sp_io::TestExternalities { + ExtBuilder::default() + .balances(vec![ + (AccountId::from(ALICE), CurrencyId::Native, cfg(10_000)), + (AccountId::from(BOB), CurrencyId::Native, cfg(10_000)), + ]) + .parachain_id(parachain_id) + .build() +} + +fn default_parachains_host_configuration() -> HostConfiguration { + HostConfiguration { + minimum_validation_upgrade_delay: 5, + validation_upgrade_cooldown: 5u32, + validation_upgrade_delay: 5, + code_retention_period: 1200, + max_code_size: MAX_CODE_SIZE, + max_pov_size: MAX_POV_SIZE, + max_head_data_size: 32 * 1024, + group_rotation_frequency: 20, + chain_availability_period: 4, + thread_availability_period: 4, + max_upward_queue_count: 8, + max_upward_queue_size: 1024 * 1024, + max_downward_message_size: 1024, + ump_service_total_weight: 4 * 1_000_000_000, + max_upward_message_size: 50 * 1024, + max_upward_message_num_per_candidate: 5, + hrmp_sender_deposit: 0, + hrmp_recipient_deposit: 0, + hrmp_channel_max_capacity: 8, + hrmp_channel_max_total_size: 8 * 1024, + hrmp_max_parachain_inbound_channels: 4, + hrmp_max_parathread_inbound_channels: 4, + hrmp_channel_max_message_size: 1024 * 1024, + hrmp_max_parachain_outbound_channels: 4, + hrmp_max_parathread_outbound_channels: 4, + hrmp_max_message_num_per_candidate: 5, + dispute_period: 6, + no_show_slots: 2, + n_delay_tranches: 25, + needed_approvals: 2, + relay_vrf_modulo_samples: 2, + zeroth_delay_tranche_width: 0, + ..Default::default() + } +} diff --git a/runtime/integration-tests/src/xcm/development/tests/connectors.rs b/runtime/integration-tests/src/xcm/development/tests/connectors.rs new file mode 100644 index 0000000000..bdc1caf9c5 --- /dev/null +++ b/runtime/integration-tests/src/xcm/development/tests/connectors.rs @@ -0,0 +1,220 @@ +// Copyright 2021 Centrifuge GmbH (centrifuge.io). +// This file is part of Centrifuge chain project. +// +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Copyright 2021 Centrifuge GmbH (centrifuge.io). +// This file is part of Centrifuge chain project. +// +// Centrifuge is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version (see http://www.gnu.org/licenses). +// Centrifuge is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +use ::xcm::{ + latest::{Junction, Junction::*, Junctions::*, MultiLocation, NetworkId}, + prelude::{Parachain, X1, X2}, + VersionedMultiLocation, +}; +use cfg_primitives::{currency_decimals, parachains, Balance, PoolId, TrancheId}; +use cfg_types::{ + CurrencyId, CurrencyId::ForeignAsset, CustomMetadata, ForeignAssetId, Rate, XcmMetadata, +}; +use codec::Encode; +use development_runtime::{ + Balances, Connectors, Origin, OrmlAssetRegistry, OrmlTokens, Pools, XTokens, XcmTransactor, +}; +use frame_support::{assert_noop, assert_ok, dispatch::Weight}; +use hex::FromHex; +use orml_traits::{asset_registry::AssetMetadata, FixedConversionRateProvider, MultiCurrency}; +use pallet_connectors::{Domain, Message, Router, XcmDomain}; +use pallet_pools::{TrancheInput, TrancheMetadata, TrancheType}; +use runtime_common::{xcm::general_key, xcm_fees::default_per_second}; +use sp_core::H160; +use sp_runtime::{ + traits::{BadOrigin, One}, + BoundedVec, Perquintill, +}; +use xcm_emulator::TestExt; + +use crate::{ + xcm::development::{ + setup::{cfg, dollar, ALICE, BOB, PARA_ID_MOONBEAM}, + test_net::{Development, Moonbeam, RelayChain, TestNet}, + }, + *, +}; + +/// Verify that `Connectors::add_pool` succeeds when called with all the necessary requirements. +/// We can't actually verify that the call hits the ConnectorsXcmRouter contract on Moonbeam +/// since that would require a very heavy e2e setup to emulate. Instead, here we test that we +/// can send the extrinsic and we have other unit tests verifying the encoding of the remote +/// EVM call to be executed on Moonbeam. +#[test] +fn add_pool_works() { + TestNet::reset(); + + let moonbeam_location = MultiLocation { + parents: 1, + interior: X1(Parachain(PARA_ID_MOONBEAM)), + }; + let moonbeam_native_token = MultiLocation { + parents: 1, + interior: X2(Parachain(PARA_ID_MOONBEAM), general_key(&[0, 1])), + }; + + Development::execute_with(|| { + // We need to set the Transact info for Moonbeam in the XcmTransact pallet + assert_ok!(XcmTransactor::set_transact_info( + Origin::root(), + Box::new(VersionedMultiLocation::V1(moonbeam_location.clone())), + 1, + 8_000_000_000_000_000, + Some(3) + )); + + assert_ok!(XcmTransactor::set_fee_per_second( + Origin::root(), + Box::new(VersionedMultiLocation::V1(moonbeam_native_token.clone())), + default_per_second(18), // default fee_per_second for this token which has 18 decimals + )); + + /// Register Moonbeam's native token + let glmr_currency_id = CurrencyId::ForeignAsset(1); + let meta: AssetMetadata = AssetMetadata { + decimals: 18, + name: "Glimmer".into(), + symbol: "GLMR".into(), + existential_deposit: 1_000_000, + location: Some(VersionedMultiLocation::V1(moonbeam_native_token)), + additional: CustomMetadata::default(), + }; + + assert_ok!(OrmlAssetRegistry::register_asset( + Origin::root(), + meta, + Some(glmr_currency_id.clone()) + )); + + // Give Alice enough glimmer to pay for fees + OrmlTokens::deposit(glmr_currency_id, &ALICE.into(), 10 * dollar(18)); + + assert_ok!(Connectors::set_domain_router( + Origin::root(), + Domain::Moonbeam, + Router::Xcm(XcmDomain { + location: moonbeam_location + .clone() + .try_into() + .expect("Bad xcm version"), + ethereum_xcm_transact_call_index: vec![38, 0], + contract_address: H160::from( + <[u8; 20]>::from_hex("cE0Cb9BB900dfD0D378393A041f3abAb6B182882") + .expect("Invalid address"), + ), + fee_currency: glmr_currency_id, + }), + )); + + // Register the pool + let pool_id = 42; + + // we first need to register AUSD in the asset registry + let ausd_meta: AssetMetadata = AssetMetadata { + decimals: 12, + name: "Acala Dollar".into(), + symbol: "AUSD".into(), + existential_deposit: 1_000, + location: None, + additional: CustomMetadata::default(), + }; + assert_ok!(OrmlAssetRegistry::register_asset( + Origin::root(), + ausd_meta, + Some(CurrencyId::AUSD) + )); + + // then we can create the pool + assert_ok!(Pools::create( + Origin::signed(BOB.into()), + BOB.into(), + pool_id, + vec![ + TrancheInput { + tranche_type: TrancheType::Residual, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + } + }, + TrancheInput { + tranche_type: TrancheType::NonResidual { + interest_rate_per_sec: One::one(), + min_risk_buffer: Perquintill::from_percent(10), + }, + seniority: None, + metadata: TrancheMetadata { + token_name: BoundedVec::default(), + token_symbol: BoundedVec::default(), + } + } + ], + CurrencyId::AUSD, + 10_000 * dollar(currency_decimals::AUSD), + None + )); + + // Finally, verify that with all the requirements set in place, + // we can call Connectors::add_pool. + assert_ok!(Connectors::add_pool( + Origin::signed(ALICE.into()), + pool_id, + Domain::Moonbeam, + )); + }); +} + +#[test] +fn encoded_ethereum_xcm_add_pool() { + // Ethereum_xcm with Connectors::hande(Message::AddPool) as `input` - this was our first + // successfully ethereum_xcm encoded call tested in Moonbase. + let expected_encoded_hex = "26000080380100000000000000000000000000000000000000000000000000000000000100ce0cb9bb900dfd0d378393a041f3abab6b18288200000000000000000000000000000000000000000000000000000000000000009101bf48bcb600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000009010000000000bce1a4000000000000000000000000000000000000000000000000"; + let _expected_encoded = hex::decode(expected_encoded_hex).expect("Decode failed"); + + let moonbase_location = MultiLocation { + parents: 1, + interior: X1(Parachain(1000)), + }; + // 38 is the pallet index, 0 is the `transact` extrinsic index. + let ethereum_xcm_transact_call_index = vec![38, 0]; + let contract_address = H160::from( + <[u8; 20]>::from_hex("cE0Cb9BB900dfD0D378393A041f3abAb6B182882").expect("Decoding failed"), + ); + let domain_info = XcmDomain { + location: VersionedMultiLocation::V1(moonbase_location.clone()), + ethereum_xcm_transact_call_index, + contract_address, + fee_currency: ForeignAsset(1), + }; + + let connectors_message = + Message::::AddPool { pool_id: 12378532 }; + + let contract_call = Connectors::encoded_contract_call(connectors_message.encode()); + let encoded_call = Connectors::encoded_ethereum_xcm_call(domain_info, contract_call); + let encoded_call_hex = hex::encode(encoded_call); + + assert_eq!(encoded_call_hex, expected_encoded_hex); +} diff --git a/runtime/integration-tests/src/xcm/development/tests/mod.rs b/runtime/integration-tests/src/xcm/development/tests/mod.rs new file mode 100644 index 0000000000..ac836b2611 --- /dev/null +++ b/runtime/integration-tests/src/xcm/development/tests/mod.rs @@ -0,0 +1 @@ +mod connectors; diff --git a/runtime/integration-tests/src/xcm/mod.rs b/runtime/integration-tests/src/xcm/mod.rs index b283ad27df..112833ead3 100644 --- a/runtime/integration-tests/src/xcm/mod.rs +++ b/runtime/integration-tests/src/xcm/mod.rs @@ -10,5 +10,6 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +mod development; mod kusama; mod polkadot;