diff --git a/.maintain/config/bridge-darwinia-crab.toml b/.maintain/config/bridge-darwinia-crab.toml index 5d5c6c897..25ad18451 100644 --- a/.maintain/config/bridge-darwinia-crab.toml +++ b/.maintain/config/bridge-darwinia-crab.toml @@ -1,71 +1,14 @@ [darwinia] endpoint = "wss://rpc.darwinia.network" signer = "//Alice" -# Bundle/Auto/Custom -runtime_version_mode = "Bundle" -# If the runtime version mode is custom, you need to set this. -#spec_version = 12345 -# If the runtime version mode is custom, you need to set this. -#transaction_version = 0 [crab] endpoint = "wss://crab-rpc.darwinia.network" signer = "//Alice" -# Bundle/Auto/Custom -runtime_version_mode = "Bundle" -# If the runtime version mode is custom, you need to set this. -#spec_version = 12345 -# If the runtime version mode is custom, you need to set this. -#transaction_version = 0 [relay] -# substrate-substrate bridger message relay lanes, default use `00000000` lanes = ["00000000"] -# (optional) The relay message signer, if not set will use [darwinia.signer] -signer_darwinia = "//Alice" -# (optional) the relay message signer, if not set will use [crab.signer] -signer_crab = "//Alice" -# If passed, only mandatory headers (headers that are changing the GRANDPA authorities set) are relayed. -only_mandatory_headers = false -# Create relayers fund accounts on both chains, if it does not exists yet. -create_relayers_fund_accounts = false -# The SURI of secret key to use when transactions are submitted to the darwinia node. -#darwinia_messages_pallet_owner = "//CrabMessagesOwner" -# The password for the SURI of secret key to use when transactions are submitted to the darwinia node. -#darwinia_messages_pallet_owner_password = "123456" -# The SURI of secret key to use when transactions are submitted to the crab node. -#crab_messages_pallet_owner = "//DarwiniaMessagesOwner" -# The password for the SURI of secret key to use when transactions are submitted to the crab node. -#crab_messages_pallet_owner_password = "123456" - -# Transactions mortality period, in blocks. MUST be a power of two in [4; 65536] range. -# MAY NOT be larger than `BlockHashCount` parameter of the chain system module. -# Discuss: https://github.com/darwinia-network/bridger/pull/266#discussion_r705943606 -#transactions_mortality = 256 - -[relay.prometheus_params] -no_prometheus = false -prometheus_host = "127.0.0.1" -prometheus_port = 9616 - -#[feemarket] -#[feemarket.subscan_left] -#endpoint = "https://darwinia.api.subscan.io" -#token = "12345abcde" -#timeout = 30 -# -#[feemarket.subscan_right] -#endpoint = "https://crab.api.subscan.io" -#token = "12345abcde" -#timeout = 30 - -[task] -# 1800 seconds, 30 minutes -interval_update_fee = 1800 - -# Bundle 3 strategy update your fee -# - Nothing: Nothing to do -# - Crazy: If the first assigned relay is not mine. set the first assigned relayer's fee-1 to your fee. -# - Reasonable: Query rencently orders from subscan. and calculate your fee. -update_fee_strategy = "Nothing" +[index] +darwinia = { endpoint = "https://api.subquery.network/sq/darwinia-network/subql-bridge-s2s-darwinia" } +crab = { endpoint = "https://api.subquery.network/sq/darwinia-network/subql-bridge-s2s-crab" } diff --git a/.maintain/config/bridge-pangolin-pangolinparachain.toml b/.maintain/config/bridge-pangolin-pangolinparachain.toml index a52a73522..dc74c7ec7 100644 --- a/.maintain/config/bridge-pangolin-pangolinparachain.toml +++ b/.maintain/config/bridge-pangolin-pangolinparachain.toml @@ -1,47 +1,23 @@ [pangolin] -endpoint = "wss://pangolin-rpc.darwinia.network:443" +endpoint = "wss://pangolin-rpc.darwinia.network" runtime_version_mode = "Auto" signer = "//Alice" [rococo] -endpoint = "wss://rococo-rpc.polkadot.io:443" +endpoint = "wss://rococo-rpc.polkadot.io" runtime_version_mode = "Auto" -signer = "//Alice" [pangolin_parachain] -para_id = 2105 -endpoint = "wss://pangolin-parachain-rpc.darwinia.network:443" +endpoint = "wss://pangolin-parachain-rpc.darwinia.network" runtime_version_mode = "Auto" signer = "//Alice" [relay] -# substrate-substrate bridger message relay lanes -auto_start = true -create_relayers_fund_accounts = false -lanes = ["70616c69"] -only_mandatory_headers = false - -[relay.prometheus_params] -no_prometheus = false -prometheus_host = "127.0.0.1" -prometheus_port = 9616 - -[task] -interval_update_fee = 3600 -update_fee_strategy = "Nothing" - -[index.pangolin] -# Subquery pangolin indexer queries url -endpoint = "http://localhost:3000" - -[index.pangolin_parachain] -# Subquery pangolin-parachain indexer queries url -endpoint = "https://api.subquery.network/sq/fewensa/subql-bridge-s2s-pangolin-parachain__ZmV3Z" - -[index.rococo] -# Subquery rococo indexer queries url -endpoint = "http://localhost:3001" - -[index.parachain_rococo] -# Subquery parachain_rococo indexer queries url -endpoint = "https://api.subquery.network/sq/darwinia-network/subql-parachain-rococo" +lanes = ["70616c69"] +para_id = 2105 + +[index] +pangolin = { endpoint = "https://api.subquery.network/sq/darwinia-network/subql-bridge-s2s-pangolin" } +rococo = { endpoint = "https://api.subquery.network/sq/darwinia-network/subql-bridge-s2s-rococo" } +pangolin_parachain = { endpoint = "https://api.subquery.network/sq/fewensa/subql-bridge-s2s-pangolin-parachain" } +parachain_rococo = { endpoint = "https://api.subquery.network/sq/darwinia-network/subql-parachain-rococo" } diff --git a/.maintain/config/bridge-pangolin-pangoro.toml b/.maintain/config/bridge-pangolin-pangoro.toml index 52895c563..fbdf64abd 100644 --- a/.maintain/config/bridge-pangolin-pangoro.toml +++ b/.maintain/config/bridge-pangolin-pangoro.toml @@ -7,35 +7,9 @@ endpoint = "wss://pangoro-rpc.darwinia.network" signer = "//Alice" [relay] -# substrate-substrate bridger message relay lanes, default use `00000000` lanes = ["726f6c69"] -#[feemarket] -#[feemarket.subscan_left] -#endpoint = "https://pangolin.api.subscan.io" -#token = "12345abcde" -#timeout = 30 -# -#[feemarket.subscan_right] -#endpoint = "https://pangoro.api.subscan.io" -#token = "12345abcde" -#timeout = 30 - -[task] -# 1800 seconds, 30 minutes -interval_update_fee = 1800 - -# Bundle 3 strategy update your fee -# - Nothing: Nothing to do -# - Crazy: If the first assigned relay is not mine. set the first assigned relayer's fee-1 to your fee. -# - Reasonable: Query rencently orders from subscan. and calculate your fee. -update_fee_strategy = "Nothing" - -[index.pangolin] -# Subquery pangolin indexer queries url -endpoint = "https://api.subquery.network/sq/darwinia-network/subql-bridge-s2s-pangolin" - -[index.pangoro] -# Subquery pangoro indexer queries url -endpoint = "https://api.subquery.network/sq/darwinia-network/subql-bridge-s2s-pangoro" +[index] +pangolin = { endpoint = "https://api.subquery.network/sq/darwinia-network/subql-bridge-s2s-pangolin" } +pangoro = { endpoint = "https://api.subquery.network/sq/darwinia-network/subql-bridge-s2s-pangoro" } diff --git a/bridges/crab-crabparachain/Cargo.lock b/bridges/crab-crabparachain/Cargo.lock index 4b2ba4912..0ca870e25 100644 --- a/bridges/crab-crabparachain/Cargo.lock +++ b/bridges/crab-crabparachain/Cargo.lock @@ -27,41 +27,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - [[package]] name = "ahash" version = "0.7.6" @@ -108,9 +73,9 @@ dependencies = [ [[package]] name = "array-bytes" -version = "1.5.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b48bc78d3fa4a9a0925d5009f731cbf7e5613d2a4f1a937208f6dde89a287bab" +checksum = "30725d201df311b571b927e5a175a394e3763e11451c2e6415a84dc6e891fb6d" [[package]] name = "array-init" @@ -121,12 +86,6 @@ dependencies = [ "nodrop", ] -[[package]] -name = "array_tool" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f8cb5d814eb646a863c4f24978cff2880c4be96ad8cde2c0f0678732902e271" - [[package]] name = "arrayref" version = "0.3.6" @@ -154,156 +113,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" -[[package]] -name = "asn1_der" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" - -[[package]] -name = "async-attributes" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "async-channel" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-executor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "once_cell", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd8b508d585e01084059b60f06ade4cb7415cd2e4084b71dd1cb44e7d3fb9880" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5e18f61464ae81cde0a23e713ae8fd299580c54d697a35820cfd0625b8b0e07" -dependencies = [ - "concurrent-queue", - "futures-lite", - "libc", - "log", - "once_cell", - "parking", - "polling", - "slab", - "socket2 0.4.4", - "waker-fn", - "winapi", -] - -[[package]] -name = "async-lock" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-process" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c" -dependencies = [ - "async-io", - "blocking", - "cfg-if 1.0.0", - "event-listener", - "futures-lite", - "libc", - "once_cell", - "signal-hook", - "winapi", -] - -[[package]] -name = "async-std" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" -dependencies = [ - "async-attributes", - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "num_cpus", - "once_cell", - "pin-project-lite 0.2.9", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-std-resolver" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf3e776afdf3a2477ef4854b85ba0dff3bd85792f685fb3c68948b4d304e4f0" -dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "trust-dns-resolver", -] - -[[package]] -name = "async-task" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" - [[package]] name = "async-trait" version = "0.1.53" @@ -315,32 +124,6 @@ dependencies = [ "syn", ] -[[package]] -name = "asynchronous-codec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4401f0a3622dad2e0763fa79e0eb328bc70fb7dccfdd645341f00d671247d6" -dependencies = [ - "bytes 1.1.0", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite 0.2.9", -] - -[[package]] -name = "asynchronous-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" -dependencies = [ - "bytes 1.1.0", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite 0.2.9", -] - [[package]] name = "atomic" version = "0.5.1" @@ -350,12 +133,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "atomic-waker" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" - [[package]] name = "atty" version = "0.2.14" @@ -373,16 +150,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backoff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721c249ab59cbc483ad4294c9ee2671835c1e43e9ffc277e6b4ecfef733cfdc5" -dependencies = [ - "instant", - "rand 0.7.3", -] - [[package]] name = "backtrace" version = "0.3.65" @@ -391,24 +158,18 @@ checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc19a4937b4fbd3fe3379793130e42060d10627a360f2127802b10b87e7baf74" - [[package]] name = "base58" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" @@ -449,17 +210,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "blake2" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - [[package]] name = "blake2-rfc" version = "0.2.18" @@ -470,50 +220,13 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq", -] - -[[package]] -name = "blake2s_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq", -] - -[[package]] -name = "blake3" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "cc", - "cfg-if 0.1.10", - "constant_time_eq", - "crypto-mac 0.8.0", - "digest 0.9.0", -] - [[package]] name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -525,7 +238,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", "generic-array 0.14.5", ] @@ -538,30 +250,10 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "blocking" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" -dependencies = [ - "async-channel", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "once_cell", -] - [[package]] name = "bp-crab" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -576,22 +268,7 @@ dependencies = [ [[package]] name = "bp-crab-parachain" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "bp-darwinia-core", - "bp-messages", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std", - "sp-version", -] - -[[package]] -name = "bp-darwinia" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -606,7 +283,7 @@ dependencies = [ [[package]] name = "bp-darwinia-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -622,7 +299,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "finality-grandpa", "frame-support", @@ -638,7 +315,7 @@ dependencies = [ [[package]] name = "bp-kusama" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -654,19 +331,20 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-runtime", "frame-support", "parity-scale-codec", "scale-info", + "sp-runtime", "sp-std", ] [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-runtime", @@ -683,37 +361,20 @@ dependencies = [ [[package]] name = "bp-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-polkadot-core", "bp-runtime", "frame-support", "parity-scale-codec", "scale-info", - "serde 1.0.137", "sp-core", ] -[[package]] -name = "bp-polkadot" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "bp-messages", - "bp-polkadot-core", - "bp-runtime", - "frame-support", - "smallvec 1.8.0", - "sp-api", - "sp-runtime", - "sp-std", - "sp-version", -] - [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -733,7 +394,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "frame-support", "hash-db", @@ -751,7 +412,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -767,53 +428,24 @@ dependencies = [ name = "bridge-crab-crabparachain" version = "0.5.7" dependencies = [ - "async-trait", - "bp-darwinia-core", - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "bridge-runtime-common", + "array-bytes", + "bridge-s2s-traits", "client-crab", "client-crab-parachain", "client-kusama", "color-eyre", - "colored", - "component-subscan", "feemarket-s2s", - "frame-support", - "futures 0.3.21", - "futures-timer", - "hex", "lifeline", - "messages-relay", - "once_cell", - "pallet-bridge-messages", - "pallet-fee-market", - "parity-scale-codec", "postage", - "relay-crab-client", - "relay-crab-parachain-client", - "relay-kusama-client", - "relay-substrate-client", - "relay-utils", + "relay-s2s", "serde 1.0.137", - "serde_json", - "sp-core", - "sp-finality-grandpa", - "sp-runtime", - "sp-trie", - "sp-version", "structopt", "strum", "subquery-parachain", "subquery-s2s", - "substrate-relay-helper", - "subxt", "support-common", "support-lifeline", - "support-terminal", + "support-toolkit", "tokio", "tracing", ] @@ -821,7 +453,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -844,11 +476,25 @@ dependencies = [ ] [[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - +name = "bridge-s2s-traits" +version = "0.5.7" +dependencies = [ + "array-bytes", + "async-trait", + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", + "jsonrpsee-core", + "parity-scale-codec", + "scale-info", + "serde 1.0.137", + "sp-core", + "sp-runtime", + "subxt", + "thiserror", +] + [[package]] name = "bumpalo" version = "3.10.0" @@ -873,44 +519,17 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" -[[package]] -name = "cache-padded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" - -[[package]] -name = "castaway" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" - [[package]] name = "cc" version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" -dependencies = [ - "jobserver", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" @@ -918,31 +537,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chacha20" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee7ad89dc1128635074c268ee661f90c3f7e83d9fd12910608c36b47d6c3412" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures 0.1.5", - "zeroize", -] - -[[package]] -name = "chacha20poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580317203210c517b6d44794abfbe600698276db18127e37ad3e69bf5e848e5" -dependencies = [ - "aead", - "chacha20", - "cipher", - "poly1305", - "zeroize", -] - [[package]] name = "chameleon" version = "0.1.0" @@ -958,30 +552,10 @@ dependencies = [ "libc", "num-integer", "num-traits 0.2.15", - "time 0.1.44", + "time", "winapi", ] -[[package]] -name = "cid" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0e3bc0b6446b3f9663c1a6aba6ef06c5aeaa1bc92bd18077be337198ab9768" -dependencies = [ - "multibase", - "multihash 0.13.2", - "unsigned-varint 0.5.1", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.5", -] - [[package]] name = "clap" version = "2.34.0" @@ -1002,12 +576,16 @@ name = "client-crab" version = "0.5.7" dependencies = [ "array-bytes", - "futures-util", - "jsonrpsee", + "async-trait", + "bp-crab", + "bridge-s2s-traits", + "feemarket-s2s-traits", + "finality-grandpa", "parity-scale-codec", "serde 1.0.137", - "serde_json", "sp-core", + "sp-finality-grandpa", + "sp-runtime", "subxt", "support-toolkit", "thiserror", @@ -1019,8 +597,16 @@ name = "client-crab-parachain" version = "0.5.7" dependencies = [ "array-bytes", + "async-trait", + "bp-crab-parachain", + "bridge-s2s-traits", + "feemarket-s2s-traits", + "finality-grandpa", "parity-scale-codec", "serde 1.0.137", + "sp-core", + "sp-finality-grandpa", + "sp-runtime", "subxt", "support-toolkit", "thiserror", @@ -1032,25 +618,21 @@ name = "client-kusama" version = "0.5.7" dependencies = [ "array-bytes", - "jsonrpsee", + "async-trait", + "bp-kusama", + "bridge-s2s-traits", + "finality-grandpa", "parity-scale-codec", "serde 1.0.137", "sp-core", + "sp-finality-grandpa", + "sp-runtime", "subxt", "support-toolkit", "thiserror", "tracing", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "color-eyre" version = "0.5.11" @@ -1078,17 +660,6 @@ dependencies = [ "tracing-error", ] -[[package]] -name = "colored" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" -dependencies = [ - "atty", - "lazy_static", - "winapi", -] - [[package]] name = "component-subscan" version = "0.5.7" @@ -1102,15 +673,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "concurrent-queue" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" -dependencies = [ - "cache-padded", -] - [[package]] name = "config" version = "0.11.0" @@ -1127,12 +689,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1161,15 +717,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "cpufeatures" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" -dependencies = [ - "libc", -] - [[package]] name = "cpufeatures" version = "0.2.2" @@ -1179,57 +726,13 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" -dependencies = [ - "autocfg", - "cfg-if 1.0.0", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] - [[package]] name = "crossbeam-queue" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -1239,7 +742,7 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "lazy_static", ] @@ -1269,67 +772,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctor" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher", -] - -[[package]] -name = "cuckoofilter" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" -dependencies = [ - "byteorder", - "fnv", - "rand 0.7.3", -] - -[[package]] -name = "curl" -version = "0.4.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d855aeef205b43f65a5001e0997d81f8efca7badad4fad7d897aa7f0d0651f" -dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2 0.4.4", - "winapi", -] - -[[package]] -name = "curl-sys" -version = "0.4.55+curl-7.83.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23734ec77368ec583c2e61dd3f0b0e5c98b93abe6d2a004ca06b91dd7e3e2762" -dependencies = [ - "cc", - "libc", - "libnghttp2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "winapi", -] - [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -1391,32 +833,6 @@ dependencies = [ "syn", ] -[[package]] -name = "data-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" - -[[package]] -name = "data-encoding-macro" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca" -dependencies = [ - "data-encoding", - "data-encoding-macro-internal", -] - -[[package]] -name = "data-encoding-macro-internal" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" -dependencies = [ - "data-encoding", - "syn", -] - [[package]] name = "derivative" version = "2.2.0" @@ -1437,7 +853,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn", ] @@ -1479,28 +895,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "dns-parser" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" -dependencies = [ - "byteorder", - "quick-error", -] - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "downcast-rs" version = "1.2.0" @@ -1569,45 +963,7 @@ version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enum-as-inner" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" -dependencies = [ - "heck 0.4.0", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime 1.3.0", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime 2.1.0", - "log", - "regex", - "termcolor", + "cfg-if", ] [[package]] @@ -1616,15 +972,6 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" -[[package]] -name = "erased-serde" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" -dependencies = [ - "serde 1.0.137", -] - [[package]] name = "ethbloom" version = "0.11.1" @@ -1652,12 +999,6 @@ dependencies = [ "uint", ] -[[package]] -name = "event-listener" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" - [[package]] name = "eyre" version = "0.6.8" @@ -1688,21 +1029,27 @@ name = "feemarket-s2s" version = "0.5.7" dependencies = [ "async-trait", - "bp-messages", + "bridge-s2s-traits", "component-subscan", - "frame-support", - "messages-relay", - "pallet-fee-market", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", + "feemarket-s2s-traits", "serde 1.0.137", - "sp-core", - "sp-runtime", + "support-toolkit", "thiserror", "tracing", ] +[[package]] +name = "feemarket-s2s-traits" +version = "0.5.7" +dependencies = [ + "async-trait", + "bp-runtime", + "pallet-fee-market", + "parity-scale-codec", + "subxt", + "thiserror", +] + [[package]] name = "finality-grandpa" version = "0.14.4" @@ -1710,7 +1057,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" dependencies = [ "either", - "futures 0.3.21", + "futures", "futures-timer", "log", "num-traits 0.2.15", @@ -1719,21 +1066,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "finality-relay" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "async-std", - "async-trait", - "backoff", - "bp-header-chain", - "futures 0.3.21", - "log", - "num-traits 0.2.15", - "relay-utils", -] - [[package]] name = "fixed-hash" version = "0.7.0" @@ -1746,23 +1078,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - -[[package]] -name = "flate2" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" -dependencies = [ - "crc32fast", - "libz-sys", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" @@ -1784,14 +1099,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "fork-tree" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", -] - [[package]] name = "form_urlencoded" version = "1.0.1" @@ -1799,13 +1106,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "frame-system", @@ -1828,7 +1135,7 @@ version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "parity-scale-codec", "scale-info", "serde 1.0.137", @@ -1837,7 +1144,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "bitflags", "frame-metadata", @@ -1864,7 +1171,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1876,7 +1183,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -1888,7 +1195,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -1898,7 +1205,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "log", @@ -1918,12 +1225,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.21" @@ -1973,21 +1274,6 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" -[[package]] -name = "futures-lite" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.9", - "waker-fn", -] - [[package]] name = "futures-macro" version = "0.3.21" @@ -1999,17 +1285,6 @@ dependencies = [ "syn", ] -[[package]] -name = "futures-rustls" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" -dependencies = [ - "futures-io", - "rustls 0.19.1", - "webpki 0.21.4", -] - [[package]] name = "futures-sink" version = "0.3.21" @@ -2034,7 +1309,6 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -2042,7 +1316,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite", "pin-utils", "slab", ] @@ -2072,7 +1346,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -2085,39 +1359,17 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.10.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug 0.3.0", - "polyval", -] - [[package]] name = "gimli" version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" -[[package]] -name = "gloo-timers" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "gql_client" version = "1.0.4" @@ -2135,7 +1387,7 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -2181,12 +1433,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - [[package]] name = "hermit-abi" version = "0.1.19" @@ -2202,12 +1448,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - [[package]] name = "hmac" version = "0.8.1" @@ -2239,26 +1479,15 @@ dependencies = [ "hmac 0.8.1", ] -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - [[package]] name = "http" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", - "itoa", + "itoa 1.0.2", ] [[package]] @@ -2267,9 +1496,9 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.1.0", + "bytes", "http", - "pin-project-lite 0.2.9", + "pin-project-lite", ] [[package]] @@ -2284,28 +1513,13 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -2314,9 +1528,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", - "pin-project-lite 0.2.9", - "socket2 0.4.4", + "itoa 1.0.2", + "pin-project-lite", + "socket2", "tokio", "tower-service", "tracing", @@ -2331,7 +1545,7 @@ checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ "http", "hyper", - "rustls 0.20.6", + "rustls", "tokio", "tokio-rustls", ] @@ -2342,7 +1556,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.1.0", + "bytes", "hyper", "native-tls", "tokio", @@ -2355,17 +1569,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.2.3" @@ -2377,43 +1580,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "if-addrs" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2273e421f7c4f0fc99e1934fe4776f59d8df2972f4199d703fc0da9f2a9f73de" -dependencies = [ - "if-addrs-sys", - "libc", - "winapi", -] - -[[package]] -name = "if-addrs-sys" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de74b9dd780476e837e5eb5ab7c88b49ed304126e412030a0adba99c8efe79ea" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "if-watch" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179" -dependencies = [ - "async-io", - "futures 0.3.21", - "futures-lite", - "if-addrs", - "ipnet", - "libc", - "log", - "winapi", -] - [[package]] name = "impl-codec" version = "0.5.1" @@ -2493,7 +1659,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2505,24 +1671,6 @@ dependencies = [ "num-traits 0.2.15", ] -[[package]] -name = "ip_network" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" - -[[package]] -name = "ipconfig" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" -dependencies = [ - "socket2 0.3.19", - "widestring", - "winapi", - "winreg 0.6.2", -] - [[package]] name = "ipnet" version = "2.5.0" @@ -2530,40 +1678,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] -name = "isahc" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" -dependencies = [ - "async-channel", - "castaway", - "crossbeam-utils", - "curl", - "curl-sys", - "encoding_rs", - "event-listener", - "futures-lite", - "http", - "log", - "mime", - "once_cell", - "polling", - "slab", - "sluice", - "tracing", - "tracing-futures", - "url 2.2.2", - "waker-fn", -] - -[[package]] -name = "itertools" -version = "0.10.3" +name = "itoa" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" -dependencies = [ - "either", -] +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" @@ -2571,15 +1689,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" -[[package]] -name = "jobserver" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.57" @@ -2589,87 +1698,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonpath_lib" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61352ec23883402b7d30b3313c16cbabefb8907361c4eb669d990cbb87ceee5a" -dependencies = [ - "array_tool", - "env_logger 0.7.1", - "log", - "serde 1.0.137", - "serde_json", -] - -[[package]] -name = "jsonrpc-client-transports" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" -dependencies = [ - "derive_more", - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-pubsub", - "log", - "serde 1.0.137", - "serde_json", - "url 1.7.2", -] - -[[package]] -name = "jsonrpc-core" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" -dependencies = [ - "futures 0.3.21", - "futures-executor", - "futures-util", - "log", - "serde 1.0.137", - "serde_derive", - "serde_json", -] - -[[package]] -name = "jsonrpc-core-client" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" -dependencies = [ - "futures 0.3.21", - "jsonrpc-client-transports", -] - -[[package]] -name = "jsonrpc-derive" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" -dependencies = [ - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "jsonrpc-pubsub" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" -dependencies = [ - "futures 0.3.21", - "jsonrpc-core", - "lazy_static", - "log", - "parking_lot 0.11.2", - "rand 0.7.3", - "serde 1.0.137", -] - [[package]] name = "jsonrpsee" version = "0.8.0" @@ -2678,9 +1706,6 @@ checksum = "05fd8cd6c6b1bbd06881d2cf88f1fc83cc36c98f2219090f839115fb4a956cb9" dependencies = [ "jsonrpsee-client-transport", "jsonrpsee-core", - "jsonrpsee-proc-macros", - "jsonrpsee-types", - "jsonrpsee-ws-client", ] [[package]] @@ -2689,19 +1714,19 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3303cdf246e6ab76e2866fb3d9acb6c76a068b1b28bd923a1b7a8122257ad7b5" dependencies = [ - "futures 0.3.21", + "futures", "http", "jsonrpsee-core", "jsonrpsee-types", "pin-project 1.0.10", "rustls-native-certs", - "soketto 0.7.1", + "soketto", "thiserror", "tokio", "tokio-rustls", "tokio-util 0.6.10", "tracing", - "webpki-roots 0.22.3", + "webpki-roots", ] [[package]] @@ -2721,24 +1746,12 @@ dependencies = [ "rustc-hash", "serde 1.0.137", "serde_json", - "soketto 0.7.1", + "soketto", "thiserror", "tokio", "tracing", ] -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4299ebf790ea9de1cb72e73ff2ae44c723ef264299e5e2d5ef46a371eb3ac3d8" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "jsonrpsee-types" version = "0.8.0" @@ -2753,17 +1766,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "jsonrpsee-ws-client" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff425cee7c779e33920913bc695447416078ee6d119f443f3060feffa4e86b5" -dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", -] - [[package]] name = "keccak" version = "0.1.2" @@ -2771,29 +1773,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] -name = "kv-log-macro" -version = "1.0.7" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "kvdb" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" -dependencies = [ - "parity-util-mem", - "smallvec 1.8.0", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lexical-core" @@ -2803,7 +1786,7 @@ checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec 0.5.2", "bitflags", - "cfg-if 1.0.0", + "cfg-if", "ryu", "static_assertions", ] @@ -2820,469 +1803,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" -[[package]] -name = "libnghttp2-sys" -version = "0.1.7+1.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "libp2p" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9004c06878ef8f3b4b4067e69a140d87ed20bf777287f82223e49713b36ee433" -dependencies = [ - "atomic", - "bytes 1.1.0", - "futures 0.3.21", - "lazy_static", - "libp2p-core", - "libp2p-deflate", - "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", - "libp2p-identify", - "libp2p-kad", - "libp2p-mdns", - "libp2p-mplex", - "libp2p-noise", - "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-relay", - "libp2p-request-response", - "libp2p-swarm", - "libp2p-swarm-derive", - "libp2p-tcp", - "libp2p-uds", - "libp2p-wasm-ext", - "libp2p-websocket", - "libp2p-yamux", - "multiaddr", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "smallvec 1.8.0", - "wasm-timer", -] - -[[package]] -name = "libp2p-core" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9b4abdeaa420593a297c8592f63fad4234f4b88dc9343b8fd8e736c35faa59" -dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures 0.3.21", - "futures-timer", - "lazy_static", - "libsecp256k1 0.5.0", - "log", - "multiaddr", - "multihash 0.14.0", - "multistream-select", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2 0.9.9", - "smallvec 1.8.0", - "thiserror", - "unsigned-varint 0.7.1", - "void", - "zeroize", -] - -[[package]] -name = "libp2p-deflate" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66097fccc0b7f8579f90a03ea76ba6196332ea049fd07fd969490a06819dcdc8" -dependencies = [ - "flate2", - "futures 0.3.21", - "libp2p-core", -] - -[[package]] -name = "libp2p-dns" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ff08b3196b85a17f202d80589e93b1660a574af67275706657fdc762e42c32" -dependencies = [ - "async-std-resolver", - "futures 0.3.21", - "libp2p-core", - "log", - "smallvec 1.8.0", - "trust-dns-resolver", -] - -[[package]] -name = "libp2p-floodsub" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404eca8720967179dac7a5b4275eb91f904a53859c69ca8d018560ad6beb214f" -dependencies = [ - "cuckoofilter", - "fnv", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec 1.8.0", -] - -[[package]] -name = "libp2p-gossipsub" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cc48709bcbc3a3321f08a73560b4bbb4166a7d56f6fdb615bc775f4f91058e" -dependencies = [ - "asynchronous-codec 0.6.0", - "base64 0.13.0", - "byteorder", - "bytes 1.1.0", - "fnv", - "futures 0.3.21", - "hex_fmt", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "regex", - "sha2 0.9.9", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "wasm-timer", -] - -[[package]] -name = "libp2p-identify" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7b61f6cf07664fb97016c318c4d4512b3dd4cc07238607f3f0163245f99008e" -dependencies = [ - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "smallvec 1.8.0", - "wasm-timer", -] - -[[package]] -name = "libp2p-kad" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ed78489c87924235665a0ab345b298ee34dff0f7ad62c0ba6608b2144fb75e" -dependencies = [ - "arrayvec 0.5.2", - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "either", - "fnv", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "sha2 0.9.9", - "smallvec 1.8.0", - "uint", - "unsigned-varint 0.7.1", - "void", - "wasm-timer", -] - -[[package]] -name = "libp2p-mdns" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a29e6cbc2a24b8471b6567e580a0e8e7b70a6d0f0ea2be0844d1e842d7d4fa33" -dependencies = [ - "async-io", - "data-encoding", - "dns-parser", - "futures 0.3.21", - "if-watch", - "lazy_static", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.8.5", - "smallvec 1.8.0", - "socket2 0.4.4", - "void", -] - -[[package]] -name = "libp2p-mplex" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "313d9ea526c68df4425f580024e67a9d3ffd49f2c33de5154b1f5019816f7a99" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "log", - "nohash-hasher", - "parking_lot 0.11.2", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", -] - -[[package]] -name = "libp2p-noise" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1db7212f342b6ba7c981cc40e31f76e9e56cb48e65fa4c142ecaca5839523e" -dependencies = [ - "bytes 1.1.0", - "curve25519-dalek 3.2.0", - "futures 0.3.21", - "lazy_static", - "libp2p-core", - "log", - "prost", - "prost-build", - "rand 0.8.5", - "sha2 0.9.9", - "snow", - "static_assertions", - "x25519-dalek", - "zeroize", -] - -[[package]] -name = "libp2p-ping" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2482cfd9eb0b7a0baaf3e7b329dc4f2785181a161b1a47b7192f8d758f54a439" -dependencies = [ - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "void", - "wasm-timer", -] - -[[package]] -name = "libp2p-plaintext" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b4783e5423870b9a5c199f65a7a3bc66d86ab56b2b9beebf3c338d889cf8e4" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "log", - "prost", - "prost-build", - "unsigned-varint 0.7.1", - "void", -] - -[[package]] -name = "libp2p-pnet" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cb4dd4b917e5b40ddefe49b96b07adcd8d342e0317011d175b7b2bb1dcc974" -dependencies = [ - "futures 0.3.21", - "log", - "pin-project 1.0.10", - "rand 0.7.3", - "salsa20", - "sha3", -] - -[[package]] -name = "libp2p-relay" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0133f6cfd81cdc16e716de2982e012c62e6b9d4f12e41967b3ee361051c622aa" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "futures-timer", - "libp2p-core", - "libp2p-swarm", - "log", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "void", - "wasm-timer", -] - -[[package]] -name = "libp2p-request-response" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06cdae44b6821466123af93cbcdec7c9e6ba9534a8af9cdc296446d39416d241" -dependencies = [ - "async-trait", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "lru", - "minicbor", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "wasm-timer", -] - -[[package]] -name = "libp2p-swarm" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7083861341e1555467863b4cd802bea1e8c4787c0f7b5110097d0f1f3248f9a9" -dependencies = [ - "either", - "futures 0.3.21", - "libp2p-core", - "log", - "rand 0.7.3", - "smallvec 1.8.0", - "void", - "wasm-timer", -] - -[[package]] -name = "libp2p-swarm-derive" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8cb308d4fc854869f5abb54fdab0833d2cf670d407c745849dc47e6e08d79c" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "libp2p-tcp" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79edd26b6b4bb5feee210dcda562dca186940dfecb0024b979c3f50824b3bf28" -dependencies = [ - "async-io", - "futures 0.3.21", - "futures-timer", - "if-watch", - "ipnet", - "libc", - "libp2p-core", - "log", - "socket2 0.4.4", -] - -[[package]] -name = "libp2p-uds" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280e793440dd4e9f273d714f4497325c72cddb0fe85a49f9a03c88f41dd20182" -dependencies = [ - "async-std", - "futures 0.3.21", - "libp2p-core", - "log", -] - -[[package]] -name = "libp2p-wasm-ext" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f553b7140fad3d7a76f50497b0ea591e26737d9607428a75509fc191e4d1b1f6" -dependencies = [ - "futures 0.3.21", - "js-sys", - "libp2p-core", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", -] - -[[package]] -name = "libp2p-websocket" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf99dcbf5063e9d59087f61b1e85c686ceab2f5abedb472d32288065c0e5e27" -dependencies = [ - "either", - "futures 0.3.21", - "futures-rustls", - "libp2p-core", - "log", - "quicksink", - "rw-stream-sink", - "soketto 0.4.2", - "url 2.2.2", - "webpki-roots 0.21.1", -] - -[[package]] -name = "libp2p-yamux" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214cc0dd9c37cbed27f0bb1eba0c41bbafdb93a8be5e9d6ae1e6b4b42cd044bf" -dependencies = [ - "futures 0.3.21", - "libp2p-core", - "parking_lot 0.11.2", - "thiserror", - "yamux", -] - -[[package]] -name = "libsecp256k1" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde 1.0.137", - "sha2 0.9.9", - "typenum", -] - [[package]] name = "libsecp256k1" version = "0.6.0" @@ -3331,18 +1851,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "libz-sys" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "lifeline" version = "0.6.1" @@ -3375,15 +1883,6 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" -[[package]] -name = "linked_hash_set" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" -dependencies = [ - "linked-hash-map 0.5.4", -] - [[package]] name = "linregress" version = "0.4.4" @@ -3394,15 +1893,6 @@ dependencies = [ "statrs", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.7" @@ -3419,8 +1909,7 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", - "value-bag", + "cfg-if", ] [[package]] @@ -3432,21 +1921,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map 0.5.4", -] - -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - [[package]] name = "matchers" version = "0.0.1" @@ -3483,15 +1957,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memory-db" version = "0.27.0" @@ -3521,50 +1986,12 @@ dependencies = [ "zeroize", ] -[[package]] -name = "messages-relay" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "async-std", - "async-trait", - "bp-messages", - "bp-runtime", - "futures 0.3.21", - "hex", - "log", - "num-traits 0.2.15", - "parking_lot 0.11.2", - "relay-utils", - "sp-arithmetic", -] - [[package]] name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -[[package]] -name = "minicbor" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51aa5bb0ca22415daca596a227b507f880ad1b2318a87fa9325312a5d285ca0d" -dependencies = [ - "minicbor-derive", -] - -[[package]] -name = "minicbor-derive" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "miniz_oxide" version = "0.5.3" @@ -3586,99 +2013,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "multiaddr" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ee4ea82141951ac6379f964f71b20876d43712bea8faf6dd1a375e08a46499" -dependencies = [ - "arrayref", - "bs58", - "byteorder", - "data-encoding", - "multihash 0.14.0", - "percent-encoding 2.1.0", - "serde 1.0.137", - "static_assertions", - "unsigned-varint 0.7.1", - "url 2.2.2", -] - -[[package]] -name = "multibase" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b78c60039650ff12e140ae867ef5299a58e19dded4d334c849dc7177083667e2" -dependencies = [ - "base-x", - "data-encoding", - "data-encoding-macro", -] - -[[package]] -name = "multihash" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac63698b887d2d929306ea48b63760431ff8a24fac40ddb22f9c7f49fb7cab" -dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", - "digest 0.9.0", - "generic-array 0.14.5", - "multihash-derive", - "sha2 0.9.9", - "sha3", - "unsigned-varint 0.5.1", -] - -[[package]] -name = "multihash" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" -dependencies = [ - "digest 0.9.0", - "generic-array 0.14.5", - "multihash-derive", - "sha2 0.9.9", - "unsigned-varint 0.7.1", -] - -[[package]] -name = "multihash-derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "multistream-select" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab" -dependencies = [ - "bytes 1.1.0", - "futures 0.3.21", - "log", - "pin-project 1.0.10", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", -] - [[package]] name = "nalgebra" version = "0.27.1" @@ -3732,12 +2066,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - [[package]] name = "nom" version = "5.1.2" @@ -3749,15 +2077,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num-bigint" version = "0.2.6" @@ -3778,6 +2097,16 @@ dependencies = [ "num-traits 0.2.15", ] +[[package]] +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +dependencies = [ + "arrayvec 0.4.12", + "itoa 0.4.8", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -3874,7 +2203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -3919,24 +2248,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55" [[package]] -name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "pad" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ad9b889f1b12e0b9ee24db044b5129150d5eada288edc800f789928dc8c0e3" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", + "unicode-width", ] [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -3953,7 +2276,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-header-chain", "bp-runtime", @@ -3975,7 +2298,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-message-dispatch", @@ -3996,7 +2319,7 @@ dependencies = [ [[package]] name = "pallet-bridge-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-parachains", "bp-polkadot-core", @@ -4007,7 +2330,6 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "serde 1.0.137", "sp-core", "sp-runtime", "sp-std", @@ -4017,7 +2339,7 @@ dependencies = [ [[package]] name = "pallet-fee-market" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-messages", @@ -4037,7 +2359,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-benchmarking", "frame-support", @@ -4054,7 +2376,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "frame-system", @@ -4068,36 +2390,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "pallet-transaction-payment", - "parity-scale-codec", - "sp-api", - "sp-runtime", -] - -[[package]] -name = "parachains-relay" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "async-std", - "async-trait", - "backoff", - "bp-parachains", - "bp-polkadot-core", - "futures 0.3.21", - "linked-hash-map 0.5.4", - "log", - "num-traits 0.2.15", - "parking_lot 0.11.2", - "relay-substrate-client", - "relay-utils", -] - [[package]] name = "parity-scale-codec" version = "2.3.1" @@ -4124,19 +2416,13 @@ dependencies = [ "syn", ] -[[package]] -name = "parity-send-wrapper" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" - [[package]] name = "parity-util-mem" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ethereum-types", "hashbrown", "impl-trait-for-tuples", @@ -4163,23 +2449,7 @@ dependencies = [ name = "parity-wasm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" - -[[package]] -name = "parking" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "parking_lot" @@ -4188,7 +2458,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.8.5", ] @@ -4198,34 +2468,20 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.9.3", ] -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec 1.8.0", - "winapi", -] - [[package]] name = "parking_lot_core" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec 1.8.0", "winapi", ] @@ -4236,9 +2492,9 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec 1.8.0", "windows-sys", ] @@ -4267,37 +2523,12 @@ dependencies = [ "crypto-mac 0.11.1", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -[[package]] -name = "pest" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] - -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset", - "indexmap", -] - [[package]] name = "pin-project" version = "0.4.29" @@ -4338,12 +2569,6 @@ dependencies = [ "syn", ] -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.9" @@ -4362,48 +2587,12 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" -[[package]] -name = "polling" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "log", - "wepoll-ffi", - "winapi", -] - [[package]] name = "pollster" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" -[[package]] -name = "poly1305" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" -dependencies = [ - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", - "universal-hash", -] - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", - "universal-hash", -] - [[package]] name = "postage" version = "0.4.1" @@ -4482,12 +2671,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" version = "1.0.39" @@ -4497,99 +2680,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "prometheus" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" -dependencies = [ - "cfg-if 1.0.0", - "fnv", - "lazy_static", - "parking_lot 0.11.2", - "regex", - "thiserror", -] - -[[package]] -name = "prost" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" -dependencies = [ - "bytes 1.1.0", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" -dependencies = [ - "bytes 1.1.0", - "heck 0.3.3", - "itertools", - "log", - "multimap", - "petgraph", - "prost", - "prost-types", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "prost-types" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" -dependencies = [ - "bytes 1.1.0", - "prost", -] - -[[package]] -name = "pwasm-utils" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" -dependencies = [ - "byteorder", - "log", - "parity-wasm", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quicksink" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" -dependencies = [ - "futures-core", - "futures-sink", - "pin-project-lite 0.1.12", -] - [[package]] name = "quote" version = "1.0.18" @@ -4702,36 +2792,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" -[[package]] -name = "rayon" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" -dependencies = [ - "autocfg", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.13" @@ -4748,7 +2808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.6", - "redox_syscall 0.2.13", + "redox_syscall", "thiserror", ] @@ -4799,137 +2859,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] -name = "relay-crab-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "bp-crab", - "bp-crab-parachain", - "bp-darwinia", - "bp-darwinia-core", - "bp-header-chain", - "bp-kusama", - "bp-message-dispatch", - "bp-messages", - "bp-runtime", - "bridge-runtime-common", - "frame-support", - "pallet-bridge-dispatch", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "relay-crab-parachain-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "bp-crab", - "bp-crab-parachain", - "bp-darwinia-core", - "bp-header-chain", - "bp-message-dispatch", - "bp-messages", - "bp-runtime", - "bridge-runtime-common", - "frame-support", - "pallet-bridge-dispatch", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "relay-kusama-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "bp-header-chain", - "bp-kusama", - "bp-message-dispatch", - "bp-messages", - "bp-polkadot", - "bp-polkadot-core", - "bp-runtime", - "bridge-runtime-common", - "frame-support", - "pallet-bridge-dispatch", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "relay-substrate-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +name = "relay-s2s" +version = "0.5.7" dependencies = [ - "async-std", + "array-bytes", "async-trait", - "bp-header-chain", - "bp-messages", - "bp-runtime", - "finality-relay", - "frame-support", - "frame-system", - "futures 0.3.21", - "jsonrpsee", - "log", - "num-traits 0.2.15", - "pallet-balances", - "pallet-bridge-messages", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", - "rand 0.7.3", - "relay-utils", - "sc-chain-spec", - "sc-rpc-api", - "sc-transaction-pool-api", - "serde 1.0.137", + "bridge-s2s-traits", + "once_cell", "sp-core", - "sp-finality-grandpa", - "sp-rpc", "sp-runtime", - "sp-storage", - "sp-trie", - "sp-version", + "subquery-parachain", + "subquery-s2s", + "support-toolkit", "thiserror", "tokio", -] - -[[package]] -name = "relay-utils" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "ansi_term", - "anyhow", - "async-std", - "async-trait", - "backoff", - "bp-runtime", - "env_logger 0.8.4", - "futures 0.3.21", - "isahc", - "jsonpath_lib", - "log", - "num-traits 0.2.15", - "serde_json", - "substrate-prometheus-endpoint", - "sysinfo", - "thiserror", - "time 0.2.27", + "tracing", ] [[package]] @@ -4948,7 +2892,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ "base64 0.13.0", - "bytes 1.1.0", + "bytes", "encoding_rs", "futures-core", "futures-util", @@ -4964,9 +2908,9 @@ dependencies = [ "log", "mime", "native-tls", - "percent-encoding 2.1.0", - "pin-project-lite 0.2.9", - "rustls 0.20.6", + "percent-encoding", + "pin-project-lite", + "rustls", "rustls-pemfile 0.3.0", "serde 1.0.137", "serde_json", @@ -4974,22 +2918,12 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls", - "url 2.2.2", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.22.3", - "winreg 0.10.1", -] - -[[package]] -name = "resolv-conf" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", + "webpki-roots", + "winreg", ] [[package]] @@ -5013,7 +2947,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" dependencies = [ - "bytes 1.1.0", + "bytes", "rustc-hex", ] @@ -5036,28 +2970,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustc_version" -version = "0.3.3" +name = "rustc-hex" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" @@ -5065,20 +2981,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.9", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.0", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", + "semver", ] [[package]] @@ -5089,8 +2992,8 @@ checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" dependencies = [ "log", "ring", - "sct 0.7.0", - "webpki 0.22.0", + "sct", + "webpki", ] [[package]] @@ -5123,329 +3026,12 @@ dependencies = [ "base64 0.13.0", ] -[[package]] -name = "rw-stream-sink" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" -dependencies = [ - "futures 0.3.21", - "pin-project 0.4.29", - "static_assertions", -] - [[package]] name = "ryu" version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" -[[package]] -name = "salsa20" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0" -dependencies = [ - "cipher", -] - -[[package]] -name = "sc-allocator" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "log", - "sp-core", - "sp-wasm-interface", - "thiserror", -] - -[[package]] -name = "sc-block-builder" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", - "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", -] - -[[package]] -name = "sc-chain-spec" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "sc-chain-spec-derive", - "sc-network", - "sc-telemetry", - "serde 1.0.137", - "serde_json", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "sc-chain-spec-derive" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sc-client-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "fnv", - "futures 0.3.21", - "hash-db", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-executor", - "sc-transaction-pool-api", - "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-database", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", - "substrate-prometheus-endpoint", -] - -[[package]] -name = "sc-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "libp2p", - "log", - "parking_lot 0.11.2", - "sc-client-api", - "sc-utils", - "serde 1.0.137", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-executor" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "lazy_static", - "libsecp256k1 0.6.0", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-executor-common", - "sc-executor-wasmi", - "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-tasks", - "sp-trie", - "sp-version", - "sp-wasm-interface", - "wasmi", -] - -[[package]] -name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "derive_more", - "environmental", - "parity-scale-codec", - "pwasm-utils", - "sc-allocator", - "sp-core", - "sp-maybe-compressed-blob", - "sp-serializer", - "sp-wasm-interface", - "thiserror", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "log", - "parity-scale-codec", - "sc-allocator", - "sc-executor-common", - "scoped-tls", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", -] - -[[package]] -name = "sc-network" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-std", - "async-trait", - "asynchronous-codec 0.5.0", - "bitflags", - "bytes 1.1.0", - "cid", - "derive_more", - "either", - "fnv", - "fork-tree", - "futures 0.3.21", - "futures-timer", - "hex", - "ip_network", - "libp2p", - "linked-hash-map 0.5.4", - "linked_hash_set", - "log", - "lru", - "parity-scale-codec", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "sc-block-builder", - "sc-client-api", - "sc-consensus", - "sc-peerset", - "sc-utils", - "serde 1.0.137", - "serde_json", - "smallvec 1.8.0", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-finality-grandpa", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "unsigned-varint 0.6.0", - "void", - "zeroize", -] - -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "libp2p", - "log", - "sc-utils", - "serde_json", - "wasm-timer", -] - -[[package]] -name = "sc-rpc-api" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "jsonrpc-pubsub", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-chain-spec", - "sc-transaction-pool-api", - "serde 1.0.137", - "serde_json", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-tracing", - "sp-version", - "thiserror", -] - -[[package]] -name = "sc-telemetry" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "chrono", - "futures 0.3.21", - "libp2p", - "log", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "rand 0.7.3", - "serde 1.0.137", - "serde_json", - "thiserror", - "wasm-timer", -] - -[[package]] -name = "sc-transaction-pool-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "derive_more", - "futures 0.3.21", - "log", - "serde 1.0.137", - "sp-blockchain", - "sp-runtime", - "thiserror", -] - -[[package]] -name = "sc-utils" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "futures-timer", - "lazy_static", - "prometheus", -] - [[package]] name = "scale-info" version = "1.0.0" @@ -5453,7 +3039,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ "bitvec", - "cfg-if 1.0.0", + "cfg-if", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -5500,28 +3086,12 @@ dependencies = [ "zeroize", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -5534,9 +3104,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] @@ -5556,30 +3126,12 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - -[[package]] -name = "semver" -version = "0.11.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ - "semver-parser 0.10.2", + "core-foundation-sys", + "libc", ] [[package]] @@ -5588,21 +3140,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" version = "0.8.23" @@ -5671,8 +3208,7 @@ version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "indexmap", - "itoa", + "itoa 1.0.2", "ryu", "serde 1.0.137", ] @@ -5693,7 +3229,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.2", "ryu", "serde 1.0.137", ] @@ -5717,27 +3253,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures 0.2.2", + "cfg-if", + "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", ] -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.8.2" @@ -5757,21 +3278,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures 0.2.2", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "keccak", "opaque-debug 0.3.0", ] @@ -5784,16 +3293,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "signal-hook" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a253b5e89e2698464fc26b545c9edceb338e18a89effeeecfea192c3025be29d" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.0" @@ -5827,26 +3326,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - -[[package]] -name = "sluice" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" -dependencies = [ - "async-channel", - "futures-core", - "futures-io", -] - [[package]] name = "smallvec" version = "0.6.14" @@ -5862,35 +3341,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" -[[package]] -name = "snow" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7" -dependencies = [ - "aes-gcm", - "blake2", - "chacha20poly1305", - "rand 0.8.5", - "rand_core 0.6.3", - "ring", - "rustc_version 0.3.3", - "sha2 0.9.9", - "subtle", - "x25519-dalek", -] - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.4.4" @@ -5901,22 +3351,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "soketto" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" -dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", - "flate2", - "futures 0.3.21", - "httparse", - "log", - "rand 0.7.3", - "sha-1", -] - [[package]] name = "soketto" version = "0.7.1" @@ -5924,8 +3358,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ "base64 0.13.0", - "bytes 1.1.0", - "futures 0.3.21", + "bytes", + "futures", "httparse", "log", "rand 0.8.5", @@ -5935,7 +3369,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -5952,7 +3386,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.3", @@ -5964,7 +3398,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -5977,7 +3411,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "integer-sqrt", "num-traits 0.2.15", @@ -5989,72 +3423,23 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-block-builder" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "sp-blockchain" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "log", - "lru", - "parity-scale-codec", - "parking_lot 0.11.2", - "sp-api", - "sp-consensus", - "sp-database", - "sp-runtime", - "sp-state-machine", - "thiserror", -] - -[[package]] -name = "sp-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "log", - "parity-scale-codec", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-version", - "thiserror", -] - [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "base58", "blake2-rfc", "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.21", + "futures", "hash-db", "hash256-std-hasher", "hex", "impl-serde", "lazy_static", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "merlin", "num-traits 0.2.15", @@ -6074,6 +3459,7 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -6083,19 +3469,10 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "kvdb", - "parking_lot 0.11.2", -] - [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -6105,7 +3482,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "environmental", "parity-scale-codec", @@ -6116,7 +3493,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "finality-grandpa", "log", @@ -6134,7 +3511,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -6148,11 +3525,11 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "futures 0.3.21", + "futures", "hash-db", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "parity-scale-codec", "parking_lot 0.11.2", @@ -6172,11 +3549,11 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "derive_more", - "futures 0.3.21", + "futures", "merlin", "parity-scale-codec", "parking_lot 0.11.2", @@ -6185,36 +3562,18 @@ dependencies = [ "sp-externalities", ] -[[package]] -name = "sp-maybe-compressed-blob" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "zstd", -] - [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "backtrace", ] -[[package]] -name = "sp-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "rustc-hash", - "serde 1.0.137", - "sp-core", -] - [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "either", "hash256-std-hasher", @@ -6236,7 +3595,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6253,7 +3612,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -6262,19 +3621,10 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-serializer" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "serde 1.0.137", - "serde_json", -] - [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -6285,7 +3635,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -6308,12 +3658,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -6323,23 +3673,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-tasks" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "log", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", -] - [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "futures-timer", @@ -6355,15 +3692,9 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde 1.0.137", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -6373,7 +3704,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "memory-db", @@ -6388,7 +3719,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -6404,7 +3735,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -6415,7 +3746,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6430,12 +3761,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "standback" -version = "0.2.17" +name = "ss58-registry" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" +checksum = "77ef98aedad3dc52e10995e7ed15f1279e11d4da35795f5dac7305742d0feb66" dependencies = [ - "version_check", + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde 1.0.137", + "serde_json", + "unicode-xid", ] [[package]] @@ -6457,55 +3794,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde 1.0.137", - "serde_derive", - "syn", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde 1.0.137", - "serde_derive", - "serde_json", - "sha1", - "syn", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "strsim" version = "0.8.0" @@ -6535,7 +3823,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck 0.3.3", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -6557,7 +3845,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ - "heck 0.3.3", + "heck", "proc-macro2", "quote", "syn", @@ -6588,73 +3876,25 @@ dependencies = [ "gql_client", "hex", "include_dir", - "serde 1.0.137", - "serde-aux", - "serde-hex", - "strum", - "thiserror", - "tracing", -] - -[[package]] -name = "substrate-bip39" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" -dependencies = [ - "hmac 0.11.0", - "pbkdf2 0.8.0", - "schnorrkel", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "substrate-prometheus-endpoint" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-std", - "derive_more", - "futures-util", - "hyper", - "log", - "prometheus", - "tokio", -] - -[[package]] -name = "substrate-relay-helper" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" -dependencies = [ - "anyhow", - "async-std", - "async-trait", - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "bridge-runtime-common", - "finality-grandpa", - "finality-relay", - "frame-support", - "futures 0.3.21", - "log", - "messages-relay", - "num-traits 0.2.15", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-parachains", - "parachains-relay", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "sp-core", - "sp-finality-grandpa", - "sp-runtime", + "serde 1.0.137", + "serde-aux", + "serde-hex", + "strum", "thiserror", + "tracing", +] + +[[package]] +name = "substrate-bip39" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +dependencies = [ + "hmac 0.11.0", + "pbkdf2 0.8.0", + "schnorrkel", + "sha2 0.9.9", + "zeroize", ] [[package]] @@ -6666,14 +3906,14 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "bitvec", "chameleon", "derivative", "frame-metadata", - "futures 0.3.21", + "futures", "hex", "jsonrpsee", "log", @@ -6692,12 +3932,12 @@ dependencies = [ [[package]] name = "subxt-codegen" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", "frame-metadata", - "heck 0.3.3", + "heck", "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", @@ -6710,12 +3950,12 @@ dependencies = [ [[package]] name = "subxt-macro" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", "frame-metadata", - "heck 0.3.3", + "heck", "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", @@ -6753,20 +3993,13 @@ dependencies = [ "lifeline", ] -[[package]] -name = "support-terminal" -version = "0.5.7" -dependencies = [ - "colored", - "serde 1.0.137", - "structopt", - "strum", -] - [[package]] name = "support-toolkit" version = "0.5.7" dependencies = [ + "once_cell", + "pad", + "parity-scale-codec", "thiserror", ] @@ -6793,23 +4026,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "sysinfo" -version = "0.15.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de94457a09609f33fec5e7fceaf907488967c6c7c75d64da6a7ce6ffdb8b5abd" -dependencies = [ - "cc", - "cfg-if 1.0.0", - "core-foundation-sys", - "doc-comment", - "libc", - "ntapi", - "once_cell", - "rayon", - "winapi", -] - [[package]] name = "tap" version = "1.0.1" @@ -6822,23 +4038,14 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "remove_dir_all", "winapi", ] -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - [[package]] name = "textwrap" version = "0.11.0" @@ -6888,44 +4095,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check", - "winapi", -] - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] - [[package]] name = "tiny-bip39" version = "0.8.2" @@ -6975,16 +4144,16 @@ version = "1.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" dependencies = [ - "bytes 1.1.0", + "bytes", "libc", "memchr", "mio", "num_cpus", "once_cell", "parking_lot 0.12.1", - "pin-project-lite 0.2.9", + "pin-project-lite", "signal-hook-registry", - "socket2 0.4.4", + "socket2", "tokio-macros", "winapi", ] @@ -7016,9 +4185,9 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.6", + "rustls", "tokio", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -7027,12 +4196,12 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-io", "futures-sink", "log", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", ] @@ -7042,10 +4211,10 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", "tracing", ] @@ -7071,9 +4240,8 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" dependencies = [ - "cfg-if 1.0.0", - "log", - "pin-project-lite 0.2.9", + "cfg-if", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -7109,16 +4277,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project 1.0.10", - "tracing", -] - [[package]] name = "tracing-log" version = "0.1.3" @@ -7184,49 +4342,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "trust-dns-proto" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca94d4e9feb6a181c690c4040d7a24ef34018d8313ac5044a61d21222ae24e31" -dependencies = [ - "async-trait", - "cfg-if 1.0.0", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "log", - "rand 0.8.5", - "smallvec 1.8.0", - "thiserror", - "tinyvec", - "url 2.2.2", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecae383baad9995efaa34ce8e57d12c3f305e545887472a492b838f4b5cfb77a" -dependencies = [ - "cfg-if 1.0.0", - "futures-util", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "parking_lot 0.11.2", - "resolv-conf", - "smallvec 1.8.0", - "thiserror", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.3" @@ -7239,7 +4354,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rand 0.8.5", "static_assertions", ] @@ -7250,12 +4365,6 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" -[[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - [[package]] name = "uint" version = "0.9.3" @@ -7307,63 +4416,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.5", - "subtle", -] - -[[package]] -name = "unsigned-varint" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" - -[[package]] -name = "unsigned-varint" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2" -dependencies = [ - "asynchronous-codec 0.5.0", - "bytes 1.1.0", - "futures-io", - "futures-util", -] - -[[package]] -name = "unsigned-varint" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures-io", - "futures-util", -] - [[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.2.2" @@ -7371,9 +4429,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", - "idna 0.2.3", + "idna", "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] @@ -7382,16 +4440,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.0.0-alpha.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -7410,18 +4458,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "want" version = "0.3.0" @@ -7456,7 +4492,7 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -7481,7 +4517,7 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -7516,21 +4552,6 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures 0.3.21", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmi" version = "0.9.1" @@ -7565,16 +4586,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -7585,50 +4596,15 @@ dependencies = [ "untrusted", ] -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - [[package]] name = "webpki-roots" version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - -[[package]] -name = "which" -version = "4.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" -dependencies = [ - "either", - "lazy_static", - "libc", + "webpki", ] -[[package]] -name = "widestring" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" - [[package]] name = "winapi" version = "0.3.9" @@ -7645,15 +4621,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -7703,15 +4670,6 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.10.1" @@ -7727,17 +4685,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" -[[package]] -name = "x25519-dalek" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" -dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "yaml-rust" version = "0.4.5" @@ -7747,20 +4694,6 @@ dependencies = [ "linked-hash-map 0.5.4", ] -[[package]] -name = "yamux" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107" -dependencies = [ - "futures 0.3.21", - "log", - "nohash-hasher", - "parking_lot 0.11.2", - "rand 0.8.5", - "static_assertions", -] - [[package]] name = "zeroize" version = "1.5.5" @@ -7781,32 +4714,3 @@ dependencies = [ "syn", "synstructure", ] - -[[package]] -name = "zstd" -version = "0.9.2+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "4.1.3+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "1.6.2+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2daf2f248d9ea44454bfcb2516534e8b8ad2fc91bf818a1885495fc42bc8ac9f" -dependencies = [ - "cc", - "libc", -] diff --git a/bridges/crab-crabparachain/bridge/Cargo.toml b/bridges/crab-crabparachain/bridge/Cargo.toml index 7dbd3b506..681d11b00 100644 --- a/bridges/crab-crabparachain/bridge/Cargo.toml +++ b/bridges/crab-crabparachain/bridge/Cargo.toml @@ -13,67 +13,28 @@ repository = "https://github.com/darwinia-network/bridger" version = "0.5.7" [dependencies] +tracing = "0.1" +color-eyre = "0.5" -color-eyre = "0.5" -tracing = "0.1" +array-bytes = "2" +tokio = { version = "1", features = ["full"] } -async-trait = "0.1" - -colored = "2" structopt = "0.3" strum = { version = "0.21", features = ["derive"] } -tokio = { version = "1", features = ["full"] } - -codec = { package = "parity-scale-codec", version = "2" } -futures = "0.3" -futures-timer = "3" -hex = "0.4" -serde = { version = "1", features = ["derive"] } -serde_json = "1" - -lifeline = { git = "https://github.com/fewensa/lifeline-rs.git", branch = "threads-safely" } -once_cell = "1.12.0" -postage = "0.4" - -## Substrate Dependencies - -frame-support = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-trie = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-version = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } - -## bridge common - -bp-darwinia-core = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-header-chain = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-parachains = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-polkadot-core = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-runtime = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bridge-runtime-common = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -messages-relay = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -pallet-bridge-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -pallet-fee-market = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-crab-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-crab-parachain-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-kusama-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-substrate-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-utils = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -substrate-relay-helper = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } -## component -client-crab = { path = "../../../frame/assistants/client-crab" } -client-crab-parachain = { path = "../../../frame/assistants/client-crab-parachain" } -client-kusama = { path = "../../../frame/assistants/client-kusama" } -component-subscan = { path = "../../../frame/components/subscan" } -feemarket-s2s = { path = "../../../frame/assistants/feemarket-s2s" } -subquery-parachain = { path = "../../../frame/assistants/subquery-parachain" } -subquery-s2s = { path = "../../../frame/assistants/subquery-s2s" } - - -## support -support-common = { path = "../../../frame/supports/support-common" } -support-lifeline = { path = "../../../frame/supports/support-lifeline" } -support-terminal = { path = "../../../frame/supports/support-terminal" } +serde = { version = "1", features = ["derive"] } + +lifeline = { git = "https://github.com/fewensa/lifeline-rs.git", branch = "threads-safely" } +postage = "0.4" + +support-common = { path = "../../../frame/supports/support-common" } +support-lifeline = { path = "../../../frame/supports/support-lifeline" } +support-toolkit = { path = "../../../frame/supports/support-toolkit" } + +bridge-s2s-traits = { path = "../../../frame/traits/bridge-s2s" } +client-crab = { path = "../../../frame/assistants/client-crab", features = [ "bridge-s2s-crab-parachain", "feemarket-s2s-crab-parachain" ]} +client-kusama = { path = "../../../frame/assistants/client-kusama", features = [ "bridge-s2s-crab" ] } +client-crab-parachain = { path = "../../../frame/assistants/client-crab-parachain", features = [ "bridge-s2s-crab", "feemarket-s2s-crab" ] } +subquery-s2s = { path = "../../../frame/assistants/subquery-s2s" } +subquery-parachain = { path = "../../../frame/assistants/subquery-parachain" } +relay-s2s = { path = "../../../frame/assistants/relay-s2s", features = [ "bridge-parachain" ] } +feemarket-s2s = { path = "../../../frame/assistants/feemarket-s2s" } diff --git a/bridges/crab-crabparachain/bridge/src/bridge/config.rs b/bridges/crab-crabparachain/bridge/src/bridge/config.rs index 7a37854f9..8c1d28d4a 100644 --- a/bridges/crab-crabparachain/bridge/src/bridge/config.rs +++ b/bridges/crab-crabparachain/bridge/src/bridge/config.rs @@ -1,11 +1,16 @@ +use client_crab::client::CrabClient; +use client_crab::component::CrabClientComponent; +use client_crab_parachain::client::CrabParachainClient; +use client_crab_parachain::component::CrabParachainClientComponent; +use client_kusama::client::KusamaClient; +use client_kusama::component::KusamaClientComponent; use serde::{Deserialize, Serialize}; -use strum::{EnumString, EnumVariantNames}; +use subquery_s2s::types::BridgeName; +use subquery_s2s::{Subquery, SubqueryComponent, SubqueryConfig}; -use component_subscan::SubscanConfig; -use subquery_s2s::SubqueryConfig; use support_common::error::BridgerError; -use crate::types::{ChainInfo, HexLaneId, PrometheusParamsInfo}; +use crate::types::HexLaneId; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct BridgeConfig { @@ -13,171 +18,84 @@ pub struct BridgeConfig { pub kusama: ChainInfoConfig, pub crab_parachain: ChainInfoConfig, pub relay: RelayConfig, - #[serde(skip_serializing_if = "Option::is_none")] - pub crab_subscan: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub crab_parachain_subscan: Option, - pub task: TaskConfig, pub index: IndexConfig, } -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct TaskConfig { - pub interval_update_fee: u64, - pub update_fee_strategy: UpdateFeeStrategyType, -} - -#[derive(Clone, Debug, Serialize, Deserialize, strum::EnumString)] -pub enum UpdateFeeStrategyType { - Nothing, - Crazy, - Reasonable, -} - #[derive(Clone, Debug, Serialize, Deserialize)] pub struct RelayConfig { /// Hex-encoded lane identifiers that should be served by the complex relay. pub lanes: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_crab: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_crab_parachain: Option, - #[serde(default)] - pub prometheus_params: PrometheusParamsInfo, - /// If passed, only mandatory headers (headers that are changing the GRANDPA authorities set) - /// are relayed. - pub only_mandatory_headers: bool, - /// Create relayers fund accounts on both chains, if it does not exists yet. - pub create_relayers_fund_accounts: bool, - /// The SURI of secret key to use when transactions are submitted to the crab node. - #[serde(skip_serializing_if = "Option::is_none")] - pub crab_messages_pallet_owner: Option, - /// The password for the SURI of secret key to use when transactions are submitted to the crab node. - #[serde(skip_serializing_if = "Option::is_none")] - pub crab_messages_pallet_owner_password: Option, - /// The SURI of secret key to use when transactions are submitted to the crab parachain node. - #[serde(skip_serializing_if = "Option::is_none")] - pub crab_parachain_messages_pallet_owner: Option, - /// The password for the SURI of secret key to use when transactions are submitted to the crab parachain node. - #[serde(skip_serializing_if = "Option::is_none")] - pub crab_parachain_messages_pallet_owner_password: Option, + pub para_id: u32, } #[derive(Clone, Debug, Serialize, Deserialize)] pub struct ChainInfoConfig { + /// Endpoint pub endpoint: String, #[serde(skip_serializing_if = "Option::is_none")] pub signer: Option, - #[serde(skip)] - pub secure: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_password: Option, - /// Transactions mortality period, in blocks. MUST be a power of two in [4; 65536] range. MAY NOT be larger than `BlockHashCount` parameter of the chain system module. - #[serde(skip_serializing_if = "Option::is_none")] - pub transactions_mortality: Option, - /// Runtime version mode, default is bundle - #[serde(skip_serializing_if = "Option::is_none")] - pub runtime_version_mode: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub spec_version: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_version: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub para_id: Option, } -#[derive(Clone, Debug, Serialize, Deserialize, EnumString, EnumVariantNames)] -#[strum(serialize_all = "kebab_case")] -pub enum RuntimeVersionMode { - /// Auto query version from chain - Auto, - /// Custom `spec_version` and `transaction_version` - Custom, - /// Read version from bundle dependencies directly. - Bundle, -} - -impl ChainInfoConfig { - fn host_port(&self) -> color_eyre::Result<(bool, String, u16)> { - if self.endpoint.find("ws://").unwrap_or(usize::MAX) != 0 - && self.endpoint.find("wss://").unwrap_or(usize::MAX) != 0 - { - return Err(BridgerError::Custom( - "The entrypoint isn't websocket protocol".to_string(), - ) - .into()); - } - let secure = self.endpoint.starts_with("wss://"); - let endpoint = self - .endpoint - .replace(if secure { "wss://" } else { "ws://" }, "") - .replace('/', "") - .replace(' ', ""); - let host_port = endpoint.split(':').collect::>(); - let host = host_port.get(0).unwrap_or(&"127.0.0.1"); - let port = host_port - .get(1) - .unwrap_or(if secure { &"443" } else { &"80" }); - Ok((secure, host.to_string(), port.parse::()?)) - } - - pub fn to_chain_info(&self) -> color_eyre::Result { - self.to_chain_info_with_expect_signer(None) - } - - pub fn to_chain_info_with_expect_signer( - &self, - except_signer: Option, - ) -> color_eyre::Result { - let host_port = self.host_port()?; - Ok(ChainInfo { - secure: host_port.0, - host: host_port.1, - port: host_port.2, - signer: except_signer.or_else(|| self.signer.clone()), - signer_password: self.signer_password.clone(), - transactions_mortality: Some(256), - runtime_version_mode: self.runtime_version_mode.clone(), - spec_version: self.spec_version, - transaction_version: self.transaction_version, - }) - } +impl TryFrom for client_crab::config::ClientConfig { + type Error = BridgerError; - pub fn to_crab_client_config(&self) -> color_eyre::Result { + fn try_from(config: ChainInfoConfig) -> Result { + let relayer_private_key = config.signer.ok_or_else(|| { + BridgerError::Custom(format!("Missing signer for chain: {}", config.endpoint)) + })?; Ok(client_crab::config::ClientConfig { - endpoint: self.endpoint.clone(), - relayer_private_key: self.signer.clone().ok_or_else(|| { - BridgerError::Custom(format!("Missing signer for chain: {}", self.endpoint)) - })?, + endpoint: config.endpoint, + relayer_private_key, relayer_real_account: None, }) } +} + +impl TryFrom for client_crab_parachain::config::ClientConfig { + type Error = BridgerError; - pub fn to_crab_parachain_client_config( - &self, - ) -> color_eyre::Result { + fn try_from(config: ChainInfoConfig) -> Result { + let relayer_private_key = config.signer.ok_or_else(|| { + BridgerError::Custom(format!("Missing signer for chain: {}", config.endpoint)) + })?; Ok(client_crab_parachain::config::ClientConfig { - endpoint: self.endpoint.clone(), - relayer_private_key: self.signer.clone().ok_or_else(|| { - BridgerError::Custom(format!("Missing signer for chain: {}", self.endpoint)) - })?, + endpoint: config.endpoint, + relayer_private_key, relayer_real_account: None, }) } +} + +impl TryFrom for client_kusama::config::ClientConfig { + type Error = BridgerError; - pub fn to_kusama_client_config( - &self, - ) -> color_eyre::Result { + fn try_from(config: ChainInfoConfig) -> Result { + let relayer_private_key = "//Alice".to_string(); Ok(client_kusama::config::ClientConfig { - endpoint: self.endpoint.clone(), - relayer_private_key: self.signer.clone().ok_or_else(|| { - BridgerError::Custom(format!("Missing signer for chain: {}", self.endpoint)) - })?, + endpoint: config.endpoint, + relayer_private_key, relayer_real_account: None, }) } } +impl ChainInfoConfig { + pub async fn to_crab_client(&self) -> color_eyre::Result { + let config = self.clone().try_into()?; + Ok(CrabClientComponent::component(config).await?) + } + + pub async fn to_crab_parachain_client(&self) -> color_eyre::Result { + let config = self.clone().try_into()?; + Ok(CrabParachainClientComponent::component(config).await?) + } + + pub async fn to_kusama_client(&self) -> color_eyre::Result { + let config = self.clone().try_into()?; + Ok(KusamaClientComponent::component(config).await?) + } +} + #[derive(Clone, Debug, Serialize, Deserialize)] pub struct IndexConfig { pub crab: SubqueryConfig, @@ -185,3 +103,30 @@ pub struct IndexConfig { pub kusama: SubqueryConfig, pub parachain_kusama: subquery_parachain::SubqueryConfig, } + +impl IndexConfig { + pub fn to_crab_subquery(&self) -> Subquery { + SubqueryComponent::component(self.crab.clone(), BridgeName::CrabParachain) + } + + pub fn to_crab_parachain_subquery(&self) -> Subquery { + SubqueryComponent::component(self.crab_parachain.clone(), BridgeName::CrabParachain) + } + + pub fn to_kusama_subquery(&self) -> Subquery { + SubqueryComponent::component(self.kusama.clone(), BridgeName::CrabParachain) + } + + pub fn to_candidate_subquery(&self) -> subquery_parachain::Subquery { + subquery_parachain::SubqueryComponent::component( + self.parachain_kusama.clone(), + subquery_parachain::types::BridgeName::CrabParachain, + ) + } +} + +impl RelayConfig { + pub fn raw_lanes(&self) -> Vec<[u8; 4]> { + self.lanes.iter().map(|item| item.0).collect() + } +} diff --git a/bridges/crab-crabparachain/bridge/src/bridge/task.rs b/bridges/crab-crabparachain/bridge/src/bridge/task.rs index 7027fd7ac..64870f123 100644 --- a/bridges/crab-crabparachain/bridge/src/bridge/task.rs +++ b/bridges/crab-crabparachain/bridge/src/bridge/task.rs @@ -2,10 +2,10 @@ use support_lifeline::task::TaskStack; use crate::bridge::BridgeBus; use crate::service::header::{ - CrabToParachainHeaderRelayService, KusamaToCrabHeaderRelayService, - KusamaToCrabParaHeaderRelayService, + CrabToParachainHeaderRelayService, KusamaToCrabHeaderRelayService, ParaHeadRelayService, }; -use crate::service::message::MessageRelayService; +use crate::service::message::crab_to_crabparachain::CrabToCrabParachainMessageRelayService; +use crate::service::message::crabparachain_to_crab::CrabParachainToCrabMessageRelayService; use crate::service::subscribe::SubscribeService; #[derive(Debug)] @@ -26,8 +26,9 @@ impl BridgeTask { let mut stack = TaskStack::new(bus); stack.spawn_service::()?; stack.spawn_service::()?; - stack.spawn_service::()?; - stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; stack.spawn_service::()?; Ok(Self { stack }) } diff --git a/bridges/crab-crabparachain/bridge/src/chains/crab.rs b/bridges/crab-crabparachain/bridge/src/chains/crab.rs deleted file mode 100644 index 1889c29ff..000000000 --- a/bridges/crab-crabparachain/bridge/src/chains/crab.rs +++ /dev/null @@ -1,145 +0,0 @@ -pub use s2s_const::*; -pub use s2s_messages::*; - -mod s2s_const { - use sp_version::RuntimeVersion; - - use relay_crab_client::CrabChain; - - use crate::traits::CliChain; - - // === start const - impl CliChain for CrabChain { - const RUNTIME_VERSION: RuntimeVersion = RuntimeVersion { - spec_name: sp_runtime::create_runtime_str!("Crab"), - impl_name: sp_runtime::create_runtime_str!("Darwinia Crab"), - authoring_version: 0, - spec_version: 1224, - impl_version: 0, - apis: sp_version::create_apis_vec![[]], - transaction_version: 0, - }; - - type KeyPair = sp_core::sr25519::Pair; - } - - // === end -} - -mod s2s_messages { - use crate::feemarket::CrabFeemarketApi; - use feemarket_s2s::relay::BasicRelayStrategy; - use frame_support::weights::Weight; - use relay_crab_client::CrabChain; - use relay_crab_parachain_client::CrabParachainChain; - use substrate_relay_helper::messages_lane::SubstrateMessageLane; - - #[derive(Clone, Debug)] - pub struct CrabMessagesToCrabParachain; - - substrate_relay_helper::generate_mocked_receive_message_proof_call_builder!( - CrabMessagesToCrabParachain, - CrabMessagesToCrabParachainReceiveMessagesProofCallBuilder, - relay_crab_parachain_client::runtime::Call::BridgeCrabMessages, - relay_crab_parachain_client::runtime::BridgeCrabMessagesCall::receive_messages_proof - ); - - substrate_relay_helper::generate_mocked_receive_message_delivery_proof_call_builder!( - CrabMessagesToCrabParachain, - CrabMessagesToCrabParachainReceiveMessagesDeliveryProofCallBuilder, - relay_crab_client::runtime::Call::BridgeCrabParachainMessages, - relay_crab_client::runtime::BridgeCrabParachainMessagesCall::receive_messages_delivery_proof - ); - - impl SubstrateMessageLane for CrabMessagesToCrabParachain { - const SOURCE_TO_TARGET_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - const TARGET_TO_SOURCE_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - - type SourceChain = CrabChain; - type TargetChain = CrabParachainChain; - - type SourceTransactionSignScheme = CrabChain; - type TargetTransactionSignScheme = CrabParachainChain; - - type ReceiveMessagesProofCallBuilder = - CrabMessagesToCrabParachainReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = - CrabMessagesToCrabParachainReceiveMessagesDeliveryProofCallBuilder; - - type RelayStrategy = BasicRelayStrategy; - } -} - -pub mod s2s_feemarket { - use codec::Encode; - use relay_crab_client::runtime as crab_runtime; - use relay_crab_client::CrabChain; - use relay_substrate_client::{ - ChainBase, Client, SignParam, TransactionSignScheme, UnsignedTransaction, - }; - use sp_core::{Bytes, Pair}; - - use feemarket_s2s::error::FeemarketResult; - - pub(crate) async fn update_relay_fee( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - CrabChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - crab_runtime::Call::CrabParachainFeemarket( - crab_runtime::FeemarketCall::update_relay_fee(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } - - pub(crate) async fn update_locked_collateral( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - CrabChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - crab_runtime::Call::CrabParachainFeemarket( - crab_runtime::FeemarketCall::update_locked_collateral(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } -} diff --git a/bridges/crab-crabparachain/bridge/src/chains/crab_parachain.rs b/bridges/crab-crabparachain/bridge/src/chains/crab_parachain.rs deleted file mode 100644 index cda86bd5e..000000000 --- a/bridges/crab-crabparachain/bridge/src/chains/crab_parachain.rs +++ /dev/null @@ -1,147 +0,0 @@ -pub use s2s_const::*; -pub use s2s_messages::*; - -mod s2s_const { - use sp_version::RuntimeVersion; - - use relay_crab_parachain_client::CrabParachainChain; - - use crate::traits::CliChain; - - // === start const - impl CliChain for CrabParachainChain { - const RUNTIME_VERSION: RuntimeVersion = RuntimeVersion { - spec_name: sp_runtime::create_runtime_str!("Crab Parachain"), - impl_name: sp_runtime::create_runtime_str!("Crab Parachain"), - authoring_version: 1, - spec_version: 3, - impl_version: 1, - apis: sp_version::create_apis_vec![[]], - transaction_version: 1, - }; - - type KeyPair = sp_core::sr25519::Pair; - } - - // === end -} - -mod s2s_messages { - use crate::feemarket::CrabParachainFeemarketApi; - use feemarket_s2s::relay::BasicRelayStrategy; - use frame_support::weights::Weight; - use relay_crab_client::CrabChain; - use relay_crab_parachain_client::CrabParachainChain; - use substrate_relay_helper::messages_lane::SubstrateMessageLane; - - #[derive(Clone, Debug)] - pub struct CrabParachainMessagesToCrab; - - substrate_relay_helper::generate_mocked_receive_message_proof_call_builder!( - CrabParachainMessagesToCrab, - CrabParachainMessagesToCrabReceiveMessagesProofCallBuilder, - relay_crab_client::runtime::Call::BridgeCrabParachainMessages, - relay_crab_client::runtime::BridgeCrabParachainMessagesCall::receive_messages_proof - ); - - substrate_relay_helper::generate_mocked_receive_message_delivery_proof_call_builder!( - CrabParachainMessagesToCrab, - CrabParachainMessagesToCrabReceiveMessagesDeliveryProofCallBuilder, - relay_crab_parachain_client::runtime::Call::BridgeCrabMessages, - relay_crab_parachain_client::runtime::BridgeCrabMessagesCall::receive_messages_delivery_proof - ); - - impl SubstrateMessageLane for CrabParachainMessagesToCrab { - const SOURCE_TO_TARGET_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - const TARGET_TO_SOURCE_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - - type SourceChain = CrabParachainChain; - type TargetChain = CrabChain; - - type SourceTransactionSignScheme = CrabParachainChain; - type TargetTransactionSignScheme = CrabChain; - - type ReceiveMessagesProofCallBuilder = - CrabParachainMessagesToCrabReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = - CrabParachainMessagesToCrabReceiveMessagesDeliveryProofCallBuilder; - - type RelayStrategy = BasicRelayStrategy; - } -} - -pub mod s2s_feemarket { - use codec::Encode; - use relay_crab_parachain_client::runtime as crab_parachain_runtime; - use relay_crab_parachain_client::CrabParachainChain; - use relay_substrate_client::{ - ChainBase, Client, SignParam, TransactionSignScheme, UnsignedTransaction, - }; - use sp_core::{Bytes, Pair}; - - use feemarket_s2s::error::FeemarketResult; - - pub(crate) async fn update_relay_fee( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - CrabParachainChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - crab_parachain_runtime::Call::CrabFeemarket( - crab_parachain_runtime::FeemarketCall::update_relay_fee(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } - - pub(crate) async fn update_locked_collateral( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - CrabParachainChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - crab_parachain_runtime::Call::CrabFeemarket( - crab_parachain_runtime::FeemarketCall::update_locked_collateral( - amount, - ), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } -} diff --git a/bridges/crab-crabparachain/bridge/src/chains/kusama.rs b/bridges/crab-crabparachain/bridge/src/chains/kusama.rs deleted file mode 100644 index 6d1153ca9..000000000 --- a/bridges/crab-crabparachain/bridge/src/chains/kusama.rs +++ /dev/null @@ -1,26 +0,0 @@ -pub use s2s_const::*; - -mod s2s_const { - use sp_version::RuntimeVersion; - - use relay_kusama_client::Kusama; - - use crate::traits::CliChain; - - // === start const - impl CliChain for Kusama { - const RUNTIME_VERSION: RuntimeVersion = RuntimeVersion { - spec_name: sp_version::create_runtime_str!("kusama"), - impl_name: sp_version::create_runtime_str!("parity-kusama-v2.0"), - authoring_version: 0, - spec_version: 9142, - impl_version: 0, - apis: sp_version::create_apis_vec![[]], - transaction_version: 0, - }; - - type KeyPair = sp_core::sr25519::Pair; - } - - // === end -} diff --git a/bridges/crab-crabparachain/bridge/src/chains/mod.rs b/bridges/crab-crabparachain/bridge/src/chains/mod.rs deleted file mode 100644 index 51215619a..000000000 --- a/bridges/crab-crabparachain/bridge/src/chains/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod crab; -pub mod crab_parachain; -pub mod kusama; diff --git a/bridges/crab-crabparachain/bridge/src/command/handler/init.rs b/bridges/crab-crabparachain/bridge/src/command/handler/init.rs index 793e855a5..544c74683 100644 --- a/bridges/crab-crabparachain/bridge/src/command/handler/init.rs +++ b/bridges/crab-crabparachain/bridge/src/command/handler/init.rs @@ -1,19 +1,10 @@ -use bp_header_chain::InitializationData; -use bp_runtime::Chain as ChainBase; -use codec::Encode; -use relay_crab_client::runtime::{BridgeKusamaGrandpaCall, Call}; -use relay_crab_parachain_client::runtime as crab_parachain_runtime; -use relay_substrate_client::{ - Chain as RelaySubstrateClientChain, SignParam, TransactionSignScheme, UnsignedTransaction, -}; -use sp_core::{Bytes, Pair}; +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay}; +use support_toolkit::convert::SmartCodecMapper; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; -use support_terminal::output; use crate::bridge::{BridgeConfig, ChainInfoConfig}; -use crate::types::{BridgeName, InitBridge}; +use crate::types::BridgeName; pub async fn handle_init(bridge: BridgeName) -> color_eyre::Result<()> { tracing::info!(target: "crab-crabparachain", "Init bridge {:?}", bridge); @@ -22,102 +13,35 @@ pub async fn handle_init(bridge: BridgeName) -> color_eyre::Result<()> { let config_kusama: ChainInfoConfig = bridge_config.kusama; let config_crab_parachain: ChainInfoConfig = bridge_config.crab_parachain; - let (source_chain, target_chain) = match bridge { - BridgeName::KusamaToCrab => (config_kusama.to_chain_info()?, config_crab.to_chain_info()?), - BridgeName::CrabToCrabParachain => ( - config_crab.to_chain_info()?, - config_crab_parachain.to_chain_info()?, - ), - }; - std::thread::spawn(move || { - futures::executor::block_on(init_bridge(InitBridge { - bridge, - source: source_chain, - target: target_chain, - })) - }) - .join() - .map_err(|_| BridgerError::Custom("Failed to join thread handle".to_string()))??; - - output::output_ok(); + init_bridge(bridge, config_crab, config_kusama, config_crab_parachain).await?; Ok(()) } -macro_rules! select_bridge { - ($bridge: expr, $generic: tt) => { - match $bridge { - BridgeName::KusamaToCrab => { - type Source = relay_kusama_client::Kusama; - type Target = relay_crab_client::CrabChain; - - fn encode_init_bridge( - init_data: InitializationData<::Header>, - ) -> ::Call { - Call::BridgeKusamaGrandpa(BridgeKusamaGrandpaCall::initialize(init_data)) - } - - $generic - } - BridgeName::CrabToCrabParachain => { - type Source = relay_crab_client::CrabChain; - type Target = relay_crab_parachain_client::CrabParachainChain; - - fn encode_init_bridge( - init_data: InitializationData<::Header>, - ) -> ::Call { - crab_parachain_runtime::Call::BridgeCrabGrandpa( - crab_parachain_runtime::BridgeCrabGrandpaCall::initialize(init_data), - ) - } - - $generic - } +async fn init_bridge( + bridge: BridgeName, + config_crab: ChainInfoConfig, + config_kusama: ChainInfoConfig, + config_crab_parachain: ChainInfoConfig, +) -> color_eyre::Result<()> { + let client_crab = config_crab.to_crab_client().await?; + let client_kusama = config_kusama.to_kusama_client().await?; + let client_crab_parachain = config_crab_parachain.to_crab_parachain_client().await?; + let hash = match bridge { + BridgeName::CrabToCrabParachain => { + let initialization_data = client_crab.prepare_initialization_data().await?; + let expected_data = SmartCodecMapper::map_to(&initialization_data)?; + client_crab_parachain.initialize(expected_data).await? + } + BridgeName::KusamaToCrab => { + let initialization_data = client_kusama.prepare_initialization_data().await?; + let expected_data = SmartCodecMapper::map_to(&initialization_data)?; + client_crab.initialize(expected_data).await? } }; -} - -async fn init_bridge(init_bridge: InitBridge) -> color_eyre::Result<()> { - let bridge = init_bridge.bridge; - let source_chain = init_bridge.source; - let target_chain = init_bridge.target; - select_bridge!(bridge, { - let source_client = source_chain.to_substrate_relay_chain::().await?; - let target_client = target_chain.to_substrate_relay_chain::().await?; - let target_sign = target_chain.to_keypair::()?; - tracing::debug!( - target: "crab-crabparachain", - "source client -> {:?}", - source_client - ); - tracing::debug!( - target: "crab-crabparachain", - "target client -> {:?}", - target_client - ); - - let (spec_version, transaction_version) = target_client.simple_runtime_version().await?; - substrate_relay_helper::headers_initialize::initialize( - source_client, - target_client.clone(), - target_sign.public().into(), - move |transaction_nonce, initialization_data| { - Bytes( - Target::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash: *target_client.genesis_hash(), - signer: target_sign.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - encode_init_bridge(initialization_data), - transaction_nonce, - ), - }) - .encode(), - ) - }, - ) - .await; - }); + tracing::info!( + target: "crab-crabparachain", + "Successes to sent init transaction: {:?}", + hash, + ); Ok(()) } diff --git a/bridges/crab-crabparachain/bridge/src/command/handler/relay.rs b/bridges/crab-crabparachain/bridge/src/command/handler/relay.rs index 042b54802..c60c67b43 100644 --- a/bridges/crab-crabparachain/bridge/src/command/handler/relay.rs +++ b/bridges/crab-crabparachain/bridge/src/command/handler/relay.rs @@ -3,7 +3,7 @@ use support_common::config::{Config, Names}; use crate::bridge::{BridgeConfig, BridgeTask}; pub async fn handle_relay() -> color_eyre::Result<()> { - tracing::info!(target: "crab-pangoro", "Start bridge crab-pangoro"); + tracing::info!(target: "crab-crabparachain", "Start bridge crab-crabparachain"); // check config let _bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; let _task = BridgeTask::new().await?; diff --git a/bridges/crab-crabparachain/bridge/src/command/types.rs b/bridges/crab-crabparachain/bridge/src/command/types.rs index 287b4dc10..44b51379a 100644 --- a/bridges/crab-crabparachain/bridge/src/command/types.rs +++ b/bridges/crab-crabparachain/bridge/src/command/types.rs @@ -8,7 +8,7 @@ use crate::types::BridgeName; pub enum Opts { /// Init bridge crab-crabparachain Init { - /// Bridge, support kusama-to-crab + /// Bridge #[structopt()] bridge: BridgeName, }, diff --git a/bridges/crab-crabparachain/bridge/src/feemarket/crab.rs b/bridges/crab-crabparachain/bridge/src/feemarket/crab.rs deleted file mode 100644 index 47a41ae4a..000000000 --- a/bridges/crab-crabparachain/bridge/src/feemarket/crab.rs +++ /dev/null @@ -1,176 +0,0 @@ -use bp_messages::{LaneId, MessageNonce}; -use codec::Encode; -use frame_support::Blake2_128Concat; -use pallet_fee_market::types::{Order, Relayer}; -use relay_crab_client::CrabChain; -use relay_substrate_client::{ChainBase, Client, TransactionSignScheme}; -use relay_utils::relay_loop::Client as RelayLoopClient; -use sp_core::storage::StorageKey; -use sp_core::Pair; - -use feemarket_s2s::api::FeemarketApi; -use feemarket_s2s::error::FeemarketResult; - -#[derive(Clone)] -pub struct CrabFeemarketApi { - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, -} - -impl CrabFeemarketApi { - pub fn new( - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, - ) -> Self { - Self { - client, - lane_id, - signer, - } - } -} - -#[async_trait::async_trait] -impl FeemarketApi for CrabFeemarketApi { - type Chain = CrabChain; - - async fn reconnect(&mut self) -> FeemarketResult<()> { - Ok(self.client.reconnect().await?) - } - - fn lane_id(&self) -> LaneId { - self.lane_id - } - - async fn best_finalized_header_number( - &self, - ) -> FeemarketResult<::BlockNumber> { - Ok(self.client.best_finalized_header_number().await?) - } - - async fn assigned_relayers( - &self, - ) -> FeemarketResult< - Vec::AccountId, ::Balance>>, - > { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "CrabParachainFeeMarket".as_bytes(), - "AssignedRelayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn my_assigned_info( - &self, - ) -> FeemarketResult< - Option<( - usize, - Relayer<::AccountId, ::Balance>, - )>, - > { - let signer_id = (*self.signer.public().as_array_ref()).into(); - let assigned_relayers = self.assigned_relayers().await?; - let ret = assigned_relayers - .iter() - .position(|item| item.id == signer_id) - // .map(|position| position as u32) - .map(|position| { - ( - position, - assigned_relayers - .get(position) - .cloned() - .expect("Unreachable"), - ) - }); - Ok(ret) - } - - async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> FeemarketResult< - Option< - Order< - ::AccountId, - ::BlockNumber, - ::Balance, - >, - >, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "CrabParachainFeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn relayers(&self) -> FeemarketResult::AccountId>> { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "CrabParachainFeeMarket".as_bytes(), - "Relayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn relayer( - &self, - account: ::AccountId, - ) -> FeemarketResult< - Option::AccountId, ::Balance>>, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "CrabParachainFeeMarket", - "RelayersMap", - account.encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn is_relayer(&self) -> FeemarketResult { - let signer_id = (*self.signer.public().as_array_ref()).into(); - self.relayer(signer_id).await.map(|item| item.is_some()) - } - - async fn update_relay_fee( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::crab::s2s_feemarket::update_relay_fee( - &self.client, - self.signer.clone(), - amount, - ) - .await - } - - async fn update_locked_collateral( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::crab::s2s_feemarket::update_locked_collateral( - &self.client, - self.signer.clone(), - amount, - ) - .await - } -} diff --git a/bridges/crab-crabparachain/bridge/src/feemarket/crab_parachain.rs b/bridges/crab-crabparachain/bridge/src/feemarket/crab_parachain.rs deleted file mode 100644 index 00d588662..000000000 --- a/bridges/crab-crabparachain/bridge/src/feemarket/crab_parachain.rs +++ /dev/null @@ -1,172 +0,0 @@ -use bp_messages::{LaneId, MessageNonce}; -use codec::Encode; -use frame_support::Blake2_128Concat; -use pallet_fee_market::types::{Order, Relayer}; -use relay_crab_parachain_client::CrabParachainChain; -use relay_substrate_client::{ChainBase, Client, TransactionSignScheme}; -use relay_utils::relay_loop::Client as RelayLoopClient; -use sp_core::storage::StorageKey; -use sp_core::Pair; - -use feemarket_s2s::api::FeemarketApi; -use feemarket_s2s::error::FeemarketResult; - -#[derive(Clone)] -pub struct CrabParachainFeemarketApi { - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, -} - -impl CrabParachainFeemarketApi { - pub fn new( - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, - ) -> Self { - Self { - client, - lane_id, - signer, - } - } -} - -#[async_trait::async_trait] -impl FeemarketApi for CrabParachainFeemarketApi { - type Chain = CrabParachainChain; - - async fn reconnect(&mut self) -> FeemarketResult<()> { - Ok(self.client.reconnect().await?) - } - - fn lane_id(&self) -> LaneId { - self.lane_id - } - - async fn best_finalized_header_number( - &self, - ) -> FeemarketResult<::BlockNumber> { - Ok(self.client.best_finalized_header_number().await?) - } - - async fn assigned_relayers( - &self, - ) -> FeemarketResult< - Vec::AccountId, ::Balance>>, - > { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "CrabFeeMarket".as_bytes(), - "AssignedRelayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn my_assigned_info( - &self, - ) -> FeemarketResult< - Option<( - usize, - Relayer<::AccountId, ::Balance>, - )>, - > { - let signer_id = (*self.signer.public().as_array_ref()).into(); - let assigned_relayers = self.assigned_relayers().await?; - let ret = assigned_relayers - .iter() - .position(|item| item.id == signer_id) - .map(|position| { - ( - position, - assigned_relayers - .get(position) - .cloned() - .expect("Unreachable"), - ) - }); - Ok(ret) - } - - async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> FeemarketResult< - Option< - Order< - ::AccountId, - ::BlockNumber, - ::Balance, - >, - >, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "CrabFeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn relayers(&self) -> FeemarketResult::AccountId>> { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix("CrabFeeMarket".as_bytes(), "Relayers".as_bytes()) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn relayer( - &self, - account: ::AccountId, - ) -> FeemarketResult< - Option::AccountId, ::Balance>>, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "CrabFeeMarket", - "RelayersMap", - account.encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn is_relayer(&self) -> FeemarketResult { - let signer_id = (*self.signer.public().as_array_ref()).into(); - self.relayer(signer_id).await.map(|item| item.is_some()) - } - - async fn update_relay_fee( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::crab_parachain::s2s_feemarket::update_relay_fee( - &self.client, - self.signer.clone(), - amount, - ) - .await - } - - async fn update_locked_collateral( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::crab_parachain::s2s_feemarket::update_locked_collateral( - &self.client, - self.signer.clone(), - amount, - ) - .await - } -} diff --git a/bridges/crab-crabparachain/bridge/src/feemarket/mod.rs b/bridges/crab-crabparachain/bridge/src/feemarket/mod.rs deleted file mode 100644 index 58c21b11c..000000000 --- a/bridges/crab-crabparachain/bridge/src/feemarket/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub use self::crab::*; -pub use self::crab_parachain::*; - -mod crab; -mod crab_parachain; diff --git a/bridges/crab-crabparachain/bridge/src/main.rs b/bridges/crab-crabparachain/bridge/src/main.rs index 23c5a87c9..198a7c071 100644 --- a/bridges/crab-crabparachain/bridge/src/main.rs +++ b/bridges/crab-crabparachain/bridge/src/main.rs @@ -3,12 +3,9 @@ use structopt::StructOpt; use crate::command::types::Opts; mod bridge; -mod chains; mod cli; mod command; -mod feemarket; mod service; -mod traits; mod types; #[tokio::main] diff --git a/bridges/crab-crabparachain/bridge/src/service/header/crab_to_parachain.rs b/bridges/crab-crabparachain/bridge/src/service/header/crab_to_parachain.rs index 269422afe..614b9a3ca 100644 --- a/bridges/crab-crabparachain/bridge/src/service/header/crab_to_parachain.rs +++ b/bridges/crab-crabparachain/bridge/src/service/header/crab_to_parachain.rs @@ -1,24 +1,12 @@ -use std::str::FromStr; - -use client_crab::client::CrabClient; -use client_crab::component::CrabClientComponent; -use client_crab::types::runtime_types::bp_header_chain::justification::GrandpaJustification; -use client_crab::types::runtime_types::sp_runtime::generic::header::Header; -use client_crab::types::runtime_types::sp_runtime::traits::BlakeTwo256; -use codec::{Decode, Encode}; use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::OriginType; -use client_crab_parachain::client::CrabParachainClient; -use client_crab_parachain::component::CrabParachainClientComponent; -use client_crab_parachain::types::runtime_types::sp_runtime::generic::header::Header as FinalityTarget; -use subquery_s2s::types::{BridgeName, OriginType}; -use subquery_s2s::{Subquery, SubqueryComponent}; +use relay_s2s::header::SolochainHeaderRunner; +use relay_s2s::types::SolochainHeaderInput; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; use support_lifeline::service::BridgeService; -use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; -use crate::service::subscribe::CRAB_JUSTIFICATIONS; +use crate::bridge::{BridgeBus, BridgeConfig}; #[derive(Debug)] pub struct CrabToParachainHeaderRelayService { @@ -32,218 +20,50 @@ impl Service for CrabToParachainHeaderRelayService { type Lifeline = color_eyre::Result; fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task( - &format!("{}-crab-parachain-header-relay", BridgeTask::name()), - async move { - while let Err(e) = start().await { - tracing::error!( - target: "crab-crabparachain", - "Failed to start crab-to-parachain header relay: {:?}", - e, - ); - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } - Ok(()) - }, - ); - Ok(Self { _greet }) - } -} - -struct HeaderRelay { - client_crab: CrabClient, - client_parachain: CrabParachainClient, - subquery_crab: Subquery, -} - -impl HeaderRelay { - async fn new() -> color_eyre::Result { - let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; - - let config_crab = bridge_config.crab; - let config_parachain = bridge_config.crab_parachain; - - let client_crab = - CrabClientComponent::component(config_crab.to_crab_client_config()?).await?; - let client_parachain = CrabParachainClientComponent::component( - config_parachain.to_crab_parachain_client_config()?, - ) - .await?; - - let config_index = bridge_config.index; - let subquery_crab = - SubqueryComponent::component(config_index.crab, BridgeName::CrabParachain); - Ok(Self { - client_crab, - client_parachain, - subquery_crab, - }) - } -} - -async fn start() -> color_eyre::Result<()> { - tracing::info!( - target: "crab-crabparachain", - "[header-crab-to-parachain] SERVICE RESTARTING..." - ); - let mut header_relay = HeaderRelay::new().await?; - loop { - match run(&header_relay).await { - Ok(_) => {} - Err(err) => { + let _greet = Self::try_task("crab-to-crabparachain-header-relay-service", async move { + while let Err(e) = start().await { tracing::error!( target: "crab-crabparachain", - "[header-crab-to-parachain] Failed to relay header: {:?}", - err + "[header-relay] [crab-to-crabparachain] An error occurred for header relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "crab-crabparachain", + "[header-relay] [crab-to-crabparachain] Try to restart header relay service.", ); - header_relay = HeaderRelay::new().await?; } - } - tokio::time::sleep(std::time::Duration::from_secs(5)).await; + Ok(()) + }); + Ok(Self { _greet }) } } -async fn run(header_relay: &HeaderRelay) -> color_eyre::Result<()> { - let last_relayed_crab_hash_in_parachain = header_relay - .client_parachain - .runtime() - .storage() - .bridge_crab_grandpa() - .best_finalized(None) - .await?; - let last_relayed_crab_block_in_parachain = header_relay - .client_crab - .subxt() - .rpc() - .block(Some(last_relayed_crab_hash_in_parachain)) - .await? - .ok_or_else(|| { - BridgerError::Custom(format!( - "Failed to query block by [{}] in crab", - last_relayed_crab_hash_in_parachain - )) - })?; - let block_number = last_relayed_crab_block_in_parachain.block.header.number; - tracing::trace!( +async fn start() -> color_eyre::Result<()> { + tracing::info!( target: "crab-crabparachain", - "[header-crab-to-parachain] The latest relayed crab block is: {:?}", - block_number + "[header-crab-to-crabparachain] [crab-to-crabparachain] SERVICE RESTARTING..." ); + let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; + let relay_config = bridge_config.relay; - if try_to_relay_mandatory(header_relay, block_number) - .await? - .is_none() - { - try_to_relay_header_on_demand(header_relay, block_number).await?; - } - - Ok(()) -} - -/// Try to relay mandatory headers, return Ok(Some(block_number)) if success, else Ok(None) -async fn try_to_relay_mandatory( - header_relay: &HeaderRelay, - last_block_number: u32, -) -> color_eyre::Result> { - let next_mandatory_block = header_relay - .subquery_crab - .next_mandatory_header(last_block_number) - .await?; - if let Some(block_to_relay) = next_mandatory_block { - tracing::info!( - target: "crab-crabparachain", - "[header-crab-to-parachain] Next mandatory block: {:?} ", - &block_to_relay.block_number - ); - let justification = header_relay - .subquery_crab - .find_justification(block_to_relay.block_hash.clone(), true) - .await?; - submit_finality( - header_relay, - block_to_relay.block_hash, - justification.unwrap().justification, - ) + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_crab_parachain = bridge_config + .crab_parachain + .to_crab_parachain_client() .await?; - Ok(Some(block_to_relay.block_number)) - } else { - tracing::info!( - target: "crab-crabparachain", - "[header-crab-to-parachain] Next mandatory block not found", - ); - Ok(None) - } -} - -async fn try_to_relay_header_on_demand( - header_relay: &HeaderRelay, - last_block_number: u32, -) -> color_eyre::Result<()> { - let next_header = header_relay - .subquery_crab - .next_needed_header(OriginType::BridgeCrabParachain) - .await? - .filter(|header| header.block_number > last_block_number); + let config_index = bridge_config.index; + let subquery_crab = config_index.to_crab_subquery(); + let lanes = relay_config.raw_lanes(); - if next_header.is_none() { - return Ok(()); - } - - let crab_justification_queue = CRAB_JUSTIFICATIONS.lock().await; - if let Some(justification) = crab_justification_queue.back().cloned() { - let grandpa_justification = - GrandpaJustification::>::decode(&mut justification.as_ref()) - .map_err(|err| { - BridgerError::Custom(format!("Failed to decode justification of crab: {:?}", err)) - })?; - if grandpa_justification.commit.target_number > last_block_number { - submit_finality( - header_relay, - format!("{:#x}", grandpa_justification.commit.target_hash), - justification.to_vec(), - ) - .await?; - } - } - - Ok(()) -} - -async fn submit_finality( - header_relay: &HeaderRelay, - block_hash: impl AsRef, - justification: Vec, -) -> color_eyre::Result<()> { - let header = header_relay - .client_crab - .subxt() - .rpc() - .header(Some(sp_core::H256::from_str(block_hash.as_ref()).unwrap())) - .await? - .unwrap(); - let finality_target = FinalityTarget { - parent_hash: header.parent_hash, - number: header.number, - state_root: header.state_root, - extrinsics_root: header.extrinsics_root, - digest: Decode::decode(&mut header.digest.encode().as_slice())?, - __subxt_unused_type_params: Default::default(), + let input = SolochainHeaderInput { + lanes, + client_source: client_crab, + client_target: client_crab_parachain, + subquery_source: subquery_crab, + index_origin_type: OriginType::BridgeCrabParachain, }; - let grandpa_justification = codec::Decode::decode(&mut justification.as_slice())?; - let runtime = header_relay.client_parachain.runtime(); - let track = runtime - .tx() - .bridge_crab_grandpa() - .submit_finality_proof(finality_target, grandpa_justification) - .sign_and_submit_then_watch(header_relay.client_parachain.account().signer()) - .await?; - - let events = track.wait_for_finalized_success().await?; - tracing::info!( - target: "crab-crabparachain", - "[header-crab-to-parachain] The extrinsic hash: {:?}", - events.extrinsic_hash() - ); - Ok(()) + let runner = SolochainHeaderRunner::new(input); + Ok(runner.start().await?) } diff --git a/bridges/crab-crabparachain/bridge/src/service/header/kusama_to_crab.rs b/bridges/crab-crabparachain/bridge/src/service/header/kusama_to_crab.rs index c208b14d6..6148028ea 100644 --- a/bridges/crab-crabparachain/bridge/src/service/header/kusama_to_crab.rs +++ b/bridges/crab-crabparachain/bridge/src/service/header/kusama_to_crab.rs @@ -1,24 +1,12 @@ -use client_crab::client::CrabClient; -use client_crab::component::CrabClientComponent; -use client_crab::types::runtime_types::bp_header_chain::justification::GrandpaJustification; -use client_crab::types::runtime_types::sp_runtime::generic::header::Header as FinalityTarget; -use client_kusama::client::KusamaClient; -use client_kusama::component::KusamaClientComponent; -use client_kusama::types::runtime_types::sp_runtime::generic::header::Header; -use client_kusama::types::runtime_types::sp_runtime::traits::BlakeTwo256; use lifeline::{Lifeline, Service, Task}; -use std::str::FromStr; +use subquery_s2s::types::OriginType; + +use relay_s2s::header::RelaychainHeaderRunner; +use relay_s2s::types::RelaychainHeaderInput; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; use support_lifeline::service::BridgeService; -use codec::{Decode, Encode}; - -use subquery_s2s::types::{BridgeName, OriginType}; -use subquery_s2s::{Subquery, SubqueryComponent}; - -use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; -use crate::service::subscribe::KUSAMA_JUSTIFICATIONS; +use crate::bridge::{BridgeBus, BridgeConfig}; #[derive(Debug)] pub struct KusamaToCrabHeaderRelayService { @@ -32,265 +20,48 @@ impl Service for KusamaToCrabHeaderRelayService { type Lifeline = color_eyre::Result; fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task( - &format!("{}-kusama-crab-header-relay", BridgeTask::name()), - async move { - while let Err(e) = start().await { - tracing::error!( - target: "crab-crabparachain", - "Failed to start kusama-to-crab header relay service, restart after some seconds: {:?}", - e, - ); - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } - Ok(()) - }, - ); - Ok(Self { _greet }) - } -} - -struct HeaderRelay { - client_crab: CrabClient, - client_kusama: KusamaClient, - subquery_kusama: Subquery, - subquery_crab_parachain: Subquery, - subquery_parachain_kusama: subquery_parachain::Subquery, -} - -impl HeaderRelay { - async fn new() -> color_eyre::Result { - let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; - - let config_crab = bridge_config.crab; - let config_kusama = bridge_config.kusama; - - let client_crab = - CrabClientComponent::component(config_crab.to_crab_client_config()?).await?; - let client_kusama = - KusamaClientComponent::component(config_kusama.to_kusama_client_config()?).await?; - - let config_index = bridge_config.index; - let subquery_kusama = - SubqueryComponent::component(config_index.kusama, BridgeName::CrabParachain); - let subquery_crab_parachain = - SubqueryComponent::component(config_index.crab_parachain, BridgeName::CrabParachain); - let subquery_parachain_kusama = subquery_parachain::SubqueryComponent::component( - config_index.parachain_kusama, - subquery_parachain::types::BridgeName::CrabParachain, - ); - - Ok(Self { - client_crab, - client_kusama, - subquery_kusama, - subquery_crab_parachain, - subquery_parachain_kusama, - }) - } -} - -async fn start() -> color_eyre::Result<()> { - tracing::info!( - target: "crab-crabparachain", - "[header-kusama-to-crab] SERVICE RESTARTING..." - ); - let mut header_relay = HeaderRelay::new().await?; - loop { - match run(&header_relay).await { - Ok(_) => {} - Err(err) => { + let _greet = Self::try_task("kusama-to-crab-header-relay-service", async move { + while let Err(e) = start().await { tracing::error!( target: "crab-crabparachain", - "[header-kusama-to-crab] Failed to relay header: {:?}", - err + "[header-relay] [kusama-to-crab] An error occurred for header relay {:?}", + e, ); - header_relay = HeaderRelay::new().await?; - } - } - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } -} - -async fn run(header_relay: &HeaderRelay) -> color_eyre::Result<()> { - let last_relayed_kusama_hash_in_crab = header_relay - .client_crab - .runtime() - .storage() - .bridge_kusama_grandpa() - .best_finalized(None) - .await?; - tracing::debug!( - target: "crab-crabparachain", - "[header-relay-kusama-to-crab] Get last relayed kusama block hash: {:?}", - &last_relayed_kusama_hash_in_crab - ); - - let last_relayed_kusama_block_in_crab = header_relay - .client_kusama - .subxt() - .rpc() - .block(Some(last_relayed_kusama_hash_in_crab)) - .await? - .ok_or_else(|| { - BridgerError::Custom(format!( - "Failed to query block by [{}] in kusama", - last_relayed_kusama_hash_in_crab - )) - })?; - - let block_number = last_relayed_kusama_block_in_crab.block.header.number; - tracing::info!( - target: "crab-crabparachain", - "[header-relay-kusama-to-crab] Get last relayed kusama block number: {:?}", - block_number - ); - if try_to_relay_mandatory(header_relay, block_number) - .await? - .is_none() - { - try_to_relay_header_on_demand(header_relay, block_number).await?; - } - - Ok(()) -} - -/// Try to relay mandatory headers, return Ok(Some(block_number)) if success, else Ok(None) -async fn try_to_relay_mandatory( - header_relay: &HeaderRelay, - last_block_number: u32, -) -> color_eyre::Result> { - let next_mandatory_block = header_relay - .subquery_kusama - .next_mandatory_header(last_block_number) - .await?; - - if let Some(block_to_relay) = next_mandatory_block { - tracing::info!( - target: "crab-crabparachain", - "[header-relay-kusama-to-crab] Next mandatory block: {:?}", - &block_to_relay.block_number, - ); - let justification = header_relay - .subquery_kusama - .find_justification(block_to_relay.block_hash.clone(), true) - .await?; - submit_finality( - header_relay, - block_to_relay.block_hash, - justification.unwrap().justification, - ) - .await?; - - Ok(Some(block_to_relay.block_number)) - } else { - tracing::info!( - target: "crab-crabparachain", - "[header-relay-kusama-to-crab] Next mandatory block not found", - ); - Ok(None) - } -} - -async fn try_to_relay_header_on_demand( - header_relay: &HeaderRelay, - last_block_number: u32, -) -> color_eyre::Result<()> { - let next_para_header = header_relay - .subquery_crab_parachain - .next_needed_header(OriginType::BridgeCrab) - .await?; - - if next_para_header.is_none() { - return Ok(()); - } - - if let Some(next_para_header) = next_para_header { - let next_header = header_relay - .subquery_parachain_kusama - .get_block_with_para_head(next_para_header.block_hash) - .await? - .filter(|header| { - tracing::debug!( + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( target: "crab-crabparachain", - "[header-relay-kusama-to-crab] Get related realy chain header: {:?}", - header.included_relay_block + "[header-relay] [kusama-to-crab] Try to restart header relay service.", ); - header.included_relay_block > last_block_number - }); - - if next_header.is_none() { - tracing::debug!( - target: "crab-crabparachain", - "[header-relay-kusama-to-crab] Para head has not been finalized" - ); - return Ok(()); - } - - let crab_justification_queue = KUSAMA_JUSTIFICATIONS.lock().await; - if let Some(justification) = crab_justification_queue.back().cloned() { - let grandpa_justification = GrandpaJustification::>::decode( - &mut justification.as_ref(), - ) - .map_err(|err| { - BridgerError::Custom(format!( - "Failed to decode justification of kusama: {:?}", - err - )) - })?; - tracing::debug!( - target: "crab-crabparachain", - "[header-relay-kusama-to-crab] Test justification: {:?}", - grandpa_justification.commit.target_number - ); - if grandpa_justification.commit.target_number > last_block_number { - submit_finality( - header_relay, - format!("{:#x}", grandpa_justification.commit.target_hash), - justification.to_vec(), - ) - .await?; } - } + Ok(()) + }); + Ok(Self { _greet }) } - - Ok(()) } -async fn submit_finality( - header_relay: &HeaderRelay, - block_hash: impl AsRef, - justification: Vec, -) -> color_eyre::Result<()> { - let header = header_relay - .client_kusama - .subxt() - .rpc() - .header(Some(sp_core::H256::from_str(block_hash.as_ref()).unwrap())) - .await? - .unwrap(); - let finality_target = FinalityTarget { - parent_hash: header.parent_hash, - number: header.number, - state_root: header.state_root, - extrinsics_root: header.extrinsics_root, - digest: Decode::decode(&mut header.digest.encode().as_slice())?, - __subxt_unused_type_params: Default::default(), - }; - let grandpa_justification = codec::Decode::decode(&mut justification.as_slice())?; - let runtime = header_relay.client_crab.runtime(); - let track = runtime - .tx() - .bridge_kusama_grandpa() - .submit_finality_proof(finality_target, grandpa_justification) - .sign_and_submit_then_watch(header_relay.client_crab.account().signer()) - .await?; - - let events = track.wait_for_finalized_success().await?; +async fn start() -> color_eyre::Result<()> { tracing::info!( target: "crab-crabparachain", - "[header-kusama-to-crab] The extrinsic hash: {:?}", - events.extrinsic_hash() + "[header-kusama-to-crab] [kusama-to-crab] SERVICE RESTARTING..." ); - Ok(()) + let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; + + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_kusama = bridge_config.kusama.to_kusama_client().await?; + + let config_index = bridge_config.index; + let subquery_kusama = config_index.to_kusama_subquery(); + let subquery_crab_parachain = config_index.to_crab_parachain_subquery(); + let subquery_candidate = config_index.to_candidate_subquery(); + + let input = RelaychainHeaderInput { + client_relaychain: client_kusama, + client_solochain: client_crab, + subquery_relaychain: subquery_kusama, + subquery_parachain: subquery_crab_parachain, + index_origin_type: OriginType::BridgeCrab, + subquery_candidate, + }; + let runner = RelaychainHeaderRunner::new(input); + Ok(runner.start().await?) } diff --git a/bridges/crab-crabparachain/bridge/src/service/header/para_head_to_crab.rs b/bridges/crab-crabparachain/bridge/src/service/header/para_head_to_crab.rs index 2268c46fa..772b9d187 100644 --- a/bridges/crab-crabparachain/bridge/src/service/header/para_head_to_crab.rs +++ b/bridges/crab-crabparachain/bridge/src/service/header/para_head_to_crab.rs @@ -1,237 +1,59 @@ -use client_crab::client::CrabClient; -use client_crab::component::CrabClientComponent; -use client_crab::types::runtime_types::{self as crab_runtime_types}; -use client_kusama::client::KusamaClient; -use client_kusama::component::KusamaClientComponent; -use client_kusama::types::runtime_types as kusama_runtime_types; use lifeline::{Lifeline, Service, Task}; -use sp_runtime::traits::Hash; + +use relay_s2s::header::ParaHeaderRunner; +use relay_s2s::types::ParaHeaderInput; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; use support_lifeline::service::BridgeService; -use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; +use crate::bridge::{BridgeBus, BridgeConfig}; #[derive(Debug)] -pub struct KusamaToCrabParaHeaderRelayService { +pub struct ParaHeadRelayService { _greet: Lifeline, } -impl BridgeService for KusamaToCrabParaHeaderRelayService {} +impl BridgeService for ParaHeadRelayService {} -impl Service for KusamaToCrabParaHeaderRelayService { +impl Service for ParaHeadRelayService { type Bus = BridgeBus; type Lifeline = color_eyre::Result; fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task( - &format!("{}-kusama-crab-header-relay", BridgeTask::name()), - async move { - while let Err(e) = start().await { - tracing::error!( - target: "crab-crabparachain", - "Failed to start para-head-to-crab header relay service, restart after some seconds: {:?}", - e, - ); - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } - Ok(()) - }, - ); - Ok(Self { _greet }) - } -} - -struct HeaderRelay { - client_crab: CrabClient, - client_kusama: KusamaClient, - para_id: u32, -} - -impl HeaderRelay { - async fn new() -> color_eyre::Result { - let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; - - let config_crab = bridge_config.crab; - let config_kusama = bridge_config.kusama; - - let client_crab = - CrabClientComponent::component(config_crab.to_crab_client_config()?).await?; - let client_kusama = - KusamaClientComponent::component(config_kusama.to_kusama_client_config()?).await?; - - Ok(Self { - client_crab, - client_kusama, - para_id: bridge_config - .crab_parachain - .para_id - .expect("ParaId not found"), - }) - } -} - -async fn start() -> color_eyre::Result<()> { - tracing::info!( - target: "crab-crabparachain", - "[para-header-kusama-to-crab] SERVICE RESTARTING..." - ); - let mut header_relay = HeaderRelay::new().await?; - loop { - match run(&header_relay).await { - Ok(_) => {} - Err(err) => { + let _greet = Self::try_task("para-head-relay-service", async move { + while let Err(e) = start().await { tracing::error!( target: "crab-crabparachain", - "[para-header-kusama-to-crab] Failed to relay header: {:?}", - err + "[header-relay] [para-head-to-crab] An error occurred for header relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "crab-crabparachain", + "[header-relay] [para-head-to-crab] Try to restart header relay service.", ); - header_relay = HeaderRelay::new().await?; } - } - tokio::time::sleep(std::time::Duration::from_secs(5)).await; + Ok(()) + }); + Ok(Self { _greet }) } } -async fn run(header_relay: &HeaderRelay) -> color_eyre::Result<()> { - let best_target_header = header_relay - .client_crab - .subxt() - .rpc() - .header(None) - .await? - .ok_or_else(|| BridgerError::Custom(String::from("Failed to get crab header")))?; - tracing::trace!( - target: "crab-crabparachain", - "[para-head-relay-kusama-to-crab] Current crab block: {:?}", - &best_target_header.number, - ); - - // TODO Hardcode ParaId - let para_head_at_target = header_relay - .client_crab - .runtime() - .storage() - .bridge_kusama_parachain() - .best_para_heads( - crab_runtime_types::bp_polkadot_core::parachains::ParaId(header_relay.para_id), - Some(best_target_header.hash()), - ) - .await?; - tracing::trace!( - target: "crab-crabparachain", - "[para-head-relay-kusama-to-crab] The latest para-head on crab: {:?}", - ¶_head_at_target, - ); - - let best_finalized_source_block_hash = header_relay - .client_crab - .runtime() - .storage() - .bridge_kusama_grandpa() - .best_finalized(Some(best_target_header.hash())) - .await?; - - let best_finalized_source_block_at_target = header_relay - .client_kusama - .subxt() - .rpc() - .block(Some(best_finalized_source_block_hash)) - .await? - .ok_or_else(|| BridgerError::Custom("Failed to get Kusama block".to_string()))?; - tracing::trace!( - target: "crab-crabparachain", - "[para-head-relay-kusama-to-crab] The latest kusama block on crab: {:?}", - &best_finalized_source_block_at_target.block.header.number, - ); - - // TODO Hardcode ParaId - let para_head_at_source = header_relay - .client_kusama - .runtime() - .storage() - .paras() - .heads( - kusama_runtime_types::polkadot_parachain::primitives::Id(header_relay.para_id), - Some(best_finalized_source_block_hash), - ) - .await?; - tracing::trace!( +async fn start() -> color_eyre::Result<()> { + tracing::info!( target: "crab-crabparachain", - "[para-head-relay-kusama-to-crab] The latest para-head on kusama {:?}", - &best_finalized_source_block_at_target.block.header.number, + "[header-para-head-to-crab] [para-head-to-crab] SERVICE RESTARTING..." ); + let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; + let config_relay = bridge_config.relay; - let need_relay = match (para_head_at_source, para_head_at_target) { - (Some(head_at_source), Some(head_at_target)) - if head_at_target.at_relay_block_number - < best_finalized_source_block_at_target.block.header.number - && head_at_target.head_hash - != sp_runtime::traits::BlakeTwo256::hash(head_at_source.0.as_slice()) => - { - true - } - (Some(_), None) => true, - (None, Some(_)) => true, + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_kusama = bridge_config.kusama.to_kusama_client().await?; - (None, None) => { - tracing::info!( - target: "crab-crabparachain", - "[para-head-relay-kusama-to-crab] Parachain is unknown to both clients" - ); - false - } - (Some(_), Some(_)) => { - tracing::info!( - target: "crab-crabparachain", - "[para-head-relay-kusama-to-crab] It doesn't need to relay" - ); - false - } + let input = ParaHeaderInput { + client_relaychain: client_kusama, + client_solochain: client_crab, + para_id: config_relay.para_id, }; - - if need_relay { - let heads_proofs = header_relay - .client_kusama - .subxt() - .rpc() - .read_proof( - vec![bp_parachains::parachain_head_storage_key_at_source( - "Paras", - header_relay.para_id.into(), - )], - Some(best_finalized_source_block_hash), - ) - .await?; - tracing::info!( - target: "crab-crabparachain", - "[para-head-relay-kusama-to-crab] Submitting parachain heads update transaction to crab", - ); - - let runtime = header_relay.client_crab.runtime(); - let track = runtime - .tx() - .bridge_kusama_parachain() - .submit_parachain_heads( - best_finalized_source_block_hash, - vec![crab_runtime_types::bp_polkadot_core::parachains::ParaId( - header_relay.para_id, - )], - heads_proofs - .proof - .into_iter() - .map(|bytes| bytes.0) - .collect(), - ) - .sign_and_submit_then_watch(header_relay.client_crab.account().signer()) - .await?; - let events = track.wait_for_finalized_success().await?; - tracing::info!( - target: "crab-crabparachain", - "[para-head-relay-kusama-to-crab] The tx hash {:?} emitted", - events.extrinsic_hash() - ); - } - - Ok(()) + let runner = ParaHeaderRunner::new(input); + Ok(runner.start().await?) } diff --git a/bridges/crab-crabparachain/bridge/src/service/message.rs b/bridges/crab-crabparachain/bridge/src/service/message.rs index 98b771c68..d7c1dae76 100644 --- a/bridges/crab-crabparachain/bridge/src/service/message.rs +++ b/bridges/crab-crabparachain/bridge/src/service/message.rs @@ -1,256 +1,2 @@ -use bp_darwinia_core::AccountId; -use bp_darwinia_core::AccountIdConverter; -use feemarket_s2s::relay::BasicRelayStrategy; -use futures::{FutureExt, TryFutureExt}; -use lifeline::{Lifeline, Service, Task}; -use relay_substrate_client::{AccountIdOf, Chain, Client, TransactionSignScheme}; -use relay_utils::metrics::MetricsParams; -use sp_core::Pair; -use substrate_relay_helper::messages_lane::MessagesRelayParams; -use substrate_relay_helper::TransactionParams; - -use relay_crab_client::CrabChain; -use relay_crab_parachain_client::CrabParachainChain; -use support_common::config::{Config, Names}; -use support_common::error::BridgerError; -use support_lifeline::service::BridgeService; - -use crate::bridge::BridgeTask; -use crate::bridge::{BridgeBus, BridgeConfig}; -use crate::bridge::{ChainInfoConfig, RelayConfig}; -use crate::chains::crab::CrabMessagesToCrabParachain; -use crate::chains::crab_parachain::CrabParachainMessagesToCrab; -use crate::feemarket::{CrabFeemarketApi, CrabParachainFeemarketApi}; -use crate::types::{MessagesPalletOwnerSigningParams, RelayHeadersAndMessagesInfo}; - -// /// Maximal allowed conversion rate error ratio (abs(real - stored) / stored) that we allow. -// /// -// /// If it is zero, then transaction will be submitted every time we see difference between -// /// stored and real conversion rates. If it is large enough (e.g. > than 10 percents, which is 0.1), -// /// then rational relayers may stop relaying messages because they were submitted using -// /// lesser conversion rate. -// const CONVERSION_RATE_ALLOWED_DIFFERENCE_RATIO: f64 = 0.05; - -#[derive(Debug)] -pub struct MessageRelayService { - _greet: Lifeline, -} - -impl BridgeService for MessageRelayService {} - -impl Service for MessageRelayService { - type Bus = BridgeBus; - type Lifeline = color_eyre::Result; - - fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task(&format!("{}-relay", BridgeTask::name()), async move { - if let Err(e) = start() { - tracing::error!(target: "crab-crabparachain", "{:?}", e); - return Err( - BridgerError::Custom("Failed to start relay service".to_string()).into(), - ); - } - Ok(()) - }); - Ok(Self { _greet }) - } -} - -fn start() -> color_eyre::Result<()> { - let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; - let config_crab: ChainInfoConfig = bridge_config.crab; - let config_crab_parachain: ChainInfoConfig = bridge_config.crab_parachain; - let config_relay: RelayConfig = bridge_config.relay; - - let (source_chain, target_chain) = ( - config_crab.to_chain_info_with_expect_signer(config_relay.signer_crab.clone())?, - config_crab_parachain - .to_chain_info_with_expect_signer(config_relay.signer_crab_parachain.clone())?, - ); - - let relay_info = RelayHeadersAndMessagesInfo { - source: source_chain, - target: target_chain, - lanes: config_relay.lanes.clone(), - prometheus_params: config_relay.prometheus_params.clone(), - create_relayers_fund_accounts: config_relay.create_relayers_fund_accounts, - only_mandatory_headers: config_relay.only_mandatory_headers, - crab_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams { - messages_pallet_owner: config_relay.crab_messages_pallet_owner.clone(), - messages_pallet_owner_password: config_relay - .crab_messages_pallet_owner_password - .clone(), - }, - crab_parachain_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams { - messages_pallet_owner: config_relay.crab_parachain_messages_pallet_owner.clone(), - messages_pallet_owner_password: config_relay - .crab_parachain_messages_pallet_owner_password, - }, - }; - - std::thread::spawn(move || futures::executor::block_on(bridge_relay(relay_info))) - .join() - .map_err(|_| BridgerError::Custom("Failed to join thread handle".to_string()))??; - - // bridge_relay(relay_info).await?; - Ok(()) -} - -async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> color_eyre::Result<()> { - let crab_chain = relay_info.source; - let crab_parachain_chain = relay_info.target; - - let crab_client = crab_chain.to_substrate_relay_chain::().await?; - let crab_parachain_client = crab_parachain_chain - .to_substrate_relay_chain::() - .await?; - - let crab_sign = crab_chain.to_keypair::()?; - let crab_parachain_sign = crab_parachain_chain.to_keypair::()?; - let crab_transactions_mortality = crab_chain.transactions_mortality()?; - let crab_parachain_transactions_mortality = crab_parachain_chain.transactions_mortality()?; - - let lanes = relay_info.lanes; - - let metrics_params: MetricsParams = relay_info.prometheus_params.clone().into(); - let metrics_params = relay_utils::relay_metrics(metrics_params).into_params(); - - // const METRIC_IS_SOME_PROOF: &str = "it is `None` when metric has been already registered; \ - // this is the command entrypoint, so nothing has been registered yet; \ - // qed"; - - if relay_info.create_relayers_fund_accounts { - let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< - AccountIdOf, - AccountIdConverter, - >(); - let relayers_fund_account_balance = crab_client - .free_native_balance(relayer_fund_acount_id.clone()) - .await; - if let Err(relay_substrate_client::Error::AccountDoesNotExist) = - relayers_fund_account_balance - { - tracing::info!(target: "bridge", "Going to create relayers fund account at {}.", CrabChain::NAME); - create_crab_account( - crab_client.clone(), - crab_sign.clone(), - relayer_fund_acount_id, - ) - .await?; - } - - let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< - AccountIdOf, - AccountIdConverter, - >(); - let relayers_fund_account_balance = crab_parachain_client - .free_native_balance(relayer_fund_acount_id.clone()) - .await; - if let Err(relay_substrate_client::Error::AccountDoesNotExist) = - relayers_fund_account_balance - { - tracing::info!(target: "bridge", "Going to create relayers fund account at {}.", CrabParachainChain::NAME); - create_crab_parachain_account( - crab_parachain_client.clone(), - crab_parachain_sign.clone(), - relayer_fund_acount_id, - ) - .await?; - } - } - - // Need 2x capacity since we consider both directions for each lane - let mut message_relays = Vec::with_capacity(lanes.len() * 2); - for lane in lanes { - let lane = lane.into(); - let crab_feemarket_api = - CrabFeemarketApi::new(crab_client.clone(), lane, crab_sign.clone()); - let crab_parachain_feemarket_api = CrabParachainFeemarketApi::new( - crab_parachain_client.clone(), - lane, - crab_parachain_sign.clone(), - ); - - let crab_to_crab_parachain_messages = substrate_relay_helper::messages_lane::run::< - CrabMessagesToCrabParachain, - >(MessagesRelayParams { - source_client: crab_client.clone(), - source_transaction_params: TransactionParams { - signer: crab_sign.clone(), - mortality: crab_transactions_mortality, - }, - target_client: crab_parachain_client.clone(), - target_transaction_params: TransactionParams { - signer: crab_parachain_sign.clone(), - mortality: crab_parachain_transactions_mortality, - }, - source_to_target_headers_relay: None, - target_to_source_headers_relay: None, - lane_id: lane, - metrics_params: metrics_params.clone().disable(), - standalone_metrics: None, - relay_strategy: BasicRelayStrategy::new( - crab_feemarket_api, - AccountId::from(crab_sign.public().0), - ), - }) - .map_err(|e| format!("{}", e)) - .boxed(); - - let crab_parachain_to_crab_messages = substrate_relay_helper::messages_lane::run::< - CrabParachainMessagesToCrab, - >(MessagesRelayParams { - source_client: crab_parachain_client.clone(), - source_transaction_params: TransactionParams { - signer: crab_parachain_sign.clone(), - mortality: crab_parachain_transactions_mortality, - }, - target_client: crab_client.clone(), - target_transaction_params: TransactionParams { - signer: crab_sign.clone(), - mortality: crab_transactions_mortality, - }, - source_to_target_headers_relay: None, - target_to_source_headers_relay: None, - lane_id: lane, - metrics_params: metrics_params.clone().disable(), - standalone_metrics: None, - relay_strategy: BasicRelayStrategy::new( - crab_parachain_feemarket_api, - AccountId::from(crab_parachain_sign.public().0), - ), - }) - .map_err(|e| format!("{}", e)) - .boxed(); - - message_relays.push(crab_to_crab_parachain_messages); - message_relays.push(crab_parachain_to_crab_messages); - } - - relay_utils::relay_metrics(metrics_params) - .expose() - .await - .map_err(|e| BridgerError::Custom(format!("{:?}", e)))?; - - if let Err(e) = futures::future::select_all(message_relays).await.0 { - tracing::error!(target: "crab-crabparachain", "{:?}", e); - return Err(BridgerError::Custom("Failed to start relay".to_string()).into()); - } - Ok(()) -} - -async fn create_crab_account( - _left_client: Client, - _left_sign: ::AccountKeyPair, - _account_id: AccountIdOf, -) -> color_eyre::Result<()> { - Err(BridgerError::Custom("Account creation is not supported by this bridge".to_string()).into()) -} - -async fn create_crab_parachain_account( - _left_client: Client, - _left_sign: ::AccountKeyPair, - _account_id: AccountIdOf, -) -> color_eyre::Result<()> { - Err(BridgerError::Custom("Account creation is not supported by this bridge".to_string()).into()) -} +pub mod crab_to_crabparachain; +pub mod crabparachain_to_crab; diff --git a/bridges/crab-crabparachain/bridge/src/service/message/crab_to_crabparachain.rs b/bridges/crab-crabparachain/bridge/src/service/message/crab_to_crabparachain.rs new file mode 100644 index 000000000..2ed35bb8b --- /dev/null +++ b/bridges/crab-crabparachain/bridge/src/service/message/crab_to_crabparachain.rs @@ -0,0 +1,133 @@ +use client_crab::client::CrabClient; +use client_crab_parachain::client::CrabParachainClient; +use feemarket_s2s::relay::basic::BasicRelayStrategy; +use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::RelayBlockOrigin; + +use relay_s2s::message::{BridgeParachainReceivingRunner, BridgeSolochainDeliveryRunner}; +use relay_s2s::types::{MessageDeliveryInput, MessageReceivingInput}; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig}; + +#[derive(Debug)] +pub struct CrabToCrabParachainMessageRelayService { + _greet_delivery: Lifeline, + _greet_receiving: Lifeline, +} + +impl BridgeService for CrabToCrabParachainMessageRelayService {} + +impl Service for CrabToCrabParachainMessageRelayService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet_delivery = Self::try_task( + "crab-to-crabparachain-message-delivery-service", + async move { + while let Err(e) = start_delivery().await { + tracing::error!( + target: "crab-crabparachain", + "[message-relay] [crab-to-crabparachain] An error occurred for message delivery relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "crab-crabparachain", + "[message-relay] [crab-to-crabparachain] Try to restart message delivery relay service.", + ); + } + Ok(()) + }, + ); + let _greet_receiving = Self::try_task( + "crab-to-crabparachain-message-receiving-service", + async move { + while let Err(e) = start_receiving().await { + tracing::error!( + target: "crab-crabparachain", + "[message-relay] [crab-to-crabparachain] An error occurred for message receiving relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "crab-crabparachain", + "[message-relay] [crab-to-crabparachain] Try to restart message receiving relay service.", + ); + } + Ok(()) + }, + ); + Ok(Self { + _greet_delivery, + _greet_receiving, + }) + } +} + +async fn message_input( +) -> color_eyre::Result> { + let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; + let relay_config = bridge_config.relay; + + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_crab_parachain = bridge_config + .crab_parachain + .to_crab_parachain_client() + .await?; + + let config_index = bridge_config.index; + let subquery_crab = config_index.to_crab_subquery(); + let subquery_crab_parachain = config_index.to_crab_parachain_subquery(); + + let lanes = relay_config.raw_lanes(); + + let input = MessageReceivingInput { + lanes, + relayer_account: client_crab.account().account_id().clone(), + client_source: client_crab, + client_target: client_crab_parachain, + subquery_source: subquery_crab, + subquery_target: subquery_crab_parachain, + }; + Ok(input) +} + +async fn start_delivery() -> color_eyre::Result<()> { + tracing::info!( + target: "crab-crabparachain", + "[message-delivery] [delivery-crab-to-crabparachain] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let relay_strategy = BasicRelayStrategy::new( + input.client_source.clone(), + input.client_source.account().account_id().clone(), + ); + let input = MessageDeliveryInput { + lanes: input.lanes, + nonces_limit: 11, + relayer_account: input.relayer_account, + client_source: input.client_source, + client_target: input.client_target, + subquery_source: input.subquery_source, + subquery_target: input.subquery_target, + relay_block_origin: RelayBlockOrigin::BridgeCrabParachain, + relay_strategy, + }; + let runner = BridgeSolochainDeliveryRunner::new(input); + Ok(runner.start().await?) +} + +async fn start_receiving() -> color_eyre::Result<()> { + tracing::info!( + target: "crab-crabparachain", + "[message-receiving] [receiving-crab-to-crabparachain] SERVICE RESTARTING..." + ); + let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; + let relay_config = bridge_config.relay; + let input = message_input().await?; + let runner = BridgeParachainReceivingRunner::new(input, relay_config.para_id); + Ok(runner.start().await?) +} diff --git a/bridges/crab-crabparachain/bridge/src/service/message/crabparachain_to_crab.rs b/bridges/crab-crabparachain/bridge/src/service/message/crabparachain_to_crab.rs new file mode 100644 index 000000000..e5260578e --- /dev/null +++ b/bridges/crab-crabparachain/bridge/src/service/message/crabparachain_to_crab.rs @@ -0,0 +1,133 @@ +use client_crab::client::CrabClient; +use client_crab_parachain::client::CrabParachainClient; +use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::RelayBlockOrigin; + +use feemarket_s2s::relay::basic::BasicRelayStrategy; +use relay_s2s::message::{BridgeParachainDeliveryRunner, BridgeSolochainReceivingRunner}; +use relay_s2s::types::{MessageDeliveryInput, MessageReceivingInput}; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig}; + +#[derive(Debug)] +pub struct CrabParachainToCrabMessageRelayService { + _greet_delivery: Lifeline, + _greet_receiving: Lifeline, +} + +impl BridgeService for CrabParachainToCrabMessageRelayService {} + +impl Service for CrabParachainToCrabMessageRelayService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet_delivery = Self::try_task( + "crabparachain-to-crab-message-delivery-service", + async move { + while let Err(e) = start_delivery().await { + tracing::error!( + target: "crab-crabparachain", + "[message-relay] [crabparachain-to-crab] An error occurred for message delivery relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "crab-crabparachain", + "[message-relay] [crabparachain-to-crab] Try to restart message delivery relay service.", + ); + } + Ok(()) + }, + ); + let _greet_receiving = Self::try_task( + "crabparachain-to-crab-message-receiving-service", + async move { + while let Err(e) = start_receiving().await { + tracing::error!( + target: "crab-crabparachain", + "[message-relay] [crabparachain-to-crab] An error occurred for message receiving relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "crab-crabparachain", + "[message-relay] [crabparachain-to-crab] Try to restart message receiving relay service.", + ); + } + Ok(()) + }, + ); + Ok(Self { + _greet_delivery, + _greet_receiving, + }) + } +} + +async fn message_input( +) -> color_eyre::Result> { + let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; + let relay_config = bridge_config.relay; + + let client_crab_parachain = bridge_config + .crab_parachain + .to_crab_parachain_client() + .await?; + let client_crab = bridge_config.crab.to_crab_client().await?; + + let config_index = bridge_config.index; + let subquery_crab = config_index.to_crab_subquery(); + let subquery_crab_parachain = config_index.to_crab_parachain_subquery(); + + let lanes = relay_config.raw_lanes(); + + let input = MessageReceivingInput { + lanes, + relayer_account: client_crab_parachain.account().account_id().clone(), + client_source: client_crab_parachain, + client_target: client_crab, + subquery_source: subquery_crab_parachain, + subquery_target: subquery_crab, + }; + Ok(input) +} + +async fn start_delivery() -> color_eyre::Result<()> { + tracing::info!( + target: "crab-crabparachain", + "[message-delivery] [delivery-crabparachain-to-crab] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let relay_strategy = BasicRelayStrategy::new( + input.client_source.clone(), + input.client_source.account().account_id().clone(), + ); + let input = MessageDeliveryInput { + lanes: input.lanes, + nonces_limit: 11, + relayer_account: input.relayer_account, + client_source: input.client_source, + client_target: input.client_target, + subquery_source: input.subquery_source, + subquery_target: input.subquery_target, + relay_block_origin: RelayBlockOrigin::BridgeCrab, + relay_strategy, + }; + let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; + let relay_config = bridge_config.relay; + let runner = BridgeParachainDeliveryRunner::new(input, relay_config.para_id); + Ok(runner.start().await?) +} + +async fn start_receiving() -> color_eyre::Result<()> { + tracing::info!( + target: "crab-crabparachain", + "[message-receiving] [receiving-crabparachain-to-crab] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let runner = BridgeSolochainReceivingRunner::new(input); + Ok(runner.start().await?) +} diff --git a/bridges/crab-crabparachain/bridge/src/service/subscribe.rs b/bridges/crab-crabparachain/bridge/src/service/subscribe.rs index d2d969d61..a36719108 100644 --- a/bridges/crab-crabparachain/bridge/src/service/subscribe.rs +++ b/bridges/crab-crabparachain/bridge/src/service/subscribe.rs @@ -1,26 +1,12 @@ -use client_crab::{client::CrabClient, component::CrabClientComponent}; -use client_kusama::{client::KusamaClient, component::KusamaClientComponent}; use lifeline::{Lifeline, Service, Task}; -use once_cell::sync::Lazy; -use std::collections::VecDeque; -// use std::sync::Mutex; -use futures::lock::Mutex; -// use subxt::rpc::Subscription; + +use relay_s2s::subscribe::SubscribeJustification; +use relay_s2s::types::JustificationInput; use support_common::config::{Config, Names}; use support_lifeline::service::BridgeService; use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; -pub static CRAB_JUSTIFICATIONS: Lazy>> = Lazy::new(|| { - let d = VecDeque::with_capacity(100); - Mutex::new(d) -}); - -pub static KUSAMA_JUSTIFICATIONS: Lazy>> = Lazy::new(|| { - let d = VecDeque::with_capacity(100); - Mutex::new(d) -}); - #[derive(Debug)] pub struct SubscribeService { _greet: Lifeline, @@ -34,12 +20,10 @@ impl Service for SubscribeService { fn spawn(_bus: &Self::Bus) -> Self::Lifeline { let _greet = Self::try_task(&format!("{}-relay", BridgeTask::name()), async move { - let mut execution = start().await; - while let Err(e) = execution { - tracing::error!(target: "crab-crabparachain", "{:?}", e); + while let Err(e) = start().await { + tracing::error!(target: "crab-crabparachain", "[subscribe] Failed to start subscribe {:?}", e); tokio::time::sleep(std::time::Duration::from_secs(5)).await; - tracing::info!(target: "crab-crabparachain", "Try to restart subscribtion service."); - execution = start().await; + tracing::info!(target: "crab-crabparachain", "[subscribe] Try to restart subscription service."); } Ok(()) }); @@ -49,61 +33,15 @@ impl Service for SubscribeService { async fn start() -> color_eyre::Result<()> { let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; - let config_crab = bridge_config.crab; - - let client_crab = CrabClientComponent::component(config_crab.to_crab_client_config()?).await?; - let client_kusama = - KusamaClientComponent::component(bridge_config.kusama.to_kusama_client_config()?).await?; - - let crab_handle = tokio::spawn(run_until_crab_connection_lost(client_crab)); - let kusama_handle = tokio::spawn(run_until_kusama_connection_lost(client_kusama)); - let (_result_p, _result_r) = (crab_handle.await, kusama_handle.await); - Ok(()) -} -async fn run_until_crab_connection_lost(mut client: CrabClient) -> color_eyre::Result<()> { - while let Err(err) = subscribe_crab(&client).await { - tracing::error!(target: "crab-crabparachain", "Failed to get justification from crab: {:?}", err); - let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; - let client_crab = - CrabClientComponent::component(bridge_config.crab.to_crab_client_config()?).await?; - client = client_crab; - } - Ok(()) -} + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_kusama = bridge_config.kusama.to_kusama_client().await?; -async fn run_until_kusama_connection_lost(mut client: KusamaClient) -> color_eyre::Result<()> { - while let Err(err) = subscribe_kusama(&client).await { - tracing::error!(target: "crab-crabparachain", "Failed to get justification from kusama: {:?}", err); - let bridge_config: BridgeConfig = Config::restore(Names::BridgeCrabCrabParachain)?; - let client_kusama = - KusamaClientComponent::component(bridge_config.kusama.to_kusama_client_config()?) - .await?; - client = client_kusama; - } - Ok(()) -} - -async fn subscribe_crab(client: &CrabClient) -> color_eyre::Result<()> { - let mut subscribe = client.subscribe_grandpa_justifications().await?; - while let Some(justification) = subscribe.next().await { - let mut data = CRAB_JUSTIFICATIONS.lock().await; - data.push_back(justification.unwrap()); - if data.len() >= 100 { - data.pop_front(); - } - } - Ok(()) -} - -async fn subscribe_kusama(client: &KusamaClient) -> color_eyre::Result<()> { - let mut subscribe = client.subscribe_grandpa_justifications().await?; - while let Some(justification) = subscribe.next().await { - let mut data = KUSAMA_JUSTIFICATIONS.lock().await; - data.push_back(justification.unwrap()); - if data.len() >= 100 { - data.pop_front(); - } - } + let input = JustificationInput { + client_source: client_crab, + client_target: client_kusama, + }; + let subscribe = SubscribeJustification::new(input); + subscribe.start().await?; Ok(()) } diff --git a/bridges/crab-crabparachain/bridge/src/traits.rs b/bridges/crab-crabparachain/bridge/src/traits.rs deleted file mode 100644 index 15543d204..000000000 --- a/bridges/crab-crabparachain/bridge/src/traits.rs +++ /dev/null @@ -1,12 +0,0 @@ -/// Bridge-supported network definition. -/// -/// Used to abstract away CLI commands. -pub trait CliChain: relay_substrate_client::Chain { - /// Chain's current version of the runtime. - const RUNTIME_VERSION: sp_version::RuntimeVersion; - - /// Crypto keypair type used to send messages. - /// - /// In case of chains supporting multiple cryptos, pick one used by the CLI. - type KeyPair: sp_core::crypto::Pair; -} diff --git a/bridges/crab-crabparachain/bridge/src/types.rs b/bridges/crab-crabparachain/bridge/src/types.rs index 3e0a99b50..27b6f5503 100644 --- a/bridges/crab-crabparachain/bridge/src/types.rs +++ b/bridges/crab-crabparachain/bridge/src/types.rs @@ -1,16 +1,10 @@ use std::fmt::{Display, Formatter}; use std::str::FromStr; -use bp_messages::LaneId; -use relay_substrate_client::ChainRuntimeVersion; use serde::{Deserialize, Deserializer, Serialize, Serializer}; -use sp_core::crypto::Pair; use support_common::error::BridgerError; -use crate::bridge::RuntimeVersionMode; -use crate::traits::CliChain; - #[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, strum::EnumString)] #[strum(serialize_all = "kebab_case")] pub enum BridgeName { @@ -18,117 +12,24 @@ pub enum BridgeName { CrabToCrabParachain, } -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct ChainInfo { - pub host: String, - pub port: u16, - pub signer: Option, - pub secure: bool, - pub signer_password: Option, - pub transactions_mortality: Option, - pub runtime_version_mode: Option, - pub spec_version: Option, - pub transaction_version: Option, -} - -impl ChainInfo { - /// Convert connection params into Substrate client. - pub async fn to_substrate_relay_chain( - &self, - ) -> color_eyre::Result> { - let chain_runtime_version = match self.runtime_version_mode { - Some(RuntimeVersionMode::Auto) => ChainRuntimeVersion::Auto, - Some(RuntimeVersionMode::Custom) => { - let spec_version = self - .spec_version - .ok_or_else(|| BridgerError::Custom("Miss spec_version config".to_string()))?; - let transaction_version = self.transaction_version.ok_or_else(|| { - BridgerError::Custom("Miss transaction_version config".to_string()) - })?; - ChainRuntimeVersion::Custom(spec_version, transaction_version) - } - Some(RuntimeVersionMode::Bundle) | None => ChainRuntimeVersion::Custom( - C::RUNTIME_VERSION.spec_version, - C::RUNTIME_VERSION.transaction_version, - ), - }; - Ok( - relay_substrate_client::Client::new(relay_substrate_client::ConnectionParams { - host: self.host.clone(), - port: self.port, - secure: self.secure, - chain_runtime_version, - }) - .await, - ) - } - - /// Parse signing params into chain-specific KeyPair. - pub fn to_keypair(&self) -> color_eyre::Result { - let signer = match self.signer.clone() { - Some(v) => v, - None => { - return Err(BridgerError::Custom(format!( - "The chain [{}:{}] not set signer", - self.host, self.port, - )) - .into()); - } - }; - C::KeyPair::from_string(&signer, self.signer_password.as_deref()) - .map_err(|e| BridgerError::Custom(format!("Secret string error: {:?}", e)).into()) - } - - pub fn transactions_mortality(&self) -> color_eyre::Result> { - self.transactions_mortality - .map(|transactions_mortality| { - if !(4..=65536).contains(&transactions_mortality) - || !transactions_mortality.is_power_of_two() - { - Err(BridgerError::Custom(format!( - "Transactions mortality {} is not a power of two in a [4; 65536] range", - transactions_mortality, - )) - .into()) - } else { - Ok(transactions_mortality) - } - }) - .transpose() - } -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct InitBridge { - pub bridge: BridgeName, - pub source: ChainInfo, - pub target: ChainInfo, -} - #[derive(Debug, Clone, PartialEq, Eq, Default)] -pub struct HexLaneId(pub LaneId); - -impl From for LaneId { - fn from(lane_id: HexLaneId) -> LaneId { - lane_id.0 - } -} +pub struct HexLaneId(pub [u8; 4]); -impl std::str::FromStr for HexLaneId { - type Err = hex::FromHexError; +impl FromStr for HexLaneId { + type Err = BridgerError; fn from_str(s: &str) -> Result { - let mut lane_id = LaneId::default(); - hex::decode_to_slice(s, &mut lane_id)?; - Ok(HexLaneId(lane_id)) + let hex = array_bytes::hex2array(s) + .map_err(|e| BridgerError::Hex(format!("Failed to parse lane id: {:?}", e)))?; + Ok(HexLaneId(hex)) } } impl Display for HexLaneId { fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { let lane_id = self.0; - let hex_text = hex::encode(lane_id); - f.write_str(&hex_text[..]) + let hex = array_bytes::bytes2hex("0x", lane_id.as_ref()); + f.write_str(&hex[..]) } } @@ -152,66 +53,3 @@ impl Serialize for HexLaneId { serializer.serialize_str(&hex_text[..]) } } - -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -pub struct PrometheusParamsInfo { - /// Do not expose a Prometheus metric endpoint. - pub no_prometheus: bool, - /// Expose Prometheus endpoint at given interface. - #[serde(skip_serializing_if = "String::is_empty")] - #[serde(default)] - pub prometheus_host: String, - /// Expose Prometheus endpoint at given port. - pub prometheus_port: u16, -} - -impl From for relay_utils::metrics::MetricsParams { - fn from(cli_params: PrometheusParamsInfo) -> relay_utils::metrics::MetricsParams { - if !cli_params.no_prometheus { - Some(relay_utils::metrics::MetricsAddress { - host: cli_params.prometheus_host, - port: cli_params.prometheus_port, - }) - .into() - } else { - None.into() - } - } -} - -#[derive(Debug, Clone)] -pub struct RelayHeadersAndMessagesInfo { - pub source: ChainInfo, - pub target: ChainInfo, - - pub lanes: Vec, - pub prometheus_params: PrometheusParamsInfo, - pub create_relayers_fund_accounts: bool, - pub only_mandatory_headers: bool, - - pub crab_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams, - pub crab_parachain_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams, -} - -#[derive(Debug, Clone)] -pub struct MessagesPalletOwnerSigningParams { - pub messages_pallet_owner: Option, - pub messages_pallet_owner_password: Option, -} - -#[allow(dead_code)] -impl MessagesPalletOwnerSigningParams { - /// Parse signing params into chain-specific KeyPair. - pub fn to_keypair(&self) -> color_eyre::Result> { - let messages_pallet_owner = match self.messages_pallet_owner { - Some(ref messages_pallet_owner) => messages_pallet_owner, - None => return Ok(None), - }; - Chain::KeyPair::from_string( - messages_pallet_owner, - self.messages_pallet_owner_password.as_deref(), - ) - .map_err(|e| BridgerError::Custom(format!("Secret string error: {:?}", e)).into()) - .map(Some) - } -} diff --git a/bridges/crab-crabparachain/rust-toolchain.toml b/bridges/crab-crabparachain/rust-toolchain.toml index 95cc0bdbe..7f5079439 100644 --- a/bridges/crab-crabparachain/rust-toolchain.toml +++ b/bridges/crab-crabparachain/rust-toolchain.toml @@ -1,5 +1,4 @@ [toolchain] -channel = "nightly-2022-05-12" +channel = "stable" components = ["cargo", "clippy", "rustc", "rustfmt", "rust-src"] profile = "minimal" -targets = ["wasm32-unknown-unknown"] diff --git a/bridges/darwinia-crab/Cargo.lock b/bridges/darwinia-crab/Cargo.lock index 3dea087fe..418e0af4e 100644 --- a/bridges/darwinia-crab/Cargo.lock +++ b/bridges/darwinia-crab/Cargo.lock @@ -27,41 +27,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - [[package]] name = "ahash" version = "0.7.6" @@ -106,6 +71,12 @@ dependencies = [ "num-traits 0.2.14", ] +[[package]] +name = "array-bytes" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30725d201df311b571b927e5a175a394e3763e11451c2e6415a84dc6e891fb6d" + [[package]] name = "array-init" version = "0.0.4" @@ -115,12 +86,6 @@ dependencies = [ "nodrop", ] -[[package]] -name = "array_tool" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f8cb5d814eb646a863c4f24978cff2880c4be96ad8cde2c0f0678732902e271" - [[package]] name = "arrayref" version = "0.3.6" @@ -148,166 +113,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" -[[package]] -name = "asn1_der" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" - -[[package]] -name = "async-attributes" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "async-channel" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-executor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "once_cell", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c290043c9a95b05d45e952fb6383c67bcb61471f60cfa21e890dba6654234f43" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-mutex", - "blocking", - "futures-lite", - "num_cpus", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" -dependencies = [ - "concurrent-queue", - "futures-lite", - "libc", - "log", - "once_cell", - "parking", - "polling", - "slab", - "socket2 0.4.4", - "waker-fn", - "winapi", -] - -[[package]] -name = "async-lock" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-mutex" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-process" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" -dependencies = [ - "async-io", - "blocking", - "cfg-if 1.0.0", - "event-listener", - "futures-lite", - "libc", - "once_cell", - "signal-hook", - "winapi", -] - -[[package]] -name = "async-std" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" -dependencies = [ - "async-attributes", - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "num_cpus", - "once_cell", - "pin-project-lite 0.2.8", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-std-resolver" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf3e776afdf3a2477ef4854b85ba0dff3bd85792f685fb3c68948b4d304e4f0" -dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "trust-dns-resolver", -] - -[[package]] -name = "async-task" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" - [[package]] name = "async-trait" version = "0.1.53" @@ -319,32 +124,6 @@ dependencies = [ "syn", ] -[[package]] -name = "asynchronous-codec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4401f0a3622dad2e0763fa79e0eb328bc70fb7dccfdd645341f00d671247d6" -dependencies = [ - "bytes 1.1.0", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite 0.2.8", -] - -[[package]] -name = "asynchronous-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" -dependencies = [ - "bytes 1.1.0", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite 0.2.8", -] - [[package]] name = "atomic" version = "0.5.1" @@ -354,12 +133,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "atomic-waker" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" - [[package]] name = "atty" version = "0.2.14" @@ -377,16 +150,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backoff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721c249ab59cbc483ad4294c9ee2671835c1e43e9ffc277e6b4ecfef733cfdc5" -dependencies = [ - "instant", - "rand 0.7.3", -] - [[package]] name = "backtrace" version = "0.3.64" @@ -395,24 +158,18 @@ checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", - "miniz_oxide 0.4.4", + "miniz_oxide", "object", "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" - [[package]] name = "base58" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" @@ -453,17 +210,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "blake2" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - [[package]] name = "blake2-rfc" version = "0.2.18" @@ -474,50 +220,13 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq", -] - -[[package]] -name = "blake2s_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq", -] - -[[package]] -name = "blake3" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "cc", - "cfg-if 0.1.10", - "constant_time_eq", - "crypto-mac 0.8.0", - "digest 0.9.0", -] - [[package]] name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -529,7 +238,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", "generic-array 0.14.5", ] @@ -542,30 +250,10 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "blocking" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" -dependencies = [ - "async-channel", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "once_cell", -] - [[package]] name = "bp-crab" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -580,7 +268,7 @@ dependencies = [ [[package]] name = "bp-darwinia" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -595,7 +283,7 @@ dependencies = [ [[package]] name = "bp-darwinia-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -611,7 +299,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "finality-grandpa", "frame-support", @@ -624,38 +312,23 @@ dependencies = [ "sp-std", ] -[[package]] -name = "bp-kusama" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-messages", - "bp-polkadot-core", - "bp-runtime", - "frame-support", - "smallvec 1.8.0", - "sp-api", - "sp-runtime", - "sp-std", - "sp-version", -] - [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-runtime", "frame-support", "parity-scale-codec", "scale-info", + "sp-runtime", "sp-std", ] [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-runtime", @@ -672,30 +345,27 @@ dependencies = [ [[package]] name = "bp-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-polkadot-core", "bp-runtime", "frame-support", "parity-scale-codec", "scale-info", - "serde 1.0.136", "sp-core", ] [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", "frame-support", "frame-system", "parity-scale-codec", - "parity-util-mem", "scale-info", - "serde 1.0.136", "sp-api", "sp-core", "sp-runtime", @@ -706,7 +376,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "frame-support", "hash-db", @@ -724,7 +394,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -740,44 +410,22 @@ dependencies = [ name = "bridge-darwinia-crab" version = "0.5.7" dependencies = [ - "async-trait", - "bp-crab", - "bp-darwinia", - "bp-darwinia-core", - "bp-header-chain", - "bp-messages", - "bp-runtime", - "bridge-runtime-common", + "array-bytes", + "bridge-s2s-traits", + "client-crab", + "client-darwinia", "color-eyre", - "colored", "feemarket-s2s", - "frame-support", - "futures 0.3.21", - "futures-timer", - "hex", "lifeline", - "messages-relay", - "pallet-bridge-messages", - "pallet-fee-market", - "parity-scale-codec", "postage", - "relay-crab-client", - "relay-darwinia-client", - "relay-substrate-client", - "relay-utils", + "relay-s2s", "serde 1.0.136", - "serde_json", - "sp-core", - "sp-finality-grandpa", - "sp-runtime", - "sp-trie", - "sp-version", "structopt", "strum", - "substrate-relay-helper", + "subquery-s2s", "support-common", "support-lifeline", - "support-terminal", + "support-toolkit", "tokio", "tracing", ] @@ -785,7 +433,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -808,19 +456,33 @@ dependencies = [ ] [[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bumpalo" -version = "3.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" - -[[package]] -name = "byte-slice-cast" +name = "bridge-s2s-traits" +version = "0.5.7" +dependencies = [ + "array-bytes", + "async-trait", + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", + "jsonrpsee-core", + "parity-scale-codec", + "scale-info", + "serde 1.0.136", + "sp-core", + "sp-runtime", + "subxt", + "thiserror", +] + +[[package]] +name = "bumpalo" +version = "3.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" + +[[package]] +name = "byte-slice-cast" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" @@ -837,44 +499,17 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" -[[package]] -name = "cache-padded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" - -[[package]] -name = "castaway" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" - [[package]] name = "cc" version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" -dependencies = [ - "jobserver", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" @@ -883,29 +518,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chacha20" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee7ad89dc1128635074c268ee661f90c3f7e83d9fd12910608c36b47d6c3412" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures 0.1.5", - "zeroize", -] - -[[package]] -name = "chacha20poly1305" -version = "0.8.0" +name = "chameleon" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580317203210c517b6d44794abfbe600698276db18127e37ad3e69bf5e848e5" -dependencies = [ - "aead", - "chacha20", - "cipher", - "poly1305", - "zeroize", -] +checksum = "12bd83544cd11113170ce1eee45383928f3f720bc8b305af18c2a3da3547e1ae" [[package]] name = "chrono" @@ -916,30 +532,10 @@ dependencies = [ "libc", "num-integer", "num-traits 0.2.14", - "time 0.1.44", + "time", "winapi", ] -[[package]] -name = "cid" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0e3bc0b6446b3f9663c1a6aba6ef06c5aeaa1bc92bd18077be337198ab9768" -dependencies = [ - "multibase", - "multihash 0.13.2", - "unsigned-varint 0.5.1", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.5", -] - [[package]] name = "clap" version = "2.34.0" @@ -949,19 +545,53 @@ dependencies = [ "ansi_term", "atty", "bitflags", - "strsim", + "strsim 0.8.0", "textwrap", "unicode-width", "vec_map", ] [[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +name = "client-crab" +version = "0.5.7" dependencies = [ - "bitflags", + "array-bytes", + "async-trait", + "bp-crab", + "bridge-s2s-traits", + "feemarket-s2s-traits", + "finality-grandpa", + "parity-scale-codec", + "serde 1.0.136", + "sp-core", + "sp-finality-grandpa", + "sp-runtime", + "subxt", + "support-toolkit", + "thiserror", + "tracing", +] + +[[package]] +name = "client-darwinia" +version = "0.5.7" +dependencies = [ + "array-bytes", + "async-trait", + "bp-darwinia", + "bridge-s2s-traits", + "feemarket-s2s-traits", + "finality-grandpa", + "parity-scale-codec", + "serde 1.0.136", + "serde_json", + "sp-core", + "sp-finality-grandpa", + "sp-runtime", + "subxt", + "support-toolkit", + "thiserror", + "tracing", ] [[package]] @@ -991,17 +621,6 @@ dependencies = [ "tracing-error", ] -[[package]] -name = "colored" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" -dependencies = [ - "atty", - "lazy_static", - "winapi", -] - [[package]] name = "component-subscan" version = "0.5.7" @@ -1015,15 +634,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "concurrent-queue" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" -dependencies = [ - "cache-padded", -] - [[package]] name = "config" version = "0.11.0" @@ -1040,12 +650,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1074,15 +678,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "cpufeatures" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" -dependencies = [ - "libc", -] - [[package]] name = "cpufeatures" version = "0.2.2" @@ -1092,57 +687,13 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" -dependencies = [ - "autocfg", - "cfg-if 1.0.0", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] - [[package]] name = "crossbeam-queue" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -1152,7 +703,7 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "lazy_static", ] @@ -1182,67 +733,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctor" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher", -] - -[[package]] -name = "cuckoofilter" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" -dependencies = [ - "byteorder", - "fnv", - "rand 0.7.3", -] - -[[package]] -name = "curl" -version = "0.4.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d855aeef205b43f65a5001e0997d81f8efca7badad4fad7d897aa7f0d0651f" -dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2 0.4.4", - "winapi", -] - -[[package]] -name = "curl-sys" -version = "0.4.53+curl-7.82.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8092905a5a9502c312f223b2775f57ec5c5b715f9a15ee9d2a8591d1364a0352" -dependencies = [ - "cc", - "libc", - "libnghttp2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "winapi", -] - [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -1270,28 +760,48 @@ dependencies = [ ] [[package]] -name = "data-encoding" -version = "2.3.2" +name = "darling" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core", + "darling_macro", +] [[package]] -name = "data-encoding-macro" -version = "0.1.12" +name = "darling_core" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ - "data-encoding", - "data-encoding-macro-internal", + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn", ] [[package]] -name = "data-encoding-macro-internal" -version = "0.1.10" +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core", + "quote", + "syn", +] + +[[package]] +name = "derivative" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "data-encoding", + "proc-macro2", + "quote", "syn", ] @@ -1304,7 +814,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn", ] @@ -1346,28 +856,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "dns-parser" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" -dependencies = [ - "byteorder", - "quick-error", -] - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "downcast-rs" version = "1.2.0" @@ -1436,110 +924,30 @@ version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] -name = "enum-as-inner" -version = "0.3.4" +name = "environmental" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" -dependencies = [ - "heck 0.4.0", - "proc-macro2", - "quote", - "syn", -] +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" [[package]] -name = "env_logger" -version = "0.7.1" +name = "eyre" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" dependencies = [ - "atty", - "humantime 1.3.0", - "log", - "regex", - "termcolor", + "indenter", + "once_cell", ] [[package]] -name = "env_logger" -version = "0.8.4" +name = "fake-simd" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime 2.1.0", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "environmental" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" - -[[package]] -name = "erased-serde" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" -dependencies = [ - "serde 1.0.136", -] - -[[package]] -name = "ethbloom" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-rlp", - "impl-serde", - "primitive-types", - "uint", -] - -[[package]] -name = "event-listener" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" - -[[package]] -name = "eyre" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fastrand" @@ -1555,21 +963,27 @@ name = "feemarket-s2s" version = "0.5.7" dependencies = [ "async-trait", - "bp-messages", + "bridge-s2s-traits", "component-subscan", - "frame-support", - "messages-relay", - "pallet-fee-market", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", + "feemarket-s2s-traits", "serde 1.0.136", - "sp-core", - "sp-runtime", + "support-toolkit", "thiserror", "tracing", ] +[[package]] +name = "feemarket-s2s-traits" +version = "0.5.7" +dependencies = [ + "async-trait", + "bp-runtime", + "pallet-fee-market", + "parity-scale-codec", + "subxt", + "thiserror", +] + [[package]] name = "finality-grandpa" version = "0.14.4" @@ -1577,7 +991,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" dependencies = [ "either", - "futures 0.3.21", + "futures", "futures-timer", "log", "num-traits 0.2.14", @@ -1586,21 +1000,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "finality-relay" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "async-std", - "async-trait", - "backoff", - "bp-header-chain", - "futures 0.3.21", - "log", - "num-traits 0.2.14", - "relay-utils", -] - [[package]] name = "fixed-hash" version = "0.7.0" @@ -1613,25 +1012,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - -[[package]] -name = "flate2" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" -dependencies = [ - "cfg-if 1.0.0", - "crc32fast", - "libc", - "libz-sys", - "miniz_oxide 0.5.1", -] - [[package]] name = "fnv" version = "1.0.7" @@ -1653,14 +1033,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "fork-tree" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", -] - [[package]] name = "form_urlencoded" version = "1.0.1" @@ -1668,13 +1040,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "frame-system", @@ -1697,7 +1069,7 @@ version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "parity-scale-codec", "scale-info", "serde 1.0.136", @@ -1706,7 +1078,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "bitflags", "frame-metadata", @@ -1733,7 +1105,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1745,7 +1117,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -1757,7 +1129,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -1767,7 +1139,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "log", @@ -1787,12 +1159,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.21" @@ -1842,21 +1208,6 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" -[[package]] -name = "futures-lite" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.8", - "waker-fn", -] - [[package]] name = "futures-macro" version = "0.3.21" @@ -1868,17 +1219,6 @@ dependencies = [ "syn", ] -[[package]] -name = "futures-rustls" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" -dependencies = [ - "futures-io", - "rustls 0.19.1", - "webpki 0.21.4", -] - [[package]] name = "futures-sink" version = "0.3.21" @@ -1903,7 +1243,6 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -1911,7 +1250,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.8", + "pin-project-lite", "pin-utils", "slab", ] @@ -1941,7 +1280,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -1954,21 +1293,11 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.10.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug 0.3.0", - "polyval", -] - [[package]] name = "gimli" version = "0.26.1" @@ -1976,15 +1305,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" [[package]] -name = "gloo-timers" -version = "0.2.4" +name = "gql_client" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" +checksum = "a2ad0b978ded703acd23762f99e0f701450c9d0066912c0d7f9bf65bf017d87d" dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", + "log", + "reqwest", + "serde 1.0.136", + "serde_json", ] [[package]] @@ -1993,7 +1322,7 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -2039,12 +1368,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - [[package]] name = "hermit-abi" version = "0.1.19" @@ -2060,12 +1383,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - [[package]] name = "hmac" version = "0.8.1" @@ -2097,26 +1414,15 @@ dependencies = [ "hmac 0.8.1", ] -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - [[package]] name = "http" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", - "itoa", + "itoa 1.0.1", ] [[package]] @@ -2125,9 +1431,9 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ - "bytes 1.1.0", + "bytes", "http", - "pin-project-lite 0.2.8", + "pin-project-lite", ] [[package]] @@ -2142,28 +1448,13 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -2172,9 +1463,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", - "pin-project-lite 0.2.8", - "socket2 0.4.4", + "itoa 1.0.1", + "pin-project-lite", + "socket2", "tokio", "tower-service", "tracing", @@ -2189,7 +1480,7 @@ checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ "http", "hyper", - "rustls 0.20.4", + "rustls", "tokio", "tokio-rustls", ] @@ -2200,7 +1491,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.1.0", + "bytes", "hyper", "native-tls", "tokio", @@ -2208,15 +1499,10 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.1.5" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" @@ -2229,43 +1515,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "if-addrs" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2273e421f7c4f0fc99e1934fe4776f59d8df2972f4199d703fc0da9f2a9f73de" -dependencies = [ - "if-addrs-sys", - "libc", - "winapi", -] - -[[package]] -name = "if-addrs-sys" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de74b9dd780476e837e5eb5ab7c88b49ed304126e412030a0adba99c8efe79ea" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "if-watch" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179" -dependencies = [ - "async-io", - "futures 0.3.21", - "futures-lite", - "if-addrs", - "ipnet", - "libc", - "log", - "winapi", -] - [[package]] name = "impl-codec" version = "0.5.1" @@ -2275,15 +1524,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - [[package]] name = "impl-serde" version = "0.3.2" @@ -2304,6 +1544,25 @@ dependencies = [ "syn", ] +[[package]] +name = "include_dir" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "482a2e29200b7eed25d7fdbd14423326760b7f6658d21a4cf12d55a50713c69f" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e074c19deab2501407c91ba1860fa3d6820bfde307db6d8cb851b55a10be89b" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indenter" version = "0.3.3" @@ -2326,7 +1585,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2338,24 +1597,6 @@ dependencies = [ "num-traits 0.2.14", ] -[[package]] -name = "ip_network" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" - -[[package]] -name = "ipconfig" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" -dependencies = [ - "socket2 0.3.19", - "widestring", - "winapi", - "winreg 0.6.2", -] - [[package]] name = "ipnet" version = "2.5.0" @@ -2363,40 +1604,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] -name = "isahc" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "437f8808009c031df3c1d532c8fd7e3d73239dfe522ebf0b94b5e34d5d01044b" -dependencies = [ - "async-channel", - "castaway", - "crossbeam-utils", - "curl", - "curl-sys", - "encoding_rs", - "event-listener", - "futures-lite", - "http", - "log", - "mime", - "once_cell", - "polling", - "slab", - "sluice", - "tracing", - "tracing-futures", - "url 2.2.2", - "waker-fn", -] - -[[package]] -name = "itertools" -version = "0.10.3" +name = "itoa" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" -dependencies = [ - "either", -] +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" @@ -2404,15 +1615,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" -[[package]] -name = "jobserver" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.57" @@ -2423,117 +1625,34 @@ dependencies = [ ] [[package]] -name = "jsonpath_lib" -version = "0.2.6" +name = "jsonrpsee" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61352ec23883402b7d30b3313c16cbabefb8907361c4eb669d990cbb87ceee5a" +checksum = "05fd8cd6c6b1bbd06881d2cf88f1fc83cc36c98f2219090f839115fb4a956cb9" dependencies = [ - "array_tool", - "env_logger 0.7.1", - "log", - "serde 1.0.136", - "serde_json", + "jsonrpsee-client-transport", + "jsonrpsee-core", ] [[package]] -name = "jsonrpc-client-transports" -version = "18.0.0" +name = "jsonrpsee-client-transport" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" +checksum = "3303cdf246e6ab76e2866fb3d9acb6c76a068b1b28bd923a1b7a8122257ad7b5" dependencies = [ - "derive_more", - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-pubsub", - "log", - "serde 1.0.136", - "serde_json", - "url 1.7.2", -] - -[[package]] -name = "jsonrpc-core" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" -dependencies = [ - "futures 0.3.21", - "futures-executor", - "futures-util", - "log", - "serde 1.0.136", - "serde_derive", - "serde_json", -] - -[[package]] -name = "jsonrpc-core-client" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" -dependencies = [ - "futures 0.3.21", - "jsonrpc-client-transports", -] - -[[package]] -name = "jsonrpc-derive" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" -dependencies = [ - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "jsonrpc-pubsub" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" -dependencies = [ - "futures 0.3.21", - "jsonrpc-core", - "lazy_static", - "log", - "parking_lot 0.11.2", - "rand 0.7.3", - "serde 1.0.136", -] - -[[package]] -name = "jsonrpsee" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05fd8cd6c6b1bbd06881d2cf88f1fc83cc36c98f2219090f839115fb4a956cb9" -dependencies = [ - "jsonrpsee-core", - "jsonrpsee-proc-macros", - "jsonrpsee-types", - "jsonrpsee-ws-client", -] - -[[package]] -name = "jsonrpsee-client-transport" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3303cdf246e6ab76e2866fb3d9acb6c76a068b1b28bd923a1b7a8122257ad7b5" -dependencies = [ - "futures 0.3.21", + "futures", "http", "jsonrpsee-core", "jsonrpsee-types", "pin-project 1.0.10", "rustls-native-certs", - "soketto 0.7.1", + "soketto", "thiserror", "tokio", "tokio-rustls", "tokio-util 0.6.9", "tracing", - "webpki-roots 0.22.3", + "webpki-roots", ] [[package]] @@ -2553,24 +1672,12 @@ dependencies = [ "rustc-hash", "serde 1.0.136", "serde_json", - "soketto 0.7.1", + "soketto", "thiserror", "tokio", "tracing", ] -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4299ebf790ea9de1cb72e73ff2ae44c723ef264299e5e2d5ef46a371eb3ac3d8" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "jsonrpsee-types" version = "0.8.0" @@ -2585,42 +1692,12 @@ dependencies = [ "tracing", ] -[[package]] -name = "jsonrpsee-ws-client" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff425cee7c779e33920913bc695447416078ee6d119f443f3060feffa4e86b5" -dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", -] - [[package]] name = "keccak" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "kvdb" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" -dependencies = [ - "parity-util-mem", - "smallvec 1.8.0", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -2635,7 +1712,7 @@ checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec 0.5.2", "bitflags", - "cfg-if 1.0.0", + "cfg-if", "ryu", "static_assertions", ] @@ -2653,1960 +1730,762 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" [[package]] -name = "libnghttp2-sys" -version = "0.1.7+1.45.0" +name = "libsecp256k1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" dependencies = [ - "cc", - "libc", + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde 1.0.136", + "sha2 0.9.9", + "typenum", ] [[package]] -name = "libp2p" -version = "0.39.1" +name = "libsecp256k1-core" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9004c06878ef8f3b4b4067e69a140d87ed20bf777287f82223e49713b36ee433" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" dependencies = [ - "atomic", - "bytes 1.1.0", - "futures 0.3.21", - "lazy_static", - "libp2p-core", - "libp2p-deflate", - "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", - "libp2p-identify", - "libp2p-kad", - "libp2p-mdns", - "libp2p-mplex", - "libp2p-noise", - "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-relay", - "libp2p-request-response", - "libp2p-swarm", - "libp2p-swarm-derive", - "libp2p-tcp", - "libp2p-uds", - "libp2p-wasm-ext", - "libp2p-websocket", - "libp2p-yamux", - "multiaddr", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "smallvec 1.8.0", - "wasm-timer", + "crunchy", + "digest 0.9.0", + "subtle", ] [[package]] -name = "libp2p-core" -version = "0.29.0" +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9b4abdeaa420593a297c8592f63fad4234f4b88dc9343b8fd8e736c35faa59" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures 0.3.21", - "futures-timer", - "lazy_static", - "libsecp256k1 0.5.0", - "log", - "multiaddr", - "multihash 0.14.0", - "multistream-select", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2 0.9.9", - "smallvec 1.8.0", - "thiserror", - "unsigned-varint 0.7.1", - "void", - "zeroize", + "libsecp256k1-core", ] [[package]] -name = "libp2p-deflate" -version = "0.29.0" +name = "libsecp256k1-gen-genmult" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66097fccc0b7f8579f90a03ea76ba6196332ea049fd07fd969490a06819dcdc8" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" dependencies = [ - "flate2", - "futures 0.3.21", - "libp2p-core", + "libsecp256k1-core", ] [[package]] -name = "libp2p-dns" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ff08b3196b85a17f202d80589e93b1660a574af67275706657fdc762e42c32" +name = "lifeline" +version = "0.6.1" +source = "git+https://github.com/fewensa/lifeline-rs.git?branch=threads-safely#6e45414f81e9905d8e018e6627cf3146184aa152" dependencies = [ - "async-std-resolver", - "futures 0.3.21", - "libp2p-core", + "anyhow", + "async-trait", + "futures-util", "log", - "smallvec 1.8.0", - "trust-dns-resolver", + "pin-project 0.4.29", + "postage", + "regex", + "thiserror", + "tokio", ] [[package]] -name = "libp2p-floodsub" -version = "0.30.0" +name = "linked-hash-map" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404eca8720967179dac7a5b4275eb91f904a53859c69ca8d018560ad6beb214f" +checksum = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd" dependencies = [ - "cuckoofilter", - "fnv", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec 1.8.0", + "serde 0.8.23", + "serde_test", ] [[package]] -name = "libp2p-gossipsub" -version = "0.32.0" +name = "linked-hash-map" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cc48709bcbc3a3321f08a73560b4bbb4166a7d56f6fdb615bc775f4f91058e" -dependencies = [ - "asynchronous-codec 0.6.0", - "base64 0.13.0", - "byteorder", - "bytes 1.1.0", - "fnv", - "futures 0.3.21", - "hex_fmt", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "regex", - "sha2 0.9.9", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "wasm-timer", -] +checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] -name = "libp2p-identify" -version = "0.30.0" +name = "linregress" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7b61f6cf07664fb97016c318c4d4512b3dd4cc07238607f3f0163245f99008e" +checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" dependencies = [ - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "smallvec 1.8.0", - "wasm-timer", + "nalgebra", + "statrs", ] [[package]] -name = "libp2p-kad" -version = "0.31.0" +name = "lock_api" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ed78489c87924235665a0ab345b298ee34dff0f7ad62c0ba6608b2144fb75e" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ - "arrayvec 0.5.2", - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "either", - "fnv", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "sha2 0.9.9", - "smallvec 1.8.0", - "uint", - "unsigned-varint 0.7.1", - "void", - "wasm-timer", + "autocfg", + "scopeguard", ] [[package]] -name = "libp2p-mdns" -version = "0.31.0" +name = "log" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a29e6cbc2a24b8471b6567e580a0e8e7b70a6d0f0ea2be0844d1e842d7d4fa33" +checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" dependencies = [ - "async-io", - "data-encoding", - "dns-parser", - "futures 0.3.21", - "if-watch", - "lazy_static", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.8.5", - "smallvec 1.8.0", - "socket2 0.4.4", - "void", + "cfg-if", ] [[package]] -name = "libp2p-mplex" -version = "0.29.0" +name = "matchers" +version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "313d9ea526c68df4425f580024e67a9d3ffd49f2c33de5154b1f5019816f7a99" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "log", - "nohash-hasher", - "parking_lot 0.11.2", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", + "regex-automata", ] [[package]] -name = "libp2p-noise" -version = "0.32.0" +name = "matches" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1db7212f342b6ba7c981cc40e31f76e9e56cb48e65fa4c142ecaca5839523e" -dependencies = [ - "bytes 1.1.0", - "curve25519-dalek 3.2.0", - "futures 0.3.21", - "lazy_static", - "libp2p-core", - "log", - "prost", - "prost-build", - "rand 0.8.5", - "sha2 0.9.9", - "snow", - "static_assertions", - "x25519-dalek", - "zeroize", -] +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] -name = "libp2p-ping" -version = "0.30.0" +name = "matrixmultiply" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2482cfd9eb0b7a0baaf3e7b329dc4f2785181a161b1a47b7192f8d758f54a439" +checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" dependencies = [ - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "void", - "wasm-timer", + "rawpointer", ] [[package]] -name = "libp2p-plaintext" -version = "0.29.0" +name = "maybe-uninit" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b4783e5423870b9a5c199f65a7a3bc66d86ab56b2b9beebf3c338d889cf8e4" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "log", - "prost", - "prost-build", - "unsigned-varint 0.7.1", - "void", -] +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] -name = "libp2p-pnet" -version = "0.21.0" +name = "memchr" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cb4dd4b917e5b40ddefe49b96b07adcd8d342e0317011d175b7b2bb1dcc974" -dependencies = [ - "futures 0.3.21", - "log", - "pin-project 1.0.10", - "rand 0.7.3", - "salsa20", - "sha3", -] +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] -name = "libp2p-relay" -version = "0.3.0" +name = "memory-db" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0133f6cfd81cdc16e716de2982e012c62e6b9d4f12e41967b3ee361051c622aa" +checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "futures-timer", - "libp2p-core", - "libp2p-swarm", - "log", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "void", - "wasm-timer", + "hash-db", + "hashbrown", + "parity-util-mem", ] [[package]] -name = "libp2p-request-response" -version = "0.12.0" +name = "memory_units" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06cdae44b6821466123af93cbcdec7c9e6ba9534a8af9cdc296446d39416d241" -dependencies = [ - "async-trait", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "lru", - "minicbor", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "wasm-timer", -] +checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" [[package]] -name = "libp2p-swarm" -version = "0.30.0" +name = "merlin" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7083861341e1555467863b4cd802bea1e8c4787c0f7b5110097d0f1f3248f9a9" +checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" dependencies = [ - "either", - "futures 0.3.21", - "libp2p-core", - "log", - "rand 0.7.3", - "smallvec 1.8.0", - "void", - "wasm-timer", + "byteorder", + "keccak", + "rand_core 0.5.1", + "zeroize", ] [[package]] -name = "libp2p-swarm-derive" -version = "0.24.0" +name = "mime" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8cb308d4fc854869f5abb54fdab0833d2cf670d407c745849dc47e6e08d79c" -dependencies = [ - "quote", - "syn", -] +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] -name = "libp2p-tcp" -version = "0.29.0" +name = "miniz_oxide" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79edd26b6b4bb5feee210dcda562dca186940dfecb0024b979c3f50824b3bf28" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ - "async-io", - "futures 0.3.21", - "futures-timer", - "if-watch", - "ipnet", - "libc", - "libp2p-core", - "log", - "socket2 0.4.4", + "adler", + "autocfg", ] [[package]] -name = "libp2p-uds" -version = "0.29.0" +name = "mio" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280e793440dd4e9f273d714f4497325c72cddb0fe85a49f9a03c88f41dd20182" +checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" dependencies = [ - "async-std", - "futures 0.3.21", - "libp2p-core", + "libc", "log", + "miow", + "ntapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "winapi", ] [[package]] -name = "libp2p-wasm-ext" -version = "0.29.0" +name = "miow" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f553b7140fad3d7a76f50497b0ea591e26737d9607428a75509fc191e4d1b1f6" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" dependencies = [ - "futures 0.3.21", - "js-sys", - "libp2p-core", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", + "winapi", ] [[package]] -name = "libp2p-websocket" -version = "0.30.0" +name = "nalgebra" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf99dcbf5063e9d59087f61b1e85c686ceab2f5abedb472d32288065c0e5e27" +checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" dependencies = [ - "either", - "futures 0.3.21", - "futures-rustls", - "libp2p-core", - "log", - "quicksink", - "rw-stream-sink", - "soketto 0.4.2", - "url 2.2.2", - "webpki-roots 0.21.1", + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational 0.4.0", + "num-traits 0.2.14", + "rand 0.8.5", + "rand_distr", + "simba", + "typenum", ] [[package]] -name = "libp2p-yamux" -version = "0.33.0" +name = "nalgebra-macros" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214cc0dd9c37cbed27f0bb1eba0c41bbafdb93a8be5e9d6ae1e6b4b42cd044bf" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" dependencies = [ - "futures 0.3.21", - "libp2p-core", - "parking_lot 0.11.2", - "thiserror", - "yamux", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "libsecp256k1" -version = "0.5.0" +name = "native-tls" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde 1.0.136", - "sha2 0.9.9", - "typenum", + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] -name = "libsecp256k1" -version = "0.6.0" +name = "nodrop" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde 1.0.136", - "sha2 0.9.9", - "typenum", -] +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] -name = "libsecp256k1-core" -version = "0.2.2" +name = "nom" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", + "lexical-core", + "memchr", + "version_check", ] [[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" +name = "ntapi" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" dependencies = [ - "libsecp256k1-core", + "winapi", ] [[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" +name = "num-bigint" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "libsecp256k1-core", + "autocfg", + "num-integer", + "num-traits 0.2.14", ] [[package]] -name = "libz-sys" -version = "1.1.5" +name = "num-complex" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859" +checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", + "num-traits 0.2.14", ] [[package]] -name = "lifeline" -version = "0.6.1" -source = "git+https://github.com/fewensa/lifeline-rs.git?branch=threads-safely#6e45414f81e9905d8e018e6627cf3146184aa152" +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" dependencies = [ - "anyhow", - "async-trait", - "futures-util", - "log", - "pin-project 0.4.29", - "postage", - "regex", - "thiserror", - "tokio", + "arrayvec 0.4.12", + "itoa 0.4.8", ] [[package]] -name = "linked-hash-map" -version = "0.3.0" +name = "num-integer" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "serde 0.8.23", - "serde_test", + "autocfg", + "num-traits 0.2.14", ] [[package]] -name = "linked-hash-map" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" - -[[package]] -name = "linked_hash_set" -version = "0.1.4" +name = "num-rational" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "linked-hash-map 0.5.4", + "autocfg", + "num-bigint", + "num-integer", + "num-traits 0.2.14", ] [[package]] -name = "linregress" -version = "0.4.4" +name = "num-rational" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ - "nalgebra", - "statrs", + "autocfg", + "num-integer", + "num-traits 0.2.14", ] [[package]] -name = "lock_api" -version = "0.3.4" +name = "num-traits" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "scopeguard", + "num-traits 0.2.14", ] [[package]] -name = "lock_api" -version = "0.4.7" +name = "num-traits" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ "autocfg", - "scopeguard", + "libm", ] [[package]] -name = "log" -version = "0.4.16" +name = "num_cpus" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ - "cfg-if 1.0.0", - "value-bag", + "hermit-abi", + "libc", ] [[package]] -name = "lru" -version = "0.6.6" +name = "object" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea2d928b485416e8908cff2d97d621db22b27f7b3b6729e438bcf42c671ba91" +checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" dependencies = [ - "hashbrown", + "memchr", ] [[package]] -name = "lru-cache" -version = "0.1.2" +name = "once_cell" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map 0.5.4", -] +checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" [[package]] -name = "match_cfg" -version = "0.1.0" +name = "opaque-debug" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" +checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] -name = "matchers" -version = "0.0.1" +name = "opaque-debug" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" -dependencies = [ - "regex-automata", -] +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] -name = "matches" -version = "0.1.9" +name = "openssl" +version = "0.10.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "matrixmultiply" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" +checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ - "rawpointer", + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-sys", ] [[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "memchr" -version = "2.4.1" +name = "openssl-probe" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] -name = "memoffset" -version = "0.6.5" +name = "openssl-sys" +version = "0.9.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" dependencies = [ "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] -name = "memory-db" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" -dependencies = [ - "hash-db", - "hashbrown", - "parity-util-mem", -] - -[[package]] -name = "memory_units" -version = "0.3.0" +name = "owo-colors" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" +checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55" [[package]] -name = "merlin" -version = "2.0.1" +name = "pad" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" +checksum = "d2ad9b889f1b12e0b9ee24db044b5129150d5eada288edc800f789928dc8c0e3" dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", - "zeroize", + "unicode-width", ] [[package]] -name = "messages-relay" +name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ - "async-std", - "async-trait", - "bp-messages", + "bp-message-dispatch", "bp-runtime", - "futures 0.3.21", - "hex", + "frame-support", + "frame-system", "log", - "num-traits 0.2.14", - "parking_lot 0.11.2", - "relay-utils", - "sp-arithmetic", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "minicbor" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51aa5bb0ca22415daca596a227b507f880ad1b2318a87fa9325312a5d285ca0d" +name = "pallet-bridge-grandpa" +version = "0.1.0" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ - "minicbor-derive", + "bp-header-chain", + "bp-runtime", + "bp-test-utils", + "finality-grandpa", + "frame-support", + "frame-system", + "log", + "num-traits 0.2.14", + "parity-scale-codec", + "scale-info", + "serde 1.0.136", + "sp-finality-grandpa", + "sp-runtime", + "sp-std", + "sp-trie", ] [[package]] -name = "minicbor-derive" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788" +name = "pallet-bridge-messages" +version = "0.1.0" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ - "proc-macro2", - "quote", - "syn", + "bitvec", + "bp-message-dispatch", + "bp-messages", + "bp-runtime", + "frame-support", + "frame-system", + "log", + "num-traits 0.2.14", + "parity-scale-codec", + "scale-info", + "serde 1.0.136", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +name = "pallet-bridge-parachains" +version = "0.1.0" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ - "adler", - "autocfg", + "bp-parachains", + "bp-polkadot-core", + "bp-runtime", + "frame-support", + "frame-system", + "log", + "pallet-bridge-grandpa", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", + "sp-trie", ] [[package]] -name = "miniz_oxide" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +name = "pallet-fee-market" +version = "0.1.0" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ - "adler", + "bitvec", + "bp-messages", + "bp-runtime", + "frame-support", + "frame-system", + "pallet-bridge-messages", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] -name = "mio" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +name = "pallet-timestamp" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "libc", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "miow", - "ntapi", - "wasi 0.11.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "parity-scale-codec", + "scale-info", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] -name = "multiaddr" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ee4ea82141951ac6379f964f71b20876d43712bea8faf6dd1a375e08a46499" +name = "pallet-transaction-payment" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "arrayref", - "bs58", - "byteorder", - "data-encoding", - "multihash 0.14.0", - "percent-encoding 2.1.0", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", "serde 1.0.136", - "static_assertions", - "unsigned-varint 0.7.1", - "url 2.2.2", + "smallvec 1.8.0", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] -name = "multibase" -version = "0.8.0" +name = "parity-scale-codec" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b78c60039650ff12e140ae867ef5299a58e19dded4d334c849dc7177083667e2" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "base-x", - "data-encoding", - "data-encoding-macro", + "arrayvec 0.7.2", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde 1.0.136", ] [[package]] -name = "multihash" -version = "0.13.2" +name = "parity-scale-codec-derive" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac63698b887d2d929306ea48b63760431ff8a24fac40ddb22f9c7f49fb7cab" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", - "digest 0.9.0", - "generic-array 0.14.5", - "multihash-derive", - "sha2 0.9.9", - "sha3", - "unsigned-varint 0.5.1", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "multihash" -version = "0.14.0" +name = "parity-util-mem" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" +checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ - "digest 0.9.0", - "generic-array 0.14.5", - "multihash-derive", - "sha2 0.9.9", - "unsigned-varint 0.7.1", + "cfg-if", + "hashbrown", + "impl-trait-for-tuples", + "parity-util-mem-derive", + "parking_lot 0.11.2", + "primitive-types", + "winapi", ] [[package]] -name = "multihash-derive" -version = "0.7.2" +name = "parity-util-mem-derive" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" +checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", "proc-macro2", - "quote", "syn", "synstructure", ] [[package]] -name = "multimap" -version = "0.8.3" +name = "parity-wasm" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] -name = "multistream-select" -version = "0.10.4" +name = "parking_lot" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ - "bytes 1.1.0", - "futures 0.3.21", - "log", - "pin-project 1.0.10", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", + "instant", + "lock_api", + "parking_lot_core 0.8.5", ] [[package]] -name = "nalgebra" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" -dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros", - "num-complex", - "num-rational 0.4.0", - "num-traits 0.2.14", - "rand 0.8.5", - "rand_distr", - "simba", - "typenum", -] - -[[package]] -name = "nalgebra-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "native-tls" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - -[[package]] -name = "nom" -version = "5.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" -dependencies = [ - "lexical-core", - "memchr", - "version_check", -] - -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" -dependencies = [ - "autocfg", - "num-integer", - "num-traits 0.2.14", -] - -[[package]] -name = "num-complex" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" -dependencies = [ - "num-traits 0.2.14", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits 0.2.14", -] - -[[package]] -name = "num-rational" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits 0.2.14", -] - -[[package]] -name = "num-rational" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" -dependencies = [ - "autocfg", - "num-integer", - "num-traits 0.2.14", -] - -[[package]] -name = "num-traits" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" -dependencies = [ - "num-traits 0.2.14", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-sys", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "owo-colors" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55" - -[[package]] -name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-bridge-dispatch" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-message-dispatch", - "bp-runtime", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-bridge-grandpa" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-header-chain", - "bp-runtime", - "bp-test-utils", - "finality-grandpa", - "frame-support", - "frame-system", - "log", - "num-traits 0.2.14", - "parity-scale-codec", - "scale-info", - "serde 1.0.136", - "sp-finality-grandpa", - "sp-runtime", - "sp-std", - "sp-trie", -] - -[[package]] -name = "pallet-bridge-messages" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bitvec", - "bp-message-dispatch", - "bp-messages", - "bp-runtime", - "frame-support", - "frame-system", - "log", - "num-traits 0.2.14", - "parity-scale-codec", - "scale-info", - "serde 1.0.136", - "sp-core", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-bridge-parachains" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "frame-support", - "frame-system", - "log", - "pallet-bridge-grandpa", - "parity-scale-codec", - "scale-info", - "serde 1.0.136", - "sp-core", - "sp-runtime", - "sp-std", - "sp-trie", -] - -[[package]] -name = "pallet-fee-market" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bitvec", - "bp-messages", - "bp-runtime", - "frame-support", - "frame-system", - "pallet-bridge-messages", - "pallet-timestamp", - "parity-scale-codec", - "scale-info", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-inherents", - "sp-runtime", - "sp-std", - "sp-timestamp", -] - -[[package]] -name = "pallet-transaction-payment" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "frame-support", - "frame-system", - "parity-scale-codec", - "scale-info", - "serde 1.0.136", - "smallvec 1.8.0", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "pallet-transaction-payment", - "parity-scale-codec", - "sp-api", - "sp-runtime", -] - -[[package]] -name = "parachains-relay" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "async-std", - "async-trait", - "backoff", - "bp-parachains", - "bp-polkadot-core", - "futures 0.3.21", - "linked-hash-map 0.5.4", - "log", - "num-traits 0.2.14", - "parking_lot 0.11.2", - "relay-substrate-client", - "relay-utils", -] - -[[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", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde 1.0.136", -] - -[[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 1.1.3", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "parity-send-wrapper" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" - -[[package]] -name = "parity-util-mem" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" -dependencies = [ - "cfg-if 1.0.0", - "ethereum-types", - "hashbrown", - "impl-trait-for-tuples", - "lru", - "parity-util-mem-derive", - "parking_lot 0.11.2", - "primitive-types", - "smallvec 1.8.0", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn", - "synstructure", -] - -[[package]] -name = "parity-wasm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" - -[[package]] -name = "parking" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api 0.4.7", - "parking_lot_core 0.8.5", -] - -[[package]] -name = "parking_lot" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" -dependencies = [ - "lock_api 0.4.7", - "parking_lot_core 0.9.2", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec 1.8.0", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.13", - "smallvec 1.8.0", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall 0.2.13", - "smallvec 1.8.0", - "windows-sys", -] - -[[package]] -name = "paste" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" - -[[package]] -name = "pbkdf2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac 0.8.0", -] - -[[package]] -name = "pbkdf2" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" -dependencies = [ - "crypto-mac 0.11.1", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pest" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] - -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "pin-project" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909" -dependencies = [ - "pin-project-internal 0.4.29", -] - -[[package]] -name = "pin-project" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" -dependencies = [ - "pin-project-internal 1.0.10", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - -[[package]] -name = "pin-project-lite" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" - -[[package]] -name = "polling" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "log", - "wepoll-ffi", - "winapi", -] - -[[package]] -name = "pollster" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" - -[[package]] -name = "poly1305" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" -dependencies = [ - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", - "universal-hash", -] - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", - "universal-hash", -] - -[[package]] -name = "postage" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a63d25391d04a097954b76aba742b6b5b74f213dfe3dbaeeb36e8ddc1c657f0b" -dependencies = [ - "atomic", - "crossbeam-queue", - "log", - "pin-project 1.0.10", - "pollster", - "static_assertions", - "thiserror", -] - -[[package]] -name = "ppv-lite86" -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", - "impl-rlp", - "impl-serde", - "scale-info", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro-crate" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" -dependencies = [ - "thiserror", - "toml", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro2" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "prometheus" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" -dependencies = [ - "cfg-if 1.0.0", - "fnv", - "lazy_static", - "parking_lot 0.11.2", - "regex", - "thiserror", -] - -[[package]] -name = "prost" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" -dependencies = [ - "bytes 1.1.0", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" -dependencies = [ - "bytes 1.1.0", - "heck 0.3.3", - "itertools", - "log", - "multimap", - "petgraph", - "prost", - "prost-types", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "prost-types" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" -dependencies = [ - "bytes 1.1.0", - "prost", -] - -[[package]] -name = "pwasm-utils" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" -dependencies = [ - "byteorder", - "log", - "parity-wasm", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quicksink" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" -dependencies = [ - "futures-core", - "futures-sink", - "pin-project-lite 0.1.12", -] - -[[package]] -name = "quote" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.6", -] - -[[package]] -name = "rand_distr" -version = "0.4.3" +name = "parking_lot" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ - "num-traits 0.2.14", - "rand 0.8.5", + "lock_api", + "parking_lot_core 0.9.2", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "parking_lot_core" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "rand_core 0.5.1", + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec 1.8.0", + "winapi", ] [[package]] -name = "rand_pcg" -version = "0.2.1" +name = "parking_lot_core" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" dependencies = [ - "rand_core 0.5.1", + "cfg-if", + "libc", + "redox_syscall", + "smallvec 1.8.0", + "windows-sys", ] [[package]] -name = "rawpointer" -version = "0.2.1" +name = "paste" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" +checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" [[package]] -name = "rayon" -version = "1.5.2" +name = "pbkdf2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd249e82c21598a9a426a4e00dd7adc1d640b22445ec8545feef801d1a74c221" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" dependencies = [ - "autocfg", - "crossbeam-deque", - "either", - "rayon-core", + "crypto-mac 0.8.0", ] [[package]] -name = "rayon-core" -version = "1.9.2" +name = "pbkdf2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f51245e1e62e1f1629cbfec37b5793bbabcaeb90f30e94d2ba03564687353e4" +checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", + "crypto-mac 0.11.1", ] [[package]] -name = "redox_syscall" -version = "0.1.57" +name = "percent-encoding" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] -name = "redox_syscall" -version = "0.2.13" +name = "pin-project" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909" dependencies = [ - "bitflags", + "pin-project-internal 0.4.29", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "pin-project" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" dependencies = [ - "getrandom 0.2.6", - "redox_syscall 0.2.13", - "thiserror", + "pin-project-internal 1.0.10", ] [[package]] -name = "ref-cast" -version = "1.0.6" +name = "pin-project-internal" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" +checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a" dependencies = [ - "ref-cast-impl", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "ref-cast-impl" -version = "1.0.6" +name = "pin-project-internal" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" +checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2", "quote", @@ -4614,656 +2493,457 @@ dependencies = [ ] [[package]] -name = "regex" -version = "1.5.5" +name = "pin-project-lite" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] +checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" [[package]] -name = "regex-automata" -version = "0.1.10" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax", -] +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "regex-syntax" -version = "0.6.25" +name = "pkg-config" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "relay-crab-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-crab", - "bp-darwinia", - "bp-darwinia-core", - "bp-header-chain", - "bp-kusama", - "bp-message-dispatch", - "bp-messages", - "bp-runtime", - "bridge-runtime-common", - "frame-support", - "pallet-bridge-dispatch", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "relay-darwinia-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-crab", - "bp-darwinia", - "bp-darwinia-core", - "bp-header-chain", - "bp-kusama", - "bp-message-dispatch", - "bp-messages", - "bp-runtime", - "bridge-runtime-common", - "frame-support", - "pallet-bridge-dispatch", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "relay-substrate-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "async-std", - "async-trait", - "bp-header-chain", - "bp-messages", - "bp-runtime", - "finality-relay", - "frame-support", - "frame-system", - "futures 0.3.21", - "jsonrpsee", - "log", - "num-traits 0.2.14", - "pallet-balances", - "pallet-bridge-messages", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", - "rand 0.7.3", - "relay-utils", - "sc-chain-spec", - "sc-rpc-api", - "sc-transaction-pool-api", - "serde 1.0.136", - "sp-core", - "sp-finality-grandpa", - "sp-rpc", - "sp-runtime", - "sp-storage", - "sp-trie", - "sp-version", - "thiserror", - "tokio", -] - -[[package]] -name = "relay-utils" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "ansi_term", - "anyhow", - "async-std", - "async-trait", - "backoff", - "bp-runtime", - "env_logger 0.8.4", - "futures 0.3.21", - "isahc", - "jsonpath_lib", - "log", - "num-traits 0.2.14", - "serde_json", - "substrate-prometheus-endpoint", - "sysinfo", - "thiserror", - "time 0.2.27", -] +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "pollster" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" [[package]] -name = "reqwest" -version = "0.11.10" +name = "postage" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" -dependencies = [ - "base64 0.13.0", - "bytes 1.1.0", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "hyper-tls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "native-tls", - "percent-encoding 2.1.0", - "pin-project-lite 0.2.8", - "rustls 0.20.4", - "rustls-pemfile 0.3.0", - "serde 1.0.136", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-native-tls", - "tokio-rustls", - "url 2.2.2", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.22.3", - "winreg 0.10.1", +checksum = "a63d25391d04a097954b76aba742b6b5b74f213dfe3dbaeeb36e8ddc1c657f0b" +dependencies = [ + "atomic", + "crossbeam-queue", + "log", + "pin-project 1.0.10", + "pollster", + "static_assertions", + "thiserror", ] [[package]] -name = "resolv-conf" -version = "0.7.0" +name = "ppv-lite86" +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 = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ - "hostname", - "quick-error", + "fixed-hash", + "impl-codec", + "impl-serde", + "scale-info", + "uint", ] [[package]] -name = "ring" -version = "0.16.20" +name = "proc-macro-crate" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi", + "toml", ] [[package]] -name = "rlp" -version = "0.5.1" +name = "proc-macro-crate" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ - "bytes 1.1.0", - "rustc-hex", + "thiserror", + "toml", ] [[package]] -name = "rust-ini" -version = "0.13.0" +name = "proc-macro-error" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] [[package]] -name = "rustc-demangle" -version = "0.1.21" +name = "proc-macro-error-attr" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] [[package]] -name = "rustc-hash" -version = "1.1.0" +name = "proc-macro2" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +dependencies = [ + "unicode-xid", +] [[package]] -name = "rustc-hex" -version = "2.1.0" +name = "quote" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +dependencies = [ + "proc-macro2", +] [[package]] -name = "rustc_version" -version = "0.2.3" +name = "radium" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" + +[[package]] +name = "rand" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "semver 0.9.0", + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", + "rand_pcg", ] [[package]] -name = "rustc_version" -version = "0.3.3" +name = "rand" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "semver 0.11.0", + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", ] [[package]] -name = "rustc_version" -version = "0.4.0" +name = "rand_chacha" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "semver 1.0.7", + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] -name = "rustls" -version = "0.19.1" +name = "rand_chacha" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ - "base64 0.13.0", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", + "ppv-lite86", + "rand_core 0.6.3", ] [[package]] -name = "rustls" -version = "0.20.4" +name = "rand_core" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "log", - "ring", - "sct 0.7.0", - "webpki 0.22.0", + "getrandom 0.1.16", ] [[package]] -name = "rustls-native-certs" -version = "0.6.2" +name = "rand_core" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.0", - "schannel", - "security-framework", + "getrandom 0.2.6", ] [[package]] -name = "rustls-pemfile" -version = "0.3.0" +name = "rand_distr" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ - "base64 0.13.0", + "num-traits 0.2.14", + "rand 0.8.5", ] [[package]] -name = "rustls-pemfile" -version = "1.0.0" +name = "rand_hc" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "base64 0.13.0", + "rand_core 0.5.1", ] [[package]] -name = "rw-stream-sink" +name = "rand_pcg" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" +checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" dependencies = [ - "futures 0.3.21", - "pin-project 0.4.29", - "static_assertions", + "rand_core 0.5.1", ] [[package]] -name = "ryu" -version = "1.0.9" +name = "rawpointer" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] -name = "salsa20" -version = "0.8.1" +name = "redox_syscall" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "cipher", + "bitflags", ] [[package]] -name = "sc-allocator" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "redox_users" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "log", - "sp-core", - "sp-wasm-interface", + "getrandom 0.2.6", + "redox_syscall", "thiserror", ] [[package]] -name = "sc-block-builder" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", - "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", -] - -[[package]] -name = "sc-chain-spec" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "ref-cast" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300f2a835d808734ee295d45007adacb9ebb29dd3ae2424acfa17930cae541da" dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "sc-chain-spec-derive", - "sc-network", - "sc-telemetry", - "serde 1.0.136", - "serde_json", - "sp-core", - "sp-runtime", + "ref-cast-impl", ] [[package]] -name = "sc-chain-spec-derive" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "ref-cast-impl" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c38e3aecd2b21cb3959637b883bb3714bc7e43f0268b9a29d3743ee3e55cdd2" dependencies = [ - "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", ] [[package]] -name = "sc-client-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "fnv", - "futures 0.3.21", - "hash-db", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-executor", - "sc-transaction-pool-api", - "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-database", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", - "substrate-prometheus-endpoint", -] - -[[package]] -name = "sc-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "regex" +version = "1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "libp2p", - "log", - "parking_lot 0.11.2", - "sc-client-api", - "sc-utils", - "serde 1.0.136", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", - "substrate-prometheus-endpoint", - "thiserror", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] -name = "sc-executor" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "lazy_static", - "libsecp256k1 0.6.0", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-executor-common", - "sc-executor-wasmi", - "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-tasks", - "sp-trie", - "sp-version", - "sp-wasm-interface", - "wasmi", + "regex-syntax", ] [[package]] -name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "regex-syntax" +version = "0.6.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" + +[[package]] +name = "relay-s2s" +version = "0.5.7" dependencies = [ - "derive_more", - "environmental", - "parity-scale-codec", - "pwasm-utils", - "sc-allocator", + "array-bytes", + "async-trait", + "bridge-s2s-traits", + "once_cell", "sp-core", - "sp-maybe-compressed-blob", - "sp-serializer", - "sp-wasm-interface", + "sp-runtime", + "subquery-parachain", + "subquery-s2s", + "support-toolkit", "thiserror", - "wasmi", + "tokio", + "tracing", ] [[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "remove_dir_all" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "log", - "parity-scale-codec", - "sc-allocator", - "sc-executor-common", - "scoped-tls", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", + "winapi", ] [[package]] -name = "sc-network" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "reqwest" +version = "0.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ - "async-std", - "async-trait", - "asynchronous-codec 0.5.0", - "bitflags", - "bytes 1.1.0", - "cid", - "derive_more", - "either", - "fnv", - "fork-tree", - "futures 0.3.21", - "futures-timer", - "hex", - "ip_network", - "libp2p", - "linked-hash-map 0.5.4", - "linked_hash_set", + "base64 0.13.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-tls", + "ipnet", + "js-sys", + "lazy_static", "log", - "lru", - "parity-scale-codec", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "sc-block-builder", - "sc-client-api", - "sc-consensus", - "sc-peerset", - "sc-utils", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile 0.3.0", "serde 1.0.136", "serde_json", - "smallvec 1.8.0", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-finality-grandpa", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "unsigned-varint 0.6.0", - "void", - "zeroize", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "tokio-rustls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", ] [[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ - "futures 0.3.21", - "libp2p", - "log", - "sc-utils", - "serde_json", - "wasm-timer", + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", ] [[package]] -name = "sc-rpc-api" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "rust-ini" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" + +[[package]] +name = "rustc-demangle" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "jsonrpc-pubsub", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-chain-spec", - "sc-transaction-pool-api", - "serde 1.0.136", - "serde_json", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-tracing", - "sp-version", - "thiserror", + "semver", ] [[package]] -name = "sc-telemetry" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "rustls" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" dependencies = [ - "chrono", - "futures 0.3.21", - "libp2p", "log", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "rand 0.7.3", - "serde 1.0.136", - "serde_json", - "thiserror", - "wasm-timer", + "ring", + "sct", + "webpki", ] [[package]] -name = "sc-transaction-pool-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "rustls-native-certs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ - "derive_more", - "futures 0.3.21", - "log", - "serde 1.0.136", - "sp-blockchain", - "sp-runtime", - "thiserror", + "openssl-probe", + "rustls-pemfile 1.0.0", + "schannel", + "security-framework", ] [[package]] -name = "sc-utils" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "rustls-pemfile" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" dependencies = [ - "futures 0.3.21", - "futures-timer", - "lazy_static", - "prometheus", + "base64 0.13.0", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7522c9de787ff061458fe9a829dc790a3f5b22dc571694fc5883f448b94d9a9" +dependencies = [ + "base64 0.13.0", ] +[[package]] +name = "ryu" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" + [[package]] name = "scale-info" version = "1.0.0" @@ -5271,7 +2951,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ "bitvec", - "cfg-if 1.0.0", + "cfg-if", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -5318,28 +2998,12 @@ dependencies = [ "zeroize", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -5352,9 +3016,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] @@ -5382,45 +3046,12 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser 0.10.2", -] - [[package]] name = "semver" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" version = "0.8.23" @@ -5489,8 +3120,7 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ - "indexmap", - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -5511,7 +3141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -5532,29 +3162,14 @@ dependencies = [ name = "sha-1" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures 0.2.2", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" +checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug 0.3.0", +] [[package]] name = "sha2" @@ -5575,21 +3190,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures 0.2.2", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "keccak", "opaque-debug 0.3.0", ] @@ -5602,16 +3205,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "signal-hook" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.0" @@ -5645,26 +3238,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - -[[package]] -name = "sluice" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" -dependencies = [ - "async-channel", - "futures-core", - "futures-io", -] - [[package]] name = "smallvec" version = "0.6.14" @@ -5680,35 +3253,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" -[[package]] -name = "snow" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7" -dependencies = [ - "aes-gcm", - "blake2", - "chacha20poly1305", - "rand 0.8.5", - "rand_core 0.6.3", - "ring", - "rustc_version 0.3.3", - "sha2 0.9.9", - "subtle", - "x25519-dalek", -] - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.4.4" @@ -5719,22 +3263,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "soketto" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" -dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", - "flate2", - "futures 0.3.21", - "httparse", - "log", - "rand 0.7.3", - "sha-1", -] - [[package]] name = "soketto" version = "0.7.1" @@ -5742,8 +3270,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ "base64 0.13.0", - "bytes 1.1.0", - "futures 0.3.21", + "bytes", + "futures", "httparse", "log", "rand 0.8.5", @@ -5753,7 +3281,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -5770,7 +3298,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.3", @@ -5782,7 +3310,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -5795,7 +3323,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "integer-sqrt", "num-traits 0.2.14", @@ -5807,72 +3335,23 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-block-builder" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "sp-blockchain" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "log", - "lru", - "parity-scale-codec", - "parking_lot 0.11.2", - "sp-api", - "sp-consensus", - "sp-database", - "sp-runtime", - "sp-state-machine", - "thiserror", -] - -[[package]] -name = "sp-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "log", - "parity-scale-codec", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-version", - "thiserror", -] - [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "base58", "blake2-rfc", "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.21", + "futures", "hash-db", "hash256-std-hasher", "hex", "impl-serde", "lazy_static", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "merlin", "num-traits 0.2.14", @@ -5892,6 +3371,7 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -5901,19 +3381,10 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "kvdb", - "parking_lot 0.11.2", -] - [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -5923,7 +3394,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "environmental", "parity-scale-codec", @@ -5934,7 +3405,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "finality-grandpa", "log", @@ -5952,7 +3423,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -5966,11 +3437,11 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "futures 0.3.21", + "futures", "hash-db", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "parity-scale-codec", "parking_lot 0.11.2", @@ -5990,11 +3461,11 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "derive_more", - "futures 0.3.21", + "futures", "merlin", "parity-scale-codec", "parking_lot 0.11.2", @@ -6003,36 +3474,18 @@ dependencies = [ "sp-externalities", ] -[[package]] -name = "sp-maybe-compressed-blob" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "zstd", -] - [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "backtrace", ] -[[package]] -name = "sp-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "rustc-hash", - "serde 1.0.136", - "sp-core", -] - [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "either", "hash256-std-hasher", @@ -6054,7 +3507,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6071,7 +3524,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -6080,19 +3533,10 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-serializer" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "serde 1.0.136", - "serde_json", -] - [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -6103,7 +3547,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -6126,12 +3570,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -6141,23 +3585,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-tasks" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "log", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", -] - [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "futures-timer", @@ -6173,15 +3604,9 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde 1.0.136", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -6191,7 +3616,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "memory-db", @@ -6206,7 +3631,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -6222,7 +3647,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -6233,7 +3658,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6248,12 +3673,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "standback" -version = "0.2.17" +name = "ss58-registry" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" +checksum = "77ef98aedad3dc52e10995e7ed15f1279e11d4da35795f5dac7305742d0feb66" dependencies = [ - "version_check", + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde 1.0.136", + "serde_json", + "unicode-xid", ] [[package]] @@ -6276,59 +3707,16 @@ dependencies = [ ] [[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde 1.0.136", - "serde_derive", - "syn", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde 1.0.136", - "serde_derive", - "serde_json", - "sha1", - "syn", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" +name = "strsim" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strsim" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" @@ -6347,7 +3735,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck 0.3.3", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -6369,12 +3757,45 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ - "heck 0.3.3", + "heck", "proc-macro2", "quote", "syn", ] +[[package]] +name = "subquery-parachain" +version = "0.5.7" +dependencies = [ + "async-trait", + "gql_client", + "hex", + "include_dir", + "serde 1.0.136", + "serde-aux", + "serde-hex", + "strum", + "thiserror", + "tracing", +] + +[[package]] +name = "subquery-s2s" +version = "0.5.7" +dependencies = [ + "array-bytes", + "async-trait", + "gql_client", + "hex", + "include_dir", + "serde 1.0.136", + "serde-aux", + "serde-hex", + "strum", + "thiserror", + "tracing", +] + [[package]] name = "substrate-bip39" version = "0.4.4" @@ -6389,58 +3810,73 @@ dependencies = [ ] [[package]] -name = "substrate-prometheus-endpoint" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-std", - "derive_more", - "futures-util", - "hyper", - "log", - "prometheus", - "tokio", -] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] -name = "substrate-relay-helper" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +name = "subxt" +version = "0.17.0" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ - "anyhow", - "async-std", "async-trait", - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "bridge-runtime-common", - "finality-grandpa", - "finality-relay", - "frame-support", - "futures 0.3.21", + "bitvec", + "chameleon", + "derivative", + "frame-metadata", + "futures", + "hex", + "jsonrpsee", "log", - "messages-relay", "num-traits 0.2.14", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-parachains", - "parachains-relay", "parity-scale-codec", - "relay-substrate-client", - "relay-utils", + "scale-info", + "serde 1.0.136", + "serde_json", "sp-core", - "sp-finality-grandpa", "sp-runtime", + "sp-version", + "subxt-macro", "thiserror", ] [[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +name = "subxt-codegen" +version = "0.17.0" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" +dependencies = [ + "async-trait", + "darling", + "frame-metadata", + "heck", + "parity-scale-codec", + "proc-macro-crate 0.1.5", + "proc-macro-error", + "proc-macro2", + "quote", + "scale-info", + "syn", +] + +[[package]] +name = "subxt-macro" +version = "0.17.0" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" +dependencies = [ + "async-trait", + "darling", + "frame-metadata", + "heck", + "parity-scale-codec", + "proc-macro-crate 0.1.5", + "proc-macro-error", + "proc-macro2", + "quote", + "scale-info", + "subxt-codegen", + "syn", +] [[package]] name = "support-common" @@ -6470,13 +3906,13 @@ dependencies = [ ] [[package]] -name = "support-terminal" +name = "support-toolkit" version = "0.5.7" dependencies = [ - "colored", - "serde 1.0.136", - "structopt", - "strum", + "once_cell", + "pad", + "parity-scale-codec", + "thiserror", ] [[package]] @@ -6502,23 +3938,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "sysinfo" -version = "0.15.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de94457a09609f33fec5e7fceaf907488967c6c7c75d64da6a7ce6ffdb8b5abd" -dependencies = [ - "cc", - "cfg-if 1.0.0", - "core-foundation-sys", - "doc-comment", - "libc", - "ntapi", - "once_cell", - "rayon", - "winapi", -] - [[package]] name = "tap" version = "1.0.1" @@ -6531,23 +3950,14 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "remove_dir_all", "winapi", ] -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - [[package]] name = "textwrap" version = "0.11.0" @@ -6597,44 +4007,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check", - "winapi", -] - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] - [[package]] name = "tiny-bip39" version = "0.8.2" @@ -6684,16 +4056,16 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" dependencies = [ - "bytes 1.1.0", + "bytes", "libc", "memchr", "mio", "num_cpus", "once_cell", "parking_lot 0.12.0", - "pin-project-lite 0.2.8", + "pin-project-lite", "signal-hook-registry", - "socket2 0.4.4", + "socket2", "tokio-macros", "winapi", ] @@ -6725,9 +4097,9 @@ version = "0.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4151fda0cf2798550ad0b34bcfc9b9dcc2a9d2471c895c68f3a8818e54f2389e" dependencies = [ - "rustls 0.20.4", + "rustls", "tokio", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -6736,12 +4108,12 @@ version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-io", "futures-sink", "log", - "pin-project-lite 0.2.8", + "pin-project-lite", "tokio", ] @@ -6751,10 +4123,10 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.8", + "pin-project-lite", "tokio", "tracing", ] @@ -6780,9 +4152,8 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" dependencies = [ - "cfg-if 1.0.0", - "log", - "pin-project-lite 0.2.8", + "cfg-if", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -6818,16 +4189,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project 1.0.10", - "tracing", -] - [[package]] name = "tracing-log" version = "0.1.2" @@ -6893,49 +4254,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "trust-dns-proto" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca94d4e9feb6a181c690c4040d7a24ef34018d8313ac5044a61d21222ae24e31" -dependencies = [ - "async-trait", - "cfg-if 1.0.0", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "log", - "rand 0.8.5", - "smallvec 1.8.0", - "thiserror", - "tinyvec", - "url 2.2.2", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecae383baad9995efaa34ce8e57d12c3f305e545887472a492b838f4b5cfb77a" -dependencies = [ - "cfg-if 1.0.0", - "futures-util", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "parking_lot 0.11.2", - "resolv-conf", - "smallvec 1.8.0", - "thiserror", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.3" @@ -6948,7 +4266,7 @@ version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rand 0.8.5", "static_assertions", ] @@ -6959,12 +4277,6 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" -[[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - [[package]] name = "uint" version = "0.9.3" @@ -7010,63 +4322,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.5", - "subtle", -] - -[[package]] -name = "unsigned-varint" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" - -[[package]] -name = "unsigned-varint" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2" -dependencies = [ - "asynchronous-codec 0.5.0", - "bytes 1.1.0", - "futures-io", - "futures-util", -] - -[[package]] -name = "unsigned-varint" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures-io", - "futures-util", -] - [[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.2.2" @@ -7074,9 +4335,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", - "idna 0.2.3", + "idna", "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] @@ -7085,16 +4346,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.0.0-alpha.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" -dependencies = [ - "ctor", - "version_check", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -7113,18 +4364,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "want" version = "0.3.0" @@ -7159,7 +4398,7 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -7184,7 +4423,7 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -7219,21 +4458,6 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures 0.3.21", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmi" version = "0.9.1" @@ -7268,16 +4492,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -7288,50 +4502,15 @@ dependencies = [ "untrusted", ] -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - [[package]] name = "webpki-roots" version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - -[[package]] -name = "which" -version = "4.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" -dependencies = [ - "either", - "lazy_static", - "libc", + "webpki", ] -[[package]] -name = "widestring" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" - [[package]] name = "winapi" version = "0.3.9" @@ -7348,15 +4527,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -7406,15 +4576,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.10.1" @@ -7430,17 +4591,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" -[[package]] -name = "x25519-dalek" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" -dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "yaml-rust" version = "0.4.5" @@ -7450,20 +4600,6 @@ dependencies = [ "linked-hash-map 0.5.4", ] -[[package]] -name = "yamux" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107" -dependencies = [ - "futures 0.3.21", - "log", - "nohash-hasher", - "parking_lot 0.11.2", - "rand 0.8.5", - "static_assertions", -] - [[package]] name = "zeroize" version = "1.5.4" @@ -7484,32 +4620,3 @@ dependencies = [ "syn", "synstructure", ] - -[[package]] -name = "zstd" -version = "0.9.2+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "4.1.3+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "1.6.2+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2daf2f248d9ea44454bfcb2516534e8b8ad2fc91bf818a1885495fc42bc8ac9f" -dependencies = [ - "cc", - "libc", -] diff --git a/bridges/darwinia-crab/bridge/Cargo.toml b/bridges/darwinia-crab/bridge/Cargo.toml index 4a9c4f086..4bac69503 100644 --- a/bridges/darwinia-crab/bridge/Cargo.toml +++ b/bridges/darwinia-crab/bridge/Cargo.toml @@ -18,59 +18,26 @@ readme = 'README.md' edition = "2021" [dependencies] -tracing = "0.1" -color-eyre = "0.5" - -async-trait = "0.1" +tracing = "0.1" +color-eyre = "0.5" +array-bytes = "2" tokio = { version = "1", features = ["full"] } -colored = "2" -structopt = "0.3" -strum = { version = "0.21", features = ["derive"] } -codec = { package = "parity-scale-codec", version = "2" } -serde = { version = "1", features = ["derive"] } -serde_json = "1" -hex = "0.4" -futures = "0.3" -futures-timer = "3" +structopt = "0.3" +strum = { version = "0.21", features = ["derive"] } +serde = { version = "1", features = ["derive"] } lifeline = { git = "https://github.com/fewensa/lifeline-rs.git", branch = "threads-safely" } -postage = "0.4" - - -## Substrate Dependencies - -frame-support = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-trie = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-version = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } - -## bridge common - -bp-runtime = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-header-chain = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-darwinia = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-crab = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-darwinia-core = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-substrate-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -substrate-relay-helper = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-utils = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bridge-runtime-common = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -pallet-bridge-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -messages-relay = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-darwinia-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-crab-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } - -pallet-fee-market = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } - -## component -feemarket-s2s = { path = "../../../frame/assistants/feemarket-s2s" } +postage = "0.4" -## support support-common = { path = "../../../frame/supports/support-common" } support-lifeline = { path = "../../../frame/supports/support-lifeline" } -support-terminal = { path = "../../../frame/supports/support-terminal" } +support-toolkit = { path = "../../../frame/supports/support-toolkit" } + +bridge-s2s-traits = { path = "../../../frame/traits/bridge-s2s" } +client-darwinia = { path = "../../../frame/assistants/client-darwinia", features = [ "bridge-s2s-crab", "feemarket-s2s-crab" ]} +client-crab = { path = "../../../frame/assistants/client-crab", features = [ "bridge-s2s-darwinia", "feemarket-s2s-darwinia" ]} +subquery-s2s = { path = "../../../frame/assistants/subquery-s2s" } +relay-s2s = { path = "../../../frame/assistants/relay-s2s" } +feemarket-s2s = { path = "../../../frame/assistants/feemarket-s2s" } diff --git a/bridges/darwinia-crab/bridge/src/bridge/bus.rs b/bridges/darwinia-crab/bridge/src/bridge/bus.rs index 2bdd654ca..6b2e9b960 100644 --- a/bridges/darwinia-crab/bridge/src/bridge/bus.rs +++ b/bridges/darwinia-crab/bridge/src/bridge/bus.rs @@ -1,3 +1,3 @@ use lifeline::prelude::*; -lifeline_bus!(pub struct DarwiniaCrabBus); +lifeline_bus!(pub struct BridgeBus); diff --git a/bridges/darwinia-crab/bridge/src/bridge/config.rs b/bridges/darwinia-crab/bridge/src/bridge/config.rs index 0da273c68..3e1644798 100644 --- a/bridges/darwinia-crab/bridge/src/bridge/config.rs +++ b/bridges/darwinia-crab/bridge/src/bridge/config.rs @@ -1,137 +1,91 @@ -use feemarket_s2s::config::FeemarketConfig; +use client_crab::client::CrabClient; +use client_crab::component::CrabClientComponent; +use client_darwinia::client::DarwiniaClient; +use client_darwinia::component::DarwiniaClientComponent; use serde::{Deserialize, Serialize}; -use strum::{EnumString, EnumVariantNames}; +use subquery_s2s::types::BridgeName; +use subquery_s2s::{Subquery, SubqueryComponent, SubqueryConfig}; -use support_common::error::BridgerError; - -use crate::types::{ChainInfo, HexLaneId, PrometheusParamsInfo}; +use crate::types::HexLaneId; +/// Bridge template config #[derive(Clone, Debug, Deserialize, Serialize)] -pub struct DarwiniaCrabConfig { +pub struct BridgeConfig { + /// Darwinia chain pub darwinia: ChainInfoConfig, + /// Crab chain pub crab: ChainInfoConfig, + /// Relay config pub relay: RelayConfig, - pub feemarket: Option, - pub task: TaskConfig, -} - -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct TaskConfig { - pub interval_update_fee: u64, - pub update_fee_strategy: UpdateFeeStrategyType, + /// Index config + pub index: IndexConfig, } -#[derive(Clone, Debug, Serialize, Deserialize, strum::EnumString)] -pub enum UpdateFeeStrategyType { - Nothing, - Crazy, - Reasonable, +/// Chain info +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct ChainInfoConfig { + /// Endpoint + pub endpoint: String, + /// Signer + pub signer: String, } -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Deserialize, Serialize)] pub struct RelayConfig { /// Hex-encoded lane identifiers that should be served by the complex relay. pub lanes: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_darwinia: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_crab: Option, - #[serde(default)] - pub prometheus_params: PrometheusParamsInfo, - /// If passed, only mandatory headers (headers that are changing the GRANDPA authorities set) - /// are relayed. - pub only_mandatory_headers: bool, - /// Create relayers fund accounts on both chains, if it does not exists yet. - pub create_relayers_fund_accounts: bool, - /// The SURI of secret key to use when transactions are submitted to the darwinia node. - #[serde(skip_serializing_if = "Option::is_none")] - pub darwinia_messages_pallet_owner: Option, - /// The password for the SURI of secret key to use when transactions are submitted to the darwinia node. - #[serde(skip_serializing_if = "Option::is_none")] - pub darwinia_messages_pallet_owner_password: Option, - /// The SURI of secret key to use when transactions are submitted to the crab node. - #[serde(skip_serializing_if = "Option::is_none")] - pub crab_messages_pallet_owner: Option, - /// The password for the SURI of secret key to use when transactions are submitted to the crab node. - #[serde(skip_serializing_if = "Option::is_none")] - pub crab_messages_pallet_owner_password: Option, } #[derive(Clone, Debug, Serialize, Deserialize)] -pub struct ChainInfoConfig { - pub endpoint: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer: Option, - #[serde(skip)] - pub secure: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_password: Option, - /// Transactions mortality period, in blocks. MUST be a power of two in [4; 65536] range. MAY NOT be larger than `BlockHashCount` parameter of the chain system module. - #[serde(skip_serializing_if = "Option::is_none")] - pub transactions_mortality: Option, - /// Runtime version mode, default is bundle - #[serde(skip_serializing_if = "Option::is_none")] - pub runtime_version_mode: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub spec_version: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_version: Option, +pub struct IndexConfig { + pub crab: SubqueryConfig, + pub darwinia: SubqueryConfig, +} + +impl From for client_crab::config::ClientConfig { + fn from(config: ChainInfoConfig) -> Self { + client_crab::config::ClientConfig { + endpoint: config.endpoint, + relayer_private_key: config.signer, + relayer_real_account: None, + } + } } -#[derive(Clone, Debug, Serialize, Deserialize, EnumString, EnumVariantNames)] -#[strum(serialize_all = "kebab_case")] -pub enum RuntimeVersionMode { - /// Auto query version from chain - Auto, - /// Custom `spec_version` and `transaction_version` - Custom, - /// Read version from bundle dependencies directly. - Bundle, +impl From for client_darwinia::config::ClientConfig { + fn from(config: ChainInfoConfig) -> Self { + client_darwinia::config::ClientConfig { + endpoint: config.endpoint, + relayer_private_key: config.signer, + relayer_real_account: None, + } + } } impl ChainInfoConfig { - fn host_port(&self) -> color_eyre::Result<(bool, String, u16)> { - if self.endpoint.find("ws://").unwrap_or(usize::MAX) != 0 - && self.endpoint.find("wss://").unwrap_or(usize::MAX) != 0 - { - return Err(BridgerError::Custom( - "The entrypoint isn't websocket protocol".to_string(), - ) - .into()); - } - let secure = self.endpoint.starts_with("wss://"); - let endpoint = self - .endpoint - .replace(if secure { "wss://" } else { "ws://" }, "") - .replace('/', "") - .replace(' ', ""); - let host_port = endpoint.split(':').collect::>(); - let host = host_port.get(0).unwrap_or(&"127.0.0.1"); - let port = host_port - .get(1) - .unwrap_or(if secure { &"443" } else { &"80" }); - Ok((secure, host.to_string(), port.parse::()?)) + pub async fn to_crab_client(&self) -> color_eyre::Result { + let config = self.clone().into(); + Ok(CrabClientComponent::component(config).await?) } - pub fn to_chain_info(&self) -> color_eyre::Result { - self.to_chain_info_with_expect_signer(None) + pub async fn to_darwinia_client(&self) -> color_eyre::Result { + let config = self.clone().into(); + Ok(DarwiniaClientComponent::component(config).await?) } +} + +impl IndexConfig { + pub fn to_crab_subquery(&self) -> Subquery { + SubqueryComponent::component(self.crab.clone(), BridgeName::DarwiniaCrab) + } + + pub fn to_darwinia_subquery(&self) -> Subquery { + SubqueryComponent::component(self.darwinia.clone(), BridgeName::DarwiniaCrab) + } +} - pub fn to_chain_info_with_expect_signer( - &self, - except_signer: Option, - ) -> color_eyre::Result { - let host_port = self.host_port()?; - Ok(ChainInfo { - secure: host_port.0, - host: host_port.1, - port: host_port.2, - signer: except_signer.or_else(|| self.signer.clone()), - signer_password: self.signer_password.clone(), - transactions_mortality: Some(256), - runtime_version_mode: self.runtime_version_mode.clone(), - spec_version: self.spec_version, - transaction_version: self.transaction_version, - }) +impl RelayConfig { + pub fn raw_lanes(&self) -> Vec<[u8; 4]> { + self.lanes.iter().map(|item| item.0).collect() } } diff --git a/bridges/darwinia-crab/bridge/src/bridge/task.rs b/bridges/darwinia-crab/bridge/src/bridge/task.rs index 0233490a6..bef8b56ae 100644 --- a/bridges/darwinia-crab/bridge/src/bridge/task.rs +++ b/bridges/darwinia-crab/bridge/src/bridge/task.rs @@ -1,35 +1,42 @@ use support_lifeline::task::TaskStack; -use crate::bridge::DarwiniaCrabBus; -use crate::service::fee::UpdateFeeService; -use crate::service::relay::RelayService; +use crate::bridge::BridgeBus; +use crate::service::feemarket::FeemarketService; +use crate::service::header::crab_to_darwinia::CrabToDarwiniaHeaderRelayService; +use crate::service::header::darwinia_to_crab::DarwiniaToCrabHeaderRelayService; +use crate::service::message::crab_to_darwinia::CrabToDarwiniaMessageRelayService; +use crate::service::message::darwinia_to_crab::DarwiniaToCrabMessageRelayService; +use crate::service::subscribe::SubscribeService; #[derive(Debug)] -pub struct DarwiniaCrabTask { - stack: TaskStack, +pub struct BridgeTask { + stack: TaskStack, } -impl DarwiniaCrabTask { +impl BridgeTask { pub fn name() -> &'static str { - "task-darwinia-crab" + "darwinia-crab" } } -impl DarwiniaCrabTask { +impl BridgeTask { pub async fn new() -> color_eyre::Result { - let bus = DarwiniaCrabBus::default(); - + let bus = BridgeBus::default(); let mut stack = TaskStack::new(bus); - stack.spawn_service::()?; - stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; Ok(Self { stack }) } } -impl DarwiniaCrabTask { +impl BridgeTask { #[allow(dead_code)] - pub fn stack(&self) -> &TaskStack { + pub fn stack(&self) -> &TaskStack { &self.stack } } diff --git a/bridges/darwinia-crab/bridge/src/chains/crab.rs b/bridges/darwinia-crab/bridge/src/chains/crab.rs deleted file mode 100644 index 1d354692e..000000000 --- a/bridges/darwinia-crab/bridge/src/chains/crab.rs +++ /dev/null @@ -1,165 +0,0 @@ -pub use s2s_const::*; -pub use s2s_headers::*; -pub use s2s_messages::*; - -mod s2s_const { - use relay_crab_client::CrabChain; - use sp_version::RuntimeVersion; - - use crate::traits::CliChain; - - // === start const - impl CliChain for CrabChain { - const RUNTIME_VERSION: RuntimeVersion = bp_crab::VERSION; - - type KeyPair = sp_core::sr25519::Pair; - } - - // === end -} - -mod s2s_headers { - use relay_crab_client::CrabChain; - use relay_darwinia_client::DarwiniaChain; - use substrate_relay_helper::finality_pipeline::SubstrateFinalitySyncPipeline; - - /// Description of Crab -> Darwinia finalized headers bridge. - #[derive(Clone, Debug)] - pub struct CrabFinalityToDarwinia; - - substrate_relay_helper::generate_mocked_submit_finality_proof_call_builder!( - CrabFinalityToDarwinia, - CrabFinalityToDarwiniaCallBuilder, - relay_darwinia_client::runtime::Call::BridgeCrabGrandpa, - relay_darwinia_client::runtime::BridgeCrabGrandpaCall::submit_finality_proof - ); - - impl SubstrateFinalitySyncPipeline for CrabFinalityToDarwinia { - type SourceChain = CrabChain; - type TargetChain = DarwiniaChain; - - type SubmitFinalityProofCallBuilder = CrabFinalityToDarwiniaCallBuilder; - type TransactionSignScheme = DarwiniaChain; - } - - // === end -} - -mod s2s_messages { - use frame_support::weights::Weight; - use relay_crab_client::CrabChain; - use relay_darwinia_client::DarwiniaChain; - use substrate_relay_helper::messages_lane::SubstrateMessageLane; - - use feemarket_s2s::relay::BasicRelayStrategy; - - use crate::feemarket::CrabFeemarketApi; - - #[derive(Clone, Debug)] - pub struct CrabMessagesToDarwinia; - - substrate_relay_helper::generate_mocked_receive_message_proof_call_builder!( - CrabMessagesToDarwinia, - CrabMessagesToDarwiniaReceiveMessagesProofCallBuilder, - relay_darwinia_client::runtime::Call::BridgeCrabMessages, - relay_darwinia_client::runtime::BridgeCrabMessagesCall::receive_messages_proof - ); - substrate_relay_helper::generate_mocked_receive_message_delivery_proof_call_builder!( - CrabMessagesToDarwinia, - CrabMessagesToDarwiniaReceiveMessagesDeliveryProofCallBuilder, - relay_crab_client::runtime::Call::BridgeDarwiniaMessages, - relay_crab_client::runtime::BridgeDarwiniaMessagesCall::receive_messages_delivery_proof - ); - - impl SubstrateMessageLane for CrabMessagesToDarwinia { - const SOURCE_TO_TARGET_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - const TARGET_TO_SOURCE_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - - type SourceChain = CrabChain; - type TargetChain = DarwiniaChain; - - type SourceTransactionSignScheme = CrabChain; - type TargetTransactionSignScheme = DarwiniaChain; - - type ReceiveMessagesProofCallBuilder = - CrabMessagesToDarwiniaReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = - CrabMessagesToDarwiniaReceiveMessagesDeliveryProofCallBuilder; - - type RelayStrategy = BasicRelayStrategy; - } -} - -pub mod s2s_feemarket { - use codec::Encode; - use relay_crab_client::runtime as crab_runtime; - use relay_crab_client::CrabChain; - use relay_substrate_client::{ - ChainBase, Client, SignParam, TransactionSignScheme, UnsignedTransaction, - }; - use sp_core::{Bytes, Pair}; - - use feemarket_s2s::error::FeemarketResult; - - pub(crate) async fn update_relay_fee( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - CrabChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - crab_runtime::Call::Feemarket( - crab_runtime::FeemarketCall::update_relay_fee(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } - - pub(crate) async fn update_locked_collateral( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - CrabChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - crab_runtime::Call::Feemarket( - crab_runtime::FeemarketCall::update_locked_collateral(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } -} diff --git a/bridges/darwinia-crab/bridge/src/chains/darwinia.rs b/bridges/darwinia-crab/bridge/src/chains/darwinia.rs deleted file mode 100644 index c7394c6a4..000000000 --- a/bridges/darwinia-crab/bridge/src/chains/darwinia.rs +++ /dev/null @@ -1,165 +0,0 @@ -pub use s2s_const::*; -pub use s2s_headers::*; -pub use s2s_messages::*; - -mod s2s_const { - use relay_darwinia_client::DarwiniaChain; - use sp_version::RuntimeVersion; - - use crate::traits::CliChain; - - // === start const - impl CliChain for DarwiniaChain { - const RUNTIME_VERSION: RuntimeVersion = bp_darwinia::VERSION; - - type KeyPair = sp_core::sr25519::Pair; - } - - // === end -} - -mod s2s_headers { - use relay_crab_client::CrabChain; - use relay_darwinia_client::DarwiniaChain; - use substrate_relay_helper::finality_pipeline::SubstrateFinalitySyncPipeline; - - /// Description of Darwinia -> Crab finalized headers bridge. - #[derive(Clone, Debug)] - pub struct DarwiniaFinalityToCrab; - - substrate_relay_helper::generate_mocked_submit_finality_proof_call_builder!( - DarwiniaFinalityToCrab, - DarwiniaFinalityToCrabCallBuilder, - relay_crab_client::runtime::Call::BridgeDarwiniaGrandpa, - relay_crab_client::runtime::BridgeDarwiniaGrandpaCall::submit_finality_proof - ); - - impl SubstrateFinalitySyncPipeline for DarwiniaFinalityToCrab { - type SourceChain = DarwiniaChain; - type TargetChain = CrabChain; - - type SubmitFinalityProofCallBuilder = DarwiniaFinalityToCrabCallBuilder; - type TransactionSignScheme = CrabChain; - } - - // === end -} - -mod s2s_messages { - use frame_support::weights::Weight; - use relay_crab_client::CrabChain; - use relay_darwinia_client::DarwiniaChain; - use substrate_relay_helper::messages_lane::SubstrateMessageLane; - - use feemarket_s2s::relay::BasicRelayStrategy; - - use crate::feemarket::DarwiniaFeemarketApi; - - #[derive(Clone, Debug)] - pub struct DarwiniaMessagesToCrab; - - substrate_relay_helper::generate_mocked_receive_message_proof_call_builder!( - DarwiniaMessagesToCrab, - DarwiniaMessagesToCrabReceiveMessagesProofCallBuilder, - relay_crab_client::runtime::Call::BridgeDarwiniaMessages, - relay_crab_client::runtime::BridgeDarwiniaMessagesCall::receive_messages_proof - ); - substrate_relay_helper::generate_mocked_receive_message_delivery_proof_call_builder!( - DarwiniaMessagesToCrab, - DarwiniaMessagesToCrabReceiveMessagesDeliveryProofCallBuilder, - relay_darwinia_client::runtime::Call::BridgeCrabMessages, - relay_darwinia_client::runtime::BridgeCrabMessagesCall::receive_messages_delivery_proof - ); - - impl SubstrateMessageLane for DarwiniaMessagesToCrab { - const SOURCE_TO_TARGET_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - const TARGET_TO_SOURCE_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - - type SourceChain = DarwiniaChain; - type TargetChain = CrabChain; - - type SourceTransactionSignScheme = DarwiniaChain; - type TargetTransactionSignScheme = CrabChain; - - type ReceiveMessagesProofCallBuilder = - DarwiniaMessagesToCrabReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = - DarwiniaMessagesToCrabReceiveMessagesDeliveryProofCallBuilder; - - type RelayStrategy = BasicRelayStrategy; - } -} - -pub mod s2s_feemarket { - use codec::Encode; - use relay_darwinia_client::runtime as darwinia_runtime; - use relay_darwinia_client::DarwiniaChain; - use relay_substrate_client::{ - ChainBase, Client, SignParam, TransactionSignScheme, UnsignedTransaction, - }; - use sp_core::{Bytes, Pair}; - - use feemarket_s2s::error::FeemarketResult; - - pub(crate) async fn update_relay_fee( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - DarwiniaChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - darwinia_runtime::Call::Feemarket( - darwinia_runtime::FeemarketCall::update_relay_fee(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } - - pub(crate) async fn update_locked_collateral( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - DarwiniaChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - darwinia_runtime::Call::Feemarket( - darwinia_runtime::FeemarketCall::update_locked_collateral(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } -} diff --git a/bridges/darwinia-crab/bridge/src/chains/mod.rs b/bridges/darwinia-crab/bridge/src/chains/mod.rs deleted file mode 100644 index 467e82f73..000000000 --- a/bridges/darwinia-crab/bridge/src/chains/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod crab; -pub mod darwinia; diff --git a/bridges/darwinia-crab/bridge/src/cli.rs b/bridges/darwinia-crab/bridge/src/cli.rs index f70ec78f5..90cdb34cc 100644 --- a/bridges/darwinia-crab/bridge/src/cli.rs +++ b/bridges/darwinia-crab/bridge/src/cli.rs @@ -1,10 +1,10 @@ use crate::command::handler; -use crate::command::types::Opts; +use crate::Opts; /// Execute command pub async fn execute(opts: Opts) -> color_eyre::Result<()> { match opts { - Opts::Start => handler::handle_relay().await, Opts::Init { bridge } => handler::handle_init(bridge).await, + Opts::Start => handler::handle_relay().await, } } diff --git a/bridges/darwinia-crab/bridge/src/command/handler/init.rs b/bridges/darwinia-crab/bridge/src/command/handler/init.rs index 7322f453a..bc5ff14d5 100644 --- a/bridges/darwinia-crab/bridge/src/command/handler/init.rs +++ b/bridges/darwinia-crab/bridge/src/command/handler/init.rs @@ -1,129 +1,44 @@ -use bp_header_chain::InitializationData; -use bp_runtime::Chain as ChainBase; -use codec::Encode; -use relay_crab_client::runtime as crab_runtime; -use relay_crab_client::CrabChain; -use relay_darwinia_client::runtime as darwinia_runtime; -use relay_darwinia_client::DarwiniaChain; -use relay_substrate_client::{ - Chain as RelaySubstrateClientChain, SignParam, TransactionSignScheme, UnsignedTransaction, -}; -use sp_core::{Bytes, Pair}; +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay}; +use support_toolkit::convert::SmartCodecMapper; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; -use support_terminal::output; -use crate::bridge::{ChainInfoConfig, DarwiniaCrabConfig}; -use crate::types::{BridgeName, InitBridge}; +use crate::bridge::{BridgeConfig, ChainInfoConfig}; +use crate::types::BridgeName; pub async fn handle_init(bridge: BridgeName) -> color_eyre::Result<()> { tracing::info!(target: "darwinia-crab", "Init bridge {:?}", bridge); - let bridge_config: DarwiniaCrabConfig = Config::restore(Names::BridgeDarwiniaCrab)?; + let bridge_config: BridgeConfig = Config::restore(Names::BridgeDarwiniaCrab)?; let config_crab: ChainInfoConfig = bridge_config.crab; let config_darwinia: ChainInfoConfig = bridge_config.darwinia; - let (source_chain, target_chain) = match bridge { - BridgeName::CrabToDarwinia => ( - config_crab.to_chain_info()?, - config_darwinia.to_chain_info()?, - ), - BridgeName::DarwiniaToCrab => ( - config_darwinia.to_chain_info()?, - config_crab.to_chain_info()?, - ), - }; - std::thread::spawn(move || { - futures::executor::block_on(init_bridge(InitBridge { - bridge, - source: source_chain, - target: target_chain, - })) - }) - .join() - .map_err(|_| BridgerError::Custom("Failed to join thread handle".to_string()))??; - - output::output_ok(); + init_bridge(bridge, config_crab, config_darwinia).await?; Ok(()) } -macro_rules! select_bridge { - ($bridge: expr, $generic: tt) => { - match $bridge { - BridgeName::CrabToDarwinia => { - type Source = CrabChain; - type Target = DarwiniaChain; - - fn encode_init_bridge( - init_data: InitializationData<::Header>, - ) -> ::Call { - darwinia_runtime::Call::BridgeCrabGrandpa( - darwinia_runtime::BridgeCrabGrandpaCall::initialize(init_data), - ) - } - - $generic - } - BridgeName::DarwiniaToCrab => { - type Source = DarwiniaChain; - type Target = CrabChain; - - fn encode_init_bridge( - init_data: InitializationData<::Header>, - ) -> ::Call { - crab_runtime::Call::BridgeDarwiniaGrandpa( - crab_runtime::BridgeDarwiniaGrandpaCall::initialize(init_data), - ) - } - - $generic - } +async fn init_bridge( + bridge: BridgeName, + config_crab: ChainInfoConfig, + config_darwinia: ChainInfoConfig, +) -> color_eyre::Result<()> { + let client_crab = config_crab.to_crab_client().await?; + let client_darwinia = config_darwinia.to_darwinia_client().await?; + let hash = match bridge { + BridgeName::CrabToDarwinia => { + let initialization_data = client_crab.prepare_initialization_data().await?; + let expected_data = SmartCodecMapper::map_to(&initialization_data)?; + client_darwinia.initialize(expected_data).await? + } + BridgeName::DarwiniaToCrab => { + let initialization_data = client_darwinia.prepare_initialization_data().await?; + let expected_data = SmartCodecMapper::map_to(&initialization_data)?; + client_crab.initialize(expected_data).await? } }; -} - -async fn init_bridge(init_bridge: InitBridge) -> color_eyre::Result<()> { - let bridge = init_bridge.bridge; - let source_chain = init_bridge.source; - let target_chain = init_bridge.target; - select_bridge!(bridge, { - let source_client = source_chain.to_substrate_relay_chain::().await?; - let target_client = target_chain.to_substrate_relay_chain::().await?; - let target_sign = target_chain.to_keypair::()?; - tracing::debug!( - target: "darwinia-crab", - "source client -> {:?}", - source_client - ); - tracing::debug!( - target: "darwinia-crab", - "target client -> {:?}", - target_client - ); - - let (spec_version, transaction_version) = target_client.simple_runtime_version().await?; - substrate_relay_helper::headers_initialize::initialize( - source_client, - target_client.clone(), - target_sign.public().into(), - move |transaction_nonce, initialization_data| { - Bytes( - Target::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash: *target_client.genesis_hash(), - signer: target_sign.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - encode_init_bridge(initialization_data), - transaction_nonce, - ), - }) - .encode(), - ) - }, - ) - .await; - }); + tracing::info!( + target: "darwinia-crab", + "Successes to sent init transaction: {:?}", + hash, + ); Ok(()) } diff --git a/bridges/darwinia-crab/bridge/src/command/handler/relay.rs b/bridges/darwinia-crab/bridge/src/command/handler/relay.rs index 317b90b97..3985d825b 100644 --- a/bridges/darwinia-crab/bridge/src/command/handler/relay.rs +++ b/bridges/darwinia-crab/bridge/src/command/handler/relay.rs @@ -1,12 +1,12 @@ use support_common::config::{Config, Names}; -use crate::bridge::{DarwiniaCrabConfig, DarwiniaCrabTask}; +use crate::bridge::{BridgeConfig, BridgeTask}; pub async fn handle_relay() -> color_eyre::Result<()> { tracing::info!(target: "darwinia-crab", "Start bridge darwinia-crab"); // check config - let _bridge_config: DarwiniaCrabConfig = Config::restore(Names::BridgeDarwiniaCrab)?; - let _task = DarwiniaCrabTask::new().await?; + let _bridge_config: BridgeConfig = Config::restore(Names::BridgeDarwiniaCrab)?; + let _task = BridgeTask::new().await?; loop { tokio::time::sleep(std::time::Duration::from_secs(1)).await; } diff --git a/bridges/darwinia-crab/bridge/src/command/types.rs b/bridges/darwinia-crab/bridge/src/command/types.rs index 470823d6c..4a4fceca6 100644 --- a/bridges/darwinia-crab/bridge/src/command/types.rs +++ b/bridges/darwinia-crab/bridge/src/command/types.rs @@ -4,14 +4,14 @@ use crate::types::BridgeName; /// Bridge darwinia-crab options #[derive(Debug, StructOpt)] -#[structopt(name = "darwinia-crab", about = "Bridge darwinia-crab")] +#[structopt(name = "bridge-darwinia-crab", about = "Bridge darwinia-crab")] pub enum Opts { - /// Start bridge darwinia-crab - Start, /// Init bridge darwinia-crab Init { /// Bridge, support darwinia-to-crab crab-to-darwinia #[structopt()] bridge: BridgeName, }, + /// Start bridge darwinia-crab + Start, } diff --git a/bridges/darwinia-crab/bridge/src/feemarket/crab.rs b/bridges/darwinia-crab/bridge/src/feemarket/crab.rs deleted file mode 100644 index cec9c14b1..000000000 --- a/bridges/darwinia-crab/bridge/src/feemarket/crab.rs +++ /dev/null @@ -1,175 +0,0 @@ -use bp_messages::{LaneId, MessageNonce}; -use codec::Encode; -use pallet_fee_market::types::{Order, Relayer}; -use feemarket_s2s::api::FeemarketApi; -use feemarket_s2s::error::FeemarketResult; -use frame_support::Blake2_128Concat; -use relay_crab_client::CrabChain; -use relay_substrate_client::{ChainBase, Client, TransactionSignScheme}; -use relay_utils::relay_loop::Client as RelayLoopClient; -use sp_core::storage::StorageKey; -use sp_core::Pair; - -#[derive(Clone)] -pub struct CrabFeemarketApi { - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, -} - -impl CrabFeemarketApi { - pub fn new( - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, - ) -> Self { - Self { - client, - lane_id, - signer, - } - } -} - -#[async_trait::async_trait] -impl FeemarketApi for CrabFeemarketApi { - type Chain = CrabChain; - - async fn reconnect(&mut self) -> FeemarketResult<()> { - Ok(self.client.reconnect().await?) - } - - fn lane_id(&self) -> LaneId { - self.lane_id - } - - async fn best_finalized_header_number( - &self, - ) -> FeemarketResult<::BlockNumber> { - Ok(self.client.best_finalized_header_number().await?) - } - - async fn assigned_relayers( - &self, - ) -> FeemarketResult< - Vec::AccountId, ::Balance>>, - > { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "DarwiniaFeeMarket".as_bytes(), - "AssignedRelayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn my_assigned_info( - &self, - ) -> FeemarketResult< - Option<( - usize, - Relayer<::AccountId, ::Balance>, - )>, - > { - let signer_id = (*self.signer.public().as_array_ref()).into(); - let assigned_relayers = self.assigned_relayers().await?; - let ret = assigned_relayers - .iter() - .position(|item| item.id == signer_id) - // .map(|position| position as u32) - .map(|position| { - ( - position, - assigned_relayers - .get(position) - .cloned() - .expect("Unreachable"), - ) - }); - Ok(ret) - } - - async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> FeemarketResult< - Option< - Order< - ::AccountId, - ::BlockNumber, - ::Balance, - >, - >, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "DarwiniaFeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn relayers(&self) -> FeemarketResult::AccountId>> { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "DarwiniaFeeMarket".as_bytes(), - "Relayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn relayer( - &self, - account: ::AccountId, - ) -> FeemarketResult< - Option::AccountId, ::Balance>>, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "DarwiniaFeeMarket", - "RelayersMap", - account.encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn is_relayer(&self) -> FeemarketResult { - let signer_id = (*self.signer.public().as_array_ref()).into(); - self.relayer(signer_id).await.map(|item| item.is_some()) - } - - async fn update_relay_fee( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::crab::s2s_feemarket::update_relay_fee( - &self.client, - self.signer.clone(), - amount, - ) - .await - } - - async fn update_locked_collateral( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::crab::s2s_feemarket::update_locked_collateral( - &self.client, - self.signer.clone(), - amount, - ) - .await - } -} diff --git a/bridges/darwinia-crab/bridge/src/feemarket/darwinia.rs b/bridges/darwinia-crab/bridge/src/feemarket/darwinia.rs deleted file mode 100644 index eb6d81047..000000000 --- a/bridges/darwinia-crab/bridge/src/feemarket/darwinia.rs +++ /dev/null @@ -1,174 +0,0 @@ -use bp_messages::{LaneId, MessageNonce}; -use codec::Encode; -use pallet_fee_market::types::{Order, Relayer}; -use feemarket_s2s::api::FeemarketApi; -use feemarket_s2s::error::FeemarketResult; -use frame_support::Blake2_128Concat; -use relay_darwinia_client::DarwiniaChain; -use relay_substrate_client::{ChainBase, Client, TransactionSignScheme}; -use relay_utils::relay_loop::Client as RelayLoopClient; -use sp_core::storage::StorageKey; -use sp_core::Pair; - -#[derive(Clone)] -pub struct DarwiniaFeemarketApi { - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, -} - -impl DarwiniaFeemarketApi { - pub fn new( - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, - ) -> Self { - Self { - client, - lane_id, - signer, - } - } -} - -#[async_trait::async_trait] -impl FeemarketApi for DarwiniaFeemarketApi { - type Chain = DarwiniaChain; - - async fn reconnect(&mut self) -> FeemarketResult<()> { - Ok(self.client.reconnect().await?) - } - - fn lane_id(&self) -> LaneId { - self.lane_id - } - - async fn best_finalized_header_number( - &self, - ) -> FeemarketResult<::BlockNumber> { - Ok(self.client.best_finalized_header_number().await?) - } - - async fn assigned_relayers( - &self, - ) -> FeemarketResult< - Vec::AccountId, ::Balance>>, - > { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "FeeMarket".as_bytes(), - "AssignedRelayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn my_assigned_info( - &self, - ) -> FeemarketResult< - Option<( - usize, - Relayer<::AccountId, ::Balance>, - )>, - > { - let signer_id = (*self.signer.public().as_array_ref()).into(); - let assigned_relayers = self.assigned_relayers().await?; - let ret = assigned_relayers - .iter() - .position(|item| item.id == signer_id) - .map(|position| { - ( - position, - assigned_relayers - .get(position) - .cloned() - .expect("Unreachable"), - ) - }); - Ok(ret) - } - - async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> FeemarketResult< - Option< - Order< - ::AccountId, - ::BlockNumber, - ::Balance, - >, - >, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "FeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn relayers(&self) -> FeemarketResult::AccountId>> { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "FeeMarket".as_bytes(), - "Relayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn relayer( - &self, - account: ::AccountId, - ) -> FeemarketResult< - Option::AccountId, ::Balance>>, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "FeeMarket", - "RelayersMap", - account.encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn is_relayer(&self) -> FeemarketResult { - let signer_id = (*self.signer.public().as_array_ref()).into(); - self.relayer(signer_id).await.map(|item| item.is_some()) - } - - async fn update_relay_fee( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::darwinia::s2s_feemarket::update_relay_fee( - &self.client, - self.signer.clone(), - amount, - ) - .await - } - - async fn update_locked_collateral( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::darwinia::s2s_feemarket::update_locked_collateral( - &self.client, - self.signer.clone(), - amount, - ) - .await - } -} diff --git a/bridges/darwinia-crab/bridge/src/feemarket/mod.rs b/bridges/darwinia-crab/bridge/src/feemarket/mod.rs deleted file mode 100644 index 582a0d072..000000000 --- a/bridges/darwinia-crab/bridge/src/feemarket/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub use self::crab::*; -pub use self::darwinia::*; - -mod crab; -mod darwinia; diff --git a/bridges/darwinia-crab/bridge/src/main.rs b/bridges/darwinia-crab/bridge/src/main.rs index 23c5a87c9..198a7c071 100644 --- a/bridges/darwinia-crab/bridge/src/main.rs +++ b/bridges/darwinia-crab/bridge/src/main.rs @@ -3,12 +3,9 @@ use structopt::StructOpt; use crate::command::types::Opts; mod bridge; -mod chains; mod cli; mod command; -mod feemarket; mod service; -mod traits; mod types; #[tokio::main] diff --git a/bridges/darwinia-crab/bridge/src/service/fee.rs b/bridges/darwinia-crab/bridge/src/service/fee.rs deleted file mode 100644 index 1c3484204..000000000 --- a/bridges/darwinia-crab/bridge/src/service/fee.rs +++ /dev/null @@ -1,128 +0,0 @@ -use bp_messages::LaneId; -use lifeline::{Lifeline, Service, Task}; -use relay_crab_client::CrabChain; -use relay_darwinia_client::DarwiniaChain; - -use feemarket_s2s::fee::{ - CrazyStrategy, NothingStrategy, ReasonableStrategy, UpdateFeeStrategy, -}; -use support_common::config::{Config, Names}; -use support_common::error::BridgerError; -use support_lifeline::service::BridgeService; - -use crate::bridge::{ChainInfoConfig, DarwiniaCrabTask, RelayConfig}; -use crate::bridge::{DarwiniaCrabBus, DarwiniaCrabConfig}; -use crate::bridge::{TaskConfig, UpdateFeeStrategyType}; -use crate::feemarket::{CrabFeemarketApi, DarwiniaFeemarketApi}; - -#[derive(Debug)] -pub struct UpdateFeeService { - _greet: Lifeline, -} - -impl BridgeService for UpdateFeeService {} - -impl Service for UpdateFeeService { - type Bus = DarwiniaCrabBus; - type Lifeline = color_eyre::Result; - - fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task( - &format!("{}-update-fee", DarwiniaCrabTask::name()), - async move { - if let Err(e) = start() { - tracing::error!(target: "darwinia-crab", "{:?}", e); - return Err( - BridgerError::Custom("Failed to start fee service".to_string()).into(), - ); - } - Ok(()) - }, - ); - Ok(Self { _greet }) - } -} - -fn start() -> color_eyre::Result<()> { - let bridge_config: DarwiniaCrabConfig = Config::restore(Names::BridgeDarwiniaCrab)?; - let config_task: TaskConfig = bridge_config.task; - std::thread::spawn(move || futures::executor::block_on(cron_update_fee(config_task))) - .join() - .map_err(|_| BridgerError::Custom("Failed to join thread handle".to_string()))??; - Ok(()) -} - -async fn cron_update_fee(config_task: TaskConfig) -> color_eyre::Result<()> { - tracing::info!( - target: "darwinia-crab", - "Use update fee strategy: {:?}", - config_task.update_fee_strategy - ); - loop { - if let Err(e) = run_update_fee(config_task.clone()).await { - tracing::error!( - target: "darwinia-crab", - "Failed to update fee: {:?}", - e - ); - } - futures_timer::Delay::new(std::time::Duration::from_secs( - config_task.interval_update_fee, - )) - .await; - } -} - -async fn run_update_fee(config_task: TaskConfig) -> color_eyre::Result<()> { - let bridge_config: DarwiniaCrabConfig = Config::restore(Names::BridgeDarwiniaCrab)?; - - let config_relay: RelayConfig = bridge_config.relay; - - let config_crab: ChainInfoConfig = bridge_config.crab; - let config_darwinia: ChainInfoConfig = bridge_config.darwinia; - let (crab_chain, darwinia_chain) = ( - config_crab.to_chain_info_with_expect_signer(config_relay.signer_crab.clone())?, - config_darwinia.to_chain_info_with_expect_signer(config_relay.signer_darwinia.clone())?, - ); - - let crab_client = crab_chain.to_substrate_relay_chain::().await?; - let darwinia_client = darwinia_chain - .to_substrate_relay_chain::() - .await?; - - let crab_signer = crab_chain.to_keypair::()?; - let darwinia_signer = darwinia_chain.to_keypair::()?; - - // todo: If there are multiple lanes, support is also required here - let lanes = config_relay.lanes; - let lane: LaneId = lanes - .get(0) - .cloned() - .ok_or_else(|| BridgerError::Custom("Missing lane id".to_string()))? - .into(); - - let crab_feemarket_api = CrabFeemarketApi::new(crab_client.clone(), lane, crab_signer.clone()); - let darwinia_feemarket_api = - DarwiniaFeemarketApi::new(darwinia_client.clone(), lane, darwinia_signer.clone()); - - match config_task.update_fee_strategy { - UpdateFeeStrategyType::Nothing => Ok(NothingStrategy.handle().await?), - UpdateFeeStrategyType::Crazy => { - let strategy = CrazyStrategy::new(crab_feemarket_api, darwinia_feemarket_api); - Ok(strategy.handle().await?) - } - UpdateFeeStrategyType::Reasonable => { - if let Some(feemarket_config) = bridge_config.feemarket { - let strategy = ReasonableStrategy::new( - feemarket_config, - crab_feemarket_api, - darwinia_feemarket_api, - 15 * 1000000000, - 15 * 1000000000, - )?; - return Ok(strategy.handle().await?); - } - Err(BridgerError::Custom("Missing feemarket config".to_string()).into()) - } - } -} diff --git a/bridges/darwinia-crab/bridge/src/service/feemarket.rs b/bridges/darwinia-crab/bridge/src/service/feemarket.rs new file mode 100644 index 000000000..3b9983967 --- /dev/null +++ b/bridges/darwinia-crab/bridge/src/service/feemarket.rs @@ -0,0 +1,22 @@ +use lifeline::{Lifeline, Service, Task}; + +use support_lifeline::service::BridgeService; + +use crate::bridge::BridgeBus; + +#[derive(Debug)] +pub struct FeemarketService { + _greet: Lifeline, +} + +impl BridgeService for FeemarketService {} + +impl Service for FeemarketService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet = Self::try_task("feemarket-service", async move { Ok(()) }); + Ok(Self { _greet }) + } +} diff --git a/bridges/darwinia-crab/bridge/src/service/header.rs b/bridges/darwinia-crab/bridge/src/service/header.rs new file mode 100644 index 000000000..621a55d30 --- /dev/null +++ b/bridges/darwinia-crab/bridge/src/service/header.rs @@ -0,0 +1,2 @@ +pub mod crab_to_darwinia; +pub mod darwinia_to_crab; diff --git a/bridges/darwinia-crab/bridge/src/service/header/crab_to_darwinia.rs b/bridges/darwinia-crab/bridge/src/service/header/crab_to_darwinia.rs new file mode 100644 index 000000000..4de662f65 --- /dev/null +++ b/bridges/darwinia-crab/bridge/src/service/header/crab_to_darwinia.rs @@ -0,0 +1,66 @@ +use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::OriginType; + +use relay_s2s::header::SolochainHeaderRunner; +use relay_s2s::types::SolochainHeaderInput; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig}; + +#[derive(Debug)] +pub struct CrabToDarwiniaHeaderRelayService { + _greet: Lifeline, +} + +impl BridgeService for CrabToDarwiniaHeaderRelayService {} + +impl Service for CrabToDarwiniaHeaderRelayService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet = Self::try_task("crab-to-darwinia-header-relay-service", async move { + while let Err(e) = start().await { + tracing::error!( + target: "darwinia-crab", + "[header-relay] [crab-to-darwinia] An error occurred for header relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "darwinia-crab", + "[header-relay] [crab-to-darwinia] Try to restart header relay service.", + ); + } + Ok(()) + }); + Ok(Self { _greet }) + } +} + +async fn start() -> color_eyre::Result<()> { + tracing::info!( + target: "darwinia-crab", + "[header-crab-to-darwinia] [crab-to-darwinia] SERVICE RESTARTING..." + ); + let bridge_config: BridgeConfig = Config::restore(Names::BridgeDarwiniaCrab)?; + let relay_config = bridge_config.relay; + + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_darwinia = bridge_config.darwinia.to_darwinia_client().await?; + + let config_index = bridge_config.index; + let subquery_crab = config_index.to_crab_subquery(); + let lanes = relay_config.raw_lanes(); + + let input = SolochainHeaderInput { + lanes, + client_source: client_crab, + client_target: client_darwinia, + subquery_source: subquery_crab, + index_origin_type: OriginType::BridgeDarwinia, + }; + let runner = SolochainHeaderRunner::new(input); + Ok(runner.start().await?) +} diff --git a/bridges/darwinia-crab/bridge/src/service/header/darwinia_to_crab.rs b/bridges/darwinia-crab/bridge/src/service/header/darwinia_to_crab.rs new file mode 100644 index 000000000..e2111ef1b --- /dev/null +++ b/bridges/darwinia-crab/bridge/src/service/header/darwinia_to_crab.rs @@ -0,0 +1,66 @@ +use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::OriginType; + +use relay_s2s::header::SolochainHeaderRunner; +use relay_s2s::types::SolochainHeaderInput; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig}; + +#[derive(Debug)] +pub struct DarwiniaToCrabHeaderRelayService { + _greet: Lifeline, +} + +impl BridgeService for DarwiniaToCrabHeaderRelayService {} + +impl Service for DarwiniaToCrabHeaderRelayService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet = Self::try_task("darwinia-to-crab-header-relay-service", async move { + while let Err(e) = start().await { + tracing::error!( + target: "darwinia-crab", + "[header-relay] [darwinia-to-crab] An error occurred for header relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "darwinia-crab", + "[header-relay] [darwinia-to-crab] Try to restart header relay service.", + ); + } + Ok(()) + }); + Ok(Self { _greet }) + } +} + +async fn start() -> color_eyre::Result<()> { + tracing::info!( + target: "darwinia-crab", + "[header-crab-to-darwinia] [darwinia-to-crab] SERVICE RESTARTING..." + ); + let bridge_config: BridgeConfig = Config::restore(Names::BridgeDarwiniaCrab)?; + let relay_config = bridge_config.relay; + + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_darwinia = bridge_config.darwinia.to_darwinia_client().await?; + + let config_index = bridge_config.index; + let subquery_darwinia = config_index.to_darwinia_subquery(); + let lanes = relay_config.raw_lanes(); + + let input = SolochainHeaderInput { + lanes, + client_source: client_darwinia, + client_target: client_crab, + subquery_source: subquery_darwinia, + index_origin_type: OriginType::BridgeCrab, + }; + let runner = SolochainHeaderRunner::new(input); + Ok(runner.start().await?) +} diff --git a/bridges/darwinia-crab/bridge/src/service/message.rs b/bridges/darwinia-crab/bridge/src/service/message.rs new file mode 100644 index 000000000..621a55d30 --- /dev/null +++ b/bridges/darwinia-crab/bridge/src/service/message.rs @@ -0,0 +1,2 @@ +pub mod crab_to_darwinia; +pub mod darwinia_to_crab; diff --git a/bridges/darwinia-crab/bridge/src/service/message/crab_to_darwinia.rs b/bridges/darwinia-crab/bridge/src/service/message/crab_to_darwinia.rs new file mode 100644 index 000000000..e5aba7d75 --- /dev/null +++ b/bridges/darwinia-crab/bridge/src/service/message/crab_to_darwinia.rs @@ -0,0 +1,127 @@ +use client_crab::client::CrabClient; +use client_darwinia::client::DarwiniaClient; +use lifeline::{Lifeline, Service, Task}; + +use feemarket_s2s::relay::basic::BasicRelayStrategy; +use relay_s2s::message::{BridgeSolochainDeliveryRunner, BridgeSolochainReceivingRunner}; +use relay_s2s::types::{MessageDeliveryInput, MessageReceivingInput}; +use subquery_s2s::types::RelayBlockOrigin; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig}; + +#[derive(Debug)] +pub struct CrabToDarwiniaMessageRelayService { + _greet_delivery: Lifeline, + _greet_receiving: Lifeline, +} + +impl BridgeService for CrabToDarwiniaMessageRelayService {} + +impl Service for CrabToDarwiniaMessageRelayService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet_delivery = Self::try_task( + "crab-to-darwinia-message-delivery-service", + async move { + while let Err(e) = start_delivery().await { + tracing::error!( + target: "darwinia-crab", + "[message-relay] [crab-to-darwinia] An error occurred for message delivery relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "darwinia-crab", + "[message-relay] [crab-to-darwinia] Try to restart message delivery relay service.", + ); + } + Ok(()) + }, + ); + let _greet_receiving = Self::try_task( + "crab-to-darwinia-message-receiving-service", + async move { + while let Err(e) = start_receiving().await { + tracing::error!( + target: "darwinia-crab", + "[message-relay] [crab-to-darwinia] An error occurred for message receiving relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "darwinia-crab", + "[message-relay] [crab-to-darwinia] Try to restart message receiving relay service.", + ); + } + Ok(()) + }, + ); + Ok(Self { + _greet_delivery, + _greet_receiving, + }) + } +} + +async fn message_input() -> color_eyre::Result> { + let bridge_config: BridgeConfig = Config::restore(Names::BridgeDarwiniaCrab)?; + let relay_config = bridge_config.relay; + + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_darwinia = bridge_config.darwinia.to_darwinia_client().await?; + + let config_index = bridge_config.index; + let subquery_crab = config_index.to_crab_subquery(); + let subquery_darwinia = config_index.to_darwinia_subquery(); + + let lanes = relay_config.raw_lanes(); + + let input = MessageReceivingInput { + lanes, + relayer_account: client_crab.account().account_id().clone(), + client_source: client_crab, + client_target: client_darwinia, + subquery_source: subquery_crab, + subquery_target: subquery_darwinia, + }; + Ok(input) +} + +async fn start_delivery() -> color_eyre::Result<()> { + tracing::info!( + target: "darwinia-crab", + "[message-delivery] [delivery-crab-to-darwinia] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let relay_strategy = BasicRelayStrategy::new( + input.client_source.clone(), + input.client_source.account().account_id().clone(), + ); + let input = MessageDeliveryInput { + lanes: input.lanes, + nonces_limit: 11, + relayer_account: input.relayer_account, + client_source: input.client_source, + client_target: input.client_target, + subquery_source: input.subquery_source, + subquery_target: input.subquery_target, + relay_block_origin: RelayBlockOrigin::BridgeDarwinia, + relay_strategy, + }; + let runner = BridgeSolochainDeliveryRunner::new(input); + Ok(runner.start().await?) +} + +async fn start_receiving() -> color_eyre::Result<()> { + tracing::info!( + target: "darwinia-crab", + "[message-receiving] [receiving-crab-to-darwinia] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let runner = BridgeSolochainReceivingRunner::new(input); + Ok(runner.start().await?) +} diff --git a/bridges/darwinia-crab/bridge/src/service/message/darwinia_to_crab.rs b/bridges/darwinia-crab/bridge/src/service/message/darwinia_to_crab.rs new file mode 100644 index 000000000..507c91c6b --- /dev/null +++ b/bridges/darwinia-crab/bridge/src/service/message/darwinia_to_crab.rs @@ -0,0 +1,127 @@ +use client_crab::client::CrabClient; +use client_darwinia::client::DarwiniaClient; +use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::RelayBlockOrigin; + +use feemarket_s2s::relay::basic::BasicRelayStrategy; +use relay_s2s::message::{BridgeSolochainDeliveryRunner, BridgeSolochainReceivingRunner}; +use relay_s2s::types::{MessageDeliveryInput, MessageReceivingInput}; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig}; + +#[derive(Debug)] +pub struct DarwiniaToCrabMessageRelayService { + _greet_delivery: Lifeline, + _greet_receiving: Lifeline, +} + +impl BridgeService for DarwiniaToCrabMessageRelayService {} + +impl Service for DarwiniaToCrabMessageRelayService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet_delivery = Self::try_task( + "darwinia-to-crab-message-delivery-service", + async move { + while let Err(e) = start_delivery().await { + tracing::error!( + target: "darwinia-crab", + "[message-relay] [darwinia-to-crab] An error occurred for message delivery relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "darwinia-crab", + "[message-relay] [darwinia-to-crab] Try to restart message delivery relay service.", + ); + } + Ok(()) + }, + ); + let _greet_receiving = Self::try_task( + "darwinia-to-crab-message-receiving-service", + async move { + while let Err(e) = start_receiving().await { + tracing::error!( + target: "darwinia-crab", + "[message-relay] [darwinia-to-crab] An error occurred for message receiving relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "darwinia-crab", + "[message-relay] [darwinia-to-crab] Try to restart message receiving relay service.", + ); + } + Ok(()) + }, + ); + Ok(Self { + _greet_delivery, + _greet_receiving, + }) + } +} + +async fn message_input() -> color_eyre::Result> { + let bridge_config: BridgeConfig = Config::restore(Names::BridgeDarwiniaCrab)?; + let relay_config = bridge_config.relay; + + let client_darwinia = bridge_config.darwinia.to_darwinia_client().await?; + let client_crab = bridge_config.crab.to_crab_client().await?; + + let config_index = bridge_config.index; + let subquery_crab = config_index.to_crab_subquery(); + let subquery_darwinia = config_index.to_darwinia_subquery(); + + let lanes = relay_config.raw_lanes(); + + let input = MessageReceivingInput { + lanes, + relayer_account: client_darwinia.account().account_id().clone(), + client_source: client_darwinia, + client_target: client_crab, + subquery_source: subquery_darwinia, + subquery_target: subquery_crab, + }; + Ok(input) +} + +async fn start_delivery() -> color_eyre::Result<()> { + tracing::info!( + target: "darwinia-crab", + "[message-delivery] [delivery-darwinia-to-crab] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let relay_strategy = BasicRelayStrategy::new( + input.client_source.clone(), + input.client_source.account().account_id().clone(), + ); + let input = MessageDeliveryInput { + lanes: input.lanes, + nonces_limit: 11, + relayer_account: input.relayer_account, + client_source: input.client_source, + client_target: input.client_target, + subquery_source: input.subquery_source, + subquery_target: input.subquery_target, + relay_block_origin: RelayBlockOrigin::BridgeCrab, + relay_strategy, + }; + let runner = BridgeSolochainDeliveryRunner::new(input); + Ok(runner.start().await?) +} + +async fn start_receiving() -> color_eyre::Result<()> { + tracing::info!( + target: "darwinia-crab", + "[message-receiving] [receiving-darwinia-to-crab] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let runner = BridgeSolochainReceivingRunner::new(input); + Ok(runner.start().await?) +} diff --git a/bridges/darwinia-crab/bridge/src/service/mod.rs b/bridges/darwinia-crab/bridge/src/service/mod.rs index 3c6e2e45a..d110a5f9e 100644 --- a/bridges/darwinia-crab/bridge/src/service/mod.rs +++ b/bridges/darwinia-crab/bridge/src/service/mod.rs @@ -1,2 +1,4 @@ -pub mod fee; -pub mod relay; +pub mod feemarket; +pub mod header; +pub mod message; +pub mod subscribe; diff --git a/bridges/darwinia-crab/bridge/src/service/relay.rs b/bridges/darwinia-crab/bridge/src/service/relay.rs deleted file mode 100644 index 62134211d..000000000 --- a/bridges/darwinia-crab/bridge/src/service/relay.rs +++ /dev/null @@ -1,277 +0,0 @@ -use bp_darwinia_core::AccountId; -use bp_messages::LaneId; -use futures::{FutureExt, TryFutureExt}; -use lifeline::{Lifeline, Service, Task}; -use relay_crab_client::CrabChain; -use relay_darwinia_client::DarwiniaChain; -use relay_substrate_client::{AccountIdOf, Chain, Client, TransactionSignScheme}; -use relay_utils::metrics::MetricsParams; -use sp_core::Pair; -use substrate_relay_helper::messages_lane::MessagesRelayParams; -use substrate_relay_helper::on_demand_headers::OnDemandHeadersRelay; -use substrate_relay_helper::TransactionParams; - -use feemarket_s2s::relay::BasicRelayStrategy; -use support_common::config::{Config, Names}; -use support_common::error::BridgerError; -use support_lifeline::service::BridgeService; - -use crate::bridge::DarwiniaCrabTask; -use crate::bridge::{ChainInfoConfig, RelayConfig}; -use crate::bridge::{DarwiniaCrabBus, DarwiniaCrabConfig}; -use crate::chains::crab::{CrabFinalityToDarwinia, CrabMessagesToDarwinia}; -use crate::chains::darwinia::{DarwiniaFinalityToCrab, DarwiniaMessagesToCrab}; -use crate::feemarket::{CrabFeemarketApi, DarwiniaFeemarketApi}; -use crate::types::{MessagesPalletOwnerSigningParams, RelayHeadersAndMessagesInfo}; - -// /// Maximal allowed conversion rate error ratio (abs(real - stored) / stored) that we allow. -// /// -// /// If it is zero, then transaction will be submitted every time we see difference between -// /// stored and real conversion rates. If it is large enough (e.g. > than 10 percents, which is 0.1), -// /// then rational relayers may stop relaying messages because they were submitted using -// /// lesser conversion rate. -// const CONVERSION_RATE_ALLOWED_DIFFERENCE_RATIO: f64 = 0.05; - -#[derive(Debug)] -pub struct RelayService { - _greet: Lifeline, -} - -impl BridgeService for RelayService {} - -impl Service for RelayService { - type Bus = DarwiniaCrabBus; - type Lifeline = color_eyre::Result; - - fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task(&format!("{}-relay", DarwiniaCrabTask::name()), async move { - if let Err(e) = start() { - tracing::error!(target: "darwinia-crab", "{:?}", e); - return Err( - BridgerError::Custom("Failed to start relay service".to_string()).into(), - ); - } - Ok(()) - }); - Ok(Self { _greet }) - } -} - -fn start() -> color_eyre::Result<()> { - let bridge_config: DarwiniaCrabConfig = Config::restore(Names::BridgeDarwiniaCrab)?; - let config_crab: ChainInfoConfig = bridge_config.crab; - let config_darwinia: ChainInfoConfig = bridge_config.darwinia; - let config_relay: RelayConfig = bridge_config.relay; - - let (source_chain, target_chain) = ( - config_crab.to_chain_info_with_expect_signer(config_relay.signer_crab.clone())?, - config_darwinia.to_chain_info_with_expect_signer(config_relay.signer_darwinia.clone())?, - ); - - let relay_info = RelayHeadersAndMessagesInfo { - source: source_chain, - target: target_chain, - lanes: config_relay.lanes.clone(), - prometheus_params: config_relay.prometheus_params.clone(), - create_relayers_fund_accounts: config_relay.create_relayers_fund_accounts, - only_mandatory_headers: config_relay.only_mandatory_headers, - crab_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams { - messages_pallet_owner: config_relay.crab_messages_pallet_owner.clone(), - messages_pallet_owner_password: config_relay - .crab_messages_pallet_owner_password - .clone(), - }, - darwinia_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams { - messages_pallet_owner: config_relay.darwinia_messages_pallet_owner.clone(), - messages_pallet_owner_password: config_relay.darwinia_messages_pallet_owner_password, - }, - }; - - std::thread::spawn(move || futures::executor::block_on(bridge_relay(relay_info))) - .join() - .map_err(|_| BridgerError::Custom("Failed to join thread handle".to_string()))??; - - // bridge_relay(relay_info).await?; - Ok(()) -} - -async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> color_eyre::Result<()> { - let crab_chain = relay_info.source; - let darwinia_chain = relay_info.target; - - let crab_client = crab_chain.to_substrate_relay_chain::().await?; - let darwinia_client = darwinia_chain - .to_substrate_relay_chain::() - .await?; - - let crab_signer = crab_chain.to_keypair::()?; - let darwinia_signer = darwinia_chain.to_keypair::()?; - let crab_transactions_mortality = crab_chain.transactions_mortality()?; - let darwinia_transactions_mortality = darwinia_chain.transactions_mortality()?; - - let lanes = relay_info.lanes; - - let metrics_params: MetricsParams = relay_info.prometheus_params.clone().into(); - let metrics_params = relay_utils::relay_metrics(metrics_params).into_params(); - - // const METRIC_IS_SOME_PROOF: &str = "it is `None` when metric has been already registered; \ - // this is the command entrypoint, so nothing has been registered yet; \ - // qed"; - - if relay_info.create_relayers_fund_accounts { - let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< - AccountIdOf, - bp_darwinia_core::AccountIdConverter, - >(); - let relayers_fund_account_balance = crab_client - .free_native_balance(relayer_fund_acount_id.clone()) - .await; - if let Err(relay_substrate_client::Error::AccountDoesNotExist) = - relayers_fund_account_balance - { - tracing::info!(target: "bridge", "Going to create relayers fund account at {}.", CrabChain::NAME); - create_crab_account( - crab_client.clone(), - crab_signer.clone(), - relayer_fund_acount_id, - ) - .await?; - } - - let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< - AccountIdOf, - bp_darwinia_core::AccountIdConverter, - >(); - let relayers_fund_account_balance = darwinia_client - .free_native_balance(relayer_fund_acount_id.clone()) - .await; - if let Err(relay_substrate_client::Error::AccountDoesNotExist) = - relayers_fund_account_balance - { - tracing::info!(target: "bridge", "Going to create relayers fund account at {}.", DarwiniaChain::NAME); - create_darwinia_account( - darwinia_client.clone(), - darwinia_signer.clone(), - relayer_fund_acount_id, - ) - .await?; - } - } - - // start on-demand header relays - let crab_to_darwinia_transaction_params = TransactionParams { - mortality: darwinia_transactions_mortality, - signer: darwinia_signer.clone(), - }; - let darwinia_to_crab_transaction_params = TransactionParams { - mortality: crab_transactions_mortality, - signer: crab_signer.clone(), - }; - - let crab_to_darwinia_on_demand_headers = OnDemandHeadersRelay::new::( - crab_client.clone(), - darwinia_client.clone(), - crab_to_darwinia_transaction_params, - bp_crab::SESSION_LENGTH, - relay_info.only_mandatory_headers, - ); - let darwinia_to_crab_on_demand_headers = OnDemandHeadersRelay::new::( - darwinia_client.clone(), - crab_client.clone(), - darwinia_to_crab_transaction_params, - bp_darwinia::SESSION_LENGTH, - relay_info.only_mandatory_headers, - ); - - // Need 2x capacity since we consider both directions for each lane - let mut message_relays = Vec::with_capacity(lanes.len() * 2); - for lane in lanes { - let lane: LaneId = lane.into(); - let crab_feemarket_api = - CrabFeemarketApi::new(crab_client.clone(), lane, crab_signer.clone()); - let darwinia_feemarket_api = - DarwiniaFeemarketApi::new(darwinia_client.clone(), lane, darwinia_signer.clone()); - - let crab_to_darwinia_messages = substrate_relay_helper::messages_lane::run::< - CrabMessagesToDarwinia, - >(MessagesRelayParams { - source_client: crab_client.clone(), - source_transaction_params: TransactionParams { - signer: crab_signer.clone(), - mortality: crab_transactions_mortality, - }, - target_client: darwinia_client.clone(), - target_transaction_params: TransactionParams { - signer: darwinia_signer.clone(), - mortality: darwinia_transactions_mortality, - }, - source_to_target_headers_relay: Some(crab_to_darwinia_on_demand_headers.clone()), - target_to_source_headers_relay: Some(darwinia_to_crab_on_demand_headers.clone()), - lane_id: lane, - metrics_params: metrics_params.clone().disable(), - standalone_metrics: None, - relay_strategy: BasicRelayStrategy::new( - crab_feemarket_api, - AccountId::from(crab_signer.public().0), - ), - }) - .map_err(|e| format!("{}", e)) - .boxed(); - - let darwinia_to_crab_messages = substrate_relay_helper::messages_lane::run::< - DarwiniaMessagesToCrab, - >(MessagesRelayParams { - source_client: darwinia_client.clone(), - source_transaction_params: TransactionParams { - signer: darwinia_signer.clone(), - mortality: darwinia_transactions_mortality, - }, - target_client: crab_client.clone(), - target_transaction_params: TransactionParams { - signer: crab_signer.clone(), - mortality: crab_transactions_mortality, - }, - source_to_target_headers_relay: Some(darwinia_to_crab_on_demand_headers.clone()), - target_to_source_headers_relay: Some(crab_to_darwinia_on_demand_headers.clone()), - lane_id: lane, - metrics_params: metrics_params.clone().disable(), - standalone_metrics: None, - relay_strategy: BasicRelayStrategy::new( - darwinia_feemarket_api, - AccountId::from(darwinia_signer.public().0), - ), - }) - .map_err(|e| format!("{}", e)) - .boxed(); - - message_relays.push(crab_to_darwinia_messages); - message_relays.push(darwinia_to_crab_messages); - } - - relay_utils::relay_metrics(metrics_params) - .expose() - .await - .map_err(|e| BridgerError::Custom(format!("{:?}", e)))?; - - if let Err(e) = futures::future::select_all(message_relays).await.0 { - tracing::error!(target: "darwinia-crab", "{:?}", e); - return Err(BridgerError::Custom("Failed to start relay".to_string()).into()); - } - Ok(()) -} - -async fn create_crab_account( - _left_client: Client, - _left_sign: ::AccountKeyPair, - _account_id: AccountIdOf, -) -> color_eyre::Result<()> { - Err(BridgerError::Custom("Account creation is not supported by this bridge".to_string()).into()) -} - -async fn create_darwinia_account( - _left_client: Client, - _left_sign: ::AccountKeyPair, - _account_id: AccountIdOf, -) -> color_eyre::Result<()> { - Err(BridgerError::Custom("Account creation is not supported by this bridge".to_string()).into()) -} diff --git a/bridges/darwinia-crab/bridge/src/service/subscribe.rs b/bridges/darwinia-crab/bridge/src/service/subscribe.rs new file mode 100644 index 000000000..cb710ab0c --- /dev/null +++ b/bridges/darwinia-crab/bridge/src/service/subscribe.rs @@ -0,0 +1,47 @@ +use lifeline::{Lifeline, Service, Task}; + +use relay_s2s::subscribe::SubscribeJustification; +use relay_s2s::types::JustificationInput; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; + +#[derive(Debug)] +pub struct SubscribeService { + _greet: Lifeline, +} + +impl BridgeService for SubscribeService {} + +impl Service for SubscribeService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet = Self::try_task(&format!("{}-relay", BridgeTask::name()), async move { + while let Err(e) = start().await { + tracing::error!(target: "darwinia-crab", "[subscribe] Failed to start subscribe {:?}", e); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!(target: "darwinia-crab", "[subscribe] Try to restart subscription service."); + } + Ok(()) + }); + Ok(Self { _greet }) + } +} + +async fn start() -> color_eyre::Result<()> { + let bridge_config: BridgeConfig = Config::restore(Names::BridgeDarwiniaCrab)?; + + let client_crab = bridge_config.crab.to_crab_client().await?; + let client_darwinia = bridge_config.darwinia.to_darwinia_client().await?; + + let input = JustificationInput { + client_source: client_crab, + client_target: client_darwinia, + }; + let subscribe = SubscribeJustification::new(input); + subscribe.start().await?; + Ok(()) +} diff --git a/bridges/darwinia-crab/bridge/src/traits.rs b/bridges/darwinia-crab/bridge/src/traits.rs deleted file mode 100644 index 15543d204..000000000 --- a/bridges/darwinia-crab/bridge/src/traits.rs +++ /dev/null @@ -1,12 +0,0 @@ -/// Bridge-supported network definition. -/// -/// Used to abstract away CLI commands. -pub trait CliChain: relay_substrate_client::Chain { - /// Chain's current version of the runtime. - const RUNTIME_VERSION: sp_version::RuntimeVersion; - - /// Crypto keypair type used to send messages. - /// - /// In case of chains supporting multiple cryptos, pick one used by the CLI. - type KeyPair: sp_core::crypto::Pair; -} diff --git a/bridges/darwinia-crab/bridge/src/types.rs b/bridges/darwinia-crab/bridge/src/types.rs index adbe5c620..fd55403bf 100644 --- a/bridges/darwinia-crab/bridge/src/types.rs +++ b/bridges/darwinia-crab/bridge/src/types.rs @@ -1,16 +1,10 @@ use std::fmt::{Display, Formatter}; use std::str::FromStr; -use bp_messages::LaneId; -use relay_substrate_client::ChainRuntimeVersion; use serde::{Deserialize, Deserializer, Serialize, Serializer}; -use sp_core::crypto::Pair; -use crate::bridge::RuntimeVersionMode; use support_common::error::BridgerError; -use crate::traits::CliChain; - #[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, strum::EnumString)] #[strum(serialize_all = "kebab_case")] pub enum BridgeName { @@ -18,117 +12,24 @@ pub enum BridgeName { CrabToDarwinia, } -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct ChainInfo { - pub host: String, - pub port: u16, - pub signer: Option, - pub secure: bool, - pub signer_password: Option, - pub transactions_mortality: Option, - pub runtime_version_mode: Option, - pub spec_version: Option, - pub transaction_version: Option, -} - -impl ChainInfo { - /// Convert connection params into Substrate client. - pub async fn to_substrate_relay_chain( - &self, - ) -> color_eyre::Result> { - let chain_runtime_version = match self.runtime_version_mode { - Some(RuntimeVersionMode::Auto) => ChainRuntimeVersion::Auto, - Some(RuntimeVersionMode::Custom) => { - let spec_version = self.spec_version.ok_or_else(|| { - BridgerError::Custom("Missing spec_version config".to_string()) - })?; - let transaction_version = self.transaction_version.ok_or_else(|| { - BridgerError::Custom("Missing transaction_version config".to_string()) - })?; - ChainRuntimeVersion::Custom(spec_version, transaction_version) - } - Some(RuntimeVersionMode::Bundle) | None => ChainRuntimeVersion::Custom( - C::RUNTIME_VERSION.spec_version, - C::RUNTIME_VERSION.transaction_version, - ), - }; - Ok( - relay_substrate_client::Client::new(relay_substrate_client::ConnectionParams { - host: self.host.clone(), - port: self.port, - secure: self.secure, - chain_runtime_version, - }) - .await, - ) - } - - /// Parse signing params into chain-specific KeyPair. - pub fn to_keypair(&self) -> color_eyre::Result { - let signer = match self.signer.clone() { - Some(v) => v, - None => { - return Err(BridgerError::Custom(format!( - "The chain [{}:{}] not set signer", - self.host, self.port, - )) - .into()); - } - }; - C::KeyPair::from_string(&signer, self.signer_password.as_deref()) - .map_err(|e| BridgerError::Custom(format!("Secret string error: {:?}", e)).into()) - } - - pub fn transactions_mortality(&self) -> color_eyre::Result> { - self.transactions_mortality - .map(|transactions_mortality| { - if !(4..=65536).contains(&transactions_mortality) - || !transactions_mortality.is_power_of_two() - { - Err(BridgerError::Custom(format!( - "Transactions mortality {} is not a power of two in a [4; 65536] range", - transactions_mortality, - )) - .into()) - } else { - Ok(transactions_mortality) - } - }) - .transpose() - } -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct InitBridge { - pub bridge: BridgeName, - pub source: ChainInfo, - pub target: ChainInfo, -} - #[derive(Debug, Clone, PartialEq, Eq, Default)] -pub struct HexLaneId(pub LaneId); - -impl From for LaneId { - fn from(lane_id: HexLaneId) -> LaneId { - lane_id.0 - } -} +pub struct HexLaneId(pub [u8; 4]); -impl std::str::FromStr for HexLaneId { - type Err = hex::FromHexError; +impl FromStr for HexLaneId { + type Err = BridgerError; fn from_str(s: &str) -> Result { - let mut lane_id = LaneId::default(); - hex::decode_to_slice(s, &mut lane_id)?; - Ok(HexLaneId(lane_id)) + let hex = array_bytes::hex2array(s) + .map_err(|e| BridgerError::Hex(format!("Failed to parse lane id: {:?}", e)))?; + Ok(HexLaneId(hex)) } } impl Display for HexLaneId { fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { let lane_id = self.0; - let hex_text = hex::encode(lane_id); - f.write_str(&hex_text[..]) + let hex = array_bytes::bytes2hex("0x", lane_id.as_ref()); + f.write_str(&hex[..]) } } @@ -152,66 +53,3 @@ impl Serialize for HexLaneId { serializer.serialize_str(&hex_text[..]) } } - -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -pub struct PrometheusParamsInfo { - /// Do not expose a Prometheus metric endpoint. - pub no_prometheus: bool, - /// Expose Prometheus endpoint at given interface. - #[serde(skip_serializing_if = "String::is_empty")] - #[serde(default)] - pub prometheus_host: String, - /// Expose Prometheus endpoint at given port. - pub prometheus_port: u16, -} - -impl From for relay_utils::metrics::MetricsParams { - fn from(cli_params: PrometheusParamsInfo) -> relay_utils::metrics::MetricsParams { - if !cli_params.no_prometheus { - Some(relay_utils::metrics::MetricsAddress { - host: cli_params.prometheus_host, - port: cli_params.prometheus_port, - }) - .into() - } else { - None.into() - } - } -} - -#[derive(Debug, Clone)] -pub struct RelayHeadersAndMessagesInfo { - pub source: ChainInfo, - pub target: ChainInfo, - - pub lanes: Vec, - pub prometheus_params: PrometheusParamsInfo, - pub create_relayers_fund_accounts: bool, - pub only_mandatory_headers: bool, - - pub darwinia_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams, - pub crab_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams, -} - -#[derive(Debug, Clone)] -pub struct MessagesPalletOwnerSigningParams { - pub messages_pallet_owner: Option, - pub messages_pallet_owner_password: Option, -} - -#[allow(dead_code)] -impl MessagesPalletOwnerSigningParams { - /// Parse signing params into chain-specific KeyPair. - pub fn to_keypair(&self) -> color_eyre::Result> { - let messages_pallet_owner = match self.messages_pallet_owner { - Some(ref messages_pallet_owner) => messages_pallet_owner, - None => return Ok(None), - }; - Chain::KeyPair::from_string( - messages_pallet_owner, - self.messages_pallet_owner_password.as_deref(), - ) - .map_err(|e| BridgerError::Custom(format!("Secret string error: {:?}", e)).into()) - .map(Some) - } -} diff --git a/bridges/darwinia-crab/rust-toolchain.toml b/bridges/darwinia-crab/rust-toolchain.toml index c03819d86..7f5079439 100644 --- a/bridges/darwinia-crab/rust-toolchain.toml +++ b/bridges/darwinia-crab/rust-toolchain.toml @@ -1,5 +1,4 @@ [toolchain] -channel = "nightly-2021-12-07" +channel = "stable" components = ["cargo", "clippy", "rustc", "rustfmt", "rust-src"] profile = "minimal" -targets = ["wasm32-unknown-unknown"] diff --git a/bridges/darwinia-ethereum/Cargo.lock b/bridges/darwinia-ethereum/Cargo.lock index a13bc085d..4dd81cbed 100644 --- a/bridges/darwinia-ethereum/Cargo.lock +++ b/bridges/darwinia-ethereum/Cargo.lock @@ -64,9 +64,9 @@ checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" [[package]] name = "array-bytes" -version = "1.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a14a3cc05445830e3f8aed09cc974007c2c9026729f77c09616c0bcbe78d973" +checksum = "30725d201df311b571b927e5a175a394e3763e11451c2e6415a84dc6e891fb6d" [[package]] name = "array-init" @@ -162,6 +162,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + [[package]] name = "base64" version = "0.13.0" @@ -198,22 +204,10 @@ 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.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b" -dependencies = [ - "funty 2.0.0", - "radium 0.7.0", + "funty", + "radium", "tap", - "wyz 0.5.0", + "wyz", ] [[package]] @@ -272,6 +266,72 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "bp-darwinia" +version = "0.1.0" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" +dependencies = [ + "bp-darwinia-core", + "bp-messages", + "bp-runtime", + "frame-support", + "sp-api", + "sp-runtime", + "sp-std", + "sp-version", +] + +[[package]] +name = "bp-darwinia-core" +version = "0.1.0" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" +dependencies = [ + "bp-messages", + "bp-runtime", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "bp-messages" +version = "0.1.0" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" +dependencies = [ + "bitvec", + "bp-runtime", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "serde 1.0.136", + "sp-core", + "sp-std", +] + +[[package]] +name = "bp-runtime" +version = "0.1.0" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" +dependencies = [ + "frame-support", + "hash-db", + "num-traits 0.2.14", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", +] + [[package]] name = "bridge-darwinia-ethereum" version = "0.5.7" @@ -285,7 +345,7 @@ dependencies = [ "component-state", "lifeline", "microkv", - "parity-scale-codec 2.3.1", + "parity-scale-codec", "postage", "rand 0.8.5", "serde 1.0.136", @@ -401,8 +461,9 @@ name = "client-darwinia" version = "0.5.7" dependencies = [ "array-bytes", - "parity-scale-codec 3.1.2", - "secp256k1 0.20.3", + "bp-darwinia", + "parity-scale-codec", + "secp256k1", "serde 1.0.136", "serde_json", "shadow-liketh", @@ -458,7 +519,7 @@ dependencies = [ "array-bytes", "color-eyre", "reqwest", - "secp256k1 0.20.3", + "secp256k1", "serde 1.0.136", "thiserror", "tracing", @@ -929,27 +990,99 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.0.0" +version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" +checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" dependencies = [ "cfg-if 1.0.0", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.136", ] [[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +name = "frame-support" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "bitflags", + "frame-metadata", + "frame-support-procedural", + "impl-trait-for-tuples", + "log", + "once_cell", + "parity-scale-codec", + "paste", + "scale-info", + "serde 1.0.136", + "smallvec 1.8.0", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "frame-support-procedural" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "Inflector", + "frame-support-procedural-tools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "frame-support-procedural-tools" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "frame-support-procedural-tools-derive", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "frame-support-procedural-tools-derive" +version = "3.0.0" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "frame-system" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "frame-support", + "log", + "parity-scale-codec", + "scale-info", + "serde 1.0.136", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", +] [[package]] name = "funty" -version = "2.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" +checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" [[package]] name = "futures" @@ -1146,12 +1279,6 @@ name = "hashbrown" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" - -[[package]] -name = "hashbrown" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758" dependencies = [ "ahash", ] @@ -1162,7 +1289,7 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" dependencies = [ - "base64", + "base64 0.13.0", "bitflags", "bytes", "headers-core", @@ -1190,12 +1317,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - [[package]] name = "hermit-abi" version = "0.1.19" @@ -1250,7 +1371,7 @@ checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.1", ] [[package]] @@ -1291,7 +1412,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.1", "pin-project-lite", "socket2", "tokio", @@ -1349,16 +1470,7 @@ 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 3.1.2", + "parity-scale-codec", ] [[package]] @@ -1422,7 +1534,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" dependencies = [ "autocfg", - "hashbrown 0.11.2", + "hashbrown", "serde 1.0.136", ] @@ -1450,6 +1562,12 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + [[package]] name = "itoa" version = "1.0.1" @@ -1581,18 +1699,18 @@ checksum = "ad5c14e80759d0939d013e6ca49930e59fc53dd8e5009132f76240c179380c09" [[package]] name = "libsecp256k1" -version = "0.7.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0452aac8bab02242429380e9b2f94ea20cea2b37e2c1777a1358799bbe97f37" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" dependencies = [ "arrayref", - "base64", + "base64 0.12.3", "digest 0.9.0", "hmac-drbg", "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand 0.7.3", "serde 1.0.136", "sha2 0.9.9", "typenum", @@ -1600,9 +1718,9 @@ dependencies = [ [[package]] name = "libsecp256k1-core" -version = "0.3.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be9b9bb642d8522a44d533eab56c16c738301965504753b03ad1de3425d5451" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" dependencies = [ "crunchy", "digest 0.9.0", @@ -1611,18 +1729,18 @@ dependencies = [ [[package]] name = "libsecp256k1-gen-ecmult" -version = "0.3.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3038c808c55c87e8a172643a7d87187fc6c4174468159cb3090659d55bcb4809" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" dependencies = [ "libsecp256k1-core", ] [[package]] name = "libsecp256k1-gen-genmult" -version = "0.3.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8d6ba2cec9eacc40e6e8ccc98931840301f1006e95647ceb2dd5c3aa06f7c" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" dependencies = [ "libsecp256k1-core", ] @@ -1718,12 +1836,12 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "memory-db" -version = "0.29.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a" +checksum = "de006e09d04fc301a5f7e817b75aa49801c4479a8af753764416b085337ddcc5" dependencies = [ "hash-db", - "hashbrown 0.12.0", + "hashbrown", "parity-util-mem", ] @@ -1853,6 +1971,16 @@ dependencies = [ "num-traits 0.2.14", ] +[[package]] +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +dependencies = [ + "arrayvec 0.4.12", + "itoa 0.4.8", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -1976,24 +2104,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ "arrayvec 0.7.2", - "bitvec 0.20.4", + "bitvec", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive 2.3.1", - "serde 1.0.136", -] - -[[package]] -name = "parity-scale-codec" -version = "3.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066" -dependencies = [ - "arrayvec 0.7.2", - "bitvec 1.0.0", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive 3.1.2", + "parity-scale-codec-derive", "serde 1.0.136", ] @@ -2009,30 +2123,18 @@ dependencies = [ "syn", ] -[[package]] -name = "parity-scale-codec-derive" -version = "3.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "parity-util-mem" -version = "0.11.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f" +checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.12.0", + "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", - "parking_lot 0.12.0", - "primitive-types 0.11.1", + "parking_lot 0.11.2", + "primitive-types 0.10.1", "winapi", ] @@ -2223,7 +2325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e" dependencies = [ "fixed-hash", - "impl-codec 0.5.1", + "impl-codec", "impl-rlp", "impl-serde", "uint 0.9.3", @@ -2231,12 +2333,12 @@ dependencies = [ [[package]] name = "primitive-types" -version = "0.11.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", - "impl-codec 0.6.0", + "impl-codec", "impl-serde", "scale-info", "uint 0.9.3", @@ -2309,12 +2411,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - [[package]] name = "rand" version = "0.7.3" @@ -2477,7 +2573,7 @@ version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ - "base64", + "base64 0.13.0", "bytes", "encoding_rs", "futures-core", @@ -2609,7 +2705,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" dependencies = [ - "base64", + "base64 0.13.0", ] [[package]] @@ -2618,7 +2714,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" dependencies = [ - "base64", + "base64 0.13.0", ] [[package]] @@ -2638,23 +2734,23 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.0.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0563970d79bcbf3c537ce3ad36d859b30d36fc5b190efd227f1f7a84d7cf0d42" +checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ - "bitvec 1.0.0", + "bitvec", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info-derive", "serde 1.0.136", ] [[package]] name = "scale-info-derive" -version = "2.0.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7805950c36512db9e3251c970bb7ac425f326716941862205d612ab3b5e46e2" +checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -2715,15 +2811,6 @@ dependencies = [ "secp256k1-sys", ] -[[package]] -name = "secp256k1" -version = "0.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c42e6f1735c5f00f51e43e28d6634141f2bcad10931b2609ddd74a86d751260" -dependencies = [ - "secp256k1-sys", -] - [[package]] name = "secp256k1-sys" version = "0.4.2" @@ -2849,7 +2936,7 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -2870,7 +2957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -2956,7 +3043,7 @@ dependencies = [ "component-ethereum", "gql_client", "include_dir", - "parity-scale-codec 2.3.1", + "parity-scale-codec", "reqwest", "serde 1.0.136", "serde-aux", @@ -2973,7 +3060,7 @@ name = "shadow-types" version = "0.7.0" source = "git+https://github.com/darwinia-network/shadow.git#4c59aa4b10ef004c551ec0460d34b47ac6e7785c" dependencies = [ - "parity-scale-codec 2.3.1", + "parity-scale-codec", "rlp 0.4.6", "serde 1.0.136", "thiserror", @@ -3053,7 +3140,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4919971d141dbadaa0e82b5d369e2d7666c98e4625046140615ca363e50d4daa" dependencies = [ - "base64", + "base64 0.13.0", "bytes", "futures", "httparse", @@ -3068,7 +3155,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ - "base64", + "base64 0.13.0", "bytes", "futures", "httparse", @@ -3077,13 +3164,41 @@ dependencies = [ "sha-1 0.9.8", ] +[[package]] +name = "sp-api" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "hash-db", + "log", + "parity-scale-codec", + "sp-api-proc-macro", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-version", + "thiserror", +] + +[[package]] +name = "sp-api-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "blake2-rfc", + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sp-application-crypto" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acb4490364cb3b097a6755343e552495b0013778152300714be4647d107e9a2e" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.136", "sp-core", @@ -3093,13 +3208,12 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ef21f82cc10f75ed046b65e2f8048080ee76e59f1b8aed55c7150daebfd35b" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "integer-sqrt", "num-traits 0.2.14", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.136", "sp-debug-derive", @@ -3109,12 +3223,10 @@ dependencies = [ [[package]] name = "sp-core" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77963e2aa8fadb589118c3aede2e78b6c4bcf1c01d588fbf33e915b390825fbd" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "base58", - "bitflags", "blake2-rfc", "byteorder", "dyn-clonable", @@ -3129,18 +3241,17 @@ dependencies = [ "log", "merlin", "num-traits 0.2.14", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", - "parking_lot 0.12.0", - "primitive-types 0.11.1", + "parking_lot 0.11.2", + "primitive-types 0.10.1", "rand 0.7.3", "regex", "scale-info", "schnorrkel", - "secp256k1 0.21.3", "secrecy", "serde 1.0.136", - "sp-core-hashing", + "sha2 0.9.9", "sp-debug-derive", "sp-externalities", "sp-runtime-interface", @@ -3150,29 +3261,16 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", - "wasmi", - "zeroize", -] - -[[package]] -name = "sp-core-hashing" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec864a6a67249f0c8dd3d5acab43623a61677e85ff4f2f9b04b802d2fe780e83" -dependencies = [ - "blake2-rfc", - "byteorder", - "sha2 0.9.9", - "sp-std", "tiny-keccak", "twox-hash", + "wasmi", + "zeroize", ] [[package]] name = "sp-debug-derive" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d676664972e22a0796176e81e7bec41df461d1edf52090955cdab55f2c956ff2" +version = "3.0.0" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -3181,29 +3279,40 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcfd91f92a2a59224230a77c4a5d6f51709620c0aab4e51f108ccece6adc56f" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "environmental", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std", "sp-storage", ] +[[package]] +name = "sp-inherents" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "async-trait", + "impl-trait-for-tuples", + "parity-scale-codec", + "sp-core", + "sp-runtime", + "sp-std", + "thiserror", +] + [[package]] name = "sp-io" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "935fd3c71bad6811a7984cabb74d323b8ca3107024024c3eabb610e0182ba8d3" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "futures", "hash-db", "libsecp256k1", "log", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", - "secp256k1 0.21.3", + "parity-scale-codec", + "parking_lot 0.11.2", "sp-core", "sp-externalities", "sp-keystore", @@ -3219,43 +3328,38 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3261eddca8c8926e3e1de136a7980cb3afc3455247d9d6f3119d9b292f73aaee" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", + "derive_more", "futures", "merlin", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec", + "parking_lot 0.11.2", "schnorrkel", "sp-core", "sp-externalities", - "thiserror", ] [[package]] name = "sp-panic-handler" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2101f3c555fceafcfcfb0e61c55ea9ed80dc60bd77d54d9f25b369edb029e9a4" +version = "3.0.0" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "backtrace", - "lazy_static", - "regex", ] [[package]] name = "sp-runtime" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d8a8d5ab5d349c6cf9300af1721b7b6446ba63401dbb11c10a1d65197aa5f" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "parity-util-mem", "paste", "rand 0.7.3", @@ -3270,13 +3374,12 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158bf0305c75a50fc0e334b889568f519a126e32b87900c3f4251202dece7b4b" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", - "parity-scale-codec 3.1.2", - "primitive-types 0.11.1", + "parity-scale-codec", + "primitive-types 0.10.1", "sp-externalities", "sp-runtime-interface-proc-macro", "sp-std", @@ -3288,9 +3391,8 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ecb916b9664ed9f90abef0ff5a3e61454c1efea5861b2997e03f39b59b955f" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -3299,17 +3401,27 @@ dependencies = [ "syn", ] +[[package]] +name = "sp-staking" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-state-machine" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecee3b33eb78c99997676a571656bcc35db6886abecfddd13e76a73b5871c6c1" +version = "0.10.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", "num-traits 0.2.14", - "parity-scale-codec 3.1.2", - "parking_lot 0.12.0", + "parity-scale-codec", + "parking_lot 0.11.2", "rand 0.7.3", "smallvec 1.8.0", "sp-core", @@ -3325,18 +3437,16 @@ dependencies = [ [[package]] name = "sp-std" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14804d6069ee7a388240b665f17908d98386ffb0b5d39f89a4099fc7a2a4c03f" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" [[package]] name = "sp-storage" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dab53af846068e3e0716d3ccc70ea0db44035c79b2ed5821aaa6635039efa37" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "ref-cast", "serde 1.0.136", "sp-debug-derive", @@ -3345,11 +3455,10 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69a67e555d171c4238bd223393cda747dd20ec7d4f5fe5c042c056cb7fde9eda" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std", "tracing", "tracing-core", @@ -3358,13 +3467,12 @@ dependencies = [ [[package]] name = "sp-trie" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6fc34f4f291886914733e083b62708d829f3e6b8d7a7ca7fa8a55a3d7640b0b" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "memory-db", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "sp-core", "sp-std", @@ -3372,15 +3480,40 @@ dependencies = [ "trie-root", ] +[[package]] +name = "sp-version" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "impl-serde", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde 1.0.136", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", + "thiserror", +] + +[[package]] +name = "sp-version-proc-macro" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" +dependencies = [ + "parity-scale-codec", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "sp-wasm-interface" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d88debe690c2b24eaa9536a150334fcef2ae184c21a0e5b3e80135407a7d52" +version = "4.0.0-dev" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", - "log", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "sp-std", "wasmi", ] @@ -3393,11 +3526,12 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.15.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9799e6d412271cb2414597581128b03f3285f260ea49f5363d07df6a332b3e" +checksum = "77ef98aedad3dc52e10995e7ed15f1279e11d4da35795f5dac7305742d0feb66" dependencies = [ "Inflector", + "num-format", "proc-macro2", "quote", "serde 1.0.136", @@ -3440,7 +3574,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck 0.3.3", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -3462,7 +3596,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ - "heck 0.3.3", + "heck", "proc-macro2", "quote", "syn", @@ -3505,12 +3639,11 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4383f53951cfd154e561cb0eb595d4df36bf0a2a91302985f7fa7489d65461" +version = "0.17.0" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", - "bitvec 1.0.0", + "bitvec", "chameleon", "derivative", "frame-metadata", @@ -3519,27 +3652,27 @@ dependencies = [ "jsonrpsee", "log", "num-traits 0.2.14", - "parity-scale-codec 3.1.2", + "parity-scale-codec", "scale-info", "serde 1.0.136", "serde_json", "sp-core", "sp-runtime", + "sp-version", "subxt-macro", "thiserror", ] [[package]] name = "subxt-codegen" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19c04bfdcf4d4143b6208ff4fdfffef101b255d20c78f4812eb2da32bd644061" +version = "0.17.0" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", "frame-metadata", - "heck 0.4.0", - "parity-scale-codec 3.1.2", + "heck", + "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", "proc-macro2", @@ -3550,15 +3683,14 @@ dependencies = [ [[package]] name = "subxt-macro" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd262b4b74e41f94408ed5126983db90561cae0d23baafaa0224eb9f43abeafa" +version = "0.17.0" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", "frame-metadata", - "heck 0.4.0", - "parity-scale-codec 3.1.2", + "heck", + "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", "proc-macro2", @@ -3635,6 +3767,7 @@ dependencies = [ name = "support-toolkit" version = "0.5.7" dependencies = [ + "parity-scale-codec", "thiserror", ] @@ -3989,12 +4122,12 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.23.1" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" +checksum = "9eac131e334e81b6b3be07399482042838adcd7957aa0010231d0813e39e02fa" dependencies = [ "hash-db", - "hashbrown 0.12.0", + "hashbrown", "log", "rustc-hex", "smallvec 1.8.0", @@ -4002,9 +4135,9 @@ dependencies = [ [[package]] name = "trie-root" -version = "0.17.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" +checksum = "652931506d2c1244d7217a70b99f56718a7b4161b37f04e7cd868072a99f68cd" dependencies = [ "hash-db", ] @@ -4276,7 +4409,7 @@ version = "0.16.0" source = "git+https://github.com/wuminzhe/rust-web3.git?branch=master#b03cf9d1cd5c15705f1caf716f44fbc48ab4d707" dependencies = [ "arrayvec 0.5.2", - "base64", + "base64 0.13.0", "bytes", "derive_more", "ethabi", @@ -4291,7 +4424,7 @@ dependencies = [ "pin-project 1.0.10", "reqwest", "rlp 0.5.1", - "secp256k1 0.20.3", + "secp256k1", "serde 1.0.136", "serde_json", "soketto 0.5.0", @@ -4423,15 +4556,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" -[[package]] -name = "wyz" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" -dependencies = [ - "tap", -] - [[package]] name = "yaml-rust" version = "0.4.5" diff --git a/bridges/darwinia-ethereum/bridge/Cargo.toml b/bridges/darwinia-ethereum/bridge/Cargo.toml index 897109c46..332128883 100644 --- a/bridges/darwinia-ethereum/bridge/Cargo.toml +++ b/bridges/darwinia-ethereum/bridge/Cargo.toml @@ -31,7 +31,7 @@ strum = { version = "0.21", features = ["derive"] } lifeline = { git = "https://github.com/fewensa/lifeline-rs.git", branch = "threads-safely" } postage = "0.4" -array-bytes = "1.4" +array-bytes = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" codec = { package = "parity-scale-codec", version = "2" } diff --git a/bridges/darwinia-ethereum/bridge/src/service/check.rs b/bridges/darwinia-ethereum/bridge/src/service/check.rs index 793c01d26..b408dfb6b 100644 --- a/bridges/darwinia-ethereum/bridge/src/service/check.rs +++ b/bridges/darwinia-ethereum/bridge/src/service/check.rs @@ -105,9 +105,6 @@ async fn run(tracker: &Tracker) -> color_eyre::Result<()> { let verified = match client.ethereum().is_verified(&tx_hash, tx_index).await { Ok(v) => v, Err(e) => { - if e.is_restart_need() { - return Err(e.into()); - } tracing::error!( target: "darwinia-ethereum", "[ethereum] [check] Failed verified redeem. [{}]: {}. {:?}", @@ -115,7 +112,7 @@ async fn run(tracker: &Tracker) -> color_eyre::Result<()> { tx.block_hash, e ); - false + return Err(e.into()); } }; if verified { diff --git a/bridges/darwinia-ethereum/bridge/src/service/darwinia/scan_schedule_authorities_change_event.rs b/bridges/darwinia-ethereum/bridge/src/service/darwinia/scan_schedule_authorities_change_event.rs index 00144d2c1..f1be4489d 100644 --- a/bridges/darwinia-ethereum/bridge/src/service/darwinia/scan_schedule_authorities_change_event.rs +++ b/bridges/darwinia-ethereum/bridge/src/service/darwinia/scan_schedule_authorities_change_event.rs @@ -54,7 +54,7 @@ impl<'a> ScanScheduleAuthoritiesChangeEvent<'a> { tracing::trace!( target: "darwinia-ethereum", "[darwinia] [schedule-authorities-change] The ScheduleAuthoritiesChangeEvent message: {} don't need to sign and send it at block: {}", - array_bytes::bytes2hex("0x", message), + array_bytes::bytes2hex("0x", message.as_ref()), event.at_block_number ); continue; @@ -63,7 +63,7 @@ impl<'a> ScanScheduleAuthoritiesChangeEvent<'a> { tracing::info!( target: "darwinia-ethereum", "[darwinia] [schedule-authorities-change] Try sign and send authorities with message: {} at block: {}", - array_bytes::bytes2hex("0x", message), + array_bytes::bytes2hex("0x", message.as_ref()), event.at_block_number ); let ex = Extrinsic::SignAndSendAuthorities(message); diff --git a/bridges/pangolin-pangolinparachain/Cargo.lock b/bridges/pangolin-pangolinparachain/Cargo.lock index 0ef0abb7f..fcbfd4480 100644 --- a/bridges/pangolin-pangolinparachain/Cargo.lock +++ b/bridges/pangolin-pangolinparachain/Cargo.lock @@ -12,26 +12,6 @@ dependencies = [ "regex", ] -[[package]] -name = "abstract-bridge-s2s" -version = "0.5.7" -dependencies = [ - "array-bytes", - "async-trait", - "bp-header-chain", - "bp-messages", - "bp-runtime", - "bridge-runtime-common", - "jsonrpsee-core", - "parity-scale-codec", - "scale-info", - "serde 1.0.137", - "sp-core", - "sp-runtime", - "subxt", - "thiserror", -] - [[package]] name = "addr2line" version = "0.17.0" @@ -47,41 +27,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array 0.14.5", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - [[package]] name = "ahash" version = "0.7.6" @@ -128,9 +73,9 @@ dependencies = [ [[package]] name = "array-bytes" -version = "1.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a14a3cc05445830e3f8aed09cc974007c2c9026729f77c09616c0bcbe78d973" +checksum = "30725d201df311b571b927e5a175a394e3763e11451c2e6415a84dc6e891fb6d" [[package]] name = "array-init" @@ -141,12 +86,6 @@ dependencies = [ "nodrop", ] -[[package]] -name = "array_tool" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f8cb5d814eb646a863c4f24978cff2880c4be96ad8cde2c0f0678732902e271" - [[package]] name = "arrayref" version = "0.3.6" @@ -174,166 +113,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" -[[package]] -name = "asn1_der" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" - -[[package]] -name = "async-attributes" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "async-channel" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" -dependencies = [ - "concurrent-queue", - "event-listener", - "futures-core", -] - -[[package]] -name = "async-executor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "once_cell", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c290043c9a95b05d45e952fb6383c67bcb61471f60cfa21e890dba6654234f43" -dependencies = [ - "async-channel", - "async-executor", - "async-io", - "async-mutex", - "blocking", - "futures-lite", - "num_cpus", - "once_cell", -] - -[[package]] -name = "async-io" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" -dependencies = [ - "concurrent-queue", - "futures-lite", - "libc", - "log", - "once_cell", - "parking", - "polling", - "slab", - "socket2 0.4.4", - "waker-fn", - "winapi", -] - -[[package]] -name = "async-lock" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-mutex" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" -dependencies = [ - "event-listener", -] - -[[package]] -name = "async-process" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2c06e30a24e8c78a3987d07f0930edf76ef35e027e7bdb063fccafdad1f60c" -dependencies = [ - "async-io", - "blocking", - "cfg-if 1.0.0", - "event-listener", - "futures-lite", - "libc", - "once_cell", - "signal-hook", - "winapi", -] - -[[package]] -name = "async-std" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" -dependencies = [ - "async-attributes", - "async-channel", - "async-global-executor", - "async-io", - "async-lock", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "num_cpus", - "once_cell", - "pin-project-lite 0.2.9", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-std-resolver" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf3e776afdf3a2477ef4854b85ba0dff3bd85792f685fb3c68948b4d304e4f0" -dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "trust-dns-resolver", -] - -[[package]] -name = "async-task" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" - [[package]] name = "async-trait" version = "0.1.53" @@ -345,32 +124,6 @@ dependencies = [ "syn", ] -[[package]] -name = "asynchronous-codec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4401f0a3622dad2e0763fa79e0eb328bc70fb7dccfdd645341f00d671247d6" -dependencies = [ - "bytes 1.1.0", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite 0.2.9", -] - -[[package]] -name = "asynchronous-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690" -dependencies = [ - "bytes 1.1.0", - "futures-sink", - "futures-util", - "memchr", - "pin-project-lite 0.2.9", -] - [[package]] name = "atomic" version = "0.5.1" @@ -380,12 +133,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "atomic-waker" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" - [[package]] name = "atty" version = "0.2.14" @@ -403,16 +150,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backoff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721c249ab59cbc483ad4294c9ee2671835c1e43e9ffc277e6b4ecfef733cfdc5" -dependencies = [ - "instant", - "rand 0.7.3", -] - [[package]] name = "backtrace" version = "0.3.65" @@ -421,24 +158,18 @@ checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", ] -[[package]] -name = "base-x" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc19a4937b4fbd3fe3379793130e42060d10627a360f2127802b10b87e7baf74" - [[package]] name = "base58" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" @@ -479,17 +210,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "blake2" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - [[package]] name = "blake2-rfc" version = "0.2.18" @@ -500,50 +220,13 @@ dependencies = [ "constant_time_eq", ] -[[package]] -name = "blake2b_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq", -] - -[[package]] -name = "blake2s_simd" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e461a7034e85b211a4acb57ee2e6730b32912b06c08cc242243c39fc21ae6a2" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "constant_time_eq", -] - -[[package]] -name = "blake3" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "cc", - "cfg-if 0.1.10", - "constant_time_eq", - "crypto-mac 0.8.0", - "digest 0.9.0", -] - [[package]] name = "block-buffer" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" dependencies = [ - "block-padding 0.1.5", + "block-padding", "byte-tools", "byteorder", "generic-array 0.12.4", @@ -555,7 +238,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", "generic-array 0.14.5", ] @@ -568,30 +250,10 @@ dependencies = [ "byte-tools", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "blocking" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" -dependencies = [ - "async-channel", - "async-task", - "atomic-waker", - "fastrand", - "futures-lite", - "once_cell", -] - [[package]] name = "bp-darwinia-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -607,7 +269,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "finality-grandpa", "frame-support", @@ -623,19 +285,20 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-runtime", "frame-support", "parity-scale-codec", "scale-info", + "sp-runtime", "sp-std", ] [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-runtime", @@ -652,7 +315,7 @@ dependencies = [ [[package]] name = "bp-pangolin" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -667,22 +330,7 @@ dependencies = [ [[package]] name = "bp-pangolin-parachain" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-darwinia-core", - "bp-messages", - "bp-runtime", - "frame-support", - "sp-api", - "sp-runtime", - "sp-std", - "sp-version", -] - -[[package]] -name = "bp-pangoro" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -697,21 +345,20 @@ dependencies = [ [[package]] name = "bp-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-polkadot-core", "bp-runtime", "frame-support", "parity-scale-codec", "scale-info", - "serde 1.0.137", "sp-core", ] [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -731,7 +378,7 @@ dependencies = [ [[package]] name = "bp-rococo" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -748,7 +395,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "frame-support", "hash-db", @@ -766,7 +413,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -778,72 +425,32 @@ dependencies = [ "sp-std", ] -[[package]] -name = "bp-wococo" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-messages", - "bp-polkadot-core", - "bp-rococo", - "bp-runtime", - "parity-scale-codec", - "sp-api", - "sp-runtime", - "sp-std", -] - [[package]] name = "bridge-pangolin-pangolinparachain" version = "0.5.7" dependencies = [ - "async-trait", - "bp-darwinia-core", - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "bridge-runtime-common", + "array-bytes", + "bridge-s2s-traits", "client-pangolin", "client-pangolin-parachain", "client-rococo", "color-eyre", - "colored", - "component-subscan", "feemarket-s2s", - "frame-support", - "futures 0.3.21", - "futures-timer", - "hex", "lifeline", - "messages-relay", - "once_cell", - "pallet-bridge-messages", - "pallet-fee-market", "parity-scale-codec", "postage", - "relay-pangolin-client", - "relay-pangolin-parachain-client", - "relay-rococo-client", - "relay-substrate-client", - "relay-utils", + "relay-s2s", "serde 1.0.137", "serde_json", "sp-core", - "sp-finality-grandpa", "sp-runtime", - "sp-trie", - "sp-version", "structopt", "strum", "subquery-parachain", "subquery-s2s", - "substrate-relay-helper", - "subxt", "support-common", "support-lifeline", - "support-terminal", + "support-toolkit", "tokio", "tracing", ] @@ -851,7 +458,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -874,10 +481,24 @@ dependencies = [ ] [[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +name = "bridge-s2s-traits" +version = "0.5.7" +dependencies = [ + "array-bytes", + "async-trait", + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", + "jsonrpsee-core", + "parity-scale-codec", + "scale-info", + "serde 1.0.137", + "sp-core", + "sp-runtime", + "subxt", + "thiserror", +] [[package]] name = "bumpalo" @@ -903,44 +524,17 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" -[[package]] -name = "cache-padded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" - -[[package]] -name = "castaway" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" - [[package]] name = "cc" version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" -dependencies = [ - "jobserver", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" @@ -948,31 +542,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chacha20" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee7ad89dc1128635074c268ee661f90c3f7e83d9fd12910608c36b47d6c3412" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures 0.1.5", - "zeroize", -] - -[[package]] -name = "chacha20poly1305" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1580317203210c517b6d44794abfbe600698276db18127e37ad3e69bf5e848e5" -dependencies = [ - "aead", - "chacha20", - "cipher", - "poly1305", - "zeroize", -] - [[package]] name = "chameleon" version = "0.1.0" @@ -988,30 +557,10 @@ dependencies = [ "libc", "num-integer", "num-traits 0.2.15", - "time 0.1.44", + "time", "winapi", ] -[[package]] -name = "cid" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff0e3bc0b6446b3f9663c1a6aba6ef06c5aeaa1bc92bd18077be337198ab9768" -dependencies = [ - "multibase", - "multihash 0.13.2", - "unsigned-varint 0.5.1", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array 0.14.5", -] - [[package]] name = "clap" version = "2.34.0" @@ -1031,14 +580,14 @@ dependencies = [ name = "client-pangolin" version = "0.5.7" dependencies = [ - "abstract-bridge-s2s", "array-bytes", "async-trait", "bp-pangolin", + "bridge-s2s-traits", + "feemarket-s2s-traits", "finality-grandpa", "parity-scale-codec", "serde 1.0.137", - "serde_json", "sp-core", "sp-finality-grandpa", "sp-runtime", @@ -1053,8 +602,16 @@ name = "client-pangolin-parachain" version = "0.5.7" dependencies = [ "array-bytes", + "async-trait", + "bp-pangolin-parachain", + "bridge-s2s-traits", + "feemarket-s2s-traits", + "finality-grandpa", "parity-scale-codec", "serde 1.0.137", + "sp-core", + "sp-finality-grandpa", + "sp-runtime", "subxt", "support-toolkit", "thiserror", @@ -1066,25 +623,21 @@ name = "client-rococo" version = "0.5.7" dependencies = [ "array-bytes", - "jsonrpsee", + "async-trait", + "bp-rococo", + "bridge-s2s-traits", + "finality-grandpa", "parity-scale-codec", "serde 1.0.137", "sp-core", + "sp-finality-grandpa", + "sp-runtime", "subxt", "support-toolkit", "thiserror", "tracing", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "color-eyre" version = "0.5.11" @@ -1112,17 +665,6 @@ dependencies = [ "tracing-error", ] -[[package]] -name = "colored" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" -dependencies = [ - "atty", - "lazy_static", - "winapi", -] - [[package]] name = "component-subscan" version = "0.5.7" @@ -1136,15 +678,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "concurrent-queue" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" -dependencies = [ - "cache-padded", -] - [[package]] name = "config" version = "0.11.0" @@ -1161,12 +694,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "const_fn" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" - [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1195,15 +722,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" -[[package]] -name = "cpufeatures" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c99696f6c9dd7f35d486b9d04d7e6e202aa3e8c40d553f2fdf5e7e0c6a71ef" -dependencies = [ - "libc", -] - [[package]] name = "cpufeatures" version = "0.2.2" @@ -1213,57 +731,13 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" -dependencies = [ - "autocfg", - "cfg-if 1.0.0", - "crossbeam-utils", - "lazy_static", - "memoffset", - "scopeguard", -] - [[package]] name = "crossbeam-queue" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -1273,7 +747,7 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "lazy_static", ] @@ -1303,67 +777,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctor" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher", -] - -[[package]] -name = "cuckoofilter" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b810a8449931679f64cd7eef1bbd0fa315801b6d5d9cdc1ace2804d6529eee18" -dependencies = [ - "byteorder", - "fnv", - "rand 0.7.3", -] - -[[package]] -name = "curl" -version = "0.4.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d855aeef205b43f65a5001e0997d81f8efca7badad4fad7d897aa7f0d0651f" -dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2 0.4.4", - "winapi", -] - -[[package]] -name = "curl-sys" -version = "0.4.55+curl-7.83.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23734ec77368ec583c2e61dd3f0b0e5c98b93abe6d2a004ca06b91dd7e3e2762" -dependencies = [ - "cc", - "libc", - "libnghttp2-sys", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "winapi", -] - [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -1425,32 +838,6 @@ dependencies = [ "syn", ] -[[package]] -name = "data-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" - -[[package]] -name = "data-encoding-macro" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86927b7cd2fe88fa698b87404b287ab98d1a0063a34071d92e575b72d3029aca" -dependencies = [ - "data-encoding", - "data-encoding-macro-internal", -] - -[[package]] -name = "data-encoding-macro-internal" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" -dependencies = [ - "data-encoding", - "syn", -] - [[package]] name = "derivative" version = "2.2.0" @@ -1471,7 +858,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version", "syn", ] @@ -1513,28 +900,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "dns-parser" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4d33be9473d06f75f58220f71f7a9317aca647dc061dbd3c361b0bef505fbea" -dependencies = [ - "byteorder", - "quick-error", -] - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - [[package]] name = "downcast-rs" version = "1.2.0" @@ -1603,80 +968,33 @@ version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] -name = "enum-as-inner" -version = "0.3.4" +name = "environmental" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" -dependencies = [ - "heck 0.4.0", - "proc-macro2", - "quote", - "syn", -] +checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" [[package]] -name = "env_logger" -version = "0.7.1" +name = "ethbloom" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" dependencies = [ - "atty", - "humantime 1.3.0", - "log", - "regex", - "termcolor", + "crunchy", + "fixed-hash", + "impl-rlp", + "impl-serde", + "tiny-keccak", ] [[package]] -name = "env_logger" -version = "0.8.4" +name = "ethereum-types" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime 2.1.0", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "environmental" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" - -[[package]] -name = "erased-serde" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" -dependencies = [ - "serde 1.0.137", -] - -[[package]] -name = "ethbloom" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" dependencies = [ "ethbloom", "fixed-hash", @@ -1686,12 +1004,6 @@ dependencies = [ "uint", ] -[[package]] -name = "event-listener" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" - [[package]] name = "eyre" version = "0.6.8" @@ -1722,21 +1034,27 @@ name = "feemarket-s2s" version = "0.5.7" dependencies = [ "async-trait", - "bp-messages", + "bridge-s2s-traits", "component-subscan", - "frame-support", - "messages-relay", - "pallet-fee-market", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", + "feemarket-s2s-traits", "serde 1.0.137", - "sp-core", - "sp-runtime", + "support-toolkit", "thiserror", "tracing", ] +[[package]] +name = "feemarket-s2s-traits" +version = "0.5.7" +dependencies = [ + "async-trait", + "bp-runtime", + "pallet-fee-market", + "parity-scale-codec", + "subxt", + "thiserror", +] + [[package]] name = "finality-grandpa" version = "0.14.4" @@ -1744,7 +1062,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a" dependencies = [ "either", - "futures 0.3.21", + "futures", "futures-timer", "log", "num-traits 0.2.15", @@ -1753,21 +1071,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "finality-relay" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "async-std", - "async-trait", - "backoff", - "bp-header-chain", - "futures 0.3.21", - "log", - "num-traits 0.2.15", - "relay-utils", -] - [[package]] name = "fixed-hash" version = "0.7.0" @@ -1780,25 +1083,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - -[[package]] -name = "flate2" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" -dependencies = [ - "cfg-if 1.0.0", - "crc32fast", - "libc", - "libz-sys", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" @@ -1820,14 +1104,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "fork-tree" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", -] - [[package]] name = "form_urlencoded" version = "1.0.1" @@ -1835,13 +1111,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "frame-system", @@ -1864,7 +1140,7 @@ version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "parity-scale-codec", "scale-info", "serde 1.0.137", @@ -1873,7 +1149,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "bitflags", "frame-metadata", @@ -1900,7 +1176,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1912,7 +1188,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -1924,7 +1200,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -1934,7 +1210,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "log", @@ -1954,12 +1230,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.21" @@ -2009,21 +1279,6 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" -[[package]] -name = "futures-lite" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite 0.2.9", - "waker-fn", -] - [[package]] name = "futures-macro" version = "0.3.21" @@ -2035,17 +1290,6 @@ dependencies = [ "syn", ] -[[package]] -name = "futures-rustls" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1387e07917c711fb4ee4f48ea0adb04a3c9739e53ef85bf43ae1edc2937a8b" -dependencies = [ - "futures-io", - "rustls 0.19.1", - "webpki 0.21.4", -] - [[package]] name = "futures-sink" version = "0.3.21" @@ -2070,7 +1314,6 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -2078,7 +1321,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite", "pin-utils", "slab", ] @@ -2108,7 +1351,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -2121,45 +1364,24 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.10.0+wasi-snapshot-preview1", ] -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug 0.3.0", - "polyval", -] - [[package]] name = "gimli" version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" -[[package]] -name = "gloo-timers" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "gql_client" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d817a5d0b2a4948deae8550e12ae5eff3a874f8b66090b5863a2dcc917a59a61" +checksum = "a2ad0b978ded703acd23762f99e0f701450c9d0066912c0d7f9bf65bf017d87d" dependencies = [ + "log", "reqwest", "serde 1.0.137", "serde_json", @@ -2171,7 +1393,7 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", "futures-core", "futures-sink", @@ -2217,12 +1439,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - [[package]] name = "hermit-abi" version = "0.1.19" @@ -2238,12 +1454,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - [[package]] name = "hmac" version = "0.8.1" @@ -2275,26 +1485,15 @@ dependencies = [ "hmac 0.8.1", ] -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - [[package]] name = "http" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" dependencies = [ - "bytes 1.1.0", + "bytes", "fnv", - "itoa", + "itoa 1.0.2", ] [[package]] @@ -2303,9 +1502,9 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ - "bytes 1.1.0", + "bytes", "http", - "pin-project-lite 0.2.9", + "pin-project-lite", ] [[package]] @@ -2320,28 +1519,13 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -2350,9 +1534,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", - "pin-project-lite 0.2.9", - "socket2 0.4.4", + "itoa 1.0.2", + "pin-project-lite", + "socket2", "tokio", "tower-service", "tracing", @@ -2367,7 +1551,7 @@ checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ "http", "hyper", - "rustls 0.20.5", + "rustls", "tokio", "tokio-rustls", ] @@ -2378,7 +1562,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.1.0", + "bytes", "hyper", "native-tls", "tokio", @@ -2391,17 +1575,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.2.3" @@ -2413,43 +1586,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "if-addrs" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2273e421f7c4f0fc99e1934fe4776f59d8df2972f4199d703fc0da9f2a9f73de" -dependencies = [ - "if-addrs-sys", - "libc", - "winapi", -] - -[[package]] -name = "if-addrs-sys" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de74b9dd780476e837e5eb5ab7c88b49ed304126e412030a0adba99c8efe79ea" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "if-watch" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179" -dependencies = [ - "async-io", - "futures 0.3.21", - "futures-lite", - "if-addrs", - "ipnet", - "libc", - "log", - "winapi", -] - [[package]] name = "impl-codec" version = "0.5.1" @@ -2529,7 +1665,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2541,24 +1677,6 @@ dependencies = [ "num-traits 0.2.15", ] -[[package]] -name = "ip_network" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" - -[[package]] -name = "ipconfig" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" -dependencies = [ - "socket2 0.3.19", - "widestring", - "winapi", - "winreg 0.6.2", -] - [[package]] name = "ipnet" version = "2.5.0" @@ -2566,40 +1684,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] -name = "isahc" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" -dependencies = [ - "async-channel", - "castaway", - "crossbeam-utils", - "curl", - "curl-sys", - "encoding_rs", - "event-listener", - "futures-lite", - "http", - "log", - "mime", - "once_cell", - "polling", - "slab", - "sluice", - "tracing", - "tracing-futures", - "url 2.2.2", - "waker-fn", -] - -[[package]] -name = "itertools" -version = "0.10.3" +name = "itoa" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" -dependencies = [ - "either", -] +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" @@ -2607,15 +1695,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" -[[package]] -name = "jobserver" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.57" @@ -2626,698 +1705,109 @@ dependencies = [ ] [[package]] -name = "jsonpath_lib" -version = "0.2.6" +name = "jsonrpsee" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61352ec23883402b7d30b3313c16cbabefb8907361c4eb669d990cbb87ceee5a" +checksum = "05fd8cd6c6b1bbd06881d2cf88f1fc83cc36c98f2219090f839115fb4a956cb9" dependencies = [ - "array_tool", - "env_logger 0.7.1", - "log", - "serde 1.0.137", - "serde_json", + "jsonrpsee-client-transport", + "jsonrpsee-core", ] [[package]] -name = "jsonrpc-client-transports" -version = "18.0.0" +name = "jsonrpsee-client-transport" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a" +checksum = "3303cdf246e6ab76e2866fb3d9acb6c76a068b1b28bd923a1b7a8122257ad7b5" dependencies = [ - "derive_more", - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-pubsub", - "log", - "serde 1.0.137", - "serde_json", - "url 1.7.2", + "futures", + "http", + "jsonrpsee-core", + "jsonrpsee-types", + "pin-project 1.0.10", + "rustls-native-certs", + "soketto", + "thiserror", + "tokio", + "tokio-rustls", + "tokio-util 0.6.10", + "tracing", + "webpki-roots", ] [[package]] -name = "jsonrpc-core" -version = "18.0.0" +name = "jsonrpsee-core" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" +checksum = "f220b5a238dc7992b90f1144fbf6eaa585872c9376afe6fe6863ffead6191bf3" dependencies = [ - "futures 0.3.21", - "futures-executor", + "anyhow", + "arrayvec 0.7.2", + "async-trait", + "beef", + "futures-channel", "futures-util", - "log", + "hyper", + "jsonrpsee-types", + "rustc-hash", "serde 1.0.137", - "serde_derive", "serde_json", + "soketto", + "thiserror", + "tokio", + "tracing", ] [[package]] -name = "jsonrpc-core-client" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0" -dependencies = [ - "futures 0.3.21", - "jsonrpc-client-transports", -] - -[[package]] -name = "jsonrpc-derive" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b939a78fa820cdfcb7ee7484466746a7377760970f6f9c6fe19f9edcc8a38d2" -dependencies = [ - "proc-macro-crate 0.1.5", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "jsonrpc-pubsub" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011" -dependencies = [ - "futures 0.3.21", - "jsonrpc-core", - "lazy_static", - "log", - "parking_lot 0.11.2", - "rand 0.7.3", - "serde 1.0.137", -] - -[[package]] -name = "jsonrpsee" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05fd8cd6c6b1bbd06881d2cf88f1fc83cc36c98f2219090f839115fb4a956cb9" -dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-proc-macros", - "jsonrpsee-types", - "jsonrpsee-ws-client", -] - -[[package]] -name = "jsonrpsee-client-transport" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3303cdf246e6ab76e2866fb3d9acb6c76a068b1b28bd923a1b7a8122257ad7b5" -dependencies = [ - "futures 0.3.21", - "http", - "jsonrpsee-core", - "jsonrpsee-types", - "pin-project 1.0.10", - "rustls-native-certs", - "soketto 0.7.1", - "thiserror", - "tokio", - "tokio-rustls", - "tokio-util 0.6.10", - "tracing", - "webpki-roots 0.22.3", -] - -[[package]] -name = "jsonrpsee-core" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f220b5a238dc7992b90f1144fbf6eaa585872c9376afe6fe6863ffead6191bf3" -dependencies = [ - "anyhow", - "arrayvec 0.7.2", - "async-trait", - "beef", - "futures-channel", - "futures-util", - "hyper", - "jsonrpsee-types", - "rustc-hash", - "serde 1.0.137", - "serde_json", - "soketto 0.7.1", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "jsonrpsee-proc-macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4299ebf790ea9de1cb72e73ff2ae44c723ef264299e5e2d5ef46a371eb3ac3d8" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "jsonrpsee-types" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b3f601bbbe45cd63f5407b6f7d7950e08a7d4f82aa699ff41a4a5e9e54df58" -dependencies = [ - "anyhow", - "beef", - "serde 1.0.137", - "serde_json", - "thiserror", - "tracing", -] - -[[package]] -name = "jsonrpsee-ws-client" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aff425cee7c779e33920913bc695447416078ee6d119f443f3060feffa4e86b5" -dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", -] - -[[package]] -name = "keccak" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" - -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "kvdb" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512" -dependencies = [ - "parity-util-mem", - "smallvec 1.8.0", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec 0.5.2", - "bitflags", - "cfg-if 1.0.0", - "ryu", - "static_assertions", -] - -[[package]] -name = "libc" -version = "0.2.125" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" - -[[package]] -name = "libm" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" - -[[package]] -name = "libnghttp2-sys" -version = "0.1.7+1.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ed28aba195b38d5ff02b9170cbff627e336a20925e43b4945390401c5dc93f" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "libp2p" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9004c06878ef8f3b4b4067e69a140d87ed20bf777287f82223e49713b36ee433" -dependencies = [ - "atomic", - "bytes 1.1.0", - "futures 0.3.21", - "lazy_static", - "libp2p-core", - "libp2p-deflate", - "libp2p-dns", - "libp2p-floodsub", - "libp2p-gossipsub", - "libp2p-identify", - "libp2p-kad", - "libp2p-mdns", - "libp2p-mplex", - "libp2p-noise", - "libp2p-ping", - "libp2p-plaintext", - "libp2p-pnet", - "libp2p-relay", - "libp2p-request-response", - "libp2p-swarm", - "libp2p-swarm-derive", - "libp2p-tcp", - "libp2p-uds", - "libp2p-wasm-ext", - "libp2p-websocket", - "libp2p-yamux", - "multiaddr", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "smallvec 1.8.0", - "wasm-timer", -] - -[[package]] -name = "libp2p-core" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9b4abdeaa420593a297c8592f63fad4234f4b88dc9343b8fd8e736c35faa59" -dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures 0.3.21", - "futures-timer", - "lazy_static", - "libsecp256k1 0.5.0", - "log", - "multiaddr", - "multihash 0.14.0", - "multistream-select", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "ring", - "rw-stream-sink", - "sha2 0.9.9", - "smallvec 1.8.0", - "thiserror", - "unsigned-varint 0.7.1", - "void", - "zeroize", -] - -[[package]] -name = "libp2p-deflate" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66097fccc0b7f8579f90a03ea76ba6196332ea049fd07fd969490a06819dcdc8" -dependencies = [ - "flate2", - "futures 0.3.21", - "libp2p-core", -] - -[[package]] -name = "libp2p-dns" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58ff08b3196b85a17f202d80589e93b1660a574af67275706657fdc762e42c32" -dependencies = [ - "async-std-resolver", - "futures 0.3.21", - "libp2p-core", - "log", - "smallvec 1.8.0", - "trust-dns-resolver", -] - -[[package]] -name = "libp2p-floodsub" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404eca8720967179dac7a5b4275eb91f904a53859c69ca8d018560ad6beb214f" -dependencies = [ - "cuckoofilter", - "fnv", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec 1.8.0", -] - -[[package]] -name = "libp2p-gossipsub" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1cc48709bcbc3a3321f08a73560b4bbb4166a7d56f6fdb615bc775f4f91058e" -dependencies = [ - "asynchronous-codec 0.6.0", - "base64 0.13.0", - "byteorder", - "bytes 1.1.0", - "fnv", - "futures 0.3.21", - "hex_fmt", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "regex", - "sha2 0.9.9", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "wasm-timer", -] - -[[package]] -name = "libp2p-identify" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7b61f6cf07664fb97016c318c4d4512b3dd4cc07238607f3f0163245f99008e" -dependencies = [ - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "smallvec 1.8.0", - "wasm-timer", -] - -[[package]] -name = "libp2p-kad" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50ed78489c87924235665a0ab345b298ee34dff0f7ad62c0ba6608b2144fb75e" -dependencies = [ - "arrayvec 0.5.2", - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "either", - "fnv", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "prost", - "prost-build", - "rand 0.7.3", - "sha2 0.9.9", - "smallvec 1.8.0", - "uint", - "unsigned-varint 0.7.1", - "void", - "wasm-timer", -] - -[[package]] -name = "libp2p-mdns" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a29e6cbc2a24b8471b6567e580a0e8e7b70a6d0f0ea2be0844d1e842d7d4fa33" -dependencies = [ - "async-io", - "data-encoding", - "dns-parser", - "futures 0.3.21", - "if-watch", - "lazy_static", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.8.5", - "smallvec 1.8.0", - "socket2 0.4.4", - "void", -] - -[[package]] -name = "libp2p-mplex" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "313d9ea526c68df4425f580024e67a9d3ffd49f2c33de5154b1f5019816f7a99" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "log", - "nohash-hasher", - "parking_lot 0.11.2", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", -] - -[[package]] -name = "libp2p-noise" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1db7212f342b6ba7c981cc40e31f76e9e56cb48e65fa4c142ecaca5839523e" -dependencies = [ - "bytes 1.1.0", - "curve25519-dalek 3.2.0", - "futures 0.3.21", - "lazy_static", - "libp2p-core", - "log", - "prost", - "prost-build", - "rand 0.8.5", - "sha2 0.9.9", - "snow", - "static_assertions", - "x25519-dalek", - "zeroize", -] - -[[package]] -name = "libp2p-ping" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2482cfd9eb0b7a0baaf3e7b329dc4f2785181a161b1a47b7192f8d758f54a439" -dependencies = [ - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "rand 0.7.3", - "void", - "wasm-timer", -] - -[[package]] -name = "libp2p-plaintext" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b4783e5423870b9a5c199f65a7a3bc66d86ab56b2b9beebf3c338d889cf8e4" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "log", - "prost", - "prost-build", - "unsigned-varint 0.7.1", - "void", -] - -[[package]] -name = "libp2p-pnet" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cb4dd4b917e5b40ddefe49b96b07adcd8d342e0317011d175b7b2bb1dcc974" -dependencies = [ - "futures 0.3.21", - "log", - "pin-project 1.0.10", - "rand 0.7.3", - "salsa20", - "sha3", -] - -[[package]] -name = "libp2p-relay" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0133f6cfd81cdc16e716de2982e012c62e6b9d4f12e41967b3ee361051c622aa" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures 0.3.21", - "futures-timer", - "libp2p-core", - "libp2p-swarm", - "log", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "void", - "wasm-timer", -] - -[[package]] -name = "libp2p-request-response" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06cdae44b6821466123af93cbcdec7c9e6ba9534a8af9cdc296446d39416d241" -dependencies = [ - "async-trait", - "bytes 1.1.0", - "futures 0.3.21", - "libp2p-core", - "libp2p-swarm", - "log", - "lru", - "minicbor", - "rand 0.7.3", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", - "wasm-timer", -] - -[[package]] -name = "libp2p-swarm" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7083861341e1555467863b4cd802bea1e8c4787c0f7b5110097d0f1f3248f9a9" -dependencies = [ - "either", - "futures 0.3.21", - "libp2p-core", - "log", - "rand 0.7.3", - "smallvec 1.8.0", - "void", - "wasm-timer", -] - -[[package]] -name = "libp2p-swarm-derive" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8cb308d4fc854869f5abb54fdab0833d2cf670d407c745849dc47e6e08d79c" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "libp2p-tcp" -version = "0.29.0" +name = "jsonrpsee-types" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79edd26b6b4bb5feee210dcda562dca186940dfecb0024b979c3f50824b3bf28" +checksum = "c1b3f601bbbe45cd63f5407b6f7d7950e08a7d4f82aa699ff41a4a5e9e54df58" dependencies = [ - "async-io", - "futures 0.3.21", - "futures-timer", - "if-watch", - "ipnet", - "libc", - "libp2p-core", - "log", - "socket2 0.4.4", + "anyhow", + "beef", + "serde 1.0.137", + "serde_json", + "thiserror", + "tracing", ] [[package]] -name = "libp2p-uds" -version = "0.29.0" +name = "keccak" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280e793440dd4e9f273d714f4497325c72cddb0fe85a49f9a03c88f41dd20182" -dependencies = [ - "async-std", - "futures 0.3.21", - "libp2p-core", - "log", -] +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] -name = "libp2p-wasm-ext" -version = "0.29.0" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f553b7140fad3d7a76f50497b0ea591e26737d9607428a75509fc191e4d1b1f6" -dependencies = [ - "futures 0.3.21", - "js-sys", - "libp2p-core", - "parity-send-wrapper", - "wasm-bindgen", - "wasm-bindgen-futures", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "libp2p-websocket" -version = "0.30.0" +name = "lexical-core" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddf99dcbf5063e9d59087f61b1e85c686ceab2f5abedb472d32288065c0e5e27" +checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ - "either", - "futures 0.3.21", - "futures-rustls", - "libp2p-core", - "log", - "quicksink", - "rw-stream-sink", - "soketto 0.4.2", - "url 2.2.2", - "webpki-roots 0.21.1", + "arrayvec 0.5.2", + "bitflags", + "cfg-if", + "ryu", + "static_assertions", ] [[package]] -name = "libp2p-yamux" -version = "0.33.0" +name = "libc" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "214cc0dd9c37cbed27f0bb1eba0c41bbafdb93a8be5e9d6ae1e6b4b42cd044bf" -dependencies = [ - "futures 0.3.21", - "libp2p-core", - "parking_lot 0.11.2", - "thiserror", - "yamux", -] +checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" [[package]] -name = "libsecp256k1" -version = "0.5.0" +name = "libm" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd1137239ab33b41aa9637a88a28249e5e70c40a42ccc92db7f12cc356c1fcd7" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde 1.0.137", - "sha2 0.9.9", - "typenum", -] +checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" [[package]] name = "libsecp256k1" @@ -3367,18 +1857,6 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "libz-sys" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e7e15d7610cce1d9752e137625f14e61a28cd45929b6e12e47b50fe154ee2e" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "lifeline" version = "0.6.1" @@ -3411,15 +1889,6 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" -[[package]] -name = "linked_hash_set" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" -dependencies = [ - "linked-hash-map 0.5.4", -] - [[package]] name = "linregress" version = "0.4.4" @@ -3430,15 +1899,6 @@ dependencies = [ "statrs", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.7" @@ -3455,8 +1915,7 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", - "value-bag", + "cfg-if", ] [[package]] @@ -3468,21 +1927,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map 0.5.4", -] - -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - [[package]] name = "matchers" version = "0.0.1" @@ -3519,15 +1963,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memory-db" version = "0.27.0" @@ -3557,50 +1992,12 @@ dependencies = [ "zeroize", ] -[[package]] -name = "messages-relay" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "async-std", - "async-trait", - "bp-messages", - "bp-runtime", - "futures 0.3.21", - "hex", - "log", - "num-traits 0.2.15", - "parking_lot 0.11.2", - "relay-utils", - "sp-arithmetic", -] - [[package]] name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -[[package]] -name = "minicbor" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51aa5bb0ca22415daca596a227b507f880ad1b2318a87fa9325312a5d285ca0d" -dependencies = [ - "minicbor-derive", -] - -[[package]] -name = "minicbor-derive" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54999f917cd092b13904737e26631aa2b2b88d625db68e4bab461dcd8006c788" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "miniz_oxide" version = "0.5.1" @@ -3622,99 +2019,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "multiaddr" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ee4ea82141951ac6379f964f71b20876d43712bea8faf6dd1a375e08a46499" -dependencies = [ - "arrayref", - "bs58", - "byteorder", - "data-encoding", - "multihash 0.14.0", - "percent-encoding 2.1.0", - "serde 1.0.137", - "static_assertions", - "unsigned-varint 0.7.1", - "url 2.2.2", -] - -[[package]] -name = "multibase" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b78c60039650ff12e140ae867ef5299a58e19dded4d334c849dc7177083667e2" -dependencies = [ - "base-x", - "data-encoding", - "data-encoding-macro", -] - -[[package]] -name = "multihash" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac63698b887d2d929306ea48b63760431ff8a24fac40ddb22f9c7f49fb7cab" -dependencies = [ - "blake2b_simd", - "blake2s_simd", - "blake3", - "digest 0.9.0", - "generic-array 0.14.5", - "multihash-derive", - "sha2 0.9.9", - "sha3", - "unsigned-varint 0.5.1", -] - -[[package]] -name = "multihash" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8" -dependencies = [ - "digest 0.9.0", - "generic-array 0.14.5", - "multihash-derive", - "sha2 0.9.9", - "unsigned-varint 0.7.1", -] - -[[package]] -name = "multihash-derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "424f6e86263cd5294cbd7f1e95746b95aca0e0d66bff31e5a40d6baa87b4aa99" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "multistream-select" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab" -dependencies = [ - "bytes 1.1.0", - "futures 0.3.21", - "log", - "pin-project 1.0.10", - "smallvec 1.8.0", - "unsigned-varint 0.7.1", -] - [[package]] name = "nalgebra" version = "0.27.1" @@ -3768,12 +2072,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[package]] -name = "nohash-hasher" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" - [[package]] name = "nom" version = "5.1.2" @@ -3785,15 +2083,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ntapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" -dependencies = [ - "winapi", -] - [[package]] name = "num-bigint" version = "0.2.6" @@ -3814,6 +2103,16 @@ dependencies = [ "num-traits 0.2.15", ] +[[package]] +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +dependencies = [ + "arrayvec 0.4.12", + "itoa 0.4.8", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -3910,7 +2209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -3955,24 +2254,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55" [[package]] -name = "pallet-balances" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +name = "pad" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ad9b889f1b12e0b9ee24db044b5129150d5eada288edc800f789928dc8c0e3" dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "log", - "parity-scale-codec", - "scale-info", - "sp-runtime", - "sp-std", + "unicode-width", ] [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -3989,7 +2282,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-header-chain", "bp-runtime", @@ -4011,7 +2304,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-message-dispatch", @@ -4032,7 +2325,7 @@ dependencies = [ [[package]] name = "pallet-bridge-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-parachains", "bp-polkadot-core", @@ -4043,7 +2336,6 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "serde 1.0.137", "sp-core", "sp-runtime", "sp-std", @@ -4053,7 +2345,7 @@ dependencies = [ [[package]] name = "pallet-fee-market" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-messages", @@ -4073,7 +2365,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-benchmarking", "frame-support", @@ -4090,7 +2382,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "frame-system", @@ -4104,36 +2396,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-transaction-payment-rpc-runtime-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "pallet-transaction-payment", - "parity-scale-codec", - "sp-api", - "sp-runtime", -] - -[[package]] -name = "parachains-relay" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "async-std", - "async-trait", - "backoff", - "bp-parachains", - "bp-polkadot-core", - "futures 0.3.21", - "linked-hash-map 0.5.4", - "log", - "num-traits 0.2.15", - "parking_lot 0.11.2", - "relay-substrate-client", - "relay-utils", -] - [[package]] name = "parity-scale-codec" version = "2.3.1" @@ -4160,19 +2422,13 @@ dependencies = [ "syn", ] -[[package]] -name = "parity-send-wrapper" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" - [[package]] name = "parity-util-mem" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ethereum-types", "hashbrown", "impl-trait-for-tuples", @@ -4199,23 +2455,7 @@ dependencies = [ name = "parity-wasm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" - -[[package]] -name = "parking" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] +checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" [[package]] name = "parking_lot" @@ -4224,7 +2464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.8.5", ] @@ -4234,34 +2474,20 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.9.3", ] -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec 1.8.0", - "winapi", -] - [[package]] name = "parking_lot_core" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec 1.8.0", "winapi", ] @@ -4272,9 +2498,9 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec 1.8.0", "windows-sys", ] @@ -4303,37 +2529,12 @@ dependencies = [ "crypto-mac 0.11.1", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -[[package]] -name = "pest" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] - -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset", - "indexmap", -] - [[package]] name = "pin-project" version = "0.4.29" @@ -4374,12 +2575,6 @@ dependencies = [ "syn", ] -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.9" @@ -4398,48 +2593,12 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" -[[package]] -name = "polling" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "log", - "wepoll-ffi", - "winapi", -] - [[package]] name = "pollster" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" -[[package]] -name = "poly1305" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede" -dependencies = [ - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", - "universal-hash", -] - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures 0.2.2", - "opaque-debug 0.3.0", - "universal-hash", -] - [[package]] name = "postage" version = "0.4.1" @@ -4518,12 +2677,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" version = "1.0.38" @@ -4533,99 +2686,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "prometheus" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8425533e7122f0c3cc7a37e6244b16ad3a2cc32ae7ac6276e2a75da0d9c200d" -dependencies = [ - "cfg-if 1.0.0", - "fnv", - "lazy_static", - "parking_lot 0.11.2", - "regex", - "thiserror", -] - -[[package]] -name = "prost" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" -dependencies = [ - "bytes 1.1.0", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" -dependencies = [ - "bytes 1.1.0", - "heck 0.3.3", - "itertools", - "log", - "multimap", - "petgraph", - "prost", - "prost-types", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "prost-types" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" -dependencies = [ - "bytes 1.1.0", - "prost", -] - -[[package]] -name = "pwasm-utils" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "880b3384fb00b8f6ecccd5d358b93bd2201900ae3daad213791d1864f6441f5c" -dependencies = [ - "byteorder", - "log", - "parity-wasm", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quicksink" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77de3c815e5a160b1539c6592796801df2043ae35e123b46d73380cfa57af858" -dependencies = [ - "futures-core", - "futures-sink", - "pin-project-lite 0.1.12", -] - [[package]] name = "quote" version = "1.0.18" @@ -4738,36 +2798,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" -[[package]] -name = "rayon" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" -dependencies = [ - "autocfg", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.13" @@ -4784,7 +2814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.6", - "redox_syscall 0.2.13", + "redox_syscall", "thiserror", ] @@ -4835,139 +2865,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] -name = "relay-pangolin-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-darwinia-core", - "bp-header-chain", - "bp-message-dispatch", - "bp-messages", - "bp-pangolin", - "bp-pangolin-parachain", - "bp-pangoro", - "bp-rococo", - "bp-runtime", - "bridge-runtime-common", - "frame-support", - "pallet-bridge-dispatch", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "relay-pangolin-parachain-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-darwinia-core", - "bp-header-chain", - "bp-message-dispatch", - "bp-messages", - "bp-pangolin", - "bp-pangolin-parachain", - "bp-rococo", - "bp-runtime", - "bridge-runtime-common", - "frame-support", - "pallet-bridge-dispatch", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "relay-rococo-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "bp-header-chain", - "bp-message-dispatch", - "bp-messages", - "bp-polkadot-core", - "bp-rococo", - "bp-runtime", - "bp-wococo", - "bridge-runtime-common", - "frame-support", - "pallet-bridge-dispatch", - "pallet-bridge-messages", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "scale-info", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "relay-substrate-client" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" +name = "relay-s2s" +version = "0.5.7" dependencies = [ - "async-std", + "array-bytes", "async-trait", - "bp-header-chain", - "bp-messages", - "bp-runtime", - "finality-relay", - "frame-support", - "frame-system", - "futures 0.3.21", - "jsonrpsee", - "log", - "num-traits 0.2.15", - "pallet-balances", - "pallet-bridge-messages", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "parity-scale-codec", - "rand 0.7.3", - "relay-utils", - "sc-chain-spec", - "sc-rpc-api", - "sc-transaction-pool-api", - "serde 1.0.137", + "bridge-s2s-traits", + "once_cell", "sp-core", - "sp-finality-grandpa", - "sp-rpc", "sp-runtime", - "sp-storage", - "sp-trie", - "sp-version", + "subquery-parachain", + "subquery-s2s", + "support-toolkit", "thiserror", "tokio", -] - -[[package]] -name = "relay-utils" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "ansi_term", - "anyhow", - "async-std", - "async-trait", - "backoff", - "bp-runtime", - "env_logger 0.8.4", - "futures 0.3.21", - "isahc", - "jsonpath_lib", - "log", - "num-traits 0.2.15", - "serde_json", - "substrate-prometheus-endpoint", - "sysinfo", - "thiserror", - "time 0.2.27", + "tracing", ] [[package]] @@ -4986,7 +2898,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ "base64 0.13.0", - "bytes 1.1.0", + "bytes", "encoding_rs", "futures-core", "futures-util", @@ -5002,9 +2914,9 @@ dependencies = [ "log", "mime", "native-tls", - "percent-encoding 2.1.0", - "pin-project-lite 0.2.9", - "rustls 0.20.5", + "percent-encoding", + "pin-project-lite", + "rustls", "rustls-pemfile 0.3.0", "serde 1.0.137", "serde_json", @@ -5012,22 +2924,12 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls", - "url 2.2.2", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.22.3", - "winreg 0.10.1", -] - -[[package]] -name = "resolv-conf" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", + "webpki-roots", + "winreg", ] [[package]] @@ -5051,7 +2953,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" dependencies = [ - "bytes 1.1.0", + "bytes", "rustc-hex", ] @@ -5074,28 +2976,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustc_version" -version = "0.3.3" +name = "rustc-hex" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" @@ -5103,20 +2987,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.9", -] - -[[package]] -name = "rustls" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" -dependencies = [ - "base64 0.13.0", - "log", - "ring", - "sct 0.6.1", - "webpki 0.21.4", + "semver", ] [[package]] @@ -5127,8 +2998,8 @@ checksum = "a024a432ae760ab3bff924ad91ce1cfa52cb57ed16e1ef32d0d249cfee1a6c13" dependencies = [ "log", "ring", - "sct 0.7.0", - "webpki 0.22.0", + "sct", + "webpki", ] [[package]] @@ -5161,329 +3032,12 @@ dependencies = [ "base64 0.13.0", ] -[[package]] -name = "rw-stream-sink" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" -dependencies = [ - "futures 0.3.21", - "pin-project 0.4.29", - "static_assertions", -] - [[package]] name = "ryu" version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" -[[package]] -name = "salsa20" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecbd2eb639fd7cab5804a0837fe373cc2172d15437e804c054a9fb885cb923b0" -dependencies = [ - "cipher", -] - -[[package]] -name = "sc-allocator" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "log", - "sp-core", - "sp-wasm-interface", - "thiserror", -] - -[[package]] -name = "sc-block-builder" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", - "sc-client-api", - "sp-api", - "sp-block-builder", - "sp-blockchain", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", -] - -[[package]] -name = "sc-chain-spec" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "impl-trait-for-tuples", - "parity-scale-codec", - "sc-chain-spec-derive", - "sc-network", - "sc-telemetry", - "serde 1.0.137", - "serde_json", - "sp-core", - "sp-runtime", -] - -[[package]] -name = "sc-chain-spec-derive" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sc-client-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "fnv", - "futures 0.3.21", - "hash-db", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-executor", - "sc-transaction-pool-api", - "sc-utils", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-database", - "sp-externalities", - "sp-keystore", - "sp-runtime", - "sp-state-machine", - "sp-storage", - "sp-trie", - "substrate-prometheus-endpoint", -] - -[[package]] -name = "sc-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "libp2p", - "log", - "parking_lot 0.11.2", - "sc-client-api", - "sc-utils", - "serde 1.0.137", - "sp-api", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-runtime", - "sp-state-machine", - "substrate-prometheus-endpoint", - "thiserror", -] - -[[package]] -name = "sc-executor" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "lazy_static", - "libsecp256k1 0.6.0", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-executor-common", - "sc-executor-wasmi", - "sp-api", - "sp-core", - "sp-externalities", - "sp-io", - "sp-panic-handler", - "sp-runtime-interface", - "sp-tasks", - "sp-trie", - "sp-version", - "sp-wasm-interface", - "wasmi", -] - -[[package]] -name = "sc-executor-common" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "derive_more", - "environmental", - "parity-scale-codec", - "pwasm-utils", - "sc-allocator", - "sp-core", - "sp-maybe-compressed-blob", - "sp-serializer", - "sp-wasm-interface", - "thiserror", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "log", - "parity-scale-codec", - "sc-allocator", - "sc-executor-common", - "scoped-tls", - "sp-core", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", -] - -[[package]] -name = "sc-network" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-std", - "async-trait", - "asynchronous-codec 0.5.0", - "bitflags", - "bytes 1.1.0", - "cid", - "derive_more", - "either", - "fnv", - "fork-tree", - "futures 0.3.21", - "futures-timer", - "hex", - "ip_network", - "libp2p", - "linked-hash-map 0.5.4", - "linked_hash_set", - "log", - "lru", - "parity-scale-codec", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "prost", - "prost-build", - "rand 0.7.3", - "sc-block-builder", - "sc-client-api", - "sc-consensus", - "sc-peerset", - "sc-utils", - "serde 1.0.137", - "serde_json", - "smallvec 1.8.0", - "sp-arithmetic", - "sp-blockchain", - "sp-consensus", - "sp-core", - "sp-finality-grandpa", - "sp-runtime", - "substrate-prometheus-endpoint", - "thiserror", - "unsigned-varint 0.6.0", - "void", - "zeroize", -] - -[[package]] -name = "sc-peerset" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "libp2p", - "log", - "sc-utils", - "serde_json", - "wasm-timer", -] - -[[package]] -name = "sc-rpc-api" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "jsonrpc-core", - "jsonrpc-core-client", - "jsonrpc-derive", - "jsonrpc-pubsub", - "log", - "parity-scale-codec", - "parking_lot 0.11.2", - "sc-chain-spec", - "sc-transaction-pool-api", - "serde 1.0.137", - "serde_json", - "sp-core", - "sp-rpc", - "sp-runtime", - "sp-tracing", - "sp-version", - "thiserror", -] - -[[package]] -name = "sc-telemetry" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "chrono", - "futures 0.3.21", - "libp2p", - "log", - "parking_lot 0.11.2", - "pin-project 1.0.10", - "rand 0.7.3", - "serde 1.0.137", - "serde_json", - "thiserror", - "wasm-timer", -] - -[[package]] -name = "sc-transaction-pool-api" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "derive_more", - "futures 0.3.21", - "log", - "serde 1.0.137", - "sp-blockchain", - "sp-runtime", - "thiserror", -] - -[[package]] -name = "sc-utils" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "futures-timer", - "lazy_static", - "prometheus", -] - [[package]] name = "scale-info" version = "1.0.0" @@ -5491,7 +3045,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ "bitvec", - "cfg-if 1.0.0", + "cfg-if", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -5538,28 +3092,12 @@ dependencies = [ "zeroize", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "sct" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "sct" version = "0.7.0" @@ -5572,9 +3110,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] @@ -5598,26 +3136,8 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser 0.10.2", + "core-foundation-sys", + "libc", ] [[package]] @@ -5626,21 +3146,6 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" version = "0.8.23" @@ -5709,8 +3214,7 @@ version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "indexmap", - "itoa", + "itoa 1.0.2", "ryu", "serde 1.0.137", ] @@ -5731,7 +3235,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.2", "ryu", "serde 1.0.137", ] @@ -5755,27 +3259,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures 0.2.2", + "cfg-if", + "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", ] -[[package]] -name = "sha1" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" -dependencies = [ - "sha1_smol", -] - -[[package]] -name = "sha1_smol" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" - [[package]] name = "sha2" version = "0.8.2" @@ -5795,21 +3284,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures 0.2.2", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", "digest 0.9.0", - "keccak", "opaque-debug 0.3.0", ] @@ -5822,16 +3299,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "signal-hook" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.0" @@ -5865,26 +3332,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - -[[package]] -name = "sluice" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" -dependencies = [ - "async-channel", - "futures-core", - "futures-io", -] - [[package]] name = "smallvec" version = "0.6.14" @@ -5900,35 +3347,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" -[[package]] -name = "snow" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7" -dependencies = [ - "aes-gcm", - "blake2", - "chacha20poly1305", - "rand 0.8.5", - "rand_core 0.6.3", - "ring", - "rustc_version 0.3.3", - "sha2 0.9.9", - "subtle", - "x25519-dalek", -] - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi", -] - [[package]] name = "socket2" version = "0.4.4" @@ -5939,22 +3357,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "soketto" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5c71ed3d54db0a699f4948e1bb3e45b450fa31fe602621dee6680361d569c88" -dependencies = [ - "base64 0.12.3", - "bytes 0.5.6", - "flate2", - "futures 0.3.21", - "httparse", - "log", - "rand 0.7.3", - "sha-1", -] - [[package]] name = "soketto" version = "0.7.1" @@ -5962,8 +3364,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41d1c5305e39e09653383c2c7244f2f78b3bcae37cf50c64cb4789c9f5096ec2" dependencies = [ "base64 0.13.0", - "bytes 1.1.0", - "futures 0.3.21", + "bytes", + "futures", "httparse", "log", "rand 0.8.5", @@ -5973,7 +3375,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -5990,7 +3392,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.3", @@ -6002,7 +3404,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -6015,7 +3417,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "integer-sqrt", "num-traits 0.2.15", @@ -6027,72 +3429,23 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "sp-block-builder" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "parity-scale-codec", - "sp-api", - "sp-inherents", - "sp-runtime", - "sp-std", -] - -[[package]] -name = "sp-blockchain" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "futures 0.3.21", - "log", - "lru", - "parity-scale-codec", - "parking_lot 0.11.2", - "sp-api", - "sp-consensus", - "sp-database", - "sp-runtime", - "sp-state-machine", - "thiserror", -] - -[[package]] -name = "sp-consensus" -version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-trait", - "futures 0.3.21", - "futures-timer", - "log", - "parity-scale-codec", - "sp-core", - "sp-inherents", - "sp-runtime", - "sp-state-machine", - "sp-std", - "sp-version", - "thiserror", -] - [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "base58", "blake2-rfc", "byteorder", "dyn-clonable", "ed25519-dalek", - "futures 0.3.21", + "futures", "hash-db", "hash256-std-hasher", "hex", "impl-serde", "lazy_static", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "merlin", "num-traits 0.2.15", @@ -6112,6 +3465,7 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -6121,19 +3475,10 @@ dependencies = [ "zeroize", ] -[[package]] -name = "sp-database" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "kvdb", - "parking_lot 0.11.2", -] - [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -6143,7 +3488,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "environmental", "parity-scale-codec", @@ -6154,7 +3499,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "finality-grandpa", "log", @@ -6172,7 +3517,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -6186,11 +3531,11 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "futures 0.3.21", + "futures", "hash-db", - "libsecp256k1 0.6.0", + "libsecp256k1", "log", "parity-scale-codec", "parking_lot 0.11.2", @@ -6210,11 +3555,11 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "derive_more", - "futures 0.3.21", + "futures", "merlin", "parity-scale-codec", "parking_lot 0.11.2", @@ -6223,36 +3568,18 @@ dependencies = [ "sp-externalities", ] -[[package]] -name = "sp-maybe-compressed-blob" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "zstd", -] - [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "backtrace", ] -[[package]] -name = "sp-rpc" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "rustc-hash", - "serde 1.0.137", - "sp-core", -] - [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "either", "hash256-std-hasher", @@ -6274,7 +3601,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6291,7 +3618,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -6300,19 +3627,10 @@ dependencies = [ "syn", ] -[[package]] -name = "sp-serializer" -version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "serde 1.0.137", - "serde_json", -] - [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -6323,7 +3641,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -6346,12 +3664,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -6361,23 +3679,10 @@ dependencies = [ "sp-std", ] -[[package]] -name = "sp-tasks" -version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "log", - "sp-core", - "sp-externalities", - "sp-io", - "sp-runtime-interface", - "sp-std", -] - [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "futures-timer", @@ -6393,15 +3698,9 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde 1.0.137", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -6411,7 +3710,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "memory-db", @@ -6426,7 +3725,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -6442,7 +3741,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -6453,7 +3752,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -6468,12 +3767,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "standback" -version = "0.2.17" +name = "ss58-registry" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" +checksum = "77ef98aedad3dc52e10995e7ed15f1279e11d4da35795f5dac7305742d0feb66" dependencies = [ - "version_check", + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde 1.0.137", + "serde_json", + "unicode-xid", ] [[package]] @@ -6495,55 +3800,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde 1.0.137", - "serde_derive", - "syn", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde 1.0.137", - "serde_derive", - "serde_json", - "sha1", - "syn", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - [[package]] name = "strsim" version = "0.8.0" @@ -6573,7 +3829,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck 0.3.3", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -6595,7 +3851,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ - "heck 0.3.3", + "heck", "proc-macro2", "quote", "syn", @@ -6625,74 +3881,26 @@ dependencies = [ "async-trait", "gql_client", "hex", - "include_dir", - "serde 1.0.137", - "serde-aux", - "serde-hex", - "strum", - "thiserror", - "tracing", -] - -[[package]] -name = "substrate-bip39" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" -dependencies = [ - "hmac 0.11.0", - "pbkdf2 0.8.0", - "schnorrkel", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "substrate-prometheus-endpoint" -version = "0.9.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" -dependencies = [ - "async-std", - "derive_more", - "futures-util", - "hyper", - "log", - "prometheus", - "tokio", -] - -[[package]] -name = "substrate-relay-helper" -version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#3985f632dd3bc869de1ca27aa3da61df62ff780e" -dependencies = [ - "anyhow", - "async-std", - "async-trait", - "bp-header-chain", - "bp-messages", - "bp-parachains", - "bp-polkadot-core", - "bp-runtime", - "bridge-runtime-common", - "finality-grandpa", - "finality-relay", - "frame-support", - "futures 0.3.21", - "log", - "messages-relay", - "num-traits 0.2.15", - "pallet-bridge-grandpa", - "pallet-bridge-messages", - "pallet-bridge-parachains", - "parachains-relay", - "parity-scale-codec", - "relay-substrate-client", - "relay-utils", - "sp-core", - "sp-finality-grandpa", - "sp-runtime", + "include_dir", + "serde 1.0.137", + "serde-aux", + "serde-hex", + "strum", "thiserror", + "tracing", +] + +[[package]] +name = "substrate-bip39" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +dependencies = [ + "hmac 0.11.0", + "pbkdf2 0.8.0", + "schnorrkel", + "sha2 0.9.9", + "zeroize", ] [[package]] @@ -6704,14 +3912,14 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "bitvec", "chameleon", "derivative", "frame-metadata", - "futures 0.3.21", + "futures", "hex", "jsonrpsee", "log", @@ -6730,12 +3938,12 @@ dependencies = [ [[package]] name = "subxt-codegen" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", "frame-metadata", - "heck 0.3.3", + "heck", "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", @@ -6748,12 +3956,12 @@ dependencies = [ [[package]] name = "subxt-macro" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", "frame-metadata", - "heck 0.3.3", + "heck", "parity-scale-codec", "proc-macro-crate 0.1.5", "proc-macro-error", @@ -6791,20 +3999,12 @@ dependencies = [ "lifeline", ] -[[package]] -name = "support-terminal" -version = "0.5.7" -dependencies = [ - "colored", - "serde 1.0.137", - "structopt", - "strum", -] - [[package]] name = "support-toolkit" version = "0.5.7" dependencies = [ + "once_cell", + "pad", "parity-scale-codec", "thiserror", ] @@ -6832,23 +4032,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "sysinfo" -version = "0.15.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de94457a09609f33fec5e7fceaf907488967c6c7c75d64da6a7ce6ffdb8b5abd" -dependencies = [ - "cc", - "cfg-if 1.0.0", - "core-foundation-sys", - "doc-comment", - "libc", - "ntapi", - "once_cell", - "rayon", - "winapi", -] - [[package]] name = "tap" version = "1.0.1" @@ -6861,23 +4044,14 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "remove_dir_all", "winapi", ] -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - [[package]] name = "textwrap" version = "0.11.0" @@ -6927,44 +4101,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check", - "winapi", -] - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] - [[package]] name = "tiny-bip39" version = "0.8.2" @@ -7014,16 +4150,16 @@ version = "1.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" dependencies = [ - "bytes 1.1.0", + "bytes", "libc", "memchr", "mio", "num_cpus", "once_cell", "parking_lot 0.12.0", - "pin-project-lite 0.2.9", + "pin-project-lite", "signal-hook-registry", - "socket2 0.4.4", + "socket2", "tokio-macros", "winapi", ] @@ -7055,9 +4191,9 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.5", + "rustls", "tokio", - "webpki 0.22.0", + "webpki", ] [[package]] @@ -7066,12 +4202,12 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-io", "futures-sink", "log", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", ] @@ -7081,10 +4217,10 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" dependencies = [ - "bytes 1.1.0", + "bytes", "futures-core", "futures-sink", - "pin-project-lite 0.2.9", + "pin-project-lite", "tokio", "tracing", ] @@ -7110,9 +4246,8 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" dependencies = [ - "cfg-if 1.0.0", - "log", - "pin-project-lite 0.2.9", + "cfg-if", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -7148,16 +4283,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project 1.0.10", - "tracing", -] - [[package]] name = "tracing-log" version = "0.1.3" @@ -7223,49 +4348,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "trust-dns-proto" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca94d4e9feb6a181c690c4040d7a24ef34018d8313ac5044a61d21222ae24e31" -dependencies = [ - "async-trait", - "cfg-if 1.0.0", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.2.3", - "ipnet", - "lazy_static", - "log", - "rand 0.8.5", - "smallvec 1.8.0", - "thiserror", - "tinyvec", - "url 2.2.2", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecae383baad9995efaa34ce8e57d12c3f305e545887472a492b838f4b5cfb77a" -dependencies = [ - "cfg-if 1.0.0", - "futures-util", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "parking_lot 0.11.2", - "resolv-conf", - "smallvec 1.8.0", - "thiserror", - "trust-dns-proto", -] - [[package]] name = "try-lock" version = "0.2.3" @@ -7278,7 +4360,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rand 0.8.5", "static_assertions", ] @@ -7289,12 +4371,6 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" -[[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - [[package]] name = "uint" version = "0.9.3" @@ -7340,63 +4416,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array 0.14.5", - "subtle", -] - -[[package]] -name = "unsigned-varint" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fdeedbf205afadfe39ae559b75c3240f24e257d0ca27e85f85cb82aa19ac35" - -[[package]] -name = "unsigned-varint" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35581ff83d4101e58b582e607120c7f5ffb17e632a980b1f38334d76b36908b2" -dependencies = [ - "asynchronous-codec 0.5.0", - "bytes 1.1.0", - "futures-io", - "futures-util", -] - -[[package]] -name = "unsigned-varint" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836" -dependencies = [ - "asynchronous-codec 0.6.0", - "bytes 1.1.0", - "futures-io", - "futures-util", -] - [[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.2.2" @@ -7404,9 +4429,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", - "idna 0.2.3", + "idna", "matches", - "percent-encoding 2.1.0", + "percent-encoding", ] [[package]] @@ -7415,16 +4440,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "value-bag" -version = "1.0.0-alpha.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -7443,18 +4458,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "waker-fn" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" - [[package]] name = "want" version = "0.3.0" @@ -7489,7 +4492,7 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -7514,7 +4517,7 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -7549,21 +4552,6 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures 0.3.21", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wasmi" version = "0.9.1" @@ -7598,16 +4586,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki" version = "0.22.0" @@ -7618,50 +4596,15 @@ dependencies = [ "untrusted", ] -[[package]] -name = "webpki-roots" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" -dependencies = [ - "webpki 0.21.4", -] - [[package]] name = "webpki-roots" version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d8de8415c823c8abd270ad483c6feeac771fad964890779f9a8cb24fbbc1bf" dependencies = [ - "webpki 0.22.0", -] - -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - -[[package]] -name = "which" -version = "4.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" -dependencies = [ - "either", - "lazy_static", - "libc", + "webpki", ] -[[package]] -name = "widestring" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" - [[package]] name = "winapi" version = "0.3.9" @@ -7678,15 +4621,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -7736,15 +4670,6 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.10.1" @@ -7760,17 +4685,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" -[[package]] -name = "x25519-dalek" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a0c105152107e3b96f6a00a65e86ce82d9b125230e1c4302940eca58ff71f4f" -dependencies = [ - "curve25519-dalek 3.2.0", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "yaml-rust" version = "0.4.5" @@ -7780,20 +4694,6 @@ dependencies = [ "linked-hash-map 0.5.4", ] -[[package]] -name = "yamux" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107" -dependencies = [ - "futures 0.3.21", - "log", - "nohash-hasher", - "parking_lot 0.11.2", - "rand 0.8.5", - "static_assertions", -] - [[package]] name = "zeroize" version = "1.5.5" @@ -7814,32 +4714,3 @@ dependencies = [ "syn", "synstructure", ] - -[[package]] -name = "zstd" -version = "0.9.2+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "4.1.3+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "1.6.2+zstd.1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2daf2f248d9ea44454bfcb2516534e8b8ad2fc91bf818a1885495fc42bc8ac9f" -dependencies = [ - "cc", - "libc", -] diff --git a/bridges/pangolin-pangolinparachain/bridge/Cargo.toml b/bridges/pangolin-pangolinparachain/bridge/Cargo.toml index fcb787f9f..b7c347cc1 100644 --- a/bridges/pangolin-pangolinparachain/bridge/Cargo.toml +++ b/bridges/pangolin-pangolinparachain/bridge/Cargo.toml @@ -13,67 +13,34 @@ repository = "https://github.com/darwinia-network/bridger" version = "0.5.7" [dependencies] +tracing = "0.1" +color-eyre = "0.5" -color-eyre = "0.5" -tracing = "0.1" +array-bytes = "2" +tokio = { version = "1", features = ["full"] } -async-trait = "0.1" - -colored = "2" structopt = "0.3" strum = { version = "0.21", features = ["derive"] } -tokio = { version = "1", features = ["full"] } - -codec = { package = "parity-scale-codec", version = "2" } -futures = "0.3" -futures-timer = "3" -hex = "0.4" -serde = { version = "1", features = ["derive"] } -serde_json = "1" - -lifeline = { git = "https://github.com/fewensa/lifeline-rs.git", branch = "threads-safely" } -once_cell = "1.12.0" -postage = "0.4" +serde = { version = "1", features = ["derive"] } -## Substrate Dependencies +lifeline = { git = "https://github.com/fewensa/lifeline-rs.git", branch = "threads-safely" } +postage = "0.4" -frame-support = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-finality-grandpa = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-trie = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-version = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } +support-common = { path = "../../../frame/supports/support-common" } +support-lifeline = { path = "../../../frame/supports/support-lifeline" } +support-toolkit = { path = "../../../frame/supports/support-toolkit" } -## bridge common - -bp-darwinia-core = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-header-chain = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-parachains = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-polkadot-core = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-runtime = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bridge-runtime-common = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -messages-relay = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -pallet-bridge-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -pallet-fee-market = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-pangolin-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-pangolin-parachain-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-rococo-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-substrate-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-utils = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -substrate-relay-helper = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } -## component -client-pangolin = { path = "../../../frame/assistants/client-pangolin", features = ["bridge-s2s"] } -client-pangolin-parachain = { path = "../../../frame/assistants/client-pangolin-parachain" } -client-rococo = { path = "../../../frame/assistants/client-rococo" } -component-subscan = { path = "../../../frame/components/subscan" } -feemarket-s2s = { path = "../../../frame/assistants/feemarket-s2s" } -subquery-parachain = { path = "../../../frame/assistants/subquery-parachain" } +bridge-s2s-traits = { path = "../../../frame/traits/bridge-s2s" } +client-pangolin = { path = "../../../frame/assistants/client-pangolin", features = [ "bridge-s2s-pangolin-parachain", "feemarket-s2s-pangolin-parachain" ]} +client-rococo = { path = "../../../frame/assistants/client-rococo", features = [ "bridge-s2s-pangolin" ] } +client-pangolin-parachain = { path = "../../../frame/assistants/client-pangolin-parachain", features = [ "bridge-s2s-pangolin", "feemarket-s2s-pangolin" ] } subquery-s2s = { path = "../../../frame/assistants/subquery-s2s" } +subquery-parachain = { path = "../../../frame/assistants/subquery-parachain" } +relay-s2s = { path = "../../../frame/assistants/relay-s2s", features = [ "bridge-parachain" ] } +feemarket-s2s = { path = "../../../frame/assistants/feemarket-s2s" } - -## support -support-common = { path = "../../../frame/supports/support-common" } -support-lifeline = { path = "../../../frame/supports/support-lifeline" } -support-terminal = { path = "../../../frame/supports/support-terminal" } +[dev-dependencies] +sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +serde_json = "1" +codec = { package = "parity-scale-codec", version = "2" } diff --git a/bridges/pangolin-pangolinparachain/bridge/src/bridge/config.rs b/bridges/pangolin-pangolinparachain/bridge/src/bridge/config.rs index 79929d655..e78c0a65b 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/bridge/config.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/bridge/config.rs @@ -1,11 +1,16 @@ +use client_pangolin::client::PangolinClient; +use client_pangolin::component::PangolinClientComponent; +use client_pangolin_parachain::client::PangolinParachainClient; +use client_pangolin_parachain::component::PangolinParachainClientComponent; +use client_rococo::client::RococoClient; +use client_rococo::component::RococoClientComponent; use serde::{Deserialize, Serialize}; -use strum::{EnumString, EnumVariantNames}; +use subquery_s2s::types::BridgeName; +use subquery_s2s::{Subquery, SubqueryComponent, SubqueryConfig}; -use component_subscan::SubscanConfig; -use subquery_s2s::SubqueryConfig; use support_common::error::BridgerError; -use crate::types::{ChainInfo, HexLaneId, PrometheusParamsInfo}; +use crate::types::HexLaneId; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct BridgeConfig { @@ -13,173 +18,86 @@ pub struct BridgeConfig { pub rococo: ChainInfoConfig, pub pangolin_parachain: ChainInfoConfig, pub relay: RelayConfig, - #[serde(skip_serializing_if = "Option::is_none")] - pub pangolin_subscan: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub pangolin_parachain_subscan: Option, - pub task: TaskConfig, pub index: IndexConfig, } -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct TaskConfig { - pub interval_update_fee: u64, - pub update_fee_strategy: UpdateFeeStrategyType, -} - -#[derive(Clone, Debug, Serialize, Deserialize, strum::EnumString)] -pub enum UpdateFeeStrategyType { - Nothing, - Crazy, - Reasonable, -} - #[derive(Clone, Debug, Serialize, Deserialize)] pub struct RelayConfig { /// Hex-encoded lane identifiers that should be served by the complex relay. pub lanes: Vec, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_pangolin: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_pangolin_parachain: Option, - #[serde(default)] - pub prometheus_params: PrometheusParamsInfo, - /// If passed, only mandatory headers (headers that are changing the GRANDPA authorities set) - /// are relayed. - pub only_mandatory_headers: bool, - /// Create relayers fund accounts on both chains, if it does not exists yet. - pub create_relayers_fund_accounts: bool, - /// The SURI of secret key to use when transactions are submitted to the pangolin node. - #[serde(skip_serializing_if = "Option::is_none")] - pub pangolin_messages_pallet_owner: Option, - /// The password for the SURI of secret key to use when transactions are submitted to the pangolin node. - #[serde(skip_serializing_if = "Option::is_none")] - pub pangolin_messages_pallet_owner_password: Option, - /// The SURI of secret key to use when transactions are submitted to the pangolin parachain node. - #[serde(skip_serializing_if = "Option::is_none")] - pub pangolin_parachain_messages_pallet_owner: Option, - /// The password for the SURI of secret key to use when transactions are submitted to the pangolin parachain node. - #[serde(skip_serializing_if = "Option::is_none")] - pub pangolin_parachain_messages_pallet_owner_password: Option, + pub para_id: u32, } #[derive(Clone, Debug, Serialize, Deserialize)] pub struct ChainInfoConfig { + /// Endpoint pub endpoint: String, #[serde(skip_serializing_if = "Option::is_none")] pub signer: Option, - #[serde(skip)] - pub secure: bool, - #[serde(skip_serializing_if = "Option::is_none")] - pub signer_password: Option, - /// Transactions mortality period, in blocks. MUST be a power of two in [4; 65536] range. MAY NOT be larger than `BlockHashCount` parameter of the chain system module. - #[serde(skip_serializing_if = "Option::is_none")] - pub transactions_mortality: Option, - /// Runtime version mode, default is bundle - #[serde(skip_serializing_if = "Option::is_none")] - pub runtime_version_mode: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub spec_version: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub transaction_version: Option, - #[serde(skip_serializing_if = "Option::is_none")] - pub para_id: Option, } -#[derive(Clone, Debug, Serialize, Deserialize, EnumString, EnumVariantNames)] -#[strum(serialize_all = "kebab_case")] -pub enum RuntimeVersionMode { - /// Auto query version from chain - Auto, - /// Custom `spec_version` and `transaction_version` - Custom, - /// Read version from bundle dependencies directly. - Bundle, -} - -impl ChainInfoConfig { - fn host_port(&self) -> color_eyre::Result<(bool, String, u16)> { - if self.endpoint.find("ws://").unwrap_or(usize::MAX) != 0 - && self.endpoint.find("wss://").unwrap_or(usize::MAX) != 0 - { - return Err(BridgerError::Custom( - "The entrypoint isn't websocket protocol".to_string(), - ) - .into()); - } - let secure = self.endpoint.starts_with("wss://"); - let endpoint = self - .endpoint - .replace(if secure { "wss://" } else { "ws://" }, "") - .replace('/', "") - .replace(' ', ""); - let host_port = endpoint.split(':').collect::>(); - let host = host_port.get(0).unwrap_or(&"127.0.0.1"); - let port = host_port - .get(1) - .unwrap_or(if secure { &"443" } else { &"80" }); - Ok((secure, host.to_string(), port.parse::()?)) - } - - pub fn to_chain_info(&self) -> color_eyre::Result { - self.to_chain_info_with_expect_signer(None) - } - - pub fn to_chain_info_with_expect_signer( - &self, - except_signer: Option, - ) -> color_eyre::Result { - let host_port = self.host_port()?; - Ok(ChainInfo { - secure: host_port.0, - host: host_port.1, - port: host_port.2, - signer: except_signer.or_else(|| self.signer.clone()), - signer_password: self.signer_password.clone(), - transactions_mortality: Some(256), - runtime_version_mode: self.runtime_version_mode.clone(), - spec_version: self.spec_version, - transaction_version: self.transaction_version, - }) - } +impl TryFrom for client_pangolin::config::ClientConfig { + type Error = BridgerError; - pub fn to_pangolin_client_config( - &self, - ) -> color_eyre::Result { + fn try_from(config: ChainInfoConfig) -> Result { + let relayer_private_key = config.signer.ok_or_else(|| { + BridgerError::Custom(format!("Missing signer for chain: {}", config.endpoint)) + })?; Ok(client_pangolin::config::ClientConfig { - endpoint: self.endpoint.clone(), - relayer_private_key: self.signer.clone().ok_or_else(|| { - BridgerError::Custom(format!("Missing signer for chain: {}", self.endpoint)) - })?, + endpoint: config.endpoint, + relayer_private_key, relayer_real_account: None, }) } +} - pub fn to_pangolin_parachain_client_config( - &self, - ) -> color_eyre::Result { +impl TryFrom for client_pangolin_parachain::config::ClientConfig { + type Error = BridgerError; + + fn try_from(config: ChainInfoConfig) -> Result { + let relayer_private_key = config.signer.ok_or_else(|| { + BridgerError::Custom(format!("Missing signer for chain: {}", config.endpoint)) + })?; Ok(client_pangolin_parachain::config::ClientConfig { - endpoint: self.endpoint.clone(), - relayer_private_key: self.signer.clone().ok_or_else(|| { - BridgerError::Custom(format!("Missing signer for chain: {}", self.endpoint)) - })?, + endpoint: config.endpoint, + relayer_private_key, relayer_real_account: None, }) } +} - pub fn to_rococo_client_config( - &self, - ) -> color_eyre::Result { +impl TryFrom for client_rococo::config::ClientConfig { + type Error = BridgerError; + + fn try_from(config: ChainInfoConfig) -> Result { + let relayer_private_key = "//Alice".to_string(); Ok(client_rococo::config::ClientConfig { - endpoint: self.endpoint.clone(), - relayer_private_key: self.signer.clone().ok_or_else(|| { - BridgerError::Custom(format!("Missing signer for chain: {}", self.endpoint)) - })?, + endpoint: config.endpoint, + relayer_private_key, relayer_real_account: None, }) } } +impl ChainInfoConfig { + pub async fn to_pangolin_client(&self) -> color_eyre::Result { + let config = self.clone().try_into()?; + Ok(PangolinClientComponent::component(config).await?) + } + + pub async fn to_pangolin_parachain_client( + &self, + ) -> color_eyre::Result { + let config = self.clone().try_into()?; + Ok(PangolinParachainClientComponent::component(config).await?) + } + + pub async fn to_rococo_client(&self) -> color_eyre::Result { + let config = self.clone().try_into()?; + Ok(RococoClientComponent::component(config).await?) + } +} + #[derive(Clone, Debug, Serialize, Deserialize)] pub struct IndexConfig { pub pangolin: SubqueryConfig, @@ -187,3 +105,33 @@ pub struct IndexConfig { pub rococo: SubqueryConfig, pub parachain_rococo: subquery_parachain::SubqueryConfig, } + +impl IndexConfig { + pub fn to_pangolin_subquery(&self) -> Subquery { + SubqueryComponent::component(self.pangolin.clone(), BridgeName::PangolinParachain) + } + + pub fn to_pangolin_parachain_subquery(&self) -> Subquery { + SubqueryComponent::component( + self.pangolin_parachain.clone(), + BridgeName::PangolinParachain, + ) + } + + pub fn to_rococo_subquery(&self) -> Subquery { + SubqueryComponent::component(self.rococo.clone(), BridgeName::PangolinParachain) + } + + pub fn to_candidate_subquery(&self) -> subquery_parachain::Subquery { + subquery_parachain::SubqueryComponent::component( + self.parachain_rococo.clone(), + subquery_parachain::types::BridgeName::PangolinParachain, + ) + } +} + +impl RelayConfig { + pub fn raw_lanes(&self) -> Vec<[u8; 4]> { + self.lanes.iter().map(|item| item.0).collect() + } +} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/bridge/task.rs b/bridges/pangolin-pangolinparachain/bridge/src/bridge/task.rs index 054714620..7c7f78771 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/bridge/task.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/bridge/task.rs @@ -2,10 +2,10 @@ use support_lifeline::task::TaskStack; use crate::bridge::BridgeBus; use crate::service::header::{ - PangolinToParachainHeaderRelayService, RococoToPangolinHeaderRelayService, - RococoToPangolinParaHeaderRelayService, + PangolinToParachainHeaderRelayService, ParaHeadRelayService, RococoToPangolinHeaderRelayService, }; -use crate::service::message::MessageRelayService; +use crate::service::message::pangolin_to_pangolinparachain::PangolinToPangolinParachainMessageRelayService; +use crate::service::message::pangolinparachain_to_pangolin::PangolinParachainToPangolinMessageRelayService; use crate::service::subscribe::SubscribeService; #[derive(Debug)] @@ -26,8 +26,9 @@ impl BridgeTask { let mut stack = TaskStack::new(bus); stack.spawn_service::()?; stack.spawn_service::()?; - stack.spawn_service::()?; - stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; + stack.spawn_service::()?; stack.spawn_service::()?; Ok(Self { stack }) } diff --git a/bridges/pangolin-pangolinparachain/bridge/src/chains/mod.rs b/bridges/pangolin-pangolinparachain/bridge/src/chains/mod.rs deleted file mode 100644 index ceffcf0c8..000000000 --- a/bridges/pangolin-pangolinparachain/bridge/src/chains/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod pangolin; -pub mod pangolin_parachain; -pub mod rococo; diff --git a/bridges/pangolin-pangolinparachain/bridge/src/chains/pangolin.rs b/bridges/pangolin-pangolinparachain/bridge/src/chains/pangolin.rs deleted file mode 100644 index 834488016..000000000 --- a/bridges/pangolin-pangolinparachain/bridge/src/chains/pangolin.rs +++ /dev/null @@ -1,145 +0,0 @@ -pub use s2s_const::*; -pub use s2s_messages::*; - -mod s2s_const { - use sp_version::RuntimeVersion; - - use relay_pangolin_client::PangolinChain; - - use crate::traits::CliChain; - - // === start const - impl CliChain for PangolinChain { - const RUNTIME_VERSION: RuntimeVersion = RuntimeVersion { - spec_name: sp_runtime::create_runtime_str!("Pangolin"), - impl_name: sp_runtime::create_runtime_str!("Pangolin"), - authoring_version: 0, - spec_version: 28_100, - impl_version: 0, - apis: sp_version::create_apis_vec![[]], - transaction_version: 0, - }; - - type KeyPair = sp_core::sr25519::Pair; - } - - // === end -} - -mod s2s_messages { - use crate::feemarket::PangolinFeemarketApi; - use feemarket_s2s::relay::BasicRelayStrategy; - use frame_support::weights::Weight; - use relay_pangolin_client::PangolinChain; - use relay_pangolin_parachain_client::PangolinParachainChain; - use substrate_relay_helper::messages_lane::SubstrateMessageLane; - - #[derive(Clone, Debug)] - pub struct PangolinMessagesToPangolinParachain; - - substrate_relay_helper::generate_mocked_receive_message_proof_call_builder!( - PangolinMessagesToPangolinParachain, - PangolinMessagesToPangolinParachainReceiveMessagesProofCallBuilder, - relay_pangolin_parachain_client::runtime::Call::BridgePangolinMessages, - relay_pangolin_parachain_client::runtime::BridgePangolinMessagesCall::receive_messages_proof - ); - - substrate_relay_helper::generate_mocked_receive_message_delivery_proof_call_builder!( - PangolinMessagesToPangolinParachain, - PangolinMessagesToPangolinParachainReceiveMessagesDeliveryProofCallBuilder, - relay_pangolin_client::runtime::Call::BridgePangolinParachainMessages, - relay_pangolin_client::runtime::BridgePangolinParachainMessagesCall::receive_messages_delivery_proof - ); - - impl SubstrateMessageLane for PangolinMessagesToPangolinParachain { - const SOURCE_TO_TARGET_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - const TARGET_TO_SOURCE_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - - type SourceChain = PangolinChain; - type TargetChain = PangolinParachainChain; - - type SourceTransactionSignScheme = PangolinChain; - type TargetTransactionSignScheme = PangolinParachainChain; - - type ReceiveMessagesProofCallBuilder = - PangolinMessagesToPangolinParachainReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = - PangolinMessagesToPangolinParachainReceiveMessagesDeliveryProofCallBuilder; - - type RelayStrategy = BasicRelayStrategy; - } -} - -pub mod s2s_feemarket { - use codec::Encode; - use relay_pangolin_client::runtime as pangolin_runtime; - use relay_pangolin_client::PangolinChain; - use relay_substrate_client::{ - ChainBase, Client, SignParam, TransactionSignScheme, UnsignedTransaction, - }; - use sp_core::{Bytes, Pair}; - - use feemarket_s2s::error::FeemarketResult; - - pub(crate) async fn update_relay_fee( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - PangolinChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - pangolin_runtime::Call::PangolinParachainFeemarket( - pangolin_runtime::FeemarketCall::update_relay_fee(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } - - pub(crate) async fn update_locked_collateral( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - PangolinChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - pangolin_runtime::Call::PangolinParachainFeemarket( - pangolin_runtime::FeemarketCall::update_locked_collateral(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } -} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/chains/pangolin_parachain.rs b/bridges/pangolin-pangolinparachain/bridge/src/chains/pangolin_parachain.rs deleted file mode 100644 index 2d50e9724..000000000 --- a/bridges/pangolin-pangolinparachain/bridge/src/chains/pangolin_parachain.rs +++ /dev/null @@ -1,147 +0,0 @@ -pub use s2s_const::*; -pub use s2s_messages::*; - -mod s2s_const { - use sp_version::RuntimeVersion; - - use relay_pangolin_parachain_client::PangolinParachainChain; - - use crate::traits::CliChain; - - // === start const - impl CliChain for PangolinParachainChain { - const RUNTIME_VERSION: RuntimeVersion = RuntimeVersion { - spec_name: sp_runtime::create_runtime_str!("Pangolin Parachain"), - impl_name: sp_runtime::create_runtime_str!("Pangolin Parachain"), - authoring_version: 1, - spec_version: 3, - impl_version: 1, - apis: sp_version::create_apis_vec![[]], - transaction_version: 1, - }; - - type KeyPair = sp_core::sr25519::Pair; - } - - // === end -} - -mod s2s_messages { - use crate::feemarket::PangolinParachainFeemarketApi; - use feemarket_s2s::relay::BasicRelayStrategy; - use frame_support::weights::Weight; - use relay_pangolin_client::PangolinChain; - use relay_pangolin_parachain_client::PangolinParachainChain; - use substrate_relay_helper::messages_lane::SubstrateMessageLane; - - #[derive(Clone, Debug)] - pub struct PangolinParachainMessagesToPangolin; - - substrate_relay_helper::generate_mocked_receive_message_proof_call_builder!( - PangolinParachainMessagesToPangolin, - PangolinParachainMessagesToPangolinReceiveMessagesProofCallBuilder, - relay_pangolin_client::runtime::Call::BridgePangolinParachainMessages, - relay_pangolin_client::runtime::BridgePangolinParachainMessagesCall::receive_messages_proof - ); - - substrate_relay_helper::generate_mocked_receive_message_delivery_proof_call_builder!( - PangolinParachainMessagesToPangolin, - PangolinParachainMessagesToPangolinReceiveMessagesDeliveryProofCallBuilder, - relay_pangolin_parachain_client::runtime::Call::BridgePangolinMessages, - relay_pangolin_parachain_client::runtime::BridgePangolinMessagesCall::receive_messages_delivery_proof - ); - - impl SubstrateMessageLane for PangolinParachainMessagesToPangolin { - const SOURCE_TO_TARGET_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - const TARGET_TO_SOURCE_CONVERSION_RATE_PARAMETER_NAME: Option<&'static str> = None; - - type SourceChain = PangolinParachainChain; - type TargetChain = PangolinChain; - - type SourceTransactionSignScheme = PangolinParachainChain; - type TargetTransactionSignScheme = PangolinChain; - - type ReceiveMessagesProofCallBuilder = - PangolinParachainMessagesToPangolinReceiveMessagesProofCallBuilder; - type ReceiveMessagesDeliveryProofCallBuilder = - PangolinParachainMessagesToPangolinReceiveMessagesDeliveryProofCallBuilder; - - type RelayStrategy = BasicRelayStrategy; - } -} - -pub mod s2s_feemarket { - use codec::Encode; - use relay_pangolin_parachain_client::runtime as pangolin_parachain_runtime; - use relay_pangolin_parachain_client::PangolinParachainChain; - use relay_substrate_client::{ - ChainBase, Client, SignParam, TransactionSignScheme, UnsignedTransaction, - }; - use sp_core::{Bytes, Pair}; - - use feemarket_s2s::error::FeemarketResult; - - pub(crate) async fn update_relay_fee( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - PangolinParachainChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - pangolin_parachain_runtime::Call::PangolinFeemarket( - pangolin_parachain_runtime::FeemarketCall::update_relay_fee(amount), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } - - pub(crate) async fn update_locked_collateral( - client: &Client, - signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()> { - let signer_id = (*signer.public().as_array_ref()).into(); - let genesis_hash = *client.genesis_hash(); - let (spec_version, transaction_version) = client.simple_runtime_version().await?; - client - .submit_signed_extrinsic(signer_id, move |_, transaction_nonce| { - Bytes( - PangolinParachainChain::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash, - signer: signer.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - pangolin_parachain_runtime::Call::PangolinFeemarket( - pangolin_parachain_runtime::FeemarketCall::update_locked_collateral( - amount, - ), - ), - transaction_nonce, - ), - }) - .encode(), - ) - }) - .await?; - Ok(()) - } -} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/chains/rococo.rs b/bridges/pangolin-pangolinparachain/bridge/src/chains/rococo.rs deleted file mode 100644 index a65885cdc..000000000 --- a/bridges/pangolin-pangolinparachain/bridge/src/chains/rococo.rs +++ /dev/null @@ -1,26 +0,0 @@ -pub use s2s_const::*; - -mod s2s_const { - use sp_version::RuntimeVersion; - - use relay_rococo_client::Rococo; - - use crate::traits::CliChain; - - // === start const - impl CliChain for Rococo { - const RUNTIME_VERSION: RuntimeVersion = RuntimeVersion { - spec_name: sp_version::create_runtime_str!("rococo"), - impl_name: sp_version::create_runtime_str!("parity-rococo-v2.0"), - authoring_version: 0, - spec_version: 9142, - impl_version: 0, - apis: sp_version::create_apis_vec![[]], - transaction_version: 0, - }; - - type KeyPair = sp_core::sr25519::Pair; - } - - // === end -} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/command/handler/init.rs b/bridges/pangolin-pangolinparachain/bridge/src/command/handler/init.rs index 1ac1be81f..2e4a613f4 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/command/handler/init.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/command/handler/init.rs @@ -1,19 +1,10 @@ -use bp_header_chain::InitializationData; -use bp_runtime::Chain as ChainBase; -use codec::Encode; -use relay_pangolin_client::runtime::{BridgeRococoGrandpaCall, Call}; -use relay_pangolin_parachain_client::runtime as pangolin_parachain_runtime; -use relay_substrate_client::{ - Chain as RelaySubstrateClientChain, SignParam, TransactionSignScheme, UnsignedTransaction, -}; -use sp_core::{Bytes, Pair}; +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay}; +use support_toolkit::convert::SmartCodecMapper; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; -use support_terminal::output; -use crate::bridge::{ChainInfoConfig, BridgeConfig}; -use crate::types::{BridgeName, InitBridge}; +use crate::bridge::{BridgeConfig, ChainInfoConfig}; +use crate::types::BridgeName; pub async fn handle_init(bridge: BridgeName) -> color_eyre::Result<()> { tracing::info!(target: "pangolin-pangolinparachain", "Init bridge {:?}", bridge); @@ -22,107 +13,43 @@ pub async fn handle_init(bridge: BridgeName) -> color_eyre::Result<()> { let config_rococo: ChainInfoConfig = bridge_config.rococo; let config_pangolin_parachain: ChainInfoConfig = bridge_config.pangolin_parachain; - let (source_chain, target_chain) = match bridge { - BridgeName::RococoToPangolin => ( - config_rococo.to_chain_info()?, - config_pangolin.to_chain_info()?, - ), - BridgeName::PangolinToPangolinParachain => ( - config_pangolin.to_chain_info()?, - config_pangolin_parachain.to_chain_info()?, - ), - }; - std::thread::spawn(move || { - futures::executor::block_on(init_bridge(InitBridge { - bridge, - source: source_chain, - target: target_chain, - })) - }) - .join() - .map_err(|_| BridgerError::Custom("Failed to join thread handle".to_string()))??; - - output::output_ok(); + init_bridge( + bridge, + config_pangolin, + config_rococo, + config_pangolin_parachain, + ) + .await?; Ok(()) } -macro_rules! select_bridge { - ($bridge: expr, $generic: tt) => { - match $bridge { - BridgeName::RococoToPangolin => { - type Source = relay_rococo_client::Rococo; - type Target = relay_pangolin_client::PangolinChain; - - fn encode_init_bridge( - init_data: InitializationData<::Header>, - ) -> ::Call { - Call::BridgeRococoGrandpa(BridgeRococoGrandpaCall::initialize(init_data)) - } - - $generic - } - BridgeName::PangolinToPangolinParachain => { - type Source = relay_pangolin_client::PangolinChain; - type Target = relay_pangolin_parachain_client::PangolinParachainChain; - - fn encode_init_bridge( - init_data: InitializationData<::Header>, - ) -> ::Call { - pangolin_parachain_runtime::Call::BridgePangolinGrandpa( - pangolin_parachain_runtime::BridgePangolinGrandpaCall::initialize( - init_data, - ), - ) - } - - $generic - } +async fn init_bridge( + bridge: BridgeName, + config_pangolin: ChainInfoConfig, + config_rococo: ChainInfoConfig, + config_pangolin_parachain: ChainInfoConfig, +) -> color_eyre::Result<()> { + let client_pangolin = config_pangolin.to_pangolin_client().await?; + let client_rococo = config_rococo.to_rococo_client().await?; + let client_pangolin_parachain = config_pangolin_parachain + .to_pangolin_parachain_client() + .await?; + let hash = match bridge { + BridgeName::PangolinToPangolinParachain => { + let initialization_data = client_pangolin.prepare_initialization_data().await?; + let expected_data = SmartCodecMapper::map_to(&initialization_data)?; + client_pangolin_parachain.initialize(expected_data).await? + } + BridgeName::RococoToPangolin => { + let initialization_data = client_rococo.prepare_initialization_data().await?; + let expected_data = SmartCodecMapper::map_to(&initialization_data)?; + client_pangolin.initialize(expected_data).await? } }; -} - -async fn init_bridge(init_bridge: InitBridge) -> color_eyre::Result<()> { - let bridge = init_bridge.bridge; - let source_chain = init_bridge.source; - let target_chain = init_bridge.target; - select_bridge!(bridge, { - let source_client = source_chain.to_substrate_relay_chain::().await?; - let target_client = target_chain.to_substrate_relay_chain::().await?; - let target_sign = target_chain.to_keypair::()?; - tracing::debug!( - target: "pangolin-pangolinparachain", - "source client -> {:?}", - source_client - ); - tracing::debug!( - target: "pangolin-pangolinparachain", - "target client -> {:?}", - target_client - ); - - let (spec_version, transaction_version) = target_client.simple_runtime_version().await?; - substrate_relay_helper::headers_initialize::initialize( - source_client, - target_client.clone(), - target_sign.public().into(), - move |transaction_nonce, initialization_data| { - Bytes( - Target::sign_transaction(SignParam { - spec_version, - transaction_version, - genesis_hash: *target_client.genesis_hash(), - signer: target_sign.clone(), - era: relay_substrate_client::TransactionEra::immortal(), - unsigned: UnsignedTransaction::new( - encode_init_bridge(initialization_data), - transaction_nonce, - ), - }) - .encode(), - ) - }, - ) - .await; - }); + tracing::info!( + target: "pangolin-pangolinparachain", + "Successes to sent init transaction: {:?}", + hash, + ); Ok(()) } diff --git a/bridges/pangolin-pangolinparachain/bridge/src/command/handler/relay.rs b/bridges/pangolin-pangolinparachain/bridge/src/command/handler/relay.rs index bf38b9f6b..5a5affd2a 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/command/handler/relay.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/command/handler/relay.rs @@ -3,7 +3,7 @@ use support_common::config::{Config, Names}; use crate::bridge::{BridgeConfig, BridgeTask}; pub async fn handle_relay() -> color_eyre::Result<()> { - tracing::info!(target: "pangolin-pangoro", "Start bridge pangolin-pangoro"); + tracing::info!(target: "pangolin-pangolinparachain", "Start bridge pangolin-pangolinparachain"); // check config let _bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; let _task = BridgeTask::new().await?; diff --git a/bridges/pangolin-pangolinparachain/bridge/src/command/types.rs b/bridges/pangolin-pangolinparachain/bridge/src/command/types.rs index fe9e22bef..6b6663f44 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/command/types.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/command/types.rs @@ -4,11 +4,14 @@ use crate::types::BridgeName; /// Bridge pangolin-pangolinparachain options #[derive(Debug, StructOpt)] -#[structopt(name = "pangolin-pangolinparachain", about = "Bridge pangolin-pangolinparachain")] +#[structopt( + name = "pangolin-pangolinparachain", + about = "Bridge pangolin-pangolinparachain" +)] pub enum Opts { /// Init bridge pangolin-pangolinparachain Init { - /// Bridge, support rococo-to-pangolin + /// Bridge #[structopt()] bridge: BridgeName, }, diff --git a/bridges/pangolin-pangolinparachain/bridge/src/feemarket/mod.rs b/bridges/pangolin-pangolinparachain/bridge/src/feemarket/mod.rs deleted file mode 100644 index 0dd4ebed6..000000000 --- a/bridges/pangolin-pangolinparachain/bridge/src/feemarket/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub use self::pangolin::*; -pub use self::pangolin_parachain::*; - -mod pangolin; -mod pangolin_parachain; diff --git a/bridges/pangolin-pangolinparachain/bridge/src/feemarket/pangolin.rs b/bridges/pangolin-pangolinparachain/bridge/src/feemarket/pangolin.rs deleted file mode 100644 index ffc5db7ec..000000000 --- a/bridges/pangolin-pangolinparachain/bridge/src/feemarket/pangolin.rs +++ /dev/null @@ -1,176 +0,0 @@ -use bp_messages::{LaneId, MessageNonce}; -use codec::Encode; -use pallet_fee_market::types::{Order, Relayer}; -use frame_support::Blake2_128Concat; -use relay_pangolin_client::PangolinChain; -use relay_substrate_client::{ChainBase, Client, TransactionSignScheme}; -use relay_utils::relay_loop::Client as RelayLoopClient; -use sp_core::storage::StorageKey; -use sp_core::Pair; - -use feemarket_s2s::api::FeemarketApi; -use feemarket_s2s::error::FeemarketResult; - -#[derive(Clone)] -pub struct PangolinFeemarketApi { - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, -} - -impl PangolinFeemarketApi { - pub fn new( - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, - ) -> Self { - Self { - client, - lane_id, - signer, - } - } -} - -#[async_trait::async_trait] -impl FeemarketApi for PangolinFeemarketApi { - type Chain = PangolinChain; - - async fn reconnect(&mut self) -> FeemarketResult<()> { - Ok(self.client.reconnect().await?) - } - - fn lane_id(&self) -> LaneId { - self.lane_id - } - - async fn best_finalized_header_number( - &self, - ) -> FeemarketResult<::BlockNumber> { - Ok(self.client.best_finalized_header_number().await?) - } - - async fn assigned_relayers( - &self, - ) -> FeemarketResult< - Vec::AccountId, ::Balance>>, - > { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "PangolinParachainFeeMarket".as_bytes(), - "AssignedRelayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn my_assigned_info( - &self, - ) -> FeemarketResult< - Option<( - usize, - Relayer<::AccountId, ::Balance>, - )>, - > { - let signer_id = (*self.signer.public().as_array_ref()).into(); - let assigned_relayers = self.assigned_relayers().await?; - let ret = assigned_relayers - .iter() - .position(|item| item.id == signer_id) - // .map(|position| position as u32) - .map(|position| { - ( - position, - assigned_relayers - .get(position) - .cloned() - .expect("Unreachable"), - ) - }); - Ok(ret) - } - - async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> FeemarketResult< - Option< - Order< - ::AccountId, - ::BlockNumber, - ::Balance, - >, - >, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "PangolinParachainFeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn relayers(&self) -> FeemarketResult::AccountId>> { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "PangolinParachainFeeMarket".as_bytes(), - "Relayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn relayer( - &self, - account: ::AccountId, - ) -> FeemarketResult< - Option::AccountId, ::Balance>>, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "PangolinParachainFeeMarket", - "RelayersMap", - account.encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn is_relayer(&self) -> FeemarketResult { - let signer_id = (*self.signer.public().as_array_ref()).into(); - self.relayer(signer_id).await.map(|item| item.is_some()) - } - - async fn update_relay_fee( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::pangolin::s2s_feemarket::update_relay_fee( - &self.client, - self.signer.clone(), - amount, - ) - .await - } - - async fn update_locked_collateral( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::pangolin::s2s_feemarket::update_locked_collateral( - &self.client, - self.signer.clone(), - amount, - ) - .await - } -} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/feemarket/pangolin_parachain.rs b/bridges/pangolin-pangolinparachain/bridge/src/feemarket/pangolin_parachain.rs deleted file mode 100644 index fd52e267e..000000000 --- a/bridges/pangolin-pangolinparachain/bridge/src/feemarket/pangolin_parachain.rs +++ /dev/null @@ -1,172 +0,0 @@ -use bp_messages::{LaneId, MessageNonce}; -use codec::Encode; -use pallet_fee_market::types::{Order, Relayer}; -use frame_support::Blake2_128Concat; -use relay_pangolin_parachain_client::PangolinParachainChain; -use relay_substrate_client::{ChainBase, Client, TransactionSignScheme}; -use relay_utils::relay_loop::Client as RelayLoopClient; -use sp_core::storage::StorageKey; -use sp_core::Pair; - -use feemarket_s2s::api::FeemarketApi; -use feemarket_s2s::error::FeemarketResult; - -#[derive(Clone)] -pub struct PangolinParachainFeemarketApi { - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, -} - -impl PangolinParachainFeemarketApi { - pub fn new( - client: Client, - lane_id: LaneId, - signer: ::AccountKeyPair, - ) -> Self { - Self { - client, - lane_id, - signer, - } - } -} - -#[async_trait::async_trait] -impl FeemarketApi for PangolinParachainFeemarketApi { - type Chain = PangolinParachainChain; - - async fn reconnect(&mut self) -> FeemarketResult<()> { - Ok(self.client.reconnect().await?) - } - - fn lane_id(&self) -> LaneId { - self.lane_id - } - - async fn best_finalized_header_number( - &self, - ) -> FeemarketResult<::BlockNumber> { - Ok(self.client.best_finalized_header_number().await?) - } - - async fn assigned_relayers( - &self, - ) -> FeemarketResult< - Vec::AccountId, ::Balance>>, - > { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix( - "PangolinFeeMarket".as_bytes(), - "AssignedRelayers".as_bytes(), - ) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn my_assigned_info( - &self, - ) -> FeemarketResult< - Option<( - usize, - Relayer<::AccountId, ::Balance>, - )>, - > { - let signer_id = (*self.signer.public().as_array_ref()).into(); - let assigned_relayers = self.assigned_relayers().await?; - let ret = assigned_relayers - .iter() - .position(|item| item.id == signer_id) - .map(|position| { - ( - position, - assigned_relayers - .get(position) - .cloned() - .expect("Unreachable"), - ) - }); - Ok(ret) - } - - async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> FeemarketResult< - Option< - Order< - ::AccountId, - ::BlockNumber, - ::Balance, - >, - >, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "PangolinFeeMarket", - "Orders", - (laned_id, message_nonce).encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn relayers(&self) -> FeemarketResult::AccountId>> { - let storage_key = StorageKey( - feemarket_s2s::helpers::storage_prefix("PangolinFeeMarket".as_bytes(), "Relayers".as_bytes()) - .to_vec(), - ); - Ok(self - .client - .storage_value(storage_key, None) - .await? - .unwrap_or_default()) - } - - async fn relayer( - &self, - account: ::AccountId, - ) -> FeemarketResult< - Option::AccountId, ::Balance>>, - > { - let storage_key = bp_runtime::storage_map_final_key::( - "PangolinFeeMarket", - "RelayersMap", - account.encode().as_slice(), - ); - Ok(self.client.storage_value(storage_key.clone(), None).await?) - } - - async fn is_relayer(&self) -> FeemarketResult { - let signer_id = (*self.signer.public().as_array_ref()).into(); - self.relayer(signer_id).await.map(|item| item.is_some()) - } - - async fn update_relay_fee( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::pangolin_parachain::s2s_feemarket::update_relay_fee( - &self.client, - self.signer.clone(), - amount, - ) - .await - } - - async fn update_locked_collateral( - &self, - amount: ::Balance, - ) -> FeemarketResult<()> { - crate::chains::pangolin_parachain::s2s_feemarket::update_locked_collateral( - &self.client, - self.signer.clone(), - amount, - ) - .await - } -} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/main.rs b/bridges/pangolin-pangolinparachain/bridge/src/main.rs index 23c5a87c9..198a7c071 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/main.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/main.rs @@ -3,12 +3,9 @@ use structopt::StructOpt; use crate::command::types::Opts; mod bridge; -mod chains; mod cli; mod command; -mod feemarket; mod service; -mod traits; mod types; #[tokio::main] diff --git a/bridges/pangolin-pangolinparachain/bridge/src/service/header/pangolin_to_parachain.rs b/bridges/pangolin-pangolinparachain/bridge/src/service/header/pangolin_to_parachain.rs index 1a7be77ea..d4a1a1b97 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/service/header/pangolin_to_parachain.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/service/header/pangolin_to_parachain.rs @@ -1,24 +1,12 @@ -use std::str::FromStr; - -use client_pangolin::client::PangolinClient; -use client_pangolin::component::PangolinClientComponent; -use client_pangolin::types::runtime_types::bp_header_chain::justification::GrandpaJustification; -use client_pangolin::types::runtime_types::sp_runtime::generic::header::Header; -use client_pangolin::types::runtime_types::sp_runtime::traits::BlakeTwo256; -use codec::{Decode, Encode}; use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::OriginType; -use client_pangolin_parachain::client::PangolinParachainClient; -use client_pangolin_parachain::component::PangolinParachainClientComponent; -use client_pangolin_parachain::types::runtime_types::sp_runtime::generic::header::Header as FinalityTarget; -use subquery_s2s::types::{BridgeName, OriginType}; -use subquery_s2s::{Subquery, SubqueryComponent}; +use relay_s2s::header::SolochainHeaderRunner; +use relay_s2s::types::SolochainHeaderInput; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; use support_lifeline::service::BridgeService; -use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; -use crate::service::subscribe::PANGOLIN_JUSTIFICATIONS; +use crate::bridge::{BridgeBus, BridgeConfig}; #[derive(Debug)] pub struct PangolinToParachainHeaderRelayService { @@ -33,15 +21,19 @@ impl Service for PangolinToParachainHeaderRelayService { fn spawn(_bus: &Self::Bus) -> Self::Lifeline { let _greet = Self::try_task( - &format!("{}-pangolin-parachain-header-relay", BridgeTask::name()), + "pangolin-to-pangolinparachain-header-relay-service", async move { while let Err(e) = start().await { tracing::error!( target: "pangolin-pangolinparachain", - "Failed to start pangolin-to-parachain header relay service, restart after some seconds: {:?}", + "[header-relay] [pangolin-to-pangolinparachain] An error occurred for header relay {:?}", e, ); tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "pangolin-pangolinparachain", + "[header-relay] [pangolin-to-pangolinparachain] Try to restart header relay service.", + ); } Ok(()) }, @@ -50,205 +42,31 @@ impl Service for PangolinToParachainHeaderRelayService { } } -struct HeaderRelay { - client_pangolin: PangolinClient, - client_parachain: PangolinParachainClient, - subquery_pangolin: Subquery, -} - -impl HeaderRelay { - async fn new() -> color_eyre::Result { - let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; - - let config_pangolin = bridge_config.pangolin; - let config_parachain = bridge_config.pangolin_parachain; - - let client_pangolin = - PangolinClientComponent::component(config_pangolin.to_pangolin_client_config()?) - .await?; - let client_parachain = PangolinParachainClientComponent::component( - config_parachain.to_pangolin_parachain_client_config()?, - ) - .await?; - - let config_index = bridge_config.index; - let subquery_pangolin = - SubqueryComponent::component(config_index.pangolin, BridgeName::PangolinParachain); - Ok(Self { - client_pangolin, - client_parachain, - subquery_pangolin, - }) - } -} - async fn start() -> color_eyre::Result<()> { tracing::info!( target: "pangolin-pangolinparachain", - "[header-pangolin-to-parachain] SERVICE RESTARTING..." + "[header-pangolin-to-pangolinparachain] [pangolin-to-pangolinparachain] SERVICE RESTARTING..." ); - let mut header_relay = HeaderRelay::new().await?; - loop { - match run(&header_relay).await { - Ok(_) => {} - Err(err) => { - tracing::error!( - target: "pangolin-pangolinparachain", - "[header-pangolin-to-parachain] Failed to relay header: {:?}", - err - ); - header_relay = HeaderRelay::new().await?; - - } - } - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } -} - -async fn run(header_relay: &HeaderRelay) -> color_eyre::Result<()> { - let last_relayed_pangolin_hash_in_parachain = header_relay - .client_parachain - .runtime() - .storage() - .bridge_pangolin_grandpa() - .best_finalized(None) - .await?; - let last_relayed_pangolin_block_in_parachain = header_relay - .client_pangolin - .subxt() - .rpc() - .block(Some(last_relayed_pangolin_hash_in_parachain)) - .await? - .ok_or_else(|| { - BridgerError::Custom(format!( - "Failed to query block by [{}] in pangolin", - last_relayed_pangolin_hash_in_parachain - )) - })?; - let block_number = last_relayed_pangolin_block_in_parachain.block.header.number; - tracing::trace!( - target: "pangolin-pangolinparachain", - "[header-pangolin-to-parachain] The latest relayed pangolin block is: {:?}", - block_number - ); - - if try_to_relay_mandatory(header_relay, block_number) - .await? - .is_none() - { - try_to_relay_header_on_demand(header_relay, block_number).await?; - } - - Ok(()) -} + let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; + let relay_config = bridge_config.relay; -/// Try to relay mandatory headers, return Ok(Some(block_number)) if success, else Ok(None) -async fn try_to_relay_mandatory( - header_relay: &HeaderRelay, - last_block_number: u32, -) -> color_eyre::Result> { - let next_mandatory_block = header_relay - .subquery_pangolin - .next_mandatory_header(last_block_number) - .await?; - if let Some(block_to_relay) = next_mandatory_block { - tracing::info!( - target: "pangolin-pangolinparachain", - "[header-pangolin-to-parachain] Next mandatory block: {:?} ", - &block_to_relay.block_number - ); - let justification = header_relay - .subquery_pangolin - .find_justification(block_to_relay.block_hash.clone(), true) - .await?; - submit_finality( - header_relay, - block_to_relay.block_hash, - justification.unwrap().justification, - ) + let client_pangolin = bridge_config.pangolin.to_pangolin_client().await?; + let client_pangolin_parachain = bridge_config + .pangolin_parachain + .to_pangolin_parachain_client() .await?; - Ok(Some(block_to_relay.block_number)) - } else { - tracing::info!( - target: "pangolin-pangolinparachain", - "[header-pangolin-to-parachain] Next mandatory block not found", - ); - Ok(None) - } -} + let config_index = bridge_config.index; + let subquery_pangolin = config_index.to_pangolin_subquery(); + let lanes = relay_config.raw_lanes(); -async fn try_to_relay_header_on_demand( - header_relay: &HeaderRelay, - last_block_number: u32, -) -> color_eyre::Result<()> { - let next_header = header_relay - .subquery_pangolin - .next_needed_header(OriginType::BridgePangolinParachain) - .await? - .filter(|header| header.block_number > last_block_number); - - if next_header.is_none() { - return Ok(()); - } - - let pangolin_justification_queue = PANGOLIN_JUSTIFICATIONS.lock().await; - if let Some(justification) = pangolin_justification_queue.back().cloned() { - let grandpa_justification = - GrandpaJustification::>::decode(&mut justification.as_ref()) - .map_err(|err| { - BridgerError::Custom(format!( - "Failed to decode justification of pangolin: {:?}", - err - )) - })?; - if grandpa_justification.commit.target_number > last_block_number { - submit_finality( - header_relay, - format!("{:#x}", grandpa_justification.commit.target_hash), - justification.to_vec(), - ) - .await?; - } - } - - Ok(()) -} - -async fn submit_finality( - header_relay: &HeaderRelay, - block_hash: impl AsRef, - justification: Vec, -) -> color_eyre::Result<()> { - let header = header_relay - .client_pangolin - .subxt() - .rpc() - .header(Some(sp_core::H256::from_str(block_hash.as_ref()).unwrap())) - .await? - .unwrap(); - let finality_target = FinalityTarget { - parent_hash: header.parent_hash, - number: header.number, - state_root: header.state_root, - extrinsics_root: header.extrinsics_root, - digest: Decode::decode(&mut header.digest.encode().as_slice())?, - __subxt_unused_type_params: Default::default(), + let input = SolochainHeaderInput { + lanes, + client_source: client_pangolin, + client_target: client_pangolin_parachain, + subquery_source: subquery_pangolin, + index_origin_type: OriginType::BridgePangolinParachain, }; - let grandpa_justification = codec::Decode::decode(&mut justification.as_slice())?; - let runtime = header_relay.client_parachain.runtime(); - let track = runtime - .tx() - .bridge_pangolin_grandpa() - .submit_finality_proof(finality_target, grandpa_justification) - .sign_and_submit_then_watch(header_relay.client_parachain.account().signer()) - .await?; - - let events = track.wait_for_finalized_success().await?; - tracing::info!( - target: "pangolin-pangolinparachain", - "[header-pangolin-to-parachain] The extrinsic hash: {:?}", - events.extrinsic_hash() - ); - Ok(()) + let runner = SolochainHeaderRunner::new(input); + Ok(runner.start().await?) } diff --git a/bridges/pangolin-pangolinparachain/bridge/src/service/header/para_head_to_pangolin.rs b/bridges/pangolin-pangolinparachain/bridge/src/service/header/para_head_to_pangolin.rs index dfbbb17d7..f718f6601 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/service/header/para_head_to_pangolin.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/service/header/para_head_to_pangolin.rs @@ -1,240 +1,59 @@ -use client_pangolin::client::PangolinClient; -use client_pangolin::component::PangolinClientComponent; -use client_pangolin::types::runtime_types::{self as pangolin_runtime_types}; -use client_rococo::client::RococoClient; -use client_rococo::component::RococoClientComponent; -use client_rococo::types::runtime_types as rococo_runtime_types; use lifeline::{Lifeline, Service, Task}; -use sp_runtime::traits::Hash; + +use relay_s2s::header::ParaHeaderRunner; +use relay_s2s::types::ParaHeaderInput; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; use support_lifeline::service::BridgeService; -use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; +use crate::bridge::{BridgeBus, BridgeConfig}; #[derive(Debug)] -pub struct RococoToPangolinParaHeaderRelayService { +pub struct ParaHeadRelayService { _greet: Lifeline, } -impl BridgeService for RococoToPangolinParaHeaderRelayService {} +impl BridgeService for ParaHeadRelayService {} -impl Service for RococoToPangolinParaHeaderRelayService { +impl Service for ParaHeadRelayService { type Bus = BridgeBus; type Lifeline = color_eyre::Result; fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task( - &format!("{}-rococo-pangolin-header-relay", BridgeTask::name()), - async move { - while let Err(e) = start().await { - tracing::error!( - target: "pangolin-pangolinparachain", - "Failed to start para-head-to-pangolin header relay service, restart after some seconds: {:?}", - e, - ); - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } - Ok(()) - }, - ); - Ok(Self { _greet }) - } -} - -struct HeaderRelay { - client_pangolin: PangolinClient, - client_rococo: RococoClient, - para_id: u32, -} - -impl HeaderRelay { - async fn new() -> color_eyre::Result { - let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; - - let config_pangolin = bridge_config.pangolin; - let config_rococo = bridge_config.rococo; - - let client_pangolin = - PangolinClientComponent::component(config_pangolin.to_pangolin_client_config()?) - .await?; - let client_rococo = - RococoClientComponent::component(config_rococo.to_rococo_client_config()?).await?; - - Ok(Self { - client_pangolin, - client_rococo, - para_id: bridge_config - .pangolin_parachain - .para_id - .expect("ParaId not found"), - }) - } -} - -async fn start() -> color_eyre::Result<()> { - tracing::info!( - target: "pangolin-pangolinparachain", - "[para-header-rococo-to-pangolin] SERVICE RESTARTING..." - ); - let mut header_relay = HeaderRelay::new().await?; - loop { - match run(&header_relay).await { - Ok(_) => {} - Err(err) => { + let _greet = Self::try_task("para-head-relay-service", async move { + while let Err(e) = start().await { tracing::error!( target: "pangolin-pangolinparachain", - "[para-header-rococo-to-pangolin] Failed to relay header: {:?}", - err + "[header-relay] [para-head-to-pangolin] An error occurred for header relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "pangolin-pangolinparachain", + "[header-relay] [para-head-to-pangolin] Try to restart header relay service.", ); - header_relay = HeaderRelay::new().await?; } - } - tokio::time::sleep(std::time::Duration::from_secs(5)).await; + Ok(()) + }); + Ok(Self { _greet }) } } -async fn run(header_relay: &HeaderRelay) -> color_eyre::Result<()> { - let best_target_header = header_relay - .client_pangolin - .subxt() - .rpc() - .header(None) - .await? - .ok_or_else(|| BridgerError::Custom(String::from("Failed to get pangolin header")))?; - tracing::trace!( - target: "pangolin-pangolinparachain", - "[para-head-relay-rococo-to-pangolin] Current pangolin block: {:?}", - &best_target_header.number, - ); - - // TODO Hardcode ParaId - let para_head_at_target = header_relay - .client_pangolin - .runtime() - .storage() - .bridge_rococo_parachains() - .best_para_heads( - pangolin_runtime_types::bp_polkadot_core::parachains::ParaId(header_relay.para_id), - Some(best_target_header.hash()), - ) - .await?; - tracing::trace!( - target: "pangolin-pangolinparachain", - "[para-head-relay-rococo-to-pangolin] The latest para-head on pangolin: {:?}", - ¶_head_at_target, - ); - - let best_finalized_source_block_hash = header_relay - .client_pangolin - .runtime() - .storage() - .bridge_rococo_grandpa() - .best_finalized(Some(best_target_header.hash())) - .await?; - - let best_finalized_source_block_at_target = header_relay - .client_rococo - .subxt() - .rpc() - .block(Some(best_finalized_source_block_hash)) - .await? - .ok_or_else(|| BridgerError::Custom("Failed to get Rococo block".to_string()))?; - tracing::trace!( - target: "pangolin-pangolinparachain", - "[para-head-relay-rococo-to-pangolin] The latest rococo block on pangolin: {:?}", - &best_finalized_source_block_at_target.block.header.number, - ); - - // TODO Hardcode ParaId - let para_head_at_source = header_relay - .client_rococo - .runtime() - .storage() - .paras() - .heads( - rococo_runtime_types::polkadot_parachain::primitives::Id(header_relay.para_id), - Some(best_finalized_source_block_hash), - ) - .await?; - tracing::trace!( +async fn start() -> color_eyre::Result<()> { + tracing::info!( target: "pangolin-pangolinparachain", - "[para-head-relay-rococo-to-pangolin] The latest para-head on rococo {:?}", - &best_finalized_source_block_at_target.block.header.number, + "[header-para-head-to-pangolin] [para-head-to-pangolin] SERVICE RESTARTING..." ); + let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; + let config_relay = bridge_config.relay; - let need_relay = match (para_head_at_source, para_head_at_target) { - (Some(head_at_source), Some(head_at_target)) - if head_at_target.at_relay_block_number - < best_finalized_source_block_at_target.block.header.number - && head_at_target.head_hash - != sp_runtime::traits::BlakeTwo256::hash(head_at_source.0.as_slice()) => - { - true - } - (Some(_), None) => true, - (None, Some(_)) => true, + let client_pangolin = bridge_config.pangolin.to_pangolin_client().await?; + let client_rococo = bridge_config.rococo.to_rococo_client().await?; - (None, None) => { - tracing::info!( - target: "pangolin-pangolinparachain", - "[para-head-relay-rococo-to-pangolin] Parachain is unknown to both clients" - ); - false - } - (Some(_), Some(_)) => { - tracing::info!( - target: "pangolin-pangolinparachain", - "[para-head-relay-rococo-to-pangolin] It doesn't need to relay" - ); - false - } + let input = ParaHeaderInput { + client_relaychain: client_rococo, + client_solochain: client_pangolin, + para_id: config_relay.para_id, }; - - if need_relay { - let heads_proofs = header_relay - .client_rococo - .subxt() - .rpc() - .read_proof( - vec![bp_parachains::parachain_head_storage_key_at_source( - "Paras", - header_relay.para_id.into(), - )], - Some(best_finalized_source_block_hash), - ) - .await?; - tracing::info!( - target: "pangolin-pangolinparachain", - "[para-head-relay-rococo-to-pangolin] Submitting parachain heads update transaction to pangolin", - ); - - let runtime = header_relay.client_pangolin.runtime(); - let track = runtime - .tx() - .bridge_rococo_parachains() - .submit_parachain_heads( - best_finalized_source_block_hash, - vec![ - pangolin_runtime_types::bp_polkadot_core::parachains::ParaId( - header_relay.para_id, - ), - ], - heads_proofs - .proof - .into_iter() - .map(|bytes| bytes.0) - .collect(), - ) - .sign_and_submit_then_watch(header_relay.client_pangolin.account().signer()) - .await?; - let events = track.wait_for_finalized_success().await?; - tracing::info!( - target: "pangolin-pangolinparachain", - "[para-head-relay-rococo-to-pangolin] The tx hash {:?} emitted", - events.extrinsic_hash() - ); - } - - Ok(()) + let runner = ParaHeaderRunner::new(input); + Ok(runner.start().await?) } diff --git a/bridges/pangolin-pangolinparachain/bridge/src/service/header/rococo_to_pangolin.rs b/bridges/pangolin-pangolinparachain/bridge/src/service/header/rococo_to_pangolin.rs index a9e5d8d5b..8eece16df 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/service/header/rococo_to_pangolin.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/service/header/rococo_to_pangolin.rs @@ -1,24 +1,12 @@ -use client_pangolin::client::PangolinClient; -use client_pangolin::component::PangolinClientComponent; -use client_pangolin::types::runtime_types::sp_runtime::generic::header::Header as FinalityTarget; -use client_rococo::client::RococoClient; -use client_rococo::component::RococoClientComponent; -use client_rococo::types::runtime_types::bp_header_chain::justification::GrandpaJustification; -use client_rococo::types::runtime_types::sp_runtime::generic::header::Header; -use client_rococo::types::runtime_types::sp_runtime::traits::BlakeTwo256; use lifeline::{Lifeline, Service, Task}; -use std::str::FromStr; +use subquery_s2s::types::OriginType; + +use relay_s2s::header::RelaychainHeaderRunner; +use relay_s2s::types::RelaychainHeaderInput; use support_common::config::{Config, Names}; -use support_common::error::BridgerError; use support_lifeline::service::BridgeService; -use codec::{Decode, Encode}; - -use subquery_s2s::types::{BridgeName, OriginType}; -use subquery_s2s::{Subquery, SubqueryComponent}; - -use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; -use crate::service::subscribe::ROCOCO_JUSTIFICATIONS; +use crate::bridge::{BridgeBus, BridgeConfig}; #[derive(Debug)] pub struct RococoToPangolinHeaderRelayService { @@ -32,268 +20,48 @@ impl Service for RococoToPangolinHeaderRelayService { type Lifeline = color_eyre::Result; fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task( - &format!("{}-rococo-pangolin-header-relay", BridgeTask::name()), - async move { - while let Err(e) = start().await { - tracing::error!( - target: "pangolin-pangolinparachain", - "Failed to start rococo-to-pangolin header relay service, restart after some seconds: {:?}", - e, - ); - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } - Ok(()) - }, - ); - Ok(Self { _greet }) - } -} - -struct HeaderRelay { - client_pangolin: PangolinClient, - client_rococo: RococoClient, - subquery_rococo: Subquery, - subquery_pangolin_parachain: Subquery, - subquery_parachain_rococo: subquery_parachain::Subquery, -} - -impl HeaderRelay { - async fn new() -> color_eyre::Result { - let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; - - let config_pangolin = bridge_config.pangolin; - let config_rococo = bridge_config.rococo; - - let client_pangolin = - PangolinClientComponent::component(config_pangolin.to_pangolin_client_config()?) - .await?; - let client_rococo = - RococoClientComponent::component(config_rococo.to_rococo_client_config()?).await?; - - let config_index = bridge_config.index; - let subquery_rococo = - SubqueryComponent::component(config_index.rococo, BridgeName::PangolinParachain); - let subquery_pangolin_parachain = SubqueryComponent::component( - config_index.pangolin_parachain, - BridgeName::PangolinParachain, - ); - let subquery_parachain_rococo = subquery_parachain::SubqueryComponent::component( - config_index.parachain_rococo, - subquery_parachain::types::BridgeName::PangolinParachain, - ); - - Ok(Self { - client_pangolin, - client_rococo, - subquery_rococo, - subquery_pangolin_parachain, - subquery_parachain_rococo, - }) - } -} - -async fn start() -> color_eyre::Result<()> { - tracing::info!( - target: "pangolin-pangolinparachain", - "[header-rococo-to-pangolin] SERVICE RESTARTING..." - ); - let mut header_relay = HeaderRelay::new().await?; - loop { - match run(&header_relay).await { - Ok(_) => {} - Err(err) => { + let _greet = Self::try_task("rococo-to-pangolin-header-relay-service", async move { + while let Err(e) = start().await { tracing::error!( target: "pangolin-pangolinparachain", - "[header-rococo-to-pangolin] Failed to relay header: {:?}", - err + "[header-relay] [rococo-to-pangolin] An error occurred for header relay {:?}", + e, ); - header_relay = HeaderRelay::new().await?; - } - } - tokio::time::sleep(std::time::Duration::from_secs(5)).await; - } -} - -async fn run(header_relay: &HeaderRelay) -> color_eyre::Result<()> { - let last_relayed_rococo_hash_in_pangolin = header_relay - .client_pangolin - .runtime() - .storage() - .bridge_rococo_grandpa() - .best_finalized(None) - .await?; - tracing::debug!( - target: "pangolin-pangolinparachain", - "[header-relay-rococo-to-pangolin] Get last relayed rococo block hash: {:?}", - &last_relayed_rococo_hash_in_pangolin - ); - - let last_relayed_rococo_block_in_pangolin = header_relay - .client_rococo - .subxt() - .rpc() - .block(Some(last_relayed_rococo_hash_in_pangolin)) - .await? - .ok_or_else(|| { - BridgerError::Custom(format!( - "Failed to query block by [{}] in rococo", - last_relayed_rococo_hash_in_pangolin - )) - })?; - - let block_number = last_relayed_rococo_block_in_pangolin.block.header.number; - tracing::info!( - target: "pangolin-pangolinparachain", - "[header-relay-rococo-to-pangolin] Get last relayed rococo block number: {:?}", - block_number - ); - if try_to_relay_mandatory(header_relay, block_number) - .await? - .is_none() - { - try_to_relay_header_on_demand(header_relay, block_number).await?; - } - - Ok(()) -} - -/// Try to relay mandatory headers, return Ok(Some(block_number)) if success, else Ok(None) -async fn try_to_relay_mandatory( - header_relay: &HeaderRelay, - last_block_number: u32, -) -> color_eyre::Result> { - let next_mandatory_block = header_relay - .subquery_rococo - .next_mandatory_header(last_block_number) - .await?; - - if let Some(block_to_relay) = next_mandatory_block { - tracing::info!( - target: "pangolin-pangolinparachain", - "[header-relay-rococo-to-pangolin] Next mandatory block: {:?}", - &block_to_relay.block_number, - ); - let justification = header_relay - .subquery_rococo - .find_justification(block_to_relay.block_hash.clone(), true) - .await?; - submit_finality( - header_relay, - block_to_relay.block_hash, - justification.unwrap().justification, - ) - .await?; - - Ok(Some(block_to_relay.block_number)) - } else { - tracing::info!( - target: "pangolin-pangolinparachain", - "[header-relay-rococo-to-pangolin] Next mandatory block not found", - ); - Ok(None) - } -} - -async fn try_to_relay_header_on_demand( - header_relay: &HeaderRelay, - last_block_number: u32, -) -> color_eyre::Result<()> { - let next_para_header = header_relay - .subquery_pangolin_parachain - .next_needed_header(OriginType::BridgePangolin) - .await?; - - if next_para_header.is_none() { - return Ok(()); - } - - if let Some(next_para_header) = next_para_header { - let next_header = header_relay - .subquery_parachain_rococo - .get_block_with_para_head(next_para_header.block_hash) - .await? - .filter(|header| { - tracing::debug!( + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( target: "pangolin-pangolinparachain", - "[header-relay-rococo-to-pangolin] Get related realy chain header: {:?}", - header.included_relay_block + "[header-relay] [rococo-to-pangolin] Try to restart header relay service.", ); - header.included_relay_block > last_block_number - }); - - if next_header.is_none() { - tracing::debug!( - target: "pangolin-pangolinparachain", - "[header-relay-rococo-to-pangolin] Para head has not been finalized" - ); - return Ok(()); - } - - let pangolin_justification_queue = ROCOCO_JUSTIFICATIONS.lock().await; - if let Some(justification) = pangolin_justification_queue.back().cloned() { - let grandpa_justification = GrandpaJustification::>::decode( - &mut justification.as_ref(), - ) - .map_err(|err| { - BridgerError::Custom(format!( - "Failed to decode justification of rococo: {:?}", - err - )) - })?; - tracing::debug!( - target: "pangolin-pangolinparachain", - "[header-relay-rococo-to-pangolin] Test justification: {:?}", - grandpa_justification.commit.target_number - ); - if grandpa_justification.commit.target_number > last_block_number { - submit_finality( - header_relay, - format!("{:#x}", grandpa_justification.commit.target_hash), - justification.to_vec(), - ) - .await?; } - } + Ok(()) + }); + Ok(Self { _greet }) } - - Ok(()) } -async fn submit_finality( - header_relay: &HeaderRelay, - block_hash: impl AsRef, - justification: Vec, -) -> color_eyre::Result<()> { - let header = header_relay - .client_rococo - .subxt() - .rpc() - .header(Some(sp_core::H256::from_str(block_hash.as_ref()).unwrap())) - .await? - .unwrap(); - let finality_target = FinalityTarget { - parent_hash: header.parent_hash, - number: header.number, - state_root: header.state_root, - extrinsics_root: header.extrinsics_root, - digest: Decode::decode(&mut header.digest.encode().as_slice())?, - __subxt_unused_type_params: Default::default(), - }; - let grandpa_justification = codec::Decode::decode(&mut justification.as_slice())?; - let runtime = header_relay.client_pangolin.runtime(); - let track = runtime - .tx() - .bridge_rococo_grandpa() - .submit_finality_proof(finality_target, grandpa_justification) - .sign_and_submit_then_watch(header_relay.client_pangolin.account().signer()) - .await?; - - let events = track.wait_for_finalized_success().await?; +async fn start() -> color_eyre::Result<()> { tracing::info!( target: "pangolin-pangolinparachain", - "[header-rococo-to-pangolin] The extrinsic hash: {:?}", - events.extrinsic_hash() + "[header-rococo-to-pangolin] [rococo-to-pangolin] SERVICE RESTARTING..." ); - Ok(()) + let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; + + let client_pangolin = bridge_config.pangolin.to_pangolin_client().await?; + let client_rococo = bridge_config.rococo.to_rococo_client().await?; + + let config_index = bridge_config.index; + let subquery_rococo = config_index.to_rococo_subquery(); + let subquery_pangolin_parachain = config_index.to_pangolin_parachain_subquery(); + let subquery_candidate = config_index.to_candidate_subquery(); + + let input = RelaychainHeaderInput { + client_relaychain: client_rococo, + client_solochain: client_pangolin, + subquery_relaychain: subquery_rococo, + subquery_parachain: subquery_pangolin_parachain, + index_origin_type: OriginType::BridgePangolin, + subquery_candidate, + }; + let runner = RelaychainHeaderRunner::new(input); + Ok(runner.start().await?) } diff --git a/bridges/pangolin-pangolinparachain/bridge/src/service/message.rs b/bridges/pangolin-pangolinparachain/bridge/src/service/message.rs index bf27de949..dfe5f9ae0 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/service/message.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/service/message.rs @@ -1,262 +1,2 @@ -use bp_darwinia_core::AccountId; -use bp_darwinia_core::AccountIdConverter; -use feemarket_s2s::relay::BasicRelayStrategy; -use futures::{FutureExt, TryFutureExt}; -use lifeline::{Lifeline, Service, Task}; -use relay_substrate_client::{AccountIdOf, Chain, Client, TransactionSignScheme}; -use relay_utils::metrics::MetricsParams; -use sp_core::Pair; -use substrate_relay_helper::messages_lane::MessagesRelayParams; -use substrate_relay_helper::TransactionParams; - -use relay_pangolin_client::PangolinChain; -use relay_pangolin_parachain_client::PangolinParachainChain; -use support_common::config::{Config, Names}; -use support_common::error::BridgerError; -use support_lifeline::service::BridgeService; - -use crate::bridge::BridgeTask; -use crate::bridge::{BridgeBus, BridgeConfig}; -use crate::bridge::{ChainInfoConfig, RelayConfig}; -use crate::chains::pangolin::PangolinMessagesToPangolinParachain; -use crate::chains::pangolin_parachain::PangolinParachainMessagesToPangolin; -use crate::feemarket::{PangolinFeemarketApi, PangolinParachainFeemarketApi}; -use crate::types::{MessagesPalletOwnerSigningParams, RelayHeadersAndMessagesInfo}; - -// /// Maximal allowed conversion rate error ratio (abs(real - stored) / stored) that we allow. -// /// -// /// If it is zero, then transaction will be submitted every time we see difference between -// /// stored and real conversion rates. If it is large enough (e.g. > than 10 percents, which is 0.1), -// /// then rational relayers may stop relaying messages because they were submitted using -// /// lesser conversion rate. -// const CONVERSION_RATE_ALLOWED_DIFFERENCE_RATIO: f64 = 0.05; - -#[derive(Debug)] -pub struct MessageRelayService { - _greet: Lifeline, -} - -impl BridgeService for MessageRelayService {} - -impl Service for MessageRelayService { - type Bus = BridgeBus; - type Lifeline = color_eyre::Result; - - fn spawn(_bus: &Self::Bus) -> Self::Lifeline { - let _greet = Self::try_task(&format!("{}-relay", BridgeTask::name()), async move { - if let Err(e) = start() { - tracing::error!(target: "pangolin-pangolinparachain", "{:?}", e); - return Err( - BridgerError::Custom("Failed to start relay service".to_string()).into(), - ); - } - Ok(()) - }); - Ok(Self { _greet }) - } -} - -fn start() -> color_eyre::Result<()> { - let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; - let config_pangolin: ChainInfoConfig = bridge_config.pangolin; - let config_pangolin_parachain: ChainInfoConfig = bridge_config.pangolin_parachain; - let config_relay: RelayConfig = bridge_config.relay; - - let (source_chain, target_chain) = ( - config_pangolin.to_chain_info_with_expect_signer(config_relay.signer_pangolin.clone())?, - config_pangolin_parachain - .to_chain_info_with_expect_signer(config_relay.signer_pangolin_parachain.clone())?, - ); - - let relay_info = RelayHeadersAndMessagesInfo { - source: source_chain, - target: target_chain, - lanes: config_relay.lanes.clone(), - prometheus_params: config_relay.prometheus_params.clone(), - create_relayers_fund_accounts: config_relay.create_relayers_fund_accounts, - only_mandatory_headers: config_relay.only_mandatory_headers, - pangolin_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams { - messages_pallet_owner: config_relay.pangolin_messages_pallet_owner.clone(), - messages_pallet_owner_password: config_relay - .pangolin_messages_pallet_owner_password - .clone(), - }, - pangolin_parachain_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams { - messages_pallet_owner: config_relay - .pangolin_parachain_messages_pallet_owner - .clone(), - messages_pallet_owner_password: config_relay - .pangolin_parachain_messages_pallet_owner_password, - }, - }; - - std::thread::spawn(move || futures::executor::block_on(bridge_relay(relay_info))) - .join() - .map_err(|_| BridgerError::Custom("Failed to join thread handle".to_string()))??; - - // bridge_relay(relay_info).await?; - Ok(()) -} - -async fn bridge_relay(relay_info: RelayHeadersAndMessagesInfo) -> color_eyre::Result<()> { - let pangolin_chain = relay_info.source; - let pangolin_parachain_chain = relay_info.target; - - let pangolin_client = pangolin_chain - .to_substrate_relay_chain::() - .await?; - let pangolin_parachain_client = pangolin_parachain_chain - .to_substrate_relay_chain::() - .await?; - - let pangolin_sign = pangolin_chain.to_keypair::()?; - let pangolin_parachain_sign = - pangolin_parachain_chain.to_keypair::()?; - let pangolin_transactions_mortality = pangolin_chain.transactions_mortality()?; - let pangolin_parachain_transactions_mortality = - pangolin_parachain_chain.transactions_mortality()?; - - let lanes = relay_info.lanes; - - let metrics_params: MetricsParams = relay_info.prometheus_params.clone().into(); - let metrics_params = relay_utils::relay_metrics(metrics_params).into_params(); - - // const METRIC_IS_SOME_PROOF: &str = "it is `None` when metric has been already registered; \ - // this is the command entrypoint, so nothing has been registered yet; \ - // qed"; - - if relay_info.create_relayers_fund_accounts { - let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< - AccountIdOf, - AccountIdConverter, - >(); - let relayers_fund_account_balance = pangolin_client - .free_native_balance(relayer_fund_acount_id.clone()) - .await; - if let Err(relay_substrate_client::Error::AccountDoesNotExist) = - relayers_fund_account_balance - { - tracing::info!(target: "bridge", "Going to create relayers fund account at {}.", PangolinChain::NAME); - create_pangolin_account( - pangolin_client.clone(), - pangolin_sign.clone(), - relayer_fund_acount_id, - ) - .await?; - } - - let relayer_fund_acount_id = pallet_bridge_messages::relayer_fund_account_id::< - AccountIdOf, - AccountIdConverter, - >(); - let relayers_fund_account_balance = pangolin_parachain_client - .free_native_balance(relayer_fund_acount_id.clone()) - .await; - if let Err(relay_substrate_client::Error::AccountDoesNotExist) = - relayers_fund_account_balance - { - tracing::info!(target: "bridge", "Going to create relayers fund account at {}.", PangolinParachainChain::NAME); - create_pangolin_parachain_account( - pangolin_parachain_client.clone(), - pangolin_parachain_sign.clone(), - relayer_fund_acount_id, - ) - .await?; - } - } - - // Need 2x capacity since we consider both directions for each lane - let mut message_relays = Vec::with_capacity(lanes.len() * 2); - for lane in lanes { - let lane = lane.into(); - let pangolin_feemarket_api = - PangolinFeemarketApi::new(pangolin_client.clone(), lane, pangolin_sign.clone()); - let pangolin_parachain_feemarket_api = PangolinParachainFeemarketApi::new( - pangolin_parachain_client.clone(), - lane, - pangolin_parachain_sign.clone(), - ); - - let pangolin_to_pangolin_parachain_messages = substrate_relay_helper::messages_lane::run::< - PangolinMessagesToPangolinParachain, - >(MessagesRelayParams { - source_client: pangolin_client.clone(), - source_transaction_params: TransactionParams { - signer: pangolin_sign.clone(), - mortality: pangolin_transactions_mortality, - }, - target_client: pangolin_parachain_client.clone(), - target_transaction_params: TransactionParams { - signer: pangolin_parachain_sign.clone(), - mortality: pangolin_parachain_transactions_mortality, - }, - source_to_target_headers_relay: None, - target_to_source_headers_relay: None, - lane_id: lane, - metrics_params: metrics_params.clone().disable(), - standalone_metrics: None, - relay_strategy: BasicRelayStrategy::new( - pangolin_feemarket_api, - AccountId::from(pangolin_sign.public().0), - ), - }) - .map_err(|e| format!("{}", e)) - .boxed(); - - let pangolin_parachain_to_pangolin_messages = substrate_relay_helper::messages_lane::run::< - PangolinParachainMessagesToPangolin, - >(MessagesRelayParams { - source_client: pangolin_parachain_client.clone(), - source_transaction_params: TransactionParams { - signer: pangolin_parachain_sign.clone(), - mortality: pangolin_parachain_transactions_mortality, - }, - target_client: pangolin_client.clone(), - target_transaction_params: TransactionParams { - signer: pangolin_sign.clone(), - mortality: pangolin_transactions_mortality, - }, - source_to_target_headers_relay: None, - target_to_source_headers_relay: None, - lane_id: lane, - metrics_params: metrics_params.clone().disable(), - standalone_metrics: None, - relay_strategy: BasicRelayStrategy::new( - pangolin_parachain_feemarket_api, - AccountId::from(pangolin_parachain_sign.public().0), - ), - }) - .map_err(|e| format!("{}", e)) - .boxed(); - - message_relays.push(pangolin_to_pangolin_parachain_messages); - message_relays.push(pangolin_parachain_to_pangolin_messages); - } - - relay_utils::relay_metrics(metrics_params) - .expose() - .await - .map_err(|e| BridgerError::Custom(format!("{:?}", e)))?; - - if let Err(e) = futures::future::select_all(message_relays).await.0 { - tracing::error!(target: "pangolin-pangolinparachain", "{:?}", e); - return Err(BridgerError::Custom("Failed to start relay".to_string()).into()); - } - Ok(()) -} - -async fn create_pangolin_account( - _left_client: Client, - _left_sign: ::AccountKeyPair, - _account_id: AccountIdOf, -) -> color_eyre::Result<()> { - Err(BridgerError::Custom("Account creation is not supported by this bridge".to_string()).into()) -} - -async fn create_pangolin_parachain_account( - _left_client: Client, - _left_sign: ::AccountKeyPair, - _account_id: AccountIdOf, -) -> color_eyre::Result<()> { - Err(BridgerError::Custom("Account creation is not supported by this bridge".to_string()).into()) -} +pub mod pangolin_to_pangolinparachain; +pub mod pangolinparachain_to_pangolin; diff --git a/bridges/pangolin-pangolinparachain/bridge/src/service/message/pangolin_to_pangolinparachain.rs b/bridges/pangolin-pangolinparachain/bridge/src/service/message/pangolin_to_pangolinparachain.rs new file mode 100644 index 000000000..4898b666e --- /dev/null +++ b/bridges/pangolin-pangolinparachain/bridge/src/service/message/pangolin_to_pangolinparachain.rs @@ -0,0 +1,133 @@ +use client_pangolin::client::PangolinClient; +use client_pangolin_parachain::client::PangolinParachainClient; +use feemarket_s2s::relay::basic::BasicRelayStrategy; +use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::RelayBlockOrigin; + +use relay_s2s::message::{BridgeParachainReceivingRunner, BridgeSolochainDeliveryRunner}; +use relay_s2s::types::{MessageDeliveryInput, MessageReceivingInput}; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig}; + +#[derive(Debug)] +pub struct PangolinToPangolinParachainMessageRelayService { + _greet_delivery: Lifeline, + _greet_receiving: Lifeline, +} + +impl BridgeService for PangolinToPangolinParachainMessageRelayService {} + +impl Service for PangolinToPangolinParachainMessageRelayService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet_delivery = Self::try_task( + "pangolin-to-pangolinparachain-message-delivery-service", + async move { + while let Err(e) = start_delivery().await { + tracing::error!( + target: "pangolin-pangolinparachain", + "[message-relay] [pangolin-to-pangolinparachain] An error occurred for message delivery relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "pangolin-pangolinparachain", + "[message-relay] [pangolin-to-pangolinparachain] Try to restart message delivery relay service.", + ); + } + Ok(()) + }, + ); + let _greet_receiving = Self::try_task( + "pangolin-to-pangolinparachain-message-receiving-service", + async move { + while let Err(e) = start_receiving().await { + tracing::error!( + target: "pangolin-pangolinparachain", + "[message-relay] [pangolin-to-pangolinparachain] An error occurred for message receiving relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "pangolin-pangolinparachain", + "[message-relay] [pangolin-to-pangolinparachain] Try to restart message receiving relay service.", + ); + } + Ok(()) + }, + ); + Ok(Self { + _greet_delivery, + _greet_receiving, + }) + } +} + +async fn message_input( +) -> color_eyre::Result> { + let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; + let relay_config = bridge_config.relay; + + let client_pangolin = bridge_config.pangolin.to_pangolin_client().await?; + let client_pangolin_parachain = bridge_config + .pangolin_parachain + .to_pangolin_parachain_client() + .await?; + + let config_index = bridge_config.index; + let subquery_pangolin = config_index.to_pangolin_subquery(); + let subquery_pangolin_parachain = config_index.to_pangolin_parachain_subquery(); + + let lanes = relay_config.raw_lanes(); + + let input = MessageReceivingInput { + lanes, + relayer_account: client_pangolin.account().account_id().clone(), + client_source: client_pangolin, + client_target: client_pangolin_parachain, + subquery_source: subquery_pangolin, + subquery_target: subquery_pangolin_parachain, + }; + Ok(input) +} + +async fn start_delivery() -> color_eyre::Result<()> { + tracing::info!( + target: "pangolin-pangolinparachain", + "[message-delivery] [delivery-pangolin-to-pangolinparachain] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let relay_strategy = BasicRelayStrategy::new( + input.client_source.clone(), + input.client_source.account().account_id().clone(), + ); + let input = MessageDeliveryInput { + lanes: input.lanes, + nonces_limit: 11, + relayer_account: input.relayer_account, + client_source: input.client_source, + client_target: input.client_target, + subquery_source: input.subquery_source, + subquery_target: input.subquery_target, + relay_block_origin: RelayBlockOrigin::BridgePangolinParachain, + relay_strategy, + }; + let runner = BridgeSolochainDeliveryRunner::new(input); + Ok(runner.start().await?) +} + +async fn start_receiving() -> color_eyre::Result<()> { + tracing::info!( + target: "pangolin-pangolinparachain", + "[message-receiving] [receiving-pangolin-to-pangolinparachain] SERVICE RESTARTING..." + ); + let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; + let relay_config = bridge_config.relay; + let input = message_input().await?; + let runner = BridgeParachainReceivingRunner::new(input, relay_config.para_id); + Ok(runner.start().await?) +} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/service/message/pangolinparachain_to_pangolin.rs b/bridges/pangolin-pangolinparachain/bridge/src/service/message/pangolinparachain_to_pangolin.rs new file mode 100644 index 000000000..b236005fa --- /dev/null +++ b/bridges/pangolin-pangolinparachain/bridge/src/service/message/pangolinparachain_to_pangolin.rs @@ -0,0 +1,133 @@ +use client_pangolin::client::PangolinClient; +use client_pangolin_parachain::client::PangolinParachainClient; +use lifeline::{Lifeline, Service, Task}; +use subquery_s2s::types::RelayBlockOrigin; + +use feemarket_s2s::relay::basic::BasicRelayStrategy; +use relay_s2s::message::{BridgeParachainDeliveryRunner, BridgeSolochainReceivingRunner}; +use relay_s2s::types::{MessageDeliveryInput, MessageReceivingInput}; +use support_common::config::{Config, Names}; +use support_lifeline::service::BridgeService; + +use crate::bridge::{BridgeBus, BridgeConfig}; + +#[derive(Debug)] +pub struct PangolinParachainToPangolinMessageRelayService { + _greet_delivery: Lifeline, + _greet_receiving: Lifeline, +} + +impl BridgeService for PangolinParachainToPangolinMessageRelayService {} + +impl Service for PangolinParachainToPangolinMessageRelayService { + type Bus = BridgeBus; + type Lifeline = color_eyre::Result; + + fn spawn(_bus: &Self::Bus) -> Self::Lifeline { + let _greet_delivery = Self::try_task( + "pangolinparachain-to-pangolin-message-delivery-service", + async move { + while let Err(e) = start_delivery().await { + tracing::error!( + target: "pangolin-pangolinparachain", + "[message-relay] [pangolinparachain-to-pangolin] An error occurred for message delivery relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "pangolin-pangolinparachain", + "[message-relay] [pangolinparachain-to-pangolin] Try to restart message delivery relay service.", + ); + } + Ok(()) + }, + ); + let _greet_receiving = Self::try_task( + "pangolinparachain-to-pangolin-message-receiving-service", + async move { + while let Err(e) = start_receiving().await { + tracing::error!( + target: "pangolin-pangolinparachain", + "[message-relay] [pangolinparachain-to-pangolin] An error occurred for message receiving relay {:?}", + e, + ); + tokio::time::sleep(std::time::Duration::from_secs(5)).await; + tracing::info!( + target: "pangolin-pangolinparachain", + "[message-relay] [pangolinparachain-to-pangolin] Try to restart message receiving relay service.", + ); + } + Ok(()) + }, + ); + Ok(Self { + _greet_delivery, + _greet_receiving, + }) + } +} + +async fn message_input( +) -> color_eyre::Result> { + let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; + let relay_config = bridge_config.relay; + + let client_pangolin_parachain = bridge_config + .pangolin_parachain + .to_pangolin_parachain_client() + .await?; + let client_pangolin = bridge_config.pangolin.to_pangolin_client().await?; + + let config_index = bridge_config.index; + let subquery_pangolin = config_index.to_pangolin_subquery(); + let subquery_pangolin_parachain = config_index.to_pangolin_parachain_subquery(); + + let lanes = relay_config.raw_lanes(); + + let input = MessageReceivingInput { + lanes, + relayer_account: client_pangolin_parachain.account().account_id().clone(), + client_source: client_pangolin_parachain, + client_target: client_pangolin, + subquery_source: subquery_pangolin_parachain, + subquery_target: subquery_pangolin, + }; + Ok(input) +} + +async fn start_delivery() -> color_eyre::Result<()> { + tracing::info!( + target: "pangolin-pangolinparachain", + "[message-delivery] [delivery-pangolinparachain-to-pangolin] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let relay_strategy = BasicRelayStrategy::new( + input.client_source.clone(), + input.client_source.account().account_id().clone(), + ); + let input = MessageDeliveryInput { + lanes: input.lanes, + nonces_limit: 11, + relayer_account: input.relayer_account, + client_source: input.client_source, + client_target: input.client_target, + subquery_source: input.subquery_source, + subquery_target: input.subquery_target, + relay_block_origin: RelayBlockOrigin::BridgePangolin, + relay_strategy, + }; + let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; + let relay_config = bridge_config.relay; + let runner = BridgeParachainDeliveryRunner::new(input, relay_config.para_id); + Ok(runner.start().await?) +} + +async fn start_receiving() -> color_eyre::Result<()> { + tracing::info!( + target: "pangolin-pangolinparachain", + "[message-receiving] [receiving-pangolinparachain-to-pangolin] SERVICE RESTARTING..." + ); + let input = message_input().await?; + let runner = BridgeSolochainReceivingRunner::new(input); + Ok(runner.start().await?) +} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/service/subscribe.rs b/bridges/pangolin-pangolinparachain/bridge/src/service/subscribe.rs index 672aa0d71..cd3479108 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/service/subscribe.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/service/subscribe.rs @@ -1,26 +1,12 @@ -use client_pangolin::{client::PangolinClient, component::PangolinClientComponent}; -use client_rococo::{client::RococoClient, component::RococoClientComponent}; use lifeline::{Lifeline, Service, Task}; -use once_cell::sync::Lazy; -use std::collections::VecDeque; -// use std::sync::Mutex; -use futures::lock::Mutex; -// use subxt::rpc::Subscription; + +use relay_s2s::subscribe::SubscribeJustification; +use relay_s2s::types::JustificationInput; use support_common::config::{Config, Names}; use support_lifeline::service::BridgeService; use crate::bridge::{BridgeBus, BridgeConfig, BridgeTask}; -pub static PANGOLIN_JUSTIFICATIONS: Lazy>> = Lazy::new(|| { - let d = VecDeque::with_capacity(100); - Mutex::new(d) -}); - -pub static ROCOCO_JUSTIFICATIONS: Lazy>> = Lazy::new(|| { - let d = VecDeque::with_capacity(100); - Mutex::new(d) -}); - #[derive(Debug)] pub struct SubscribeService { _greet: Lifeline, @@ -34,12 +20,10 @@ impl Service for SubscribeService { fn spawn(_bus: &Self::Bus) -> Self::Lifeline { let _greet = Self::try_task(&format!("{}-relay", BridgeTask::name()), async move { - let mut execution = start().await; - while let Err(e) = execution { - tracing::error!(target: "pangolin-pangolinparachain", "{:?}", e); + while let Err(e) = start().await { + tracing::error!(target: "pangolin-pangolinparachain", "[subscribe] Failed to start subscribe {:?}", e); tokio::time::sleep(std::time::Duration::from_secs(5)).await; - tracing::info!(target: "pangolin-pangolinparachain", "Try to restart subscribtion service."); - execution = start().await; + tracing::info!(target: "pangolin-pangolinparachain", "[subscribe] Try to restart subscription service."); } Ok(()) }); @@ -49,63 +33,15 @@ impl Service for SubscribeService { async fn start() -> color_eyre::Result<()> { let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; - let config_pangolin = bridge_config.pangolin; - - let client_pangolin = - PangolinClientComponent::component(config_pangolin.to_pangolin_client_config()?).await?; - let client_rococo = - RococoClientComponent::component(bridge_config.rococo.to_rococo_client_config()?).await?; - - let pangolin_handle = tokio::spawn(run_until_pangolin_connection_lost(client_pangolin)); - let rococo_handle = tokio::spawn(run_until_rococo_connection_lost(client_rococo)); - let (_result_p, _result_r) = (pangolin_handle.await, rococo_handle.await); - Ok(()) -} -async fn run_until_pangolin_connection_lost(mut client: PangolinClient) -> color_eyre::Result<()> { - while let Err(err) = subscribe_pangolin(&client).await { - tracing::error!(target: "pangolin-pangolinparachain", "Failed to get justification from pangolin: {:?}", err); - let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; - let client_pangolin = - PangolinClientComponent::component(bridge_config.pangolin.to_pangolin_client_config()?) - .await?; - client = client_pangolin; - } - Ok(()) -} + let client_pangolin = bridge_config.pangolin.to_pangolin_client().await?; + let client_rococo = bridge_config.rococo.to_rococo_client().await?; -async fn run_until_rococo_connection_lost(mut client: RococoClient) -> color_eyre::Result<()> { - while let Err(err) = subscribe_rococo(&client).await { - tracing::error!(target: "pangolin-pangolinparachain", "Failed to get justification from rococo: {:?}", err); - let bridge_config: BridgeConfig = Config::restore(Names::BridgePangolinPangolinParachain)?; - let client_rococo = - RococoClientComponent::component(bridge_config.rococo.to_rococo_client_config()?) - .await?; - client = client_rococo; - } - Ok(()) -} - -async fn subscribe_pangolin(client: &PangolinClient) -> color_eyre::Result<()> { - let mut subscribe = client.subscribe_grandpa_justifications().await?; - while let Some(justification) = subscribe.next().await { - let mut data = PANGOLIN_JUSTIFICATIONS.lock().await; - data.push_back(justification.unwrap()); - if data.len() >= 100 { - data.pop_front(); - } - } - Ok(()) -} - -async fn subscribe_rococo(client: &RococoClient) -> color_eyre::Result<()> { - let mut subscribe = client.subscribe_grandpa_justifications().await?; - while let Some(justification) = subscribe.next().await { - let mut data = ROCOCO_JUSTIFICATIONS.lock().await; - data.push_back(justification.unwrap()); - if data.len() >= 100 { - data.pop_front(); - } - } + let input = JustificationInput { + client_source: client_pangolin, + client_target: client_rococo, + }; + let subscribe = SubscribeJustification::new(input); + subscribe.start().await?; Ok(()) } diff --git a/bridges/pangolin-pangolinparachain/bridge/src/traits.rs b/bridges/pangolin-pangolinparachain/bridge/src/traits.rs deleted file mode 100644 index 15543d204..000000000 --- a/bridges/pangolin-pangolinparachain/bridge/src/traits.rs +++ /dev/null @@ -1,12 +0,0 @@ -/// Bridge-supported network definition. -/// -/// Used to abstract away CLI commands. -pub trait CliChain: relay_substrate_client::Chain { - /// Chain's current version of the runtime. - const RUNTIME_VERSION: sp_version::RuntimeVersion; - - /// Crypto keypair type used to send messages. - /// - /// In case of chains supporting multiple cryptos, pick one used by the CLI. - type KeyPair: sp_core::crypto::Pair; -} diff --git a/bridges/pangolin-pangolinparachain/bridge/src/types.rs b/bridges/pangolin-pangolinparachain/bridge/src/types.rs index 503883d52..89a974757 100644 --- a/bridges/pangolin-pangolinparachain/bridge/src/types.rs +++ b/bridges/pangolin-pangolinparachain/bridge/src/types.rs @@ -1,16 +1,10 @@ use std::fmt::{Display, Formatter}; use std::str::FromStr; -use bp_messages::LaneId; -use relay_substrate_client::ChainRuntimeVersion; use serde::{Deserialize, Deserializer, Serialize, Serializer}; -use sp_core::crypto::Pair; use support_common::error::BridgerError; -use crate::bridge::RuntimeVersionMode; -use crate::traits::CliChain; - #[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, strum::EnumString)] #[strum(serialize_all = "kebab_case")] pub enum BridgeName { @@ -18,117 +12,24 @@ pub enum BridgeName { PangolinToPangolinParachain, } -#[derive(Clone, Debug, Serialize, Deserialize)] -pub struct ChainInfo { - pub host: String, - pub port: u16, - pub signer: Option, - pub secure: bool, - pub signer_password: Option, - pub transactions_mortality: Option, - pub runtime_version_mode: Option, - pub spec_version: Option, - pub transaction_version: Option, -} - -impl ChainInfo { - /// Convert connection params into Substrate client. - pub async fn to_substrate_relay_chain( - &self, - ) -> color_eyre::Result> { - let chain_runtime_version = match self.runtime_version_mode { - Some(RuntimeVersionMode::Auto) => ChainRuntimeVersion::Auto, - Some(RuntimeVersionMode::Custom) => { - let spec_version = self - .spec_version - .ok_or_else(|| BridgerError::Custom("Miss spec_version config".to_string()))?; - let transaction_version = self.transaction_version.ok_or_else(|| { - BridgerError::Custom("Miss transaction_version config".to_string()) - })?; - ChainRuntimeVersion::Custom(spec_version, transaction_version) - } - Some(RuntimeVersionMode::Bundle) | None => ChainRuntimeVersion::Custom( - C::RUNTIME_VERSION.spec_version, - C::RUNTIME_VERSION.transaction_version, - ), - }; - Ok( - relay_substrate_client::Client::new(relay_substrate_client::ConnectionParams { - host: self.host.clone(), - port: self.port, - secure: self.secure, - chain_runtime_version, - }) - .await, - ) - } - - /// Parse signing params into chain-specific KeyPair. - pub fn to_keypair(&self) -> color_eyre::Result { - let signer = match self.signer.clone() { - Some(v) => v, - None => { - return Err(BridgerError::Custom(format!( - "The chain [{}:{}] not set signer", - self.host, self.port, - )) - .into()); - } - }; - C::KeyPair::from_string(&signer, self.signer_password.as_deref()) - .map_err(|e| BridgerError::Custom(format!("Secret string error: {:?}", e)).into()) - } - - pub fn transactions_mortality(&self) -> color_eyre::Result> { - self.transactions_mortality - .map(|transactions_mortality| { - if !(4..=65536).contains(&transactions_mortality) - || !transactions_mortality.is_power_of_two() - { - Err(BridgerError::Custom(format!( - "Transactions mortality {} is not a power of two in a [4; 65536] range", - transactions_mortality, - )) - .into()) - } else { - Ok(transactions_mortality) - } - }) - .transpose() - } -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct InitBridge { - pub bridge: BridgeName, - pub source: ChainInfo, - pub target: ChainInfo, -} - #[derive(Debug, Clone, PartialEq, Eq, Default)] -pub struct HexLaneId(pub LaneId); - -impl From for LaneId { - fn from(lane_id: HexLaneId) -> LaneId { - lane_id.0 - } -} +pub struct HexLaneId(pub [u8; 4]); -impl std::str::FromStr for HexLaneId { - type Err = hex::FromHexError; +impl FromStr for HexLaneId { + type Err = BridgerError; fn from_str(s: &str) -> Result { - let mut lane_id = LaneId::default(); - hex::decode_to_slice(s, &mut lane_id)?; - Ok(HexLaneId(lane_id)) + let hex = array_bytes::hex2array(s) + .map_err(|e| BridgerError::Hex(format!("Failed to parse lane id: {:?}", e)))?; + Ok(HexLaneId(hex)) } } impl Display for HexLaneId { fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { let lane_id = self.0; - let hex_text = hex::encode(lane_id); - f.write_str(&hex_text[..]) + let hex = array_bytes::bytes2hex("0x", lane_id.as_ref()); + f.write_str(&hex[..]) } } @@ -152,66 +53,3 @@ impl Serialize for HexLaneId { serializer.serialize_str(&hex_text[..]) } } - -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -pub struct PrometheusParamsInfo { - /// Do not expose a Prometheus metric endpoint. - pub no_prometheus: bool, - /// Expose Prometheus endpoint at given interface. - #[serde(skip_serializing_if = "String::is_empty")] - #[serde(default)] - pub prometheus_host: String, - /// Expose Prometheus endpoint at given port. - pub prometheus_port: u16, -} - -impl From for relay_utils::metrics::MetricsParams { - fn from(cli_params: PrometheusParamsInfo) -> relay_utils::metrics::MetricsParams { - if !cli_params.no_prometheus { - Some(relay_utils::metrics::MetricsAddress { - host: cli_params.prometheus_host, - port: cli_params.prometheus_port, - }) - .into() - } else { - None.into() - } - } -} - -#[derive(Debug, Clone)] -pub struct RelayHeadersAndMessagesInfo { - pub source: ChainInfo, - pub target: ChainInfo, - - pub lanes: Vec, - pub prometheus_params: PrometheusParamsInfo, - pub create_relayers_fund_accounts: bool, - pub only_mandatory_headers: bool, - - pub pangolin_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams, - pub pangolin_parachain_messages_pallet_owner_signing: MessagesPalletOwnerSigningParams, -} - -#[derive(Debug, Clone)] -pub struct MessagesPalletOwnerSigningParams { - pub messages_pallet_owner: Option, - pub messages_pallet_owner_password: Option, -} - -#[allow(dead_code)] -impl MessagesPalletOwnerSigningParams { - /// Parse signing params into chain-specific KeyPair. - pub fn to_keypair(&self) -> color_eyre::Result> { - let messages_pallet_owner = match self.messages_pallet_owner { - Some(ref messages_pallet_owner) => messages_pallet_owner, - None => return Ok(None), - }; - Chain::KeyPair::from_string( - messages_pallet_owner, - self.messages_pallet_owner_password.as_deref(), - ) - .map_err(|e| BridgerError::Custom(format!("Secret string error: {:?}", e)).into()) - .map(Some) - } -} diff --git a/bridges/pangolin-pangolinparachain/rust-toolchain.toml b/bridges/pangolin-pangolinparachain/rust-toolchain.toml index c03819d86..7f5079439 100644 --- a/bridges/pangolin-pangolinparachain/rust-toolchain.toml +++ b/bridges/pangolin-pangolinparachain/rust-toolchain.toml @@ -1,5 +1,4 @@ [toolchain] -channel = "nightly-2021-12-07" +channel = "stable" components = ["cargo", "clippy", "rustc", "rustfmt", "rust-src"] profile = "minimal" -targets = ["wasm32-unknown-unknown"] diff --git a/bridges/pangolin-pangoro/Cargo.lock b/bridges/pangolin-pangoro/Cargo.lock index afdff4d5e..f0c2cd9d4 100644 --- a/bridges/pangolin-pangoro/Cargo.lock +++ b/bridges/pangolin-pangoro/Cargo.lock @@ -12,38 +12,6 @@ dependencies = [ "regex", ] -[[package]] -name = "abstract-bridge-s2s" -version = "0.5.7" -dependencies = [ - "array-bytes", - "async-trait", - "bp-header-chain", - "bp-messages", - "bp-runtime", - "bridge-runtime-common", - "jsonrpsee-core", - "parity-scale-codec", - "scale-info", - "serde 1.0.136", - "sp-core", - "sp-runtime", - "subxt", - "thiserror", -] - -[[package]] -name = "abstract-feemarket-s2s" -version = "0.5.7" -dependencies = [ - "async-trait", - "bp-runtime", - "pallet-fee-market", - "parity-scale-codec", - "subxt", - "thiserror", -] - [[package]] name = "addr2line" version = "0.17.0" @@ -105,9 +73,9 @@ dependencies = [ [[package]] name = "array-bytes" -version = "1.5.2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b48bc78d3fa4a9a0925d5009f731cbf7e5613d2a4f1a937208f6dde89a287bab" +checksum = "30725d201df311b571b927e5a175a394e3763e11451c2e6415a84dc6e891fb6d" [[package]] name = "array-init" @@ -190,7 +158,7 @@ checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -199,9 +167,9 @@ dependencies = [ [[package]] name = "base58" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" @@ -285,7 +253,7 @@ dependencies = [ [[package]] name = "bp-darwinia-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -301,7 +269,7 @@ dependencies = [ [[package]] name = "bp-header-chain" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "finality-grandpa", "frame-support", @@ -317,19 +285,20 @@ dependencies = [ [[package]] name = "bp-message-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-runtime", "frame-support", "parity-scale-codec", "scale-info", + "sp-runtime", "sp-std", ] [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-runtime", @@ -346,7 +315,7 @@ dependencies = [ [[package]] name = "bp-pangolin" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -361,7 +330,7 @@ dependencies = [ [[package]] name = "bp-pangoro" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -376,7 +345,7 @@ dependencies = [ [[package]] name = "bp-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-polkadot-core", "bp-runtime", @@ -389,7 +358,7 @@ dependencies = [ [[package]] name = "bp-polkadot-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -407,7 +376,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "frame-support", "hash-db", @@ -425,7 +394,7 @@ dependencies = [ [[package]] name = "bp-test-utils" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-header-chain", "ed25519-dalek", @@ -441,13 +410,12 @@ dependencies = [ name = "bridge-pangolin-pangoro" version = "0.5.7" dependencies = [ - "abstract-bridge-s2s", "array-bytes", - "async-trait", + "bridge-s2s-traits", "client-pangolin", "client-pangoro", "color-eyre", - "feemarket-ns2s", + "feemarket-s2s", "lifeline", "postage", "relay-s2s", @@ -465,7 +433,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-message-dispatch", "bp-messages", @@ -487,6 +455,26 @@ dependencies = [ "sp-trie", ] +[[package]] +name = "bridge-s2s-traits" +version = "0.5.7" +dependencies = [ + "array-bytes", + "async-trait", + "bp-header-chain", + "bp-messages", + "bp-runtime", + "bridge-runtime-common", + "jsonrpsee-core", + "parity-scale-codec", + "scale-info", + "serde 1.0.136", + "sp-core", + "sp-runtime", + "subxt", + "thiserror", +] + [[package]] name = "bumpalo" version = "3.9.1" @@ -523,12 +511,6 @@ version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -573,15 +555,14 @@ dependencies = [ name = "client-pangolin" version = "0.5.7" dependencies = [ - "abstract-bridge-s2s", - "abstract-feemarket-s2s", "array-bytes", "async-trait", "bp-pangolin", + "bridge-s2s-traits", + "feemarket-s2s-traits", "finality-grandpa", "parity-scale-codec", "serde 1.0.136", - "serde_json", "sp-core", "sp-finality-grandpa", "sp-runtime", @@ -595,11 +576,11 @@ dependencies = [ name = "client-pangoro" version = "0.5.7" dependencies = [ - "abstract-bridge-s2s", - "abstract-feemarket-s2s", "array-bytes", "async-trait", "bp-pangoro", + "bridge-s2s-traits", + "feemarket-s2s-traits", "finality-grandpa", "parity-scale-codec", "serde 1.0.136", @@ -613,15 +594,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "color-eyre" version = "0.5.11" @@ -721,7 +693,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -731,7 +703,7 @@ version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "lazy_static", ] @@ -952,7 +924,7 @@ version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -961,15 +933,6 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" -[[package]] -name = "erased-serde" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" -dependencies = [ - "serde 1.0.136", -] - [[package]] name = "eyre" version = "0.6.8" @@ -996,19 +959,31 @@ dependencies = [ ] [[package]] -name = "feemarket-ns2s" +name = "feemarket-s2s" version = "0.5.7" dependencies = [ - "abstract-bridge-s2s", - "abstract-feemarket-s2s", "async-trait", + "bridge-s2s-traits", "component-subscan", + "feemarket-s2s-traits", "serde 1.0.136", "support-toolkit", "thiserror", "tracing", ] +[[package]] +name = "feemarket-s2s-traits" +version = "0.5.7" +dependencies = [ + "async-trait", + "bp-runtime", + "pallet-fee-market", + "parity-scale-codec", + "subxt", + "thiserror", +] + [[package]] name = "finality-grandpa" version = "0.14.4" @@ -1071,7 +1046,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "frame-system", @@ -1094,7 +1069,7 @@ version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "parity-scale-codec", "scale-info", "serde 1.0.136", @@ -1103,7 +1078,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "bitflags", "frame-metadata", @@ -1130,7 +1105,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1142,7 +1117,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -1154,7 +1129,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -1164,7 +1139,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "log", @@ -1305,7 +1280,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -1318,7 +1293,7 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.10.0+wasi-snapshot-preview1", ] @@ -1331,10 +1306,11 @@ checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" [[package]] name = "gql_client" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d817a5d0b2a4948deae8550e12ae5eff3a874f8b66090b5863a2dcc917a59a61" +checksum = "a2ad0b978ded703acd23762f99e0f701450c9d0066912c0d7f9bf65bf017d87d" dependencies = [ + "log", "reqwest", "serde 1.0.136", "serde_json", @@ -1446,7 +1422,7 @@ checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.1", ] [[package]] @@ -1487,7 +1463,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.1", "pin-project-lite", "socket2", "tokio", @@ -1609,7 +1585,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1627,6 +1603,12 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + [[package]] name = "itoa" version = "1.0.1" @@ -1730,7 +1712,7 @@ checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec 0.5.2", "bitflags", - "cfg-if 1.0.0", + "cfg-if", "ryu", "static_assertions", ] @@ -1837,15 +1819,6 @@ dependencies = [ "statrs", ] -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.7" @@ -1862,7 +1835,7 @@ version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2061,6 +2034,16 @@ dependencies = [ "num-traits 0.2.14", ] +[[package]] +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +dependencies = [ + "arrayvec 0.4.12", + "itoa 0.4.8", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -2157,7 +2140,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -2201,7 +2184,7 @@ dependencies = [ [[package]] name = "pallet-bridge-dispatch" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-message-dispatch", "bp-runtime", @@ -2218,7 +2201,7 @@ dependencies = [ [[package]] name = "pallet-bridge-grandpa" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-header-chain", "bp-runtime", @@ -2240,7 +2223,7 @@ dependencies = [ [[package]] name = "pallet-bridge-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-message-dispatch", @@ -2261,7 +2244,7 @@ dependencies = [ [[package]] name = "pallet-bridge-parachains" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-parachains", "bp-polkadot-core", @@ -2281,7 +2264,7 @@ dependencies = [ [[package]] name = "pallet-fee-market" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-messages", @@ -2301,7 +2284,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-benchmarking", "frame-support", @@ -2318,7 +2301,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "frame-system", @@ -2364,7 +2347,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", @@ -2390,16 +2373,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.2" @@ -2407,7 +2380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.8.5", ] @@ -2417,34 +2390,20 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.9.2", ] -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec 1.8.0", - "winapi", -] - [[package]] name = "parking_lot_core" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec 1.8.0", "winapi", ] @@ -2455,9 +2414,9 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec 1.8.0", "windows-sys", ] @@ -2754,12 +2713,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.13" @@ -2776,7 +2729,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.6", - "redox_syscall 0.2.13", + "redox_syscall", "thiserror", ] @@ -2830,8 +2783,9 @@ checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" name = "relay-s2s" version = "0.5.7" dependencies = [ - "abstract-bridge-s2s", "array-bytes", + "async-trait", + "bridge-s2s-traits", "once_cell", "sp-core", "sp-runtime", @@ -2996,7 +2950,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ "bitvec", - "cfg-if 1.0.0", + "cfg-if", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -3061,9 +3015,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] @@ -3165,7 +3119,7 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -3186,7 +3140,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -3210,7 +3164,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -3235,7 +3189,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -3283,15 +3237,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - [[package]] name = "smallvec" version = "0.6.14" @@ -3335,7 +3280,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -3352,7 +3297,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.3", @@ -3364,7 +3309,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -3377,7 +3322,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "integer-sqrt", "num-traits 0.2.14", @@ -3392,7 +3337,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "base58", "blake2-rfc", @@ -3425,6 +3370,7 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -3437,7 +3383,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -3447,7 +3393,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "environmental", "parity-scale-codec", @@ -3458,7 +3404,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "finality-grandpa", "log", @@ -3476,7 +3422,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -3490,7 +3436,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "futures", "hash-db", @@ -3514,7 +3460,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "derive_more", @@ -3530,7 +3476,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "backtrace", ] @@ -3538,7 +3484,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "either", "hash256-std-hasher", @@ -3560,7 +3506,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -3577,7 +3523,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -3589,7 +3535,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -3600,7 +3546,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -3623,12 +3569,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3641,7 +3587,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "futures-timer", @@ -3657,15 +3603,9 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde 1.0.136", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -3675,7 +3615,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "memory-db", @@ -3690,7 +3630,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3706,7 +3646,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -3717,7 +3657,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -3731,6 +3671,21 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "ss58-registry" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ef98aedad3dc52e10995e7ed15f1279e11d4da35795f5dac7305742d0feb66" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde 1.0.136", + "serde_json", + "unicode-xid", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -3862,7 +3817,7 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "bitvec", @@ -3888,7 +3843,7 @@ dependencies = [ [[package]] name = "subxt-codegen" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", @@ -3906,7 +3861,7 @@ dependencies = [ [[package]] name = "subxt-macro" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", @@ -3994,10 +3949,10 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "remove_dir_all", "winapi", ] @@ -4196,7 +4151,7 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -4310,7 +4265,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rand 0.8.5", "static_assertions", ] @@ -4442,7 +4397,7 @@ version = "0.2.80" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -4467,7 +4422,7 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", diff --git a/bridges/pangolin-pangoro/bridge/Cargo.toml b/bridges/pangolin-pangoro/bridge/Cargo.toml index b8ac9114e..2e87574f4 100644 --- a/bridges/pangolin-pangoro/bridge/Cargo.toml +++ b/bridges/pangolin-pangoro/bridge/Cargo.toml @@ -15,9 +15,8 @@ version = "0.5.7" [dependencies] tracing = "0.1" color-eyre = "0.5" -async-trait = "0.1" -array-bytes = "1.4" +array-bytes = "2" tokio = { version = "1", features = ["full"] } structopt = "0.3" @@ -31,9 +30,9 @@ support-common = { path = "../../../frame/supports/support-common" } support-lifeline = { path = "../../../frame/supports/support-lifeline" } support-toolkit = { path = "../../../frame/supports/support-toolkit" } -abstract-bridge-s2s = { path = "../../../frame/abstract/bridge-s2s" } +bridge-s2s-traits = { path = "../../../frame/traits/bridge-s2s" } client-pangolin = { path = "../../../frame/assistants/client-pangolin", features = [ "bridge-s2s-pangoro", "feemarket-s2s-pangoro" ]} client-pangoro = { path = "../../../frame/assistants/client-pangoro", features = [ "bridge-s2s-pangolin", "feemarket-s2s-pangolin" ]} subquery-s2s = { path = "../../../frame/assistants/subquery-s2s" } relay-s2s = { path = "../../../frame/assistants/relay-s2s" } -feemarket-ns2s = { path = "../../../frame/assistants/feemarket-ns2s" } +feemarket-s2s = { path = "../../../frame/assistants/feemarket-s2s" } diff --git a/bridges/pangolin-pangoro/bridge/src/bridge/config.rs b/bridges/pangolin-pangoro/bridge/src/bridge/config.rs index cfefadbad..92a5b5e82 100644 --- a/bridges/pangolin-pangoro/bridge/src/bridge/config.rs +++ b/bridges/pangolin-pangoro/bridge/src/bridge/config.rs @@ -64,37 +64,23 @@ impl From for client_pangoro::config::ClientConfig { impl ChainInfoConfig { pub async fn to_pangolin_client(&self) -> color_eyre::Result { - let config = client_pangolin::config::ClientConfig { - endpoint: self.endpoint.clone(), - relayer_private_key: self.signer.clone(), - relayer_real_account: None, - }; + let config = self.clone().into(); Ok(PangolinClientComponent::component(config).await?) } pub async fn to_pangoro_client(&self) -> color_eyre::Result { - let config = client_pangoro::config::ClientConfig { - endpoint: self.endpoint.clone(), - relayer_private_key: self.signer.clone(), - relayer_real_account: None, - }; + let config = self.clone().into(); Ok(PangoroClientComponent::component(config).await?) } } impl IndexConfig { - pub fn to_pangolin_subquery(&self) -> color_eyre::Result { - Ok(SubqueryComponent::component( - self.pangolin.clone(), - BridgeName::PangolinPangoro, - )) + pub fn to_pangolin_subquery(&self) -> Subquery { + SubqueryComponent::component(self.pangolin.clone(), BridgeName::PangolinPangoro) } - pub fn to_pangoro_subquery(&self) -> color_eyre::Result { - Ok(SubqueryComponent::component( - self.pangoro.clone(), - BridgeName::PangolinPangoro, - )) + pub fn to_pangoro_subquery(&self) -> Subquery { + SubqueryComponent::component(self.pangoro.clone(), BridgeName::PangolinPangoro) } } diff --git a/bridges/pangolin-pangoro/bridge/src/command/handler/init.rs b/bridges/pangolin-pangoro/bridge/src/command/handler/init.rs index b501e7757..fa4c54def 100644 --- a/bridges/pangolin-pangoro/bridge/src/command/handler/init.rs +++ b/bridges/pangolin-pangoro/bridge/src/command/handler/init.rs @@ -1,4 +1,4 @@ -use abstract_bridge_s2s::client::S2SClientGeneric; +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay}; use support_toolkit::convert::SmartCodecMapper; use support_common::config::{Config, Names}; diff --git a/bridges/pangolin-pangoro/bridge/src/command/types.rs b/bridges/pangolin-pangoro/bridge/src/command/types.rs index c9ce90109..09378a284 100644 --- a/bridges/pangolin-pangoro/bridge/src/command/types.rs +++ b/bridges/pangolin-pangoro/bridge/src/command/types.rs @@ -4,7 +4,7 @@ use crate::types::BridgeName; /// Bridge template options #[derive(Debug, StructOpt)] -#[structopt(name = "bridge-template", about = "Bridge template")] +#[structopt(name = "bridge-pangolin-pangoro", about = "Bridge pangolin")] pub enum Opts { /// Init bridge pangolin-pangoro Init { diff --git a/bridges/pangolin-pangoro/bridge/src/service/header/pangolin_to_pangoro.rs b/bridges/pangolin-pangoro/bridge/src/service/header/pangolin_to_pangoro.rs index d265d8e8c..8387125d8 100644 --- a/bridges/pangolin-pangoro/bridge/src/service/header/pangolin_to_pangoro.rs +++ b/bridges/pangolin-pangoro/bridge/src/service/header/pangolin_to_pangoro.rs @@ -51,7 +51,7 @@ async fn start() -> color_eyre::Result<()> { let client_pangoro = bridge_config.pangoro.to_pangoro_client().await?; let config_index = bridge_config.index; - let subquery_pangolin = config_index.to_pangolin_subquery()?; + let subquery_pangolin = config_index.to_pangolin_subquery(); let lanes = relay_config.raw_lanes(); let input = SolochainHeaderInput { diff --git a/bridges/pangolin-pangoro/bridge/src/service/header/pangoro_to_pangolin.rs b/bridges/pangolin-pangoro/bridge/src/service/header/pangoro_to_pangolin.rs index 8e351e2e0..3bc1c7cde 100644 --- a/bridges/pangolin-pangoro/bridge/src/service/header/pangoro_to_pangolin.rs +++ b/bridges/pangolin-pangoro/bridge/src/service/header/pangoro_to_pangolin.rs @@ -51,7 +51,7 @@ async fn start() -> color_eyre::Result<()> { let client_pangoro = bridge_config.pangoro.to_pangoro_client().await?; let config_index = bridge_config.index; - let subquery_pangoro = config_index.to_pangoro_subquery()?; + let subquery_pangoro = config_index.to_pangoro_subquery(); let lanes = relay_config.raw_lanes(); let input = SolochainHeaderInput { diff --git a/bridges/pangolin-pangoro/bridge/src/service/message/pangolin_to_pangoro.rs b/bridges/pangolin-pangoro/bridge/src/service/message/pangolin_to_pangoro.rs index bdb8e1b8e..6b7ccb38f 100644 --- a/bridges/pangolin-pangoro/bridge/src/service/message/pangolin_to_pangoro.rs +++ b/bridges/pangolin-pangoro/bridge/src/service/message/pangolin_to_pangoro.rs @@ -1,11 +1,11 @@ use client_pangolin::client::PangolinClient; use client_pangoro::client::PangoroClient; -use feemarket_ns2s::relay::basic::BasicRelayStrategy; use lifeline::{Lifeline, Service, Task}; -use subquery_s2s::types::RelayBlockOrigin; -use relay_s2s::message::{DeliveryRunner, ReceivingRunner}; +use feemarket_s2s::relay::basic::BasicRelayStrategy; +use relay_s2s::message::{BridgeSolochainDeliveryRunner, BridgeSolochainReceivingRunner}; use relay_s2s::types::{MessageDeliveryInput, MessageReceivingInput}; +use subquery_s2s::types::RelayBlockOrigin; use support_common::config::{Config, Names}; use support_lifeline::service::BridgeService; @@ -76,8 +76,8 @@ async fn message_input() -> color_eyre::Result color_eyre::Result<()> { relay_block_origin: RelayBlockOrigin::BridgePangoro, relay_strategy, }; - let runner = DeliveryRunner::new(input); + let runner = BridgeSolochainDeliveryRunner::new(input); Ok(runner.start().await?) } @@ -123,6 +123,6 @@ async fn start_receiving() -> color_eyre::Result<()> { "[message-receiving] [receiving-pangolin-to-pangoro] SERVICE RESTARTING..." ); let input = message_input().await?; - let runner = ReceivingRunner::new(input); + let runner = BridgeSolochainReceivingRunner::new(input); Ok(runner.start().await?) } diff --git a/bridges/pangolin-pangoro/bridge/src/service/message/pangoro_to_pangolin.rs b/bridges/pangolin-pangoro/bridge/src/service/message/pangoro_to_pangolin.rs index b2940dc4e..279f0118e 100644 --- a/bridges/pangolin-pangoro/bridge/src/service/message/pangoro_to_pangolin.rs +++ b/bridges/pangolin-pangoro/bridge/src/service/message/pangoro_to_pangolin.rs @@ -3,8 +3,8 @@ use client_pangoro::client::PangoroClient; use lifeline::{Lifeline, Service, Task}; use subquery_s2s::types::RelayBlockOrigin; -use feemarket_ns2s::relay::basic::BasicRelayStrategy; -use relay_s2s::message::{DeliveryRunner, ReceivingRunner}; +use feemarket_s2s::relay::basic::BasicRelayStrategy; +use relay_s2s::message::{BridgeSolochainDeliveryRunner, BridgeSolochainReceivingRunner}; use relay_s2s::types::{MessageDeliveryInput, MessageReceivingInput}; use support_common::config::{Config, Names}; use support_lifeline::service::BridgeService; @@ -76,8 +76,8 @@ async fn message_input() -> color_eyre::Result color_eyre::Result<()> { relay_block_origin: RelayBlockOrigin::BridgePangolin, relay_strategy, }; - let runner = DeliveryRunner::new(input); + let runner = BridgeSolochainDeliveryRunner::new(input); Ok(runner.start().await?) } @@ -123,6 +123,6 @@ async fn start_receiving() -> color_eyre::Result<()> { "[message-receiving] [receiving-pangoro-to-pangolin] SERVICE RESTARTING..." ); let input = message_input().await?; - let runner = ReceivingRunner::new(input); + let runner = BridgeSolochainReceivingRunner::new(input); Ok(runner.start().await?) } diff --git a/bridges/pangolin-pangoro/bridge/src/types.rs b/bridges/pangolin-pangoro/bridge/src/types.rs index ecc8a8f24..337cd9297 100644 --- a/bridges/pangolin-pangoro/bridge/src/types.rs +++ b/bridges/pangolin-pangoro/bridge/src/types.rs @@ -12,13 +12,6 @@ pub enum BridgeName { PangoroToPangolin, } -// #[derive(Debug, Clone, Serialize, Deserialize)] -// pub struct InitBridge { -// pub bridge: BridgeName, -// pub source: ChainInfoConfig, -// pub target: ChainInfoConfig, -// } - #[derive(Debug, Clone, PartialEq, Eq, Default)] pub struct HexLaneId(pub [u8; 4]); @@ -35,7 +28,7 @@ impl FromStr for HexLaneId { impl Display for HexLaneId { fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { let lane_id = self.0; - let hex = array_bytes::bytes2hex("0x", lane_id); + let hex = array_bytes::bytes2hex("0x", lane_id.as_ref()); f.write_str(&hex[..]) } } diff --git a/bridges/pangolin-ropsten/Cargo.lock b/bridges/pangolin-ropsten/Cargo.lock index d4f839d35..07278f56e 100644 --- a/bridges/pangolin-ropsten/Cargo.lock +++ b/bridges/pangolin-ropsten/Cargo.lock @@ -64,9 +64,9 @@ checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" [[package]] name = "array-bytes" -version = "1.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a14a3cc05445830e3f8aed09cc974007c2c9026729f77c09616c0bcbe78d973" +checksum = "30725d201df311b571b927e5a175a394e3763e11451c2e6415a84dc6e891fb6d" [[package]] name = "array-init" @@ -158,9 +158,9 @@ dependencies = [ [[package]] name = "base58" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" @@ -269,7 +269,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bp-darwinia-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -285,7 +285,7 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-runtime", @@ -302,7 +302,7 @@ dependencies = [ [[package]] name = "bp-pangolin" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -317,7 +317,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "frame-support", "hash-db", @@ -465,7 +465,6 @@ dependencies = [ "parity-scale-codec", "secp256k1", "serde 1.0.136", - "serde_json", "shadow-liketh", "subxt", "support-toolkit", @@ -474,15 +473,6 @@ dependencies = [ "web3", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "color-eyre" version = "0.5.11" @@ -886,15 +876,6 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" -[[package]] -name = "erased-serde" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" -dependencies = [ - "serde 1.0.136", -] - [[package]] name = "ethabi" version = "14.1.0" @@ -1021,7 +1002,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "bitflags", "frame-metadata", @@ -1048,7 +1029,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -1060,7 +1041,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", @@ -1072,7 +1053,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -1082,7 +1063,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "log", @@ -1389,7 +1370,7 @@ checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.1", ] [[package]] @@ -1430,7 +1411,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.1", "pin-project-lite", "socket2", "tokio", @@ -1580,6 +1561,12 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + [[package]] name = "itoa" version = "1.0.1" @@ -1801,15 +1788,6 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.7" @@ -1992,6 +1970,16 @@ dependencies = [ "num-traits 0.2.14", ] +[[package]] +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +dependencies = [ + "arrayvec 0.4.12", + "itoa 0.4.8", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -2166,16 +2154,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.2" @@ -2183,7 +2161,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.8.5", ] @@ -2193,24 +2171,10 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ - "lock_api 0.4.7", + "lock_api", "parking_lot_core 0.9.2", ] -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec 1.8.0", - "winapi", -] - [[package]] name = "parking_lot_core" version = "0.8.5" @@ -2220,7 +2184,7 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec 1.8.0", "winapi", ] @@ -2233,7 +2197,7 @@ checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "smallvec 1.8.0", "windows-sys", ] @@ -2527,12 +2491,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.13" @@ -2549,7 +2507,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.6", - "redox_syscall 0.2.13", + "redox_syscall", "thiserror", ] @@ -2863,9 +2821,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] @@ -2977,7 +2935,7 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -2998,7 +2956,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -3138,15 +3096,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - [[package]] name = "smallvec" version = "0.6.14" @@ -3217,7 +3166,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -3234,7 +3183,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.3", @@ -3246,7 +3195,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -3259,7 +3208,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "integer-sqrt", "num-traits 0.2.14", @@ -3274,7 +3223,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "base58", "blake2-rfc", @@ -3307,6 +3256,7 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -3319,7 +3269,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -3329,7 +3279,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "environmental", "parity-scale-codec", @@ -3340,7 +3290,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -3354,7 +3304,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "futures", "hash-db", @@ -3378,7 +3328,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "derive_more", @@ -3394,7 +3344,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "backtrace", ] @@ -3402,7 +3352,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "either", "hash256-std-hasher", @@ -3424,7 +3374,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -3441,7 +3391,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", @@ -3453,7 +3403,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -3464,7 +3414,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -3487,12 +3437,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3505,15 +3455,9 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde 1.0.136", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -3523,7 +3467,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "memory-db", @@ -3538,7 +3482,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3554,7 +3498,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -3565,7 +3509,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -3579,6 +3523,21 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "ss58-registry" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ef98aedad3dc52e10995e7ed15f1279e11d4da35795f5dac7305742d0feb66" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde 1.0.136", + "serde_json", + "unicode-xid", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -3680,7 +3639,7 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "bitvec", @@ -3706,7 +3665,7 @@ dependencies = [ [[package]] name = "subxt-codegen" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", @@ -3724,7 +3683,7 @@ dependencies = [ [[package]] name = "subxt-macro" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", @@ -3861,7 +3820,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall", "remove_dir_all", "winapi", ] diff --git a/bridges/pangolin-ropsten/bridge/Cargo.toml b/bridges/pangolin-ropsten/bridge/Cargo.toml index fb2bfec17..7e2ae497c 100644 --- a/bridges/pangolin-ropsten/bridge/Cargo.toml +++ b/bridges/pangolin-ropsten/bridge/Cargo.toml @@ -31,7 +31,7 @@ strum = { version = "0.21", features = ["derive"] } lifeline = { git = "https://github.com/fewensa/lifeline-rs.git", branch = "threads-safely" } postage = "0.4" -array-bytes = "1.4" +array-bytes = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" codec = { package = "parity-scale-codec", version = "2" } diff --git a/bridges/pangolin-ropsten/bridge/src/service/check.rs b/bridges/pangolin-ropsten/bridge/src/service/check.rs index bbcf673d2..cb59fc705 100644 --- a/bridges/pangolin-ropsten/bridge/src/service/check.rs +++ b/bridges/pangolin-ropsten/bridge/src/service/check.rs @@ -105,9 +105,6 @@ async fn run(tracker: &Tracker) -> color_eyre::Result<()> { let verified = match client.ethereum().is_verified(&tx_hash, tx_index).await { Ok(v) => v, Err(e) => { - if e.is_restart_need() { - return Err(e.into()); - } tracing::error!( target: "pangolin-ropsten", "[ropsten] [check] Failed verified redeem. [{}]: {}. {:?}", @@ -115,7 +112,7 @@ async fn run(tracker: &Tracker) -> color_eyre::Result<()> { tx.block_hash, e ); - false + return Err(e.into()); } }; if verified { diff --git a/bridges/pangolin-ropsten/bridge/src/service/pangolin/scan_schedule_authorities_change_event.rs b/bridges/pangolin-ropsten/bridge/src/service/pangolin/scan_schedule_authorities_change_event.rs index ff0c0365c..cc13ac8ef 100644 --- a/bridges/pangolin-ropsten/bridge/src/service/pangolin/scan_schedule_authorities_change_event.rs +++ b/bridges/pangolin-ropsten/bridge/src/service/pangolin/scan_schedule_authorities_change_event.rs @@ -54,7 +54,7 @@ impl<'a> ScanScheduleAuthoritiesChangeEvent<'a> { tracing::trace!( target: "pangolin-ropsten", "[pangolin] [schedule-authorities-change] The ScheduleAuthoritiesChangeEvent message: {} don't need to sign and send it at block: {}", - array_bytes::bytes2hex("0x", message), + array_bytes::bytes2hex("0x", message.as_ref()), event.at_block_number ); continue; @@ -63,7 +63,7 @@ impl<'a> ScanScheduleAuthoritiesChangeEvent<'a> { tracing::info!( target: "pangolin-ropsten", "[pangolin] [schedule-authorities-change] Try sign and send authorities with message: {} at block: {}", - array_bytes::bytes2hex("0x", message), + array_bytes::bytes2hex("0x", message.as_ref()), event.at_block_number ); let ex = Extrinsic::SignAndSendAuthorities(message); diff --git a/bridges/pangoro-chapel/Cargo.lock b/bridges/pangoro-chapel/Cargo.lock index e985b2345..3f02eba8e 100644 --- a/bridges/pangoro-chapel/Cargo.lock +++ b/bridges/pangoro-chapel/Cargo.lock @@ -64,9 +64,9 @@ checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" [[package]] name = "array-bytes" -version = "1.4.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad284aeb45c13f2fb4f084de4a420ebf447423bdf9386c0540ce33cb3ef4b8c" +checksum = "30725d201df311b571b927e5a175a394e3763e11451c2e6415a84dc6e891fb6d" [[package]] name = "arrayref" @@ -140,7 +140,7 @@ checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -149,9 +149,9 @@ dependencies = [ [[package]] name = "base58" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" +checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" [[package]] name = "base64" @@ -251,7 +251,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bp-darwinia-core" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-messages", "bp-runtime", @@ -267,7 +267,7 @@ dependencies = [ [[package]] name = "bp-messages" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bitvec", "bp-runtime", @@ -284,7 +284,7 @@ dependencies = [ [[package]] name = "bp-pangoro" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "bp-darwinia-core", "bp-messages", @@ -299,7 +299,7 @@ dependencies = [ [[package]] name = "bp-runtime" version = "0.1.0" -source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.2#9cbc639462552e6c770bffdb02c2fd9d937b9eee" +source = "git+https://github.com/darwinia-network/darwinia-bridges-substrate.git?branch=darwinia-v0.12.3#18e43ae8c83a0dbc4cb9ac363a62baf478cc20fc" dependencies = [ "frame-support", "hash-db", @@ -371,12 +371,6 @@ version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -431,15 +425,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "color-eyre" version = "0.5.11" @@ -547,7 +532,7 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd435b205a4842da59efd07628f921c096bc1cc0a156835b4fa0bcb9a19bcce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -557,7 +542,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "lazy_static", ] @@ -797,7 +782,7 @@ version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -806,15 +791,6 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68b91989ae21441195d7d9b9993a2f9295c7e1a8c96255d8b729accddc124797" -[[package]] -name = "erased-serde" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad132dd8d0d0b546348d7d86cb3191aad14b34e5f979781fc005c80d4ac67ffd" -dependencies = [ - "serde 1.0.136", -] - [[package]] name = "ethabi" version = "16.0.0" @@ -931,7 +907,7 @@ version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "parity-scale-codec", "scale-info", "serde 1.0.136", @@ -940,7 +916,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "bitflags", "frame-metadata", @@ -967,7 +943,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "frame-support-procedural-tools", @@ -979,7 +955,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.0", @@ -991,7 +967,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -1001,7 +977,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "frame-support", "log", @@ -1142,7 +1118,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", @@ -1155,7 +1131,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.10.2+wasi-snapshot-preview1", ] @@ -1297,7 +1273,7 @@ checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.1", ] [[package]] @@ -1338,7 +1314,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.1", "pin-project-lite", "socket2", "tokio", @@ -1450,7 +1426,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1468,6 +1444,12 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +[[package]] +name = "itoa" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" + [[package]] name = "itoa" version = "1.0.1" @@ -1586,7 +1568,7 @@ checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec 0.5.2", "bitflags", - "cfg-if 1.0.0", + "cfg-if", "ryu", "static_assertions", ] @@ -1677,15 +1659,6 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.6" @@ -1701,7 +1674,7 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1847,6 +1820,16 @@ dependencies = [ "num-traits 0.2.14", ] +[[package]] +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +dependencies = [ + "arrayvec 0.4.12", + "itoa 0.4.8", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -1931,7 +1914,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -1995,7 +1978,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "hashbrown", "impl-trait-for-tuples", "parity-util-mem-derive", @@ -2021,16 +2004,6 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.2" @@ -2038,7 +2011,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.6", + "lock_api", "parking_lot_core 0.8.5", ] @@ -2048,34 +2021,20 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" dependencies = [ - "lock_api 0.4.6", + "lock_api", "parking_lot_core 0.9.1", ] -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi", -] - [[package]] name = "parking_lot_core" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", - "redox_syscall 0.2.10", + "redox_syscall", "smallvec", "winapi", ] @@ -2086,9 +2045,9 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.2.10", + "redox_syscall", "smallvec", "windows-sys", ] @@ -2380,12 +2339,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.10" @@ -2402,7 +2355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ "getrandom 0.2.4", - "redox_syscall 0.2.10", + "redox_syscall", ] [[package]] @@ -2605,7 +2558,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ "bitvec", - "cfg-if 1.0.0", + "cfg-if", "derive_more", "parity-scale-codec", "scale-info-derive", @@ -2688,9 +2641,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" dependencies = [ "zeroize", ] @@ -2769,7 +2722,7 @@ version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -2790,7 +2743,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.1", "ryu", "serde 1.0.136", ] @@ -2814,7 +2767,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -2826,7 +2779,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.2", ] @@ -2850,7 +2803,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug 0.3.0", @@ -2898,15 +2851,6 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" -[[package]] -name = "slog" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8347046d4ebd943127157b94d63abb990fcf729dc4e9978927fdf4ac3c998d06" -dependencies = [ - "erased-serde", -] - [[package]] name = "smallvec" version = "1.8.0" @@ -2941,7 +2885,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -2958,7 +2902,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "blake2-rfc", "proc-macro-crate 1.1.0", @@ -2970,7 +2914,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -2983,7 +2927,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "integer-sqrt", "num-traits 0.2.14", @@ -2998,7 +2942,7 @@ dependencies = [ [[package]] name = "sp-core" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "base58", "blake2-rfc", @@ -3031,6 +2975,7 @@ dependencies = [ "sp-runtime-interface", "sp-std", "sp-storage", + "ss58-registry", "substrate-bip39", "thiserror", "tiny-bip39", @@ -3043,7 +2988,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "proc-macro2", "quote", @@ -3053,7 +2998,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "environmental", "parity-scale-codec", @@ -3064,7 +3009,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -3078,7 +3023,7 @@ dependencies = [ [[package]] name = "sp-io" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "futures", "hash-db", @@ -3102,7 +3047,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "async-trait", "derive_more", @@ -3118,7 +3063,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "3.0.0" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "backtrace", ] @@ -3126,7 +3071,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "either", "hash256-std-hasher", @@ -3148,7 +3093,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -3165,7 +3110,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "Inflector", "proc-macro-crate 1.1.0", @@ -3177,7 +3122,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "scale-info", @@ -3188,7 +3133,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.10.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "log", @@ -3211,12 +3156,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" [[package]] name = "sp-storage" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3229,15 +3174,9 @@ dependencies = [ [[package]] name = "sp-tracing" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ - "erased-serde", - "log", "parity-scale-codec", - "parking_lot 0.10.2", - "serde 1.0.136", - "serde_json", - "slog", "sp-std", "tracing", "tracing-core", @@ -3247,7 +3186,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "hash-db", "memory-db", @@ -3262,7 +3201,7 @@ dependencies = [ [[package]] name = "sp-version" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3278,7 +3217,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -3289,7 +3228,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "4.0.0-dev" -source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.2#5cb17b488d600befa4918915e18d40c28a25353d" +source = "git+https://github.com/darwinia-network/substrate.git?branch=darwinia-v0.12.3#1df7fe589a94caa33e8b9290dd474613bc170416" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -3303,6 +3242,21 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "ss58-registry" +version = "1.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ef98aedad3dc52e10995e7ed15f1279e11d4da35795f5dac7305742d0feb66" +dependencies = [ + "Inflector", + "num-format", + "proc-macro2", + "quote", + "serde 1.0.136", + "serde_json", + "unicode-xid", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -3388,7 +3342,7 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "bitvec", @@ -3414,7 +3368,7 @@ dependencies = [ [[package]] name = "subxt-codegen" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", @@ -3432,7 +3386,7 @@ dependencies = [ [[package]] name = "subxt-macro" version = "0.17.0" -source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.2#7a63da959877078de7db7c14cd2eed9e65e5d54e" +source = "git+https://github.com/darwinia-network/subxt.git?branch=darwinia-v0.12.3#a8a9918afd011518524f40f437d3d6835abfaa05" dependencies = [ "async-trait", "darling", @@ -3528,10 +3482,10 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", - "redox_syscall 0.2.10", + "redox_syscall", "remove_dir_all", "winapi", ] @@ -3715,7 +3669,7 @@ version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3829,7 +3783,7 @@ version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rand 0.8.4", "static_assertions", ] @@ -3955,7 +3909,7 @@ version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -3980,7 +3934,7 @@ version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", diff --git a/bridges/pangoro-chapel/bridge/Cargo.toml b/bridges/pangoro-chapel/bridge/Cargo.toml index 140ac3b75..7b8e7aeee 100644 --- a/bridges/pangoro-chapel/bridge/Cargo.toml +++ b/bridges/pangoro-chapel/bridge/Cargo.toml @@ -35,7 +35,7 @@ serde = { version = "1", features = ["derive"] } lifeline = { git = "https://github.com/fewensa/lifeline-rs.git", branch = "threads-safely" } postage = "0.4" -client-pangoro = { path = "../../../frame/assistants/client-pangoro" } +client-pangoro = { path = "../../../frame/assistants/client-pangoro", features = ["bridge-chapel"] } support-common = { path = "../../../frame/supports/support-common" } support-lifeline = { path = "../../../frame/supports/support-lifeline" } support-terminal = { path = "../../../frame/supports/support-terminal" } diff --git a/bridges/pangoro-chapel/rust-toolchain.toml b/bridges/pangoro-chapel/rust-toolchain.toml index c03819d86..7f5079439 100644 --- a/bridges/pangoro-chapel/rust-toolchain.toml +++ b/bridges/pangoro-chapel/rust-toolchain.toml @@ -1,5 +1,4 @@ [toolchain] -channel = "nightly-2021-12-07" +channel = "stable" components = ["cargo", "clippy", "rustc", "rustfmt", "rust-src"] profile = "minimal" -targets = ["wasm32-unknown-unknown"] diff --git a/bridges/template/rust-toolchain.toml b/bridges/template/rust-toolchain.toml index c03819d86..7f5079439 100644 --- a/bridges/template/rust-toolchain.toml +++ b/bridges/template/rust-toolchain.toml @@ -1,5 +1,4 @@ [toolchain] -channel = "nightly-2021-12-07" +channel = "stable" components = ["cargo", "clippy", "rustc", "rustfmt", "rust-src"] profile = "minimal" -targets = ["wasm32-unknown-unknown"] diff --git a/frame/abstract/bridge-s2s/src/config.rs b/frame/abstract/bridge-s2s/src/config.rs deleted file mode 100644 index 5ab620c65..000000000 --- a/frame/abstract/bridge-s2s/src/config.rs +++ /dev/null @@ -1 +0,0 @@ -pub use crate::types::bp_runtime::Chain as Config; diff --git a/frame/assistants/README.md b/frame/assistants/README.md index 3288b304d..0ee13c377 100644 --- a/frame/assistants/README.md +++ b/frame/assistants/README.md @@ -25,9 +25,17 @@ Please note the following storage keys - EthereumBacking::VerifiedProof -Currently, these chains use this version +effect chains: +- pangolin +- pangoro + +- *Feemarket::Orders + +effect chains: +- darwinia +- crab - pangolin - pangoro - pangolin-parachain - +- crab-parachain diff --git a/frame/assistants/client-crab-parachain/Cargo.toml b/frame/assistants/client-crab-parachain/Cargo.toml index 2a20ea5c1..860996e51 100644 --- a/frame/assistants/client-crab-parachain/Cargo.toml +++ b/frame/assistants/client-crab-parachain/Cargo.toml @@ -18,12 +18,50 @@ readme = 'README.md' edition = "2021" [dependencies] -tracing = "0.1" -thiserror = "1" -array-bytes = "1.4" +thiserror = "1" +tracing = "0.1" serde = { version = "1", features = ["derive"] } -codec = { package = "parity-scale-codec", version = "2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } -support-toolkit = { path = "../../../frame/supports/support-toolkit" } +array-bytes = "2" +codec = { package = "parity-scale-codec", version = "2" } +subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } +bp-crab-parachain = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } + +## maybe common +async-trait = { optional = true, version = "0.1" } + +## substrate +sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } + +## s2s client +finality-grandpa = { optional = true, version = "0.14" } +bridge-s2s-traits = { optional = true, path = "../../../frame/traits/bridge-s2s", features = ["advanced-types"] } + +## feemarket s2s +feemarket-s2s-traits = { optional = true, path = "../../../frame/traits/feemarket-s2s", features = ["advanced-types"] } + +support-toolkit = { path = "../../../frame/supports/support-toolkit", features = ["convert"] } + +[features] +default = [] +substrate = [ + "sp-finality-grandpa", + "sp-runtime", + "sp-core", +] +bridge-s2s = [ + "substrate", + "async-trait", + "finality-grandpa", + "bridge-s2s-traits", +] +bridge-s2s-crab = ["bridge-s2s"] +feemarket-s2s = [ + "async-trait", + "feemarket-s2s-traits", +] +feemarket-s2s-crab = ["feemarket-s2s"] + diff --git a/frame/assistants/client-crab-parachain/src/client.rs b/frame/assistants/client-crab-parachain/src/client.rs index e7a31f61a..8c0565916 100644 --- a/frame/assistants/client-crab-parachain/src/client.rs +++ b/frame/assistants/client-crab-parachain/src/client.rs @@ -1,7 +1,7 @@ -use crate::subxt_runtime::api::RuntimeApi; use subxt::Client; use crate::config::CrabParachainSubxtConfig; +use crate::subxt_runtime::api::RuntimeApi; use crate::types::{DarwiniaAccount, NodeRuntimeSignedExtra}; /// Crab client diff --git a/frame/assistants/client-crab-parachain/src/config.rs b/frame/assistants/client-crab-parachain/src/config.rs index cf64f8aca..66db6e14a 100644 --- a/frame/assistants/client-crab-parachain/src/config.rs +++ b/frame/assistants/client-crab-parachain/src/config.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use subxt::{sp_core, sp_runtime}; +use subxt::sp_runtime; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ClientConfig { @@ -16,13 +16,13 @@ pub struct ClientConfig { pub enum CrabParachainSubxtConfig {} impl subxt::Config for CrabParachainSubxtConfig { - type Index = u32; - type BlockNumber = u32; - type Hash = sp_core::H256; - type Hashing = sp_runtime::traits::BlakeTwo256; - type AccountId = sp_runtime::AccountId32; - type Address = sp_runtime::MultiAddress; - type Header = sp_runtime::generic::Header; - type Signature = sp_runtime::MultiSignature; + type Index = bp_crab_parachain::Nonce; + type BlockNumber = bp_crab_parachain::BlockNumber; + type Hash = bp_crab_parachain::Hash; + type Hashing = bp_crab_parachain::Hashing; + type AccountId = bp_crab_parachain::AccountId; + type Address = bp_crab_parachain::Address; + type Header = bp_crab_parachain::Header; + type Signature = bp_crab_parachain::Signature; type Extrinsic = sp_runtime::OpaqueExtrinsic; } diff --git a/frame/assistants/client-crab-parachain/src/error.rs b/frame/assistants/client-crab-parachain/src/error.rs index 930abe3cd..8ec18ecfb 100644 --- a/frame/assistants/client-crab-parachain/src/error.rs +++ b/frame/assistants/client-crab-parachain/src/error.rs @@ -20,8 +20,11 @@ pub enum ClientError { #[error(transparent)] Tk(#[from] TkError), + #[error("Bytes error: {0}")] + Bytes(String), + #[error("Other error: {0}")] - Other(String), + Custom(String), } impl ClientError { @@ -39,3 +42,26 @@ impl From for ClientError { Self::SubxtBasicError(error) } } + +impl From for ClientError { + fn from(error: subxt::rpc::RpcError) -> Self { + Self::SubxtBasicError(subxt::BasicError::Rpc(error)) + } +} + +impl From for ClientError { + fn from(error: array_bytes::Error) -> Self { + Self::Bytes(format!("{:?}", error)) + } +} + +#[cfg(feature = "bridge-s2s")] +impl From for bridge_s2s_traits::error::S2SClientError { + fn from(error: ClientError) -> Self { + match error { + ClientError::SubxtBasicError(e) => Self::RPC(format!("{:?}", e)), + ClientError::ClientRestartNeed => Self::RPC(format!("Client restart need")), + _ => Self::Custom(format!("{:?}", error)), + } + } +} diff --git a/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/bridge_crab.rs b/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/bridge_crab.rs new file mode 100644 index 000000000..914874f88 --- /dev/null +++ b/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/bridge_crab.rs @@ -0,0 +1,215 @@ +use std::ops::RangeInclusive; + +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay}; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::types::bp_header_chain::justification::GrandpaJustification; +use bridge_s2s_traits::types::bp_messages::{ + InboundLaneData, MessageData, MessageKey, OutboundLaneData, UnrewardedRelayersState, +}; +use bridge_s2s_traits::types::bp_runtime::Chain; +use bridge_s2s_traits::types::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof; +use bridge_s2s_traits::types::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof; +use sp_core::crypto::AccountId32; +use sp_core::storage::StorageKey; +use subxt::storage::StorageKeyPrefix; +use subxt::StorageEntry; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::CrabParachainClient; +use crate::error::ClientError; +use crate::subxt_runtime::api::bridge_crab_messages::storage::{ + InboundLanes, OutboundLanes, OutboundMessages, +}; + +type BundleMessageKey = crate::types::runtime_types::bp_messages::MessageKey; + +/// Message payload for This -> Bridged chain messages. +type FromThisChainMessagePayload = crate::types::runtime_types::bp_message_dispatch::MessagePayload< + sp_core::crypto::AccountId32, + crate::types::runtime_types::sp_runtime::MultiSigner, + crate::types::runtime_types::sp_runtime::MultiSignature, + Vec, +>; + +#[async_trait::async_trait] +impl S2SClientRelay for CrabParachainClient { + fn gen_outbound_messages_storage_key(&self, lane: [u8; 4], message_nonce: u64) -> StorageKey { + let prefix = StorageKeyPrefix::new::(); + OutboundMessages(BundleMessageKey { + lane_id: lane, + nonce: message_nonce, + }) + .key() + .final_key(prefix) + } + + fn gen_outbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + OutboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + fn gen_inbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + InboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + async fn calculate_dispatch_weight( + &self, + lane: [u8; 4], + nonces: RangeInclusive, + ) -> S2SClientResult { + let mut total_weight = 0u64; + for message_nonce in nonces { + let message_data = self + .outbound_messages( + MessageKey { + lane_id: lane, + nonce: message_nonce, + }, + None, + ) + .await? + .ok_or_else(|| { + ClientError::Custom(format!( + "Can not read message data by nonce {} in pangolin", + message_nonce + )) + })?; + let decoded_payload: FromThisChainMessagePayload = + codec::Decode::decode(&mut &message_data.payload[..])?; + total_weight += decoded_payload.weight; + } + Ok(total_weight) + } + + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { + Ok(self + .runtime() + .storage() + .bridge_crab_grandpa() + .best_finalized(at_block) + .await?) + } + + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash> { + let hash = self + .runtime() + .tx() + .bridge_crab_grandpa() + .initialize(initialization_data) + .sign_and_submit(self.account().signer()) + .await?; + Ok(hash) + } + + async fn submit_finality_proof( + &self, + finality_target: ::Header, + justification: GrandpaJustification<::Header>, + ) -> S2SClientResult<::Hash> { + let expected_target = SmartCodecMapper::map_to(&finality_target)?; + let expected_justification = SmartCodecMapper::map_to(&justification)?; + Ok(self + .runtime() + .tx() + .bridge_crab_grandpa() + .submit_finality_proof(expected_target, expected_justification) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn outbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult { + let outbound_lane_data = self + .runtime() + .storage() + .bridge_crab_messages() + .outbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&outbound_lane_data)?; + Ok(expected) + } + + async fn inbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult> { + let inbound_lane_data = self + .runtime() + .storage() + .bridge_crab_messages() + .inbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&inbound_lane_data)?; + Ok(expected) + } + + async fn outbound_messages( + &self, + message_key: MessageKey, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let expected_message_key = SmartCodecMapper::map_to(&message_key)?; + match self + .runtime() + .storage() + .bridge_crab_messages() + .outbound_messages(expected_message_key, hash) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn receive_messages_proof( + &self, + relayer_id_at_bridged_chain: AccountId32, + proof: FromBridgedChainMessagesProof<::Hash>, + messages_count: u32, + dispatch_weight: u64, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + Ok(self + .runtime() + .tx() + .bridge_crab_messages() + .receive_messages_proof( + relayer_id_at_bridged_chain, + expected_proof, + messages_count, + dispatch_weight, + ) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn receive_messages_delivery_proof( + &self, + proof: FromBridgedChainMessagesDeliveryProof<::Hash>, + relayers_state: UnrewardedRelayersState, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + let expected_relayers_state = SmartCodecMapper::map_to(&relayers_state)?; + Ok(self + .runtime() + .tx() + .bridge_crab_messages() + .receive_messages_delivery_proof(expected_proof, expected_relayers_state) + .sign_and_submit(self.account().signer()) + .await?) + } +} diff --git a/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/generic.rs b/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/generic.rs new file mode 100644 index 000000000..74a3907ea --- /dev/null +++ b/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/generic.rs @@ -0,0 +1,252 @@ +use bridge_s2s_traits::client::{S2SClientBase, S2SClientGeneric}; +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::types::bp_header_chain; +use bridge_s2s_traits::types::bp_runtime::Chain; +use finality_grandpa::voter_set::VoterSet; +use sp_finality_grandpa::{AuthorityList, ConsensusLog, ScheduledChange}; +use sp_runtime::generic::{Block, SignedBlock}; +use sp_runtime::{ConsensusEngineId, DigestItem}; +use subxt::rpc::{ClientT, Subscription, SubscriptionClientT}; +use subxt::{sp_core, sp_runtime}; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::CrabParachainClient; +use crate::error::{ClientError, ClientResult}; +use crate::types::runtime_types::bp_header_chain::InitializationData; + +type BundleHeader = crate::types::runtime_types::sp_runtime::generic::header::Header< + u32, + crate::types::runtime_types::sp_runtime::traits::BlakeTwo256, +>; +type SpHeader = sp_runtime::generic::Header; + +const GRANDPA_ENGINE_ID: ConsensusEngineId = *b"FRNK"; + +impl CrabParachainClient { + async fn grandpa_authorities(&self, at: sp_core::H256) -> ClientResult { + let params = subxt::rpc::rpc_params![ + "GrandpaApi_grandpa_authorities", + sp_core::Bytes(Vec::new()), + at + ]; + let hex: String = self + .subxt() + .rpc() + .client + .request("state_call", params) + .await?; + let raw_authorities_set = array_bytes::hex2bytes(hex.as_ref())?; + let authorities = codec::Decode::decode(&mut &raw_authorities_set[..]).map_err(|err| { + ClientError::Custom(format!( + "[DecodeAuthorities] Can not decode authorities: {:?}", + err + )) + })?; + Ok(authorities) + } + + /// Find header digest that schedules next GRANDPA authorities set. + fn find_grandpa_authorities_scheduled_change( + &self, + header: &SpHeader, + ) -> Option> { + let filter_log = |log: ConsensusLog| match log { + ConsensusLog::ScheduledChange(change) => Some(change), + _ => None, + }; + + // find the first consensus digest with the right ID which converts to + // the right kind of consensus log. + header + .digest + .logs + .iter() + .filter_map(|item| match item { + DigestItem::Consensus(engine, logs) => { + if engine == &GRANDPA_ENGINE_ID { + Some(&logs[..]) + } else { + None + } + } + _ => None, + }) + .find_map(|mut l| { + let log = codec::Decode::decode(&mut l).ok(); + log.and_then(filter_log) + }) + } +} + +impl S2SClientBase for CrabParachainClient { + const CHAIN: &'static str = "crabparachain"; + + type Chain = bp_crab_parachain::CrabParachain; + type Extrinsic = sp_runtime::OpaqueExtrinsic; +} + +#[async_trait::async_trait] +impl S2SClientGeneric for CrabParachainClient { + type InitializationData = InitializationData; + + async fn subscribe_grandpa_justifications( + &self, + ) -> S2SClientResult> { + Ok(self + .subxt() + .rpc() + .client + .subscribe( + "grandpa_subscribeJustifications", + None, + "grandpa_unsubscribeJustifications", + ) + .await?) + } + + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>> { + match self.subxt().rpc().header(hash).await? { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn block( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>> + { + Ok(self.subxt().rpc().block(hash).await?) + } + + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; + let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); + Ok(proof) + } + + async fn prepare_initialization_data(&self) -> S2SClientResult { + let mut subscription = self.subscribe_grandpa_justifications().await?; + let justification = subscription + .next() + .await + .ok_or_else(|| S2SClientError::Custom("The subscribe is closed".to_string()))??; + let justification: bp_header_chain::justification::GrandpaJustification = + codec::Decode::decode(&mut &justification.0[..]) + .map_err(|err| S2SClientError::Custom(format!("Wrong justification: {:?}", err)))?; + + let (initial_header_hash, initial_header_number) = ( + justification.commit.target_hash, + justification.commit.target_number, + ); + let initial_header = self + .subxt() + .rpc() + .header(Some(initial_header_hash)) + .await? + .ok_or_else(|| { + S2SClientError::Custom(format!( + "Can not get initial header by hash: {:?}", + initial_header_hash + )) + })?; + tracing::trace!(target: "client-pangolin-parachain", "Selected initial header [{}]: {}", + initial_header_number, + initial_header_hash, + ); + let initial_authorities_set = self.grandpa_authorities(initial_header_hash).await?; + tracing::trace!(target: "client-pangolin-parachain", "Selected initial authorities set: {:?}", + initial_authorities_set, + ); + + // If initial header changes the GRANDPA authorities set, then we need previous authorities + // to verify justification. + let mut authorities_for_verification = initial_authorities_set.clone(); + let scheduled_change = self.find_grandpa_authorities_scheduled_change(&initial_header); + if scheduled_change + .as_ref() + .map(|c| c.delay == 0) + .unwrap_or(false) + { + return Err(S2SClientError::Custom(format!( + "GRANDPA authorities change at {} scheduled to happen in {:?} blocks. \ + We expect regular hange to have zero delay", + initial_header_hash, + scheduled_change.as_ref().map(|c| c.delay), + ))); + } + let schedules_change = scheduled_change.is_some(); + if schedules_change { + authorities_for_verification = + self.grandpa_authorities(initial_header.parent_hash).await?; + tracing::trace!( + target: "client-pangolin-parachain", + "Selected header is scheduling GRANDPA authorities set changes. Using previous set: {:?}", + authorities_for_verification, + ); + } + + // Now let's try to guess authorities set id by verifying justification. + let mut initial_authorities_set_id = 0; + let mut min_possible_block_number = 0; + let authorities_for_verification = VoterSet::new(authorities_for_verification.clone()) + .ok_or(S2SClientError::Custom(format!( + "[ReadInvalidAuthorities]: {:?}", + authorities_for_verification, + )))?; + loop { + tracing::trace!( + target: "client-pangolin-parachain", + "Trying GRANDPA authorities set id: {}", + initial_authorities_set_id, + ); + + let is_valid_set_id = bp_header_chain::justification::verify_justification::( + (initial_header_hash, initial_header_number), + initial_authorities_set_id, + &authorities_for_verification, + &justification, + ) + .is_ok(); + + if is_valid_set_id { + break; + } + + initial_authorities_set_id += 1; + min_possible_block_number += 1; + if min_possible_block_number > initial_header_number { + // there can't be more authorities set changes than headers => if we have reached + // `initial_block_number` and still have not found correct value of + // `initial_authorities_set_id`, then something else is broken => fail + return Err(S2SClientError::Custom(format!( + "[GuessInitialAuthorities]: {}", + initial_header_number + ))); + } + } + + let initialization_data = bp_header_chain::InitializationData { + header: Box::new(initial_header), + authority_list: initial_authorities_set, + set_id: if schedules_change { + initial_authorities_set_id + 1 + } else { + initial_authorities_set_id + }, + is_halted: false, + }; + let bytes = codec::Encode::encode(&initialization_data); + Ok(codec::Decode::decode(&mut &bytes[..]).map_err(|e| { + S2SClientError::Custom(format!("Failed to decode initialization data: {:?}", e)) + })?) + } +} diff --git a/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/mod.rs b/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/mod.rs new file mode 100644 index 000000000..1089cdb09 --- /dev/null +++ b/frame/assistants/client-crab-parachain/src/fastapi/bridge_s2s/mod.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "bridge-s2s-crab")] +mod bridge_crab; +mod generic; diff --git a/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/feemarket_crab.rs b/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/feemarket_crab.rs new file mode 100644 index 000000000..e3a4391af --- /dev/null +++ b/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/feemarket_crab.rs @@ -0,0 +1,34 @@ +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::error::AbstractFeemarketResult; +use feemarket_s2s_traits::types::{Chain, Order}; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::CrabParachainClient; + +#[async_trait::async_trait] +impl FeemarketApiRelay for CrabParachainClient { + async fn order( + &self, + laned_id: feemarket_s2s_traits::types::LaneId, + message_nonce: feemarket_s2s_traits::types::MessageNonce, + ) -> AbstractFeemarketResult< + Option< + Order< + ::AccountId, + ::BlockNumber, + ::Balance, + >, + >, + > { + match self + .runtime() + .storage() + .crab_fee_market() + .orders(laned_id, message_nonce, None) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } +} diff --git a/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/generic.rs b/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/generic.rs new file mode 100644 index 000000000..ba7d86e78 --- /dev/null +++ b/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/generic.rs @@ -0,0 +1,27 @@ +use feemarket_s2s_traits::api::FeemarketApiBase; +use feemarket_s2s_traits::error::{AbstractFeemarketError, AbstractFeemarketResult}; +use feemarket_s2s_traits::types::Chain; + +use crate::client::CrabParachainClient; + +#[async_trait::async_trait] +impl FeemarketApiBase for CrabParachainClient { + const CHAIN: &'static str = "crabparachain"; + + type Chain = bp_crab_parachain::CrabParachain; + + async fn best_finalized_header_number( + &self, + ) -> AbstractFeemarketResult<::BlockNumber> { + let head_hash = self.subxt().rpc().finalized_head().await?; + let header = self + .subxt() + .rpc() + .header(Some(head_hash)) + .await? + .ok_or_else(|| { + AbstractFeemarketError::Custom("Can not query best finalized header".to_string()) + })?; + Ok(header.number) + } +} diff --git a/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/mod.rs b/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/mod.rs new file mode 100644 index 000000000..8fa6a24b7 --- /dev/null +++ b/frame/assistants/client-crab-parachain/src/fastapi/feemarket_s2s/mod.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "feemarket-s2s-crab")] +pub mod feemarket_crab; +pub mod generic; diff --git a/frame/assistants/client-crab-parachain/src/fastapi/mod.rs b/frame/assistants/client-crab-parachain/src/fastapi/mod.rs new file mode 100644 index 000000000..25fa07d6a --- /dev/null +++ b/frame/assistants/client-crab-parachain/src/fastapi/mod.rs @@ -0,0 +1,4 @@ +#[cfg(feature = "bridge-s2s")] +mod bridge_s2s; +#[cfg(feature = "feemarket-s2s")] +mod feemarket_s2s; diff --git a/frame/assistants/client-crab-parachain/src/lib.rs b/frame/assistants/client-crab-parachain/src/lib.rs index 439ba854b..487233c37 100644 --- a/frame/assistants/client-crab-parachain/src/lib.rs +++ b/frame/assistants/client-crab-parachain/src/lib.rs @@ -2,5 +2,7 @@ pub mod client; pub mod component; pub mod config; pub mod error; -pub mod subxt_runtime; pub mod types; + +mod fastapi; +mod subxt_runtime; diff --git a/frame/assistants/client-crab-parachain/src/subxt_runtime/runtime.rs b/frame/assistants/client-crab-parachain/src/subxt_runtime/runtime.rs index 69f4a9ae7..685109aef 100644 --- a/frame/assistants/client-crab-parachain/src/subxt_runtime/runtime.rs +++ b/frame/assistants/client-crab-parachain/src/subxt_runtime/runtime.rs @@ -6459,7 +6459,7 @@ pub mod api { >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, + &(&self.0, &self.1), ::subxt::StorageHasher::Blake2_128Concat, )]) } @@ -10878,7 +10878,7 @@ pub mod api { } impl DispatchError { pub fn details(&self) -> Option { - if let Self::Module (runtime_types::sp_runtime::ModuleError { index, error }) = self { + if let Self::Module(runtime_types::sp_runtime::ModuleError { index, error }) = self { match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (1u8 , 0u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "OverlappingUpgrades" , docs : "Attempt to upgrade validation function while existing upgrade pending" }) , (1u8 , 1u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "ProhibitedByPolkadot" , docs : "Polkadot currently prohibits this parachain from upgrading its validation function" }) , (1u8 , 2u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "TooBig" , docs : "The supplied validation function has compiled into a blob larger than Polkadot is\nwilling to run" }) , (1u8 , 3u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "ValidationDataNotAvailable" , docs : "The inherent which supplies the validation data did not run this block" }) , (1u8 , 4u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "HostConfigurationNotAvailable" , docs : "The inherent which supplies the host configuration did not run this block" }) , (1u8 , 5u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "NotScheduled" , docs : "No validation function upgrade is currently scheduled." }) , (1u8 , 6u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "NothingAuthorized" , docs : "No code upgrade has been authorized." }) , (1u8 , 7u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "Unauthorized" , docs : "The given code upgrade has not been authorized." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value" }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal" }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value" }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit" }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account" }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account" }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist" }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "TooManyCandidates" , docs : "Too many candidates" }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "TooFewCandidates" , docs : "Too few candidates" }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "Unknown" , docs : "Unknown error" }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "Permission" , docs : "Permission issue" }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "AlreadyCandidate" , docs : "User is already a candidate" }) , (8u8 , 5u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "NotCandidate" , docs : "User is not a candidate" }) , (8u8 , 6u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "AlreadyInvulnerable" , docs : "User is already an Invulnerable" }) , (8u8 , 7u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "NoAssociatedValidatorId" , docs : "Account has no associated validator ID" }) , (8u8 , 8u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "ValidatorNotRegistered" , docs : "Validator ID is not yet registered" }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (12u8 , 0u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "FailedToSend" , docs : "Failed to send XCM message." }) , (12u8 , 1u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadXcmOrigin" , docs : "Bad XCM origin." }) , (12u8 , 2u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadXcm" , docs : "Bad XCM data." }) , (12u8 , 3u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadOverweightIndex" , docs : "Bad overweight index." }) , (12u8 , 4u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "WeightOverLimit" , docs : "Provided weight is possibly not enough to execute the message." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Unreachable" , docs : "The desired destination was unreachable, generally because there is a no way of routing\nto it." }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "SendFailure" , docs : "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps\na lack of space for buffering the message." }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Filtered" , docs : "The message execution fails the filter." }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "UnweighableMessage" , docs : "The message's weight could not be determined." }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "DestinationNotInvertible" , docs : "The destination `MultiLocation` provided cannot be inverted." }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Empty" , docs : "The assets to be sent are empty." }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "CannotReanchor" , docs : "Could not re-anchor the assets to declare the fees for the destination chain." }) , (13u8 , 7u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "TooManyAssets" , docs : "Too many assets have been attempted for transfer." }) , (13u8 , 8u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "InvalidOrigin" , docs : "Origin is invalid for sending." }) , (13u8 , 9u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "BadVersion" , docs : "The version of the `Versioned` value used is not able to be interpreted." }) , (13u8 , 10u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "BadLocation" , docs : "The given location could not be used (e.g. because it cannot be expressed in the\ndesired version of XCM)." }) , (13u8 , 11u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "NoSubscription" , docs : "The referenced subscription could not be found." }) , (13u8 , 12u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "AlreadySubscribed" , docs : "The location is invalid since it already has a subscription from us." }) , (15u8 , 0u8) => Some (ErrorDetails { pallet : "DmpQueue" , error : "Unknown" , docs : "The message index given is unknown." }) , (15u8 , 1u8) => Some (ErrorDetails { pallet : "DmpQueue" , error : "OverLimit" , docs : "The amount of weight given is possibly not enough for executing the message." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (17u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (17u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (17u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (17u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (18u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (18u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (18u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (18u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (18u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (18u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (20u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (20u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (20u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (20u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (20u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (20u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (20u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (20u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (20u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (20u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (21u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (21u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (21u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (21u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (21u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (21u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (21u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (21u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (21u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (21u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (21u8 , 10u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (21u8 , 11u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "CrabFeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (23u8 , 1u8) => Some (ErrorDetails { pallet : "CrabFeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (23u8 , 2u8) => Some (ErrorDetails { pallet : "CrabFeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (23u8 , 3u8) => Some (ErrorDetails { pallet : "CrabFeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (23u8 , 4u8) => Some (ErrorDetails { pallet : "CrabFeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (23u8 , 5u8) => Some (ErrorDetails { pallet : "CrabFeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , _ => None } } else { None diff --git a/frame/assistants/client-crab-parachain/src/types/account.rs b/frame/assistants/client-crab-parachain/src/types/account.rs index 77a76e74c..a9ef3d81e 100644 --- a/frame/assistants/client-crab-parachain/src/types/account.rs +++ b/frame/assistants/client-crab-parachain/src/types/account.rs @@ -45,7 +45,8 @@ impl DarwiniaAccount { let account_id = AccountId::from(public); // real account, convert to account id - let real = real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real))); + let real = + real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real.as_ref()))); Ok(Self { account_id, diff --git a/frame/assistants/client-crab/Cargo.toml b/frame/assistants/client-crab/Cargo.toml index 93cf72e03..8b4b7430d 100644 --- a/frame/assistants/client-crab/Cargo.toml +++ b/frame/assistants/client-crab/Cargo.toml @@ -16,16 +16,53 @@ version = "0.5.7" thiserror = "1" tracing = "0.1" -serde = { version = "1", features = ["derive"] } -serde_json = "1" +serde = { version = "1", features = ["derive"] } + +array-bytes = "2" +codec = { package = "parity-scale-codec", version = "2" } +subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } +bp-crab = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } + +## maybe common +async-trait = { optional = true, version = "0.1" } + +## substrate +sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } + +## s2s client +finality-grandpa = { optional = true, version = "0.14" } +bridge-s2s-traits = { optional = true, path = "../../../frame/traits/bridge-s2s", features = ["advanced-types"] } -array-bytes = "1.4" -codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive", "full"] } -futures-util = "0.3.14" -jsonrpsee = { version = "0.8.0", features = ["async-client", "client-ws-transport"] } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } -support-toolkit = { path = "../../../frame/supports/support-toolkit" } +## feemarket s2s +feemarket-s2s-traits = { optional = true, path = "../../../frame/traits/feemarket-s2s", features = ["advanced-types"] } + +support-toolkit = { path = "../../../frame/supports/support-toolkit", features = ["convert"] } [dev-dependencies] -tokio = { version = "1", features = ["full"] } +tokio = { version = "1", features = ["full"] } +serde_json = "1" + +[features] +default = [] +substrate = [ + "sp-finality-grandpa", + "sp-runtime", + "sp-core", +] +bridge-s2s = [ + "substrate", + "async-trait", + "finality-grandpa", + "bridge-s2s-traits", +] +bridge-s2s-darwinia = ["bridge-s2s"] +bridge-s2s-crab-parachain = ["bridge-s2s", "bridge-s2s-traits/bridge-parachain"] + +feemarket-s2s = [ + "async-trait", + "feemarket-s2s-traits", +] +feemarket-s2s-darwinia = ["feemarket-s2s"] +feemarket-s2s-crab-parachain = ["feemarket-s2s"] diff --git a/frame/assistants/client-crab/src/client.rs b/frame/assistants/client-crab/src/client.rs index 191a2d110..d22e96826 100644 --- a/frame/assistants/client-crab/src/client.rs +++ b/frame/assistants/client-crab/src/client.rs @@ -49,10 +49,10 @@ impl CrabClient { let spec_name = runtime_version .other .get("specName") - .ok_or_else(|| ClientError::Other("Failed to query spec name".to_string()))? + .ok_or_else(|| ClientError::Custom("Failed to query spec name".to_string()))? .as_str() .ok_or_else(|| { - ClientError::Other("The spec name not found in runtime version".to_string()) + ClientError::Custom("The spec name not found in runtime version".to_string()) })?; Ok(spec_name.to_string()) } diff --git a/frame/assistants/client-crab/src/config.rs b/frame/assistants/client-crab/src/config.rs index 81d5f9a17..b554cbeb8 100644 --- a/frame/assistants/client-crab/src/config.rs +++ b/frame/assistants/client-crab/src/config.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use subxt::{sp_core, sp_runtime}; +use subxt::sp_runtime; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ClientConfig { @@ -16,13 +16,13 @@ pub struct ClientConfig { pub enum CrabSubxtConfig {} impl subxt::Config for CrabSubxtConfig { - type Index = u32; - type BlockNumber = u32; - type Hash = sp_core::H256; - type Hashing = sp_runtime::traits::BlakeTwo256; - type AccountId = sp_runtime::AccountId32; - type Address = sp_runtime::MultiAddress; - type Header = sp_runtime::generic::Header; - type Signature = sp_runtime::MultiSignature; + type Index = bp_crab::Nonce; + type BlockNumber = bp_crab::BlockNumber; + type Hash = bp_crab::Hash; + type Hashing = bp_crab::Hashing; + type AccountId = bp_crab::AccountId; + type Address = bp_crab::Address; + type Header = bp_crab::Header; + type Signature = bp_crab::Signature; type Extrinsic = sp_runtime::OpaqueExtrinsic; } diff --git a/frame/assistants/client-crab/src/error.rs b/frame/assistants/client-crab/src/error.rs index e32031d43..08692585e 100644 --- a/frame/assistants/client-crab/src/error.rs +++ b/frame/assistants/client-crab/src/error.rs @@ -1,6 +1,5 @@ #![allow(missing_docs)] -use jsonrpsee::core::error::Error as RpcError; use support_toolkit::error::TkError; use thiserror::Error as ThisError; @@ -12,9 +11,6 @@ pub enum ClientError { #[error(transparent)] SubxtBasicError(subxt::BasicError), - #[error(transparent)] - RpcBasicError(RpcError), - #[error("Please reconnect to rpc server")] ClientRestartNeed, @@ -24,17 +20,15 @@ pub enum ClientError { #[error("Wrong seed: {0}")] Seed(String), + #[error("Bytes error: {0}")] + Bytes(String), + #[error("Other error: {0}")] - Other(String), + Custom(String), #[error("Io error: {0}")] Io(#[from] std::io::Error), - // #[error("Rpc error: {0}")] - // Rpc(#[from] jsonrpsee_types::error::Error), - #[error("Serde json error: {0}")] - Serialization(#[from] serde_json::error::Error), - #[error("No signer seed set for authority, please check your config.toml")] NoAuthoritySignerSeed, @@ -79,11 +73,25 @@ impl From for ClientError { } } -impl From for ClientError { - fn from(error: RpcError) -> Self { - if let RpcError::RestartNeeded(_) = &error { - return Self::ClientRestartNeed; +impl From for ClientError { + fn from(error: subxt::rpc::RpcError) -> Self { + Self::SubxtBasicError(subxt::BasicError::Rpc(error)) + } +} + +impl From for ClientError { + fn from(error: array_bytes::Error) -> Self { + Self::Bytes(format!("{:?}", error)) + } +} + +#[cfg(feature = "bridge-s2s")] +impl From for bridge_s2s_traits::error::S2SClientError { + fn from(error: ClientError) -> Self { + match error { + ClientError::SubxtBasicError(e) => Self::RPC(format!("{:?}", e)), + ClientError::ClientRestartNeed => Self::RPC(format!("Client restart need")), + _ => Self::Custom(format!("{:?}", error)), } - Self::RpcBasicError(error) } } diff --git a/frame/assistants/client-crab/src/fastapi/bridge_s2s/bridge_crabparachain.rs b/frame/assistants/client-crab/src/fastapi/bridge_s2s/bridge_crabparachain.rs new file mode 100644 index 000000000..0b17964cc --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/bridge_s2s/bridge_crabparachain.rs @@ -0,0 +1,254 @@ +use std::ops::RangeInclusive; + +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay, S2SParaBridgeClientSolochain}; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::types::{ + bp_header_chain, bp_messages, bp_runtime::Chain, bridge_runtime_common, +}; +use sp_runtime::AccountId32; +use subxt::sp_core::storage::StorageKey; +use subxt::storage::StorageKeyPrefix; +use subxt::StorageEntry; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::CrabClient; +use crate::error::ClientError; +use crate::subxt_runtime::api::bridge_crab_parachain_messages::storage::{ + InboundLanes, OutboundLanes, OutboundMessages, +}; + +type BundleMessageKey = crate::types::runtime_types::bp_messages::MessageKey; + +/// Message payload for This -> Bridged chain messages. +type FromThisChainMessagePayload = crate::types::runtime_types::bp_message_dispatch::MessagePayload< + sp_core::crypto::AccountId32, + crate::types::runtime_types::sp_runtime::MultiSigner, + crate::types::runtime_types::sp_runtime::MultiSignature, + Vec, +>; + +#[async_trait::async_trait] +impl S2SClientRelay for CrabClient { + fn gen_outbound_messages_storage_key(&self, lane: [u8; 4], message_nonce: u64) -> StorageKey { + let prefix = StorageKeyPrefix::new::(); + OutboundMessages(BundleMessageKey { + lane_id: lane, + nonce: message_nonce, + }) + .key() + .final_key(prefix) + } + + fn gen_outbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + OutboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + fn gen_inbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + InboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + async fn calculate_dispatch_weight( + &self, + lane: [u8; 4], + nonces: RangeInclusive, + ) -> S2SClientResult { + let mut total_weight = 0u64; + for message_nonce in nonces { + let message_data = self + .outbound_messages( + bp_messages::MessageKey { + lane_id: lane, + nonce: message_nonce, + }, + None, + ) + .await? + .ok_or_else(|| { + ClientError::Custom(format!( + "Can not read message data by nonce {} in darwinia", + message_nonce + )) + })?; + let decoded_payload: FromThisChainMessagePayload = + codec::Decode::decode(&mut &message_data.payload[..])?; + total_weight += decoded_payload.weight; + } + Ok(total_weight) + } + + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { + Ok(self + .runtime() + .storage() + .bridge_kusama_grandpa() + .best_finalized(at_block) + .await?) + } + + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash> { + let hash = self + .runtime() + .tx() + .bridge_kusama_grandpa() + .initialize(initialization_data) + .sign_and_submit(self.account().signer()) + .await?; + Ok(hash) + } + + async fn submit_finality_proof( + &self, + finality_target: ::Header, + justification: bp_header_chain::justification::GrandpaJustification< + ::Header, + >, + ) -> S2SClientResult<::Hash> { + let expected_target = SmartCodecMapper::map_to(&finality_target)?; + let expected_justification = SmartCodecMapper::map_to(&justification)?; + Ok(self + .runtime() + .tx() + .bridge_kusama_grandpa() + .submit_finality_proof(expected_target, expected_justification) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn outbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult { + let outbound_lane_data = self + .runtime() + .storage() + .bridge_crab_parachain_messages() + .outbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&outbound_lane_data)?; + Ok(expected) + } + + async fn inbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult> { + let inbound_lane_data = self + .runtime() + .storage() + .bridge_crab_parachain_messages() + .inbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&inbound_lane_data)?; + Ok(expected) + } + + async fn outbound_messages( + &self, + message_key: bp_messages::MessageKey, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let expected_message_key = SmartCodecMapper::map_to(&message_key)?; + match self + .runtime() + .storage() + .bridge_crab_parachain_messages() + .outbound_messages(expected_message_key, hash) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn receive_messages_proof( + &self, + relayer_id_at_bridged_chain: AccountId32, + proof: bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< + ::Hash, + >, + messages_count: u32, + dispatch_weight: u64, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + Ok(self + .runtime() + .tx() + .bridge_crab_parachain_messages() + .receive_messages_proof( + relayer_id_at_bridged_chain, + expected_proof, + messages_count, + dispatch_weight, + ) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn receive_messages_delivery_proof( + &self, + proof: bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< + ::Hash, + >, + relayers_state: bp_messages::UnrewardedRelayersState, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + let expected_relayers_state = SmartCodecMapper::map_to(&relayers_state)?; + Ok(self + .runtime() + .tx() + .bridge_crab_parachain_messages() + .receive_messages_delivery_proof(expected_proof, expected_relayers_state) + .sign_and_submit(self.account().signer()) + .await?) + } +} + +#[async_trait::async_trait] +impl S2SParaBridgeClientSolochain for CrabClient { + async fn best_para_heads( + &self, + para_id: bridge_s2s_traits::types::ParaId, + hash: Option<::Hash>, + ) -> S2SClientResult> { + let expected_para_id = SmartCodecMapper::map_to(¶_id)?; + match self + .runtime() + .storage() + .bridge_kusama_parachain() + .best_para_heads(expected_para_id, hash) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn submit_parachain_heads( + &self, + relay_block_hash: ::Hash, + parachains: Vec, + parachain_heads_proof: Vec>, + ) -> S2SClientResult<::Hash> { + let expected_parachains = SmartCodecMapper::map_to(¶chains)?; + Ok(self + .runtime() + .tx() + .bridge_kusama_parachain() + .submit_parachain_heads(relay_block_hash, expected_parachains, parachain_heads_proof) + .sign_and_submit(self.account().signer()) + .await?) + } +} diff --git a/frame/assistants/client-crab/src/fastapi/bridge_s2s/bridge_darwinia.rs b/frame/assistants/client-crab/src/fastapi/bridge_s2s/bridge_darwinia.rs new file mode 100644 index 000000000..7c463692a --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/bridge_s2s/bridge_darwinia.rs @@ -0,0 +1,218 @@ +use std::ops::RangeInclusive; + +use bridge_s2s_traits::client::S2SClientGeneric; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::{ + client::S2SClientRelay, + types::{bp_header_chain, bp_messages, bp_runtime::Chain, bridge_runtime_common}, +}; +use sp_runtime::AccountId32; +use subxt::sp_core::storage::StorageKey; +use subxt::storage::StorageKeyPrefix; +use subxt::StorageEntry; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::CrabClient; +use crate::error::ClientError; +use crate::subxt_runtime::api::bridge_darwinia_messages::storage::{ + InboundLanes, OutboundLanes, OutboundMessages, +}; + +type BundleMessageKey = crate::types::runtime_types::bp_messages::MessageKey; + +/// Message payload for This -> Bridged chain messages. +type FromThisChainMessagePayload = crate::types::runtime_types::bp_message_dispatch::MessagePayload< + sp_core::crypto::AccountId32, + crate::types::runtime_types::sp_runtime::MultiSigner, + crate::types::runtime_types::sp_runtime::MultiSignature, + Vec, +>; + +#[async_trait::async_trait] +impl S2SClientRelay for CrabClient { + fn gen_outbound_messages_storage_key(&self, lane: [u8; 4], message_nonce: u64) -> StorageKey { + let prefix = StorageKeyPrefix::new::(); + OutboundMessages(BundleMessageKey { + lane_id: lane, + nonce: message_nonce, + }) + .key() + .final_key(prefix) + } + + fn gen_outbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + OutboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + fn gen_inbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + InboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + async fn calculate_dispatch_weight( + &self, + lane: [u8; 4], + nonces: RangeInclusive, + ) -> S2SClientResult { + let mut total_weight = 0u64; + for message_nonce in nonces { + let message_data = self + .outbound_messages( + bp_messages::MessageKey { + lane_id: lane, + nonce: message_nonce, + }, + None, + ) + .await? + .ok_or_else(|| { + ClientError::Custom(format!( + "Can not read message data by nonce {} in darwinia", + message_nonce + )) + })?; + let decoded_payload: FromThisChainMessagePayload = + codec::Decode::decode(&mut &message_data.payload[..])?; + total_weight += decoded_payload.weight; + } + Ok(total_weight) + } + + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { + Ok(self + .runtime() + .storage() + .bridge_darwinia_grandpa() + .best_finalized(at_block) + .await?) + } + + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash> { + let hash = self + .runtime() + .tx() + .bridge_darwinia_grandpa() + .initialize(initialization_data) + .sign_and_submit(self.account().signer()) + .await?; + Ok(hash) + } + + async fn submit_finality_proof( + &self, + finality_target: ::Header, + justification: bp_header_chain::justification::GrandpaJustification< + ::Header, + >, + ) -> S2SClientResult<::Hash> { + let expected_target = SmartCodecMapper::map_to(&finality_target)?; + let expected_justification = SmartCodecMapper::map_to(&justification)?; + Ok(self + .runtime() + .tx() + .bridge_darwinia_grandpa() + .submit_finality_proof(expected_target, expected_justification) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn outbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult { + let outbound_lane_data = self + .runtime() + .storage() + .bridge_darwinia_messages() + .outbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&outbound_lane_data)?; + Ok(expected) + } + + async fn inbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult> { + let inbound_lane_data = self + .runtime() + .storage() + .bridge_darwinia_messages() + .inbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&inbound_lane_data)?; + Ok(expected) + } + + async fn outbound_messages( + &self, + message_key: bp_messages::MessageKey, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let expected_message_key = SmartCodecMapper::map_to(&message_key)?; + match self + .runtime() + .storage() + .bridge_darwinia_messages() + .outbound_messages(expected_message_key, hash) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn receive_messages_proof( + &self, + relayer_id_at_bridged_chain: AccountId32, + proof: bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< + ::Hash, + >, + messages_count: u32, + dispatch_weight: u64, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + Ok(self + .runtime() + .tx() + .bridge_darwinia_messages() + .receive_messages_proof( + relayer_id_at_bridged_chain, + expected_proof, + messages_count, + dispatch_weight, + ) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn receive_messages_delivery_proof( + &self, + proof: bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< + ::Hash, + >, + relayers_state: bp_messages::UnrewardedRelayersState, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + let expected_relayers_state = SmartCodecMapper::map_to(&relayers_state)?; + Ok(self + .runtime() + .tx() + .bridge_darwinia_messages() + .receive_messages_delivery_proof(expected_proof, expected_relayers_state) + .sign_and_submit(self.account().signer()) + .await?) + } +} diff --git a/frame/assistants/client-crab/src/fastapi/bridge_s2s/generic.rs b/frame/assistants/client-crab/src/fastapi/bridge_s2s/generic.rs new file mode 100644 index 000000000..403861e90 --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/bridge_s2s/generic.rs @@ -0,0 +1,252 @@ +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::{ + client::{S2SClientBase, S2SClientGeneric}, + types::{bp_header_chain, bp_runtime::Chain}, +}; +use finality_grandpa::voter_set::VoterSet; +use sp_finality_grandpa::{AuthorityList, ConsensusLog, ScheduledChange}; +use sp_runtime::generic::{Block, SignedBlock}; +use sp_runtime::{ConsensusEngineId, DigestItem}; +use subxt::rpc::{ClientT, Subscription, SubscriptionClientT}; +use subxt::{sp_core, sp_runtime}; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::CrabClient; +use crate::error::{ClientError, ClientResult}; +use crate::types::runtime_types::bp_header_chain::InitializationData; + +const GRANDPA_ENGINE_ID: ConsensusEngineId = *b"FRNK"; + +pub(crate) type BundleHeader = crate::types::runtime_types::sp_runtime::generic::header::Header< + u32, + crate::types::runtime_types::sp_runtime::traits::BlakeTwo256, +>; +type SpHeader = sp_runtime::generic::Header; + +impl CrabClient { + async fn grandpa_authorities(&self, at: sp_core::H256) -> ClientResult { + let params = subxt::rpc::rpc_params![ + "GrandpaApi_grandpa_authorities", + sp_core::Bytes(Vec::new()), + at + ]; + let hex: String = self + .subxt() + .rpc() + .client + .request("state_call", params) + .await?; + let raw_authorities_set = array_bytes::hex2bytes(hex.as_ref())?; + let authorities = codec::Decode::decode(&mut &raw_authorities_set[..]).map_err(|err| { + ClientError::Custom(format!( + "[DecodeAuthorities] Can not decode authorities: {:?}", + err + )) + })?; + Ok(authorities) + } + + /// Find header digest that schedules next GRANDPA authorities set. + fn find_grandpa_authorities_scheduled_change( + &self, + header: &SpHeader, + ) -> Option> { + let filter_log = |log: ConsensusLog| match log { + ConsensusLog::ScheduledChange(change) => Some(change), + _ => None, + }; + + // find the first consensus digest with the right ID which converts to + // the right kind of consensus log. + header + .digest + .logs + .iter() + .filter_map(|item| match item { + DigestItem::Consensus(engine, logs) => { + if engine == &GRANDPA_ENGINE_ID { + Some(&logs[..]) + } else { + None + } + } + _ => None, + }) + .find_map(|mut l| { + let log = codec::Decode::decode(&mut l).ok(); + log.and_then(filter_log) + }) + } +} + +impl S2SClientBase for CrabClient { + const CHAIN: &'static str = "crab"; + + type Chain = bp_crab::Crab; + type Extrinsic = sp_runtime::OpaqueExtrinsic; +} + +#[async_trait::async_trait] +impl S2SClientGeneric for CrabClient { + type InitializationData = InitializationData; + + async fn subscribe_grandpa_justifications( + &self, + ) -> S2SClientResult> { + Ok(self + .subxt() + .rpc() + .client + .subscribe( + "grandpa_subscribeJustifications", + None, + "grandpa_unsubscribeJustifications", + ) + .await?) + } + + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>> { + match self.subxt().rpc().header(hash).await? { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn block( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>> + { + Ok(self.subxt().rpc().block(hash).await?) + } + + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; + let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); + Ok(proof) + } + + async fn prepare_initialization_data(&self) -> S2SClientResult { + let mut subscription = self.subscribe_grandpa_justifications().await?; + let justification = subscription + .next() + .await + .ok_or_else(|| S2SClientError::Custom("The subscribe is closed".to_string()))??; + let justification: bp_header_chain::justification::GrandpaJustification = + codec::Decode::decode(&mut &justification.0[..]) + .map_err(|err| S2SClientError::Custom(format!("Wrong justification: {:?}", err)))?; + + let (initial_header_hash, initial_header_number) = ( + justification.commit.target_hash, + justification.commit.target_number, + ); + let initial_header = self + .subxt() + .rpc() + .header(Some(initial_header_hash)) + .await? + .ok_or_else(|| { + S2SClientError::Custom(format!( + "Can not get initial header by hash: {:?}", + initial_header_hash + )) + })?; + tracing::trace!(target: "client-crab", "Selected initial header [{}]: {}", + initial_header_number, + initial_header_hash, + ); + let initial_authorities_set = self.grandpa_authorities(initial_header_hash).await?; + tracing::trace!(target: "client-crab", "Selected initial authorities set: {:?}", + initial_authorities_set, + ); + + // If initial header changes the GRANDPA authorities set, then we need previous authorities + // to verify justification. + let mut authorities_for_verification = initial_authorities_set.clone(); + let scheduled_change = self.find_grandpa_authorities_scheduled_change(&initial_header); + if scheduled_change + .as_ref() + .map(|c| c.delay == 0) + .unwrap_or(false) + { + return Err(S2SClientError::Custom(format!( + "GRANDPA authorities change at {} scheduled to happen in {:?} blocks. \ + We expect regular hange to have zero delay", + initial_header_hash, + scheduled_change.as_ref().map(|c| c.delay), + ))); + } + let schedules_change = scheduled_change.is_some(); + if schedules_change { + authorities_for_verification = + self.grandpa_authorities(initial_header.parent_hash).await?; + tracing::trace!( + target: "client-crab", + "Selected header is scheduling GRANDPA authorities set changes. Using previous set: {:?}", + authorities_for_verification, + ); + } + + // Now let's try to guess authorities set id by verifying justification. + let mut initial_authorities_set_id = 0; + let mut min_possible_block_number = 0; + let authorities_for_verification = VoterSet::new(authorities_for_verification.clone()) + .ok_or(S2SClientError::Custom(format!( + "[ReadInvalidAuthorities]: {:?}", + authorities_for_verification, + )))?; + loop { + tracing::trace!( + target: "client-crab", + "Trying GRANDPA authorities set id: {}", + initial_authorities_set_id, + ); + + let is_valid_set_id = bp_header_chain::justification::verify_justification::( + (initial_header_hash, initial_header_number), + initial_authorities_set_id, + &authorities_for_verification, + &justification, + ) + .is_ok(); + + if is_valid_set_id { + break; + } + + initial_authorities_set_id += 1; + min_possible_block_number += 1; + if min_possible_block_number > initial_header_number { + // there can't be more authorities set changes than headers => if we have reached + // `initial_block_number` and still have not found correct value of + // `initial_authorities_set_id`, then something else is broken => fail + return Err(S2SClientError::Custom(format!( + "[GuessInitialAuthorities]: {}", + initial_header_number + ))); + } + } + + let initialization_data = bp_header_chain::InitializationData { + header: Box::new(initial_header), + authority_list: initial_authorities_set, + set_id: if schedules_change { + initial_authorities_set_id + 1 + } else { + initial_authorities_set_id + }, + is_halted: false, + }; + let bytes = codec::Encode::encode(&initialization_data); + Ok(codec::Decode::decode(&mut &bytes[..]).map_err(|e| { + S2SClientError::Custom(format!("Failed to decode initialization data: {:?}", e)) + })?) + } +} diff --git a/frame/assistants/client-crab/src/fastapi/bridge_s2s/mod.rs b/frame/assistants/client-crab/src/fastapi/bridge_s2s/mod.rs new file mode 100644 index 000000000..d0922e747 --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/bridge_s2s/mod.rs @@ -0,0 +1,5 @@ +#[cfg(feature = "bridge-s2s-crab-parachain")] +pub mod bridge_crabparachain; +#[cfg(feature = "bridge-s2s-darwinia")] +pub mod bridge_darwinia; +pub mod generic; diff --git a/frame/assistants/client-crab/src/fastapi/feemarket_s2s/feemarket_crabparachain.rs b/frame/assistants/client-crab/src/fastapi/feemarket_s2s/feemarket_crabparachain.rs new file mode 100644 index 000000000..f65c4752d --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/feemarket_s2s/feemarket_crabparachain.rs @@ -0,0 +1,34 @@ +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::error::AbstractFeemarketResult; +use feemarket_s2s_traits::types::{Chain, Order}; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::CrabClient; + +#[async_trait::async_trait] +impl FeemarketApiRelay for CrabClient { + async fn order( + &self, + laned_id: feemarket_s2s_traits::types::LaneId, + message_nonce: feemarket_s2s_traits::types::MessageNonce, + ) -> AbstractFeemarketResult< + Option< + Order< + ::AccountId, + ::BlockNumber, + ::Balance, + >, + >, + > { + match self + .runtime() + .storage() + .crab_parachain_fee_market() + .orders(laned_id, message_nonce, None) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } +} diff --git a/frame/assistants/client-crab/src/fastapi/feemarket_s2s/feemarket_darwinia.rs b/frame/assistants/client-crab/src/fastapi/feemarket_s2s/feemarket_darwinia.rs new file mode 100644 index 000000000..c5d0b53e8 --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/feemarket_s2s/feemarket_darwinia.rs @@ -0,0 +1,34 @@ +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::error::AbstractFeemarketResult; +use feemarket_s2s_traits::types::{Chain, Order}; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::CrabClient; + +#[async_trait::async_trait] +impl FeemarketApiRelay for CrabClient { + async fn order( + &self, + laned_id: feemarket_s2s_traits::types::LaneId, + message_nonce: feemarket_s2s_traits::types::MessageNonce, + ) -> AbstractFeemarketResult< + Option< + Order< + ::AccountId, + ::BlockNumber, + ::Balance, + >, + >, + > { + match self + .runtime() + .storage() + .darwinia_fee_market() + .orders(laned_id, message_nonce, None) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } +} diff --git a/frame/assistants/client-crab/src/fastapi/feemarket_s2s/generic.rs b/frame/assistants/client-crab/src/fastapi/feemarket_s2s/generic.rs new file mode 100644 index 000000000..eafc1d055 --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/feemarket_s2s/generic.rs @@ -0,0 +1,27 @@ +use feemarket_s2s_traits::api::FeemarketApiBase; +use feemarket_s2s_traits::error::{AbstractFeemarketError, AbstractFeemarketResult}; +use feemarket_s2s_traits::types::Chain; + +use crate::client::CrabClient; + +#[async_trait::async_trait] +impl FeemarketApiBase for CrabClient { + const CHAIN: &'static str = "crab"; + + type Chain = bp_crab::Crab; + + async fn best_finalized_header_number( + &self, + ) -> AbstractFeemarketResult<::BlockNumber> { + let head_hash = self.subxt().rpc().finalized_head().await?; + let header = self + .subxt() + .rpc() + .header(Some(head_hash)) + .await? + .ok_or_else(|| { + AbstractFeemarketError::Custom("Can not query best finalized header".to_string()) + })?; + Ok(header.number) + } +} diff --git a/frame/assistants/client-crab/src/fastapi/feemarket_s2s/mod.rs b/frame/assistants/client-crab/src/fastapi/feemarket_s2s/mod.rs new file mode 100644 index 000000000..12d5c63f9 --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/feemarket_s2s/mod.rs @@ -0,0 +1,5 @@ +#[cfg(feature = "feemarket-s2s-crab-parachain")] +pub mod feemarket_crabparachain; +#[cfg(feature = "feemarket-s2s-darwinia")] +pub mod feemarket_darwinia; +pub mod generic; diff --git a/frame/assistants/client-crab/src/fastapi/mod.rs b/frame/assistants/client-crab/src/fastapi/mod.rs new file mode 100644 index 000000000..46c5af13c --- /dev/null +++ b/frame/assistants/client-crab/src/fastapi/mod.rs @@ -0,0 +1,4 @@ +#[cfg(feature = "bridge-s2s")] +pub mod bridge_s2s; +#[cfg(feature = "feemarket-s2s")] +pub mod feemarket_s2s; diff --git a/frame/assistants/client-crab/src/lib.rs b/frame/assistants/client-crab/src/lib.rs index 439ba854b..487233c37 100644 --- a/frame/assistants/client-crab/src/lib.rs +++ b/frame/assistants/client-crab/src/lib.rs @@ -2,5 +2,7 @@ pub mod client; pub mod component; pub mod config; pub mod error; -pub mod subxt_runtime; pub mod types; + +mod fastapi; +mod subxt_runtime; diff --git a/frame/assistants/client-crab/src/subxt_runtime/error.rs b/frame/assistants/client-crab/src/subxt_runtime/error.rs index 3e1a05878..1b67e892b 100644 --- a/frame/assistants/client-crab/src/subxt_runtime/error.rs +++ b/frame/assistants/client-crab/src/subxt_runtime/error.rs @@ -3,9 +3,6 @@ use thiserror::Error as ThisError; /// Bridge ethereum error #[derive(ThisError, Debug)] pub enum ConvertTypeError { - #[error("Other error: {0}")] - Other(String), - #[error("Array bytes error: {0}")] ArrayBytes(String), } diff --git a/frame/assistants/client-crab/src/subxt_runtime/runtime.rs b/frame/assistants/client-crab/src/subxt_runtime/runtime.rs index 685daaf7b..c5dc9894e 100644 --- a/frame/assistants/client-crab/src/subxt_runtime/runtime.rs +++ b/frame/assistants/client-crab/src/subxt_runtime/runtime.rs @@ -16512,7 +16512,7 @@ pub mod api { >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, + &(&self.0, &self.1), ::subxt::StorageHasher::Blake2_128Concat, )]) } @@ -17011,7 +17011,7 @@ pub mod api { >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, + &(&self.0, &self.1), ::subxt::StorageHasher::Blake2_128Concat, )]) } @@ -19240,7 +19240,7 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - pub + pub runtime_types::sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic< _0, _1, diff --git a/frame/assistants/client-crab/src/types/account.rs b/frame/assistants/client-crab/src/types/account.rs index 84501bfc5..7540fc6ad 100644 --- a/frame/assistants/client-crab/src/types/account.rs +++ b/frame/assistants/client-crab/src/types/account.rs @@ -54,7 +54,8 @@ mod darwinia { let account_id = AccountId::from(public); // real account, convert to account id - let real = real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real))); + let real = + real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real.as_ref()))); Ok(Self { account_id, diff --git a/frame/assistants/client-darwinia/Cargo.toml b/frame/assistants/client-darwinia/Cargo.toml index 69a267ea1..62a06dea1 100644 --- a/frame/assistants/client-darwinia/Cargo.toml +++ b/frame/assistants/client-darwinia/Cargo.toml @@ -24,19 +24,54 @@ thiserror = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" -array-bytes = "1.4" -codec = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] } -subxt = "0.18.1" +array-bytes = "2" +codec = { package = "parity-scale-codec", version = "2" } +subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } +bp-darwinia = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } -web3 = { git = "https://github.com/wuminzhe/rust-web3.git", branch = "master", features = ["signing"], optional = true } -secp256k1 = { version = "0.20", features = ["recovery"], optional = true } -shadow-liketh = { path = "../shadow-liketh", optional = true } +## maybe common +async-trait = { optional = true, version = "0.1" } -support-toolkit = { path = "../../../frame/supports/support-toolkit" } +## substrate +sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } -[dev-dependencies] -tokio = { version = "1", features = ["full"] } +## ethv1 +web3 = { optional = true, git = "https://github.com/wuminzhe/rust-web3.git", branch = "master", features = ["signing"] } +secp256k1 = { optional = true, version = "0.20", features = ["recovery"] } +shadow-liketh = { optional = true, path = "../shadow-liketh" } + +## s2s client +finality-grandpa = { optional = true, version = "0.14" } +bridge-s2s-traits = { optional = true, path = "../../../frame/traits/bridge-s2s", features = ["advanced-types"] } + +## feemarket s2s +feemarket-s2s-traits = { optional = true, path = "../../../frame/traits/feemarket-s2s", features = ["advanced-types"] } + +support-toolkit = { path = "../../../frame/supports/support-toolkit", features = ["convert"] } [features] -default = [] +default = [] ethlike-v1 = ["web3", "secp256k1", "shadow-liketh"] +substrate = [ + "sp-finality-grandpa", + "sp-runtime", + "sp-core", +] +bridge-s2s = [ + "substrate", + "async-trait", + "finality-grandpa", + "bridge-s2s-traits", +] +bridge-s2s-crab = ["bridge-s2s"] +feemarket-s2s = [ + "async-trait", + "feemarket-s2s-traits", +] +feemarket-s2s-crab = ["feemarket-s2s"] + +[dev-dependencies] +tokio = { version = "1", features = ["full"] } + diff --git a/frame/assistants/client-darwinia/src/config.rs b/frame/assistants/client-darwinia/src/config.rs index 0ac7917ba..b31cc5df5 100644 --- a/frame/assistants/client-darwinia/src/config.rs +++ b/frame/assistants/client-darwinia/src/config.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use subxt::{sp_core, sp_runtime}; +use subxt::sp_runtime; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ClientConfig { @@ -11,6 +11,7 @@ pub struct ClientConfig { pub relayer_real_account: Option, /// private key to sign ecdsa messages, the signature will be submitted to Darwinia by relayer + #[cfg(feature = "ethlike-v1")] pub ecdsa_authority_private_key: Option, } @@ -19,13 +20,13 @@ pub struct ClientConfig { pub enum DarwiniaSubxtConfig {} impl subxt::Config for DarwiniaSubxtConfig { - type Index = u32; - type BlockNumber = u32; - type Hash = sp_core::H256; - type Hashing = sp_runtime::traits::BlakeTwo256; - type AccountId = sp_runtime::AccountId32; - type Address = sp_runtime::MultiAddress; - type Header = sp_runtime::generic::Header; - type Signature = sp_runtime::MultiSignature; + type Index = bp_darwinia::Nonce; + type BlockNumber = bp_darwinia::BlockNumber; + type Hash = bp_darwinia::Hash; + type Hashing = bp_darwinia::Hashing; + type AccountId = bp_darwinia::AccountId; + type Address = bp_darwinia::Address; + type Header = bp_darwinia::Header; + type Signature = bp_darwinia::Signature; type Extrinsic = sp_runtime::OpaqueExtrinsic; } diff --git a/frame/assistants/client-darwinia/src/error.rs b/frame/assistants/client-darwinia/src/error.rs index a6c540be2..7c66da238 100644 --- a/frame/assistants/client-darwinia/src/error.rs +++ b/frame/assistants/client-darwinia/src/error.rs @@ -20,17 +20,15 @@ pub enum ClientError { #[error("Wrong seed: {0}")] Seed(String), + #[error("Bytes error: {0}")] + Bytes(String), + #[error("Other error: {0}")] - Other(String), + Custom(String), #[error("Io error: {0}")] Io(#[from] std::io::Error), - // #[error("Rpc error: {0}")] - // Rpc(#[from] jsonrpsee_types::error::Error), - #[error("Serde json error: {0}")] - Serialization(#[from] serde_json::error::Error), - #[cfg(feature = "ethlike-v1")] #[error("Failed to build SecretKey from authority's private key")] FailedToBuildSecretKey(#[from] secp256k1::Error), @@ -82,3 +80,26 @@ impl From for ClientError { Self::SubxtBasicError(error) } } + +impl From for ClientError { + fn from(error: subxt::rpc::RpcError) -> Self { + Self::SubxtBasicError(subxt::BasicError::Rpc(error)) + } +} + +impl From for ClientError { + fn from(error: array_bytes::Error) -> Self { + Self::Bytes(format!("{:?}", error)) + } +} + +#[cfg(feature = "bridge-s2s")] +impl From for bridge_s2s_traits::error::S2SClientError { + fn from(error: ClientError) -> Self { + match error { + ClientError::SubxtBasicError(e) => Self::RPC(format!("{:?}", e)), + ClientError::ClientRestartNeed => Self::RPC(format!("Client restart need")), + _ => Self::Custom(format!("{:?}", error)), + } + } +} diff --git a/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/bridge_crab.rs b/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/bridge_crab.rs new file mode 100644 index 000000000..1d09efe74 --- /dev/null +++ b/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/bridge_crab.rs @@ -0,0 +1,217 @@ +use std::ops::RangeInclusive; + +use subxt::sp_core::storage::StorageKey; +use subxt::storage::StorageKeyPrefix; +use subxt::StorageEntry; + +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::{ + client::{S2SClientGeneric, S2SClientRelay}, + types::{bp_header_chain, bp_messages, bp_runtime::Chain, bridge_runtime_common}, +}; +use sp_runtime::AccountId32; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::DarwiniaClient; +use crate::error::ClientError; +use crate::subxt_runtime::api::bridge_crab_messages::storage::{ + InboundLanes, OutboundLanes, OutboundMessages, +}; + +type BundleMessageKey = crate::types::runtime_types::bp_messages::MessageKey; + +/// Message payload for This -> Bridged chain messages. +type FromThisChainMessagePayload = crate::types::runtime_types::bp_message_dispatch::MessagePayload< + sp_core::crypto::AccountId32, + crate::types::runtime_types::sp_runtime::MultiSigner, + crate::types::runtime_types::sp_runtime::MultiSignature, + Vec, +>; + +#[async_trait::async_trait] +impl S2SClientRelay for DarwiniaClient { + fn gen_outbound_messages_storage_key(&self, lane: [u8; 4], message_nonce: u64) -> StorageKey { + let prefix = StorageKeyPrefix::new::(); + OutboundMessages(BundleMessageKey { + lane_id: lane, + nonce: message_nonce, + }) + .key() + .final_key(prefix) + } + + fn gen_outbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + OutboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + fn gen_inbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + InboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + async fn calculate_dispatch_weight( + &self, + lane: [u8; 4], + nonces: RangeInclusive, + ) -> S2SClientResult { + let mut total_weight = 0u64; + for message_nonce in nonces { + let message_data = self + .outbound_messages( + bp_messages::MessageKey { + lane_id: lane, + nonce: message_nonce, + }, + None, + ) + .await? + .ok_or_else(|| { + ClientError::Custom(format!( + "Can not read message data by nonce {} in crab", + message_nonce + )) + })?; + let decoded_payload: FromThisChainMessagePayload = + codec::Decode::decode(&mut &message_data.payload[..])?; + total_weight += decoded_payload.weight; + } + Ok(total_weight) + } + + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { + Ok(self + .runtime() + .storage() + .bridge_crab_grandpa() + .best_finalized(at_block) + .await?) + } + + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash> { + let hash = self + .runtime() + .tx() + .bridge_crab_grandpa() + .initialize(initialization_data) + .sign_and_submit(self.account().signer()) + .await?; + Ok(hash) + } + + async fn submit_finality_proof( + &self, + finality_target: ::Header, + justification: bp_header_chain::justification::GrandpaJustification< + ::Header, + >, + ) -> S2SClientResult<::Hash> { + let expected_target = SmartCodecMapper::map_to(&finality_target)?; + let expected_justification = SmartCodecMapper::map_to(&justification)?; + Ok(self + .runtime() + .tx() + .bridge_crab_grandpa() + .submit_finality_proof(expected_target, expected_justification) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn outbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult { + let outbound_lane_data = self + .runtime() + .storage() + .bridge_crab_messages() + .outbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&outbound_lane_data)?; + Ok(expected) + } + + async fn inbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult> { + let inbound_lane_data = self + .runtime() + .storage() + .bridge_crab_messages() + .inbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&inbound_lane_data)?; + Ok(expected) + } + + async fn outbound_messages( + &self, + message_key: bp_messages::MessageKey, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let expected_message_key = SmartCodecMapper::map_to(&message_key)?; + match self + .runtime() + .storage() + .bridge_crab_messages() + .outbound_messages(expected_message_key, hash) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn receive_messages_proof( + &self, + relayer_id_at_bridged_chain: AccountId32, + proof: bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< + ::Hash, + >, + messages_count: u32, + dispatch_weight: u64, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + Ok(self + .runtime() + .tx() + .bridge_crab_messages() + .receive_messages_proof( + relayer_id_at_bridged_chain, + expected_proof, + messages_count, + dispatch_weight, + ) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn receive_messages_delivery_proof( + &self, + proof: bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< + ::Hash, + >, + relayers_state: bp_messages::UnrewardedRelayersState, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + let expected_relayers_state = SmartCodecMapper::map_to(&relayers_state)?; + Ok(self + .runtime() + .tx() + .bridge_crab_messages() + .receive_messages_delivery_proof(expected_proof, expected_relayers_state) + .sign_and_submit(self.account().signer()) + .await?) + } +} diff --git a/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/generic.rs b/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/generic.rs new file mode 100644 index 000000000..73b84b461 --- /dev/null +++ b/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/generic.rs @@ -0,0 +1,253 @@ +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::{ + client::{S2SClientBase, S2SClientGeneric}, + types::bp_header_chain, + types::bp_runtime::Chain, +}; +use finality_grandpa::voter_set::VoterSet; +use sp_finality_grandpa::{AuthorityList, ConsensusLog, ScheduledChange}; +use sp_runtime::generic::{Block, SignedBlock}; +use sp_runtime::{ConsensusEngineId, DigestItem}; +use subxt::rpc::{ClientT, Subscription, SubscriptionClientT}; +use subxt::{sp_core, sp_runtime}; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::DarwiniaClient; +use crate::error::{ClientError, ClientResult}; +use crate::types::runtime_types::bp_header_chain::InitializationData; + +const GRANDPA_ENGINE_ID: ConsensusEngineId = *b"FRNK"; + +pub(crate) type BundleHeader = crate::types::runtime_types::sp_runtime::generic::header::Header< + u32, + crate::types::runtime_types::sp_runtime::traits::BlakeTwo256, +>; +type SpHeader = sp_runtime::generic::Header; + +impl DarwiniaClient { + async fn grandpa_authorities(&self, at: sp_core::H256) -> ClientResult { + let params = subxt::rpc::rpc_params![ + "GrandpaApi_grandpa_authorities", + sp_core::Bytes(Vec::new()), + at + ]; + let hex: String = self + .subxt() + .rpc() + .client + .request("state_call", params) + .await?; + let raw_authorities_set = array_bytes::hex2bytes(hex.as_ref())?; + let authorities = codec::Decode::decode(&mut &raw_authorities_set[..]).map_err(|err| { + ClientError::Custom(format!( + "[DecodeAuthorities] Can not decode authorities: {:?}", + err + )) + })?; + Ok(authorities) + } + + /// Find header digest that schedules next GRANDPA authorities set. + fn find_grandpa_authorities_scheduled_change( + &self, + header: &SpHeader, + ) -> Option> { + let filter_log = |log: ConsensusLog| match log { + ConsensusLog::ScheduledChange(change) => Some(change), + _ => None, + }; + + // find the first consensus digest with the right ID which converts to + // the right kind of consensus log. + header + .digest + .logs + .iter() + .filter_map(|item| match item { + DigestItem::Consensus(engine, logs) => { + if engine == &GRANDPA_ENGINE_ID { + Some(&logs[..]) + } else { + None + } + } + _ => None, + }) + .find_map(|mut l| { + let log = codec::Decode::decode(&mut l).ok(); + log.and_then(filter_log) + }) + } +} + +impl S2SClientBase for DarwiniaClient { + const CHAIN: &'static str = "darwinia"; + + type Chain = bp_darwinia::Darwinia; + type Extrinsic = sp_runtime::OpaqueExtrinsic; +} + +#[async_trait::async_trait] +impl S2SClientGeneric for DarwiniaClient { + type InitializationData = InitializationData; + + async fn subscribe_grandpa_justifications( + &self, + ) -> S2SClientResult> { + Ok(self + .subxt() + .rpc() + .client + .subscribe( + "grandpa_subscribeJustifications", + None, + "grandpa_unsubscribeJustifications", + ) + .await?) + } + + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>> { + match self.subxt().rpc().header(hash).await? { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn block( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>> + { + Ok(self.subxt().rpc().block(hash).await?) + } + + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; + let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); + Ok(proof) + } + + async fn prepare_initialization_data(&self) -> S2SClientResult { + let mut subscription = self.subscribe_grandpa_justifications().await?; + let justification = subscription + .next() + .await + .ok_or_else(|| S2SClientError::Custom("The subscribe is closed".to_string()))??; + let justification: bp_header_chain::justification::GrandpaJustification = + codec::Decode::decode(&mut &justification.0[..]) + .map_err(|err| S2SClientError::Custom(format!("Wrong justification: {:?}", err)))?; + + let (initial_header_hash, initial_header_number) = ( + justification.commit.target_hash, + justification.commit.target_number, + ); + let initial_header = self + .subxt() + .rpc() + .header(Some(initial_header_hash)) + .await? + .ok_or_else(|| { + S2SClientError::Custom(format!( + "Can not get initial header by hash: {:?}", + initial_header_hash + )) + })?; + tracing::trace!(target: "client-darwinia", "Selected initial header [{}]: {}", + initial_header_number, + initial_header_hash, + ); + let initial_authorities_set = self.grandpa_authorities(initial_header_hash).await?; + tracing::trace!(target: "client-darwinia", "Selected initial authorities set: {:?}", + initial_authorities_set, + ); + + // If initial header changes the GRANDPA authorities set, then we need previous authorities + // to verify justification. + let mut authorities_for_verification = initial_authorities_set.clone(); + let scheduled_change = self.find_grandpa_authorities_scheduled_change(&initial_header); + if scheduled_change + .as_ref() + .map(|c| c.delay == 0) + .unwrap_or(false) + { + return Err(S2SClientError::Custom(format!( + "GRANDPA authorities change at {} scheduled to happen in {:?} blocks. \ + We expect regular hange to have zero delay", + initial_header_hash, + scheduled_change.as_ref().map(|c| c.delay), + ))); + } + let schedules_change = scheduled_change.is_some(); + if schedules_change { + authorities_for_verification = + self.grandpa_authorities(initial_header.parent_hash).await?; + tracing::trace!( + target: "client-darwinia", + "Selected header is scheduling GRANDPA authorities set changes. Using previous set: {:?}", + authorities_for_verification, + ); + } + + // Now let's try to guess authorities set id by verifying justification. + let mut initial_authorities_set_id = 0; + let mut min_possible_block_number = 0; + let authorities_for_verification = VoterSet::new(authorities_for_verification.clone()) + .ok_or(S2SClientError::Custom(format!( + "[ReadInvalidAuthorities]: {:?}", + authorities_for_verification, + )))?; + loop { + tracing::trace!( + target: "client-darwinia", + "Trying GRANDPA authorities set id: {}", + initial_authorities_set_id, + ); + + let is_valid_set_id = bp_header_chain::justification::verify_justification::( + (initial_header_hash, initial_header_number), + initial_authorities_set_id, + &authorities_for_verification, + &justification, + ) + .is_ok(); + + if is_valid_set_id { + break; + } + + initial_authorities_set_id += 1; + min_possible_block_number += 1; + if min_possible_block_number > initial_header_number { + // there can't be more authorities set changes than headers => if we have reached + // `initial_block_number` and still have not found correct value of + // `initial_authorities_set_id`, then something else is broken => fail + return Err(S2SClientError::Custom(format!( + "[GuessInitialAuthorities]: {}", + initial_header_number + ))); + } + } + + let initialization_data = bp_header_chain::InitializationData { + header: Box::new(initial_header), + authority_list: initial_authorities_set, + set_id: if schedules_change { + initial_authorities_set_id + 1 + } else { + initial_authorities_set_id + }, + is_halted: false, + }; + let bytes = codec::Encode::encode(&initialization_data); + Ok(codec::Decode::decode(&mut &bytes[..]).map_err(|e| { + S2SClientError::Custom(format!("Failed to decode initialization data: {:?}", e)) + })?) + } +} diff --git a/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/mod.rs b/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/mod.rs new file mode 100644 index 000000000..edaa18d89 --- /dev/null +++ b/frame/assistants/client-darwinia/src/fastapi/bridge_s2s/mod.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "bridge-s2s-crab")] +pub mod bridge_crab; +pub mod generic; diff --git a/frame/assistants/client-darwinia/src/fastapi/ethereum.rs b/frame/assistants/client-darwinia/src/fastapi/ethereum.rs index e622e2a52..6eac92adb 100644 --- a/frame/assistants/client-darwinia/src/fastapi/ethereum.rs +++ b/frame/assistants/client-darwinia/src/fastapi/ethereum.rs @@ -116,7 +116,7 @@ impl<'a> EthereumApi<'a> { let ethereum_tx_hash = proof .header .hash - .map(|hash| array_bytes::bytes2hex("", &hash)) + .map(|hash| array_bytes::bytes2hex("", hash.as_ref())) .ok_or(ClientError::NoHeaderHashInEthereumReceiptProofOfThing)?; let account = self.client.account(); let v = match account.real() { @@ -335,7 +335,7 @@ impl<'a> EthereumApi<'a> { .runtime() .storage() .ethereum_backing() - .verified_proof(&hash, &tx_index, None) + .verified_proof(hash, tx_index, None) .await?; Ok(v0) } @@ -413,7 +413,7 @@ impl<'a> EthereumApi<'a> { .runtime() .storage() .ethereum_relay_authorities() - .mmr_roots_to_sign(&block_number, exec_block_hash) + .mmr_roots_to_sign(block_number, exec_block_hash) .await?; match mmr_roots_to_sign { None => { diff --git a/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/feemarket_crab.rs b/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/feemarket_crab.rs new file mode 100644 index 000000000..3950b52b3 --- /dev/null +++ b/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/feemarket_crab.rs @@ -0,0 +1,34 @@ +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::error::AbstractFeemarketResult; +use feemarket_s2s_traits::types::{Chain, Order}; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::DarwiniaClient; + +#[async_trait::async_trait] +impl FeemarketApiRelay for DarwiniaClient { + async fn order( + &self, + laned_id: feemarket_s2s_traits::types::LaneId, + message_nonce: feemarket_s2s_traits::types::MessageNonce, + ) -> AbstractFeemarketResult< + Option< + Order< + ::AccountId, + ::BlockNumber, + ::Balance, + >, + >, + > { + match self + .runtime() + .storage() + .fee_market() + .orders(laned_id, message_nonce, None) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } +} diff --git a/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/generic.rs b/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/generic.rs new file mode 100644 index 000000000..f3f377782 --- /dev/null +++ b/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/generic.rs @@ -0,0 +1,27 @@ +use feemarket_s2s_traits::api::FeemarketApiBase; +use feemarket_s2s_traits::error::{AbstractFeemarketError, AbstractFeemarketResult}; +use feemarket_s2s_traits::types::Chain; + +use crate::client::DarwiniaClient; + +#[async_trait::async_trait] +impl FeemarketApiBase for DarwiniaClient { + const CHAIN: &'static str = "darwinia"; + + type Chain = bp_darwinia::Darwinia; + + async fn best_finalized_header_number( + &self, + ) -> AbstractFeemarketResult<::BlockNumber> { + let head_hash = self.subxt().rpc().finalized_head().await?; + let header = self + .subxt() + .rpc() + .header(Some(head_hash)) + .await? + .ok_or_else(|| { + AbstractFeemarketError::Custom("Can not query best finalized header".to_string()) + })?; + Ok(header.number) + } +} diff --git a/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/mod.rs b/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/mod.rs new file mode 100644 index 000000000..b51095222 --- /dev/null +++ b/frame/assistants/client-darwinia/src/fastapi/feemarket_s2s/mod.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "feemarket-s2s-crab")] +mod feemarket_crab; +mod generic; diff --git a/frame/assistants/client-darwinia/src/fastapi/generic.rs b/frame/assistants/client-darwinia/src/fastapi/generic.rs index af6a76efa..5a921336c 100644 --- a/frame/assistants/client-darwinia/src/fastapi/generic.rs +++ b/frame/assistants/client-darwinia/src/fastapi/generic.rs @@ -46,10 +46,10 @@ impl DarwiniaClient { let spec_name = runtime_version .other .get("specName") - .ok_or_else(|| ClientError::Other("Failed to query spec name".to_string()))? + .ok_or_else(|| ClientError::Custom("Failed to query spec name".to_string()))? .as_str() .ok_or_else(|| { - ClientError::Other("The spec name not found in runtime version".to_string()) + ClientError::Custom("The spec name not found in runtime version".to_string()) })?; Ok(spec_name.to_string()) } diff --git a/frame/assistants/client-darwinia/src/fastapi/mod.rs b/frame/assistants/client-darwinia/src/fastapi/mod.rs index d3078abbe..d70894f55 100644 --- a/frame/assistants/client-darwinia/src/fastapi/mod.rs +++ b/frame/assistants/client-darwinia/src/fastapi/mod.rs @@ -1,3 +1,7 @@ +#[cfg(feature = "bridge-s2s")] +mod bridge_s2s; #[cfg(feature = "ethlike-v1")] pub mod ethereum; +#[cfg(feature = "feemarket-s2s")] +mod feemarket_s2s; pub mod generic; diff --git a/frame/assistants/client-darwinia/src/helpers.rs b/frame/assistants/client-darwinia/src/helpers.rs index 35bf08b1f..1009d5946 100644 --- a/frame/assistants/client-darwinia/src/helpers.rs +++ b/frame/assistants/client-darwinia/src/helpers.rs @@ -1,81 +1,90 @@ -use codec::Encode; +#[cfg(feature = "ethlike-v1")] +pub use self::ethlike_v1::*; -use crate::types::{BetterRelayAffirmation, EcdsaAddress, _S}; +#[cfg(feature = "ethlike-v1")] +mod ethlike_v1 { + use codec::Encode; -/// affirmations contains block? -pub fn affirmations_contains_block(affirmations: &[BetterRelayAffirmation], block: u64) -> bool { - for affirmation in affirmations { - let blocks: &Vec = &affirmation - .relay_header_parcels - .iter() - .map(|bp| bp.header.number) - .collect(); - if blocks.contains(&block) { - return true; + use crate::types::{BetterRelayAffirmation, EcdsaAddress, _S}; + + /// affirmations contains block? + pub fn affirmations_contains_block( + affirmations: &[BetterRelayAffirmation], + block: u64, + ) -> bool { + for affirmation in affirmations { + let blocks: &Vec = &affirmation + .relay_header_parcels + .iter() + .map(|bp| bp.header.number) + .collect(); + if blocks.contains(&block) { + return true; + } } - } - // TODO: Checking the equality of the affirmations + // TODO: Checking the equality of the affirmations - // TODO: If there is an affirmation with larger block number, then agree and join in the game. + // TODO: If there is an affirmation with larger block number, then agree and join in the game. - // TODO: How to play and join the game - false -} + // TODO: How to play and join the game + false + } -/// encode mmr root message -pub fn encode_mmr_root_message( - spec_name: impl AsRef, - block_number: u32, - mmr_root: subxt::sp_core::H256, -) -> Vec { - let spec_name = spec_name.as_ref(); - let op_code: [u8; 4] = [71, 159, 189, 249]; - tracing::debug!( - target: "client-darwinia", - "Infos to construct mmr_root message: {}, {}, {}, {:?}", - spec_name, - array_bytes::bytes2hex("", &op_code), - block_number, - mmr_root - ); - // scale encode & sign - let message = _S { - _1: spec_name, - _2: op_code, - _3: block_number, - _4: mmr_root, - }; - let encoded: &[u8] = &message.encode(); - encoded.to_vec() -} + /// encode mmr root message + pub fn encode_mmr_root_message( + spec_name: impl AsRef, + block_number: u32, + mmr_root: subxt::sp_core::H256, + ) -> Vec { + let spec_name = spec_name.as_ref(); + let op_code: [u8; 4] = [71, 159, 189, 249]; + tracing::debug!( + target: "client-darwinia", + "Infos to construct mmr_root message: {}, {}, {}, {:?}", + spec_name, + array_bytes::bytes2hex("", &op_code), + block_number, + mmr_root + ); + // scale encode & sign + let message = _S { + _1: spec_name, + _2: op_code, + _3: block_number, + _4: mmr_root, + }; + let encoded: &[u8] = &message.encode(); + encoded.to_vec() + } -pub fn encode_authorities_message( - spec_name: impl AsRef, - term: u32, - next_authorities: Vec, -) -> Vec { - let spec_name = spec_name.as_ref(); - let op_code: [u8; 4] = [180, 188, 244, 151]; - tracing::debug!( - target: "client-darwinia", - "Infos to construct eth authorities message: {}, {}, {}, {:?}", - spec_name, - array_bytes::bytes2hex("", &op_code), - term, - next_authorities - .iter() - .map(|a| array_bytes::bytes2hex("", &a)) - .collect::>() - .join(", ") - ); - // scale encode & sign - let message = _S { - _1: spec_name, - _2: op_code, - _3: term, - _4: next_authorities, - }; - let encoded: &[u8] = &message.encode(); - encoded.to_vec() + pub fn encode_authorities_message( + spec_name: impl AsRef, + term: u32, + next_authorities: Vec, + ) -> Vec { + let spec_name = spec_name.as_ref(); + let op_code: [u8; 4] = [180, 188, 244, 151]; + tracing::debug!( + target: "client-darwinia", + "Infos to construct eth authorities message: {}, {}, {}, {:?}", + spec_name, + array_bytes::bytes2hex("", &op_code), + term, + next_authorities + .iter() + .map(|a| array_bytes::bytes2hex("", a.as_ref())) + .collect::>() + .join(", ") + ); + // scale encode & sign + let message = _S { + _1: spec_name, + _2: op_code, + _3: term, + _4: next_authorities, + }; + let encoded: &[u8] = &message.encode(); + encoded.to_vec() + } } diff --git a/frame/assistants/client-darwinia/src/subxt_runtime/error.rs b/frame/assistants/client-darwinia/src/subxt_runtime/error.rs index 3e1a05878..c120f7073 100644 --- a/frame/assistants/client-darwinia/src/subxt_runtime/error.rs +++ b/frame/assistants/client-darwinia/src/subxt_runtime/error.rs @@ -3,8 +3,8 @@ use thiserror::Error as ThisError; /// Bridge ethereum error #[derive(ThisError, Debug)] pub enum ConvertTypeError { - #[error("Other error: {0}")] - Other(String), + #[error("Custom: {0}")] + Custom(String), #[error("Array bytes error: {0}")] ArrayBytes(String), diff --git a/frame/assistants/client-darwinia/src/subxt_runtime/patch.rs b/frame/assistants/client-darwinia/src/subxt_runtime/patch.rs index cb6473315..505cab7c8 100644 --- a/frame/assistants/client-darwinia/src/subxt_runtime/patch.rs +++ b/frame/assistants/client-darwinia/src/subxt_runtime/patch.rs @@ -36,7 +36,7 @@ impl<'de> Deserialize<'de> for EthereumReceiptProofThing { D: Deserializer<'de>, { let hex = String::deserialize(deserializer)?; - let bytes = array_bytes::hex2bytes(hex) + let bytes = array_bytes::hex2bytes(hex.as_ref()) .map_err(|_e| D::Error::custom("Wrong serialize bytes, can't convert to bytes"))?; let ret = codec::Decode::decode(&mut bytes.as_slice()) .map_err(|_e| D::Error::custom("Wrong serialize bytes, can't decode to struct."))?; @@ -61,7 +61,7 @@ impl<'de> Deserialize<'de> for EthereumRelayHeaderParcel { D: Deserializer<'de>, { let hex = String::deserialize(deserializer)?; - let bytes = array_bytes::hex2bytes(hex) + let bytes = array_bytes::hex2bytes(hex.as_ref()) .map_err(|_e| D::Error::custom("Wrong serialize bytes, can't convert to bytes"))?; let ret = codec::Decode::decode(&mut bytes.as_slice()) .map_err(|_e| D::Error::custom("Wrong serialize bytes, can't decode to struct."))?; diff --git a/frame/assistants/client-darwinia/src/subxt_runtime/runtime.rs b/frame/assistants/client-darwinia/src/subxt_runtime/runtime.rs index da746f134..2f37a86f9 100644 --- a/frame/assistants/client-darwinia/src/subxt_runtime/runtime.rs +++ b/frame/assistants/client-darwinia/src/subxt_runtime/runtime.rs @@ -1,6 +1,5 @@ #[allow(dead_code, unused_imports, non_camel_case_types)] pub mod api { - use super::api as root_mod; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum Event { #[codec(index = 0)] @@ -73,25 +72,23 @@ pub mod api { ToCrabBacking(to_crab_backing::Event), } pub mod system { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct FillBlock { + pub struct fill_block { pub ratio: runtime_types::sp_arithmetic::per_things::Perbill, } - impl ::subxt::Call for FillBlock { + impl ::subxt::Call for fill_block { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "fill_block"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Remark { + pub struct remark { pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for Remark { + impl ::subxt::Call for remark { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "remark"; } @@ -102,72 +99,72 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct SetHeapPages { + pub struct set_heap_pages { pub pages: ::core::primitive::u64, } - impl ::subxt::Call for SetHeapPages { + impl ::subxt::Call for set_heap_pages { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_heap_pages"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetCode { + pub struct set_code { pub code: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetCode { + impl ::subxt::Call for set_code { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_code"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetCodeWithoutChecks { + pub struct set_code_without_checks { pub code: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetCodeWithoutChecks { + impl ::subxt::Call for set_code_without_checks { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_code_without_checks"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetChangesTrieConfig { + pub struct set_changes_trie_config { pub changes_trie_config: ::core::option::Option< runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, >, } - impl ::subxt::Call for SetChangesTrieConfig { + impl ::subxt::Call for set_changes_trie_config { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_changes_trie_config"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetStorage { + pub struct set_storage { pub items: ::std::vec::Vec<( ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, } - impl ::subxt::Call for SetStorage { + impl ::subxt::Call for set_storage { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "set_storage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct KillStorage { + pub struct kill_storage { pub keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, } - impl ::subxt::Call for KillStorage { + impl ::subxt::Call for kill_storage { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "kill_storage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct KillPrefix { + pub struct kill_prefix { pub prefix: ::std::vec::Vec<::core::primitive::u8>, pub subkeys: ::core::primitive::u32, } - impl ::subxt::Call for KillPrefix { + impl ::subxt::Call for kill_prefix { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "kill_prefix"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemarkWithEvent { + pub struct remark_with_event { pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for RemarkWithEvent { + impl ::subxt::Call for remark_with_event { const PALLET: &'static str = "System"; const FUNCTION: &'static str = "remark_with_event"; } @@ -190,61 +187,33 @@ pub mod api { pub fn fill_block( &self, ratio: runtime_types::sp_arithmetic::per_things::Perbill, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - FillBlock, - DispatchError, - root_mod::Event, - > { - let call = FillBlock { ratio }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, fill_block, DispatchError> + { + let call = fill_block { ratio }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remark( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Remark, - DispatchError, - root_mod::Event, - > { - let call = Remark { remark }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remark, DispatchError> + { + let call = remark { remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_heap_pages( &self, pages: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetHeapPages, - DispatchError, - root_mod::Event, - > { - let call = SetHeapPages { pages }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_heap_pages, DispatchError> + { + let call = set_heap_pages { pages }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_code( &self, code: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetCode, - DispatchError, - root_mod::Event, - > { - let call = SetCode { code }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_code, DispatchError> + { + let call = set_code { code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_code_without_checks( @@ -255,11 +224,10 @@ pub mod api { T, X, A, - SetCodeWithoutChecks, + set_code_without_checks, DispatchError, - root_mod::Event, > { - let call = SetCodeWithoutChecks { code }; + let call = set_code_without_checks { code }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_changes_trie_config( @@ -272,11 +240,10 @@ pub mod api { T, X, A, - SetChangesTrieConfig, + set_changes_trie_config, DispatchError, - root_mod::Event, > { - let call = SetChangesTrieConfig { + let call = set_changes_trie_config { changes_trie_config, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -287,62 +254,34 @@ pub mod api { ::std::vec::Vec<::core::primitive::u8>, ::std::vec::Vec<::core::primitive::u8>, )>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetStorage, - DispatchError, - root_mod::Event, - > { - let call = SetStorage { items }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_storage, DispatchError> + { + let call = set_storage { items }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn kill_storage( &self, keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - KillStorage, - DispatchError, - root_mod::Event, - > { - let call = KillStorage { keys }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, kill_storage, DispatchError> + { + let call = kill_storage { keys }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn kill_prefix( &self, prefix: ::std::vec::Vec<::core::primitive::u8>, subkeys: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - KillPrefix, - DispatchError, - root_mod::Event, - > { - let call = KillPrefix { prefix, subkeys }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, kill_prefix, DispatchError> + { + let call = kill_prefix { prefix, subkeys }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remark_with_event( &self, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemarkWithEvent, - DispatchError, - root_mod::Event, - > { - let call = RemarkWithEvent { remark }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remark_with_event, DispatchError> + { + let call = remark_with_event { remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -395,25 +334,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct Account<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - pub struct AccountOwned(pub ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Account<'_> { - const PALLET: &'static str = "System"; - const STORAGE: &'static str = "Account"; - type Value = runtime_types::frame_system::AccountInfo< - ::core::primitive::u32, - runtime_types::darwinia_common_runtime::impls::AccountData< - ::core::primitive::u128, - >, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - impl ::subxt::StorageEntry for AccountOwned { + pub struct Account(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Account { const PALLET: &'static str = "System"; const STORAGE: &'static str = "Account"; type Value = runtime_types::frame_system::AccountInfo< @@ -457,8 +379,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct BlockHash<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for BlockHash<'_> { + pub struct BlockHash(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for BlockHash { const PALLET: &'static str = "System"; const STORAGE: &'static str = "BlockHash"; type Value = ::subxt::sp_core::H256; @@ -469,8 +391,8 @@ pub mod api { )]) } } - pub struct ExtrinsicData<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ExtrinsicData<'_> { + pub struct ExtrinsicData(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for ExtrinsicData { const PALLET: &'static str = "System"; const STORAGE: &'static str = "ExtrinsicData"; type Value = ::std::vec::Vec<::core::primitive::u8>; @@ -532,8 +454,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct EventTopics<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for EventTopics<'_> { + pub struct EventTopics(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for EventTopics { const PALLET: &'static str = "System"; const STORAGE: &'static str = "EventTopics"; type Value = ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>; @@ -589,7 +511,7 @@ pub mod api { } pub async fn account( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_system::AccountInfo< @@ -606,7 +528,7 @@ pub mod api { pub async fn account_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Account<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Account>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -642,7 +564,7 @@ pub mod api { } pub async fn block_hash( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::BasicError> { @@ -652,15 +574,13 @@ pub mod api { pub async fn block_hash_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, BlockHash<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, BlockHash>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn extrinsic_data( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u8>, @@ -673,7 +593,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ExtrinsicData<'a>>, + ::subxt::KeyIter<'a, T, ExtrinsicData>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -729,7 +649,7 @@ pub mod api { } pub async fn event_topics( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u32)>, @@ -741,10 +661,8 @@ pub mod api { pub async fn event_topics_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, EventTopics<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, EventTopics>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn last_runtime_upgrade( @@ -851,7 +769,7 @@ pub mod api { &mut &[ 32u8, 68u8, 97u8, 114u8, 119u8, 105u8, 110u8, 105u8, 97u8, 32u8, 68u8, 97u8, 114u8, 119u8, 105u8, 110u8, 105u8, 97u8, 0u8, 0u8, 0u8, 0u8, - 156u8, 4u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 72u8, 223u8, 106u8, 203u8, + 200u8, 4u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 64u8, 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, 96u8, 155u8, 3u8, 0u8, 0u8, 0u8, 55u8, 227u8, 151u8, 252u8, 124u8, 145u8, 245u8, 228u8, 1u8, 0u8, 0u8, 0u8, 64u8, 254u8, 58u8, 212u8, 1u8, 248u8, 149u8, 154u8, 5u8, 0u8, 0u8, 0u8, 188u8, @@ -864,10 +782,8 @@ pub mod api { 1u8, 0u8, 0u8, 0u8, 171u8, 60u8, 5u8, 114u8, 41u8, 31u8, 235u8, 139u8, 1u8, 0u8, 0u8, 0u8, 55u8, 200u8, 187u8, 19u8, 80u8, 169u8, 162u8, 168u8, 1u8, 0u8, 0u8, 0u8, 25u8, 154u8, 244u8, 135u8, 216u8, 77u8, - 152u8, 71u8, 1u8, 0u8, 0u8, 0u8, 100u8, 151u8, 124u8, 217u8, 40u8, - 65u8, 188u8, 94u8, 1u8, 0u8, 0u8, 0u8, 24u8, 239u8, 88u8, 163u8, 182u8, - 123u8, 167u8, 112u8, 1u8, 0u8, 0u8, 0u8, 45u8, 6u8, 198u8, 53u8, 50u8, - 185u8, 56u8, 227u8, 1u8, 0u8, 0u8, 0u8, 228u8, 163u8, 114u8, 215u8, + 152u8, 71u8, 1u8, 0u8, 0u8, 0u8, 24u8, 239u8, 88u8, 163u8, 182u8, + 123u8, 167u8, 112u8, 1u8, 0u8, 0u8, 0u8, 228u8, 163u8, 114u8, 215u8, 224u8, 4u8, 33u8, 239u8, 1u8, 0u8, 0u8, 0u8, 9u8, 248u8, 21u8, 1u8, 36u8, 165u8, 15u8, 61u8, 1u8, 0u8, 0u8, 0u8, 26u8, 118u8, 105u8, 44u8, 67u8, 158u8, 118u8, 25u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, @@ -884,14 +800,12 @@ pub mod api { } } pub mod babe { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReportEquivocation { + pub struct report_equivocation { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_consensus_slots::EquivocationProof< runtime_types::sp_runtime::generic::header::Header< @@ -903,12 +817,12 @@ pub mod api { >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocation { + impl ::subxt::Call for report_equivocation { const PALLET: &'static str = "Babe"; const FUNCTION: &'static str = "report_equivocation"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReportEquivocationUnsigned { + pub struct report_equivocation_unsigned { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_consensus_slots::EquivocationProof< runtime_types::sp_runtime::generic::header::Header< @@ -920,15 +834,15 @@ pub mod api { >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocationUnsigned { + impl ::subxt::Call for report_equivocation_unsigned { const PALLET: &'static str = "Babe"; const FUNCTION: &'static str = "report_equivocation_unsigned"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PlanConfigChange { + pub struct plan_config_change { pub config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, } - impl ::subxt::Call for PlanConfigChange { + impl ::subxt::Call for plan_config_change { const PALLET: &'static str = "Babe"; const FUNCTION: &'static str = "plan_config_change"; } @@ -958,16 +872,9 @@ pub mod api { runtime_types::sp_consensus_babe::app::Public, >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReportEquivocation, - DispatchError, - root_mod::Event, - > { - let call = ReportEquivocation { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, report_equivocation, DispatchError> + { + let call = report_equivocation { equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }; @@ -988,11 +895,10 @@ pub mod api { T, X, A, - ReportEquivocationUnsigned, + report_equivocation_unsigned, DispatchError, - root_mod::Event, > { - let call = ReportEquivocationUnsigned { + let call = report_equivocation_unsigned { equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }; @@ -1001,16 +907,9 @@ pub mod api { pub fn plan_config_change( &self, config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - PlanConfigChange, - DispatchError, - root_mod::Event, - > { - let call = PlanConfigChange { config }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, plan_config_change, DispatchError> + { + let call = plan_config_change { config }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -1106,8 +1005,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct UnderConstruction<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for UnderConstruction<'_> { + pub struct UnderConstruction(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for UnderConstruction { const PALLET: &'static str = "Babe"; const STORAGE: &'static str = "UnderConstruction"; type Value = runtime_types::frame_support::storage::bounded_vec::BoundedVec< @@ -1273,7 +1172,7 @@ pub mod api { } pub async fn under_construction( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::bounded_vec::BoundedVec< @@ -1288,7 +1187,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UnderConstruction<'a>>, + ::subxt::KeyIter<'a, T, UnderConstruction>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -1391,18 +1290,16 @@ pub mod api { } } pub mod timestamp { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Set { + pub struct set { #[codec(compact)] pub now: ::core::primitive::u64, } - impl ::subxt::Call for Set { + impl ::subxt::Call for set { const PALLET: &'static str = "Timestamp"; const FUNCTION: &'static str = "set"; } @@ -1425,9 +1322,9 @@ pub mod api { pub fn set( &self, now: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Set, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set, DispatchError> { - let call = Set { now }; + let call = set { now }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -1493,25 +1390,23 @@ pub mod api { } } pub mod balances { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Transfer { + pub struct transfer { pub dest: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Transfer { + impl ::subxt::Call for transfer { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetBalance { + pub struct set_balance { pub who: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, #[codec(compact)] @@ -1519,12 +1414,12 @@ pub mod api { #[codec(compact)] pub new_reserved: ::core::primitive::u128, } - impl ::subxt::Call for SetBalance { + impl ::subxt::Call for set_balance { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "set_balance"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceTransfer { + pub struct force_transfer { pub source: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub dest: @@ -1532,38 +1427,38 @@ pub mod api { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for ForceTransfer { + impl ::subxt::Call for force_transfer { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "force_transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TransferKeepAlive { + pub struct transfer_keep_alive { pub dest: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for TransferKeepAlive { + impl ::subxt::Call for transfer_keep_alive { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer_keep_alive"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TransferAll { + pub struct transfer_all { pub dest: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub keep_alive: ::core::primitive::bool, } - impl ::subxt::Call for TransferAll { + impl ::subxt::Call for transfer_all { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "transfer_all"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceUnreserve { + pub struct force_unreserve { pub who: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub amount: ::core::primitive::u128, } - impl ::subxt::Call for ForceUnreserve { + impl ::subxt::Call for force_unreserve { const PALLET: &'static str = "Balances"; const FUNCTION: &'static str = "force_unreserve"; } @@ -1590,16 +1485,9 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Transfer, - DispatchError, - root_mod::Event, - > { - let call = Transfer { dest, value }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, transfer, DispatchError> + { + let call = transfer { dest, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_balance( @@ -1610,16 +1498,9 @@ pub mod api { >, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetBalance, - DispatchError, - root_mod::Event, - > { - let call = SetBalance { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_balance, DispatchError> + { + let call = set_balance { who, new_free, new_reserved, @@ -1637,16 +1518,9 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceTransfer, - DispatchError, - root_mod::Event, - > { - let call = ForceTransfer { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_transfer, DispatchError> + { + let call = force_transfer { source, dest, value, @@ -1660,16 +1534,9 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - TransferKeepAlive, - DispatchError, - root_mod::Event, - > { - let call = TransferKeepAlive { dest, value }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, transfer_keep_alive, DispatchError> + { + let call = transfer_keep_alive { dest, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn transfer_all( @@ -1679,16 +1546,9 @@ pub mod api { (), >, keep_alive: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - TransferAll, - DispatchError, - root_mod::Event, - > { - let call = TransferAll { dest, keep_alive }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, transfer_all, DispatchError> + { + let call = transfer_all { dest, keep_alive }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_unreserve( @@ -1698,16 +1558,9 @@ pub mod api { (), >, amount: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceUnreserve, - DispatchError, - root_mod::Event, - > { - let call = ForceUnreserve { who, amount }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_unreserve, DispatchError> + { + let call = force_unreserve { who, amount }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -1803,8 +1656,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Account<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Account<'_> { + pub struct Account(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Account { const PALLET: &'static str = "Balances"; const STORAGE: &'static str = "Account"; type Value = runtime_types::darwinia_common_runtime::impls::AccountData< @@ -1817,16 +1670,13 @@ pub mod api { )]) } } - pub struct Locks<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Locks<'_> { + pub struct Locks(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Locks { const PALLET: &'static str = "Balances"; const STORAGE: &'static str = "Locks"; type Value = runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< - ::core::primitive::u128, - ::core::primitive::u32, - >, + runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( @@ -1835,8 +1685,8 @@ pub mod api { )]) } } - pub struct Reserves<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Reserves<'_> { + pub struct Reserves(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Reserves { const PALLET: &'static str = "Balances"; const STORAGE: &'static str = "Reserves"; type Value = runtime_types::frame_support::storage::bounded_vec::BoundedVec< @@ -1878,7 +1728,7 @@ pub mod api { } pub async fn account( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_common_runtime::impls::AccountData< @@ -1892,20 +1742,17 @@ pub mod api { pub async fn account_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Account<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Account>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn locks( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< - ::core::primitive::u128, - ::core::primitive::u32, - >, + runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, >, ::subxt::BasicError, > { @@ -1915,13 +1762,13 @@ pub mod api { pub async fn locks_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Locks<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Locks>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn reserves( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::bounded_vec::BoundedVec< @@ -1938,10 +1785,8 @@ pub mod api { pub async fn reserves_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Reserves<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Reserves>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn storage_version( @@ -1991,25 +1836,23 @@ pub mod api { } } pub mod kton { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Transfer { + pub struct transfer { pub dest: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Transfer { + impl ::subxt::Call for transfer { const PALLET: &'static str = "Kton"; const FUNCTION: &'static str = "transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetBalance { + pub struct set_balance { pub who: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, #[codec(compact)] @@ -2017,12 +1860,12 @@ pub mod api { #[codec(compact)] pub new_reserved: ::core::primitive::u128, } - impl ::subxt::Call for SetBalance { + impl ::subxt::Call for set_balance { const PALLET: &'static str = "Kton"; const FUNCTION: &'static str = "set_balance"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceTransfer { + pub struct force_transfer { pub source: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub dest: @@ -2030,38 +1873,38 @@ pub mod api { #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for ForceTransfer { + impl ::subxt::Call for force_transfer { const PALLET: &'static str = "Kton"; const FUNCTION: &'static str = "force_transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TransferKeepAlive { + pub struct transfer_keep_alive { pub dest: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for TransferKeepAlive { + impl ::subxt::Call for transfer_keep_alive { const PALLET: &'static str = "Kton"; const FUNCTION: &'static str = "transfer_keep_alive"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TransferAll { + pub struct transfer_all { pub dest: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub keep_alive: ::core::primitive::bool, } - impl ::subxt::Call for TransferAll { + impl ::subxt::Call for transfer_all { const PALLET: &'static str = "Kton"; const FUNCTION: &'static str = "transfer_all"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceUnreserve { + pub struct force_unreserve { pub who: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub amount: ::core::primitive::u128, } - impl ::subxt::Call for ForceUnreserve { + impl ::subxt::Call for force_unreserve { const PALLET: &'static str = "Kton"; const FUNCTION: &'static str = "force_unreserve"; } @@ -2088,16 +1931,9 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Transfer, - DispatchError, - root_mod::Event, - > { - let call = Transfer { dest, value }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, transfer, DispatchError> + { + let call = transfer { dest, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_balance( @@ -2108,16 +1944,9 @@ pub mod api { >, new_free: ::core::primitive::u128, new_reserved: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetBalance, - DispatchError, - root_mod::Event, - > { - let call = SetBalance { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_balance, DispatchError> + { + let call = set_balance { who, new_free, new_reserved, @@ -2135,16 +1964,9 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceTransfer, - DispatchError, - root_mod::Event, - > { - let call = ForceTransfer { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_transfer, DispatchError> + { + let call = force_transfer { source, dest, value, @@ -2158,16 +1980,9 @@ pub mod api { (), >, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - TransferKeepAlive, - DispatchError, - root_mod::Event, - > { - let call = TransferKeepAlive { dest, value }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, transfer_keep_alive, DispatchError> + { + let call = transfer_keep_alive { dest, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn transfer_all( @@ -2177,16 +1992,9 @@ pub mod api { (), >, keep_alive: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - TransferAll, - DispatchError, - root_mod::Event, - > { - let call = TransferAll { dest, keep_alive }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, transfer_all, DispatchError> + { + let call = transfer_all { dest, keep_alive }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_unreserve( @@ -2196,16 +2004,9 @@ pub mod api { (), >, amount: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceUnreserve, - DispatchError, - root_mod::Event, - > { - let call = ForceUnreserve { who, amount }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_unreserve, DispatchError> + { + let call = force_unreserve { who, amount }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -2301,8 +2102,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Account<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Account<'_> { + pub struct Account(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Account { const PALLET: &'static str = "Kton"; const STORAGE: &'static str = "Account"; type Value = runtime_types::darwinia_common_runtime::impls::AccountData< @@ -2315,16 +2116,13 @@ pub mod api { )]) } } - pub struct Locks<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Locks<'_> { + pub struct Locks(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Locks { const PALLET: &'static str = "Kton"; const STORAGE: &'static str = "Locks"; type Value = runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< - ::core::primitive::u128, - ::core::primitive::u32, - >, + runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( @@ -2333,8 +2131,8 @@ pub mod api { )]) } } - pub struct Reserves<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Reserves<'_> { + pub struct Reserves(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Reserves { const PALLET: &'static str = "Kton"; const STORAGE: &'static str = "Reserves"; type Value = runtime_types::frame_support::storage::bounded_vec::BoundedVec< @@ -2376,7 +2174,7 @@ pub mod api { } pub async fn account( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_common_runtime::impls::AccountData< @@ -2390,20 +2188,17 @@ pub mod api { pub async fn account_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Account<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Account>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn locks( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< - ::core::primitive::u128, - ::core::primitive::u32, - >, + runtime_types::pallet_balances::BalanceLock<::core::primitive::u128>, >, ::subxt::BasicError, > { @@ -2413,13 +2208,13 @@ pub mod api { pub async fn locks_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Locks<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Locks>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn reserves( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::bounded_vec::BoundedVec< @@ -2436,10 +2231,8 @@ pub mod api { pub async fn reserves_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Reserves<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Reserves>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn storage_version( @@ -2489,7 +2282,6 @@ pub mod api { } } pub mod transaction_payment { - use super::root_mod; use super::runtime_types; pub mod storage { use super::runtime_types; @@ -2582,14 +2374,12 @@ pub mod api { } } pub mod authorship { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetUncles { + pub struct set_uncles { pub new_uncles: ::std::vec::Vec< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, @@ -2597,7 +2387,7 @@ pub mod api { >, >, } - impl ::subxt::Call for SetUncles { + impl ::subxt::Call for set_uncles { const PALLET: &'static str = "Authorship"; const FUNCTION: &'static str = "set_uncles"; } @@ -2625,16 +2415,9 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetUncles, - DispatchError, - root_mod::Event, - > { - let call = SetUncles { new_uncles }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_uncles, DispatchError> + { + let call = set_uncles { new_uncles }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -2733,28 +2516,26 @@ pub mod api { } } pub mod election_provider_multi_phase { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SubmitUnsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } - impl ::subxt::Call for SubmitUnsigned { + pub struct submit_unsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } + impl ::subxt::Call for submit_unsigned { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "submit_unsigned"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetMinimumUntrustedScore { + pub struct set_minimum_untrusted_score { pub maybe_next_score: ::core::option::Option<[::core::primitive::u128; 3usize]>, } - impl ::subxt::Call for SetMinimumUntrustedScore { + impl ::subxt::Call for set_minimum_untrusted_score { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "set_minimum_untrusted_score"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetEmergencyElectionResult { + pub struct set_emergency_election_result { pub supports: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::sp_npos_elections::Support< @@ -2762,13 +2543,13 @@ pub mod api { >, )>, } - impl ::subxt::Call for SetEmergencyElectionResult { + impl ::subxt::Call for set_emergency_election_result { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "set_emergency_election_result"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Submit { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > > , pub num_signed_submissions : :: core :: primitive :: u32 , } - impl ::subxt::Call for Submit { + pub struct submit { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > > , pub num_signed_submissions : :: core :: primitive :: u32 , } + impl ::subxt::Call for submit { const PALLET: &'static str = "ElectionProviderMultiPhase"; const FUNCTION: &'static str = "submit"; } @@ -2792,16 +2573,9 @@ pub mod api { &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 >, witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SubmitUnsigned, - DispatchError, - root_mod::Event, - > { - let call = SubmitUnsigned { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, submit_unsigned, DispatchError> + { + let call = submit_unsigned { raw_solution: ::std::boxed::Box::new(raw_solution), witness, }; @@ -2815,11 +2589,10 @@ pub mod api { T, X, A, - SetMinimumUntrustedScore, + set_minimum_untrusted_score, DispatchError, - root_mod::Event, > { - let call = SetMinimumUntrustedScore { maybe_next_score }; + let call = set_minimum_untrusted_score { maybe_next_score }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_emergency_election_result( @@ -2835,27 +2608,19 @@ pub mod api { T, X, A, - SetEmergencyElectionResult, + set_emergency_election_result, DispatchError, - root_mod::Event, > { - let call = SetEmergencyElectionResult { supports }; + let call = set_emergency_election_result { supports }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn submit( &self, raw_solution : runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 >, num_signed_submissions: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Submit, - DispatchError, - root_mod::Event, - > { - let call = Submit { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, submit, DispatchError> + { + let call = submit { raw_solution: ::std::boxed::Box::new(raw_solution), num_signed_submissions, }; @@ -3013,8 +2778,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct SignedSubmissionsMap<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for SignedSubmissionsMap<'_> { + pub struct SignedSubmissionsMap(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for SignedSubmissionsMap { const PALLET: &'static str = "ElectionProviderMultiPhase"; const STORAGE: &'static str = "SignedSubmissionsMap"; type Value = runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > ; @@ -3131,7 +2896,7 @@ pub mod api { > { let entry = SignedSubmissionIndices; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn signed_submissions_map (& self , _0 : & :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > , :: subxt :: BasicError >{ + } pub async fn signed_submissions_map (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > , :: subxt :: BasicError >{ let entry = SignedSubmissionsMap(_0); self.client.storage().fetch_or_default(&entry, hash).await } @@ -3139,7 +2904,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SignedSubmissionsMap<'a>>, + ::subxt::KeyIter<'a, T, SignedSubmissionsMap>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -3290,14 +3055,12 @@ pub mod api { } } pub mod staking { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Bond { + pub struct bond { pub controller: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub value: runtime_types::darwinia_staking::structs::StakingBalance< @@ -3309,45 +3072,59 @@ pub mod api { >, pub promise_month: ::core::primitive::u8, } - impl ::subxt::Call for Bond { + impl ::subxt::Call for bond { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "bond"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct BondExtra { + pub struct bond_extra { pub max_additional: runtime_types::darwinia_staking::structs::StakingBalance< ::core::primitive::u128, ::core::primitive::u128, >, pub promise_month: ::core::primitive::u8, } - impl ::subxt::Call for BondExtra { + impl ::subxt::Call for bond_extra { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "bond_extra"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct DepositExtra { + pub struct deposit_extra { pub value: ::core::primitive::u128, pub promise_month: ::core::primitive::u8, } - impl ::subxt::Call for DepositExtra { + impl ::subxt::Call for deposit_extra { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "deposit_extra"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Unbond { + pub struct unbond { pub value: runtime_types::darwinia_staking::structs::StakingBalance< ::core::primitive::u128, ::core::primitive::u128, >, } - impl ::subxt::Call for Unbond { + impl ::subxt::Call for unbond { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "unbond"; } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct withdraw_unbonded { + pub num_slashing_spans: ::core::primitive::u32, + } + impl ::subxt::Call for withdraw_unbonded { + const PALLET: &'static str = "Staking"; + const FUNCTION: &'static str = "withdraw_unbonded"; + } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ClaimMatureDeposits; - impl ::subxt::Call for ClaimMatureDeposits { + pub struct claim_mature_deposits; + impl ::subxt::Call for claim_mature_deposits { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "claim_mature_deposits"; } @@ -3358,178 +3135,178 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct TryClaimDepositsWithPunish { + pub struct try_claim_deposits_with_punish { pub expire_time: ::core::primitive::u64, } - impl ::subxt::Call for TryClaimDepositsWithPunish { + impl ::subxt::Call for try_claim_deposits_with_punish { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "try_claim_deposits_with_punish"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Validate { + pub struct validate { pub prefs: runtime_types::darwinia_staking::structs::ValidatorPrefs, } - impl ::subxt::Call for Validate { + impl ::subxt::Call for validate { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "validate"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Nominate { + pub struct nominate { pub targets: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, >, } - impl ::subxt::Call for Nominate { + impl ::subxt::Call for nominate { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "nominate"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Chill; - impl ::subxt::Call for Chill { + pub struct chill; + impl ::subxt::Call for chill { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "chill"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetPayee { + pub struct set_payee { pub payee: runtime_types::darwinia_staking::structs::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, } - impl ::subxt::Call for SetPayee { + impl ::subxt::Call for set_payee { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_payee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetController { + pub struct set_controller { pub controller: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for SetController { + impl ::subxt::Call for set_controller { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_controller"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetValidatorCount { + pub struct set_validator_count { #[codec(compact)] pub new: ::core::primitive::u32, } - impl ::subxt::Call for SetValidatorCount { + impl ::subxt::Call for set_validator_count { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_validator_count"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct IncreaseValidatorCount { + pub struct increase_validator_count { #[codec(compact)] pub additional: ::core::primitive::u32, } - impl ::subxt::Call for IncreaseValidatorCount { + impl ::subxt::Call for increase_validator_count { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "increase_validator_count"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ScaleValidatorCount { + pub struct scale_validator_count { pub factor: runtime_types::sp_arithmetic::per_things::Percent, } - impl ::subxt::Call for ScaleValidatorCount { + impl ::subxt::Call for scale_validator_count { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "scale_validator_count"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceNoEras; - impl ::subxt::Call for ForceNoEras { + pub struct force_no_eras; + impl ::subxt::Call for force_no_eras { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_no_eras"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceNewEra; - impl ::subxt::Call for ForceNewEra { + pub struct force_new_era; + impl ::subxt::Call for force_new_era { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_new_era"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetInvulnerables { + pub struct set_invulnerables { pub invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for SetInvulnerables { + impl ::subxt::Call for set_invulnerables { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_invulnerables"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceUnstake { + pub struct force_unstake { pub stash: ::subxt::sp_core::crypto::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::Call for ForceUnstake { + impl ::subxt::Call for force_unstake { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_unstake"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceNewEraAlways; - impl ::subxt::Call for ForceNewEraAlways { + pub struct force_new_era_always; + impl ::subxt::Call for force_new_era_always { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "force_new_era_always"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelDeferredSlash { + pub struct cancel_deferred_slash { pub era: ::core::primitive::u32, pub slash_indices: ::std::vec::Vec<::core::primitive::u32>, } - impl ::subxt::Call for CancelDeferredSlash { + impl ::subxt::Call for cancel_deferred_slash { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "cancel_deferred_slash"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PayoutStakers { + pub struct payout_stakers { pub validator_stash: ::subxt::sp_core::crypto::AccountId32, pub era: ::core::primitive::u32, } - impl ::subxt::Call for PayoutStakers { + impl ::subxt::Call for payout_stakers { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "payout_stakers"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Rebond { + pub struct rebond { #[codec(compact)] pub plan_to_rebond_ring: ::core::primitive::u128, #[codec(compact)] pub plan_to_rebond_kton: ::core::primitive::u128, } - impl ::subxt::Call for Rebond { + impl ::subxt::Call for rebond { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "rebond"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetHistoryDepth { + pub struct set_history_depth { #[codec(compact)] pub new_history_depth: ::core::primitive::u32, #[codec(compact)] pub era_items_deleted: ::core::primitive::u32, } - impl ::subxt::Call for SetHistoryDepth { + impl ::subxt::Call for set_history_depth { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_history_depth"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReapStash { + pub struct reap_stash { pub stash: ::subxt::sp_core::crypto::AccountId32, pub num_slashing_spans: ::core::primitive::u32, } - impl ::subxt::Call for ReapStash { + impl ::subxt::Call for reap_stash { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "reap_stash"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Kick { + pub struct kick { pub who: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, >, } - impl ::subxt::Call for Kick { + impl ::subxt::Call for kick { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "kick"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetStakingLimits { + pub struct set_staking_limits { pub min_nominator_bond: ::core::primitive::u128, pub min_validator_bond: ::core::primitive::u128, pub max_nominator_count: ::core::option::Option<::core::primitive::u32>, @@ -3537,15 +3314,15 @@ pub mod api { pub threshold: ::core::option::Option, } - impl ::subxt::Call for SetStakingLimits { + impl ::subxt::Call for set_staking_limits { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "set_staking_limits"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ChillOther { + pub struct chill_other { pub controller: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ChillOther { + impl ::subxt::Call for chill_other { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "chill_other"; } @@ -3579,9 +3356,9 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, >, promise_month: ::core::primitive::u8, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Bond, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, bond, DispatchError> { - let call = Bond { + let call = bond { controller, value, payee, @@ -3596,16 +3373,9 @@ pub mod api { ::core::primitive::u128, >, promise_month: ::core::primitive::u8, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - BondExtra, - DispatchError, - root_mod::Event, - > { - let call = BondExtra { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, bond_extra, DispatchError> + { + let call = bond_extra { max_additional, promise_month, }; @@ -3615,16 +3385,9 @@ pub mod api { &self, value: ::core::primitive::u128, promise_month: ::core::primitive::u8, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - DepositExtra, - DispatchError, - root_mod::Event, - > { - let call = DepositExtra { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, deposit_extra, DispatchError> + { + let call = deposit_extra { value, promise_month, }; @@ -3636,30 +3399,24 @@ pub mod api { ::core::primitive::u128, ::core::primitive::u128, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Unbond, - DispatchError, - root_mod::Event, - > { - let call = Unbond { value }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unbond, DispatchError> + { + let call = unbond { value }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn withdraw_unbonded( + &self, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, withdraw_unbonded, DispatchError> + { + let call = withdraw_unbonded { num_slashing_spans }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn claim_mature_deposits( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ClaimMatureDeposits, - DispatchError, - root_mod::Event, - > { - let call = ClaimMatureDeposits {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, claim_mature_deposits, DispatchError> + { + let call = claim_mature_deposits {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn try_claim_deposits_with_punish( @@ -3670,26 +3427,18 @@ pub mod api { T, X, A, - TryClaimDepositsWithPunish, + try_claim_deposits_with_punish, DispatchError, - root_mod::Event, > { - let call = TryClaimDepositsWithPunish { expire_time }; + let call = try_claim_deposits_with_punish { expire_time }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn validate( &self, prefs: runtime_types::darwinia_staking::structs::ValidatorPrefs, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Validate, - DispatchError, - root_mod::Event, - > { - let call = Validate { prefs }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, validate, DispatchError> + { + let call = validate { prefs }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn nominate( @@ -3700,23 +3449,16 @@ pub mod api { (), >, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Nominate, - DispatchError, - root_mod::Event, - > { - let call = Nominate { targets }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, nominate, DispatchError> + { + let call = nominate { targets }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn chill( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Chill, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, chill, DispatchError> { - let call = Chill {}; + let call = chill {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_payee( @@ -3724,16 +3466,9 @@ pub mod api { payee: runtime_types::darwinia_staking::structs::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetPayee, - DispatchError, - root_mod::Event, - > { - let call = SetPayee { payee }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_payee, DispatchError> + { + let call = set_payee { payee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_controller( @@ -3742,31 +3477,17 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetController, - DispatchError, - root_mod::Event, - > { - let call = SetController { controller }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_controller, DispatchError> + { + let call = set_controller { controller }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_validator_count( &self, new: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetValidatorCount, - DispatchError, - root_mod::Event, - > { - let call = SetValidatorCount { new }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_validator_count, DispatchError> + { + let call = set_validator_count { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn increase_validator_count( @@ -3777,85 +3498,49 @@ pub mod api { T, X, A, - IncreaseValidatorCount, + increase_validator_count, DispatchError, - root_mod::Event, > { - let call = IncreaseValidatorCount { additional }; + let call = increase_validator_count { additional }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn scale_validator_count( &self, factor: runtime_types::sp_arithmetic::per_things::Percent, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ScaleValidatorCount, - DispatchError, - root_mod::Event, - > { - let call = ScaleValidatorCount { factor }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, scale_validator_count, DispatchError> + { + let call = scale_validator_count { factor }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_no_eras( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceNoEras, - DispatchError, - root_mod::Event, - > { - let call = ForceNoEras {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_no_eras, DispatchError> + { + let call = force_no_eras {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_new_era( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceNewEra, - DispatchError, - root_mod::Event, - > { - let call = ForceNewEra {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_new_era, DispatchError> + { + let call = force_new_era {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_invulnerables( &self, invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetInvulnerables, - DispatchError, - root_mod::Event, - > { - let call = SetInvulnerables { invulnerables }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_invulnerables, DispatchError> + { + let call = set_invulnerables { invulnerables }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_unstake( &self, stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceUnstake, - DispatchError, - root_mod::Event, - > { - let call = ForceUnstake { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_unstake, DispatchError> + { + let call = force_unstake { stash, num_slashing_spans, }; @@ -3863,48 +3548,27 @@ pub mod api { } pub fn force_new_era_always( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceNewEraAlways, - DispatchError, - root_mod::Event, - > { - let call = ForceNewEraAlways {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_new_era_always, DispatchError> + { + let call = force_new_era_always {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_deferred_slash( &self, era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelDeferredSlash, - DispatchError, - root_mod::Event, - > { - let call = CancelDeferredSlash { era, slash_indices }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_deferred_slash, DispatchError> + { + let call = cancel_deferred_slash { era, slash_indices }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn payout_stakers( &self, validator_stash: ::subxt::sp_core::crypto::AccountId32, era: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - PayoutStakers, - DispatchError, - root_mod::Event, - > { - let call = PayoutStakers { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, payout_stakers, DispatchError> + { + let call = payout_stakers { validator_stash, era, }; @@ -3914,16 +3578,9 @@ pub mod api { &self, plan_to_rebond_ring: ::core::primitive::u128, plan_to_rebond_kton: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Rebond, - DispatchError, - root_mod::Event, - > { - let call = Rebond { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, rebond, DispatchError> + { + let call = rebond { plan_to_rebond_ring, plan_to_rebond_kton, }; @@ -3933,16 +3590,9 @@ pub mod api { &self, new_history_depth: ::core::primitive::u32, era_items_deleted: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetHistoryDepth, - DispatchError, - root_mod::Event, - > { - let call = SetHistoryDepth { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_history_depth, DispatchError> + { + let call = set_history_depth { new_history_depth, era_items_deleted, }; @@ -3952,16 +3602,9 @@ pub mod api { &self, stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReapStash, - DispatchError, - root_mod::Event, - > { - let call = ReapStash { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, reap_stash, DispatchError> + { + let call = reap_stash { stash, num_slashing_spans, }; @@ -3975,9 +3618,9 @@ pub mod api { (), >, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Kick, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, kick, DispatchError> { - let call = Kick { who }; + let call = kick { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_staking_limits( @@ -3989,16 +3632,9 @@ pub mod api { threshold: ::core::option::Option< runtime_types::sp_arithmetic::per_things::Percent, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetStakingLimits, - DispatchError, - root_mod::Event, - > { - let call = SetStakingLimits { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_staking_limits, DispatchError> + { + let call = set_staking_limits { min_nominator_bond, min_validator_bond, max_nominator_count, @@ -4010,16 +3646,9 @@ pub mod api { pub fn chill_other( &self, controller: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ChillOther, - DispatchError, - root_mod::Event, - > { - let call = ChillOther { controller }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, chill_other, DispatchError> + { + let call = chill_other { controller }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -4196,8 +3825,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Bonded<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Bonded<'_> { + pub struct Bonded(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Bonded { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "Bonded"; type Value = ::subxt::sp_core::crypto::AccountId32; @@ -4226,8 +3855,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Ledger<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Ledger<'_> { + pub struct Ledger(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Ledger { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "Ledger"; type Value = runtime_types::darwinia_staking::structs::StakingLedger< @@ -4243,8 +3872,8 @@ pub mod api { )]) } } - pub struct Payee<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Payee<'_> { + pub struct Payee(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Payee { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "Payee"; type Value = runtime_types::darwinia_staking::structs::RewardDestination< @@ -4257,8 +3886,8 @@ pub mod api { )]) } } - pub struct Validators<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Validators<'_> { + pub struct Validators(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Validators { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "Validators"; type Value = runtime_types::darwinia_staking::structs::ValidatorPrefs; @@ -4287,8 +3916,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Nominators<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Nominators<'_> { + pub struct Nominators(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Nominators { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "Nominators"; type Value = runtime_types::darwinia_staking::structs::Nominations< @@ -4337,8 +3966,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct ErasStartSessionIndex<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ErasStartSessionIndex<'_> { + pub struct ErasStartSessionIndex(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for ErasStartSessionIndex { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "ErasStartSessionIndex"; type Value = ::core::primitive::u32; @@ -4349,11 +3978,11 @@ pub mod api { )]) } } - pub struct ErasStakers<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, + pub struct ErasStakers( + pub ::core::primitive::u32, + pub ::subxt::sp_core::crypto::AccountId32, ); - impl ::subxt::StorageEntry for ErasStakers<'_> { + impl ::subxt::StorageEntry for ErasStakers { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "ErasStakers"; type Value = runtime_types::darwinia_staking::structs::Exposure< @@ -4368,11 +3997,11 @@ pub mod api { ]) } } - pub struct ErasStakersClipped<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, + pub struct ErasStakersClipped( + pub ::core::primitive::u32, + pub ::subxt::sp_core::crypto::AccountId32, ); - impl ::subxt::StorageEntry for ErasStakersClipped<'_> { + impl ::subxt::StorageEntry for ErasStakersClipped { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "ErasStakersClipped"; type Value = runtime_types::darwinia_staking::structs::Exposure< @@ -4387,11 +4016,11 @@ pub mod api { ]) } } - pub struct ErasValidatorPrefs<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, + pub struct ErasValidatorPrefs( + pub ::core::primitive::u32, + pub ::subxt::sp_core::crypto::AccountId32, ); - impl ::subxt::StorageEntry for ErasValidatorPrefs<'_> { + impl ::subxt::StorageEntry for ErasValidatorPrefs { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "ErasValidatorPrefs"; type Value = runtime_types::darwinia_staking::structs::ValidatorPrefs; @@ -4402,8 +4031,8 @@ pub mod api { ]) } } - pub struct ErasValidatorReward<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ErasValidatorReward<'_> { + pub struct ErasValidatorReward(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for ErasValidatorReward { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "ErasValidatorReward"; type Value = ::core::primitive::u128; @@ -4414,8 +4043,8 @@ pub mod api { )]) } } - pub struct ErasRewardPoints<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ErasRewardPoints<'_> { + pub struct ErasRewardPoints(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for ErasRewardPoints { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "ErasRewardPoints"; type Value = runtime_types::darwinia_staking::structs::EraRewardPoints< @@ -4428,8 +4057,8 @@ pub mod api { )]) } } - pub struct ErasTotalStake<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ErasTotalStake<'_> { + pub struct ErasTotalStake(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for ErasTotalStake { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "ErasTotalStake"; type Value = ::core::primitive::u32; @@ -4467,8 +4096,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct UnappliedSlashes<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for UnappliedSlashes<'_> { + pub struct UnappliedSlashes(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for UnappliedSlashes { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "UnappliedSlashes"; type Value = ::std::vec::Vec< @@ -4494,11 +4123,11 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct ValidatorSlashInEra<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, + pub struct ValidatorSlashInEra( + pub ::core::primitive::u32, + pub ::subxt::sp_core::crypto::AccountId32, ); - impl ::subxt::StorageEntry for ValidatorSlashInEra<'_> { + impl ::subxt::StorageEntry for ValidatorSlashInEra { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "ValidatorSlashInEra"; type Value = ( @@ -4515,11 +4144,11 @@ pub mod api { ]) } } - pub struct NominatorSlashInEra<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, + pub struct NominatorSlashInEra( + pub ::core::primitive::u32, + pub ::subxt::sp_core::crypto::AccountId32, ); - impl ::subxt::StorageEntry for NominatorSlashInEra<'_> { + impl ::subxt::StorageEntry for NominatorSlashInEra { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "NominatorSlashInEra"; type Value = runtime_types::darwinia_staking::slashing::RK< @@ -4533,8 +4162,8 @@ pub mod api { ]) } } - pub struct SlashingSpans<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for SlashingSpans<'_> { + pub struct SlashingSpans(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for SlashingSpans { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "SlashingSpans"; type Value = runtime_types::darwinia_staking::slashing::SlashingSpans; @@ -4545,11 +4174,11 @@ pub mod api { )]) } } - pub struct SpanSlash<'a>( - pub &'a ::subxt::sp_core::crypto::AccountId32, - pub &'a ::core::primitive::u32, + pub struct SpanSlash( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u32, ); - impl ::subxt::StorageEntry for SpanSlash<'_> { + impl ::subxt::StorageEntry for SpanSlash { const PALLET: &'static str = "Staking"; const STORAGE: &'static str = "SpanSlash"; type Value = runtime_types::darwinia_staking::slashing::SpanRecord< @@ -4558,7 +4187,7 @@ pub mod api { >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &(&self.0, &self.1), + &self.0, ::subxt::StorageHasher::Twox64Concat, )]) } @@ -4678,7 +4307,7 @@ pub mod api { } pub async fn bonded( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, @@ -4690,7 +4319,7 @@ pub mod api { pub async fn bonded_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Bonded<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Bonded>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -4712,7 +4341,7 @@ pub mod api { } pub async fn ledger( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -4731,13 +4360,13 @@ pub mod api { pub async fn ledger_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Ledger<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Ledger>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn payee( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_staking::structs::RewardDestination< @@ -4751,13 +4380,13 @@ pub mod api { pub async fn payee_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Payee<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Payee>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn validators( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_staking::structs::ValidatorPrefs, @@ -4769,10 +4398,8 @@ pub mod api { pub async fn validators_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Validators<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Validators>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn counter_for_validators( @@ -4795,7 +4422,7 @@ pub mod api { } pub async fn nominators( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -4811,10 +4438,8 @@ pub mod api { pub async fn nominators_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Nominators<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Nominators>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn counter_for_nominators( @@ -4857,7 +4482,7 @@ pub mod api { } pub async fn eras_start_session_index( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, @@ -4870,15 +4495,15 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStartSessionIndex<'a>>, + ::subxt::KeyIter<'a, T, ErasStartSessionIndex>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn eras_stakers( &self, - _0: &::core::primitive::u32, - _1: &::subxt::sp_core::crypto::AccountId32, + _0: ::core::primitive::u32, + _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_staking::structs::Exposure< @@ -4894,16 +4519,14 @@ pub mod api { pub async fn eras_stakers_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStakers<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, ErasStakers>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn eras_stakers_clipped( &self, - _0: &::core::primitive::u32, - _1: &::subxt::sp_core::crypto::AccountId32, + _0: ::core::primitive::u32, + _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_staking::structs::Exposure< @@ -4920,15 +4543,15 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasStakersClipped<'a>>, + ::subxt::KeyIter<'a, T, ErasStakersClipped>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn eras_validator_prefs( &self, - _0: &::core::primitive::u32, - _1: &::subxt::sp_core::crypto::AccountId32, + _0: ::core::primitive::u32, + _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_staking::structs::ValidatorPrefs, @@ -4941,14 +4564,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasValidatorPrefs<'a>>, + ::subxt::KeyIter<'a, T, ErasValidatorPrefs>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn eras_validator_reward( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u128>, @@ -4961,14 +4584,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasValidatorReward<'a>>, + ::subxt::KeyIter<'a, T, ErasValidatorReward>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn eras_reward_points( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_staking::structs::EraRewardPoints< @@ -4983,14 +4606,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasRewardPoints<'a>>, + ::subxt::KeyIter<'a, T, ErasRewardPoints>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn eras_total_stake( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { @@ -5001,7 +4624,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ErasTotalStake<'a>>, + ::subxt::KeyIter<'a, T, ErasTotalStake>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -5036,7 +4659,7 @@ pub mod api { } pub async fn unapplied_slashes( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec< @@ -5055,7 +4678,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, UnappliedSlashes<'a>>, + ::subxt::KeyIter<'a, T, UnappliedSlashes>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -5072,8 +4695,8 @@ pub mod api { } pub async fn validator_slash_in_era( &self, - _0: &::core::primitive::u32, - _1: &::subxt::sp_core::crypto::AccountId32, + _0: ::core::primitive::u32, + _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<( @@ -5092,15 +4715,15 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ValidatorSlashInEra<'a>>, + ::subxt::KeyIter<'a, T, ValidatorSlashInEra>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn nominator_slash_in_era( &self, - _0: &::core::primitive::u32, - _1: &::subxt::sp_core::crypto::AccountId32, + _0: ::core::primitive::u32, + _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -5118,14 +4741,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, NominatorSlashInEra<'a>>, + ::subxt::KeyIter<'a, T, NominatorSlashInEra>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn slashing_spans( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -5140,15 +4763,15 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SlashingSpans<'a>>, + ::subxt::KeyIter<'a, T, SlashingSpans>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn span_slash( &self, - _0: &::subxt::sp_core::crypto::AccountId32, - _1: &::core::primitive::u32, + _0: ::subxt::sp_core::crypto::AccountId32, + _1: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::darwinia_staking::slashing::SpanRecord< @@ -5163,10 +4786,8 @@ pub mod api { pub async fn span_slash_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SpanSlash<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, SpanSlash>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn earliest_unapplied_slash( @@ -5318,7 +4939,6 @@ pub mod api { } } pub mod offences { - use super::root_mod; use super::runtime_types; pub type Event = runtime_types::pallet_offences::pallet::Event; pub mod events { @@ -5335,8 +4955,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct Reports<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Reports<'_> { + pub struct Reports(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for Reports { const PALLET: &'static str = "Offences"; const STORAGE: &'static str = "Reports"; type Value = runtime_types::sp_staking::offence::OffenceDetails< @@ -5357,11 +4977,11 @@ pub mod api { )]) } } - pub struct ConcurrentReportsIndex<'a>( - pub &'a [::core::primitive::u8; 16usize], - pub &'a [::core::primitive::u8], + pub struct ConcurrentReportsIndex( + pub [::core::primitive::u8; 16usize], + pub ::std::vec::Vec<::core::primitive::u8>, ); - impl ::subxt::StorageEntry for ConcurrentReportsIndex<'_> { + impl ::subxt::StorageEntry for ConcurrentReportsIndex { const PALLET: &'static str = "Offences"; const STORAGE: &'static str = "ConcurrentReportsIndex"; type Value = ::std::vec::Vec<::subxt::sp_core::H256>; @@ -5372,8 +4992,8 @@ pub mod api { ]) } } - pub struct ReportsByKindIndex<'a>(pub &'a [::core::primitive::u8; 16usize]); - impl ::subxt::StorageEntry for ReportsByKindIndex<'_> { + pub struct ReportsByKindIndex(pub [::core::primitive::u8; 16usize]); + impl ::subxt::StorageEntry for ReportsByKindIndex { const PALLET: &'static str = "Offences"; const STORAGE: &'static str = "ReportsByKindIndex"; type Value = ::std::vec::Vec<::core::primitive::u8>; @@ -5393,7 +5013,7 @@ pub mod api { } pub async fn reports( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -5417,14 +5037,14 @@ pub mod api { pub async fn reports_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Reports<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Reports>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn concurrent_reports_index( &self, - _0: &[::core::primitive::u8; 16usize], - _1: &[::core::primitive::u8], + _0: [::core::primitive::u8; 16usize], + _1: ::std::vec::Vec<::core::primitive::u8>, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::subxt::sp_core::H256>, @@ -5437,14 +5057,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ConcurrentReportsIndex<'a>>, + ::subxt::KeyIter<'a, T, ConcurrentReportsIndex>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn reports_by_kind_index( &self, - _0: &[::core::primitive::u8; 16usize], + _0: [::core::primitive::u8; 16usize], hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u8>, @@ -5457,7 +5077,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReportsByKindIndex<'a>>, + ::subxt::KeyIter<'a, T, ReportsByKindIndex>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -5466,28 +5086,25 @@ pub mod api { } } pub mod historical { - use super::root_mod; use super::runtime_types; } pub mod session { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetKeys { + pub struct set_keys { pub keys: runtime_types::darwinia_runtime::pallets::session::SessionKeys, pub proof: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for SetKeys { + impl ::subxt::Call for set_keys { const PALLET: &'static str = "Session"; const FUNCTION: &'static str = "set_keys"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PurgeKeys; - impl ::subxt::Call for PurgeKeys { + pub struct purge_keys; + impl ::subxt::Call for purge_keys { const PALLET: &'static str = "Session"; const FUNCTION: &'static str = "purge_keys"; } @@ -5511,30 +5128,16 @@ pub mod api { &self, keys: runtime_types::darwinia_runtime::pallets::session::SessionKeys, proof: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetKeys, - DispatchError, - root_mod::Event, - > { - let call = SetKeys { keys, proof }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_keys, DispatchError> + { + let call = set_keys { keys, proof }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn purge_keys( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - PurgeKeys, - DispatchError, - root_mod::Event, - > { - let call = PurgeKeys {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, purge_keys, DispatchError> + { + let call = purge_keys {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -5605,8 +5208,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct NextKeys<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for NextKeys<'_> { + pub struct NextKeys(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for NextKeys { const PALLET: &'static str = "Session"; const STORAGE: &'static str = "NextKeys"; type Value = runtime_types::darwinia_runtime::pallets::session::SessionKeys; @@ -5617,17 +5220,17 @@ pub mod api { )]) } } - pub struct KeyOwner<'a>( - pub &'a runtime_types::sp_core::crypto::KeyTypeId, - pub &'a [::core::primitive::u8], + pub struct KeyOwner( + pub runtime_types::sp_core::crypto::KeyTypeId, + pub ::std::vec::Vec<::core::primitive::u8>, ); - impl ::subxt::StorageEntry for KeyOwner<'_> { + impl ::subxt::StorageEntry for KeyOwner { const PALLET: &'static str = "Session"; const STORAGE: &'static str = "KeyOwner"; type Value = ::subxt::sp_core::crypto::AccountId32; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &(&self.0, &self.1), + &self.0, ::subxt::StorageHasher::Twox64Concat, )]) } @@ -5690,7 +5293,7 @@ pub mod api { } pub async fn next_keys( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -5704,16 +5307,14 @@ pub mod api { pub async fn next_keys_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, NextKeys<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, NextKeys>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn key_owner( &self, - _0: &runtime_types::sp_core::crypto::KeyTypeId, - _1: &[::core::primitive::u8], + _0: runtime_types::sp_core::crypto::KeyTypeId, + _1: ::std::vec::Vec<::core::primitive::u8>, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, @@ -5725,24 +5326,20 @@ pub mod api { pub async fn key_owner_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, KeyOwner<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, KeyOwner>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } } } } pub mod grandpa { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReportEquivocation { + pub struct report_equivocation { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< ::subxt::sp_core::H256, @@ -5751,12 +5348,12 @@ pub mod api { >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocation { + impl ::subxt::Call for report_equivocation { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "report_equivocation"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReportEquivocationUnsigned { + pub struct report_equivocation_unsigned { pub equivocation_proof: ::std::boxed::Box< runtime_types::sp_finality_grandpa::EquivocationProof< ::subxt::sp_core::H256, @@ -5765,16 +5362,16 @@ pub mod api { >, pub key_owner_proof: runtime_types::sp_session::MembershipProof, } - impl ::subxt::Call for ReportEquivocationUnsigned { + impl ::subxt::Call for report_equivocation_unsigned { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "report_equivocation_unsigned"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct NoteStalled { + pub struct note_stalled { pub delay: ::core::primitive::u32, pub best_finalized_block_number: ::core::primitive::u32, } - impl ::subxt::Call for NoteStalled { + impl ::subxt::Call for note_stalled { const PALLET: &'static str = "Grandpa"; const FUNCTION: &'static str = "note_stalled"; } @@ -5801,16 +5398,9 @@ pub mod api { ::core::primitive::u32, >, key_owner_proof: runtime_types::sp_session::MembershipProof, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReportEquivocation, - DispatchError, - root_mod::Event, - > { - let call = ReportEquivocation { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, report_equivocation, DispatchError> + { + let call = report_equivocation { equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }; @@ -5828,11 +5418,10 @@ pub mod api { T, X, A, - ReportEquivocationUnsigned, + report_equivocation_unsigned, DispatchError, - root_mod::Event, > { - let call = ReportEquivocationUnsigned { + let call = report_equivocation_unsigned { equivocation_proof: ::std::boxed::Box::new(equivocation_proof), key_owner_proof, }; @@ -5842,16 +5431,9 @@ pub mod api { &self, delay: ::core::primitive::u32, best_finalized_block_number: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - NoteStalled, - DispatchError, - root_mod::Event, - > { - let call = NoteStalled { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, note_stalled, DispatchError> + { + let call = note_stalled { delay, best_finalized_block_number, }; @@ -5934,8 +5516,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct SetIdSession<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for SetIdSession<'_> { + pub struct SetIdSession(pub ::core::primitive::u64); + impl ::subxt::StorageEntry for SetIdSession { const PALLET: &'static str = "Grandpa"; const STORAGE: &'static str = "SetIdSession"; type Value = ::core::primitive::u32; @@ -6005,7 +5587,7 @@ pub mod api { } pub async fn set_id_session( &self, - _0: &::core::primitive::u64, + _0: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, @@ -6018,7 +5600,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SetIdSession<'a>>, + ::subxt::KeyIter<'a, T, SetIdSession>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -6041,18 +5623,16 @@ pub mod api { } } pub mod im_online { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Heartbeat { + pub struct heartbeat { pub heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, pub signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, } - impl ::subxt::Call for Heartbeat { + impl ::subxt::Call for heartbeat { const PALLET: &'static str = "ImOnline"; const FUNCTION: &'static str = "heartbeat"; } @@ -6076,16 +5656,9 @@ pub mod api { &self, heartbeat: runtime_types::pallet_im_online::Heartbeat<::core::primitive::u32>, signature: runtime_types::pallet_im_online::sr25519::app_sr25519::Signature, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Heartbeat, - DispatchError, - root_mod::Event, - > { - let call = Heartbeat { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, heartbeat, DispatchError> + { + let call = heartbeat { heartbeat, signature, }; @@ -6149,11 +5722,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct ReceivedHeartbeats<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::core::primitive::u32, - ); - impl ::subxt::StorageEntry for ReceivedHeartbeats<'_> { + pub struct ReceivedHeartbeats(pub ::core::primitive::u32, pub ::core::primitive::u32); + impl ::subxt::StorageEntry for ReceivedHeartbeats { const PALLET: &'static str = "ImOnline"; const STORAGE: &'static str = "ReceivedHeartbeats"; type Value = runtime_types::frame_support::traits::misc::WrapperOpaque< @@ -6166,11 +5736,11 @@ pub mod api { ]) } } - pub struct AuthoredBlocks<'a>( - pub &'a ::core::primitive::u32, - pub &'a ::subxt::sp_core::crypto::AccountId32, + pub struct AuthoredBlocks( + pub ::core::primitive::u32, + pub ::subxt::sp_core::crypto::AccountId32, ); - impl ::subxt::StorageEntry for AuthoredBlocks<'_> { + impl ::subxt::StorageEntry for AuthoredBlocks { const PALLET: &'static str = "ImOnline"; const STORAGE: &'static str = "AuthoredBlocks"; type Value = ::core::primitive::u32; @@ -6210,8 +5780,8 @@ pub mod api { } pub async fn received_heartbeats( &self, - _0: &::core::primitive::u32, - _1: &::core::primitive::u32, + _0: ::core::primitive::u32, + _1: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -6228,15 +5798,15 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReceivedHeartbeats<'a>>, + ::subxt::KeyIter<'a, T, ReceivedHeartbeats>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn authored_blocks( &self, - _0: &::core::primitive::u32, - _1: &::subxt::sp_core::crypto::AccountId32, + _0: ::core::primitive::u32, + _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { @@ -6247,7 +5817,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, AuthoredBlocks<'a>>, + ::subxt::KeyIter<'a, T, AuthoredBlocks>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -6270,11 +5840,9 @@ pub mod api { } } pub mod authority_discovery { - use super::root_mod; use super::runtime_types; } pub mod darwinia_header_mmr { - use super::root_mod; use super::runtime_types; pub mod storage { use super::runtime_types; @@ -6287,8 +5855,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Peaks<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for Peaks<'_> { + pub struct Peaks(pub ::core::primitive::u64); + impl ::subxt::StorageEntry for Peaks { const PALLET: &'static str = "DarwiniaHeaderMMR"; const STORAGE: &'static str = "Peaks"; type Value = ::subxt::sp_core::H256; @@ -6299,6 +5867,15 @@ pub mod api { )]) } } + pub struct MigrationStep; + impl ::subxt::StorageEntry for MigrationStep { + const PALLET: &'static str = "DarwiniaHeaderMMR"; + const STORAGE: &'static str = "MigrationStep"; + type Value = ::core::primitive::u32; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } pub struct StorageApi<'a, T: ::subxt::Config> { client: &'a ::subxt::Client, } @@ -6316,7 +5893,7 @@ pub mod api { } pub async fn peaks( &self, - _0: &::core::primitive::u64, + _0: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::H256>, @@ -6328,49 +5905,55 @@ pub mod api { pub async fn peaks_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Peaks<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Peaks>, ::subxt::BasicError> { self.client.storage().iter(hash).await } + pub async fn migration_step( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + let entry = MigrationStep; + self.client.storage().fetch_or_default(&entry, hash).await + } } } } pub mod democracy { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Propose { + pub struct propose { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Propose { + impl ::subxt::Call for propose { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "propose"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Second { + pub struct second { #[codec(compact)] pub proposal: ::core::primitive::u32, #[codec(compact)] pub seconds_upper_bound: ::core::primitive::u32, } - impl ::subxt::Call for Second { + impl ::subxt::Call for second { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "second"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Vote { + pub struct vote { #[codec(compact)] pub ref_index: ::core::primitive::u32, pub vote: - runtime_types::darwinia_democracy::vote::AccountVote<::core::primitive::u128>, + runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "vote"; } @@ -6381,61 +5964,61 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct EmergencyCancel { + pub struct emergency_cancel { pub ref_index: ::core::primitive::u32, } - impl ::subxt::Call for EmergencyCancel { + impl ::subxt::Call for emergency_cancel { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "emergency_cancel"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ExternalPropose { + pub struct external_propose { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for ExternalPropose { + impl ::subxt::Call for external_propose { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ExternalProposeMajority { + pub struct external_propose_majority { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for ExternalProposeMajority { + impl ::subxt::Call for external_propose_majority { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose_majority"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ExternalProposeDefault { + pub struct external_propose_default { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for ExternalProposeDefault { + impl ::subxt::Call for external_propose_default { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "external_propose_default"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct FastTrack { + pub struct fast_track { pub proposal_hash: ::subxt::sp_core::H256, pub voting_period: ::core::primitive::u32, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for FastTrack { + impl ::subxt::Call for fast_track { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "fast_track"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct VetoExternal { + pub struct veto_external { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for VetoExternal { + impl ::subxt::Call for veto_external { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "veto_external"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelReferendum { + pub struct cancel_referendum { #[codec(compact)] pub ref_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelReferendum { + impl ::subxt::Call for cancel_referendum { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_referendum"; } @@ -6446,82 +6029,82 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct CancelQueued { + pub struct cancel_queued { pub which: ::core::primitive::u32, } - impl ::subxt::Call for CancelQueued { + impl ::subxt::Call for cancel_queued { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_queued"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Delegate { + pub struct delegate { pub to: ::subxt::sp_core::crypto::AccountId32, - pub conviction: runtime_types::darwinia_democracy::conviction::Conviction, + pub conviction: runtime_types::pallet_democracy::conviction::Conviction, pub balance: ::core::primitive::u128, } - impl ::subxt::Call for Delegate { + impl ::subxt::Call for delegate { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "delegate"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Undelegate; - impl ::subxt::Call for Undelegate { + pub struct undelegate; + impl ::subxt::Call for undelegate { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "undelegate"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ClearPublicProposals; - impl ::subxt::Call for ClearPublicProposals { + pub struct clear_public_proposals; + impl ::subxt::Call for clear_public_proposals { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "clear_public_proposals"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct NotePreimage { + pub struct note_preimage { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NotePreimage { + impl ::subxt::Call for note_preimage { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_preimage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct NotePreimageOperational { + pub struct note_preimage_operational { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NotePreimageOperational { + impl ::subxt::Call for note_preimage_operational { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_preimage_operational"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct NoteImminentPreimage { + pub struct note_imminent_preimage { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NoteImminentPreimage { + impl ::subxt::Call for note_imminent_preimage { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_imminent_preimage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct NoteImminentPreimageOperational { + pub struct note_imminent_preimage_operational { pub encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for NoteImminentPreimageOperational { + impl ::subxt::Call for note_imminent_preimage_operational { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "note_imminent_preimage_operational"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReapPreimage { + pub struct reap_preimage { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] pub proposal_len_upper_bound: ::core::primitive::u32, } - impl ::subxt::Call for ReapPreimage { + impl ::subxt::Call for reap_preimage { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "reap_preimage"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Unlock { + pub struct unlock { pub target: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for Unlock { + impl ::subxt::Call for unlock { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "unlock"; } @@ -6532,46 +6115,46 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct RemoveVote { + pub struct remove_vote { pub index: ::core::primitive::u32, } - impl ::subxt::Call for RemoveVote { + impl ::subxt::Call for remove_vote { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "remove_vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveOtherVote { + pub struct remove_other_vote { pub target: ::subxt::sp_core::crypto::AccountId32, pub index: ::core::primitive::u32, } - impl ::subxt::Call for RemoveOtherVote { + impl ::subxt::Call for remove_other_vote { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "remove_other_vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct EnactProposal { + pub struct enact_proposal { pub proposal_hash: ::subxt::sp_core::H256, pub index: ::core::primitive::u32, } - impl ::subxt::Call for EnactProposal { + impl ::subxt::Call for enact_proposal { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "enact_proposal"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Blacklist { + pub struct blacklist { pub proposal_hash: ::subxt::sp_core::H256, pub maybe_ref_index: ::core::option::Option<::core::primitive::u32>, } - impl ::subxt::Call for Blacklist { + impl ::subxt::Call for blacklist { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "blacklist"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelProposal { + pub struct cancel_proposal { #[codec(compact)] pub prop_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelProposal { + impl ::subxt::Call for cancel_proposal { const PALLET: &'static str = "Democracy"; const FUNCTION: &'static str = "cancel_proposal"; } @@ -6595,16 +6178,9 @@ pub mod api { &self, proposal_hash: ::subxt::sp_core::H256, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Propose, - DispatchError, - root_mod::Event, - > { - let call = Propose { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, propose, DispatchError> + { + let call = propose { proposal_hash, value, }; @@ -6614,16 +6190,9 @@ pub mod api { &self, proposal: ::core::primitive::u32, seconds_upper_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Second, - DispatchError, - root_mod::Event, - > { - let call = Second { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, second, DispatchError> + { + let call = second { proposal, seconds_upper_bound, }; @@ -6632,42 +6201,28 @@ pub mod api { pub fn vote( &self, ref_index: ::core::primitive::u32, - vote: runtime_types::darwinia_democracy::vote::AccountVote< + vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vote, DispatchError> { - let call = Vote { ref_index, vote }; + let call = vote { ref_index, vote }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn emergency_cancel( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - EmergencyCancel, - DispatchError, - root_mod::Event, - > { - let call = EmergencyCancel { ref_index }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, emergency_cancel, DispatchError> + { + let call = emergency_cancel { ref_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ExternalPropose, - DispatchError, - root_mod::Event, - > { - let call = ExternalPropose { proposal_hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, external_propose, DispatchError> + { + let call = external_propose { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose_majority( @@ -6678,11 +6233,10 @@ pub mod api { T, X, A, - ExternalProposeMajority, + external_propose_majority, DispatchError, - root_mod::Event, > { - let call = ExternalProposeMajority { proposal_hash }; + let call = external_propose_majority { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn external_propose_default( @@ -6693,11 +6247,10 @@ pub mod api { T, X, A, - ExternalProposeDefault, + external_propose_default, DispatchError, - root_mod::Event, > { - let call = ExternalProposeDefault { proposal_hash }; + let call = external_propose_default { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn fast_track( @@ -6705,16 +6258,9 @@ pub mod api { proposal_hash: ::subxt::sp_core::H256, voting_period: ::core::primitive::u32, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - FastTrack, - DispatchError, - root_mod::Event, - > { - let call = FastTrack { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, fast_track, DispatchError> + { + let call = fast_track { proposal_hash, voting_period, delay, @@ -6724,63 +6270,35 @@ pub mod api { pub fn veto_external( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - VetoExternal, - DispatchError, - root_mod::Event, - > { - let call = VetoExternal { proposal_hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, veto_external, DispatchError> + { + let call = veto_external { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_referendum( &self, ref_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelReferendum, - DispatchError, - root_mod::Event, - > { - let call = CancelReferendum { ref_index }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_referendum, DispatchError> + { + let call = cancel_referendum { ref_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_queued( &self, which: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelQueued, - DispatchError, - root_mod::Event, - > { - let call = CancelQueued { which }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_queued, DispatchError> + { + let call = cancel_queued { which }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn delegate( &self, to: ::subxt::sp_core::crypto::AccountId32, - conviction: runtime_types::darwinia_democracy::conviction::Conviction, + conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Delegate, - DispatchError, - root_mod::Event, - > { - let call = Delegate { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, delegate, DispatchError> + { + let call = delegate { to, conviction, balance, @@ -6789,45 +6307,24 @@ pub mod api { } pub fn undelegate( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Undelegate, - DispatchError, - root_mod::Event, - > { - let call = Undelegate {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, undelegate, DispatchError> + { + let call = undelegate {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_public_proposals( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ClearPublicProposals, - DispatchError, - root_mod::Event, - > { - let call = ClearPublicProposals {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, clear_public_proposals, DispatchError> + { + let call = clear_public_proposals {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - NotePreimage, - DispatchError, - root_mod::Event, - > { - let call = NotePreimage { encoded_proposal }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, note_preimage, DispatchError> + { + let call = note_preimage { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_preimage_operational( @@ -6838,26 +6335,18 @@ pub mod api { T, X, A, - NotePreimageOperational, + note_preimage_operational, DispatchError, - root_mod::Event, > { - let call = NotePreimageOperational { encoded_proposal }; + let call = note_preimage_operational { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_imminent_preimage( &self, encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - NoteImminentPreimage, - DispatchError, - root_mod::Event, - > { - let call = NoteImminentPreimage { encoded_proposal }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, note_imminent_preimage, DispatchError> + { + let call = note_imminent_preimage { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn note_imminent_preimage_operational( @@ -6868,27 +6357,19 @@ pub mod api { T, X, A, - NoteImminentPreimageOperational, + note_imminent_preimage_operational, DispatchError, - root_mod::Event, > { - let call = NoteImminentPreimageOperational { encoded_proposal }; + let call = note_imminent_preimage_operational { encoded_proposal }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reap_preimage( &self, proposal_hash: ::subxt::sp_core::H256, proposal_len_upper_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReapPreimage, - DispatchError, - root_mod::Event, - > { - let call = ReapPreimage { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, reap_preimage, DispatchError> + { + let call = reap_preimage { proposal_hash, proposal_len_upper_bound, }; @@ -6897,63 +6378,35 @@ pub mod api { pub fn unlock( &self, target: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Unlock, - DispatchError, - root_mod::Event, - > { - let call = Unlock { target }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unlock, DispatchError> + { + let call = unlock { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_vote( &self, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveVote, - DispatchError, - root_mod::Event, - > { - let call = RemoveVote { index }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_vote, DispatchError> + { + let call = remove_vote { index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_other_vote( &self, target: ::subxt::sp_core::crypto::AccountId32, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveOtherVote, - DispatchError, - root_mod::Event, - > { - let call = RemoveOtherVote { target, index }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_other_vote, DispatchError> + { + let call = remove_other_vote { target, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn enact_proposal( &self, proposal_hash: ::subxt::sp_core::H256, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - EnactProposal, - DispatchError, - root_mod::Event, - > { - let call = EnactProposal { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, enact_proposal, DispatchError> + { + let call = enact_proposal { proposal_hash, index, }; @@ -6963,16 +6416,9 @@ pub mod api { &self, proposal_hash: ::subxt::sp_core::H256, maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Blacklist, - DispatchError, - root_mod::Event, - > { - let call = Blacklist { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, blacklist, DispatchError> + { + let call = blacklist { proposal_hash, maybe_ref_index, }; @@ -6981,21 +6427,14 @@ pub mod api { pub fn cancel_proposal( &self, prop_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelProposal, - DispatchError, - root_mod::Event, - > { - let call = CancelProposal { prop_index }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_proposal, DispatchError> + { + let call = cancel_proposal { prop_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } } - pub type Event = runtime_types::darwinia_democracy::pallet::Event; + pub type Event = runtime_types::pallet_democracy::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -7023,7 +6462,7 @@ pub mod api { #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct Started( pub ::core::primitive::u32, - pub runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, + pub runtime_types::pallet_democracy::vote_threshold::VoteThreshold, ); impl ::subxt::Event for Started { const PALLET: &'static str = "Democracy"; @@ -7173,8 +6612,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct DepositOf<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for DepositOf<'_> { + pub struct DepositOf(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for DepositOf { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "DepositOf"; type Value = ( @@ -7188,11 +6627,11 @@ pub mod api { )]) } } - pub struct Preimages<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Preimages<'_> { + pub struct Preimages(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for Preimages { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "Preimages"; - type Value = runtime_types::darwinia_democracy::PreimageStatus< + type Value = runtime_types::pallet_democracy::PreimageStatus< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ::core::primitive::u32, @@ -7222,11 +6661,11 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct ReferendumInfoOf<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ReferendumInfoOf<'_> { + pub struct ReferendumInfoOf(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for ReferendumInfoOf { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "ReferendumInfoOf"; - type Value = runtime_types::darwinia_democracy::types::ReferendumInfo< + type Value = runtime_types::pallet_democracy::types::ReferendumInfo< ::core::primitive::u32, ::subxt::sp_core::H256, ::core::primitive::u128, @@ -7238,11 +6677,11 @@ pub mod api { )]) } } - pub struct VotingOf<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for VotingOf<'_> { + pub struct VotingOf(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for VotingOf { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "VotingOf"; - type Value = runtime_types::darwinia_democracy::vote::Voting< + type Value = runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, @@ -7254,8 +6693,8 @@ pub mod api { )]) } } - pub struct Locks<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Locks<'_> { + pub struct Locks(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Locks { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "Locks"; type Value = ::core::primitive::u32; @@ -7281,14 +6720,14 @@ pub mod api { const STORAGE: &'static str = "NextExternal"; type Value = ( ::subxt::sp_core::H256, - runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, ); fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } } - pub struct Blacklist<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Blacklist<'_> { + pub struct Blacklist(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for Blacklist { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "Blacklist"; type Value = ( @@ -7302,8 +6741,8 @@ pub mod api { )]) } } - pub struct Cancellations<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Cancellations<'_> { + pub struct Cancellations(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for Cancellations { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "Cancellations"; type Value = ::core::primitive::bool; @@ -7318,7 +6757,7 @@ pub mod api { impl ::subxt::StorageEntry for StorageVersion { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::darwinia_democracy::Releases; + type Value = runtime_types::pallet_democracy::Releases; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -7354,7 +6793,7 @@ pub mod api { } pub async fn deposit_of( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<( @@ -7369,19 +6808,17 @@ pub mod api { pub async fn deposit_of_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DepositOf<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, DepositOf>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn preimages( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::darwinia_democracy::PreimageStatus< + runtime_types::pallet_democracy::PreimageStatus< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ::core::primitive::u32, @@ -7395,10 +6832,8 @@ pub mod api { pub async fn preimages_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Preimages<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Preimages>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn referendum_count( @@ -7419,11 +6854,11 @@ pub mod api { } pub async fn referendum_info_of( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::darwinia_democracy::types::ReferendumInfo< + runtime_types::pallet_democracy::types::ReferendumInfo< ::core::primitive::u32, ::subxt::sp_core::H256, ::core::primitive::u128, @@ -7438,17 +6873,17 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ReferendumInfoOf<'a>>, + ::subxt::KeyIter<'a, T, ReferendumInfoOf>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn voting_of( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::darwinia_democracy::vote::Voting< + runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, @@ -7461,15 +6896,13 @@ pub mod api { pub async fn voting_of_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, VotingOf<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, VotingOf>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn locks( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::core::primitive::u32>, @@ -7481,7 +6914,7 @@ pub mod api { pub async fn locks_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Locks<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Locks>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -7499,7 +6932,7 @@ pub mod api { ) -> ::core::result::Result< ::core::option::Option<( ::subxt::sp_core::H256, - runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, )>, ::subxt::BasicError, > { @@ -7508,7 +6941,7 @@ pub mod api { } pub async fn blacklist( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<( @@ -7523,15 +6956,13 @@ pub mod api { pub async fn blacklist_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Blacklist<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Blacklist>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn cancellations( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> { @@ -7542,7 +6973,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Cancellations<'a>>, + ::subxt::KeyIter<'a, T, Cancellations>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -7551,7 +6982,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::core::option::Option, + ::core::option::Option, ::subxt::BasicError, > { let entry = StorageVersion; @@ -7659,57 +7090,55 @@ pub mod api { } } pub mod council { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetMembers { + pub struct set_members { pub new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, pub old_count: ::core::primitive::u32, } - impl ::subxt::Call for SetMembers { + impl ::subxt::Call for set_members { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "set_members"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Execute { + pub struct execute { pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Execute { + impl ::subxt::Call for execute { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "execute"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Propose { + pub struct propose { #[codec(compact)] pub threshold: ::core::primitive::u32, pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Propose { + impl ::subxt::Call for propose { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "propose"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Vote { + pub struct vote { pub proposal: ::subxt::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub approve: ::core::primitive::bool, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Close { + pub struct close { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, @@ -7718,15 +7147,15 @@ pub mod api { #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Close { + impl ::subxt::Call for close { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "close"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct DisapproveProposal { + pub struct disapprove_proposal { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for DisapproveProposal { + impl ::subxt::Call for disapprove_proposal { const PALLET: &'static str = "Council"; const FUNCTION: &'static str = "disapprove_proposal"; } @@ -7751,16 +7180,9 @@ pub mod api { new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetMembers, - DispatchError, - root_mod::Event, - > { - let call = SetMembers { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_members, DispatchError> + { + let call = set_members { new_members, prime, old_count, @@ -7771,16 +7193,9 @@ pub mod api { &self, proposal: runtime_types::darwinia_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Execute, - DispatchError, - root_mod::Event, - > { - let call = Execute { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, execute, DispatchError> + { + let call = execute { proposal: ::std::boxed::Box::new(proposal), length_bound, }; @@ -7791,16 +7206,9 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::darwinia_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Propose, - DispatchError, - root_mod::Event, - > { - let call = Propose { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, propose, DispatchError> + { + let call = propose { threshold, proposal: ::std::boxed::Box::new(proposal), length_bound, @@ -7812,9 +7220,9 @@ pub mod api { proposal: ::subxt::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vote, DispatchError> { - let call = Vote { + let call = vote { proposal, index, approve, @@ -7827,9 +7235,9 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Close, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, close, DispatchError> { - let call = Close { + let call = close { proposal_hash, index, proposal_weight_bound, @@ -7840,16 +7248,9 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - DisapproveProposal, - DispatchError, - root_mod::Event, - > { - let call = DisapproveProposal { proposal_hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, disapprove_proposal, DispatchError> + { + let call = disapprove_proposal { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -7934,8 +7335,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct ProposalOf<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for ProposalOf<'_> { + pub struct ProposalOf(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for ProposalOf { const PALLET: &'static str = "Council"; const STORAGE: &'static str = "ProposalOf"; type Value = runtime_types::darwinia_runtime::Call; @@ -7946,8 +7347,8 @@ pub mod api { )]) } } - pub struct Voting<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Voting<'_> { + pub struct Voting(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for Voting { const PALLET: &'static str = "Council"; const STORAGE: &'static str = "Voting"; type Value = runtime_types::pallet_collective::Votes< @@ -8009,7 +7410,7 @@ pub mod api { } pub async fn proposal_of( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, @@ -8021,15 +7422,13 @@ pub mod api { pub async fn proposal_of_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ProposalOf<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, ProposalOf>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn voting( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -8046,7 +7445,7 @@ pub mod api { pub async fn voting_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -8082,57 +7481,55 @@ pub mod api { } } pub mod technical_committee { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetMembers { + pub struct set_members { pub new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, pub old_count: ::core::primitive::u32, } - impl ::subxt::Call for SetMembers { + impl ::subxt::Call for set_members { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "set_members"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Execute { + pub struct execute { pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Execute { + impl ::subxt::Call for execute { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "execute"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Propose { + pub struct propose { #[codec(compact)] pub threshold: ::core::primitive::u32, pub proposal: ::std::boxed::Box, #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Propose { + impl ::subxt::Call for propose { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "propose"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Vote { + pub struct vote { pub proposal: ::subxt::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, pub approve: ::core::primitive::bool, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Close { + pub struct close { pub proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] pub index: ::core::primitive::u32, @@ -8141,15 +7538,15 @@ pub mod api { #[codec(compact)] pub length_bound: ::core::primitive::u32, } - impl ::subxt::Call for Close { + impl ::subxt::Call for close { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "close"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct DisapproveProposal { + pub struct disapprove_proposal { pub proposal_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for DisapproveProposal { + impl ::subxt::Call for disapprove_proposal { const PALLET: &'static str = "TechnicalCommittee"; const FUNCTION: &'static str = "disapprove_proposal"; } @@ -8174,16 +7571,9 @@ pub mod api { new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, old_count: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetMembers, - DispatchError, - root_mod::Event, - > { - let call = SetMembers { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_members, DispatchError> + { + let call = set_members { new_members, prime, old_count, @@ -8194,16 +7584,9 @@ pub mod api { &self, proposal: runtime_types::darwinia_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Execute, - DispatchError, - root_mod::Event, - > { - let call = Execute { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, execute, DispatchError> + { + let call = execute { proposal: ::std::boxed::Box::new(proposal), length_bound, }; @@ -8214,16 +7597,9 @@ pub mod api { threshold: ::core::primitive::u32, proposal: runtime_types::darwinia_runtime::Call, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Propose, - DispatchError, - root_mod::Event, - > { - let call = Propose { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, propose, DispatchError> + { + let call = propose { threshold, proposal: ::std::boxed::Box::new(proposal), length_bound, @@ -8235,9 +7611,9 @@ pub mod api { proposal: ::subxt::sp_core::H256, index: ::core::primitive::u32, approve: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vote, DispatchError> { - let call = Vote { + let call = vote { proposal, index, approve, @@ -8250,9 +7626,9 @@ pub mod api { index: ::core::primitive::u32, proposal_weight_bound: ::core::primitive::u64, length_bound: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Close, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, close, DispatchError> { - let call = Close { + let call = close { proposal_hash, index, proposal_weight_bound, @@ -8263,16 +7639,9 @@ pub mod api { pub fn disapprove_proposal( &self, proposal_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - DisapproveProposal, - DispatchError, - root_mod::Event, - > { - let call = DisapproveProposal { proposal_hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, disapprove_proposal, DispatchError> + { + let call = disapprove_proposal { proposal_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -8357,8 +7726,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct ProposalOf<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for ProposalOf<'_> { + pub struct ProposalOf(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for ProposalOf { const PALLET: &'static str = "TechnicalCommittee"; const STORAGE: &'static str = "ProposalOf"; type Value = runtime_types::darwinia_runtime::Call; @@ -8369,8 +7738,8 @@ pub mod api { )]) } } - pub struct Voting<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Voting<'_> { + pub struct Voting(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for Voting { const PALLET: &'static str = "TechnicalCommittee"; const STORAGE: &'static str = "Voting"; type Value = runtime_types::pallet_collective::Votes< @@ -8432,7 +7801,7 @@ pub mod api { } pub async fn proposal_of( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, @@ -8444,15 +7813,13 @@ pub mod api { pub async fn proposal_of_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ProposalOf<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, ProposalOf>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn voting( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -8469,7 +7836,7 @@ pub mod api { pub async fn voting_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -8505,61 +7872,59 @@ pub mod api { } } pub mod phragmen_election { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Vote { + pub struct vote { pub votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, #[codec(compact)] pub value: ::core::primitive::u128, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveVoter; - impl ::subxt::Call for RemoveVoter { + pub struct remove_voter; + impl ::subxt::Call for remove_voter { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "remove_voter"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SubmitCandidacy { + pub struct submit_candidacy { #[codec(compact)] pub candidate_count: ::core::primitive::u32, } - impl ::subxt::Call for SubmitCandidacy { + impl ::subxt::Call for submit_candidacy { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "submit_candidacy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RenounceCandidacy { - pub renouncing: runtime_types::darwinia_elections_phragmen::Renouncing, + pub struct renounce_candidacy { + pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, } - impl ::subxt::Call for RenounceCandidacy { + impl ::subxt::Call for renounce_candidacy { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "renounce_candidacy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveMember { + pub struct remove_member { pub who: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub has_replacement: ::core::primitive::bool, } - impl ::subxt::Call for RemoveMember { + impl ::subxt::Call for remove_member { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "remove_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CleanDefunctVoters { + pub struct clean_defunct_voters { pub num_voters: ::core::primitive::u32, pub num_defunct: ::core::primitive::u32, } - impl ::subxt::Call for CleanDefunctVoters { + impl ::subxt::Call for clean_defunct_voters { const PALLET: &'static str = "PhragmenElection"; const FUNCTION: &'static str = "clean_defunct_voters"; } @@ -8583,53 +7948,32 @@ pub mod api { &self, votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vote, DispatchError> { - let call = Vote { votes, value }; + let call = vote { votes, value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_voter( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveVoter, - DispatchError, - root_mod::Event, - > { - let call = RemoveVoter {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_voter, DispatchError> + { + let call = remove_voter {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn submit_candidacy( &self, candidate_count: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SubmitCandidacy, - DispatchError, - root_mod::Event, - > { - let call = SubmitCandidacy { candidate_count }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, submit_candidacy, DispatchError> + { + let call = submit_candidacy { candidate_count }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn renounce_candidacy( &self, - renouncing: runtime_types::darwinia_elections_phragmen::Renouncing, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RenounceCandidacy, - DispatchError, - root_mod::Event, - > { - let call = RenounceCandidacy { renouncing }; + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, renounce_candidacy, DispatchError> + { + let call = renounce_candidacy { renouncing }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_member( @@ -8639,16 +7983,9 @@ pub mod api { (), >, has_replacement: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveMember, - DispatchError, - root_mod::Event, - > { - let call = RemoveMember { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_member, DispatchError> + { + let call = remove_member { who, has_replacement, }; @@ -8658,16 +7995,9 @@ pub mod api { &self, num_voters: ::core::primitive::u32, num_defunct: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CleanDefunctVoters, - DispatchError, - root_mod::Event, - > { - let call = CleanDefunctVoters { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, clean_defunct_voters, DispatchError> + { + let call = clean_defunct_voters { num_voters, num_defunct, }; @@ -8675,7 +8005,7 @@ pub mod api { } } } - pub type Event = runtime_types::darwinia_elections_phragmen::pallet::Event; + pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -8739,7 +8069,7 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const STORAGE: &'static str = "Members"; type Value = ::std::vec::Vec< - runtime_types::darwinia_elections_phragmen::SeatHolder< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8753,7 +8083,7 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const STORAGE: &'static str = "RunnersUp"; type Value = ::std::vec::Vec< - runtime_types::darwinia_elections_phragmen::SeatHolder< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8783,11 +8113,11 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Voting<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Voting<'_> { + pub struct Voting(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Voting { const PALLET: &'static str = "PhragmenElection"; const STORAGE: &'static str = "Voting"; - type Value = runtime_types::darwinia_elections_phragmen::Voter< + type Value = runtime_types::pallet_elections_phragmen::Voter< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >; @@ -8810,7 +8140,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec< - runtime_types::darwinia_elections_phragmen::SeatHolder< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8825,7 +8155,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec< - runtime_types::darwinia_elections_phragmen::SeatHolder< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8858,10 +8188,10 @@ pub mod api { } pub async fn voting( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::darwinia_elections_phragmen::Voter< + runtime_types::pallet_elections_phragmen::Voter< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8873,7 +8203,7 @@ pub mod api { pub async fn voting_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Voting>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -8952,64 +8282,62 @@ pub mod api { } } pub mod technical_membership { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AddMember { + pub struct add_member { pub who: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for AddMember { + impl ::subxt::Call for add_member { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "add_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveMember { + pub struct remove_member { pub who: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for RemoveMember { + impl ::subxt::Call for remove_member { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "remove_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SwapMember { + pub struct swap_member { pub remove: ::subxt::sp_core::crypto::AccountId32, pub add: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SwapMember { + impl ::subxt::Call for swap_member { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "swap_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ResetMembers { + pub struct reset_members { pub members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for ResetMembers { + impl ::subxt::Call for reset_members { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "reset_members"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ChangeKey { + pub struct change_key { pub new: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ChangeKey { + impl ::subxt::Call for change_key { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "change_key"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetPrime { + pub struct set_prime { pub who: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SetPrime { + impl ::subxt::Call for set_prime { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "set_prime"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ClearPrime; - impl ::subxt::Call for ClearPrime { + pub struct clear_prime; + impl ::subxt::Call for clear_prime { const PALLET: &'static str = "TechnicalMembership"; const FUNCTION: &'static str = "clear_prime"; } @@ -9032,106 +8360,57 @@ pub mod api { pub fn add_member( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AddMember, - DispatchError, - root_mod::Event, - > { - let call = AddMember { who }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, add_member, DispatchError> + { + let call = add_member { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_member( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveMember, - DispatchError, - root_mod::Event, - > { - let call = RemoveMember { who }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_member, DispatchError> + { + let call = remove_member { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn swap_member( &self, remove: ::subxt::sp_core::crypto::AccountId32, add: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SwapMember, - DispatchError, - root_mod::Event, - > { - let call = SwapMember { remove, add }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, swap_member, DispatchError> + { + let call = swap_member { remove, add }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reset_members( &self, members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ResetMembers, - DispatchError, - root_mod::Event, - > { - let call = ResetMembers { members }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, reset_members, DispatchError> + { + let call = reset_members { members }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn change_key( &self, new: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ChangeKey, - DispatchError, - root_mod::Event, - > { - let call = ChangeKey { new }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, change_key, DispatchError> + { + let call = change_key { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_prime( &self, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetPrime, - DispatchError, - root_mod::Event, - > { - let call = SetPrime { who }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_prime, DispatchError> + { + let call = set_prime { who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_prime( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ClearPrime, - DispatchError, - root_mod::Event, - > { - let call = ClearPrime {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, clear_prime, DispatchError> + { + let call = clear_prime {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -9227,38 +8506,36 @@ pub mod api { } } pub mod treasury { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ProposeSpend { + pub struct propose_spend { #[codec(compact)] pub value: ::core::primitive::u128, pub beneficiary: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for ProposeSpend { + impl ::subxt::Call for propose_spend { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "propose_spend"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RejectProposal { + pub struct reject_proposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for RejectProposal { + impl ::subxt::Call for reject_proposal { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "reject_proposal"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ApproveProposal { + pub struct approve_proposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for ApproveProposal { + impl ::subxt::Call for approve_proposal { const PALLET: &'static str = "Treasury"; const FUNCTION: &'static str = "approve_proposal"; } @@ -9285,46 +8562,25 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ProposeSpend, - DispatchError, - root_mod::Event, - > { - let call = ProposeSpend { value, beneficiary }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, propose_spend, DispatchError> + { + let call = propose_spend { value, beneficiary }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reject_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RejectProposal, - DispatchError, - root_mod::Event, - > { - let call = RejectProposal { proposal_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, reject_proposal, DispatchError> + { + let call = reject_proposal { proposal_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn approve_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ApproveProposal, - DispatchError, - root_mod::Event, - > { - let call = ApproveProposal { proposal_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, approve_proposal, DispatchError> + { + let call = approve_proposal { proposal_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -9420,8 +8676,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Proposals<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Proposals<'_> { + pub struct Proposals(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for Proposals { const PALLET: &'static str = "Treasury"; const STORAGE: &'static str = "Proposals"; type Value = runtime_types::pallet_treasury::Proposal< @@ -9463,7 +8719,7 @@ pub mod api { } pub async fn proposals( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -9480,10 +8736,8 @@ pub mod api { pub async fn proposals_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Proposals<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Proposals>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn approvals( @@ -9565,38 +8819,36 @@ pub mod api { } } pub mod kton_treasury { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ProposeSpend { + pub struct propose_spend { #[codec(compact)] pub value: ::core::primitive::u128, pub beneficiary: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for ProposeSpend { + impl ::subxt::Call for propose_spend { const PALLET: &'static str = "KtonTreasury"; const FUNCTION: &'static str = "propose_spend"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RejectProposal { + pub struct reject_proposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for RejectProposal { + impl ::subxt::Call for reject_proposal { const PALLET: &'static str = "KtonTreasury"; const FUNCTION: &'static str = "reject_proposal"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ApproveProposal { + pub struct approve_proposal { #[codec(compact)] pub proposal_id: ::core::primitive::u32, } - impl ::subxt::Call for ApproveProposal { + impl ::subxt::Call for approve_proposal { const PALLET: &'static str = "KtonTreasury"; const FUNCTION: &'static str = "approve_proposal"; } @@ -9623,46 +8875,25 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ProposeSpend, - DispatchError, - root_mod::Event, - > { - let call = ProposeSpend { value, beneficiary }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, propose_spend, DispatchError> + { + let call = propose_spend { value, beneficiary }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reject_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RejectProposal, - DispatchError, - root_mod::Event, - > { - let call = RejectProposal { proposal_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, reject_proposal, DispatchError> + { + let call = reject_proposal { proposal_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn approve_proposal( &self, proposal_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ApproveProposal, - DispatchError, - root_mod::Event, - > { - let call = ApproveProposal { proposal_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, approve_proposal, DispatchError> + { + let call = approve_proposal { proposal_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -9758,8 +8989,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Proposals<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Proposals<'_> { + pub struct Proposals(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for Proposals { const PALLET: &'static str = "KtonTreasury"; const STORAGE: &'static str = "Proposals"; type Value = runtime_types::pallet_treasury::Proposal< @@ -9801,7 +9032,7 @@ pub mod api { } pub async fn proposals( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -9818,10 +9049,8 @@ pub mod api { pub async fn proposals_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Proposals<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Proposals>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn approvals( @@ -9903,63 +9132,61 @@ pub mod api { } } pub mod tips { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReportAwesome { + pub struct report_awesome { pub reason: ::std::vec::Vec<::core::primitive::u8>, pub who: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ReportAwesome { + impl ::subxt::Call for report_awesome { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "report_awesome"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RetractTip { + pub struct retract_tip { pub hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for RetractTip { + impl ::subxt::Call for retract_tip { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "retract_tip"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TipNew { + pub struct tip_new { pub reason: ::std::vec::Vec<::core::primitive::u8>, pub who: ::subxt::sp_core::crypto::AccountId32, #[codec(compact)] pub tip_value: ::core::primitive::u128, } - impl ::subxt::Call for TipNew { + impl ::subxt::Call for tip_new { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "tip_new"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Tip { + pub struct tip { pub hash: ::subxt::sp_core::H256, #[codec(compact)] pub tip_value: ::core::primitive::u128, } - impl ::subxt::Call for Tip { + impl ::subxt::Call for tip { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "tip"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CloseTip { + pub struct close_tip { pub hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for CloseTip { + impl ::subxt::Call for close_tip { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "close_tip"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SlashTip { + pub struct slash_tip { pub hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for SlashTip { + impl ::subxt::Call for slash_tip { const PALLET: &'static str = "Tips"; const FUNCTION: &'static str = "slash_tip"; } @@ -9983,31 +9210,17 @@ pub mod api { &self, reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReportAwesome, - DispatchError, - root_mod::Event, - > { - let call = ReportAwesome { reason, who }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, report_awesome, DispatchError> + { + let call = report_awesome { reason, who }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn retract_tip( &self, hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RetractTip, - DispatchError, - root_mod::Event, - > { - let call = RetractTip { hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, retract_tip, DispatchError> + { + let call = retract_tip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn tip_new( @@ -10015,16 +9228,9 @@ pub mod api { reason: ::std::vec::Vec<::core::primitive::u8>, who: ::subxt::sp_core::crypto::AccountId32, tip_value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - TipNew, - DispatchError, - root_mod::Event, - > { - let call = TipNew { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, tip_new, DispatchError> + { + let call = tip_new { reason, who, tip_value, @@ -10035,39 +9241,25 @@ pub mod api { &self, hash: ::subxt::sp_core::H256, tip_value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Tip, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, tip, DispatchError> { - let call = Tip { hash, tip_value }; + let call = tip { hash, tip_value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn close_tip( &self, hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CloseTip, - DispatchError, - root_mod::Event, - > { - let call = CloseTip { hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, close_tip, DispatchError> + { + let call = close_tip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn slash_tip( &self, hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SlashTip, - DispatchError, - root_mod::Event, - > { - let call = SlashTip { hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, slash_tip, DispatchError> + { + let call = slash_tip { hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -10116,8 +9308,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct Tips<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Tips<'_> { + pub struct Tips(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for Tips { const PALLET: &'static str = "Tips"; const STORAGE: &'static str = "Tips"; type Value = runtime_types::pallet_tips::OpenTip< @@ -10133,8 +9325,8 @@ pub mod api { )]) } } - pub struct Reasons<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for Reasons<'_> { + pub struct Reasons(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for Reasons { const PALLET: &'static str = "Tips"; const STORAGE: &'static str = "Reasons"; type Value = ::std::vec::Vec<::core::primitive::u8>; @@ -10154,7 +9346,7 @@ pub mod api { } pub async fn tips( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -10173,13 +9365,13 @@ pub mod api { pub async fn tips_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Tips<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Tips>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn reasons( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, @@ -10191,7 +9383,7 @@ pub mod api { pub async fn reasons_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Reasons<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Reasons>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -10251,33 +9443,31 @@ pub mod api { } } pub mod bounties { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ProposeBounty { + pub struct propose_bounty { #[codec(compact)] pub value: ::core::primitive::u128, pub description: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ProposeBounty { + impl ::subxt::Call for propose_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "propose_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ApproveBounty { + pub struct approve_bounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for ApproveBounty { + impl ::subxt::Call for approve_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "approve_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ProposeCurator { + pub struct propose_curator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, pub curator: @@ -10285,64 +9475,64 @@ pub mod api { #[codec(compact)] pub fee: ::core::primitive::u128, } - impl ::subxt::Call for ProposeCurator { + impl ::subxt::Call for propose_curator { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "propose_curator"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct UnassignCurator { + pub struct unassign_curator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for UnassignCurator { + impl ::subxt::Call for unassign_curator { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "unassign_curator"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AcceptCurator { + pub struct accept_curator { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for AcceptCurator { + impl ::subxt::Call for accept_curator { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "accept_curator"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AwardBounty { + pub struct award_bounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, pub beneficiary: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for AwardBounty { + impl ::subxt::Call for award_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "award_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ClaimBounty { + pub struct claim_bounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for ClaimBounty { + impl ::subxt::Call for claim_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "claim_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CloseBounty { + pub struct close_bounty { #[codec(compact)] pub bounty_id: ::core::primitive::u32, } - impl ::subxt::Call for CloseBounty { + impl ::subxt::Call for close_bounty { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "close_bounty"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ExtendBountyExpiry { + pub struct extend_bounty_expiry { #[codec(compact)] pub bounty_id: ::core::primitive::u32, pub remark: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for ExtendBountyExpiry { + impl ::subxt::Call for extend_bounty_expiry { const PALLET: &'static str = "Bounties"; const FUNCTION: &'static str = "extend_bounty_expiry"; } @@ -10366,31 +9556,17 @@ pub mod api { &self, value: ::core::primitive::u128, description: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ProposeBounty, - DispatchError, - root_mod::Event, - > { - let call = ProposeBounty { value, description }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, propose_bounty, DispatchError> + { + let call = propose_bounty { value, description }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn approve_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ApproveBounty, - DispatchError, - root_mod::Event, - > { - let call = ApproveBounty { bounty_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, approve_bounty, DispatchError> + { + let call = approve_bounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn propose_curator( @@ -10401,16 +9577,9 @@ pub mod api { (), >, fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ProposeCurator, - DispatchError, - root_mod::Event, - > { - let call = ProposeCurator { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, propose_curator, DispatchError> + { + let call = propose_curator { bounty_id, curator, fee, @@ -10420,31 +9589,17 @@ pub mod api { pub fn unassign_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - UnassignCurator, - DispatchError, - root_mod::Event, - > { - let call = UnassignCurator { bounty_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unassign_curator, DispatchError> + { + let call = unassign_curator { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn accept_curator( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AcceptCurator, - DispatchError, - root_mod::Event, - > { - let call = AcceptCurator { bounty_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, accept_curator, DispatchError> + { + let call = accept_curator { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn award_bounty( @@ -10454,16 +9609,9 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AwardBounty, - DispatchError, - root_mod::Event, - > { - let call = AwardBounty { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, award_bounty, DispatchError> + { + let call = award_bounty { bounty_id, beneficiary, }; @@ -10472,47 +9620,26 @@ pub mod api { pub fn claim_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ClaimBounty, - DispatchError, - root_mod::Event, - > { - let call = ClaimBounty { bounty_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, claim_bounty, DispatchError> + { + let call = claim_bounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn close_bounty( &self, bounty_id: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CloseBounty, - DispatchError, - root_mod::Event, - > { - let call = CloseBounty { bounty_id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, close_bounty, DispatchError> + { + let call = close_bounty { bounty_id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn extend_bounty_expiry( &self, bounty_id: ::core::primitive::u32, remark: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ExtendBountyExpiry, - DispatchError, - root_mod::Event, - > { - let call = ExtendBountyExpiry { bounty_id, remark }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, extend_bounty_expiry, DispatchError> + { + let call = extend_bounty_expiry { bounty_id, remark }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -10605,8 +9732,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Bounties<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Bounties<'_> { + pub struct Bounties(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for Bounties { const PALLET: &'static str = "Bounties"; const STORAGE: &'static str = "Bounties"; type Value = runtime_types::pallet_bounties::Bounty< @@ -10621,8 +9748,8 @@ pub mod api { )]) } } - pub struct BountyDescriptions<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for BountyDescriptions<'_> { + pub struct BountyDescriptions(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for BountyDescriptions { const PALLET: &'static str = "Bounties"; const STORAGE: &'static str = "BountyDescriptions"; type Value = ::std::vec::Vec<::core::primitive::u8>; @@ -10659,7 +9786,7 @@ pub mod api { } pub async fn bounties( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -10677,15 +9804,13 @@ pub mod api { pub async fn bounties_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Bounties<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Bounties>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn bounty_descriptions( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::std::vec::Vec<::core::primitive::u8>>, @@ -10698,7 +9823,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, BountyDescriptions<'a>>, + ::subxt::KeyIter<'a, T, BountyDescriptions>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -10790,45 +9915,43 @@ pub mod api { } } pub mod sudo { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Sudo { + pub struct sudo { pub call: ::std::boxed::Box, } - impl ::subxt::Call for Sudo { + impl ::subxt::Call for sudo { const PALLET: &'static str = "Sudo"; const FUNCTION: &'static str = "sudo"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SudoUncheckedWeight { + pub struct sudo_unchecked_weight { pub call: ::std::boxed::Box, pub weight: ::core::primitive::u64, } - impl ::subxt::Call for SudoUncheckedWeight { + impl ::subxt::Call for sudo_unchecked_weight { const PALLET: &'static str = "Sudo"; const FUNCTION: &'static str = "sudo_unchecked_weight"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetKey { + pub struct set_key { pub new: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for SetKey { + impl ::subxt::Call for set_key { const PALLET: &'static str = "Sudo"; const FUNCTION: &'static str = "set_key"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SudoAs { + pub struct sudo_as { pub who: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub call: ::std::boxed::Box, } - impl ::subxt::Call for SudoAs { + impl ::subxt::Call for sudo_as { const PALLET: &'static str = "Sudo"; const FUNCTION: &'static str = "sudo_as"; } @@ -10851,9 +9974,9 @@ pub mod api { pub fn sudo( &self, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Sudo, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, sudo, DispatchError> { - let call = Sudo { + let call = sudo { call: ::std::boxed::Box::new(call), }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -10862,16 +9985,9 @@ pub mod api { &self, call: runtime_types::darwinia_runtime::Call, weight: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SudoUncheckedWeight, - DispatchError, - root_mod::Event, - > { - let call = SudoUncheckedWeight { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, sudo_unchecked_weight, DispatchError> + { + let call = sudo_unchecked_weight { call: ::std::boxed::Box::new(call), weight, }; @@ -10883,16 +9999,9 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetKey, - DispatchError, - root_mod::Event, - > { - let call = SetKey { new }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_key, DispatchError> + { + let call = set_key { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn sudo_as( @@ -10902,16 +10011,9 @@ pub mod api { (), >, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SudoAs, - DispatchError, - root_mod::Event, - > { - let call = SudoAs { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, sudo_as, DispatchError> + { + let call = sudo_as { who, call: ::std::boxed::Box::new(call), }; @@ -10977,61 +10079,59 @@ pub mod api { } } pub mod vesting { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Vest; - impl ::subxt::Call for Vest { + pub struct vest; + impl ::subxt::Call for vest { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "vest"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct VestOther { + pub struct vest_other { pub target: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for VestOther { + impl ::subxt::Call for vest_other { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "vest_other"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct VestedTransfer { + pub struct vested_transfer { pub target: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, - pub schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, } - impl ::subxt::Call for VestedTransfer { + impl ::subxt::Call for vested_transfer { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "vested_transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceVestedTransfer { + pub struct force_vested_transfer { pub source: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub target: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, - pub schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, } - impl ::subxt::Call for ForceVestedTransfer { + impl ::subxt::Call for force_vested_transfer { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "force_vested_transfer"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MergeSchedules { + pub struct merge_schedules { pub schedule1_index: ::core::primitive::u32, pub schedule2_index: ::core::primitive::u32, } - impl ::subxt::Call for MergeSchedules { + impl ::subxt::Call for merge_schedules { const PALLET: &'static str = "Vesting"; const FUNCTION: &'static str = "merge_schedules"; } @@ -11053,9 +10153,9 @@ pub mod api { } pub fn vest( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vest, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vest, DispatchError> { - let call = Vest {}; + let call = vest {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn vest_other( @@ -11064,16 +10164,9 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - VestOther, - DispatchError, - root_mod::Event, - > { - let call = VestOther { target }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vest_other, DispatchError> + { + let call = vest_other { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn vested_transfer( @@ -11082,20 +10175,13 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - VestedTransfer, - DispatchError, - root_mod::Event, - > { - let call = VestedTransfer { target, schedule }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vested_transfer, DispatchError> + { + let call = vested_transfer { target, schedule }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_vested_transfer( @@ -11108,20 +10194,13 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceVestedTransfer, - DispatchError, - root_mod::Event, - > { - let call = ForceVestedTransfer { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_vested_transfer, DispatchError> + { + let call = force_vested_transfer { source, target, schedule, @@ -11132,16 +10211,9 @@ pub mod api { &self, schedule1_index: ::core::primitive::u32, schedule2_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - MergeSchedules, - DispatchError, - root_mod::Event, - > { - let call = MergeSchedules { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, merge_schedules, DispatchError> + { + let call = merge_schedules { schedule1_index, schedule2_index, }; @@ -11149,7 +10221,7 @@ pub mod api { } } } - pub type Event = runtime_types::darwinia_vesting::pallet::Event; + pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -11170,12 +10242,12 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct Vesting<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Vesting<'_> { + pub struct Vesting(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Vesting { const PALLET: &'static str = "Vesting"; const STORAGE: &'static str = "Vesting"; type Value = runtime_types::frame_support::storage::bounded_vec::BoundedVec< - runtime_types::darwinia_vesting::vesting_info::VestingInfo< + runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -11191,7 +10263,7 @@ pub mod api { impl ::subxt::StorageEntry for StorageVersion { const PALLET: &'static str = "Vesting"; const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::darwinia_vesting::Releases; + type Value = runtime_types::pallet_vesting::Releases; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -11205,12 +10277,12 @@ pub mod api { } pub async fn vesting( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< runtime_types::frame_support::storage::bounded_vec::BoundedVec< - runtime_types::darwinia_vesting::vesting_info::VestingInfo< + runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -11224,7 +10296,7 @@ pub mod api { pub async fn vesting_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Vesting<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Vesting>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -11232,7 +10304,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::darwinia_vesting::Releases, + runtime_types::pallet_vesting::Releases, ::subxt::BasicError, > { let entry = StorageVersion; @@ -11267,34 +10339,32 @@ pub mod api { } } pub mod utility { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Batch { + pub struct batch { pub calls: ::std::vec::Vec, } - impl ::subxt::Call for Batch { + impl ::subxt::Call for batch { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "batch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AsDerivative { + pub struct as_derivative { pub index: ::core::primitive::u16, pub call: ::std::boxed::Box, } - impl ::subxt::Call for AsDerivative { + impl ::subxt::Call for as_derivative { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "as_derivative"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct BatchAll { + pub struct batch_all { pub calls: ::std::vec::Vec, } - impl ::subxt::Call for BatchAll { + impl ::subxt::Call for batch_all { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "batch_all"; } @@ -11317,25 +10387,18 @@ pub mod api { pub fn batch( &self, calls: ::std::vec::Vec, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Batch, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, batch, DispatchError> { - let call = Batch { calls }; + let call = batch { calls }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn as_derivative( &self, index: ::core::primitive::u16, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AsDerivative, - DispatchError, - root_mod::Event, - > { - let call = AsDerivative { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, as_derivative, DispatchError> + { + let call = as_derivative { index, call: ::std::boxed::Box::new(call), }; @@ -11344,16 +10407,9 @@ pub mod api { pub fn batch_all( &self, calls: ::std::vec::Vec, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - BatchAll, - DispatchError, - root_mod::Event, - > { - let call = BatchAll { calls }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, batch_all, DispatchError> + { + let call = batch_all { calls }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -11392,60 +10448,58 @@ pub mod api { ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode( - &mut &[42u8, 55u8, 0u8, 0u8][..], + &mut &[25u8, 58u8, 0u8, 0u8][..], )?) } } } } pub mod identity { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AddRegistrar { + pub struct add_registrar { pub account: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for AddRegistrar { + impl ::subxt::Call for add_registrar { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "add_registrar"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetIdentity { + pub struct set_identity { pub info: ::std::boxed::Box, } - impl ::subxt::Call for SetIdentity { + impl ::subxt::Call for set_identity { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_identity"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetSubs { + pub struct set_subs { pub subs: ::std::vec::Vec<( ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, } - impl ::subxt::Call for SetSubs { + impl ::subxt::Call for set_subs { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_subs"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ClearIdentity; - impl ::subxt::Call for ClearIdentity { + pub struct clear_identity; + impl ::subxt::Call for clear_identity { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "clear_identity"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RequestJudgement { + pub struct request_judgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, #[codec(compact)] pub max_fee: ::core::primitive::u128, } - impl ::subxt::Call for RequestJudgement { + impl ::subxt::Call for request_judgement { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "request_judgement"; } @@ -11456,48 +10510,48 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct CancelRequest { + pub struct cancel_request { pub reg_index: ::core::primitive::u32, } - impl ::subxt::Call for CancelRequest { + impl ::subxt::Call for cancel_request { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "cancel_request"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetFee { + pub struct set_fee { #[codec(compact)] pub index: ::core::primitive::u32, #[codec(compact)] pub fee: ::core::primitive::u128, } - impl ::subxt::Call for SetFee { + impl ::subxt::Call for set_fee { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_fee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetAccountId { + pub struct set_account_id { #[codec(compact)] pub index: ::core::primitive::u32, pub new: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SetAccountId { + impl ::subxt::Call for set_account_id { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_account_id"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetFields { + pub struct set_fields { #[codec(compact)] pub index: ::core::primitive::u32, pub fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, } - impl ::subxt::Call for SetFields { + impl ::subxt::Call for set_fields { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "set_fields"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ProvideJudgement { + pub struct provide_judgement { #[codec(compact)] pub reg_index: ::core::primitive::u32, pub target: @@ -11505,51 +10559,51 @@ pub mod api { pub judgement: runtime_types::pallet_identity::types::Judgement<::core::primitive::u128>, } - impl ::subxt::Call for ProvideJudgement { + impl ::subxt::Call for provide_judgement { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "provide_judgement"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct KillIdentity { + pub struct kill_identity { pub target: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for KillIdentity { + impl ::subxt::Call for kill_identity { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "kill_identity"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AddSub { + pub struct add_sub { pub sub: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub data: runtime_types::pallet_identity::types::Data, } - impl ::subxt::Call for AddSub { + impl ::subxt::Call for add_sub { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "add_sub"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RenameSub { + pub struct rename_sub { pub sub: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub data: runtime_types::pallet_identity::types::Data, } - impl ::subxt::Call for RenameSub { + impl ::subxt::Call for rename_sub { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "rename_sub"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveSub { + pub struct remove_sub { pub sub: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for RemoveSub { + impl ::subxt::Call for remove_sub { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "remove_sub"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct QuitSub; - impl ::subxt::Call for QuitSub { + pub struct quit_sub; + impl ::subxt::Call for quit_sub { const PALLET: &'static str = "Identity"; const FUNCTION: &'static str = "quit_sub"; } @@ -11572,31 +10626,17 @@ pub mod api { pub fn add_registrar( &self, account: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AddRegistrar, - DispatchError, - root_mod::Event, - > { - let call = AddRegistrar { account }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, add_registrar, DispatchError> + { + let call = add_registrar { account }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_identity( &self, info: runtime_types::pallet_identity::types::IdentityInfo, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetIdentity, - DispatchError, - root_mod::Event, - > { - let call = SetIdentity { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_identity, DispatchError> + { + let call = set_identity { info: ::std::boxed::Box::new(info), }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -11607,93 +10647,51 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, runtime_types::pallet_identity::types::Data, )>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetSubs, - DispatchError, - root_mod::Event, - > { - let call = SetSubs { subs }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_subs, DispatchError> + { + let call = set_subs { subs }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn clear_identity( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ClearIdentity, - DispatchError, - root_mod::Event, - > { - let call = ClearIdentity {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, clear_identity, DispatchError> + { + let call = clear_identity {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn request_judgement( &self, reg_index: ::core::primitive::u32, max_fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RequestJudgement, - DispatchError, - root_mod::Event, - > { - let call = RequestJudgement { reg_index, max_fee }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, request_judgement, DispatchError> + { + let call = request_judgement { reg_index, max_fee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_request( &self, reg_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelRequest, - DispatchError, - root_mod::Event, - > { - let call = CancelRequest { reg_index }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_request, DispatchError> + { + let call = cancel_request { reg_index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_fee( &self, index: ::core::primitive::u32, fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetFee, - DispatchError, - root_mod::Event, - > { - let call = SetFee { index, fee }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_fee, DispatchError> + { + let call = set_fee { index, fee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_account_id( &self, index: ::core::primitive::u32, new: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetAccountId, - DispatchError, - root_mod::Event, - > { - let call = SetAccountId { index, new }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_account_id, DispatchError> + { + let call = set_account_id { index, new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_fields( @@ -11702,16 +10700,9 @@ pub mod api { fields: runtime_types::pallet_identity::types::BitFlags< runtime_types::pallet_identity::types::IdentityField, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetFields, - DispatchError, - root_mod::Event, - > { - let call = SetFields { index, fields }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_fields, DispatchError> + { + let call = set_fields { index, fields }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn provide_judgement( @@ -11724,16 +10715,9 @@ pub mod api { judgement: runtime_types::pallet_identity::types::Judgement< ::core::primitive::u128, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ProvideJudgement, - DispatchError, - root_mod::Event, - > { - let call = ProvideJudgement { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, provide_judgement, DispatchError> + { + let call = provide_judgement { reg_index, target, judgement, @@ -11746,16 +10730,9 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - KillIdentity, - DispatchError, - root_mod::Event, - > { - let call = KillIdentity { target }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, kill_identity, DispatchError> + { + let call = kill_identity { target }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn add_sub( @@ -11765,16 +10742,9 @@ pub mod api { (), >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AddSub, - DispatchError, - root_mod::Event, - > { - let call = AddSub { sub, data }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, add_sub, DispatchError> + { + let call = add_sub { sub, data }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn rename_sub( @@ -11784,16 +10754,9 @@ pub mod api { (), >, data: runtime_types::pallet_identity::types::Data, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RenameSub, - DispatchError, - root_mod::Event, - > { - let call = RenameSub { sub, data }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, rename_sub, DispatchError> + { + let call = rename_sub { sub, data }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_sub( @@ -11802,30 +10765,16 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveSub, - DispatchError, - root_mod::Event, - > { - let call = RemoveSub { sub }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_sub, DispatchError> + { + let call = remove_sub { sub }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn quit_sub( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - QuitSub, - DispatchError, - root_mod::Event, - > { - let call = QuitSub {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, quit_sub, DispatchError> + { + let call = quit_sub {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -11929,8 +10878,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct IdentityOf<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for IdentityOf<'_> { + pub struct IdentityOf(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for IdentityOf { const PALLET: &'static str = "Identity"; const STORAGE: &'static str = "IdentityOf"; type Value = @@ -11942,8 +10891,8 @@ pub mod api { )]) } } - pub struct SuperOf<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for SuperOf<'_> { + pub struct SuperOf(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for SuperOf { const PALLET: &'static str = "Identity"; const STORAGE: &'static str = "SuperOf"; type Value = ( @@ -11957,8 +10906,8 @@ pub mod api { )]) } } - pub struct SubsOf<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for SubsOf<'_> { + pub struct SubsOf(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for SubsOf { const PALLET: &'static str = "Identity"; const STORAGE: &'static str = "SubsOf"; type Value = ( @@ -11999,7 +10948,7 @@ pub mod api { } pub async fn identity_of( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -12015,15 +10964,13 @@ pub mod api { pub async fn identity_of_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, IdentityOf<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, IdentityOf>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn super_of( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<( @@ -12038,13 +10985,13 @@ pub mod api { pub async fn super_of_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, SuperOf<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, SuperOf>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn subs_of( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ( @@ -12061,7 +11008,7 @@ pub mod api { pub async fn subs_of_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, SubsOf<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, SubsOf>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -12149,10 +11096,8 @@ pub mod api { } } pub mod society { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( @@ -12162,10 +11107,10 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct Bid { + pub struct bid { pub value: ::core::primitive::u128, } - impl ::subxt::Call for Bid { + impl ::subxt::Call for bid { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "bid"; } @@ -12176,20 +11121,20 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct Unbid { + pub struct unbid { pub pos: ::core::primitive::u32, } - impl ::subxt::Call for Unbid { + impl ::subxt::Call for unbid { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "unbid"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Vouch { + pub struct vouch { pub who: ::subxt::sp_core::crypto::AccountId32, pub value: ::core::primitive::u128, pub tip: ::core::primitive::u128, } - impl ::subxt::Call for Vouch { + impl ::subxt::Call for vouch { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "vouch"; } @@ -12200,68 +11145,68 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct Unvouch { + pub struct unvouch { pub pos: ::core::primitive::u32, } - impl ::subxt::Call for Unvouch { + impl ::subxt::Call for unvouch { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "unvouch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Vote { + pub struct vote { pub candidate: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub approve: ::core::primitive::bool, } - impl ::subxt::Call for Vote { + impl ::subxt::Call for vote { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct DefenderVote { + pub struct defender_vote { pub approve: ::core::primitive::bool, } - impl ::subxt::Call for DefenderVote { + impl ::subxt::Call for defender_vote { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "defender_vote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Payout; - impl ::subxt::Call for Payout { + pub struct payout; + impl ::subxt::Call for payout { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "payout"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Found { + pub struct found { pub founder: ::subxt::sp_core::crypto::AccountId32, pub max_members: ::core::primitive::u32, pub rules: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for Found { + impl ::subxt::Call for found { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "found"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Unfound; - impl ::subxt::Call for Unfound { + pub struct unfound; + impl ::subxt::Call for unfound { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "unfound"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct JudgeSuspendedMember { + pub struct judge_suspended_member { pub who: ::subxt::sp_core::crypto::AccountId32, pub forgive: ::core::primitive::bool, } - impl ::subxt::Call for JudgeSuspendedMember { + impl ::subxt::Call for judge_suspended_member { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "judge_suspended_member"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct JudgeSuspendedCandidate { + pub struct judge_suspended_candidate { pub who: ::subxt::sp_core::crypto::AccountId32, pub judgement: runtime_types::pallet_society::Judgement, } - impl ::subxt::Call for JudgeSuspendedCandidate { + impl ::subxt::Call for judge_suspended_candidate { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "judge_suspended_candidate"; } @@ -12272,10 +11217,10 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct SetMaxMembers { + pub struct set_max_members { pub max: ::core::primitive::u32, } - impl ::subxt::Call for SetMaxMembers { + impl ::subxt::Call for set_max_members { const PALLET: &'static str = "Society"; const FUNCTION: &'static str = "set_max_members"; } @@ -12298,17 +11243,17 @@ pub mod api { pub fn bid( &self, value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Bid, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, bid, DispatchError> { - let call = Bid { value }; + let call = bid { value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn unbid( &self, pos: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Unbid, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unbid, DispatchError> { - let call = Unbid { pos }; + let call = unbid { pos }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn vouch( @@ -12316,24 +11261,17 @@ pub mod api { who: ::subxt::sp_core::crypto::AccountId32, value: ::core::primitive::u128, tip: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vouch, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vouch, DispatchError> { - let call = Vouch { who, value, tip }; + let call = vouch { who, value, tip }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn unvouch( &self, pos: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Unvouch, - DispatchError, - root_mod::Event, - > { - let call = Unvouch { pos }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unvouch, DispatchError> + { + let call = unvouch { pos }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn vote( @@ -12343,38 +11281,24 @@ pub mod api { (), >, approve: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Vote, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vote, DispatchError> { - let call = Vote { candidate, approve }; + let call = vote { candidate, approve }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn defender_vote( &self, approve: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - DefenderVote, - DispatchError, - root_mod::Event, - > { - let call = DefenderVote { approve }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, defender_vote, DispatchError> + { + let call = defender_vote { approve }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn payout( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Payout, - DispatchError, - root_mod::Event, - > { - let call = Payout {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, payout, DispatchError> + { + let call = payout {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn found( @@ -12382,9 +11306,9 @@ pub mod api { founder: ::subxt::sp_core::crypto::AccountId32, max_members: ::core::primitive::u32, rules: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Found, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, found, DispatchError> { - let call = Found { + let call = found { founder, max_members, rules, @@ -12393,32 +11317,18 @@ pub mod api { } pub fn unfound( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Unfound, - DispatchError, - root_mod::Event, - > { - let call = Unfound {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unfound, DispatchError> + { + let call = unfound {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn judge_suspended_member( &self, who: ::subxt::sp_core::crypto::AccountId32, forgive: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - JudgeSuspendedMember, - DispatchError, - root_mod::Event, - > { - let call = JudgeSuspendedMember { who, forgive }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, judge_suspended_member, DispatchError> + { + let call = judge_suspended_member { who, forgive }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn judge_suspended_candidate( @@ -12430,26 +11340,18 @@ pub mod api { T, X, A, - JudgeSuspendedCandidate, + judge_suspended_candidate, DispatchError, - root_mod::Event, > { - let call = JudgeSuspendedCandidate { who, judgement }; + let call = judge_suspended_candidate { who, judgement }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_max_members( &self, max: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetMaxMembers, - DispatchError, - root_mod::Event, - > { - let call = SetMaxMembers { max }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_max_members, DispatchError> + { + let call = set_max_members { max }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -12620,8 +11522,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct SuspendedCandidates<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for SuspendedCandidates<'_> { + pub struct SuspendedCandidates(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for SuspendedCandidates { const PALLET: &'static str = "Society"; const STORAGE: &'static str = "SuspendedCandidates"; type Value = ( @@ -12665,8 +11567,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct SuspendedMembers<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for SuspendedMembers<'_> { + pub struct SuspendedMembers(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for SuspendedMembers { const PALLET: &'static str = "Society"; const STORAGE: &'static str = "SuspendedMembers"; type Value = ::core::primitive::bool; @@ -12691,8 +11593,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Vouching<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Vouching<'_> { + pub struct Vouching(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Vouching { const PALLET: &'static str = "Society"; const STORAGE: &'static str = "Vouching"; type Value = runtime_types::pallet_society::VouchingStatus; @@ -12703,8 +11605,8 @@ pub mod api { )]) } } - pub struct Payouts<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Payouts<'_> { + pub struct Payouts(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Payouts { const PALLET: &'static str = "Society"; const STORAGE: &'static str = "Payouts"; type Value = ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u128)>; @@ -12715,8 +11617,8 @@ pub mod api { )]) } } - pub struct Strikes<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Strikes<'_> { + pub struct Strikes(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Strikes { const PALLET: &'static str = "Society"; const STORAGE: &'static str = "Strikes"; type Value = ::core::primitive::u32; @@ -12727,11 +11629,11 @@ pub mod api { )]) } } - pub struct Votes<'a>( - pub &'a ::subxt::sp_core::crypto::AccountId32, - pub &'a ::subxt::sp_core::crypto::AccountId32, + pub struct Votes( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, ); - impl ::subxt::StorageEntry for Votes<'_> { + impl ::subxt::StorageEntry for Votes { const PALLET: &'static str = "Society"; const STORAGE: &'static str = "Votes"; type Value = runtime_types::pallet_society::Vote; @@ -12751,8 +11653,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct DefenderVotes<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for DefenderVotes<'_> { + pub struct DefenderVotes(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for DefenderVotes { const PALLET: &'static str = "Society"; const STORAGE: &'static str = "DefenderVotes"; type Value = runtime_types::pallet_society::Vote; @@ -12816,7 +11718,7 @@ pub mod api { } pub async fn suspended_candidates( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<( @@ -12835,7 +11737,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SuspendedCandidates<'a>>, + ::subxt::KeyIter<'a, T, SuspendedCandidates>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -12870,7 +11772,7 @@ pub mod api { } pub async fn suspended_members( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> { @@ -12881,7 +11783,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, SuspendedMembers<'a>>, + ::subxt::KeyIter<'a, T, SuspendedMembers>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -12903,7 +11805,7 @@ pub mod api { } pub async fn vouching( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, @@ -12915,15 +11817,13 @@ pub mod api { pub async fn vouching_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Vouching<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Vouching>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn payouts( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::u128)>, @@ -12935,13 +11835,13 @@ pub mod api { pub async fn payouts_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Payouts<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Payouts>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn strikes( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { @@ -12951,14 +11851,14 @@ pub mod api { pub async fn strikes_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Strikes<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Strikes>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn votes( &self, - _0: &::subxt::sp_core::crypto::AccountId32, - _1: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, + _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, @@ -12970,7 +11870,7 @@ pub mod api { pub async fn votes_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Votes<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Votes>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -12986,7 +11886,7 @@ pub mod api { } pub async fn defender_votes( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option, @@ -12999,7 +11899,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DefenderVotes<'a>>, + ::subxt::KeyIter<'a, T, DefenderVotes>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -13105,84 +12005,82 @@ pub mod api { } } pub mod recovery { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AsRecovered { + pub struct as_recovered { pub account: ::subxt::sp_core::crypto::AccountId32, pub call: ::std::boxed::Box, } - impl ::subxt::Call for AsRecovered { + impl ::subxt::Call for as_recovered { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "as_recovered"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetRecovered { + pub struct set_recovered { pub lost: ::subxt::sp_core::crypto::AccountId32, pub rescuer: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SetRecovered { + impl ::subxt::Call for set_recovered { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "set_recovered"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CreateRecovery { + pub struct create_recovery { pub friends: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub threshold: ::core::primitive::u16, pub delay_period: ::core::primitive::u32, } - impl ::subxt::Call for CreateRecovery { + impl ::subxt::Call for create_recovery { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "create_recovery"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct InitiateRecovery { + pub struct initiate_recovery { pub account: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for InitiateRecovery { + impl ::subxt::Call for initiate_recovery { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "initiate_recovery"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct VouchRecovery { + pub struct vouch_recovery { pub lost: ::subxt::sp_core::crypto::AccountId32, pub rescuer: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for VouchRecovery { + impl ::subxt::Call for vouch_recovery { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "vouch_recovery"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ClaimRecovery { + pub struct claim_recovery { pub account: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for ClaimRecovery { + impl ::subxt::Call for claim_recovery { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "claim_recovery"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CloseRecovery { + pub struct close_recovery { pub rescuer: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for CloseRecovery { + impl ::subxt::Call for close_recovery { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "close_recovery"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveRecovery; - impl ::subxt::Call for RemoveRecovery { + pub struct remove_recovery; + impl ::subxt::Call for remove_recovery { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "remove_recovery"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelRecovered { + pub struct cancel_recovered { pub account: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for CancelRecovered { + impl ::subxt::Call for cancel_recovered { const PALLET: &'static str = "Recovery"; const FUNCTION: &'static str = "cancel_recovered"; } @@ -13206,16 +12104,9 @@ pub mod api { &self, account: ::subxt::sp_core::crypto::AccountId32, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AsRecovered, - DispatchError, - root_mod::Event, - > { - let call = AsRecovered { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, as_recovered, DispatchError> + { + let call = as_recovered { account, call: ::std::boxed::Box::new(call), }; @@ -13225,16 +12116,9 @@ pub mod api { &self, lost: ::subxt::sp_core::crypto::AccountId32, rescuer: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetRecovered, - DispatchError, - root_mod::Event, - > { - let call = SetRecovered { lost, rescuer }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_recovered, DispatchError> + { + let call = set_recovered { lost, rescuer }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn create_recovery( @@ -13242,16 +12126,9 @@ pub mod api { friends: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, threshold: ::core::primitive::u16, delay_period: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CreateRecovery, - DispatchError, - root_mod::Event, - > { - let call = CreateRecovery { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, create_recovery, DispatchError> + { + let call = create_recovery { friends, threshold, delay_period, @@ -13261,91 +12138,49 @@ pub mod api { pub fn initiate_recovery( &self, account: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - InitiateRecovery, - DispatchError, - root_mod::Event, - > { - let call = InitiateRecovery { account }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, initiate_recovery, DispatchError> + { + let call = initiate_recovery { account }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn vouch_recovery( &self, lost: ::subxt::sp_core::crypto::AccountId32, rescuer: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - VouchRecovery, - DispatchError, - root_mod::Event, - > { - let call = VouchRecovery { lost, rescuer }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vouch_recovery, DispatchError> + { + let call = vouch_recovery { lost, rescuer }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn claim_recovery( &self, account: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ClaimRecovery, - DispatchError, - root_mod::Event, - > { - let call = ClaimRecovery { account }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, claim_recovery, DispatchError> + { + let call = claim_recovery { account }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn close_recovery( &self, rescuer: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CloseRecovery, - DispatchError, - root_mod::Event, - > { - let call = CloseRecovery { rescuer }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, close_recovery, DispatchError> + { + let call = close_recovery { rescuer }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_recovery( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveRecovery, - DispatchError, - root_mod::Event, - > { - let call = RemoveRecovery {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_recovery, DispatchError> + { + let call = remove_recovery {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_recovered( &self, account: ::subxt::sp_core::crypto::AccountId32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelRecovered, - DispatchError, - root_mod::Event, - > { - let call = CancelRecovered { account }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_recovered, DispatchError> + { + let call = cancel_recovered { account }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -13405,8 +12240,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct Recoverable<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Recoverable<'_> { + pub struct Recoverable(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Recoverable { const PALLET: &'static str = "Recovery"; const STORAGE: &'static str = "Recoverable"; type Value = runtime_types::pallet_recovery::RecoveryConfig< @@ -13421,11 +12256,11 @@ pub mod api { )]) } } - pub struct ActiveRecoveries<'a>( - pub &'a ::subxt::sp_core::crypto::AccountId32, - pub &'a ::subxt::sp_core::crypto::AccountId32, + pub struct ActiveRecoveries( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, ); - impl ::subxt::StorageEntry for ActiveRecoveries<'_> { + impl ::subxt::StorageEntry for ActiveRecoveries { const PALLET: &'static str = "Recovery"; const STORAGE: &'static str = "ActiveRecoveries"; type Value = runtime_types::pallet_recovery::ActiveRecovery< @@ -13440,8 +12275,8 @@ pub mod api { ]) } } - pub struct Proxy<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Proxy<'_> { + pub struct Proxy(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Proxy { const PALLET: &'static str = "Recovery"; const STORAGE: &'static str = "Proxy"; type Value = ::subxt::sp_core::crypto::AccountId32; @@ -13461,7 +12296,7 @@ pub mod api { } pub async fn recoverable( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -13479,16 +12314,14 @@ pub mod api { pub async fn recoverable_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Recoverable<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Recoverable>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn active_recoveries( &self, - _0: &::subxt::sp_core::crypto::AccountId32, - _1: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, + _1: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -13507,14 +12340,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ActiveRecoveries<'a>>, + ::subxt::KeyIter<'a, T, ActiveRecoveries>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn proxy( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, @@ -13526,7 +12359,7 @@ pub mod api { pub async fn proxy_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Proxy<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Proxy>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -13579,35 +12412,33 @@ pub mod api { } } pub mod scheduler { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Schedule { + pub struct schedule { pub when: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, pub priority: ::core::primitive::u8, pub call: ::std::boxed::Box, } - impl ::subxt::Call for Schedule { + impl ::subxt::Call for schedule { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Cancel { + pub struct cancel { pub when: ::core::primitive::u32, pub index: ::core::primitive::u32, } - impl ::subxt::Call for Cancel { + impl ::subxt::Call for cancel { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "cancel"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ScheduleNamed { + pub struct schedule_named { pub id: ::std::vec::Vec<::core::primitive::u8>, pub when: ::core::primitive::u32, pub maybe_periodic: @@ -13615,32 +12446,32 @@ pub mod api { pub priority: ::core::primitive::u8, pub call: ::std::boxed::Box, } - impl ::subxt::Call for ScheduleNamed { + impl ::subxt::Call for schedule_named { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule_named"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelNamed { + pub struct cancel_named { pub id: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for CancelNamed { + impl ::subxt::Call for cancel_named { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "cancel_named"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ScheduleAfter { + pub struct schedule_after { pub after: ::core::primitive::u32, pub maybe_periodic: ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, pub priority: ::core::primitive::u8, pub call: ::std::boxed::Box, } - impl ::subxt::Call for ScheduleAfter { + impl ::subxt::Call for schedule_after { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule_after"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ScheduleNamedAfter { + pub struct schedule_named_after { pub id: ::std::vec::Vec<::core::primitive::u8>, pub after: ::core::primitive::u32, pub maybe_periodic: @@ -13648,7 +12479,7 @@ pub mod api { pub priority: ::core::primitive::u8, pub call: ::std::boxed::Box, } - impl ::subxt::Call for ScheduleNamedAfter { + impl ::subxt::Call for schedule_named_after { const PALLET: &'static str = "Scheduler"; const FUNCTION: &'static str = "schedule_named_after"; } @@ -13677,16 +12508,9 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Schedule, - DispatchError, - root_mod::Event, - > { - let call = Schedule { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, schedule, DispatchError> + { + let call = schedule { when, maybe_periodic, priority, @@ -13698,16 +12522,9 @@ pub mod api { &self, when: ::core::primitive::u32, index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Cancel, - DispatchError, - root_mod::Event, - > { - let call = Cancel { when, index }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel, DispatchError> + { + let call = cancel { when, index }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn schedule_named( @@ -13720,16 +12537,9 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ScheduleNamed, - DispatchError, - root_mod::Event, - > { - let call = ScheduleNamed { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, schedule_named, DispatchError> + { + let call = schedule_named { id, when, maybe_periodic, @@ -13741,16 +12551,9 @@ pub mod api { pub fn cancel_named( &self, id: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelNamed, - DispatchError, - root_mod::Event, - > { - let call = CancelNamed { id }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_named, DispatchError> + { + let call = cancel_named { id }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn schedule_after( @@ -13762,16 +12565,9 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ScheduleAfter, - DispatchError, - root_mod::Event, - > { - let call = ScheduleAfter { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, schedule_after, DispatchError> + { + let call = schedule_after { after, maybe_periodic, priority, @@ -13789,16 +12585,9 @@ pub mod api { )>, priority: ::core::primitive::u8, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ScheduleNamedAfter, - DispatchError, - root_mod::Event, - > { - let call = ScheduleNamedAfter { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, schedule_named_after, DispatchError> + { + let call = schedule_named_after { id, after, maybe_periodic, @@ -13837,8 +12626,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct Agenda<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for Agenda<'_> { + pub struct Agenda(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for Agenda { const PALLET: &'static str = "Scheduler"; const STORAGE: &'static str = "Agenda"; type Value = ::std::vec::Vec< @@ -13858,8 +12647,8 @@ pub mod api { )]) } } - pub struct Lookup<'a>(pub &'a [::core::primitive::u8]); - impl ::subxt::StorageEntry for Lookup<'_> { + pub struct Lookup(pub ::std::vec::Vec<::core::primitive::u8>); + impl ::subxt::StorageEntry for Lookup { const PALLET: &'static str = "Scheduler"; const STORAGE: &'static str = "Lookup"; type Value = (::core::primitive::u32, ::core::primitive::u32); @@ -13888,7 +12677,7 @@ pub mod api { } pub async fn agenda( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec< @@ -13909,13 +12698,13 @@ pub mod api { pub async fn agenda_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Agenda<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Agenda>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn lookup( &self, - _0: &[::core::primitive::u8], + _0: ::std::vec::Vec<::core::primitive::u8>, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, @@ -13927,7 +12716,7 @@ pub mod api { pub async fn lookup_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Lookup<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Lookup>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -13967,62 +12756,60 @@ pub mod api { } } pub mod proxy { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Proxy { + pub struct proxy { pub real: ::subxt::sp_core::crypto::AccountId32, pub force_proxy_type: ::core::option::Option< runtime_types::darwinia_runtime::pallets::proxy::ProxyType, >, pub call: ::std::boxed::Box, } - impl ::subxt::Call for Proxy { + impl ::subxt::Call for proxy { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "proxy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AddProxy { + pub struct add_proxy { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::darwinia_runtime::pallets::proxy::ProxyType, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for AddProxy { + impl ::subxt::Call for add_proxy { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "add_proxy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveProxy { + pub struct remove_proxy { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::darwinia_runtime::pallets::proxy::ProxyType, pub delay: ::core::primitive::u32, } - impl ::subxt::Call for RemoveProxy { + impl ::subxt::Call for remove_proxy { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_proxy"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveProxies; - impl ::subxt::Call for RemoveProxies { + pub struct remove_proxies; + impl ::subxt::Call for remove_proxies { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_proxies"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Anonymous { + pub struct anonymous { pub proxy_type: runtime_types::darwinia_runtime::pallets::proxy::ProxyType, pub delay: ::core::primitive::u32, pub index: ::core::primitive::u16, } - impl ::subxt::Call for Anonymous { + impl ::subxt::Call for anonymous { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "anonymous"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct KillAnonymous { + pub struct kill_anonymous { pub spawner: ::subxt::sp_core::crypto::AccountId32, pub proxy_type: runtime_types::darwinia_runtime::pallets::proxy::ProxyType, pub index: ::core::primitive::u16, @@ -14031,39 +12818,39 @@ pub mod api { #[codec(compact)] pub ext_index: ::core::primitive::u32, } - impl ::subxt::Call for KillAnonymous { + impl ::subxt::Call for kill_anonymous { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "kill_anonymous"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Announce { + pub struct announce { pub real: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for Announce { + impl ::subxt::Call for announce { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "announce"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveAnnouncement { + pub struct remove_announcement { pub real: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for RemoveAnnouncement { + impl ::subxt::Call for remove_announcement { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "remove_announcement"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RejectAnnouncement { + pub struct reject_announcement { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub call_hash: ::subxt::sp_core::H256, } - impl ::subxt::Call for RejectAnnouncement { + impl ::subxt::Call for reject_announcement { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "reject_announcement"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ProxyAnnounced { + pub struct proxy_announced { pub delegate: ::subxt::sp_core::crypto::AccountId32, pub real: ::subxt::sp_core::crypto::AccountId32, pub force_proxy_type: ::core::option::Option< @@ -14071,7 +12858,7 @@ pub mod api { >, pub call: ::std::boxed::Box, } - impl ::subxt::Call for ProxyAnnounced { + impl ::subxt::Call for proxy_announced { const PALLET: &'static str = "Proxy"; const FUNCTION: &'static str = "proxy_announced"; } @@ -14098,9 +12885,9 @@ pub mod api { runtime_types::darwinia_runtime::pallets::proxy::ProxyType, >, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Proxy, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, proxy, DispatchError> { - let call = Proxy { + let call = proxy { real, force_proxy_type, call: ::std::boxed::Box::new(call), @@ -14112,16 +12899,9 @@ pub mod api { delegate: ::subxt::sp_core::crypto::AccountId32, proxy_type: runtime_types::darwinia_runtime::pallets::proxy::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AddProxy, - DispatchError, - root_mod::Event, - > { - let call = AddProxy { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, add_proxy, DispatchError> + { + let call = add_proxy { delegate, proxy_type, delay, @@ -14133,16 +12913,9 @@ pub mod api { delegate: ::subxt::sp_core::crypto::AccountId32, proxy_type: runtime_types::darwinia_runtime::pallets::proxy::ProxyType, delay: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveProxy, - DispatchError, - root_mod::Event, - > { - let call = RemoveProxy { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_proxy, DispatchError> + { + let call = remove_proxy { delegate, proxy_type, delay, @@ -14151,16 +12924,9 @@ pub mod api { } pub fn remove_proxies( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveProxies, - DispatchError, - root_mod::Event, - > { - let call = RemoveProxies {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_proxies, DispatchError> + { + let call = remove_proxies {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn anonymous( @@ -14168,16 +12934,9 @@ pub mod api { proxy_type: runtime_types::darwinia_runtime::pallets::proxy::ProxyType, delay: ::core::primitive::u32, index: ::core::primitive::u16, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Anonymous, - DispatchError, - root_mod::Event, - > { - let call = Anonymous { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, anonymous, DispatchError> + { + let call = anonymous { proxy_type, delay, index, @@ -14191,16 +12950,9 @@ pub mod api { index: ::core::primitive::u16, height: ::core::primitive::u32, ext_index: ::core::primitive::u32, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - KillAnonymous, - DispatchError, - root_mod::Event, - > { - let call = KillAnonymous { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, kill_anonymous, DispatchError> + { + let call = kill_anonymous { spawner, proxy_type, index, @@ -14213,48 +12965,27 @@ pub mod api { &self, real: ::subxt::sp_core::crypto::AccountId32, call_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Announce, - DispatchError, - root_mod::Event, - > { - let call = Announce { real, call_hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, announce, DispatchError> + { + let call = announce { real, call_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_announcement( &self, real: ::subxt::sp_core::crypto::AccountId32, call_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveAnnouncement, - DispatchError, - root_mod::Event, - > { - let call = RemoveAnnouncement { real, call_hash }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_announcement, DispatchError> + { + let call = remove_announcement { real, call_hash }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn reject_announcement( &self, delegate: ::subxt::sp_core::crypto::AccountId32, call_hash: ::subxt::sp_core::H256, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RejectAnnouncement, - DispatchError, - root_mod::Event, - > { - let call = RejectAnnouncement { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, reject_announcement, DispatchError> + { + let call = reject_announcement { delegate, call_hash, }; @@ -14268,16 +12999,9 @@ pub mod api { runtime_types::darwinia_runtime::pallets::proxy::ProxyType, >, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ProxyAnnounced, - DispatchError, - root_mod::Event, - > { - let call = ProxyAnnounced { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, proxy_announced, DispatchError> + { + let call = proxy_announced { delegate, real, force_proxy_type, @@ -14333,8 +13057,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct Proxies<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Proxies<'_> { + pub struct Proxies(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Proxies { const PALLET: &'static str = "Proxy"; const STORAGE: &'static str = "Proxies"; type Value = ( @@ -14354,8 +13078,8 @@ pub mod api { )]) } } - pub struct Announcements<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Announcements<'_> { + pub struct Announcements(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Announcements { const PALLET: &'static str = "Proxy"; const STORAGE: &'static str = "Announcements"; type Value = ( @@ -14384,7 +13108,7 @@ pub mod api { } pub async fn proxies( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ( @@ -14405,13 +13129,13 @@ pub mod api { pub async fn proxies_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Proxies<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Proxies>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn announcements( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< ( @@ -14433,7 +13157,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Announcements<'a>>, + ::subxt::KeyIter<'a, T, Announcements>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -14508,23 +13232,21 @@ pub mod api { } } pub mod multisig { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AsMultiThreshold1 { + pub struct as_multi_threshold_1 { pub other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub call: ::std::boxed::Box, } - impl ::subxt::Call for AsMultiThreshold1 { + impl ::subxt::Call for as_multi_threshold_1 { const PALLET: &'static str = "Multisig"; - const FUNCTION: &'static str = "as_multi_threshold1"; + const FUNCTION: &'static str = "as_multi_threshold_1"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AsMulti { + pub struct as_multi { pub threshold: ::core::primitive::u16, pub other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub maybe_timepoint: ::core::option::Option< @@ -14534,12 +13256,12 @@ pub mod api { pub store_call: ::core::primitive::bool, pub max_weight: ::core::primitive::u64, } - impl ::subxt::Call for AsMulti { + impl ::subxt::Call for as_multi { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "as_multi"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ApproveAsMulti { + pub struct approve_as_multi { pub threshold: ::core::primitive::u16, pub other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub maybe_timepoint: ::core::option::Option< @@ -14548,18 +13270,18 @@ pub mod api { pub call_hash: [::core::primitive::u8; 32usize], pub max_weight: ::core::primitive::u64, } - impl ::subxt::Call for ApproveAsMulti { + impl ::subxt::Call for approve_as_multi { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "approve_as_multi"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelAsMulti { + pub struct cancel_as_multi { pub threshold: ::core::primitive::u16, pub other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, pub timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, pub call_hash: [::core::primitive::u8; 32usize], } - impl ::subxt::Call for CancelAsMulti { + impl ::subxt::Call for cancel_as_multi { const PALLET: &'static str = "Multisig"; const FUNCTION: &'static str = "cancel_as_multi"; } @@ -14579,20 +13301,13 @@ pub mod api { marker: ::core::marker::PhantomData, } } - pub fn as_multi_threshold1( + pub fn as_multi_threshold_1( &self, other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, call: runtime_types::darwinia_runtime::Call, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AsMultiThreshold1, - DispatchError, - root_mod::Event, - > { - let call = AsMultiThreshold1 { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, as_multi_threshold_1, DispatchError> + { + let call = as_multi_threshold_1 { other_signatories, call: ::std::boxed::Box::new(call), }; @@ -14608,16 +13323,9 @@ pub mod api { call: ::std::vec::Vec<::core::primitive::u8>, store_call: ::core::primitive::bool, max_weight: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AsMulti, - DispatchError, - root_mod::Event, - > { - let call = AsMulti { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, as_multi, DispatchError> + { + let call = as_multi { threshold, other_signatories, maybe_timepoint, @@ -14636,16 +13344,9 @@ pub mod api { >, call_hash: [::core::primitive::u8; 32usize], max_weight: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ApproveAsMulti, - DispatchError, - root_mod::Event, - > { - let call = ApproveAsMulti { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, approve_as_multi, DispatchError> + { + let call = approve_as_multi { threshold, other_signatories, maybe_timepoint, @@ -14660,16 +13361,9 @@ pub mod api { other_signatories: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, timepoint: runtime_types::pallet_multisig::Timepoint<::core::primitive::u32>, call_hash: [::core::primitive::u8; 32usize], - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelAsMulti, - DispatchError, - root_mod::Event, - > { - let call = CancelAsMulti { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_as_multi, DispatchError> + { + let call = cancel_as_multi { threshold, other_signatories, timepoint, @@ -14729,11 +13423,11 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct Multisigs<'a>( - pub &'a ::subxt::sp_core::crypto::AccountId32, - pub &'a [::core::primitive::u8; 32usize], + pub struct Multisigs( + pub ::subxt::sp_core::crypto::AccountId32, + pub [::core::primitive::u8; 32usize], ); - impl ::subxt::StorageEntry for Multisigs<'_> { + impl ::subxt::StorageEntry for Multisigs { const PALLET: &'static str = "Multisig"; const STORAGE: &'static str = "Multisigs"; type Value = runtime_types::pallet_multisig::Multisig< @@ -14751,8 +13445,8 @@ pub mod api { ]) } } - pub struct Calls<'a>(pub &'a [::core::primitive::u8; 32usize]); - impl ::subxt::StorageEntry for Calls<'_> { + pub struct Calls(pub [::core::primitive::u8; 32usize]); + impl ::subxt::StorageEntry for Calls { const PALLET: &'static str = "Multisig"; const STORAGE: &'static str = "Calls"; type Value = ( @@ -14776,8 +13470,8 @@ pub mod api { } pub async fn multisigs( &self, - _0: &::subxt::sp_core::crypto::AccountId32, - _1: &[::core::primitive::u8; 32usize], + _0: ::subxt::sp_core::crypto::AccountId32, + _1: [::core::primitive::u8; 32usize], hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -14795,15 +13489,13 @@ pub mod api { pub async fn multisigs_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Multisigs<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Multisigs>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn calls( &self, - _0: &[::core::primitive::u8; 32usize], + _0: [::core::primitive::u8; 32usize], hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<( @@ -14819,7 +13511,7 @@ pub mod api { pub async fn calls_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Calls<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Calls>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -14861,38 +13553,36 @@ pub mod api { } } pub mod ethereum_relay { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Affirm { + pub struct affirm { pub ethereum_relay_header_parcel: runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, pub optional_ethereum_relay_proofs: ::core::option::Option< runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, >, } - impl ::subxt::Call for Affirm { + impl ::subxt::Call for affirm { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "affirm"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct DisputeAndAffirm { + pub struct dispute_and_affirm { pub ethereum_relay_header_parcel: runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, pub optional_ethereum_relay_proofs: ::core::option::Option< runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, >, } - impl ::subxt::Call for DisputeAndAffirm { + impl ::subxt::Call for dispute_and_affirm { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "dispute_and_affirm"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CompleteRelayProofs { + pub struct complete_relay_proofs { pub affirmation_id: runtime_types::darwinia_relay_primitives::relayer_game::RelayAffirmationId< ::core::primitive::u64, @@ -14900,12 +13590,12 @@ pub mod api { pub ethereum_relay_proofs: ::std::vec::Vec, } - impl ::subxt::Call for CompleteRelayProofs { + impl ::subxt::Call for complete_relay_proofs { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "complete_relay_proofs"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ExtendAffirmation { + pub struct extend_affirmation { pub extended_ethereum_relay_affirmation_id: runtime_types::darwinia_relay_primitives::relayer_game::RelayAffirmationId< ::core::primitive::u64, @@ -14917,36 +13607,36 @@ pub mod api { ::std::vec::Vec, >, } - impl ::subxt::Call for ExtendAffirmation { + impl ::subxt::Call for extend_affirmation { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "extend_affirmation"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct VotePendingRelayHeaderParcel { + pub struct vote_pending_relay_header_parcel { pub ethereum_block_number: ::core::primitive::u64, pub aye: ::core::primitive::bool, } - impl ::subxt::Call for VotePendingRelayHeaderParcel { + impl ::subxt::Call for vote_pending_relay_header_parcel { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "vote_pending_relay_header_parcel"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CheckReceipt { + pub struct check_receipt { pub ethereum_proof_record: runtime_types::ethereum_primitives::receipt::ReceiptProof, pub ethereum_header: runtime_types::ethereum_primitives::header::Header, pub mmr_proof: runtime_types::darwinia_bridge_ethereum::MMRProof, } - impl ::subxt::Call for CheckReceipt { + impl ::subxt::Call for check_receipt { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "check_receipt"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetReceiptVerifyFee { + pub struct set_receipt_verify_fee { #[codec(compact)] pub new: ::core::primitive::u128, } - impl ::subxt::Call for SetReceiptVerifyFee { + impl ::subxt::Call for set_receipt_verify_fee { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "set_receipt_verify_fee"; } @@ -14957,25 +13647,25 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct RemoveConfirmedParcelOf { + pub struct remove_confirmed_parcel_of { pub confirmed_block_number: ::core::primitive::u64, } - impl ::subxt::Call for RemoveConfirmedParcelOf { + impl ::subxt::Call for remove_confirmed_parcel_of { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "remove_confirmed_parcel_of"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CleanConfirmedParcels; - impl ::subxt::Call for CleanConfirmedParcels { + pub struct clean_confirmed_parcels; + impl ::subxt::Call for clean_confirmed_parcels { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "clean_confirmed_parcels"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetConfirmedParcel { + pub struct set_confirmed_parcel { pub ethereum_relay_header_parcel: runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, } - impl ::subxt::Call for SetConfirmedParcel { + impl ::subxt::Call for set_confirmed_parcel { const PALLET: &'static str = "EthereumRelay"; const FUNCTION: &'static str = "set_confirmed_parcel"; } @@ -15001,16 +13691,9 @@ pub mod api { optional_ethereum_relay_proofs: ::core::option::Option< runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Affirm, - DispatchError, - root_mod::Event, - > { - let call = Affirm { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, affirm, DispatchError> + { + let call = affirm { ethereum_relay_header_parcel, optional_ethereum_relay_proofs, }; @@ -15022,16 +13705,9 @@ pub mod api { optional_ethereum_relay_proofs: ::core::option::Option< runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - DisputeAndAffirm, - DispatchError, - root_mod::Event, - > { - let call = DisputeAndAffirm { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, dispute_and_affirm, DispatchError> + { + let call = dispute_and_affirm { ethereum_relay_header_parcel, optional_ethereum_relay_proofs, }; @@ -15043,16 +13719,9 @@ pub mod api { ethereum_relay_proofs: ::std::vec::Vec< runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CompleteRelayProofs, - DispatchError, - root_mod::Event, - > { - let call = CompleteRelayProofs { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, complete_relay_proofs, DispatchError> + { + let call = complete_relay_proofs { affirmation_id, ethereum_relay_proofs, }; @@ -15069,16 +13738,9 @@ pub mod api { runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, >, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ExtendAffirmation, - DispatchError, - root_mod::Event, - > { - let call = ExtendAffirmation { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, extend_affirmation, DispatchError> + { + let call = extend_affirmation { extended_ethereum_relay_affirmation_id, game_sample_points, optional_ethereum_relay_proofs, @@ -15094,11 +13756,10 @@ pub mod api { T, X, A, - VotePendingRelayHeaderParcel, + vote_pending_relay_header_parcel, DispatchError, - root_mod::Event, > { - let call = VotePendingRelayHeaderParcel { + let call = vote_pending_relay_header_parcel { ethereum_block_number, aye, }; @@ -15109,16 +13770,9 @@ pub mod api { ethereum_proof_record : runtime_types :: ethereum_primitives :: receipt :: ReceiptProof, ethereum_header: runtime_types::ethereum_primitives::header::Header, mmr_proof: runtime_types::darwinia_bridge_ethereum::MMRProof, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CheckReceipt, - DispatchError, - root_mod::Event, - > { - let call = CheckReceipt { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, check_receipt, DispatchError> + { + let call = check_receipt { ethereum_proof_record, ethereum_header, mmr_proof, @@ -15128,16 +13782,9 @@ pub mod api { pub fn set_receipt_verify_fee( &self, new: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetReceiptVerifyFee, - DispatchError, - root_mod::Event, - > { - let call = SetReceiptVerifyFee { new }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_receipt_verify_fee, DispatchError> + { + let call = set_receipt_verify_fee { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_confirmed_parcel_of( @@ -15148,11 +13795,10 @@ pub mod api { T, X, A, - RemoveConfirmedParcelOf, + remove_confirmed_parcel_of, DispatchError, - root_mod::Event, > { - let call = RemoveConfirmedParcelOf { + let call = remove_confirmed_parcel_of { confirmed_block_number, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -15164,26 +13810,18 @@ pub mod api { T, X, A, - CleanConfirmedParcels, + clean_confirmed_parcels, DispatchError, - root_mod::Event, > { - let call = CleanConfirmedParcels {}; + let call = clean_confirmed_parcels {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_confirmed_parcel( &self, ethereum_relay_header_parcel : runtime_types :: darwinia_bridge_ethereum :: EthereumRelayHeaderParcel, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetConfirmedParcel, - DispatchError, - root_mod::Event, - > { - let call = SetConfirmedParcel { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_confirmed_parcel, DispatchError> + { + let call = set_confirmed_parcel { ethereum_relay_header_parcel, }; ::subxt::SubmittableExtrinsic::new(self.client, call) @@ -15316,8 +13954,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct ConfirmedHeaderParcels<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for ConfirmedHeaderParcels<'_> { + pub struct ConfirmedHeaderParcels(pub ::core::primitive::u64); + impl ::subxt::StorageEntry for ConfirmedHeaderParcels { const PALLET: &'static str = "DarwiniaEthereumRelay"; const STORAGE: &'static str = "ConfirmedHeaderParcels"; type Value = runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel; @@ -15355,8 +13993,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct DagsMerkleRoots<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for DagsMerkleRoots<'_> { + pub struct DagsMerkleRoots(pub ::core::primitive::u64); + impl ::subxt::StorageEntry for DagsMerkleRoots { const PALLET: &'static str = "DarwiniaEthereumRelay"; const STORAGE: &'static str = "DagsMerkleRoots"; type Value = runtime_types::ethereum_types::hash::H128; @@ -15400,7 +14038,7 @@ pub mod api { } pub async fn confirmed_header_parcels( &self, - _0: &::core::primitive::u64, + _0: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -15415,7 +14053,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ConfirmedHeaderParcels<'a>>, + ::subxt::KeyIter<'a, T, ConfirmedHeaderParcels>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -15448,7 +14086,7 @@ pub mod api { } pub async fn dags_merkle_roots( &self, - _0: &::core::primitive::u64, + _0: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::ethereum_types::hash::H128, @@ -15461,7 +14099,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, DagsMerkleRoots<'a>>, + ::subxt::KeyIter<'a, T, DagsMerkleRoots>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -15538,14 +14176,12 @@ pub mod api { } } pub mod ethereum_backing { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Redeem { + pub struct redeem { pub act: runtime_types::to_ethereum_backing::pallet::RedeemFor, pub proof: ( runtime_types::ethereum_primitives::header::Header, @@ -15553,79 +14189,79 @@ pub mod api { runtime_types::darwinia_bridge_ethereum::MMRProof, ), } - impl ::subxt::Call for Redeem { + impl ::subxt::Call for redeem { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "redeem"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Lock { + pub struct lock { #[codec(compact)] pub ring_to_lock: ::core::primitive::u128, #[codec(compact)] pub kton_to_lock: ::core::primitive::u128, pub ethereum_account: runtime_types::primitive_types::H160, } - impl ::subxt::Call for Lock { + impl ::subxt::Call for lock { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "lock"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SyncAuthoritiesChange { + pub struct sync_authorities_change { pub proof: ( runtime_types::ethereum_primitives::header::Header, runtime_types::ethereum_primitives::receipt::ReceiptProof, runtime_types::darwinia_bridge_ethereum::MMRProof, ), } - impl ::subxt::Call for SyncAuthoritiesChange { + impl ::subxt::Call for sync_authorities_change { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "sync_authorities_change"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetTokenRedeemAddress { + pub struct set_token_redeem_address { pub new: runtime_types::primitive_types::H160, } - impl ::subxt::Call for SetTokenRedeemAddress { + impl ::subxt::Call for set_token_redeem_address { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "set_token_redeem_address"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetDepositRedeemAddress { + pub struct set_deposit_redeem_address { pub new: runtime_types::primitive_types::H160, } - impl ::subxt::Call for SetDepositRedeemAddress { + impl ::subxt::Call for set_deposit_redeem_address { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "set_deposit_redeem_address"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetSetAuthoritiesAddress { + pub struct set_set_authorities_address { pub new: runtime_types::primitive_types::H160, } - impl ::subxt::Call for SetSetAuthoritiesAddress { + impl ::subxt::Call for set_set_authorities_address { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "set_set_authorities_address"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetRingTokenAddress { + pub struct set_ring_token_address { pub new: runtime_types::primitive_types::H160, } - impl ::subxt::Call for SetRingTokenAddress { + impl ::subxt::Call for set_ring_token_address { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "set_ring_token_address"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetKtonTokenAddress { + pub struct set_kton_token_address { pub new: runtime_types::primitive_types::H160, } - impl ::subxt::Call for SetKtonTokenAddress { + impl ::subxt::Call for set_kton_token_address { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "set_kton_token_address"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetRedeemStatus { + pub struct set_redeem_status { pub status: ::core::primitive::bool, } - impl ::subxt::Call for SetRedeemStatus { + impl ::subxt::Call for set_redeem_status { const PALLET: &'static str = "EthereumBacking"; const FUNCTION: &'static str = "set_redeem_status"; } @@ -15653,16 +14289,9 @@ pub mod api { runtime_types::ethereum_primitives::receipt::ReceiptProof, runtime_types::darwinia_bridge_ethereum::MMRProof, ), - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Redeem, - DispatchError, - root_mod::Event, - > { - let call = Redeem { act, proof }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, redeem, DispatchError> + { + let call = redeem { act, proof }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn lock( @@ -15670,9 +14299,9 @@ pub mod api { ring_to_lock: ::core::primitive::u128, kton_to_lock: ::core::primitive::u128, ethereum_account: runtime_types::primitive_types::H160, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, Lock, DispatchError, root_mod::Event> + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, lock, DispatchError> { - let call = Lock { + let call = lock { ring_to_lock, kton_to_lock, ethereum_account, @@ -15691,11 +14320,10 @@ pub mod api { T, X, A, - SyncAuthoritiesChange, + sync_authorities_change, DispatchError, - root_mod::Event, > { - let call = SyncAuthoritiesChange { proof }; + let call = sync_authorities_change { proof }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_token_redeem_address( @@ -15706,11 +14334,10 @@ pub mod api { T, X, A, - SetTokenRedeemAddress, + set_token_redeem_address, DispatchError, - root_mod::Event, > { - let call = SetTokenRedeemAddress { new }; + let call = set_token_redeem_address { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_deposit_redeem_address( @@ -15721,11 +14348,10 @@ pub mod api { T, X, A, - SetDepositRedeemAddress, + set_deposit_redeem_address, DispatchError, - root_mod::Event, > { - let call = SetDepositRedeemAddress { new }; + let call = set_deposit_redeem_address { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_set_authorities_address( @@ -15736,56 +14362,34 @@ pub mod api { T, X, A, - SetSetAuthoritiesAddress, + set_set_authorities_address, DispatchError, - root_mod::Event, > { - let call = SetSetAuthoritiesAddress { new }; + let call = set_set_authorities_address { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_ring_token_address( &self, new: runtime_types::primitive_types::H160, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetRingTokenAddress, - DispatchError, - root_mod::Event, - > { - let call = SetRingTokenAddress { new }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_ring_token_address, DispatchError> + { + let call = set_ring_token_address { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_kton_token_address( &self, new: runtime_types::primitive_types::H160, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetKtonTokenAddress, - DispatchError, - root_mod::Event, - > { - let call = SetKtonTokenAddress { new }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_kton_token_address, DispatchError> + { + let call = set_kton_token_address { new }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_redeem_status( &self, status: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetRedeemStatus, - DispatchError, - root_mod::Event, - > { - let call = SetRedeemStatus { status }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_redeem_status, DispatchError> + { + let call = set_redeem_status { status }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -15849,11 +14453,8 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct VerifiedProof<'a>( - pub &'a ::subxt::sp_core::H256, - pub &'a ::core::primitive::u64, - ); - impl ::subxt::StorageEntry for VerifiedProof<'_> { + pub struct VerifiedProof(pub ::subxt::sp_core::H256, pub ::core::primitive::u64); + impl ::subxt::StorageEntry for VerifiedProof { const PALLET: &'static str = "EthereumBacking"; const STORAGE: &'static str = "VerifiedProof"; type Value = ::core::primitive::bool; @@ -15936,8 +14537,8 @@ pub mod api { } pub async fn verified_proof( &self, - _0: &::subxt::sp_core::H256, - _1: &::core::primitive::u64, + _0: ::subxt::sp_core::H256, + _1: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> { @@ -15948,7 +14549,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, VerifiedProof<'a>>, + ::subxt::KeyIter<'a, T, VerifiedProof>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -16085,7 +14686,6 @@ pub mod api { } } pub mod ethereum_relayer_game { - use super::root_mod; use super::runtime_types; pub mod storage { use super::runtime_types; @@ -16098,11 +14698,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Affirmations<'a>( - pub &'a ::core::primitive::u64, - pub &'a ::core::primitive::u32, - ); - impl ::subxt::StorageEntry for Affirmations<'_> { + pub struct Affirmations(pub ::core::primitive::u64, pub ::core::primitive::u32); + impl ::subxt::StorageEntry for Affirmations { const PALLET: &'static str = "Instance1DarwiniaRelayerGame"; const STORAGE: &'static str = "Affirmations"; type Value = ::std::vec::Vec< @@ -16120,8 +14717,8 @@ pub mod api { ]) } } - pub struct BestConfirmedHeaderId<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for BestConfirmedHeaderId<'_> { + pub struct BestConfirmedHeaderId(pub ::core::primitive::u64); + impl ::subxt::StorageEntry for BestConfirmedHeaderId { const PALLET: &'static str = "Instance1DarwiniaRelayerGame"; const STORAGE: &'static str = "BestConfirmedHeaderId"; type Value = ::core::primitive::u64; @@ -16132,8 +14729,8 @@ pub mod api { )]) } } - pub struct RoundCounts<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for RoundCounts<'_> { + pub struct RoundCounts(pub ::core::primitive::u64); + impl ::subxt::StorageEntry for RoundCounts { const PALLET: &'static str = "Instance1DarwiniaRelayerGame"; const STORAGE: &'static str = "RoundCounts"; type Value = ::core::primitive::u32; @@ -16144,8 +14741,8 @@ pub mod api { )]) } } - pub struct AffirmTime<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for AffirmTime<'_> { + pub struct AffirmTime(pub ::core::primitive::u64); + impl ::subxt::StorageEntry for AffirmTime { const PALLET: &'static str = "Instance1DarwiniaRelayerGame"; const STORAGE: &'static str = "AffirmTime"; type Value = (::core::primitive::u32, ::core::primitive::u32); @@ -16156,8 +14753,8 @@ pub mod api { )]) } } - pub struct GamesToUpdate<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for GamesToUpdate<'_> { + pub struct GamesToUpdate(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for GamesToUpdate { const PALLET: &'static str = "Instance1DarwiniaRelayerGame"; const STORAGE: &'static str = "GamesToUpdate"; type Value = ::std::vec::Vec<::core::primitive::u64>; @@ -16168,8 +14765,8 @@ pub mod api { )]) } } - pub struct Stakes<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for Stakes<'_> { + pub struct Stakes(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for Stakes { const PALLET: &'static str = "Instance1DarwiniaRelayerGame"; const STORAGE: &'static str = "Stakes"; type Value = ::core::primitive::u128; @@ -16180,8 +14777,8 @@ pub mod api { )]) } } - pub struct GameSamplePoints<'a>(pub &'a ::core::primitive::u64); - impl ::subxt::StorageEntry for GameSamplePoints<'_> { + pub struct GameSamplePoints(pub ::core::primitive::u64); + impl ::subxt::StorageEntry for GameSamplePoints { const PALLET: &'static str = "Instance1DarwiniaRelayerGame"; const STORAGE: &'static str = "GameSamplePoints"; type Value = ::std::vec::Vec<::std::vec::Vec<::core::primitive::u64>>; @@ -16211,8 +14808,8 @@ pub mod api { } pub async fn affirmations( &self, - _0: &::core::primitive::u64, - _1: &::core::primitive::u32, + _0: ::core::primitive::u64, + _1: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec< @@ -16232,14 +14829,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, Affirmations<'a>>, + ::subxt::KeyIter<'a, T, Affirmations>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn best_confirmed_header_id( &self, - _0: &::core::primitive::u64, + _0: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { @@ -16250,14 +14847,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, BestConfirmedHeaderId<'a>>, + ::subxt::KeyIter<'a, T, BestConfirmedHeaderId>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn round_counts( &self, - _0: &::core::primitive::u64, + _0: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { @@ -16267,15 +14864,13 @@ pub mod api { pub async fn round_counts_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, RoundCounts<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, RoundCounts>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn affirm_time( &self, - _0: &::core::primitive::u64, + _0: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<(::core::primitive::u32, ::core::primitive::u32)>, @@ -16287,15 +14882,13 @@ pub mod api { pub async fn affirm_time_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, AffirmTime<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, AffirmTime>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn games_to_update( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u64>, @@ -16308,14 +14901,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, GamesToUpdate<'a>>, + ::subxt::KeyIter<'a, T, GamesToUpdate>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn stakes( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { @@ -16325,13 +14918,13 @@ pub mod api { pub async fn stakes_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Stakes<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Stakes>, ::subxt::BasicError> { self.client.storage().iter(hash).await } pub async fn game_sample_points( &self, - _0: &::core::primitive::u64, + _0: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<::std::vec::Vec<::core::primitive::u64>>, @@ -16344,7 +14937,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, GameSamplePoints<'a>>, + ::subxt::KeyIter<'a, T, GameSamplePoints>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -16373,81 +14966,79 @@ pub mod api { } } pub mod ethereum_relay_authorities { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RequestAuthority { + pub struct request_authority { pub stake: ::core::primitive::u128, pub signer: runtime_types::primitive_types::H160, } - impl ::subxt::Call for RequestAuthority { + impl ::subxt::Call for request_authority { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "request_authority"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelRequest; - impl ::subxt::Call for CancelRequest { + pub struct cancel_request; + impl ::subxt::Call for cancel_request { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "cancel_request"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct KillCandidates; - impl ::subxt::Call for KillCandidates { + pub struct kill_candidates; + impl ::subxt::Call for kill_candidates { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "kill_candidates"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AddAuthorities { + pub struct add_authorities { pub account_ids: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for AddAuthorities { + impl ::subxt::Call for add_authorities { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "add_authorities"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RenounceAuthority; - impl ::subxt::Call for RenounceAuthority { + pub struct renounce_authority; + impl ::subxt::Call for renounce_authority { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "renounce_authority"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoveAuthorities { + pub struct remove_authorities { pub account_ids: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for RemoveAuthorities { + impl ::subxt::Call for remove_authorities { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "remove_authorities"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SubmitSignedMmrRoot { + pub struct submit_signed_mmr_root { pub block_number: ::core::primitive::u32, pub signature: [::core::primitive::u8; 65usize], } - impl ::subxt::Call for SubmitSignedMmrRoot { + impl ::subxt::Call for submit_signed_mmr_root { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "submit_signed_mmr_root"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SubmitSignedAuthorities { + pub struct submit_signed_authorities { pub signature: [::core::primitive::u8; 65usize], } - impl ::subxt::Call for SubmitSignedAuthorities { + impl ::subxt::Call for submit_signed_authorities { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "submit_signed_authorities"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct KillAuthorities; - impl ::subxt::Call for KillAuthorities { + pub struct kill_authorities; + impl ::subxt::Call for kill_authorities { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "kill_authorities"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ForceNewTerm; - impl ::subxt::Call for ForceNewTerm { + pub struct force_new_term; + impl ::subxt::Call for force_new_term { const PALLET: &'static str = "EthereumRelayAuthorities"; const FUNCTION: &'static str = "force_new_term"; } @@ -16471,104 +15062,55 @@ pub mod api { &self, stake: ::core::primitive::u128, signer: runtime_types::primitive_types::H160, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RequestAuthority, - DispatchError, - root_mod::Event, - > { - let call = RequestAuthority { stake, signer }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, request_authority, DispatchError> + { + let call = request_authority { stake, signer }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_request( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelRequest, - DispatchError, - root_mod::Event, - > { - let call = CancelRequest {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_request, DispatchError> + { + let call = cancel_request {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn kill_candidates( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - KillCandidates, - DispatchError, - root_mod::Event, - > { - let call = KillCandidates {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, kill_candidates, DispatchError> + { + let call = kill_candidates {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn add_authorities( &self, account_ids: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - AddAuthorities, - DispatchError, - root_mod::Event, - > { - let call = AddAuthorities { account_ids }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, add_authorities, DispatchError> + { + let call = add_authorities { account_ids }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn renounce_authority( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RenounceAuthority, - DispatchError, - root_mod::Event, - > { - let call = RenounceAuthority {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, renounce_authority, DispatchError> + { + let call = renounce_authority {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn remove_authorities( &self, account_ids: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - RemoveAuthorities, - DispatchError, - root_mod::Event, - > { - let call = RemoveAuthorities { account_ids }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, remove_authorities, DispatchError> + { + let call = remove_authorities { account_ids }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn submit_signed_mmr_root( &self, block_number: ::core::primitive::u32, signature: [::core::primitive::u8; 65usize], - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SubmitSignedMmrRoot, - DispatchError, - root_mod::Event, - > { - let call = SubmitSignedMmrRoot { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, submit_signed_mmr_root, DispatchError> + { + let call = submit_signed_mmr_root { block_number, signature, }; @@ -16582,39 +15124,24 @@ pub mod api { T, X, A, - SubmitSignedAuthorities, + submit_signed_authorities, DispatchError, - root_mod::Event, > { - let call = SubmitSignedAuthorities { signature }; + let call = submit_signed_authorities { signature }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn kill_authorities( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - KillAuthorities, - DispatchError, - root_mod::Event, - > { - let call = KillAuthorities {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, kill_authorities, DispatchError> + { + let call = kill_authorities {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn force_new_term( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ForceNewTerm, - DispatchError, - root_mod::Event, - > { - let call = ForceNewTerm {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_new_term, DispatchError> + { + let call = force_new_term {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -16761,8 +15288,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct MmrRootsToSign<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for MmrRootsToSign<'_> { + pub struct MmrRootsToSign(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for MmrRootsToSign { const PALLET: &'static str = "Instance1DarwiniaRelayAuthorities"; const STORAGE: &'static str = "MmrRootsToSign"; type Value = @@ -16867,7 +15394,7 @@ pub mod api { } pub async fn mmr_roots_to_sign( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -16886,7 +15413,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, MmrRootsToSign<'a>>, + ::subxt::KeyIter<'a, T, MmrRootsToSign>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -16951,7 +15478,6 @@ pub mod api { } } pub mod tron_backing { - use super::root_mod; use super::runtime_types; pub mod storage { use super::runtime_types; @@ -16982,7 +15508,6 @@ pub mod api { } } pub mod bridge_crab_dispatch { - use super::root_mod; use super::runtime_types; pub type Event = runtime_types::pallet_bridge_dispatch::pallet::Event; pub mod events { @@ -17075,14 +15600,12 @@ pub mod api { } } pub mod bridge_crab_grandpa { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SubmitFinalityProof { + pub struct submit_finality_proof { pub finality_target: ::std::boxed::Box< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, @@ -17097,12 +15620,12 @@ pub mod api { >, >, } - impl ::subxt::Call for SubmitFinalityProof { + impl ::subxt::Call for submit_finality_proof { const PALLET: &'static str = "BridgeCrabGrandpa"; const FUNCTION: &'static str = "submit_finality_proof"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Initialize { + pub struct initialize { pub init_data: runtime_types::bp_header_chain::InitializationData< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, @@ -17110,23 +15633,23 @@ pub mod api { >, >, } - impl ::subxt::Call for Initialize { + impl ::subxt::Call for initialize { const PALLET: &'static str = "BridgeCrabGrandpa"; const FUNCTION: &'static str = "initialize"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetOwner { + pub struct set_owner { pub new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for SetOwner { + impl ::subxt::Call for set_owner { const PALLET: &'static str = "BridgeCrabGrandpa"; const FUNCTION: &'static str = "set_owner"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetOperational { + pub struct set_operational { pub operational: ::core::primitive::bool, } - impl ::subxt::Call for SetOperational { + impl ::subxt::Call for set_operational { const PALLET: &'static str = "BridgeCrabGrandpa"; const FUNCTION: &'static str = "set_operational"; } @@ -17153,16 +15676,9 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, justification : runtime_types :: bp_header_chain :: justification :: GrandpaJustification < runtime_types :: sp_runtime :: generic :: header :: Header < :: core :: primitive :: u32 , runtime_types :: sp_runtime :: traits :: BlakeTwo256 > >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SubmitFinalityProof, - DispatchError, - root_mod::Event, - > { - let call = SubmitFinalityProof { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, submit_finality_proof, DispatchError> + { + let call = submit_finality_proof { finality_target: ::std::boxed::Box::new(finality_target), justification, }; @@ -17176,46 +15692,25 @@ pub mod api { runtime_types::sp_runtime::traits::BlakeTwo256, >, >, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - Initialize, - DispatchError, - root_mod::Event, - > { - let call = Initialize { init_data }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, initialize, DispatchError> + { + let call = initialize { init_data }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_owner( &self, new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetOwner, - DispatchError, - root_mod::Event, - > { - let call = SetOwner { new_owner }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_owner, DispatchError> + { + let call = set_owner { new_owner }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_operational( &self, operational: ::core::primitive::bool, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetOperational, - DispatchError, - root_mod::Event, - > { - let call = SetOperational { operational }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_operational, DispatchError> + { + let call = set_operational { operational }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -17249,8 +15744,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct ImportedHashes<'a>(pub &'a ::core::primitive::u32); - impl ::subxt::StorageEntry for ImportedHashes<'_> { + pub struct ImportedHashes(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for ImportedHashes { const PALLET: &'static str = "BridgeCrabGrandpa"; const STORAGE: &'static str = "ImportedHashes"; type Value = ::subxt::sp_core::H256; @@ -17270,8 +15765,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct ImportedHeaders<'a>(pub &'a ::subxt::sp_core::H256); - impl ::subxt::StorageEntry for ImportedHeaders<'_> { + pub struct ImportedHeaders(pub ::subxt::sp_core::H256); + impl ::subxt::StorageEntry for ImportedHeaders { const PALLET: &'static str = "BridgeCrabGrandpa"; const STORAGE: &'static str = "ImportedHeaders"; type Value = runtime_types::sp_runtime::generic::header::Header< @@ -17345,7 +15840,7 @@ pub mod api { } pub async fn imported_hashes( &self, - _0: &::core::primitive::u32, + _0: ::core::primitive::u32, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<::subxt::sp_core::H256>, @@ -17358,7 +15853,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ImportedHashes<'a>>, + ::subxt::KeyIter<'a, T, ImportedHashes>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -17373,7 +15868,7 @@ pub mod api { } pub async fn imported_headers( &self, - _0: &::subxt::sp_core::H256, + _0: ::subxt::sp_core::H256, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -17391,7 +15886,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ImportedHeaders<'a>>, + ::subxt::KeyIter<'a, T, ImportedHeaders>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -17443,43 +15938,41 @@ pub mod api { ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode( - &mut &[192u8, 137u8, 1u8, 0u8][..], + &mut &[112u8, 23u8, 0u8, 0u8][..], )?) } } } } pub mod bridge_crab_messages { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetOwner { + pub struct set_owner { pub new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, } - impl ::subxt::Call for SetOwner { + impl ::subxt::Call for set_owner { const PALLET: &'static str = "BridgeCrabMessages"; const FUNCTION: &'static str = "set_owner"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetOperatingMode { + pub struct set_operating_mode { pub operating_mode: runtime_types::bp_messages::OperatingMode, } - impl ::subxt::Call for SetOperatingMode { + impl ::subxt::Call for set_operating_mode { const PALLET: &'static str = "BridgeCrabMessages"; const FUNCTION: &'static str = "set_operating_mode"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct UpdatePalletParameter { pub parameter : runtime_types :: darwinia_runtime :: messages :: crab_message :: DarwiniaToCrabMessagesParameter , } - impl ::subxt::Call for UpdatePalletParameter { + pub struct update_pallet_parameter { pub parameter : runtime_types :: darwinia_runtime :: bridges_message :: crab :: DarwiniaToCrabMessagesParameter , } + impl ::subxt::Call for update_pallet_parameter { const PALLET: &'static str = "BridgeCrabMessages"; const FUNCTION: &'static str = "update_pallet_parameter"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SendMessage { + pub struct send_message { pub lane_id: [::core::primitive::u8; 4usize], pub payload: runtime_types::bp_message_dispatch::MessagePayload< ::subxt::sp_core::crypto::AccountId32, @@ -17489,29 +15982,29 @@ pub mod api { >, pub delivery_and_dispatch_fee: ::core::primitive::u128, } - impl ::subxt::Call for SendMessage { + impl ::subxt::Call for send_message { const PALLET: &'static str = "BridgeCrabMessages"; const FUNCTION: &'static str = "send_message"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct IncreaseMessageFee { + pub struct increase_message_fee { pub lane_id: [::core::primitive::u8; 4usize], pub nonce: ::core::primitive::u64, pub additional_fee: ::core::primitive::u128, } - impl ::subxt::Call for IncreaseMessageFee { + impl ::subxt::Call for increase_message_fee { const PALLET: &'static str = "BridgeCrabMessages"; const FUNCTION: &'static str = "increase_message_fee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReceiveMessagesProof { pub relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , pub proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , pub messages_count : :: core :: primitive :: u32 , pub dispatch_weight : :: core :: primitive :: u64 , } - impl ::subxt::Call for ReceiveMessagesProof { + pub struct receive_messages_proof { pub relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , pub proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , pub messages_count : :: core :: primitive :: u32 , pub dispatch_weight : :: core :: primitive :: u64 , } + impl ::subxt::Call for receive_messages_proof { const PALLET: &'static str = "BridgeCrabMessages"; const FUNCTION: &'static str = "receive_messages_proof"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReceiveMessagesDeliveryProof { pub proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , pub relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } - impl ::subxt::Call for ReceiveMessagesDeliveryProof { + pub struct receive_messages_delivery_proof { pub proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , pub relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } + impl ::subxt::Call for receive_messages_delivery_proof { const PALLET: &'static str = "BridgeCrabMessages"; const FUNCTION: &'static str = "receive_messages_delivery_proof"; } @@ -17534,46 +16027,31 @@ pub mod api { pub fn set_owner( &self, new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetOwner, - DispatchError, - root_mod::Event, - > { - let call = SetOwner { new_owner }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_owner, DispatchError> + { + let call = set_owner { new_owner }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_operating_mode( &self, operating_mode: runtime_types::bp_messages::OperatingMode, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetOperatingMode, - DispatchError, - root_mod::Event, - > { - let call = SetOperatingMode { operating_mode }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_operating_mode, DispatchError> + { + let call = set_operating_mode { operating_mode }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn update_pallet_parameter( &self, - parameter : runtime_types :: darwinia_runtime :: messages :: crab_message :: DarwiniaToCrabMessagesParameter, + parameter : runtime_types :: darwinia_runtime :: bridges_message :: crab :: DarwiniaToCrabMessagesParameter, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - UpdatePalletParameter, + update_pallet_parameter, DispatchError, - root_mod::Event, > { - let call = UpdatePalletParameter { parameter }; + let call = update_pallet_parameter { parameter }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn send_message( @@ -17586,16 +16064,9 @@ pub mod api { ::std::vec::Vec<::core::primitive::u8>, >, delivery_and_dispatch_fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SendMessage, - DispatchError, - root_mod::Event, - > { - let call = SendMessage { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, send_message, DispatchError> + { + let call = send_message { lane_id, payload, delivery_and_dispatch_fee, @@ -17607,16 +16078,9 @@ pub mod api { lane_id: [::core::primitive::u8; 4usize], nonce: ::core::primitive::u64, additional_fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - IncreaseMessageFee, - DispatchError, - root_mod::Event, - > { - let call = IncreaseMessageFee { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, increase_message_fee, DispatchError> + { + let call = increase_message_fee { lane_id, nonce, additional_fee, @@ -17629,16 +16093,9 @@ pub mod api { proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 >, messages_count: ::core::primitive::u32, dispatch_weight: ::core::primitive::u64, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - ReceiveMessagesProof, - DispatchError, - root_mod::Event, - > { - let call = ReceiveMessagesProof { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, receive_messages_proof, DispatchError> + { + let call = receive_messages_proof { relayer_id_at_bridged_chain, proof, messages_count, @@ -17655,11 +16112,10 @@ pub mod api { T, X, A, - ReceiveMessagesDeliveryProof, + receive_messages_delivery_proof, DispatchError, - root_mod::Event, > { - let call = ReceiveMessagesDeliveryProof { + let call = receive_messages_delivery_proof { proof, relayers_state, }; @@ -17671,7 +16127,7 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ParameterUpdated (pub runtime_types :: darwinia_runtime :: messages :: crab_message :: DarwiniaToCrabMessagesParameter ,) ; + pub struct ParameterUpdated (pub runtime_types :: darwinia_runtime :: bridges_message :: crab :: DarwiniaToCrabMessagesParameter ,) ; impl ::subxt::Event for ParameterUpdated { const PALLET: &'static str = "BridgeCrabMessages"; const EVENT: &'static str = "ParameterUpdated"; @@ -17715,8 +16171,8 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct InboundLanes<'a>(pub &'a [::core::primitive::u8; 4usize]); - impl ::subxt::StorageEntry for InboundLanes<'_> { + pub struct InboundLanes(pub [::core::primitive::u8; 4usize]); + impl ::subxt::StorageEntry for InboundLanes { const PALLET: &'static str = "BridgeCrabMessages"; const STORAGE: &'static str = "InboundLanes"; type Value = runtime_types::bp_messages::InboundLaneData< @@ -17729,8 +16185,8 @@ pub mod api { )]) } } - pub struct OutboundLanes<'a>(pub &'a [::core::primitive::u8; 4usize]); - impl ::subxt::StorageEntry for OutboundLanes<'_> { + pub struct OutboundLanes(pub [::core::primitive::u8; 4usize]); + impl ::subxt::StorageEntry for OutboundLanes { const PALLET: &'static str = "BridgeCrabMessages"; const STORAGE: &'static str = "OutboundLanes"; type Value = runtime_types::bp_messages::OutboundLaneData; @@ -17741,8 +16197,8 @@ pub mod api { )]) } } - pub struct OutboundMessages<'a>(pub &'a runtime_types::bp_messages::MessageKey); - impl ::subxt::StorageEntry for OutboundMessages<'_> { + pub struct OutboundMessages(pub runtime_types::bp_messages::MessageKey); + impl ::subxt::StorageEntry for OutboundMessages { const PALLET: &'static str = "BridgeCrabMessages"; const STORAGE: &'static str = "OutboundMessages"; type Value = runtime_types::bp_messages::MessageData<::core::primitive::u128>; @@ -17782,7 +16238,7 @@ pub mod api { } pub async fn inbound_lanes( &self, - _0: &[::core::primitive::u8; 4usize], + _0: [::core::primitive::u8; 4usize], hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::bp_messages::InboundLaneData< @@ -17797,14 +16253,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, InboundLanes<'a>>, + ::subxt::KeyIter<'a, T, InboundLanes>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn outbound_lanes( &self, - _0: &[::core::primitive::u8; 4usize], + _0: [::core::primitive::u8; 4usize], hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::bp_messages::OutboundLaneData, @@ -17817,14 +16273,14 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, OutboundLanes<'a>>, + ::subxt::KeyIter<'a, T, OutboundLanes>, ::subxt::BasicError, > { self.client.storage().iter(hash).await } pub async fn outbound_messages( &self, - _0: &runtime_types::bp_messages::MessageKey, + _0: runtime_types::bp_messages::MessageKey, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< @@ -17839,7 +16295,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, OutboundMessages<'a>>, + ::subxt::KeyIter<'a, T, OutboundMessages>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -17862,18 +16318,16 @@ pub mod api { } } pub mod fee_market { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct EnrollAndLockCollateral { + pub struct enroll_and_lock_collateral { pub lock_collateral: ::core::primitive::u128, pub relay_fee: ::core::option::Option<::core::primitive::u128>, } - impl ::subxt::Call for EnrollAndLockCollateral { + impl ::subxt::Call for enroll_and_lock_collateral { const PALLET: &'static str = "FeeMarket"; const FUNCTION: &'static str = "enroll_and_lock_collateral"; } @@ -17884,10 +16338,10 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct UpdateLockedCollateral { + pub struct update_locked_collateral { pub new_collateral: ::core::primitive::u128, } - impl ::subxt::Call for UpdateLockedCollateral { + impl ::subxt::Call for update_locked_collateral { const PALLET: &'static str = "FeeMarket"; const FUNCTION: &'static str = "update_locked_collateral"; } @@ -17898,16 +16352,16 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct UpdateRelayFee { + pub struct update_relay_fee { pub new_fee: ::core::primitive::u128, } - impl ::subxt::Call for UpdateRelayFee { + impl ::subxt::Call for update_relay_fee { const PALLET: &'static str = "FeeMarket"; const FUNCTION: &'static str = "update_relay_fee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelEnrollment; - impl ::subxt::Call for CancelEnrollment { + pub struct cancel_enrollment; + impl ::subxt::Call for cancel_enrollment { const PALLET: &'static str = "FeeMarket"; const FUNCTION: &'static str = "cancel_enrollment"; } @@ -17918,10 +16372,10 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct SetSlashProtect { + pub struct set_slash_protect { pub slash_protect: ::core::primitive::u128, } - impl ::subxt::Call for SetSlashProtect { + impl ::subxt::Call for set_slash_protect { const PALLET: &'static str = "FeeMarket"; const FUNCTION: &'static str = "set_slash_protect"; } @@ -17932,10 +16386,10 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct SetAssignedRelayersNumber { + pub struct set_assigned_relayers_number { pub number: ::core::primitive::u32, } - impl ::subxt::Call for SetAssignedRelayersNumber { + impl ::subxt::Call for set_assigned_relayers_number { const PALLET: &'static str = "FeeMarket"; const FUNCTION: &'static str = "set_assigned_relayers_number"; } @@ -17964,11 +16418,10 @@ pub mod api { T, X, A, - EnrollAndLockCollateral, + enroll_and_lock_collateral, DispatchError, - root_mod::Event, > { - let call = EnrollAndLockCollateral { + let call = enroll_and_lock_collateral { lock_collateral, relay_fee, }; @@ -17982,55 +16435,33 @@ pub mod api { T, X, A, - UpdateLockedCollateral, + update_locked_collateral, DispatchError, - root_mod::Event, > { - let call = UpdateLockedCollateral { new_collateral }; + let call = update_locked_collateral { new_collateral }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn update_relay_fee( &self, new_fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - UpdateRelayFee, - DispatchError, - root_mod::Event, - > { - let call = UpdateRelayFee { new_fee }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, update_relay_fee, DispatchError> + { + let call = update_relay_fee { new_fee }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn cancel_enrollment( &self, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - CancelEnrollment, - DispatchError, - root_mod::Event, - > { - let call = CancelEnrollment {}; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_enrollment, DispatchError> + { + let call = cancel_enrollment {}; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_slash_protect( &self, slash_protect: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - SetSlashProtect, - DispatchError, - root_mod::Event, - > { - let call = SetSlashProtect { slash_protect }; + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_slash_protect, DispatchError> + { + let call = set_slash_protect { slash_protect }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_assigned_relayers_number( @@ -18041,16 +16472,15 @@ pub mod api { T, X, A, - SetAssignedRelayersNumber, + set_assigned_relayers_number, DispatchError, - root_mod::Event, > { - let call = SetAssignedRelayersNumber { number }; + let call = set_assigned_relayers_number { number }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } } - pub type Event = runtime_types::darwinia_fee_market::pallet::Event; + pub type Event = runtime_types::pallet_fee_market::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -18113,7 +16543,7 @@ pub mod api { } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct FeeMarketSlash( - pub runtime_types::dp_fee::SlashReport< + pub runtime_types::pallet_fee_market::types::SlashReport< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, ::core::primitive::u128, @@ -18126,11 +16556,11 @@ pub mod api { } pub mod storage { use super::runtime_types; - pub struct RelayersMap<'a>(pub &'a ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for RelayersMap<'_> { + pub struct RelayersMap(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for RelayersMap { const PALLET: &'static str = "FeeMarket"; const STORAGE: &'static str = "RelayersMap"; - type Value = runtime_types::dp_fee::Relayer< + type Value = runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >; @@ -18155,7 +16585,7 @@ pub mod api { const PALLET: &'static str = "FeeMarket"; const STORAGE: &'static str = "AssignedRelayers"; type Value = ::std::vec::Vec< - runtime_types::dp_fee::Relayer< + runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -18164,14 +16594,14 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct Orders<'a>( - pub &'a [::core::primitive::u8; 4usize], - pub &'a ::core::primitive::u64, + pub struct Orders( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, ); - impl ::subxt::StorageEntry for Orders<'_> { + impl ::subxt::StorageEntry for Orders { const PALLET: &'static str = "FeeMarket"; const STORAGE: &'static str = "Orders"; - type Value = runtime_types::dp_fee::Order< + type Value = runtime_types::pallet_fee_market::types::Order< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, ::core::primitive::u128, @@ -18210,10 +16640,10 @@ pub mod api { } pub async fn relayers_map( &self, - _0: &::subxt::sp_core::crypto::AccountId32, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::dp_fee::Relayer< + runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -18225,10 +16655,8 @@ pub mod api { pub async fn relayers_map_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, RelayersMap<'a>>, - ::subxt::BasicError, - > { + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, RelayersMap>, ::subxt::BasicError> + { self.client.storage().iter(hash).await } pub async fn relayers( @@ -18247,7 +16675,7 @@ pub mod api { ) -> ::core::result::Result< ::core::option::Option< ::std::vec::Vec< - runtime_types::dp_fee::Relayer< + runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -18260,12 +16688,12 @@ pub mod api { } pub async fn orders( &self, - _0: &[::core::primitive::u8; 4usize], - _1: &::core::primitive::u64, + _0: [::core::primitive::u8; 4usize], + _1: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::dp_fee::Order< + runtime_types::pallet_fee_market::types::Order< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, ::core::primitive::u128, @@ -18279,7 +16707,7 @@ pub mod api { pub async fn orders_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Orders<'a>>, ::subxt::BasicError> + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Orders>, ::subxt::BasicError> { self.client.storage().iter(hash).await } @@ -18307,16 +16735,6 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::core::result::Result< - runtime_types::frame_support::PalletId, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 97u8, 47u8, 102u8, 101u8, 101u8, 109u8, 107u8][..], - )?) - } pub fn treasury_pallet_id( &self, ) -> ::core::result::Result< @@ -18362,7 +16780,7 @@ pub mod api { ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode( - &mut &[88u8, 2u8, 0u8, 0u8][..], + &mut &[44u8, 1u8, 0u8, 0u8][..], )?) } pub fn assigned_relayers_reward_ratio( @@ -18399,24 +16817,22 @@ pub mod api { } } pub mod to_crab_backing { - use super::root_mod; use super::runtime_types; pub mod calls { - use super::root_mod; use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RegisterAndRemoteCreate { + pub struct register_and_remote_create { pub spec_version: ::core::primitive::u32, pub weight: ::core::primitive::u64, pub fee: ::core::primitive::u128, } - impl ::subxt::Call for RegisterAndRemoteCreate { + impl ::subxt::Call for register_and_remote_create { const PALLET: &'static str = "ToCrabBacking"; const FUNCTION: &'static str = "register_and_remote_create"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct LockAndRemoteIssue { + pub struct lock_and_remote_issue { pub spec_version: ::core::primitive::u32, pub weight: ::core::primitive::u64, #[codec(compact)] @@ -18425,17 +16841,17 @@ pub mod api { pub fee: ::core::primitive::u128, pub recipient: runtime_types::primitive_types::H160, } - impl ::subxt::Call for LockAndRemoteIssue { + impl ::subxt::Call for lock_and_remote_issue { const PALLET: &'static str = "ToCrabBacking"; const FUNCTION: &'static str = "lock_and_remote_issue"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct UnlockFromRemote { + pub struct unlock_from_remote { pub token_address: runtime_types::primitive_types::H160, pub amount: runtime_types::primitive_types::U256, pub recipient: ::std::vec::Vec<::core::primitive::u8>, } - impl ::subxt::Call for UnlockFromRemote { + impl ::subxt::Call for unlock_from_remote { const PALLET: &'static str = "ToCrabBacking"; const FUNCTION: &'static str = "unlock_from_remote"; } @@ -18446,10 +16862,10 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct SetSecureLimitedPeriod { + pub struct set_secure_limited_period { pub period: ::core::primitive::u32, } - impl ::subxt::Call for SetSecureLimitedPeriod { + impl ::subxt::Call for set_secure_limited_period { const PALLET: &'static str = "ToCrabBacking"; const FUNCTION: &'static str = "set_secure_limited_period"; } @@ -18460,18 +16876,18 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct SetSecurityLimitationRingAmount { + pub struct set_security_limitation_ring_amount { pub limitation: ::core::primitive::u128, } - impl ::subxt::Call for SetSecurityLimitationRingAmount { + impl ::subxt::Call for set_security_limitation_ring_amount { const PALLET: &'static str = "ToCrabBacking"; const FUNCTION: &'static str = "set_security_limitation_ring_amount"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SetRemoteMappingTokenFactoryAccount { + pub struct set_remote_mapping_token_factory_account { pub account: ::subxt::sp_core::crypto::AccountId32, } - impl ::subxt::Call for SetRemoteMappingTokenFactoryAccount { + impl ::subxt::Call for set_remote_mapping_token_factory_account { const PALLET: &'static str = "ToCrabBacking"; const FUNCTION: &'static str = "set_remote_mapping_token_factory_account"; } @@ -18501,11 +16917,10 @@ pub mod api { T, X, A, - RegisterAndRemoteCreate, + register_and_remote_create, DispatchError, - root_mod::Event, > { - let call = RegisterAndRemoteCreate { + let call = register_and_remote_create { spec_version, weight, fee, @@ -18519,16 +16934,9 @@ pub mod api { value: ::core::primitive::u128, fee: ::core::primitive::u128, recipient: runtime_types::primitive_types::H160, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - LockAndRemoteIssue, - DispatchError, - root_mod::Event, - > { - let call = LockAndRemoteIssue { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, lock_and_remote_issue, DispatchError> + { + let call = lock_and_remote_issue { spec_version, weight, value, @@ -18542,16 +16950,9 @@ pub mod api { token_address: runtime_types::primitive_types::H160, amount: runtime_types::primitive_types::U256, recipient: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - UnlockFromRemote, - DispatchError, - root_mod::Event, - > { - let call = UnlockFromRemote { + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unlock_from_remote, DispatchError> + { + let call = unlock_from_remote { token_address, amount, recipient, @@ -18566,11 +16967,10 @@ pub mod api { T, X, A, - SetSecureLimitedPeriod, + set_secure_limited_period, DispatchError, - root_mod::Event, > { - let call = SetSecureLimitedPeriod { period }; + let call = set_secure_limited_period { period }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_security_limitation_ring_amount( @@ -18581,11 +16981,10 @@ pub mod api { T, X, A, - SetSecurityLimitationRingAmount, + set_security_limitation_ring_amount, DispatchError, - root_mod::Event, > { - let call = SetSecurityLimitationRingAmount { limitation }; + let call = set_security_limitation_ring_amount { limitation }; ::subxt::SubmittableExtrinsic::new(self.client, call) } pub fn set_remote_mapping_token_factory_account( @@ -18596,11 +16995,10 @@ pub mod api { T, X, A, - SetRemoteMappingTokenFactoryAccount, + set_remote_mapping_token_factory_account, DispatchError, - root_mod::Event, > { - let call = SetRemoteMappingTokenFactoryAccount { account }; + let call = set_remote_mapping_token_factory_account { account }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } @@ -18683,11 +17081,11 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct TransactionInfos<'a>( - pub &'a [::core::primitive::u8; 4usize], - pub &'a ::core::primitive::u64, + pub struct TransactionInfos( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, ); - impl ::subxt::StorageEntry for TransactionInfos<'_> { + impl ::subxt::StorageEntry for TransactionInfos { const PALLET: &'static str = "ToCrabBacking"; const STORAGE: &'static str = "TransactionInfos"; type Value = ( @@ -18696,7 +17094,7 @@ pub mod api { ); fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &(&self.0, &self.1), + &self.0, ::subxt::StorageHasher::Blake2_128Concat, )]) } @@ -18737,8 +17135,8 @@ pub mod api { } pub async fn transaction_infos( &self, - _0: &[::core::primitive::u8; 4usize], - _1: &::core::primitive::u64, + _0: [::core::primitive::u8; 4usize], + _1: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option<( @@ -18754,7 +17152,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, TransactionInfos<'a>>, + ::subxt::KeyIter<'a, T, TransactionInfos>, ::subxt::BasicError, > { self.client.storage().iter(hash).await @@ -18892,8 +17290,8 @@ pub mod api { pub begin: ::core::primitive::u64, pub end: ::core::primitive::u64, pub dispatch_results: ::subxt::bitvec::vec::BitVec< - ::core::primitive::u8, ::subxt::bitvec::order::Msb0, + ::core::primitive::u8, >, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -19313,747 +17711,138 @@ pub mod api { } } } - pub mod darwinia_democracy { + pub mod darwinia_relay_authorities { use super::runtime_types; - pub mod conviction { + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Call { + #[codec(index = 0)] + request_authority { + stake: ::core::primitive::u128, + signer: runtime_types::primitive_types::H160, + }, + #[codec(index = 1)] + cancel_request, + #[codec(index = 2)] + kill_candidates, + #[codec(index = 3)] + add_authorities { + account_ids: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + }, + #[codec(index = 4)] + renounce_authority, + #[codec(index = 5)] + remove_authorities { + account_ids: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + }, + #[codec(index = 6)] + submit_signed_mmr_root { + block_number: ::core::primitive::u32, + signature: [::core::primitive::u8; 65usize], + }, + #[codec(index = 7)] + submit_signed_authorities { + signature: [::core::primitive::u8; 65usize], + }, + #[codec(index = 8)] + kill_authorities, + #[codec(index = 9)] + force_new_term, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Error { + #[codec(index = 0)] + CandidateAE, + #[codec(index = 1)] + CandidateNE, + #[codec(index = 2)] + AuthorityAE, + #[codec(index = 3)] + AuthorityNE, + #[codec(index = 4)] + AuthorityIT, + #[codec(index = 5)] + AuthoritiesCountTL, + #[codec(index = 6)] + StakeIns, + #[codec(index = 7)] + OnAuthoritiesChangeDis, + #[codec(index = 8)] + ScheduledTM, + #[codec(index = 9)] + ScheduledSignNE, + #[codec(index = 10)] + SignatureInv, + #[codec(index = 11)] + TermMis, + #[codec(index = 12)] + AuthoritiesMis, + #[codec(index = 13)] + NextAuthoritiesNE, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Instance1; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum RawEvent<_0, _1, _2, _3, _4, _5, _6, _7> { + #[codec(index = 0)] + ScheduleMMRRoot(_1), + #[codec(index = 1)] + MMRRootSigned(_1, _3, ::std::vec::Vec<(_0, _6)>), + #[codec(index = 2)] + ScheduleAuthoritiesChange(_5), + #[codec(index = 3)] + AuthoritiesChangeSigned(_1, ::std::vec::Vec<_4>, ::std::vec::Vec<(_0, _6)>), + #[codec(index = 4)] + SlashOnMisbehavior(_0, _2), + __Ignore(::core::marker::PhantomData<_7>), + } + } + pub mod darwinia_relay_primitives { + use super::runtime_types; + pub mod relay_authorities { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, + pub struct MmrRootToSign<_0, _1, _2> { + pub mmr_root: _0, + pub signatures: ::std::vec::Vec<(_1, _2)>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct RelayAuthority<_0, _1, _2, _3> { + pub account_id: _0, + pub signer: _1, + pub stake: _2, + pub term: _3, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct ScheduledAuthoritiesChange<_0, _1, _2, _3> { + pub next_authorities: ::std::vec::Vec< + runtime_types::darwinia_relay_primitives::relay_authorities::RelayAuthority< + _0, + _1, + _2, + _3, + >, + >, + pub deadline: _3, } } - pub mod pallet { + pub mod relayer_game { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { - #[codec(index = 0)] - propose { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - second { - #[codec(compact)] - proposal: ::core::primitive::u32, - #[codec(compact)] - seconds_upper_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - vote { - #[codec(compact)] - ref_index: ::core::primitive::u32, - vote: runtime_types::darwinia_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 3)] - emergency_cancel { ref_index: ::core::primitive::u32 }, - #[codec(index = 4)] - external_propose { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 5)] - external_propose_majority { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 6)] - external_propose_default { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 7)] - fast_track { - proposal_hash: ::subxt::sp_core::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - }, - #[codec(index = 8)] - veto_external { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 9)] - cancel_referendum { - #[codec(compact)] - ref_index: ::core::primitive::u32, - }, - #[codec(index = 10)] - cancel_queued { which: ::core::primitive::u32 }, - #[codec(index = 11)] - delegate { - to: ::subxt::sp_core::crypto::AccountId32, - conviction: runtime_types::darwinia_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - }, - #[codec(index = 12)] - undelegate, - #[codec(index = 13)] - clear_public_proposals, - #[codec(index = 14)] - note_preimage { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 15)] - note_preimage_operational { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 16)] - note_imminent_preimage { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 17)] - note_imminent_preimage_operational { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 18)] - reap_preimage { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - proposal_len_upper_bound: ::core::primitive::u32, - }, - #[codec(index = 19)] - unlock { - target: ::subxt::sp_core::crypto::AccountId32, - }, - #[codec(index = 20)] - remove_vote { index: ::core::primitive::u32 }, - #[codec(index = 21)] - remove_other_vote { - target: ::subxt::sp_core::crypto::AccountId32, - index: ::core::primitive::u32, - }, - #[codec(index = 22)] - enact_proposal { - proposal_hash: ::subxt::sp_core::H256, - index: ::core::primitive::u32, - }, - #[codec(index = 23)] - blacklist { - proposal_hash: ::subxt::sp_core::H256, - maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 24)] - cancel_proposal { - #[codec(compact)] - prop_index: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - ValueLow, - #[codec(index = 1)] - ProposalMissing, - #[codec(index = 2)] - AlreadyCanceled, - #[codec(index = 3)] - DuplicateProposal, - #[codec(index = 4)] - ProposalBlacklisted, - #[codec(index = 5)] - NotSimpleMajority, - #[codec(index = 6)] - InvalidHash, - #[codec(index = 7)] - NoProposal, - #[codec(index = 8)] - AlreadyVetoed, - #[codec(index = 9)] - DuplicatePreimage, - #[codec(index = 10)] - NotImminent, - #[codec(index = 11)] - TooEarly, - #[codec(index = 12)] - Imminent, - #[codec(index = 13)] - PreimageMissing, - #[codec(index = 14)] - ReferendumInvalid, - #[codec(index = 15)] - PreimageInvalid, - #[codec(index = 16)] - NoneWaiting, - #[codec(index = 17)] - NotVoter, - #[codec(index = 18)] - NoPermission, - #[codec(index = 19)] - AlreadyDelegating, - #[codec(index = 20)] - InsufficientFunds, - #[codec(index = 21)] - NotDelegating, - #[codec(index = 22)] - VotesExist, - #[codec(index = 23)] - InstantNotAllowed, - #[codec(index = 24)] - Nonsense, - #[codec(index = 25)] - WrongUpperBound, - #[codec(index = 26)] - MaxVotesReached, - #[codec(index = 27)] - TooManyProposals, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - Proposed(::core::primitive::u32, ::core::primitive::u128), - #[codec(index = 1)] - Tabled( - ::core::primitive::u32, - ::core::primitive::u128, - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ), - #[codec(index = 2)] - ExternalTabled, - #[codec(index = 3)] - Started( - ::core::primitive::u32, - runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, - ), - #[codec(index = 4)] - Passed(::core::primitive::u32), - #[codec(index = 5)] - NotPassed(::core::primitive::u32), - #[codec(index = 6)] - Cancelled(::core::primitive::u32), - #[codec(index = 7)] - Executed( - ::core::primitive::u32, - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), - #[codec(index = 8)] - Delegated( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ), - #[codec(index = 9)] - Undelegated(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 10)] - Vetoed( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ::core::primitive::u32, - ), - #[codec(index = 11)] - PreimageNoted( - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 12)] - PreimageUsed( - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 13)] - PreimageInvalid(::subxt::sp_core::H256, ::core::primitive::u32), - #[codec(index = 14)] - PreimageMissing(::subxt::sp_core::H256, ::core::primitive::u32), - #[codec(index = 15)] - PreimageReaped( - ::subxt::sp_core::H256, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - ), - #[codec(index = 16)] - Blacklisted(::subxt::sp_core::H256), - } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum ReferendumInfo<_0, _1, _2> { - #[codec(index = 0)] - Ongoing(runtime_types::darwinia_democracy::types::ReferendumStatus<_0, _1, _2>), - #[codec(index = 1)] - Finished { - approved: ::core::primitive::bool, - end: _0, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct ReferendumStatus<_0, _1, _2> { - pub end: _0, - pub proposal_hash: _1, - pub threshold: runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, - pub delay: _0, - pub tally: runtime_types::darwinia_democracy::types::Tally<_2>, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _0, - } - } - pub mod vote { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::darwinia_democracy::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _0 }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct PriorLock<_0, _1>(pub _0, pub _1); - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct Vote(pub ::core::primitive::u8); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Voting<_0, _1, _2> { - #[codec(index = 0)] - Direct { - votes: ::std::vec::Vec<( - _2, - runtime_types::darwinia_democracy::vote::AccountVote<_0>, - )>, - delegations: runtime_types::darwinia_democracy::types::Delegations<_0>, - prior: runtime_types::darwinia_democracy::vote::PriorLock<_2, _0>, - }, - #[codec(index = 1)] - Delegating { - balance: _0, - target: _1, - conviction: runtime_types::darwinia_democracy::conviction::Conviction, - delegations: runtime_types::darwinia_democracy::types::Delegations<_0>, - prior: runtime_types::darwinia_democracy::vote::PriorLock<_2, _0>, - }, - } - } - pub mod vote_threshold { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum VoteThreshold { - #[codec(index = 0)] - SuperMajorityApprove, - #[codec(index = 1)] - SuperMajorityAgainst, - #[codec(index = 2)] - SimpleMajority, - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum PreimageStatus<_0, _1, _2> { - #[codec(index = 0)] - Missing(_2), - #[codec(index = 1)] - Available { - data: ::std::vec::Vec<::core::primitive::u8>, - provider: _0, - deposit: _1, - since: _2, - expiry: ::core::option::Option<_2>, - }, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Releases { - #[codec(index = 0)] - V1, - } - } - pub mod darwinia_elections_phragmen { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Call { - #[codec(index = 0)] - vote { - votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - remove_voter, - #[codec(index = 2)] - submit_candidacy { - #[codec(compact)] - candidate_count: ::core::primitive::u32, - }, - #[codec(index = 3)] - renounce_candidacy { - renouncing: runtime_types::darwinia_elections_phragmen::Renouncing, - }, - #[codec(index = 4)] - remove_member { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - has_replacement: ::core::primitive::bool, - }, - #[codec(index = 5)] - clean_defunct_voters { - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - UnableToVote, - #[codec(index = 1)] - NoVotes, - #[codec(index = 2)] - TooManyVotes, - #[codec(index = 3)] - MaximumVotesExceeded, - #[codec(index = 4)] - LowBalance, - #[codec(index = 5)] - UnableToPayBond, - #[codec(index = 6)] - MustBeVoter, - #[codec(index = 7)] - ReportSelf, - #[codec(index = 8)] - DuplicatedCandidate, - #[codec(index = 9)] - MemberSubmit, - #[codec(index = 10)] - RunnerUpSubmit, - #[codec(index = 11)] - InsufficientCandidateFunds, - #[codec(index = 12)] - NotMember, - #[codec(index = 13)] - InvalidWitnessData, - #[codec(index = 14)] - InvalidVoteCount, - #[codec(index = 15)] - InvalidRenouncing, - #[codec(index = 16)] - InvalidReplacement, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - NewTerm( - ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, - ), - #[codec(index = 1)] - EmptyTerm, - #[codec(index = 2)] - ElectionError, - #[codec(index = 3)] - MemberKicked(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 4)] - Renounced(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 5)] - CandidateSlashed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 6)] - SeatHolderSlashed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Renouncing { - #[codec(index = 0)] - Member, - #[codec(index = 1)] - RunnerUp, - #[codec(index = 2)] - Candidate(#[codec(compact)] ::core::primitive::u32), - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SeatHolder<_0, _1> { - pub who: _0, - pub stake: _1, - pub deposit: _1, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Voter<_0, _1> { - pub votes: ::std::vec::Vec<_0>, - pub stake: _1, - pub deposit: _1, - } - } - pub mod darwinia_fee_market { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Call { - #[codec(index = 0)] - enroll_and_lock_collateral { - lock_collateral: ::core::primitive::u128, - relay_fee: ::core::option::Option<::core::primitive::u128>, - }, - #[codec(index = 1)] - update_locked_collateral { - new_collateral: ::core::primitive::u128, - }, - #[codec(index = 2)] - update_relay_fee { new_fee: ::core::primitive::u128 }, - #[codec(index = 3)] - cancel_enrollment, - #[codec(index = 4)] - set_slash_protect { - slash_protect: ::core::primitive::u128, - }, - #[codec(index = 5)] - set_assigned_relayers_number { number: ::core::primitive::u32 }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - InsufficientBalance, - #[codec(index = 1)] - AlreadyEnrolled, - #[codec(index = 2)] - NotEnrolled, - #[codec(index = 3)] - StillHasOrdersNotConfirmed, - #[codec(index = 4)] - RelayFeeTooLow, - #[codec(index = 5)] - OccupiedRelayer, - #[codec(index = 6)] - ExtendLockFailed, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - Enroll( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u128, - ), - #[codec(index = 1)] - UpdateLockedCollateral( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 2)] - UpdateRelayFee( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 3)] - CancelEnrollment(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 4)] - UpdateCollateralSlashProtect(::core::primitive::u128), - #[codec(index = 5)] - UpdateAssignedRelayersNumber(::core::primitive::u32), - #[codec(index = 6)] - FeeMarketSlash( - runtime_types::dp_fee::SlashReport< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::core::primitive::u128, - >, - ), - } - } - } - pub mod darwinia_relay_authorities { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Call { - #[codec(index = 0)] - request_authority { - stake: ::core::primitive::u128, - signer: runtime_types::primitive_types::H160, - }, - #[codec(index = 1)] - cancel_request, - #[codec(index = 2)] - kill_candidates, - #[codec(index = 3)] - add_authorities { - account_ids: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - }, - #[codec(index = 4)] - renounce_authority, - #[codec(index = 5)] - remove_authorities { - account_ids: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - }, - #[codec(index = 6)] - submit_signed_mmr_root { - block_number: ::core::primitive::u32, - signature: [::core::primitive::u8; 65usize], - }, - #[codec(index = 7)] - submit_signed_authorities { - signature: [::core::primitive::u8; 65usize], - }, - #[codec(index = 8)] - kill_authorities, - #[codec(index = 9)] - force_new_term, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Error { - #[codec(index = 0)] - CandidateAE, - #[codec(index = 1)] - CandidateNE, - #[codec(index = 2)] - AuthorityAE, - #[codec(index = 3)] - AuthorityNE, - #[codec(index = 4)] - AuthorityIT, - #[codec(index = 5)] - AuthoritiesCountTL, - #[codec(index = 6)] - StakeIns, - #[codec(index = 7)] - OnAuthoritiesChangeDis, - #[codec(index = 8)] - ScheduledTM, - #[codec(index = 9)] - ScheduledSignNE, - #[codec(index = 10)] - SignatureInv, - #[codec(index = 11)] - TermMis, - #[codec(index = 12)] - AuthoritiesMis, - #[codec(index = 13)] - NextAuthoritiesNE, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Instance1; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawEvent<_0, _1, _2, _3, _4, _5, _6, _7> { - #[codec(index = 0)] - ScheduleMMRRoot(_1), - #[codec(index = 1)] - MMRRootSigned(_1, _3, ::std::vec::Vec<(_0, _6)>), - #[codec(index = 2)] - ScheduleAuthoritiesChange(_5), - #[codec(index = 3)] - AuthoritiesChangeSigned(_1, ::std::vec::Vec<_4>, ::std::vec::Vec<(_0, _6)>), - #[codec(index = 4)] - SlashOnMisbehavior(_0, _2), - __Ignore(::core::marker::PhantomData<_7>), - } - } - pub mod darwinia_relay_primitives { - use super::runtime_types; - pub mod relay_authorities { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct MmrRootToSign<_0, _1, _2> { - pub mmr_root: _0, - pub signatures: ::std::vec::Vec<(_1, _2)>, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct RelayAuthority<_0, _1, _2, _3> { - pub account_id: _0, - pub signer: _1, - pub stake: _2, - pub term: _3, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct ScheduledAuthoritiesChange<_0, _1, _2, _3> { - pub next_authorities: ::std::vec::Vec< - runtime_types::darwinia_relay_primitives::relay_authorities::RelayAuthority< - _0, - _1, - _2, - _3, - >, - >, - pub deadline: _3, - } - } - pub mod relayer_game { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct RelayAffirmation<_0, _1, _2, _3> { - pub relayer: _1, - pub relay_header_parcels: ::std::vec::Vec<_0>, - pub stake: _2, - pub maybe_extended_relay_affirmation_id: ::core::option::Option< - runtime_types::darwinia_relay_primitives::relayer_game::RelayAffirmationId< - _3, + pub struct RelayAffirmation<_0, _1, _2, _3> { + pub relayer: _1, + pub relay_header_parcels: ::std::vec::Vec<_0>, + pub stake: _2, + pub maybe_extended_relay_affirmation_id: ::core::option::Option< + runtime_types::darwinia_relay_primitives::relayer_game::RelayAffirmationId< + _3, >, >, pub verified_on_chain: ::core::primitive::bool, @@ -20107,9 +17896,9 @@ pub mod api { } pub mod darwinia_runtime { use super::runtime_types; - pub mod messages { + pub mod bridges_message { use super::runtime_types; - pub mod crab_message { + pub mod crab { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -20315,13 +18104,13 @@ pub mod api { #[codec(index = 14)] ImOnline(runtime_types::pallet_im_online::pallet::Call), #[codec(index = 37)] - Democracy(runtime_types::darwinia_democracy::pallet::Call), + Democracy(runtime_types::pallet_democracy::pallet::Call), #[codec(index = 16)] Council(runtime_types::pallet_collective::pallet::Call), #[codec(index = 17)] TechnicalCommittee(runtime_types::pallet_collective::pallet::Call), #[codec(index = 18)] - PhragmenElection(runtime_types::darwinia_elections_phragmen::pallet::Call), + PhragmenElection(runtime_types::pallet_elections_phragmen::pallet::Call), #[codec(index = 19)] TechnicalMembership(runtime_types::pallet_membership::pallet::Call), #[codec(index = 20)] @@ -20335,7 +18124,7 @@ pub mod api { #[codec(index = 27)] Sudo(runtime_types::pallet_sudo::pallet::Call), #[codec(index = 21)] - Vesting(runtime_types::darwinia_vesting::pallet::Call), + Vesting(runtime_types::pallet_vesting::pallet::Call), #[codec(index = 22)] Utility(runtime_types::pallet_utility::pallet::Call), #[codec(index = 23)] @@ -20361,7 +18150,7 @@ pub mod api { #[codec(index = 44)] BridgeCrabMessages(runtime_types::pallet_bridge_messages::pallet::Call), #[codec(index = 45)] - FeeMarket(runtime_types::darwinia_fee_market::pallet::Call), + FeeMarket(runtime_types::pallet_fee_market::pallet::Call), #[codec(index = 46)] ToCrabBacking(runtime_types::to_substrate_backing::pallet::Call), } @@ -20388,13 +18177,13 @@ pub mod api { #[codec(index = 14)] ImOnline(runtime_types::pallet_im_online::pallet::Event), #[codec(index = 37)] - Democracy(runtime_types::darwinia_democracy::pallet::Event), + Democracy(runtime_types::pallet_democracy::pallet::Event), #[codec(index = 16)] Council(runtime_types::pallet_collective::pallet::Event), #[codec(index = 17)] TechnicalCommittee(runtime_types::pallet_collective::pallet::Event), #[codec(index = 18)] - PhragmenElection(runtime_types::darwinia_elections_phragmen::pallet::Event), + PhragmenElection(runtime_types::pallet_elections_phragmen::pallet::Event), #[codec(index = 19)] TechnicalMembership(runtime_types::pallet_membership::pallet::Event), #[codec(index = 20)] @@ -20408,7 +18197,7 @@ pub mod api { #[codec(index = 27)] Sudo(runtime_types::pallet_sudo::pallet::Event), #[codec(index = 21)] - Vesting(runtime_types::darwinia_vesting::pallet::Event), + Vesting(runtime_types::pallet_vesting::pallet::Event), #[codec(index = 22)] Utility(runtime_types::pallet_utility::pallet::Event), #[codec(index = 23)] @@ -20452,7 +18241,7 @@ pub mod api { #[codec(index = 44)] BridgeCrabMessages(runtime_types::pallet_bridge_messages::pallet::Event), #[codec(index = 45)] - FeeMarket(runtime_types::darwinia_fee_market::pallet::Event), + FeeMarket(runtime_types::pallet_fee_market::pallet::Event), #[codec(index = 46)] ToCrabBacking(runtime_types::to_substrate_backing::pallet::Event), } @@ -20524,14 +18313,18 @@ pub mod api { >, }, #[codec(index = 4)] - claim_mature_deposits, + withdraw_unbonded { + num_slashing_spans: ::core::primitive::u32, + }, #[codec(index = 5)] - try_claim_deposits_with_punish { expire_time: ::core::primitive::u64 }, + claim_mature_deposits, #[codec(index = 6)] + try_claim_deposits_with_punish { expire_time: ::core::primitive::u64 }, + #[codec(index = 7)] validate { prefs: runtime_types::darwinia_staking::structs::ValidatorPrefs, }, - #[codec(index = 7)] + #[codec(index = 8)] nominate { targets: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< @@ -20540,80 +18333,80 @@ pub mod api { >, >, }, - #[codec(index = 8)] - chill, #[codec(index = 9)] + chill, + #[codec(index = 10)] set_payee { payee: runtime_types::darwinia_staking::structs::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, }, - #[codec(index = 10)] + #[codec(index = 11)] set_controller { controller: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, }, - #[codec(index = 11)] + #[codec(index = 12)] set_validator_count { #[codec(compact)] new: ::core::primitive::u32, }, - #[codec(index = 12)] + #[codec(index = 13)] increase_validator_count { #[codec(compact)] additional: ::core::primitive::u32, }, - #[codec(index = 13)] + #[codec(index = 14)] scale_validator_count { factor: runtime_types::sp_arithmetic::per_things::Percent, }, - #[codec(index = 14)] - force_no_eras, #[codec(index = 15)] - force_new_era, + force_no_eras, #[codec(index = 16)] + force_new_era, + #[codec(index = 17)] set_invulnerables { invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, }, - #[codec(index = 17)] + #[codec(index = 18)] force_unstake { stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, }, - #[codec(index = 18)] - force_new_era_always, #[codec(index = 19)] + force_new_era_always, + #[codec(index = 20)] cancel_deferred_slash { era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, }, - #[codec(index = 20)] + #[codec(index = 21)] payout_stakers { validator_stash: ::subxt::sp_core::crypto::AccountId32, era: ::core::primitive::u32, }, - #[codec(index = 21)] + #[codec(index = 22)] rebond { #[codec(compact)] plan_to_rebond_ring: ::core::primitive::u128, #[codec(compact)] plan_to_rebond_kton: ::core::primitive::u128, }, - #[codec(index = 22)] + #[codec(index = 23)] set_history_depth { #[codec(compact)] new_history_depth: ::core::primitive::u32, #[codec(compact)] era_items_deleted: ::core::primitive::u32, }, - #[codec(index = 23)] + #[codec(index = 24)] reap_stash { stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, }, - #[codec(index = 24)] + #[codec(index = 25)] kick { who: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< @@ -20622,7 +18415,7 @@ pub mod api { >, >, }, - #[codec(index = 25)] + #[codec(index = 26)] set_staking_limits { min_nominator_bond: ::core::primitive::u128, min_validator_bond: ::core::primitive::u128, @@ -20632,7 +18425,7 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Percent, >, }, - #[codec(index = 26)] + #[codec(index = 27)] chill_other { controller: ::subxt::sp_core::crypto::AccountId32, }, @@ -20804,7 +18597,7 @@ pub mod api { )] pub struct EraRewardPoints<_0> { pub total: ::core::primitive::u32, - pub individual: ::subxt::KeyedVec<_0, ::core::primitive::u32>, + pub individual: ::std::collections::BTreeMap<_0, ::core::primitive::u32>, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -20936,599 +18729,882 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct UnappliedSlash<_0, _1, _2> { - pub validator: _0, - pub own: runtime_types::darwinia_staking::slashing::RK<_1, _1>, - pub others: ::std::vec::Vec<( - _0, - runtime_types::darwinia_staking::slashing::RK<_1, _1>, - )>, - pub reporters: ::std::vec::Vec<_0>, - pub payout: runtime_types::darwinia_staking::slashing::RK<_1, _1>, - #[codec(skip)] - pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, + pub struct UnappliedSlash<_0, _1, _2> { + pub validator: _0, + pub own: runtime_types::darwinia_staking::slashing::RK<_1, _1>, + pub others: ::std::vec::Vec<( + _0, + runtime_types::darwinia_staking::slashing::RK<_1, _1>, + )>, + pub reporters: ::std::vec::Vec<_0>, + pub payout: runtime_types::darwinia_staking::slashing::RK<_1, _1>, + #[codec(skip)] + pub __subxt_unused_type_params: ::core::marker::PhantomData<_2>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct ValidatorPrefs { + #[codec(compact)] + pub commission: runtime_types::sp_arithmetic::per_things::Perbill, + pub blocked: ::core::primitive::bool, + } + } + } + pub mod darwinia_support { + use super::runtime_types; + pub mod structs { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct StakingLock<_0, _1> { + pub staking_amount: _0, + pub unbondings: + runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< + runtime_types::darwinia_support::structs::Unbonding<_0, _1>, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Unbonding<_0, _1> { + pub amount: _0, + pub until: _1, + } + } + } + pub mod dp_asset { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenMetadata { + pub token_type: ::core::primitive::u32, + pub address: runtime_types::primitive_types::H160, + pub name: ::std::vec::Vec<::core::primitive::u8>, + pub symbol: ::std::vec::Vec<::core::primitive::u8>, + pub decimal: ::core::primitive::u8, + } + } + pub mod ethbloom { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Bloom(pub [::core::primitive::u8; 256usize]); + } + pub mod ethereum_primitives { + use super::runtime_types; + pub mod ethashproof { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct EthashProof { + pub dag_nodes: [runtime_types::primitive_types::H512; 2usize], + pub proof: ::std::vec::Vec, + } + } + pub mod header { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Header { + pub parent_hash: ::subxt::sp_core::H256, + pub timestamp: ::core::primitive::u64, + pub number: ::core::primitive::u64, + pub author: runtime_types::primitive_types::H160, + pub transactions_root: ::subxt::sp_core::H256, + pub uncles_hash: ::subxt::sp_core::H256, + pub extra_data: ::std::vec::Vec<::core::primitive::u8>, + pub state_root: ::subxt::sp_core::H256, + pub receipts_root: ::subxt::sp_core::H256, + pub log_bloom: runtime_types::ethbloom::Bloom, + pub gas_used: runtime_types::primitive_types::U256, + pub gas_limit: runtime_types::primitive_types::U256, + pub difficulty: runtime_types::primitive_types::U256, + pub seal: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub base_fee_per_gas: + ::core::option::Option, + pub hash: ::core::option::Option<::subxt::sp_core::H256>, } + } + pub mod log_entry { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct ValidatorPrefs { - #[codec(compact)] - pub commission: runtime_types::sp_arithmetic::per_things::Perbill, - pub blocked: ::core::primitive::bool, + pub struct LogEntry { + pub address: runtime_types::primitive_types::H160, + pub topics: ::std::vec::Vec<::subxt::sp_core::H256>, + pub data: ::std::vec::Vec<::core::primitive::u8>, } } - } - pub mod darwinia_support { - use super::runtime_types; - pub mod structs { + pub mod receipt { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BalanceLock<_0, _1> { - pub id: [::core::primitive::u8; 8usize], - pub lock_for: runtime_types::darwinia_support::structs::LockFor<_0, _1>, - pub lock_reasons: runtime_types::darwinia_support::structs::LockReasons, + pub struct LegacyReceipt { + pub gas_used: runtime_types::primitive_types::U256, + pub log_bloom: runtime_types::ethbloom::Bloom, + pub logs: + ::std::vec::Vec, + pub outcome: runtime_types::ethereum_primitives::receipt::TransactionOutcome, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum LockFor<_0, _1> { - #[codec(index = 0)] - Common { amount: _0 }, - #[codec(index = 1)] - Staking(runtime_types::darwinia_support::structs::StakingLock<_0, _1>), + pub struct ReceiptProof { + pub index: ::core::primitive::u64, + pub proof: ::std::vec::Vec<::core::primitive::u8>, + pub header_hash: ::subxt::sp_core::H256, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum LockReasons { + pub enum TransactionOutcome { #[codec(index = 0)] - Fee, + Unknown, #[codec(index = 1)] - Misc, + StateRoot(::subxt::sp_core::H256), #[codec(index = 2)] - All, + StatusCode(::core::primitive::u8), } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct StakingLock<_0, _1> { - pub staking_amount: _0, - pub unbondings: - runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::Unbonding<_0, _1>, - >, + pub enum TypedReceipt { + #[codec(index = 0)] + Legacy(runtime_types::ethereum_primitives::receipt::LegacyReceipt), + #[codec(index = 1)] + AccessList(runtime_types::ethereum_primitives::receipt::LegacyReceipt), + #[codec(index = 2)] + EIP1559Transaction(runtime_types::ethereum_primitives::receipt::LegacyReceipt), } + } + } + pub mod ethereum_types { + use super::runtime_types; + pub mod hash { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct Unbonding<_0, _1> { - pub amount: _0, - pub until: _1, - } + pub struct H128(pub [::core::primitive::u8; 16usize]); } } - pub mod darwinia_vesting { + pub mod finality_grandpa { use super::runtime_types; - pub mod pallet { + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Commit<_0, _1, _2, _3> { + pub target_hash: _0, + pub target_number: _1, + pub precommits: ::std::vec::Vec< + runtime_types::finality_grandpa::SignedPrecommit<_0, _1, _2, _3>, + >, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Equivocation<_0, _1, _2> { + pub round_number: ::core::primitive::u64, + pub identity: _0, + pub first: (_1, _2), + pub second: (_1, _2), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Precommit<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Prevote<_0, _1> { + pub target_hash: _0, + pub target_number: _1, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct SignedPrecommit<_0, _1, _2, _3> { + pub precommit: runtime_types::finality_grandpa::Precommit<_0, _1>, + pub signature: _2, + pub id: _3, + } + } + pub mod frame_support { + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct BoundedBTreeMap<_0, _1>(pub ::std::collections::BTreeMap<_0, _1>); + } + pub mod bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + } + pub mod traits { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct WrapperOpaque<_0>( + #[codec(compact)] pub ::core::primitive::u32, + pub _0, + ); + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + } + } + } + pub mod weights { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { + pub enum DispatchClass { #[codec(index = 0)] - vest, + Normal, #[codec(index = 1)] - vest_other { - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - }, + Operational, #[codec(index = 2)] - vested_transfer { - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - }, - #[codec(index = 3)] - force_vested_transfer { - source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - }, - #[codec(index = 4)] - merge_schedules { - schedule1_index: ::core::primitive::u32, - schedule2_index: ::core::primitive::u32, - }, + Mandatory, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Error { - #[codec(index = 0)] - NotVesting, - #[codec(index = 1)] - AtMaxVestingSchedules, - #[codec(index = 2)] - AmountLow, - #[codec(index = 3)] - ScheduleIndexOutOfBounds, - #[codec(index = 4)] - InvalidScheduleParams, + pub struct DispatchInfo { + pub weight: ::core::primitive::u64, + pub class: runtime_types::frame_support::weights::DispatchClass, + pub pays_fee: runtime_types::frame_support::weights::Pays, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Event { + pub enum Pays { #[codec(index = 0)] - VestingUpdated( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + Yes, #[codec(index = 1)] - VestingCompleted(::subxt::sp_core::crypto::AccountId32), + No, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, } - } - pub mod vesting_info { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct VestingInfo<_0, _1> { - pub locked: _0, - pub per_block: _0, - pub starting_block: _1, + pub struct WeightToFeeCoefficient<_0> { + pub coeff_integer: _0, + pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, + pub negative: ::core::primitive::bool, + pub degree: ::core::primitive::u8, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Releases { - #[codec(index = 0)] - V0, - #[codec(index = 1)] - V1, - } - } - pub mod dp_asset { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TokenMetadata { - pub token_type: ::core::primitive::u32, - pub address: runtime_types::primitive_types::H160, - pub name: ::std::vec::Vec<::core::primitive::u8>, - pub symbol: ::std::vec::Vec<::core::primitive::u8>, - pub decimal: ::core::primitive::u8, - } - } - pub mod dp_fee { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Order<_0, _1, _2> { - pub lane: [::core::primitive::u8; 4usize], - pub message: ::core::primitive::u64, - pub sent_time: _1, - pub confirm_time: ::core::option::Option<_1>, - pub locked_collateral: _2, - pub relayers: ::std::vec::Vec>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PriorRelayer<_0, _1, _2> { - pub id: _0, - pub fee: _2, - pub valid_range: ::core::ops::Range<_1>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Relayer<_0, _1> { - pub id: _0, - pub collateral: _1, - pub fee: _1, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SlashReport<_0, _1, _2> { - pub lane: [::core::primitive::u8; 4usize], - pub message: ::core::primitive::u64, - pub sent_time: _1, - pub confirm_time: ::core::option::Option<_1>, - pub delay_time: ::core::option::Option<_1>, - pub account_id: _0, - pub amount: _2, - } - } - pub mod ethbloom { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Bloom(pub [::core::primitive::u8; 256usize]); + pub struct PalletId(pub [::core::primitive::u8; 8usize]); } - pub mod ethereum_primitives { + pub mod frame_system { use super::runtime_types; - pub mod ethashproof { + pub mod extensions { use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct EthashProof { - pub dag_nodes: [runtime_types::primitive_types::H512; 2usize], - pub proof: ::std::vec::Vec, + pub mod check_genesis { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct CheckGenesis; } - } - pub mod header { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Header { - pub parent_hash: ::subxt::sp_core::H256, - pub timestamp: ::core::primitive::u64, - pub number: ::core::primitive::u64, - pub author: runtime_types::primitive_types::H160, - pub transactions_root: ::subxt::sp_core::H256, - pub uncles_hash: ::subxt::sp_core::H256, - pub extra_data: ::std::vec::Vec<::core::primitive::u8>, - pub state_root: ::subxt::sp_core::H256, - pub receipts_root: ::subxt::sp_core::H256, - pub log_bloom: runtime_types::ethbloom::Bloom, - pub gas_used: runtime_types::primitive_types::U256, - pub gas_limit: runtime_types::primitive_types::U256, - pub difficulty: runtime_types::primitive_types::U256, - pub seal: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub base_fee_per_gas: - ::core::option::Option, - pub hash: ::core::option::Option<::subxt::sp_core::H256>, + pub mod check_mortality { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); + } + pub mod check_nonce { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); + } + pub mod check_spec_version { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct CheckSpecVersion; + } + pub mod check_tx_version { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct CheckTxVersion; + } + pub mod check_weight { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct CheckWeight; } } - pub mod log_entry { + pub mod limits { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct LogEntry { - pub address: runtime_types::primitive_types::H160, - pub topics: ::std::vec::Vec<::subxt::sp_core::H256>, - pub data: ::std::vec::Vec<::core::primitive::u8>, + pub struct BlockLength { + pub max: runtime_types::frame_support::weights::PerDispatchClass< + ::core::primitive::u32, + >, } - } - pub mod receipt { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct LegacyReceipt { - pub gas_used: runtime_types::primitive_types::U256, - pub log_bloom: runtime_types::ethbloom::Bloom, - pub logs: - ::std::vec::Vec, - pub outcome: runtime_types::ethereum_primitives::receipt::TransactionOutcome, + pub struct BlockWeights { + pub base_block: ::core::primitive::u64, + pub max_block: ::core::primitive::u64, + pub per_class: runtime_types::frame_support::weights::PerDispatchClass< + runtime_types::frame_system::limits::WeightsPerClass, + >, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct ReceiptProof { - pub index: ::core::primitive::u64, - pub proof: ::std::vec::Vec<::core::primitive::u8>, - pub header_hash: ::subxt::sp_core::H256, + pub struct WeightsPerClass { + pub base_extrinsic: ::core::primitive::u64, + pub max_extrinsic: ::core::option::Option<::core::primitive::u64>, + pub max_total: ::core::option::Option<::core::primitive::u64>, + pub reserved: ::core::option::Option<::core::primitive::u64>, } + } + pub mod pallet { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum TransactionOutcome { + pub enum Call { #[codec(index = 0)] - Unknown, + fill_block { + ratio: runtime_types::sp_arithmetic::per_things::Perbill, + }, #[codec(index = 1)] - StateRoot(::subxt::sp_core::H256), + remark { + remark: ::std::vec::Vec<::core::primitive::u8>, + }, #[codec(index = 2)] - StatusCode(::core::primitive::u8), + set_heap_pages { pages: ::core::primitive::u64 }, + #[codec(index = 3)] + set_code { + code: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + set_code_without_checks { + code: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 5)] + set_changes_trie_config { + changes_trie_config: ::core::option::Option< + runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, + >, + }, + #[codec(index = 6)] + set_storage { + items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 7)] + kill_storage { + keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + }, + #[codec(index = 8)] + kill_prefix { + prefix: ::std::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + }, + #[codec(index = 9)] + remark_with_event { + remark: ::std::vec::Vec<::core::primitive::u8>, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum TypedReceipt { + pub enum Error { #[codec(index = 0)] - Legacy(runtime_types::ethereum_primitives::receipt::LegacyReceipt), + InvalidSpecName, #[codec(index = 1)] - AccessList(runtime_types::ethereum_primitives::receipt::LegacyReceipt), + SpecVersionNeedsToIncrease, #[codec(index = 2)] - EIP1559Transaction(runtime_types::ethereum_primitives::receipt::LegacyReceipt), + FailedToExtractRuntimeVersion, + #[codec(index = 3)] + NonDefaultComposite, + #[codec(index = 4)] + NonZeroRefCount, } - } - } - pub mod ethereum_types { - use super::runtime_types; - pub mod hash { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct H128(pub [::core::primitive::u8; 16usize]); + pub enum Event { + #[codec(index = 0)] + ExtrinsicSuccess(runtime_types::frame_support::weights::DispatchInfo), + #[codec(index = 1)] + ExtrinsicFailed( + runtime_types::sp_runtime::DispatchError, + runtime_types::frame_support::weights::DispatchInfo, + ), + #[codec(index = 2)] + CodeUpdated, + #[codec(index = 3)] + NewAccount(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 4)] + KilledAccount(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 5)] + Remarked( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ), + } } - } - pub mod finality_grandpa { - use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Commit<_0, _1, _2, _3> { - pub target_hash: _0, - pub target_number: _1, - pub precommits: ::std::vec::Vec< - runtime_types::finality_grandpa::SignedPrecommit<_0, _1, _2, _3>, - >, + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: _0, + pub providers: _0, + pub sufficients: _0, + pub data: _1, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Equivocation<_0, _1, _2> { - pub round_number: ::core::primitive::u64, - pub identity: _0, - pub first: (_1, _2), - pub second: (_1, _2), + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::std::vec::Vec<_1>, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Precommit<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::std::string::String, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Prevote<_0, _1> { - pub target_hash: _0, - pub target_number: _1, + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SignedPrecommit<_0, _1, _2, _3> { - pub precommit: runtime_types::finality_grandpa::Precommit<_0, _1>, - pub signature: _2, - pub id: _3, + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, } } - pub mod frame_support { + pub mod pallet_authorship { use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub mod bounded_btree_map { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct BoundedBTreeMap<_0, _1>(pub ::subxt::KeyedVec<_0, _1>); - } - pub mod bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - pub mod weak_bounded_vec { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); - } - } - pub mod traits { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct WrapperOpaque<_0>( - #[codec(compact)] pub ::core::primitive::u32, - pub _0, - ); - } - pub mod tokens { - use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum BalanceStatus { - #[codec(index = 0)] - Free, - #[codec(index = 1)] - Reserved, - } - } - } - } - pub mod weights { + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum DispatchClass { + pub enum Call { #[codec(index = 0)] - Normal, - #[codec(index = 1)] - Operational, - #[codec(index = 2)] - Mandatory, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct DispatchInfo { - pub weight: ::core::primitive::u64, - pub class: runtime_types::frame_support::weights::DispatchClass, - pub pays_fee: runtime_types::frame_support::weights::Pays, + set_uncles { + new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Pays { + pub enum Error { #[codec(index = 0)] - Yes, + InvalidUncleParent, #[codec(index = 1)] - No, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct PerDispatchClass<_0> { - pub normal: _0, - pub operational: _0, - pub mandatory: _0, + UnclesAlreadySet, + #[codec(index = 2)] + TooManyUncles, + #[codec(index = 3)] + GenesisUncle, + #[codec(index = 4)] + TooHighUncle, + #[codec(index = 5)] + UncleAlreadyIncluded, + #[codec(index = 6)] + OldUncle, } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum UncleEntryItem<_0, _1, _2> { + #[codec(index = 0)] + InclusionHeight(_0), + #[codec(index = 1)] + Uncle(_1, ::core::option::Option<_2>), + } + } + pub mod pallet_babe { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, + pub enum Call { + #[codec(index = 0)] + report_equivocation { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 1)] + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, + }, + #[codec(index = 2)] + plan_config_change { + config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct WeightToFeeCoefficient<_0> { - pub coeff_integer: _0, - pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, - pub negative: ::core::primitive::bool, - pub degree: ::core::primitive::u8, + pub enum Error { + #[codec(index = 0)] + InvalidEquivocationProof, + #[codec(index = 1)] + InvalidKeyOwnershipProof, + #[codec(index = 2)] + DuplicateOffenceReport, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PalletId(pub [::core::primitive::u8; 8usize]); } - pub mod frame_system { + pub mod pallet_balances { use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_genesis { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckGenesis; - } - pub mod check_mortality { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); - } - pub mod check_nonce { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); - } - pub mod check_spec_version { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckSpecVersion; - } - pub mod check_tx_version { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckTxVersion; - } - pub mod check_weight { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckWeight; - } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::pallet_balances::Reasons, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, } - pub mod limits { + } + pub mod pallet_bounties { + use super::runtime_types; + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BlockLength { - pub max: runtime_types::frame_support::weights::PerDispatchClass< - ::core::primitive::u32, - >, + pub enum Call { + #[codec(index = 0)] + propose_bounty { + #[codec(compact)] + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + approve_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 2)] + propose_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + curator: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 3)] + unassign_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 4)] + accept_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 5)] + award_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + }, + #[codec(index = 6)] + claim_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 7)] + close_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + extend_bounty_expiry { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BlockWeights { - pub base_block: ::core::primitive::u64, - pub max_block: ::core::primitive::u64, - pub per_class: runtime_types::frame_support::weights::PerDispatchClass< - runtime_types::frame_system::limits::WeightsPerClass, - >, + pub enum Error { + #[codec(index = 0)] + InsufficientProposersBalance, + #[codec(index = 1)] + InvalidIndex, + #[codec(index = 2)] + ReasonTooBig, + #[codec(index = 3)] + UnexpectedStatus, + #[codec(index = 4)] + RequireCurator, + #[codec(index = 5)] + InvalidValue, + #[codec(index = 6)] + InvalidFee, + #[codec(index = 7)] + PendingPayout, + #[codec(index = 8)] + Premature, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct WeightsPerClass { - pub base_extrinsic: ::core::primitive::u64, - pub max_extrinsic: ::core::option::Option<::core::primitive::u64>, - pub max_total: ::core::option::Option<::core::primitive::u64>, - pub reserved: ::core::option::Option<::core::primitive::u64>, + pub enum Event { + #[codec(index = 0)] + BountyProposed(::core::primitive::u32), + #[codec(index = 1)] + BountyRejected(::core::primitive::u32, ::core::primitive::u128), + #[codec(index = 2)] + BountyBecameActive(::core::primitive::u32), + #[codec(index = 3)] + BountyAwarded( + ::core::primitive::u32, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 4)] + BountyClaimed( + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 5)] + BountyCanceled(::core::primitive::u32), + #[codec(index = 6)] + BountyExtended(::core::primitive::u32), } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Bounty<_0, _1, _2> { + pub proposer: _0, + pub value: _1, + pub fee: _1, + pub curator_deposit: _1, + pub bond: _1, + pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum BountyStatus<_0, _1> { + #[codec(index = 0)] + Proposed, + #[codec(index = 1)] + Approved, + #[codec(index = 2)] + Funded, + #[codec(index = 3)] + CuratorProposed { curator: _0 }, + #[codec(index = 4)] + Active { curator: _0, update_due: _1 }, + #[codec(index = 5)] + PendingPayout { + curator: _0, + beneficiary: _0, + unlock_at: _1, + }, + } + } + pub mod pallet_bridge_dispatch { + use super::runtime_types; pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { + pub enum Event { #[codec(index = 0)] - fill_block { - ratio: runtime_types::sp_arithmetic::per_things::Perbill, - }, + MessageRejected( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ), #[codec(index = 1)] - remark { - remark: ::std::vec::Vec<::core::primitive::u8>, - }, + MessageVersionSpecMismatch( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ::core::primitive::u32, + ::core::primitive::u32, + ), #[codec(index = 2)] - set_heap_pages { pages: ::core::primitive::u64 }, + MessageWeightMismatch( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ::core::primitive::u64, + ::core::primitive::u64, + ), #[codec(index = 3)] - set_code { - code: ::std::vec::Vec<::core::primitive::u8>, - }, + MessageSignatureMismatch( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ), #[codec(index = 4)] - set_code_without_checks { - code: ::std::vec::Vec<::core::primitive::u8>, - }, + MessageCallDecodeFailed( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ), #[codec(index = 5)] - set_changes_trie_config { - changes_trie_config: ::core::option::Option< - runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, - >, - }, + MessageCallRejected( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ), #[codec(index = 6)] - set_storage { - items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - }, + MessageDispatchPaymentFailed( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u64, + ), #[codec(index = 7)] - kill_storage { - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - }, + MessageDispatched( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ), #[codec(index = 8)] - kill_prefix { - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, + _Dummy, + } + } + } + pub mod pallet_bridge_grandpa { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + submit_finality_proof { + finality_target: ::std::boxed::Box< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + justification: + runtime_types::bp_header_chain::justification::GrandpaJustification< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + #[codec(index = 1)] + initialize { + init_data: runtime_types::bp_header_chain::InitializationData< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, }, - #[codec(index = 9)] - remark_with_event { - remark: ::std::vec::Vec<::core::primitive::u8>, + #[codec(index = 2)] + set_owner { + new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + }, + #[codec(index = 3)] + set_operational { + operational: ::core::primitive::bool, }, } #[derive( @@ -21536,80 +19612,74 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - InvalidSpecName, + InvalidJustification, #[codec(index = 1)] - SpecVersionNeedsToIncrease, + InvalidAuthoritySet, #[codec(index = 2)] - FailedToExtractRuntimeVersion, + TooManyRequests, #[codec(index = 3)] - NonDefaultComposite, + OldHeader, #[codec(index = 4)] - NonZeroRefCount, + UnknownHeader, + #[codec(index = 5)] + UnsupportedScheduledChange, + #[codec(index = 6)] + NotInitialized, + #[codec(index = 7)] + AlreadyInitialized, + #[codec(index = 8)] + Halted, + #[codec(index = 9)] + StorageRootMismatch, } + } + } + pub mod pallet_bridge_messages { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Event { + pub enum Call { + # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: OperatingMode , } , # [codec (index = 2)] update_pallet_parameter { parameter : runtime_types :: darwinia_runtime :: bridges_message :: crab :: DarwiniaToCrabMessagesParameter , } , # [codec (index = 3)] send_message { lane_id : [:: core :: primitive :: u8 ; 4usize] , payload : runtime_types :: bp_message_dispatch :: MessagePayload < :: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_runtime :: MultiSigner , runtime_types :: sp_runtime :: MultiSignature , :: std :: vec :: Vec < :: core :: primitive :: u8 > > , delivery_and_dispatch_fee : :: core :: primitive :: u128 , } , # [codec (index = 4)] increase_message_fee { lane_id : [:: core :: primitive :: u8 ; 4usize] , nonce : :: core :: primitive :: u64 , additional_fee : :: core :: primitive :: u128 , } , # [codec (index = 5)] receive_messages_proof { relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: core :: primitive :: u64 , } , # [codec (index = 6)] receive_messages_delivery_proof { proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } , } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { #[codec(index = 0)] - ExtrinsicSuccess(runtime_types::frame_support::weights::DispatchInfo), + Halted, #[codec(index = 1)] - ExtrinsicFailed( - runtime_types::sp_runtime::DispatchError, - runtime_types::frame_support::weights::DispatchInfo, - ), + MessageRejectedByChainVerifier, #[codec(index = 2)] - CodeUpdated, + MessageRejectedByLaneVerifier, #[codec(index = 3)] - NewAccount(::subxt::sp_core::crypto::AccountId32), + FailedToWithdrawMessageFee, #[codec(index = 4)] - KilledAccount(::subxt::sp_core::crypto::AccountId32), + TooManyMessagesInTheProof, #[codec(index = 5)] - Remarked( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ), + InvalidMessagesProof, + #[codec(index = 6)] + InvalidMessagesDeliveryProof, + #[codec(index = 7)] + InvalidUnrewardedRelayers, + #[codec(index = 8)] + InvalidUnrewardedRelayersState, + #[codec(index = 9)] + MessageIsAlreadyDelivered, + #[codec(index = 10)] + MessageIsNotYetSent, + #[codec(index = 11)] + TryingToConfirmMoreMessagesThanExpected, } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AccountInfo<_0, _1> { - pub nonce: _0, - pub consumers: _0, - pub providers: _0, - pub sufficients: _0, - pub data: _1, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct EventRecord<_0, _1> { - pub phase: runtime_types::frame_system::Phase, - pub event: _0, - pub topics: ::std::vec::Vec<_1>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct LastRuntimeUpgradeInfo { - #[codec(compact)] - pub spec_version: ::core::primitive::u32, - pub spec_name: ::std::string::String, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Phase { - #[codec(index = 0)] - ApplyExtrinsic(::core::primitive::u32), - #[codec(index = 1)] - Finalization, - #[codec(index = 2)] - Initialization, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Root, - #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + # [codec (index = 0)] ParameterUpdated (runtime_types :: darwinia_runtime :: bridges_message :: crab :: DarwiniaToCrabMessagesParameter ,) , # [codec (index = 1)] MessageAccepted ([:: core :: primitive :: u8 ; 4usize] , :: core :: primitive :: u64 ,) , # [codec (index = 2)] MessagesDelivered ([:: core :: primitive :: u8 ; 4usize] , runtime_types :: bp_messages :: DeliveredMessages ,) , } } } - pub mod pallet_authorship { + pub mod pallet_collective { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -21618,13 +19688,45 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - set_uncles { - new_uncles: ::std::vec::Vec< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, + set_members { + new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + old_count: ::core::primitive::u32, + }, + #[codec(index = 1)] + execute { + proposal: ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 2)] + propose { + #[codec(compact)] + threshold: ::core::primitive::u32, + proposal: ::std::boxed::Box, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 3)] + vote { + proposal: ::subxt::sp_core::H256, + #[codec(compact)] + index: ::core::primitive::u32, + approve: ::core::primitive::bool, + }, + #[codec(index = 4)] + close { + proposal_hash: ::subxt::sp_core::H256, + #[codec(compact)] + index: ::core::primitive::u32, + #[codec(compact)] + proposal_weight_bound: ::core::primitive::u64, + #[codec(compact)] + length_bound: ::core::primitive::u32, + }, + #[codec(index = 5)] + disapprove_proposal { + proposal_hash: ::subxt::sp_core::H256, }, } #[derive( @@ -21632,83 +19734,109 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - InvalidUncleParent, + NotMember, #[codec(index = 1)] - UnclesAlreadySet, + DuplicateProposal, #[codec(index = 2)] - TooManyUncles, + ProposalMissing, #[codec(index = 3)] - GenesisUncle, + WrongIndex, #[codec(index = 4)] - TooHighUncle, + DuplicateVote, #[codec(index = 5)] - UncleAlreadyIncluded, + AlreadyInitialized, #[codec(index = 6)] - OldUncle, + TooEarly, + #[codec(index = 7)] + TooManyProposals, + #[codec(index = 8)] + WrongProposalWeight, + #[codec(index = 9)] + WrongProposalLength, } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum UncleEntryItem<_0, _1, _2> { - #[codec(index = 0)] - InclusionHeight(_0), - #[codec(index = 1)] - Uncle(_1, ::core::option::Option<_2>), - } - } - pub mod pallet_babe { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { + pub enum Event { #[codec(index = 0)] - report_equivocation { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, + Proposed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::subxt::sp_core::H256, + ::core::primitive::u32, + ), #[codec(index = 1)] - report_equivocation_unsigned { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, + Voted( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ::core::primitive::bool, + ::core::primitive::u32, + ::core::primitive::u32, + ), #[codec(index = 2)] - plan_config_change { - config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - }, + Approved(::subxt::sp_core::H256), + #[codec(index = 3)] + Disapproved(::subxt::sp_core::H256), + #[codec(index = 4)] + Executed( + ::subxt::sp_core::H256, + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ), + #[codec(index = 5)] + MemberExecuted( + ::subxt::sp_core::H256, + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ), + #[codec(index = 6)] + Closed( + ::subxt::sp_core::H256, + ::core::primitive::u32, + ::core::primitive::u32, + ), } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Members(::core::primitive::u32, ::core::primitive::u32), + #[codec(index = 1)] + Member(_0), + #[codec(index = 2)] + _Phantom, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Votes<_0, _1> { + pub index: _1, + pub threshold: _1, + pub ayes: ::std::vec::Vec<_0>, + pub nays: ::std::vec::Vec<_0>, + pub end: _1, + } + } + pub mod pallet_democracy { + use super::runtime_types; + pub mod conviction { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Error { + pub enum Conviction { #[codec(index = 0)] - InvalidEquivocationProof, + None, #[codec(index = 1)] - InvalidKeyOwnershipProof, + Locked1x, #[codec(index = 2)] - DuplicateOffenceReport, + Locked2x, + #[codec(index = 3)] + Locked3x, + #[codec(index = 4)] + Locked4x, + #[codec(index = 5)] + Locked5x, + #[codec(index = 6)] + Locked6x, } } - } - pub mod pallet_bounties { - use super::runtime_types; pub mod pallet { use super::runtime_types; #[derive( @@ -21716,61 +19844,114 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - propose_bounty { + propose { + proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, }, #[codec(index = 1)] - approve_bounty { + second { #[codec(compact)] - bounty_id: ::core::primitive::u32, + proposal: ::core::primitive::u32, + #[codec(compact)] + seconds_upper_bound: ::core::primitive::u32, }, #[codec(index = 2)] - propose_curator { + vote { #[codec(compact)] - bounty_id: ::core::primitive::u32, - curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, >, - #[codec(compact)] - fee: ::core::primitive::u128, }, #[codec(index = 3)] - unassign_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, + emergency_cancel { ref_index: ::core::primitive::u32 }, #[codec(index = 4)] - accept_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, + external_propose { + proposal_hash: ::subxt::sp_core::H256, }, #[codec(index = 5)] - award_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, + external_propose_majority { + proposal_hash: ::subxt::sp_core::H256, }, #[codec(index = 6)] - claim_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, + external_propose_default { + proposal_hash: ::subxt::sp_core::H256, }, #[codec(index = 7)] - close_bounty { - #[codec(compact)] - bounty_id: ::core::primitive::u32, + fast_track { + proposal_hash: ::subxt::sp_core::H256, + voting_period: ::core::primitive::u32, + delay: ::core::primitive::u32, }, #[codec(index = 8)] - extend_bounty_expiry { + veto_external { + proposal_hash: ::subxt::sp_core::H256, + }, + #[codec(index = 9)] + cancel_referendum { #[codec(compact)] - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, + ref_index: ::core::primitive::u32, + }, + #[codec(index = 10)] + cancel_queued { which: ::core::primitive::u32 }, + #[codec(index = 11)] + delegate { + to: ::subxt::sp_core::crypto::AccountId32, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + balance: ::core::primitive::u128, + }, + #[codec(index = 12)] + undelegate, + #[codec(index = 13)] + clear_public_proposals, + #[codec(index = 14)] + note_preimage { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 15)] + note_preimage_operational { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 16)] + note_imminent_preimage { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 17)] + note_imminent_preimage_operational { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 18)] + reap_preimage { + proposal_hash: ::subxt::sp_core::H256, + #[codec(compact)] + proposal_len_upper_bound: ::core::primitive::u32, + }, + #[codec(index = 19)] + unlock { + target: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 20)] + remove_vote { index: ::core::primitive::u32 }, + #[codec(index = 21)] + remove_other_vote { + target: ::subxt::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 22)] + enact_proposal { + proposal_hash: ::subxt::sp_core::H256, + index: ::core::primitive::u32, + }, + #[codec(index = 23)] + blacklist { + proposal_hash: ::subxt::sp_core::H256, + maybe_ref_index: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 24)] + cancel_proposal { + #[codec(compact)] + prop_index: ::core::primitive::u32, }, } #[derive( @@ -21778,210 +19959,255 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - InsufficientProposersBalance, + ValueLow, #[codec(index = 1)] - InvalidIndex, + ProposalMissing, #[codec(index = 2)] - ReasonTooBig, + AlreadyCanceled, #[codec(index = 3)] - UnexpectedStatus, + DuplicateProposal, #[codec(index = 4)] - RequireCurator, + ProposalBlacklisted, #[codec(index = 5)] - InvalidValue, + NotSimpleMajority, #[codec(index = 6)] - InvalidFee, + InvalidHash, #[codec(index = 7)] - PendingPayout, + NoProposal, #[codec(index = 8)] - Premature, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - BountyProposed(::core::primitive::u32), - #[codec(index = 1)] - BountyRejected(::core::primitive::u32, ::core::primitive::u128), - #[codec(index = 2)] - BountyBecameActive(::core::primitive::u32), - #[codec(index = 3)] - BountyAwarded( - ::core::primitive::u32, - ::subxt::sp_core::crypto::AccountId32, - ), - #[codec(index = 4)] - BountyClaimed( - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - ), - #[codec(index = 5)] - BountyCanceled(::core::primitive::u32), - #[codec(index = 6)] - BountyExtended(::core::primitive::u32), - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Bounty<_0, _1, _2> { - pub proposer: _0, - pub value: _1, - pub fee: _1, - pub curator_deposit: _1, - pub bond: _1, - pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum BountyStatus<_0, _1> { - #[codec(index = 0)] - Proposed, - #[codec(index = 1)] - Approved, - #[codec(index = 2)] - Funded, - #[codec(index = 3)] - CuratorProposed { curator: _0 }, - #[codec(index = 4)] - Active { curator: _0, update_due: _1 }, - #[codec(index = 5)] - PendingPayout { - curator: _0, - beneficiary: _0, - unlock_at: _1, - }, - } - } - pub mod pallet_bridge_dispatch { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; + AlreadyVetoed, + #[codec(index = 9)] + DuplicatePreimage, + #[codec(index = 10)] + NotImminent, + #[codec(index = 11)] + TooEarly, + #[codec(index = 12)] + Imminent, + #[codec(index = 13)] + PreimageMissing, + #[codec(index = 14)] + ReferendumInvalid, + #[codec(index = 15)] + PreimageInvalid, + #[codec(index = 16)] + NoneWaiting, + #[codec(index = 17)] + NotVoter, + #[codec(index = 18)] + NoPermission, + #[codec(index = 19)] + AlreadyDelegating, + #[codec(index = 20)] + InsufficientFunds, + #[codec(index = 21)] + NotDelegating, + #[codec(index = 22)] + VotesExist, + #[codec(index = 23)] + InstantNotAllowed, + #[codec(index = 24)] + Nonsense, + #[codec(index = 25)] + WrongUpperBound, + #[codec(index = 26)] + MaxVotesReached, + #[codec(index = 27)] + TooManyProposals, + } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - MessageRejected( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + Proposed(::core::primitive::u32, ::core::primitive::u128), #[codec(index = 1)] - MessageVersionSpecMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::core::primitive::u32, + Tabled( ::core::primitive::u32, + ::core::primitive::u128, + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, ), #[codec(index = 2)] - MessageWeightMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::core::primitive::u64, - ::core::primitive::u64, - ), + ExternalTabled, #[codec(index = 3)] - MessageSignatureMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), + Started( + ::core::primitive::u32, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, ), #[codec(index = 4)] - MessageCallDecodeFailed( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + Passed(::core::primitive::u32), #[codec(index = 5)] - MessageCallRejected( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + NotPassed(::core::primitive::u32), #[codec(index = 6)] - MessageDispatchPaymentFailed( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u64, - ), + Cancelled(::core::primitive::u32), #[codec(index = 7)] - MessageDispatched( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), + Executed( + ::core::primitive::u32, ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, ), #[codec(index = 8)] - _Dummy, + Delegated( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 9)] + Undelegated(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 10)] + Vetoed( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ::core::primitive::u32, + ), + #[codec(index = 11)] + PreimageNoted( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 12)] + PreimageUsed( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 13)] + PreimageInvalid(::subxt::sp_core::H256, ::core::primitive::u32), + #[codec(index = 14)] + PreimageMissing(::subxt::sp_core::H256, ::core::primitive::u32), + #[codec(index = 15)] + PreimageReaped( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 16)] + Blacklisted(::subxt::sp_core::H256), } } - } - pub mod pallet_bridge_grandpa { - use super::runtime_types; - pub mod pallet { + pub mod types { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] - submit_finality_proof { - finality_target: ::std::boxed::Box< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - justification: - runtime_types::bp_header_chain::justification::GrandpaJustification< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - }, + Ongoing(runtime_types::pallet_democracy::types::ReferendumStatus<_0, _1, _2>), #[codec(index = 1)] - initialize { - init_data: runtime_types::bp_header_chain::InitializationData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, + Finished { + approved: ::core::primitive::bool, + end: _0, }, - #[codec(index = 2)] - set_owner { - new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct ReferendumStatus<_0, _1, _2> { + pub end: _0, + pub proposal_hash: _1, + pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + pub delay: _0, + pub tally: runtime_types::pallet_democracy::types::Tally<_2>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub turnout: _0, + } + } + pub mod vote { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum AccountVote<_0> { + #[codec(index = 0)] + Standard { + vote: runtime_types::pallet_democracy::vote::Vote, + balance: _0, }, - #[codec(index = 3)] - set_operational { - operational: ::core::primitive::bool, + #[codec(index = 1)] + Split { aye: _0, nay: _0 }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Voting<_0, _1, _2> { + #[codec(index = 0)] + Direct { + votes: ::std::vec::Vec<( + _2, + runtime_types::pallet_democracy::vote::AccountVote<_0>, + )>, + delegations: runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, + #[codec(index = 1)] + Delegating { + balance: _0, + target: _1, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + delegations: runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, }, } + } + pub mod vote_threshold { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Error { + pub enum VoteThreshold { #[codec(index = 0)] - InvalidJustification, + SuperMajorityApprove, #[codec(index = 1)] - InvalidAuthoritySet, + SuperMajorityAgainst, #[codec(index = 2)] - TooManyRequests, - #[codec(index = 3)] - OldHeader, - #[codec(index = 4)] - UnknownHeader, - #[codec(index = 5)] - UnsupportedScheduledChange, - #[codec(index = 6)] - NotInitialized, - #[codec(index = 7)] - AlreadyInitialized, - #[codec(index = 8)] - Halted, - #[codec(index = 9)] - StorageRootMismatch, + SimpleMajority, } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum PreimageStatus<_0, _1, _2> { + #[codec(index = 0)] + Missing(_2), + #[codec(index = 1)] + Available { + data: ::std::vec::Vec<::core::primitive::u8>, + provider: _0, + deposit: _1, + since: _2, + expiry: ::core::option::Option<_2>, + }, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Releases { + #[codec(index = 0)] + V1, + } } - pub mod pallet_bridge_messages { + pub mod pallet_election_provider_multi_phase { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -21989,44 +20215,128 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Call { - # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: OperatingMode , } , # [codec (index = 2)] update_pallet_parameter { parameter : runtime_types :: darwinia_runtime :: messages :: crab_message :: DarwiniaToCrabMessagesParameter , } , # [codec (index = 3)] send_message { lane_id : [:: core :: primitive :: u8 ; 4usize] , payload : runtime_types :: bp_message_dispatch :: MessagePayload < :: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_runtime :: MultiSigner , runtime_types :: sp_runtime :: MultiSignature , :: std :: vec :: Vec < :: core :: primitive :: u8 > > , delivery_and_dispatch_fee : :: core :: primitive :: u128 , } , # [codec (index = 4)] increase_message_fee { lane_id : [:: core :: primitive :: u8 ; 4usize] , nonce : :: core :: primitive :: u64 , additional_fee : :: core :: primitive :: u128 , } , # [codec (index = 5)] receive_messages_proof { relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: core :: primitive :: u64 , } , # [codec (index = 6)] receive_messages_delivery_proof { proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } , } + # [codec (index = 0)] submit_unsigned { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < [:: core :: primitive :: u128 ; 3usize] > , } , # [codec (index = 2)] set_emergency_election_result { supports : :: std :: vec :: Vec < (:: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt :: sp_core :: crypto :: AccountId32 > ,) > , } , # [codec (index = 3)] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > > , num_signed_submissions : :: core :: primitive :: u32 , } , } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Error { #[codec(index = 0)] - Halted, + PreDispatchEarlySubmission, #[codec(index = 1)] - MessageRejectedByChainVerifier, + PreDispatchWrongWinnerCount, #[codec(index = 2)] - MessageRejectedByLaneVerifier, + PreDispatchWeakSubmission, #[codec(index = 3)] - FailedToWithdrawMessageFee, + SignedQueueFull, #[codec(index = 4)] - TooManyMessagesInTheProof, + SignedCannotPayDeposit, #[codec(index = 5)] - InvalidMessagesProof, + SignedInvalidWitness, #[codec(index = 6)] - InvalidMessagesDeliveryProof, + SignedTooMuchWeight, #[codec(index = 7)] - InvalidUnrewardedRelayers, + OcwCallWrongEra, #[codec(index = 8)] - InvalidUnrewardedRelayersState, + MissingSnapshotMetadata, #[codec(index = 9)] - MessageIsAlreadyDelivered, + InvalidSubmissionIndex, #[codec(index = 10)] - MessageIsNotYetSent, - #[codec(index = 11)] - TryingToConfirmMoreMessagesThanExpected, + CallNotAllowed, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { - # [codec (index = 0)] ParameterUpdated (runtime_types :: darwinia_runtime :: messages :: crab_message :: DarwiniaToCrabMessagesParameter ,) , # [codec (index = 1)] MessageAccepted ([:: core :: primitive :: u8 ; 4usize] , :: core :: primitive :: u64 ,) , # [codec (index = 2)] MessagesDelivered ([:: core :: primitive :: u8 ; 4usize] , runtime_types :: bp_messages :: DeliveredMessages ,) , } + #[codec(index = 0)] + SolutionStored( + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + ::core::primitive::bool, + ), + #[codec(index = 1)] + ElectionFinalized( + ::core::option::Option< + runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + >, + ), + #[codec(index = 2)] + Rewarded( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 3)] + Slashed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 4)] + SignedPhaseStarted(::core::primitive::u32), + #[codec(index = 5)] + UnsignedPhaseStarted(::core::primitive::u32), + } + } + pub mod signed { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct SignedSubmission<_0, _1, _2> { + pub who: _0, + pub deposit: _1, + pub raw_solution: + runtime_types::pallet_election_provider_multi_phase::RawSolution<_2>, + pub reward: _1, + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum ElectionCompute { + #[codec(index = 0)] + OnChain, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned, + #[codec(index = 3)] + Fallback, + #[codec(index = 4)] + Emergency, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Phase<_0> { + #[codec(index = 0)] + Off, + #[codec(index = 1)] + Signed, + #[codec(index = 2)] + Unsigned((::core::primitive::bool, _0)), + #[codec(index = 3)] + Emergency, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct RawSolution<_0> { + pub solution: _0, + pub score: [::core::primitive::u128; 3usize], + pub round: ::core::primitive::u32, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct ReadySolution<_0> { + pub supports: ::std::vec::Vec<(_0, runtime_types::sp_npos_elections::Support<_0>)>, + pub score: [::core::primitive::u128; 3usize], + pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct RoundSnapshot<_0> { + pub voters: ::std::vec::Vec<(_0, ::core::primitive::u64, ::std::vec::Vec<_0>)>, + pub targets: ::std::vec::Vec<_0>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct SolutionOrSnapshotSize { + #[codec(compact)] + pub voters: ::core::primitive::u32, + #[codec(compact)] + pub targets: ::core::primitive::u32, } } - pub mod pallet_collective { + pub mod pallet_elections_phragmen { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -22035,45 +20345,34 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - set_members { - new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - old_count: ::core::primitive::u32, - }, - #[codec(index = 1)] - execute { - proposal: ::std::boxed::Box, + vote { + votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, #[codec(compact)] - length_bound: ::core::primitive::u32, + value: ::core::primitive::u128, }, + #[codec(index = 1)] + remove_voter, #[codec(index = 2)] - propose { - #[codec(compact)] - threshold: ::core::primitive::u32, - proposal: ::std::boxed::Box, + submit_candidacy { #[codec(compact)] - length_bound: ::core::primitive::u32, + candidate_count: ::core::primitive::u32, }, #[codec(index = 3)] - vote { - proposal: ::subxt::sp_core::H256, - #[codec(compact)] - index: ::core::primitive::u32, - approve: ::core::primitive::bool, + renounce_candidacy { + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, }, #[codec(index = 4)] - close { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - proposal_weight_bound: ::core::primitive::u64, - #[codec(compact)] - length_bound: ::core::primitive::u32, + remove_member { + who: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + has_replacement: ::core::primitive::bool, }, #[codec(index = 5)] - disapprove_proposal { - proposal_hash: ::subxt::sp_core::H256, + clean_defunct_voters { + num_voters: ::core::primitive::u32, + num_defunct: ::core::primitive::u32, }, } #[derive( @@ -22081,86 +20380,94 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - NotMember, + UnableToVote, #[codec(index = 1)] - DuplicateProposal, + NoVotes, #[codec(index = 2)] - ProposalMissing, + TooManyVotes, #[codec(index = 3)] - WrongIndex, + MaximumVotesExceeded, #[codec(index = 4)] - DuplicateVote, + LowBalance, #[codec(index = 5)] - AlreadyInitialized, + UnableToPayBond, #[codec(index = 6)] - TooEarly, + MustBeVoter, #[codec(index = 7)] - TooManyProposals, + ReportSelf, #[codec(index = 8)] - WrongProposalWeight, + DuplicatedCandidate, #[codec(index = 9)] - WrongProposalLength, + MemberSubmit, + #[codec(index = 10)] + RunnerUpSubmit, + #[codec(index = 11)] + InsufficientCandidateFunds, + #[codec(index = 12)] + NotMember, + #[codec(index = 13)] + InvalidWitnessData, + #[codec(index = 14)] + InvalidVoteCount, + #[codec(index = 15)] + InvalidRenouncing, + #[codec(index = 16)] + InvalidReplacement, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - Proposed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::core::primitive::u32, + NewTerm( + ::std::vec::Vec<( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, ), #[codec(index = 1)] - Voted( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ::core::primitive::bool, - ::core::primitive::u32, - ::core::primitive::u32, - ), + EmptyTerm, #[codec(index = 2)] - Approved(::subxt::sp_core::H256), + ElectionError, #[codec(index = 3)] - Disapproved(::subxt::sp_core::H256), + MemberKicked(::subxt::sp_core::crypto::AccountId32), #[codec(index = 4)] - Executed( - ::subxt::sp_core::H256, - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), + Renounced(::subxt::sp_core::crypto::AccountId32), #[codec(index = 5)] - MemberExecuted( - ::subxt::sp_core::H256, - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + CandidateSlashed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, ), #[codec(index = 6)] - Closed( - ::subxt::sp_core::H256, - ::core::primitive::u32, - ::core::primitive::u32, + SeatHolderSlashed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, ), } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawOrigin<_0> { + pub enum Renouncing { #[codec(index = 0)] - Members(::core::primitive::u32, ::core::primitive::u32), + Member, #[codec(index = 1)] - Member(_0), + RunnerUp, #[codec(index = 2)] - _Phantom, + Candidate(#[codec(compact)] ::core::primitive::u32), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Votes<_0, _1> { - pub index: _1, - pub threshold: _1, - pub ayes: ::std::vec::Vec<_0>, - pub nays: ::std::vec::Vec<_0>, - pub end: _1, + pub struct SeatHolder<_0, _1> { + pub who: _0, + pub stake: _1, + pub deposit: _1, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Voter<_0, _1> { + pub votes: ::std::vec::Vec<_0>, + pub stake: _1, + pub deposit: _1, } } - pub mod pallet_election_provider_multi_phase { + pub mod pallet_fee_market { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -22168,125 +20475,122 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Call { - # [codec (index = 0)] submit_unsigned { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > > , witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } , # [codec (index = 1)] set_minimum_untrusted_score { maybe_next_score : :: core :: option :: Option < [:: core :: primitive :: u128 ; 3usize] > , } , # [codec (index = 2)] set_emergency_election_result { supports : :: std :: vec :: Vec < (:: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_npos_elections :: Support < :: subxt :: sp_core :: crypto :: AccountId32 > ,) > , } , # [codec (index = 3)] submit { raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: darwinia_runtime :: pallets :: election_provider_multi_phase :: NposCompactSolution16 > > , num_signed_submissions : :: core :: primitive :: u32 , } , } + #[codec(index = 0)] + enroll_and_lock_collateral { + lock_collateral: ::core::primitive::u128, + relay_fee: ::core::option::Option<::core::primitive::u128>, + }, + #[codec(index = 1)] + update_locked_collateral { + new_collateral: ::core::primitive::u128, + }, + #[codec(index = 2)] + update_relay_fee { new_fee: ::core::primitive::u128 }, + #[codec(index = 3)] + cancel_enrollment, + #[codec(index = 4)] + set_slash_protect { + slash_protect: ::core::primitive::u128, + }, + #[codec(index = 5)] + set_assigned_relayers_number { number: ::core::primitive::u32 }, + } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Error { #[codec(index = 0)] - PreDispatchEarlySubmission, + InsufficientBalance, #[codec(index = 1)] - PreDispatchWrongWinnerCount, + AlreadyEnrolled, #[codec(index = 2)] - PreDispatchWeakSubmission, + NotEnrolled, #[codec(index = 3)] - SignedQueueFull, + StillHasOrdersNotConfirmed, #[codec(index = 4)] - SignedCannotPayDeposit, + RelayFeeTooLow, #[codec(index = 5)] - SignedInvalidWitness, - #[codec(index = 6)] - SignedTooMuchWeight, - #[codec(index = 7)] - OcwCallWrongEra, - #[codec(index = 8)] - MissingSnapshotMetadata, - #[codec(index = 9)] - InvalidSubmissionIndex, - #[codec(index = 10)] - CallNotAllowed, + OccupiedRelayer, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - SolutionStored( - runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - ::core::primitive::bool, + Enroll( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u128, ), #[codec(index = 1)] - ElectionFinalized( - ::core::option::Option< - runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - >, - ), - #[codec(index = 2)] - Rewarded( + UpdateLockedCollateral( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ), - #[codec(index = 3)] - Slashed( + #[codec(index = 2)] + UpdateRelayFee( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ), + #[codec(index = 3)] + CancelEnrollment(::subxt::sp_core::crypto::AccountId32), #[codec(index = 4)] - SignedPhaseStarted(::core::primitive::u32), + UpdateCollateralSlashProtect(::core::primitive::u128), #[codec(index = 5)] - UnsignedPhaseStarted(::core::primitive::u32), + UpdateAssignedRelayersNumber(::core::primitive::u32), + #[codec(index = 6)] + FeeMarketSlash( + runtime_types::pallet_fee_market::types::SlashReport< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >, + ), } } - pub mod signed { + pub mod types { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct SignedSubmission<_0, _1, _2> { - pub who: _0, - pub deposit: _1, - pub raw_solution: - runtime_types::pallet_election_provider_multi_phase::RawSolution<_2>, - pub reward: _1, + pub struct Order<_0, _1, _2> { + pub lane: [::core::primitive::u8; 4usize], + pub message: ::core::primitive::u64, + pub sent_time: _1, + pub confirm_time: ::core::option::Option<_1>, + pub locked_collateral: _2, + pub relayers: ::std::vec::Vec< + runtime_types::pallet_fee_market::types::PriorRelayer<_0, _1, _2>, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct PriorRelayer<_0, _1, _2> { + pub id: _0, + pub fee: _2, + pub valid_range: ::core::ops::Range<_1>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Relayer<_0, _1> { + pub id: _0, + pub collateral: _1, + pub fee: _1, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct SlashReport<_0, _1, _2> { + pub lane: [::core::primitive::u8; 4usize], + pub message: ::core::primitive::u64, + pub sent_time: _1, + pub confirm_time: ::core::option::Option<_1>, + pub delay_time: ::core::option::Option<_1>, + pub account_id: _0, + pub amount: _2, } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum ElectionCompute { - #[codec(index = 0)] - OnChain, - #[codec(index = 1)] - Signed, - #[codec(index = 2)] - Unsigned, - #[codec(index = 3)] - Fallback, - #[codec(index = 4)] - Emergency, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Phase<_0> { - #[codec(index = 0)] - Off, - #[codec(index = 1)] - Signed, - #[codec(index = 2)] - Unsigned((::core::primitive::bool, _0)), - #[codec(index = 3)] - Emergency, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RawSolution<_0> { - pub solution: _0, - pub score: [::core::primitive::u128; 3usize], - pub round: ::core::primitive::u32, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReadySolution<_0> { - pub supports: ::std::vec::Vec<(_0, runtime_types::sp_npos_elections::Support<_0>)>, - pub score: [::core::primitive::u128; 3usize], - pub compute: runtime_types::pallet_election_provider_multi_phase::ElectionCompute, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RoundSnapshot<_0> { - pub voters: ::std::vec::Vec<(_0, ::core::primitive::u64, ::std::vec::Vec<_0>)>, - pub targets: ::std::vec::Vec<_0>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SolutionOrSnapshotSize { - #[codec(compact)] - pub voters: ::core::primitive::u32, - #[codec(compact)] - pub targets: ::core::primitive::u32, } } pub mod pallet_grandpa { @@ -23922,6 +22226,102 @@ pub mod api { } } } + pub mod pallet_vesting { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + vest, + #[codec(index = 1)] + vest_other { + target: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + }, + #[codec(index = 2)] + vested_transfer { + target: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + force_vested_transfer { + source: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + target: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + merge_schedules { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + NotVesting, + #[codec(index = 1)] + AtMaxVestingSchedules, + #[codec(index = 2)] + AmountLow, + #[codec(index = 3)] + ScheduleIndexOutOfBounds, + #[codec(index = 4)] + InvalidScheduleParams, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + VestingUpdated( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 1)] + VestingCompleted(::subxt::sp_core::crypto::AccountId32), + } + } + pub mod vesting_info { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct VestingInfo<_0, _1> { + pub locked: _0, + pub per_block: _0, + pub starting_block: _1, + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Releases { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } pub mod primitive_types { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -25139,11 +23539,16 @@ pub mod api { } } #[doc = r" The default error type returned when there is a runtime issue."] - pub type DispatchError = runtime_types::sp_runtime::DispatchError; - impl ::subxt::HasModuleError for runtime_types::sp_runtime::DispatchError { - fn module_error_indices(&self) -> Option<(u8, u8)> { - if let &Self::Module { index, error } = self { - Some((index, error)) + pub type DispatchError = self::runtime_types::sp_runtime::DispatchError; + pub struct ErrorDetails { + pub pallet: &'static str, + pub error: &'static str, + pub docs: &'static str, + } + impl DispatchError { + pub fn details(&self) -> Option { + if let Self::Module { index, error } = self { + match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (2u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (2u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (2u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (4u8 , 8u8) => Some (ErrorDetails { pallet : "Balances" , error : "LockP" , docs : "Lock - POISONED." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Kton" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Kton" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Kton" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Kton" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Kton" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Kton" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (5u8 , 8u8) => Some (ErrorDetails { pallet : "Kton" , error : "LockP" , docs : "Lock - POISONED." }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (38u8 , 0u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchEarlySubmission" , docs : "Submission was too early." }) , (38u8 , 1u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWrongWinnerCount" , docs : "Wrong number of winners presented." }) , (38u8 , 2u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWeakSubmission" , docs : "Submission was too weak, score-wise." }) , (38u8 , 3u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedQueueFull" , docs : "The queue was full, and the solution was not better than any of the existing ones." }) , (38u8 , 4u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedCannotPayDeposit" , docs : "The origin failed to pay the deposit." }) , (38u8 , 5u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedInvalidWitness" , docs : "Witness data to dispatchable is invalid." }) , (38u8 , 6u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedTooMuchWeight" , docs : "The signed submission consumes too much weight" }) , (38u8 , 7u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "OcwCallWrongEra" , docs : "OCW submitted solution for wrong round" }) , (38u8 , 8u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "MissingSnapshotMetadata" , docs : "Snapshot metadata should exist but didn't." }) , (38u8 , 9u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "InvalidSubmissionIndex" , docs : "`Self::insert_submission` returned an invalid index." }) , (38u8 , 10u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "CallNotAllowed" , docs : "The call is not allowed at this point." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotController" , docs : "Not a controller account." }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotStash" , docs : "Not a stash account." }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyBonded" , docs : "Stash is already bonded." }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyPaired" , docs : "Controller is already paired." }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "Staking" , error : "EmptyTargets" , docs : "Targets cannot be empty." }) , (8u8 , 5u8) => Some (ErrorDetails { pallet : "Staking" , error : "DuplicateIndex" , docs : "Duplicate index." }) , (8u8 , 6u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidSlashIndex" , docs : "Slash record index out of bounds." }) , (8u8 , 7u8) => Some (ErrorDetails { pallet : "Staking" , error : "InsufficientBond" , docs : "Can not bond with value less than minimum required." }) , (8u8 , 8u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoMoreChunks" , docs : "Can not schedule more unlock chunks." }) , (8u8 , 9u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoUnlockChunk" , docs : "Can not rebond without unlocking chunks." }) , (8u8 , 10u8) => Some (ErrorDetails { pallet : "Staking" , error : "FundedTarget" , docs : "Attempting to target a stash that still has funds." }) , (8u8 , 11u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidEraToReward" , docs : "Invalid era to reward." }) , (8u8 , 12u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidNumberOfNominations" , docs : "Invalid number of nominations." }) , (8u8 , 13u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotSortedAndUnique" , docs : "Items are not sorted and unique." }) , (8u8 , 14u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyClaimed" , docs : "Rewards for this era have already been claimed for this validator." }) , (8u8 , 15u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectHistoryDepth" , docs : "Incorrect previous history depth input provided." }) , (8u8 , 16u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectSlashingSpans" , docs : "Incorrect number of slashing spans provided." }) , (8u8 , 17u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadState" , docs : "Internal state has become somehow corrupted and the operation cannot continue." }) , (8u8 , 18u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyTargets" , docs : "Too many nomination targets supplied." }) , (8u8 , 19u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadTarget" , docs : "A nomination target was supplied that was blocked or otherwise not a validator." }) , (8u8 , 20u8) => Some (ErrorDetails { pallet : "Staking" , error : "CannotChillOther" , docs : "The user has enough bond and thus cannot be chilled forcefully by an external person." }) , (8u8 , 21u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyNominators" , docs : "There are too many nominators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (8u8 , 22u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyValidators" , docs : "There are too many validators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (8u8 , 23u8) => Some (ErrorDetails { pallet : "Staking" , error : "PayoutIns" , docs : "Payout - INSUFFICIENT" }) , (11u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (11u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (11u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (11u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (11u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (14u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (37u8 , 0u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ValueLow" , docs : "Value too low" }) , (37u8 , 1u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalMissing" , docs : "Proposal does not exist" }) , (37u8 , 2u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyCanceled" , docs : "Cannot cancel the same proposal twice" }) , (37u8 , 3u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicateProposal" , docs : "Proposal already made" }) , (37u8 , 4u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalBlacklisted" , docs : "Proposal still blacklisted" }) , (37u8 , 5u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotSimpleMajority" , docs : "Next external proposal not simple majority" }) , (37u8 , 6u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InvalidHash" , docs : "Invalid hash" }) , (37u8 , 7u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoProposal" , docs : "No external proposal" }) , (37u8 , 8u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyVetoed" , docs : "Identity may not veto a proposal twice" }) , (37u8 , 9u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicatePreimage" , docs : "Preimage already noted" }) , (37u8 , 10u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotImminent" , docs : "Not imminent" }) , (37u8 , 11u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooEarly" , docs : "Too early" }) , (37u8 , 12u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Imminent" , docs : "Imminent" }) , (37u8 , 13u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageMissing" , docs : "Preimage not found" }) , (37u8 , 14u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ReferendumInvalid" , docs : "Vote given for invalid referendum" }) , (37u8 , 15u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageInvalid" , docs : "Invalid preimage" }) , (37u8 , 16u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoneWaiting" , docs : "No proposals waiting" }) , (37u8 , 17u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotVoter" , docs : "The given account did not vote on the referendum." }) , (37u8 , 18u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoPermission" , docs : "The actor has no permission to conduct the action." }) , (37u8 , 19u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyDelegating" , docs : "The account is already delegating." }) , (37u8 , 20u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InsufficientFunds" , docs : "Too high a balance was provided that the account cannot afford." }) , (37u8 , 21u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotDelegating" , docs : "The account is not currently delegating." }) , (37u8 , 22u8) => Some (ErrorDetails { pallet : "Democracy" , error : "VotesExist" , docs : "The account currently has votes attached to it and the operation cannot succeed until\nthese are removed, either through `unvote` or `reap_vote`." }) , (37u8 , 23u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InstantNotAllowed" , docs : "The instant referendum origin is currently disallowed." }) , (37u8 , 24u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Nonsense" , docs : "Delegation to oneself makes no sense." }) , (37u8 , 25u8) => Some (ErrorDetails { pallet : "Democracy" , error : "WrongUpperBound" , docs : "Invalid upper bound." }) , (37u8 , 26u8) => Some (ErrorDetails { pallet : "Democracy" , error : "MaxVotesReached" , docs : "Maximum number of votes reached." }) , (37u8 , 27u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooManyProposals" , docs : "Maximum number of proposals reached." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "Council" , error : "NotMember" , docs : "Account is not a member" }) , (16u8 , 1u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (16u8 , 2u8) => Some (ErrorDetails { pallet : "Council" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (16u8 , 3u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongIndex" , docs : "Mismatched index" }) , (16u8 , 4u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (16u8 , 5u8) => Some (ErrorDetails { pallet : "Council" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (16u8 , 6u8) => Some (ErrorDetails { pallet : "Council" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (16u8 , 7u8) => Some (ErrorDetails { pallet : "Council" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (16u8 , 8u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (16u8 , 9u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "NotMember" , docs : "Account is not a member" }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongIndex" , docs : "Mismatched index" }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToVote" , docs : "Cannot vote when no candidates or members exist." }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NoVotes" , docs : "Must vote for at least one candidate." }) , (18u8 , 2u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "TooManyVotes" , docs : "Cannot vote more than candidates." }) , (18u8 , 3u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MaximumVotesExceeded" , docs : "Cannot vote more than maximum allowed." }) , (18u8 , 4u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "LowBalance" , docs : "Cannot vote with stake less than minimum balance." }) , (18u8 , 5u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToPayBond" , docs : "Voter can not pay voting bond." }) , (18u8 , 6u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MustBeVoter" , docs : "Must be a voter." }) , (18u8 , 7u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "ReportSelf" , docs : "Cannot report self." }) , (18u8 , 8u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "DuplicatedCandidate" , docs : "Duplicated candidate submission." }) , (18u8 , 9u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MemberSubmit" , docs : "Member cannot re-submit candidacy." }) , (18u8 , 10u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "RunnerUpSubmit" , docs : "Runner cannot re-submit candidacy." }) , (18u8 , 11u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InsufficientCandidateFunds" , docs : "Candidate does not have enough funds." }) , (18u8 , 12u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NotMember" , docs : "Not a member." }) , (18u8 , 13u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidWitnessData" , docs : "The provided count of number of candidates is incorrect." }) , (18u8 , 14u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidVoteCount" , docs : "The provided count of number of votes is incorrect." }) , (18u8 , 15u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidRenouncing" , docs : "The renouncing origin presented a wrong `Renouncing` parameter." }) , (18u8 , 16u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidReplacement" , docs : "Prediction regarding replacement after member removal is wrong." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "AlreadyMember" , docs : "Already a member." }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "NotMember" , docs : "Not a member." }) , (20u8 , 0u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (20u8 , 1u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (20u8 , 2u8) => Some (ErrorDetails { pallet : "Treasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (39u8 , 0u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (39u8 , 1u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (39u8 , 2u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (40u8 , 0u8) => Some (ErrorDetails { pallet : "Tips" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (40u8 , 1u8) => Some (ErrorDetails { pallet : "Tips" , error : "AlreadyKnown" , docs : "The tip was already found/started." }) , (40u8 , 2u8) => Some (ErrorDetails { pallet : "Tips" , error : "UnknownTip" , docs : "The tip hash is unknown." }) , (40u8 , 3u8) => Some (ErrorDetails { pallet : "Tips" , error : "NotFinder" , docs : "The account attempting to retract the tip is not the finder of the tip." }) , (40u8 , 4u8) => Some (ErrorDetails { pallet : "Tips" , error : "StillOpen" , docs : "The tip cannot be claimed/closed because there are not enough tippers yet." }) , (40u8 , 5u8) => Some (ErrorDetails { pallet : "Tips" , error : "Premature" , docs : "The tip cannot be claimed/closed because it's still in the countdown period." }) , (41u8 , 0u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (41u8 , 1u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (41u8 , 2u8) => Some (ErrorDetails { pallet : "Bounties" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (41u8 , 3u8) => Some (ErrorDetails { pallet : "Bounties" , error : "UnexpectedStatus" , docs : "The bounty status is unexpected." }) , (41u8 , 4u8) => Some (ErrorDetails { pallet : "Bounties" , error : "RequireCurator" , docs : "Require bounty curator." }) , (41u8 , 5u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidValue" , docs : "Invalid bounty value." }) , (41u8 , 6u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidFee" , docs : "Invalid bounty fee." }) , (41u8 , 7u8) => Some (ErrorDetails { pallet : "Bounties" , error : "PendingPayout" , docs : "A bounty payout is pending.\nTo cancel the bounty, you must unassign and slash the curator." }) , (41u8 , 8u8) => Some (ErrorDetails { pallet : "Bounties" , error : "Premature" , docs : "The bounties cannot be claimed/closed because it's still in the countdown period." }) , (27u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (21u8 , 0u8) => Some (ErrorDetails { pallet : "Vesting" , error : "NotVesting" , docs : "The account given is not vesting." }) , (21u8 , 1u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AtMaxVestingSchedules" , docs : "The account already has `MaxVestingSchedules` count of schedules and thus\ncannot add another one. Consider merging existing schedules in order to add another." }) , (21u8 , 2u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AmountLow" , docs : "Amount being transferred is too low to create a vesting schedule." }) , (21u8 , 3u8) => Some (ErrorDetails { pallet : "Vesting" , error : "ScheduleIndexOutOfBounds" , docs : "An index was out of bounds of the vesting schedules." }) , (21u8 , 4u8) => Some (ErrorDetails { pallet : "Vesting" , error : "InvalidScheduleParams" , docs : "Failed to create a new schedule because some parameter was invalid." }) , (22u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManySubAccounts" , docs : "Too many subs-accounts." }) , (23u8 , 1u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotFound" , docs : "Account isn't found." }) , (23u8 , 2u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotNamed" , docs : "Account isn't named." }) , (23u8 , 3u8) => Some (ErrorDetails { pallet : "Identity" , error : "EmptyIndex" , docs : "Empty index." }) , (23u8 , 4u8) => Some (ErrorDetails { pallet : "Identity" , error : "FeeChanged" , docs : "Fee is changed." }) , (23u8 , 5u8) => Some (ErrorDetails { pallet : "Identity" , error : "NoIdentity" , docs : "No identity found." }) , (23u8 , 6u8) => Some (ErrorDetails { pallet : "Identity" , error : "StickyJudgement" , docs : "Sticky judgement." }) , (23u8 , 7u8) => Some (ErrorDetails { pallet : "Identity" , error : "JudgementGiven" , docs : "Judgement given." }) , (23u8 , 8u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidJudgement" , docs : "Invalid judgement." }) , (23u8 , 9u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidIndex" , docs : "The index is invalid." }) , (23u8 , 10u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidTarget" , docs : "The target is invalid." }) , (23u8 , 11u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyFields" , docs : "Too many additional fields." }) , (23u8 , 12u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyRegistrars" , docs : "Maximum amount of registrars reached. Cannot add any more." }) , (23u8 , 13u8) => Some (ErrorDetails { pallet : "Identity" , error : "AlreadyClaimed" , docs : "Account ID is already named." }) , (23u8 , 14u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotSub" , docs : "Sender is not a sub-account." }) , (23u8 , 15u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotOwned" , docs : "Sub-account isn't owned by sender." }) , (24u8 , 0u8) => Some (ErrorDetails { pallet : "Society" , error : "BadPosition" , docs : "An incorrect position was provided." }) , (24u8 , 1u8) => Some (ErrorDetails { pallet : "Society" , error : "NotMember" , docs : "User is not a member." }) , (24u8 , 2u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyMember" , docs : "User is already a member." }) , (24u8 , 3u8) => Some (ErrorDetails { pallet : "Society" , error : "Suspended" , docs : "User is suspended." }) , (24u8 , 4u8) => Some (ErrorDetails { pallet : "Society" , error : "NotSuspended" , docs : "User is not suspended." }) , (24u8 , 5u8) => Some (ErrorDetails { pallet : "Society" , error : "NoPayout" , docs : "Nothing to payout." }) , (24u8 , 6u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyFounded" , docs : "Society already founded." }) , (24u8 , 7u8) => Some (ErrorDetails { pallet : "Society" , error : "InsufficientPot" , docs : "Not enough in pot to accept candidate." }) , (24u8 , 8u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyVouching" , docs : "Member is already vouching or banned from vouching again." }) , (24u8 , 9u8) => Some (ErrorDetails { pallet : "Society" , error : "NotVouching" , docs : "Member is not vouching." }) , (24u8 , 10u8) => Some (ErrorDetails { pallet : "Society" , error : "Head" , docs : "Cannot remove the head of the chain." }) , (24u8 , 11u8) => Some (ErrorDetails { pallet : "Society" , error : "Founder" , docs : "Cannot remove the founder." }) , (24u8 , 12u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyBid" , docs : "User has already made a bid." }) , (24u8 , 13u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyCandidate" , docs : "User is already a candidate." }) , (24u8 , 14u8) => Some (ErrorDetails { pallet : "Society" , error : "NotCandidate" , docs : "User is not a candidate." }) , (24u8 , 15u8) => Some (ErrorDetails { pallet : "Society" , error : "MaxMembers" , docs : "Too many members in the society." }) , (24u8 , 16u8) => Some (ErrorDetails { pallet : "Society" , error : "NotFounder" , docs : "The caller is not the founder." }) , (24u8 , 17u8) => Some (ErrorDetails { pallet : "Society" , error : "NotHead" , docs : "The caller is not the head." }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotAllowed" , docs : "User is not allowed to make a call on behalf of this account" }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "Recovery" , error : "ZeroThreshold" , docs : "Threshold must be greater than zero" }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotEnoughFriends" , docs : "Friends list must be greater than zero and threshold" }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "Recovery" , error : "MaxFriends" , docs : "Friends list must be less than max friends" }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotSorted" , docs : "Friends list must be sorted and free of duplicates" }) , (25u8 , 5u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotRecoverable" , docs : "This account is not set up for recovery" }) , (25u8 , 6u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyRecoverable" , docs : "This account is already set up for recovery" }) , (25u8 , 7u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyStarted" , docs : "A recovery process has already started for this account" }) , (25u8 , 8u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotStarted" , docs : "A recovery process has not started for this rescuer" }) , (25u8 , 9u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotFriend" , docs : "This account is not a friend who can vouch" }) , (25u8 , 10u8) => Some (ErrorDetails { pallet : "Recovery" , error : "DelayPeriod" , docs : "The friend must wait until the delay period to vouch for this recovery" }) , (25u8 , 11u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyVouched" , docs : "This user has already vouched for this recovery" }) , (25u8 , 12u8) => Some (ErrorDetails { pallet : "Recovery" , error : "Threshold" , docs : "The threshold for recovering this account has not been met" }) , (25u8 , 13u8) => Some (ErrorDetails { pallet : "Recovery" , error : "StillActive" , docs : "There are still active recovery attempts that need to be closed" }) , (25u8 , 14u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyProxy" , docs : "This account is already set up for recovery" }) , (25u8 , 15u8) => Some (ErrorDetails { pallet : "Recovery" , error : "BadState" , docs : "Some internal state is broken." }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "FailedToSchedule" , docs : "Failed to schedule a call" }) , (26u8 , 1u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "NotFound" , docs : "Cannot find the scheduled call." }) , (26u8 , 2u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "TargetBlockNumberInPast" , docs : "Given target block number is in the past." }) , (26u8 , 3u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "RescheduleNoChange" , docs : "Reschedule failed because it does not change scheduled time." }) , (28u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (28u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (28u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (28u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (28u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (28u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (28u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (28u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (29u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (29u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (29u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (29u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (29u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (29u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (29u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (29u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (29u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (29u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (29u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (29u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (29u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (29u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (32u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderInv" , docs : "Header - INVALID" }) , (32u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ConfirmedBlocksC" , docs : "Confirmed Blocks - CONFLICT" }) , (32u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ContinuousInv" , docs : "Continuous - INVALID" }) , (32u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AffirmationExisted" , docs : "Affirmation - EXISTED" }) , (32u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderHashInv" , docs : "Header Hash - INVALID" }) , (32u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "MMRInv" , docs : "MMR - INVALID" }) , (32u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderHashMis" , docs : "Header Hash - MISMATCHED" }) , (32u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ConfirmedHeaderNE" , docs : "Confirmed Header - NOT EXISTED" }) , (32u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ReceiptProofInv" , docs : "EthereumReceipt Proof - INVALID" }) , (32u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "PendingRelayHeaderParcelNE" , docs : "Pending Relay Header Parcel - NOT EXISTED" }) , (32u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "PendingRelayHeaderParcelAE" , docs : "Pending Relay Header Parcel - ALREADY EXISTED" }) , (32u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AlreadyVoteForAyeDup" , docs : "Already Vote for Aye - DUPLICATED" }) , (32u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AlreadyVoteForNayDup" , docs : "Already Vote for Nay - DUPLICATED" }) , (31u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AddrLenMis" , docs : "Address Length - MISMATCHED" }) , (31u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "PubkeyPrefixMis" , docs : "Pubkey Prefix - MISMATCHED" }) , (31u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "BytesCF" , docs : "Bytes - CONVERSION FAILED" }) , (31u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "IntCF" , docs : "Int - CONVERSION FAILED" }) , (31u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "ArrayCF" , docs : "Array - CONVERSION FAILED" }) , (31u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AddressCF" , docs : "Address - CONVERSION FAILED" }) , (31u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AssetAR" , docs : "Asset - ALREADY REDEEMED" }) , (31u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AuthoritiesChangeAR" , docs : "Authorities Change - ALREADY SYNCED" }) , (31u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "EthLogPF" , docs : "Eth Log - PARSING FAILED" }) , (31u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "KtonLockedNSBA" , docs : "*KTON* Locked - NO SUFFICIENT BACKING ASSETS" }) , (31u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RingLockedNSBA" , docs : "*RING* Locked - NO SUFFICIENT BACKING ASSETS" }) , (31u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "LogEntryNE" , docs : "Log Entry - NOT EXISTED" }) , (31u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RedeemDis" , docs : "Redeem - DISABLED" }) , (31u8 , 13u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RingLockLim" , docs : "Ring Lock - LIMITED" }) , (31u8 , 14u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "KtonLockLim" , docs : "Kton Lock - LIMITED" }) , (33u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayParcelAR" , docs : "Relay Parcel - ALREADY RELAYED" }) , (33u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RoundMis" , docs : "Round - MISMATCHED" }) , (33u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ActiveGamesTM" , docs : "Active Games - TOO MANY" }) , (33u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ExistedAffirmationsFoundC" , docs : "Existed Affirmation(s) Found - CONFLICT" }) , (33u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "GameAtThisRoundC" , docs : "Game at This Round - CLOSED" }) , (33u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayAffirmationDup" , docs : "Relay Affirmation - DUPLICATED" }) , (33u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "StakeIns" , docs : "Usable *RING* for Stake - INSUFFICIENT" }) , (33u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayProofsQuantityInv" , docs : "Relay Proofs Quantity - INVALID" }) , (33u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayAffirmationNE" , docs : "Relay Affirmation - NOT EXISTED" }) , (33u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ExtendedRelayAffirmationNE" , docs : "Extended Relay Affirmation - NOT EXISTED" }) , (33u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "PreviousRelayProofsInc" , docs : "Previous Relay Proofs - INCOMPLETE" }) , (33u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "PendingRelayParcelNE" , docs : "Pending Relay Parcel - NOT EXISTED" }) , (36u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "CandidateAE" , docs : "Candidate - ALREADY EXISTED" }) , (36u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "CandidateNE" , docs : "Candidate - NOT EXISTED" }) , (36u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityAE" , docs : "Authority - ALREADY EXISTED" }) , (36u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityNE" , docs : "Authority - NOT EXISTED" }) , (36u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityIT" , docs : "Authority - IN TERM" }) , (36u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthoritiesCountTL" , docs : "Authorities Count - TOO LOW" }) , (36u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "StakeIns" , docs : "Stake - INSUFFICIENT" }) , (36u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "OnAuthoritiesChangeDis" , docs : "On Authorities Change - DISABLED" }) , (36u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "ScheduledTM" , docs : "Scheduled Items - TOO MANY" }) , (36u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "ScheduledSignNE" , docs : "Scheduled Sign -NOT EXISTED" }) , (36u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "SignatureInv" , docs : "Signature - INVALID" }) , (36u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "TermMis" , docs : "Term - MISMATCHED" }) , (36u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthoritiesMis" , docs : "Authorities - MISMATCHED" }) , (36u8 , 13u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "NextAuthoritiesNE" , docs : "Next Authorities - NOT EXISTED" }) , (43u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (43u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (43u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (43u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (43u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (43u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (43u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (43u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (43u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (43u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeCrabGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (44u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (44u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (44u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (44u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (44u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (44u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (44u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (44u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (44u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (44u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (44u8 , 10u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (44u8 , 11u8) => Some (ErrorDetails { pallet : "BridgeCrabMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (45u8 , 0u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (45u8 , 1u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (45u8 , 2u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (45u8 , 3u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (45u8 , 4u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (45u8 , 5u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , (46u8 , 0u8) => Some (ErrorDetails { pallet : "ToCrabBacking" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (46u8 , 1u8) => Some (ErrorDetails { pallet : "ToCrabBacking" , error : "RingLockLimited" , docs : "Ring Lock LIMITED." }) , (46u8 , 2u8) => Some (ErrorDetails { pallet : "ToCrabBacking" , error : "RingDailyLimited" , docs : "Redeem Daily Limited" }) , (46u8 , 3u8) => Some (ErrorDetails { pallet : "ToCrabBacking" , error : "NonceDuplicated" , docs : "Message nonce duplicated." }) , (46u8 , 4u8) => Some (ErrorDetails { pallet : "ToCrabBacking" , error : "UnsupportedToken" , docs : "Unsupported token" }) , (46u8 , 5u8) => Some (ErrorDetails { pallet : "ToCrabBacking" , error : "InvalidRecipient" , docs : "Invalid recipient" }) , _ => None } } else { None } @@ -25153,15 +23558,15 @@ pub mod api { #[doc = r" constructing a transaction."] pub enum DefaultAccountData {} impl ::subxt::AccountData for DefaultAccountData { - type StorageEntry = self::system::storage::AccountOwned; + type StorageEntry = self::system::storage::Account; type AccountId = ::subxt::sp_core::crypto::AccountId32; type Index = ::core::primitive::u32; - fn storage_entry(account_id: Self::AccountId) -> Self::StorageEntry { - self::system::storage::AccountOwned(account_id) - } fn nonce(result: &::Value) -> Self::Index { result.nonce } + fn storage_entry(account_id: Self::AccountId) -> Self::StorageEntry { + self::system::storage::Account(account_id) + } } pub struct RuntimeApi { pub client: ::subxt::Client, @@ -25200,32 +23605,6 @@ pub mod api { marker: ::core::marker::PhantomData, } } - pub fn events(&'a self) -> EventsApi<'a, T> { - EventsApi { - client: &self.client, - } - } - } - pub struct EventsApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> EventsApi<'a, T> { - pub async fn at( - &self, - block_hash: T::Hash, - ) -> Result<::subxt::events::Events<'a, T, Event>, ::subxt::BasicError> { - ::subxt::events::at::(self.client, block_hash).await - } - pub async fn subscribe( - &self, - ) -> Result<::subxt::events::EventSubscription<'a, T, Event>, ::subxt::BasicError> { - ::subxt::events::subscribe::(self.client).await - } - pub async fn subscribe_finalized( - &self, - ) -> Result<::subxt::events::EventSubscription<'a, T, Event>, ::subxt::BasicError> { - ::subxt::events::subscribe_finalized::(self.client).await - } } pub struct ConstantsApi; impl ConstantsApi { diff --git a/frame/assistants/client-darwinia/src/subxt_runtime/x_shadow.rs b/frame/assistants/client-darwinia/src/subxt_runtime/x_shadow.rs index 95132da6b..ccdaf5e24 100644 --- a/frame/assistants/client-darwinia/src/subxt_runtime/x_shadow.rs +++ b/frame/assistants/client-darwinia/src/subxt_runtime/x_shadow.rs @@ -27,7 +27,7 @@ impl TryFrom> for ethereum_primitives::hea timestamp: value.timestamp.as_u64(), number: value .number - .ok_or_else(|| Self::Error::Other(format!("Missing ethereum block number")))? + .ok_or_else(|| Self::Error::Custom(format!("Missing ethereum block number")))? .as_u64(), author: runtime_types::primitive_types::H160(value.author.to_fixed_bytes()), transactions_root: subxt::sp_core::H256(value.transactions_root.to_fixed_bytes()), @@ -38,7 +38,7 @@ impl TryFrom> for ethereum_primitives::hea log_bloom: runtime_types::ethbloom::Bloom( value .logs_bloom - .ok_or_else(|| Self::Error::Other("The `logs_bloom` is required".to_string()))? + .ok_or_else(|| Self::Error::Custom("The `logs_bloom` is required".to_string()))? .to_fixed_bytes(), ), gas_used: runtime_types::primitive_types::U256(value.gas_used.0), @@ -62,18 +62,24 @@ impl TryFrom for ethereum_primitives::header::Header { fn try_from(that: EthereumHeaderJson) -> Result { Ok(Self { - parent_hash: subxt::sp_core::H256(array_bytes::hex2array(&that.parent_hash)?), + parent_hash: subxt::sp_core::H256(array_bytes::hex2array(that.parent_hash.as_ref())?), timestamp: that.timestamp, number: that.number, - author: runtime_types::primitive_types::H160(array_bytes::hex2array(that.author)?), // bytes!(that.author.as_str(), 20), + author: runtime_types::primitive_types::H160(array_bytes::hex2array( + that.author.as_ref(), + )?), // bytes!(that.author.as_str(), 20), transactions_root: subxt::sp_core::H256(array_bytes::hex2array( - that.transactions_root, + that.transactions_root.as_ref(), )?), - uncles_hash: subxt::sp_core::H256(array_bytes::hex2array(that.uncles_hash)?), - extra_data: array_bytes::hex2bytes(that.extra_data)?, // no length - state_root: subxt::sp_core::H256(array_bytes::hex2array(that.state_root)?), - receipts_root: subxt::sp_core::H256(array_bytes::hex2array(that.receipts_root)?), - log_bloom: runtime_types::ethbloom::Bloom(array_bytes::hex2array(that.log_bloom)?), // Bloom(bytes!(that.log_bloom.as_str(), 256)), + uncles_hash: subxt::sp_core::H256(array_bytes::hex2array(that.uncles_hash.as_ref())?), + extra_data: array_bytes::hex2bytes(that.extra_data.as_ref())?, // no length + state_root: subxt::sp_core::H256(array_bytes::hex2array(that.state_root.as_ref())?), + receipts_root: subxt::sp_core::H256(array_bytes::hex2array( + that.receipts_root.as_ref(), + )?), + log_bloom: runtime_types::ethbloom::Bloom(array_bytes::hex2array( + that.log_bloom.as_ref(), + )?), // Bloom(bytes!(that.log_bloom.as_str(), 256)), gas_used: runtime_types::primitive_types::U256( subxt::sp_core::U256::from(that.gas_used).0, ), @@ -86,7 +92,7 @@ impl TryFrom for ethereum_primitives::header::Header { seal: { let mut rets = Vec::with_capacity(that.seal.len()); for item in that.seal { - let bytes = array_bytes::hex2bytes(item)?; + let bytes = array_bytes::hex2bytes(item.as_ref())?; rets.push(bytes); } rets @@ -94,7 +100,9 @@ impl TryFrom for ethereum_primitives::header::Header { base_fee_per_gas: that .base_fee_per_gas .map(|v| runtime_types::primitive_types::U256(subxt::sp_core::U256::from(v).0)), - hash: Some(subxt::sp_core::H256(array_bytes::hex2array(that.hash)?)), //Some(bytes!(that.hash.as_str(), 32)), + hash: Some(subxt::sp_core::H256(array_bytes::hex2array( + that.hash.as_ref(), + )?)), //Some(bytes!(that.hash.as_str(), 32)), }) } } @@ -117,7 +125,7 @@ impl TryFrom for ethereum_primitives::receipt::ReceiptProof { Ok(Self { index: u64::from_str_radix(index, 16).unwrap_or(0), - proof: array_bytes::hex2bytes(that.proof)?, + proof: array_bytes::hex2bytes(that.proof.as_ref())?, header_hash: subxt::sp_core::H256(hash), }) } diff --git a/frame/assistants/client-darwinia/src/types/account.rs b/frame/assistants/client-darwinia/src/types/account.rs index eb000475c..ab869d205 100644 --- a/frame/assistants/client-darwinia/src/types/account.rs +++ b/frame/assistants/client-darwinia/src/types/account.rs @@ -56,7 +56,8 @@ mod darwinia { let account_id = AccountId::from(public); // real account, convert to account id - let real = real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real))); + let real = + real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real.as_ref()))); Ok(Self { account_id, diff --git a/frame/assistants/client-darwinia/src/types/patch.rs b/frame/assistants/client-darwinia/src/types/patch.rs index 41c8e46d7..1867aa888 100644 --- a/frame/assistants/client-darwinia/src/types/patch.rs +++ b/frame/assistants/client-darwinia/src/types/patch.rs @@ -2,10 +2,12 @@ use std::collections::HashMap; #[cfg(feature = "ethlike-v1")] use codec::{Decode, Encode}; -use crate::subxt_runtime::api::runtime_types::{darwinia_bridge_ethereum, darwinia_relay_primitives}; use subxt::DefaultExtra; use crate::config::DarwiniaSubxtConfig; +use crate::subxt_runtime::api::runtime_types::{ + darwinia_bridge_ethereum, darwinia_relay_primitives, +}; use crate::types::Balance; /// Real relay affirmation types @@ -44,5 +46,6 @@ where } /// EcdsaSignature +#[cfg(feature = "ethlike-v1")] #[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] pub struct EcdsaSignature(pub [u8; 65]); diff --git a/frame/assistants/client-kusama/Cargo.toml b/frame/assistants/client-kusama/Cargo.toml index f962264c9..3c616b20b 100644 --- a/frame/assistants/client-kusama/Cargo.toml +++ b/frame/assistants/client-kusama/Cargo.toml @@ -13,15 +13,41 @@ repository = "https://github.com/darwinia-network/bridger" version = "0.5.7" [dependencies] -array-bytes = "1.4" -thiserror = "1" -tracing = "0.1" +thiserror = "1" +tracing = "0.1" -serde = { version = "1", features = ["derive"] } +serde = { version = "1", features = ["derive"] } -codec = { package = "parity-scale-codec", version = "2" } -jsonrpsee = { version = "0.8.0", features = ["async-client", "client-ws-transport"] } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } +array-bytes = "2" +codec = { package = "parity-scale-codec", version = "2" } +subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } +bp-kusama = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } -support-toolkit = { path = "../../../frame/supports/support-toolkit" } +## maybe common +async-trait = { optional = true, version = "0.1" } + +## substrate +sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } + +## s2s client +finality-grandpa = { optional = true, version = "0.14" } +bridge-s2s-traits = { optional = true, path = "../../../frame/traits/bridge-s2s", features = ["advanced-types"] } + +support-toolkit = { path = "../../../frame/supports/support-toolkit", features = ["convert"] } + +[features] +default = [] +substrate = [ + "sp-finality-grandpa", + "sp-runtime", + "sp-core", +] +bridge-s2s = [ + "substrate", + "async-trait", + "finality-grandpa", + "bridge-s2s-traits", +] +bridge-s2s-crab = ["bridge-s2s", "bridge-s2s-traits/bridge-parachain"] diff --git a/frame/assistants/client-kusama/src/client.rs b/frame/assistants/client-kusama/src/client.rs index cfdc884b7..f820edcd1 100644 --- a/frame/assistants/client-kusama/src/client.rs +++ b/frame/assistants/client-kusama/src/client.rs @@ -1,9 +1,7 @@ -use crate::error::ClientResult; -use crate::subxt_runtime::api::RuntimeApi; -use subxt::rpc::{Subscription, SubscriptionClientT}; use subxt::Client; use crate::config::KusamaSubxtConfig; +use crate::subxt_runtime::api::RuntimeApi; use crate::types::{KusamaAccount, NodeRuntimeSignedExtra}; /// Kusama client @@ -41,21 +39,3 @@ impl KusamaClient { self.client.clone().to_runtime_api() } } - -impl KusamaClient { - pub async fn subscribe_grandpa_justifications( - &self, - ) -> ClientResult> { - let sub = self - .client - .rpc() - .client - .subscribe( - "grandpa_subscribeJustifications", - None, - "grandpa_unsubscribeJustifications", - ) - .await?; - Ok(sub) - } -} diff --git a/frame/assistants/client-kusama/src/config.rs b/frame/assistants/client-kusama/src/config.rs index 243865d4f..623132a7e 100644 --- a/frame/assistants/client-kusama/src/config.rs +++ b/frame/assistants/client-kusama/src/config.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use subxt::{sp_core, sp_runtime}; +use subxt::sp_runtime; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ClientConfig { @@ -16,13 +16,13 @@ pub struct ClientConfig { pub enum KusamaSubxtConfig {} impl subxt::Config for KusamaSubxtConfig { - type Index = u32; - type BlockNumber = u32; - type Hash = sp_core::H256; - type Hashing = sp_runtime::traits::BlakeTwo256; - type AccountId = sp_runtime::AccountId32; - type Address = sp_runtime::MultiAddress; - type Header = sp_runtime::generic::Header; - type Signature = sp_runtime::MultiSignature; + type Index = bp_kusama::Nonce; + type BlockNumber = bp_kusama::BlockNumber; + type Hash = bp_kusama::Hash; + type Hashing = bp_kusama::Hashing; + type AccountId = bp_kusama::AccountId; + type Address = bp_kusama::Address; + type Header = bp_kusama::Header; + type Signature = bp_kusama::Signature; type Extrinsic = sp_runtime::OpaqueExtrinsic; } diff --git a/frame/assistants/client-kusama/src/error.rs b/frame/assistants/client-kusama/src/error.rs index 422c57e15..8ec18ecfb 100644 --- a/frame/assistants/client-kusama/src/error.rs +++ b/frame/assistants/client-kusama/src/error.rs @@ -1,6 +1,5 @@ #![allow(missing_docs)] -use jsonrpsee::core::error::Error as RpcError; use support_toolkit::error::TkError; use thiserror::Error as ThisError; @@ -12,9 +11,6 @@ pub enum ClientError { #[error(transparent)] SubxtBasicError(subxt::BasicError), - #[error(transparent)] - RpcBasicError(RpcError), - #[error("Please reconnect to rpc server")] ClientRestartNeed, @@ -24,8 +20,11 @@ pub enum ClientError { #[error(transparent)] Tk(#[from] TkError), + #[error("Bytes error: {0}")] + Bytes(String), + #[error("Other error: {0}")] - Other(String), + Custom(String), } impl ClientError { @@ -44,11 +43,25 @@ impl From for ClientError { } } -impl From for ClientError { - fn from(error: RpcError) -> Self { - if let RpcError::RestartNeeded(_) = &error { - return Self::ClientRestartNeed; +impl From for ClientError { + fn from(error: subxt::rpc::RpcError) -> Self { + Self::SubxtBasicError(subxt::BasicError::Rpc(error)) + } +} + +impl From for ClientError { + fn from(error: array_bytes::Error) -> Self { + Self::Bytes(format!("{:?}", error)) + } +} + +#[cfg(feature = "bridge-s2s")] +impl From for bridge_s2s_traits::error::S2SClientError { + fn from(error: ClientError) -> Self { + match error { + ClientError::SubxtBasicError(e) => Self::RPC(format!("{:?}", e)), + ClientError::ClientRestartNeed => Self::RPC(format!("Client restart need")), + _ => Self::Custom(format!("{:?}", error)), } - Self::RpcBasicError(error) } } diff --git a/frame/assistants/client-kusama/src/fastapi/bridge_s2s/bridge_crab.rs b/frame/assistants/client-kusama/src/fastapi/bridge_s2s/bridge_crab.rs new file mode 100644 index 000000000..ade8cf41d --- /dev/null +++ b/frame/assistants/client-kusama/src/fastapi/bridge_s2s/bridge_crab.rs @@ -0,0 +1,36 @@ +use bridge_s2s_traits::client::S2SParaBridgeClientRelaychain; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::types::bp_runtime::Chain; +use bridge_s2s_traits::types::{HeadData, ParaId}; +use sp_core::storage::StorageKey; +use subxt::storage::StorageKeyPrefix; +use subxt::StorageEntry; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::KusamaClient; +use crate::subxt_runtime::api::paras::storage::Heads; +use crate::types::runtime_types::polkadot_parachain; + +#[async_trait::async_trait] +impl S2SParaBridgeClientRelaychain for KusamaClient { + fn gen_parachain_head_storage_key(&self, para_id: u32) -> StorageKey { + Heads(polkadot_parachain::primitives::Id(para_id)) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + async fn para_head_data( + &self, + para_id: ParaId, + hash: Option<::Hash>, + ) -> S2SClientResult> { + let expected_para_id = SmartCodecMapper::map_to(¶_id)?; + Ok(self + .runtime() + .storage() + .paras() + .heads(expected_para_id, hash) + .await? + .map(|v| HeadData(v.0))) + } +} diff --git a/frame/assistants/client-kusama/src/fastapi/bridge_s2s/generic.rs b/frame/assistants/client-kusama/src/fastapi/bridge_s2s/generic.rs new file mode 100644 index 000000000..9696ee3cf --- /dev/null +++ b/frame/assistants/client-kusama/src/fastapi/bridge_s2s/generic.rs @@ -0,0 +1,74 @@ +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::{ + client::{S2SClientBase, S2SClientGeneric}, + types::{bp_header_chain, bp_runtime::Chain}, +}; +use sp_runtime::generic::{Block, SignedBlock}; +use subxt::rpc::{Subscription, SubscriptionClientT}; +use subxt::{sp_core, sp_runtime}; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::KusamaClient; + +impl S2SClientBase for KusamaClient { + const CHAIN: &'static str = "kusama"; + + type Chain = bp_kusama::Kusama; + type Extrinsic = sp_runtime::OpaqueExtrinsic; +} + +#[async_trait::async_trait] +impl S2SClientGeneric for KusamaClient { + type InitializationData = bp_header_chain::InitializationData<::Header>; + + async fn subscribe_grandpa_justifications( + &self, + ) -> S2SClientResult> { + Ok(self + .subxt() + .rpc() + .client + .subscribe( + "grandpa_subscribeJustifications", + None, + "grandpa_unsubscribeJustifications", + ) + .await?) + } + + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>> { + match self.subxt().rpc().header(hash).await? { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn block( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>> + { + Ok(self.subxt().rpc().block(hash).await?) + } + + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; + let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); + Ok(proof) + } + + async fn prepare_initialization_data(&self) -> S2SClientResult { + Err(S2SClientError::Custom(format!( + "[{}] not needed prepare_initialization_data", + ::CHAIN + ))) + } +} diff --git a/frame/assistants/client-kusama/src/fastapi/bridge_s2s/mod.rs b/frame/assistants/client-kusama/src/fastapi/bridge_s2s/mod.rs new file mode 100644 index 000000000..1089cdb09 --- /dev/null +++ b/frame/assistants/client-kusama/src/fastapi/bridge_s2s/mod.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "bridge-s2s-crab")] +mod bridge_crab; +mod generic; diff --git a/frame/assistants/client-kusama/src/fastapi/mod.rs b/frame/assistants/client-kusama/src/fastapi/mod.rs new file mode 100644 index 000000000..c065eca5b --- /dev/null +++ b/frame/assistants/client-kusama/src/fastapi/mod.rs @@ -0,0 +1,2 @@ +#[cfg(feature = "bridge-s2s")] +mod bridge_s2s; diff --git a/frame/assistants/client-kusama/src/lib.rs b/frame/assistants/client-kusama/src/lib.rs index 439ba854b..487233c37 100644 --- a/frame/assistants/client-kusama/src/lib.rs +++ b/frame/assistants/client-kusama/src/lib.rs @@ -2,5 +2,7 @@ pub mod client; pub mod component; pub mod config; pub mod error; -pub mod subxt_runtime; pub mod types; + +mod fastapi; +mod subxt_runtime; diff --git a/frame/assistants/client-kusama/src/subxt_runtime/runtime.rs b/frame/assistants/client-kusama/src/subxt_runtime/runtime.rs index e3d515656..2b77920d3 100644 --- a/frame/assistants/client-kusama/src/subxt_runtime/runtime.rs +++ b/frame/assistants/client-kusama/src/subxt_runtime/runtime.rs @@ -61,7 +61,7 @@ pub mod api { #[codec(index = 38)] Gilt(gilt::Event), #[codec(index = 39)] - BagsList(bags_list::Event), + VoterList(voter_list::Event), #[codec(index = 41)] NominationPools(nomination_pools::Event), #[codec(index = 53)] @@ -702,7 +702,7 @@ pub mod api { > { Ok(::subxt::codec::Decode::decode( &mut &[ - 152u8, 102u8, 250u8, 90u8, 1u8, 0u8, 0u8, 0u8, 0u8, 32u8, 74u8, 169u8, + 16u8, 160u8, 175u8, 83u8, 1u8, 0u8, 0u8, 0u8, 0u8, 32u8, 74u8, 169u8, 209u8, 1u8, 0u8, 0u8, 136u8, 248u8, 36u8, 5u8, 0u8, 0u8, 0u8, 0u8, 1u8, 120u8, 215u8, 186u8, 145u8, 88u8, 1u8, 0u8, 0u8, 1u8, 0u8, 152u8, 247u8, 62u8, 93u8, 1u8, 0u8, 0u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, @@ -756,7 +756,7 @@ pub mod api { &mut &[ 24u8, 107u8, 117u8, 115u8, 97u8, 109u8, 97u8, 52u8, 112u8, 97u8, 114u8, 105u8, 116u8, 121u8, 45u8, 107u8, 117u8, 115u8, 97u8, 109u8, 97u8, 2u8, - 0u8, 0u8, 0u8, 4u8, 36u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 56u8, 223u8, + 0u8, 0u8, 0u8, 14u8, 36u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 56u8, 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, 96u8, 155u8, 4u8, 0u8, 0u8, 0u8, 55u8, 227u8, 151u8, 252u8, 124u8, 145u8, 245u8, 228u8, 1u8, 0u8, 0u8, 0u8, 64u8, 254u8, 58u8, 212u8, 1u8, 248u8, 149u8, 154u8, 6u8, 0u8, 0u8, 0u8, @@ -2129,40 +2129,6 @@ pub mod api { { Ok(::subxt::codec::Decode::decode(&mut &[5u8][..])?) } - pub fn weight_to_fee( - &self, - ) -> ::core::result::Result< - ::std::vec::Vec< - runtime_types::frame_support::weights::WeightToFeeCoefficient< - ::core::primitive::u128, - >, - >, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 4u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 251u8, 78u8, 77u8, 2u8, 0u8, 1u8, - ][..], - )?) - } - pub fn length_to_fee( - &self, - ) -> ::core::result::Result< - ::std::vec::Vec< - runtime_types::frame_support::weights::WeightToFeeCoefficient< - ::core::primitive::u128, - >, - >, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 4u8, 18u8, 22u8, 5u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, - ][..], - )?) - } } } } @@ -8047,11 +8013,12 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Claimed( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_runtime_common::claims::EthereumAddress, - pub ::core::primitive::u128, - ); + pub struct Claimed { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub ethereum_address: + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Claimed { const PALLET: &'static str = "Claims"; const EVENT: &'static str = "Claimed"; @@ -13762,7 +13729,7 @@ pub mod api { // > { // let entry = SignedSubmissionIndices; // self.client.storage().fetch_or_default(&entry, hash).await - // } + // } pub async fn signed_submissions_map (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: pallet_election_provider_multi_phase :: signed :: SignedSubmission < :: subxt :: sp_core :: crypto :: AccountId32 , :: core :: primitive :: u128 , runtime_types :: kusama_runtime :: NposCompactSolution24 > > , :: subxt :: BasicError >{ let entry = SignedSubmissionsMap(_0); self.client.storage().fetch(&entry, hash).await @@ -13844,14 +13811,6 @@ pub mod api { &mut &[101u8, 102u8, 102u8, 102u8, 102u8, 102u8, 102u8, 230u8][..], )?) } - pub fn miner_max_weight( - &self, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - Ok(::subxt::codec::Decode::decode( - &mut &[224u8, 112u8, 192u8, 54u8, 87u8, 1u8, 0u8, 0u8][..], - )?) - } pub fn signed_max_submissions( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> @@ -13865,7 +13824,7 @@ pub mod api { ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode( - &mut &[224u8, 112u8, 192u8, 54u8, 87u8, 1u8, 0u8, 0u8][..], + &mut &[104u8, 55u8, 11u8, 62u8, 87u8, 1u8, 0u8, 0u8][..], )?) } pub fn signed_max_refunds( @@ -13934,14 +13893,6 @@ pub mod api { { Ok(::subxt::codec::Decode::decode(&mut &[255u8, 255u8][..])?) } - pub fn miner_max_length( - &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 0u8, 54u8, 0u8][..], - )?) - } } } } @@ -14288,7 +14239,7 @@ pub mod api { } } } - pub mod bags_list { + pub mod voter_list { use super::runtime_types; pub mod calls { use super::runtime_types; @@ -14298,7 +14249,7 @@ pub mod api { pub dislocated: ::subxt::sp_core::crypto::AccountId32, } impl ::subxt::Call for rebag { - const PALLET: &'static str = "BagsList"; + const PALLET: &'static str = "VoterList"; const FUNCTION: &'static str = "rebag"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -14306,7 +14257,7 @@ pub mod api { pub lighter: ::subxt::sp_core::crypto::AccountId32, } impl ::subxt::Call for put_in_front_of { - const PALLET: &'static str = "BagsList"; + const PALLET: &'static str = "VoterList"; const FUNCTION: &'static str = "put_in_front_of"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { @@ -14353,15 +14304,24 @@ pub mod api { pub to: ::core::primitive::u64, } impl ::subxt::Event for Rebagged { - const PALLET: &'static str = "BagsList"; + const PALLET: &'static str = "VoterList"; const EVENT: &'static str = "Rebagged"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct ScoreUpdated { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub new_score: ::core::primitive::u64, + } + impl ::subxt::Event for ScoreUpdated { + const PALLET: &'static str = "VoterList"; + const EVENT: &'static str = "ScoreUpdated"; + } } pub mod storage { use super::runtime_types; pub struct ListNodes(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for ListNodes { - const PALLET: &'static str = "BagsList"; + const PALLET: &'static str = "VoterList"; const STORAGE: &'static str = "ListNodes"; type Value = runtime_types::pallet_bags_list::list::Node; fn key(&self) -> ::subxt::StorageEntryKey { @@ -14373,7 +14333,7 @@ pub mod api { } pub struct CounterForListNodes; impl ::subxt::StorageEntry for CounterForListNodes { - const PALLET: &'static str = "BagsList"; + const PALLET: &'static str = "VoterList"; const STORAGE: &'static str = "CounterForListNodes"; type Value = ::core::primitive::u32; fn key(&self) -> ::subxt::StorageEntryKey { @@ -14382,7 +14342,7 @@ pub mod api { } pub struct ListBags(pub ::core::primitive::u64); impl ::subxt::StorageEntry for ListBags { - const PALLET: &'static str = "BagsList"; + const PALLET: &'static str = "VoterList"; const STORAGE: &'static str = "ListBags"; type Value = runtime_types::pallet_bags_list::list::Bag; fn key(&self) -> ::subxt::StorageEntryKey { @@ -14720,9 +14680,15 @@ pub mod api { #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct update_roles { pub pool_id: ::core::primitive::u32, - pub root: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - pub nominator: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - pub state_toggler: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + pub new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, + pub new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, + pub new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, } impl ::subxt::Call for update_roles { const PALLET: &'static str = "NominationPools"; @@ -14883,16 +14849,22 @@ pub mod api { pub fn update_roles( &self, pool_id: ::core::primitive::u32, - root: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - nominator: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - state_toggler: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, + new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, + new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, update_roles, DispatchError> { let call = update_roles { pool_id, - root, - nominator, - state_toggler, + new_root, + new_nominator, + new_state_toggler, }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -14985,9 +14957,9 @@ pub mod api { } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct RolesUpdated { - pub root: ::subxt::sp_core::crypto::AccountId32, - pub state_toggler: ::subxt::sp_core::crypto::AccountId32, - pub nominator: ::subxt::sp_core::crypto::AccountId32, + pub root: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + pub state_toggler: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + pub nominator: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, } impl ::subxt::Event for RolesUpdated { const PALLET: &'static str = "NominationPools"; @@ -15417,6 +15389,14 @@ pub mod api { &mut &[112u8, 121u8, 47u8, 110u8, 111u8, 112u8, 108u8, 115u8][..], )?) } + pub fn min_points_to_balance( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[10u8, 0u8, 0u8, 0u8][..], + )?) + } } } } @@ -19203,6 +19183,18 @@ pub mod api { )]) } } + pub struct AccountKeys(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for AccountKeys { + const PALLET: &'static str = "ParaSessionInfo"; + const STORAGE: &'static str = "AccountKeys"; + type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Identity, + )]) + } + } pub struct StorageApi<'a, T: ::subxt::Config> { client: &'a ::subxt::Client, } @@ -19246,6 +19238,24 @@ pub mod api { { self.client.storage().iter(hash).await } + pub async fn account_keys( + &self, + _0: ::core::primitive::u32, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>>, + ::subxt::BasicError, + > { + let entry = AccountKeys(_0); + self.client.storage().fetch(&entry, hash).await + } + pub async fn account_keys_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, AccountKeys>, ::subxt::BasicError> + { + self.client.storage().iter(hash).await + } } } } @@ -19628,25 +19638,27 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Registered( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::subxt::sp_core::crypto::AccountId32, - ); + pub struct Registered { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub manager: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for Registered { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Registered"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Deregistered(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct Deregistered { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for Deregistered { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Deregistered"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Reserved( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::subxt::sp_core::crypto::AccountId32, - ); + pub struct Reserved { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub who: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for Reserved { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Reserved"; @@ -19874,20 +19886,22 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct NewLeasePeriod(pub ::core::primitive::u32); + pub struct NewLeasePeriod { + pub lease_period: ::core::primitive::u32, + } impl ::subxt::Event for NewLeasePeriod { const PALLET: &'static str = "Slots"; const EVENT: &'static str = "NewLeasePeriod"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Leased( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - pub ::core::primitive::u128, - pub ::core::primitive::u128, - ); + pub struct Leased { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub leaser: ::subxt::sp_core::crypto::AccountId32, + pub period_begin: ::core::primitive::u32, + pub period_count: ::core::primitive::u32, + pub extra_reserved: ::core::primitive::u128, + pub total_amount: ::core::primitive::u128, + } impl ::subxt::Event for Leased { const PALLET: &'static str = "Slots"; const EVENT: &'static str = "Leased"; @@ -20065,11 +20079,11 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AuctionStarted( - pub ::core::primitive::u32, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + pub struct AuctionStarted { + pub auction_index: ::core::primitive::u32, + pub lease_period: ::core::primitive::u32, + pub ending: ::core::primitive::u32, + } impl ::subxt::Event for AuctionStarted { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionStarted"; @@ -20081,54 +20095,59 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct AuctionClosed(pub ::core::primitive::u32); + pub struct AuctionClosed { + pub auction_index: ::core::primitive::u32, + } impl ::subxt::Event for AuctionClosed { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionClosed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Reserved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - pub ::core::primitive::u128, - ); + pub struct Reserved { + pub bidder: ::subxt::sp_core::crypto::AccountId32, + pub extra_reserved: ::core::primitive::u128, + pub total_amount: ::core::primitive::u128, + } impl ::subxt::Event for Reserved { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "Reserved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Unreserved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + pub struct Unreserved { + pub bidder: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Unreserved { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "Unreserved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReserveConfiscated( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + pub struct ReserveConfiscated { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub leaser: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for ReserveConfiscated { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "ReserveConfiscated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct BidAccepted( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u128, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + pub struct BidAccepted { + pub bidder: ::subxt::sp_core::crypto::AccountId32, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, + pub first_slot: ::core::primitive::u32, + pub last_slot: ::core::primitive::u32, + } impl ::subxt::Event for BidAccepted { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "BidAccepted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct WinningOffset(pub ::core::primitive::u32, pub ::core::primitive::u32); + pub struct WinningOffset { + pub auction_index: ::core::primitive::u32, + pub block_number: ::core::primitive::u32, + } impl ::subxt::Event for WinningOffset { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "WinningOffset"; @@ -20531,76 +20550,88 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Created(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct Created { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for Created { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Created"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Contributed( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u128, - ); + pub struct Contributed { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub fund_index: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Contributed { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Contributed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Withdrew( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u128, - ); + pub struct Withdrew { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub fund_index: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Withdrew { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Withdrew"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PartiallyRefunded(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct PartiallyRefunded { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for PartiallyRefunded { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "PartiallyRefunded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AllRefunded(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct AllRefunded { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for AllRefunded { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "AllRefunded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Dissolved(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct Dissolved { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for Dissolved { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Dissolved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct HandleBidResult( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + pub struct HandleBidResult { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for HandleBidResult { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "HandleBidResult"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Edited(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct Edited { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for Edited { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Edited"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MemoUpdated( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::std::vec::Vec<::core::primitive::u8>, - ); + pub struct MemoUpdated { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub memo: ::std::vec::Vec<::core::primitive::u8>, + } impl ::subxt::Event for MemoUpdated { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "MemoUpdated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AddedToNewRaise(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct AddedToNewRaise { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for AddedToNewRaise { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "AddedToNewRaise"; @@ -21647,15 +21678,6 @@ pub mod api { pub read: ::core::primitive::u64, pub write: ::core::primitive::u64, } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct WeightToFeeCoefficient<_0> { - pub coeff_integer: _0, - pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, - pub negative: ::core::primitive::bool, - pub degree: ::core::primitive::u8, - } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct PalletId(pub [::core::primitive::u8; 8usize]); @@ -21935,7 +21957,7 @@ pub mod api { #[codec(index = 38)] Gilt(runtime_types::pallet_gilt::pallet::Call), #[codec(index = 39)] - BagsList(runtime_types::pallet_bags_list::pallet::Call), + VoterList(runtime_types::pallet_bags_list::pallet::Call), #[codec(index = 41)] NominationPools(runtime_types::pallet_nomination_pools::pallet::Call), #[codec(index = 51)] @@ -22036,7 +22058,7 @@ pub mod api { #[codec(index = 38)] Gilt(runtime_types::pallet_gilt::pallet::Event), #[codec(index = 39)] - BagsList(runtime_types::pallet_bags_list::pallet::Event), + VoterList(runtime_types::pallet_bags_list::pallet::Event), #[codec(index = 41)] NominationPools(runtime_types::pallet_nomination_pools::pallet::Event), #[codec(index = 53)] @@ -22440,6 +22462,7 @@ pub mod api { pub prev: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, pub next: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, pub bag_upper: ::core::primitive::u64, + pub score: ::core::primitive::u64, } } pub mod pallet { @@ -22474,6 +22497,11 @@ pub mod api { from: ::core::primitive::u64, to: ::core::primitive::u64, }, + #[codec(index = 1)] + ScoreUpdated { + who: ::subxt::sp_core::crypto::AccountId32, + new_score: ::core::primitive::u64, + }, } } } @@ -24769,10 +24797,15 @@ pub mod api { #[codec(index = 11)] update_roles { pool_id: ::core::primitive::u32, - root: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - nominator: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - state_toggler: - ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + new_root: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, + new_nominator: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, + new_state_toggler: runtime_types::pallet_nomination_pools::ConfigOp< + ::subxt::sp_core::crypto::AccountId32, + >, }, } #[derive( @@ -24878,9 +24911,10 @@ pub mod api { }, #[codec(index = 8)] RolesUpdated { - root: ::subxt::sp_core::crypto::AccountId32, - state_toggler: ::subxt::sp_core::crypto::AccountId32, - nominator: ::subxt::sp_core::crypto::AccountId32, + root: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + state_toggler: + ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + nominator: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, }, } } @@ -24923,9 +24957,9 @@ pub mod api { #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct PoolRoles<_0> { pub depositor: _0, - pub root: _0, - pub nominator: _0, - pub state_toggler: _0, + pub root: ::core::option::Option<_0>, + pub nominator: ::core::option::Option<_0>, + pub state_toggler: ::core::option::Option<_0>, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum PoolState { @@ -27134,40 +27168,45 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - AuctionStarted( - ::core::primitive::u32, - ::core::primitive::u32, - ::core::primitive::u32, - ), + AuctionStarted { + auction_index: ::core::primitive::u32, + lease_period: ::core::primitive::u32, + ending: ::core::primitive::u32, + }, #[codec(index = 1)] - AuctionClosed(::core::primitive::u32), + AuctionClosed { + auction_index: ::core::primitive::u32, + }, #[codec(index = 2)] - Reserved( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u128, - ), + Reserved { + bidder: ::subxt::sp_core::crypto::AccountId32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, #[codec(index = 3)] - Unreserved( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + Unreserved { + bidder: ::subxt::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, #[codec(index = 4)] - ReserveConfiscated( - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + ReserveConfiscated { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::subxt::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, #[codec(index = 5)] - BidAccepted( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - ), + BidAccepted { + bidder: ::subxt::sp_core::crypto::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + first_slot: ::core::primitive::u32, + last_slot: ::core::primitive::u32, + }, #[codec(index = 6)] - WinningOffset(::core::primitive::u32, ::core::primitive::u32), + WinningOffset { + auction_index: ::core::primitive::u32, + block_number: ::core::primitive::u32, + }, } } } @@ -27239,11 +27278,12 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - Claimed( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_runtime_common::claims::EthereumAddress, - ::core::primitive::u128, - ), + Claimed { + who: ::subxt::sp_core::crypto::AccountId32, + ethereum_address: + runtime_types::polkadot_runtime_common::claims::EthereumAddress, + amount: ::core::primitive::u128, + }, } } #[derive( @@ -27400,40 +27440,55 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - Created(runtime_types::polkadot_parachain::primitives::Id), + Created { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 1)] - Contributed( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - ), + Contributed { + who: ::subxt::sp_core::crypto::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, #[codec(index = 2)] - Withdrew( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - ), + Withdrew { + who: ::subxt::sp_core::crypto::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, #[codec(index = 3)] - PartiallyRefunded(runtime_types::polkadot_parachain::primitives::Id), + PartiallyRefunded { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 4)] - AllRefunded(runtime_types::polkadot_parachain::primitives::Id), + AllRefunded { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 5)] - Dissolved(runtime_types::polkadot_parachain::primitives::Id), + Dissolved { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 6)] - HandleBidResult( - runtime_types::polkadot_parachain::primitives::Id, - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), + HandleBidResult { + para_id: runtime_types::polkadot_parachain::primitives::Id, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, #[codec(index = 7)] - Edited(runtime_types::polkadot_parachain::primitives::Id), + Edited { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 8)] - MemoUpdated( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec<::core::primitive::u8>, - ), + MemoUpdated { + who: ::subxt::sp_core::crypto::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + }, #[codec(index = 9)] - AddedToNewRaise(runtime_types::polkadot_parachain::primitives::Id), + AddedToNewRaise { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, } } #[derive( @@ -27544,17 +27599,19 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - Registered( - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::sp_core::crypto::AccountId32, - ), + Registered { + para_id: runtime_types::polkadot_parachain::primitives::Id, + manager: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 1)] - Deregistered(runtime_types::polkadot_parachain::primitives::Id), + Deregistered { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 2)] - Reserved( - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::sp_core::crypto::AccountId32, - ), + Reserved { + para_id: runtime_types::polkadot_parachain::primitives::Id, + who: ::subxt::sp_core::crypto::AccountId32, + }, } } #[derive( @@ -27605,16 +27662,18 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - NewLeasePeriod(::core::primitive::u32), + NewLeasePeriod { + lease_period: ::core::primitive::u32, + }, #[codec(index = 1)] - Leased( - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - ::core::primitive::u128, - ::core::primitive::u128, - ), + Leased { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::subxt::sp_core::crypto::AccountId32, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, } } } @@ -30541,15 +30600,15 @@ pub mod api { pub error: &'static str, pub docs: &'static str, } - // impl DispatchError { - // pub fn details(&self) -> Option { - // if let Self::Module { index, error } = self { - // match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (1u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (1u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (1u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (1u8 , 3u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidConfiguration" , docs : "Submitted configuration is invalid." }) , (3u8 , 0u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotAssigned" , docs : "The index was not already assigned." }) , (3u8 , 1u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotOwner" , docs : "The index is assigned to another account." }) , (3u8 , 2u8) => Some (ErrorDetails { pallet : "Indices" , error : "InUse" , docs : "The index was not available." }) , (3u8 , 3u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotTransfer" , docs : "The source and destination accounts are identical." }) , (3u8 , 4u8) => Some (ErrorDetails { pallet : "Indices" , error : "Permanent" , docs : "The index is permanent and may not be freed/changed." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value" }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal" }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value" }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit" }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account" }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account" }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist" }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (6u8 , 0u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotController" , docs : "Not a controller account." }) , (6u8 , 1u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotStash" , docs : "Not a stash account." }) , (6u8 , 2u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyBonded" , docs : "Stash is already bonded." }) , (6u8 , 3u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyPaired" , docs : "Controller is already paired." }) , (6u8 , 4u8) => Some (ErrorDetails { pallet : "Staking" , error : "EmptyTargets" , docs : "Targets cannot be empty." }) , (6u8 , 5u8) => Some (ErrorDetails { pallet : "Staking" , error : "DuplicateIndex" , docs : "Duplicate index." }) , (6u8 , 6u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidSlashIndex" , docs : "Slash record index out of bounds." }) , (6u8 , 7u8) => Some (ErrorDetails { pallet : "Staking" , error : "InsufficientBond" , docs : "Cannot have a validator or nominator role, with value less than the minimum defined by\ngovernance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the\nintention, `chill` first to remove one's role as validator/nominator." }) , (6u8 , 8u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoMoreChunks" , docs : "Can not schedule more unlock chunks." }) , (6u8 , 9u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoUnlockChunk" , docs : "Can not rebond without unlocking chunks." }) , (6u8 , 10u8) => Some (ErrorDetails { pallet : "Staking" , error : "FundedTarget" , docs : "Attempting to target a stash that still has funds." }) , (6u8 , 11u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidEraToReward" , docs : "Invalid era to reward." }) , (6u8 , 12u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidNumberOfNominations" , docs : "Invalid number of nominations." }) , (6u8 , 13u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotSortedAndUnique" , docs : "Items are not sorted and unique." }) , (6u8 , 14u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyClaimed" , docs : "Rewards for this era have already been claimed for this validator." }) , (6u8 , 15u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectHistoryDepth" , docs : "Incorrect previous history depth input provided." }) , (6u8 , 16u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectSlashingSpans" , docs : "Incorrect number of slashing spans provided." }) , (6u8 , 17u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadState" , docs : "Internal state has become somehow corrupted and the operation cannot continue." }) , (6u8 , 18u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyTargets" , docs : "Too many nomination targets supplied." }) , (6u8 , 19u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadTarget" , docs : "A nomination target was supplied that was blocked or otherwise not a validator." }) , (6u8 , 20u8) => Some (ErrorDetails { pallet : "Staking" , error : "CannotChillOther" , docs : "The user has enough bond and thus cannot be chilled forcefully by an external person." }) , (6u8 , 21u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyNominators" , docs : "There are too many nominators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (6u8 , 22u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyValidators" , docs : "There are too many validators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (6u8 , 23u8) => Some (ErrorDetails { pallet : "Staking" , error : "CommissionTooLow" , docs : "Commission is too low. Must be at least `MinCommission`." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (10u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (10u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (10u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (10u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (10u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (10u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (10u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (11u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (11u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ValueLow" , docs : "Value too low" }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalMissing" , docs : "Proposal does not exist" }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyCanceled" , docs : "Cannot cancel the same proposal twice" }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicateProposal" , docs : "Proposal already made" }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalBlacklisted" , docs : "Proposal still blacklisted" }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotSimpleMajority" , docs : "Next external proposal not simple majority" }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InvalidHash" , docs : "Invalid hash" }) , (13u8 , 7u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoProposal" , docs : "No external proposal" }) , (13u8 , 8u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyVetoed" , docs : "Identity may not veto a proposal twice" }) , (13u8 , 9u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicatePreimage" , docs : "Preimage already noted" }) , (13u8 , 10u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotImminent" , docs : "Not imminent" }) , (13u8 , 11u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooEarly" , docs : "Too early" }) , (13u8 , 12u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Imminent" , docs : "Imminent" }) , (13u8 , 13u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageMissing" , docs : "Preimage not found" }) , (13u8 , 14u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ReferendumInvalid" , docs : "Vote given for invalid referendum" }) , (13u8 , 15u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageInvalid" , docs : "Invalid preimage" }) , (13u8 , 16u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoneWaiting" , docs : "No proposals waiting" }) , (13u8 , 17u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotVoter" , docs : "The given account did not vote on the referendum." }) , (13u8 , 18u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoPermission" , docs : "The actor has no permission to conduct the action." }) , (13u8 , 19u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyDelegating" , docs : "The account is already delegating." }) , (13u8 , 20u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InsufficientFunds" , docs : "Too high a balance was provided that the account cannot afford." }) , (13u8 , 21u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotDelegating" , docs : "The account is not currently delegating." }) , (13u8 , 22u8) => Some (ErrorDetails { pallet : "Democracy" , error : "VotesExist" , docs : "The account currently has votes attached to it and the operation cannot succeed until\nthese are removed, either through `unvote` or `reap_vote`." }) , (13u8 , 23u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InstantNotAllowed" , docs : "The instant referendum origin is currently disallowed." }) , (13u8 , 24u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Nonsense" , docs : "Delegation to oneself makes no sense." }) , (13u8 , 25u8) => Some (ErrorDetails { pallet : "Democracy" , error : "WrongUpperBound" , docs : "Invalid upper bound." }) , (13u8 , 26u8) => Some (ErrorDetails { pallet : "Democracy" , error : "MaxVotesReached" , docs : "Maximum number of votes reached." }) , (13u8 , 27u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooManyProposals" , docs : "Maximum number of proposals reached." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "Council" , error : "NotMember" , docs : "Account is not a member" }) , (14u8 , 1u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (14u8 , 2u8) => Some (ErrorDetails { pallet : "Council" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (14u8 , 3u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongIndex" , docs : "Mismatched index" }) , (14u8 , 4u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (14u8 , 5u8) => Some (ErrorDetails { pallet : "Council" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (14u8 , 6u8) => Some (ErrorDetails { pallet : "Council" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (14u8 , 7u8) => Some (ErrorDetails { pallet : "Council" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (14u8 , 8u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (14u8 , 9u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (15u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "NotMember" , docs : "Account is not a member" }) , (15u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (15u8 , 2u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (15u8 , 3u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongIndex" , docs : "Mismatched index" }) , (15u8 , 4u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (15u8 , 5u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (15u8 , 6u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (15u8 , 7u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (15u8 , 8u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (15u8 , 9u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToVote" , docs : "Cannot vote when no candidates or members exist." }) , (16u8 , 1u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NoVotes" , docs : "Must vote for at least one candidate." }) , (16u8 , 2u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "TooManyVotes" , docs : "Cannot vote more than candidates." }) , (16u8 , 3u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MaximumVotesExceeded" , docs : "Cannot vote more than maximum allowed." }) , (16u8 , 4u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "LowBalance" , docs : "Cannot vote with stake less than minimum balance." }) , (16u8 , 5u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToPayBond" , docs : "Voter can not pay voting bond." }) , (16u8 , 6u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MustBeVoter" , docs : "Must be a voter." }) , (16u8 , 7u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "ReportSelf" , docs : "Cannot report self." }) , (16u8 , 8u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "DuplicatedCandidate" , docs : "Duplicated candidate submission." }) , (16u8 , 9u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MemberSubmit" , docs : "Member cannot re-submit candidacy." }) , (16u8 , 10u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "RunnerUpSubmit" , docs : "Runner cannot re-submit candidacy." }) , (16u8 , 11u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InsufficientCandidateFunds" , docs : "Candidate does not have enough funds." }) , (16u8 , 12u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NotMember" , docs : "Not a member." }) , (16u8 , 13u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidWitnessData" , docs : "The provided count of number of candidates is incorrect." }) , (16u8 , 14u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidVoteCount" , docs : "The provided count of number of votes is incorrect." }) , (16u8 , 15u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidRenouncing" , docs : "The renouncing origin presented a wrong `Renouncing` parameter." }) , (16u8 , 16u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidReplacement" , docs : "Prediction regarding replacement after member removal is wrong." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "AlreadyMember" , docs : "Already a member." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "NotMember" , docs : "Not a member." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (18u8 , 2u8) => Some (ErrorDetails { pallet : "Treasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (18u8 , 3u8) => Some (ErrorDetails { pallet : "Treasury" , error : "ProposalNotApproved" , docs : "Proposal has not been approved." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "Claims" , error : "InvalidEthereumSignature" , docs : "Invalid Ethereum signature." }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "Claims" , error : "SignerHasNoClaim" , docs : "Ethereum address has no claim." }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "Claims" , error : "SenderHasNoClaim" , docs : "Account ID sending transaction has no claim." }) , (19u8 , 3u8) => Some (ErrorDetails { pallet : "Claims" , error : "PotUnderflow" , docs : "There's not enough in the pot to pay out some unvested amount. Generally implies a logic\nerror." }) , (19u8 , 4u8) => Some (ErrorDetails { pallet : "Claims" , error : "InvalidStatement" , docs : "A needed statement was not included." }) , (19u8 , 5u8) => Some (ErrorDetails { pallet : "Claims" , error : "VestedBalanceExists" , docs : "The account already has a vested balance." }) , (24u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManySubAccounts" , docs : "Too many subs-accounts." }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotFound" , docs : "Account isn't found." }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotNamed" , docs : "Account isn't named." }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "Identity" , error : "EmptyIndex" , docs : "Empty index." }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "Identity" , error : "FeeChanged" , docs : "Fee is changed." }) , (25u8 , 5u8) => Some (ErrorDetails { pallet : "Identity" , error : "NoIdentity" , docs : "No identity found." }) , (25u8 , 6u8) => Some (ErrorDetails { pallet : "Identity" , error : "StickyJudgement" , docs : "Sticky judgement." }) , (25u8 , 7u8) => Some (ErrorDetails { pallet : "Identity" , error : "JudgementGiven" , docs : "Judgement given." }) , (25u8 , 8u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidJudgement" , docs : "Invalid judgement." }) , (25u8 , 9u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidIndex" , docs : "The index is invalid." }) , (25u8 , 10u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidTarget" , docs : "The target is invalid." }) , (25u8 , 11u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyFields" , docs : "Too many additional fields." }) , (25u8 , 12u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyRegistrars" , docs : "Maximum amount of registrars reached. Cannot add any more." }) , (25u8 , 13u8) => Some (ErrorDetails { pallet : "Identity" , error : "AlreadyClaimed" , docs : "Account ID is already named." }) , (25u8 , 14u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotSub" , docs : "Sender is not a sub-account." }) , (25u8 , 15u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotOwned" , docs : "Sub-account isn't owned by sender." }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Society" , error : "BadPosition" , docs : "An incorrect position was provided." }) , (26u8 , 1u8) => Some (ErrorDetails { pallet : "Society" , error : "NotMember" , docs : "User is not a member." }) , (26u8 , 2u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyMember" , docs : "User is already a member." }) , (26u8 , 3u8) => Some (ErrorDetails { pallet : "Society" , error : "Suspended" , docs : "User is suspended." }) , (26u8 , 4u8) => Some (ErrorDetails { pallet : "Society" , error : "NotSuspended" , docs : "User is not suspended." }) , (26u8 , 5u8) => Some (ErrorDetails { pallet : "Society" , error : "NoPayout" , docs : "Nothing to payout." }) , (26u8 , 6u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyFounded" , docs : "Society already founded." }) , (26u8 , 7u8) => Some (ErrorDetails { pallet : "Society" , error : "InsufficientPot" , docs : "Not enough in pot to accept candidate." }) , (26u8 , 8u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyVouching" , docs : "Member is already vouching or banned from vouching again." }) , (26u8 , 9u8) => Some (ErrorDetails { pallet : "Society" , error : "NotVouching" , docs : "Member is not vouching." }) , (26u8 , 10u8) => Some (ErrorDetails { pallet : "Society" , error : "Head" , docs : "Cannot remove the head of the chain." }) , (26u8 , 11u8) => Some (ErrorDetails { pallet : "Society" , error : "Founder" , docs : "Cannot remove the founder." }) , (26u8 , 12u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyBid" , docs : "User has already made a bid." }) , (26u8 , 13u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyCandidate" , docs : "User is already a candidate." }) , (26u8 , 14u8) => Some (ErrorDetails { pallet : "Society" , error : "NotCandidate" , docs : "User is not a candidate." }) , (26u8 , 15u8) => Some (ErrorDetails { pallet : "Society" , error : "MaxMembers" , docs : "Too many members in the society." }) , (26u8 , 16u8) => Some (ErrorDetails { pallet : "Society" , error : "NotFounder" , docs : "The caller is not the founder." }) , (26u8 , 17u8) => Some (ErrorDetails { pallet : "Society" , error : "NotHead" , docs : "The caller is not the head." }) , (27u8 , 0u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotAllowed" , docs : "User is not allowed to make a call on behalf of this account" }) , (27u8 , 1u8) => Some (ErrorDetails { pallet : "Recovery" , error : "ZeroThreshold" , docs : "Threshold must be greater than zero" }) , (27u8 , 2u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotEnoughFriends" , docs : "Friends list must be greater than zero and threshold" }) , (27u8 , 3u8) => Some (ErrorDetails { pallet : "Recovery" , error : "MaxFriends" , docs : "Friends list must be less than max friends" }) , (27u8 , 4u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotSorted" , docs : "Friends list must be sorted and free of duplicates" }) , (27u8 , 5u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotRecoverable" , docs : "This account is not set up for recovery" }) , (27u8 , 6u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyRecoverable" , docs : "This account is already set up for recovery" }) , (27u8 , 7u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyStarted" , docs : "A recovery process has already started for this account" }) , (27u8 , 8u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotStarted" , docs : "A recovery process has not started for this rescuer" }) , (27u8 , 9u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotFriend" , docs : "This account is not a friend who can vouch" }) , (27u8 , 10u8) => Some (ErrorDetails { pallet : "Recovery" , error : "DelayPeriod" , docs : "The friend must wait until the delay period to vouch for this recovery" }) , (27u8 , 11u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyVouched" , docs : "This user has already vouched for this recovery" }) , (27u8 , 12u8) => Some (ErrorDetails { pallet : "Recovery" , error : "Threshold" , docs : "The threshold for recovering this account has not been met" }) , (27u8 , 13u8) => Some (ErrorDetails { pallet : "Recovery" , error : "StillActive" , docs : "There are still active recovery attempts that need to be closed" }) , (27u8 , 14u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyProxy" , docs : "This account is already set up for recovery" }) , (27u8 , 15u8) => Some (ErrorDetails { pallet : "Recovery" , error : "BadState" , docs : "Some internal state is broken." }) , (28u8 , 0u8) => Some (ErrorDetails { pallet : "Vesting" , error : "NotVesting" , docs : "The account given is not vesting." }) , (28u8 , 1u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AtMaxVestingSchedules" , docs : "The account already has `MaxVestingSchedules` count of schedules and thus\ncannot add another one. Consider merging existing schedules in order to add another." }) , (28u8 , 2u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AmountLow" , docs : "Amount being transferred is too low to create a vesting schedule." }) , (28u8 , 3u8) => Some (ErrorDetails { pallet : "Vesting" , error : "ScheduleIndexOutOfBounds" , docs : "An index was out of bounds of the vesting schedules." }) , (28u8 , 4u8) => Some (ErrorDetails { pallet : "Vesting" , error : "InvalidScheduleParams" , docs : "Failed to create a new schedule because some parameter was invalid." }) , (29u8 , 0u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "FailedToSchedule" , docs : "Failed to schedule a call" }) , (29u8 , 1u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "NotFound" , docs : "Cannot find the scheduled call." }) , (29u8 , 2u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "TargetBlockNumberInPast" , docs : "Given target block number is in the past." }) , (29u8 , 3u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "RescheduleNoChange" , docs : "Reschedule failed because it does not change scheduled time." }) , (30u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (30u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (30u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (30u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (30u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (30u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (30u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (30u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (31u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (31u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (31u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (31u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (31u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (31u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (31u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (31u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (31u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (31u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (31u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (31u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (31u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (31u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (32u8 , 0u8) => Some (ErrorDetails { pallet : "Preimage" , error : "TooLarge" , docs : "Preimage is too large to store on-chain." }) , (32u8 , 1u8) => Some (ErrorDetails { pallet : "Preimage" , error : "AlreadyNoted" , docs : "Preimage has already been noted on-chain." }) , (32u8 , 2u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotAuthorized" , docs : "The user is not authorized to perform this action." }) , (32u8 , 3u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotNoted" , docs : "The preimage cannot be removed since it has not yet been noted." }) , (32u8 , 4u8) => Some (ErrorDetails { pallet : "Preimage" , error : "Requested" , docs : "A preimage may not be removed when there are outstanding requests." }) , (32u8 , 5u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotRequested" , docs : "The preimage request cannot be removed since no outstanding requests exist." }) , (35u8 , 0u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (35u8 , 1u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (35u8 , 2u8) => Some (ErrorDetails { pallet : "Bounties" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (35u8 , 3u8) => Some (ErrorDetails { pallet : "Bounties" , error : "UnexpectedStatus" , docs : "The bounty status is unexpected." }) , (35u8 , 4u8) => Some (ErrorDetails { pallet : "Bounties" , error : "RequireCurator" , docs : "Require bounty curator." }) , (35u8 , 5u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidValue" , docs : "Invalid bounty value." }) , (35u8 , 6u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidFee" , docs : "Invalid bounty fee." }) , (35u8 , 7u8) => Some (ErrorDetails { pallet : "Bounties" , error : "PendingPayout" , docs : "A bounty payout is pending.\nTo cancel the bounty, you must unassign and slash the curator." }) , (35u8 , 8u8) => Some (ErrorDetails { pallet : "Bounties" , error : "Premature" , docs : "The bounties cannot be claimed/closed because it's still in the countdown period." }) , (35u8 , 9u8) => Some (ErrorDetails { pallet : "Bounties" , error : "HasActiveChildBounty" , docs : "The bounty cannot be closed because it has active child bounties." }) , (35u8 , 10u8) => Some (ErrorDetails { pallet : "Bounties" , error : "TooManyQueued" , docs : "Too many approvals are already queued." }) , (40u8 , 0u8) => Some (ErrorDetails { pallet : "ChildBounties" , error : "ParentBountyNotActive" , docs : "The parent bounty is not in active state." }) , (40u8 , 1u8) => Some (ErrorDetails { pallet : "ChildBounties" , error : "InsufficientBountyBalance" , docs : "The bounty balance is not enough to add new child-bounty." }) , (40u8 , 2u8) => Some (ErrorDetails { pallet : "ChildBounties" , error : "TooManyChildBounties" , docs : "Number of child bounties exceeds limit `MaxActiveChildBountyCount`." }) , (36u8 , 0u8) => Some (ErrorDetails { pallet : "Tips" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (36u8 , 1u8) => Some (ErrorDetails { pallet : "Tips" , error : "AlreadyKnown" , docs : "The tip was already found/started." }) , (36u8 , 2u8) => Some (ErrorDetails { pallet : "Tips" , error : "UnknownTip" , docs : "The tip hash is unknown." }) , (36u8 , 3u8) => Some (ErrorDetails { pallet : "Tips" , error : "NotFinder" , docs : "The account attempting to retract the tip is not the finder of the tip." }) , (36u8 , 4u8) => Some (ErrorDetails { pallet : "Tips" , error : "StillOpen" , docs : "The tip cannot be claimed/closed because there are not enough tippers yet." }) , (36u8 , 5u8) => Some (ErrorDetails { pallet : "Tips" , error : "Premature" , docs : "The tip cannot be claimed/closed because it's still in the countdown period." }) , (37u8 , 0u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchEarlySubmission" , docs : "Submission was too early." }) , (37u8 , 1u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWrongWinnerCount" , docs : "Wrong number of winners presented." }) , (37u8 , 2u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWeakSubmission" , docs : "Submission was too weak, score-wise." }) , (37u8 , 3u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedQueueFull" , docs : "The queue was full, and the solution was not better than any of the existing ones." }) , (37u8 , 4u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedCannotPayDeposit" , docs : "The origin failed to pay the deposit." }) , (37u8 , 5u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedInvalidWitness" , docs : "Witness data to dispatchable is invalid." }) , (37u8 , 6u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedTooMuchWeight" , docs : "The signed submission consumes too much weight" }) , (37u8 , 7u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "OcwCallWrongEra" , docs : "OCW submitted solution for wrong round" }) , (37u8 , 8u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "MissingSnapshotMetadata" , docs : "Snapshot metadata should exist but didn't." }) , (37u8 , 9u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "InvalidSubmissionIndex" , docs : "`Self::insert_submission` returned an invalid index." }) , (37u8 , 10u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "CallNotAllowed" , docs : "The call is not allowed at this point." }) , (37u8 , 11u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "FallbackFailed" , docs : "The fallback failed" }) , (38u8 , 0u8) => Some (ErrorDetails { pallet : "Gilt" , error : "DurationTooSmall" , docs : "The duration of the bid is less than one." }) , (38u8 , 1u8) => Some (ErrorDetails { pallet : "Gilt" , error : "DurationTooBig" , docs : "The duration is the bid is greater than the number of queues." }) , (38u8 , 2u8) => Some (ErrorDetails { pallet : "Gilt" , error : "AmountTooSmall" , docs : "The amount of the bid is less than the minimum allowed." }) , (38u8 , 3u8) => Some (ErrorDetails { pallet : "Gilt" , error : "BidTooLow" , docs : "The queue for the bid's duration is full and the amount bid is too low to get in\nthrough replacing an existing bid." }) , (38u8 , 4u8) => Some (ErrorDetails { pallet : "Gilt" , error : "Unknown" , docs : "Gilt index is unknown." }) , (38u8 , 5u8) => Some (ErrorDetails { pallet : "Gilt" , error : "NotOwner" , docs : "Not the owner of the gilt." }) , (38u8 , 6u8) => Some (ErrorDetails { pallet : "Gilt" , error : "NotExpired" , docs : "Gilt not yet at expiry date." }) , (38u8 , 7u8) => Some (ErrorDetails { pallet : "Gilt" , error : "NotFound" , docs : "The given bid for retraction is not found." }) , (39u8 , 0u8) => Some (ErrorDetails { pallet : "BagsList" , error : "List" , docs : "A error in the list interface implementation." }) , (41u8 , 0u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "PoolNotFound" , docs : "A (bonded) pool id does not exist." }) , (41u8 , 1u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "PoolMemberNotFound" , docs : "An account is not a member." }) , (41u8 , 2u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "RewardPoolNotFound" , docs : "A reward pool does not exist. In all cases this is a system logic error." }) , (41u8 , 3u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "SubPoolsNotFound" , docs : "A sub pool does not exist." }) , (41u8 , 4u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "AccountBelongsToOtherPool" , docs : "An account is already delegating in another pool. An account may only belong to one\npool at a time." }) , (41u8 , 5u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "InsufficientBond" , docs : "The pool has insufficient balance to bond as a nominator." }) , (41u8 , 6u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "AlreadyUnbonding" , docs : "The member is already unbonding in this era." }) , (41u8 , 7u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "FullyUnbonding" , docs : "The member is fully unbonded (and thus cannot access the bonded and reward pool\nanymore to, for example, collect rewards)." }) , (41u8 , 8u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MaxUnbondingLimit" , docs : "The member cannot unbond further chunks due to reaching the limit." }) , (41u8 , 9u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "CannotWithdrawAny" , docs : "None of the funds can be withdrawn yet because the bonding duration has not passed." }) , (41u8 , 10u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MinimumBondNotMet" , docs : "The amount does not meet the minimum bond to either join or create a pool." }) , (41u8 , 11u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "OverflowRisk" , docs : "The transaction could not be executed due to overflow risk for the pool." }) , (41u8 , 12u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotDestroying" , docs : "A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for\nother members to be permissionlessly unbonded." }) , (41u8 , 13u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotOnlyPoolMember" , docs : "The depositor must be the only member in the bonded pool in order to unbond. And the\ndepositor must be the only member in the sub pools in order to withdraw unbonded." }) , (41u8 , 14u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotNominator" , docs : "The caller does not have nominating permissions for the pool." }) , (41u8 , 15u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotKickerOrDestroying" , docs : "Either a) the caller cannot make a valid kick or b) the pool is not destroying." }) , (41u8 , 16u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotOpen" , docs : "The pool is not open to join" }) , (41u8 , 17u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MaxPools" , docs : "The system is maxed out on pools." }) , (41u8 , 18u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MaxPoolMembers" , docs : "Too many members in the pool or system." }) , (41u8 , 19u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "CanNotChangeState" , docs : "The pools state cannot be changed." }) , (41u8 , 20u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "DoesNotHavePermission" , docs : "The caller does not have adequate permissions." }) , (41u8 , 21u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MetadataExceedsMaxLen" , docs : "Metadata exceeds [`Config::MaxMetadataLen`]" }) , (41u8 , 22u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "DefensiveError" , docs : "Some error occurred that should never happen. This should be reported to the\nmaintainers." }) , (41u8 , 23u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotEnoughPointsToUnbond" , docs : "Not enough points. Ty unbonding less." }) , (41u8 , 24u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "PartialUnbondNotAllowedPermissionlessly" , docs : "Partial unbonding now allowed permissionlessly." }) , (51u8 , 0u8) => Some (ErrorDetails { pallet : "Configuration" , error : "InvalidNewValue" , docs : "The new value for a configuration parameter is invalid." }) , (53u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateValidatorIndices" , docs : "Validator indices are out of order or contains duplicates." }) , (53u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateDisputeStatementSet" , docs : "Dispute statement sets are out of order or contain duplicates." }) , (53u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateBackedCandidates" , docs : "Backed candidates are out of order (core index) or contain duplicates." }) , (53u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnexpectedRelayParent" , docs : "A different relay parent was provided compared to the on-chain stored one." }) , (53u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongBitfieldSize" , docs : "Availability bitfield has unexpected size." }) , (53u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldAllZeros" , docs : "Bitfield consists of zeros only." }) , (53u8 , 6u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldDuplicateOrUnordered" , docs : "Multiple bitfields submitted by same validator or validators out of order by index." }) , (53u8 , 7u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index out of bounds." }) , (53u8 , 8u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBitfieldSignature" , docs : "Invalid signature" }) , (53u8 , 9u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnscheduledCandidate" , docs : "Candidate submitted but para not scheduled." }) , (53u8 , 10u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateScheduledBeforeParaFree" , docs : "Candidate scheduled despite pending candidate already existing for the para." }) , (53u8 , 11u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongCollator" , docs : "Candidate included with the wrong collator." }) , (53u8 , 12u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ScheduledOutOfOrder" , docs : "Scheduled cores out of order." }) , (53u8 , 13u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HeadDataTooLarge" , docs : "Head data exceeds the configured maximum." }) , (53u8 , 14u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "PrematureCodeUpgrade" , docs : "Code upgrade prematurely." }) , (53u8 , 15u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NewCodeTooLarge" , docs : "Output code is too large" }) , (53u8 , 16u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateNotInParentContext" , docs : "Candidate not in parent context." }) , (53u8 , 17u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidGroupIndex" , docs : "Invalid group index in core assignment." }) , (53u8 , 18u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InsufficientBacking" , docs : "Insufficient (non-majority) backing." }) , (53u8 , 19u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBacking" , docs : "Invalid (bad signature, unknown validator, etc.) backing." }) , (53u8 , 20u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NotCollatorSigned" , docs : "Collator did not sign PoV." }) , (53u8 , 21u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidationDataHashMismatch" , docs : "The validation data hash does not match expected." }) , (53u8 , 22u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "IncorrectDownwardMessageHandling" , docs : "The downward message queue is not processed correctly." }) , (53u8 , 23u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidUpwardMessages" , docs : "At least one upward message sent does not pass the acceptance criteria." }) , (53u8 , 24u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HrmpWatermarkMishandling" , docs : "The candidate didn't follow the rules of HRMP watermark advancement." }) , (53u8 , 25u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidOutboundHrmp" , docs : "The HRMP messages sent by the candidate is not valid." }) , (53u8 , 26u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidValidationCodeHash" , docs : "The validation code hash of the candidate is not valid." }) , (53u8 , 27u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ParaHeadMismatch" , docs : "The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the\ncommitments." }) , (53u8 , 28u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldReferencesFreedCore" , docs : "A bitfield that references a freed core,\neither intentionally or as part of a concluded\ninvalid dispute." }) , (54u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "TooManyInclusionInherents" , docs : "Inclusion inherent called more than once per block." }) , (54u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InvalidParentHeader" , docs : "The hash of the submitted parent header doesn't correspond to the saved block hash of\nthe parent." }) , (54u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "CandidateConcludedInvalid" , docs : "Disputed candidate that was concluded invalid." }) , (54u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InherentOverweight" , docs : "The data given to the inherent will result in an overweight block." }) , (54u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeStatementsUnsortedOrDuplicates" , docs : "The ordering of dispute statements was invalid." }) , (54u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeInvalid" , docs : "A dispute statement was invalid." }) , (56u8 , 0u8) => Some (ErrorDetails { pallet : "Paras" , error : "NotRegistered" , docs : "Para is not registered in our system." }) , (56u8 , 1u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOnboard" , docs : "Para cannot be onboarded because it is already tracked by our system." }) , (56u8 , 2u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOffboard" , docs : "Para cannot be offboarded at this time." }) , (56u8 , 3u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotUpgrade" , docs : "Para cannot be upgraded to a parachain." }) , (56u8 , 4u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotDowngrade" , docs : "Para cannot be downgraded to a parathread." }) , (56u8 , 5u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementStale" , docs : "The statement for PVF pre-checking is stale." }) , (56u8 , 6u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementFuture" , docs : "The statement for PVF pre-checking is for a future session." }) , (56u8 , 7u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckValidatorIndexOutOfBounds" , docs : "Claimed validator index is out of bounds." }) , (56u8 , 8u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckInvalidSignature" , docs : "The signature for the PVF pre-checking is invalid." }) , (56u8 , 9u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDoubleVote" , docs : "The given validator already has cast a vote." }) , (56u8 , 10u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckSubjectInvalid" , docs : "The given PVF does not exist at the moment of process a vote." }) , (56u8 , 11u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDisabled" , docs : "The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism\nis disabled." }) , (59u8 , 0u8) => Some (ErrorDetails { pallet : "Ump" , error : "UnknownMessageIndex" , docs : "The message index given is unknown." }) , (59u8 , 1u8) => Some (ErrorDetails { pallet : "Ump" , error : "WeightOverLimit" , docs : "The amount of weight given is possibly not enough for executing the message." }) , (60u8 , 0u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelToSelf" , docs : "The sender tried to open a channel to themselves." }) , (60u8 , 1u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelInvalidRecipient" , docs : "The recipient is not a valid para." }) , (60u8 , 2u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroCapacity" , docs : "The requested capacity is zero." }) , (60u8 , 3u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelCapacityExceedsLimit" , docs : "The requested capacity exceeds the global limit." }) , (60u8 , 4u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroMessageSize" , docs : "The requested maximum message size is 0." }) , (60u8 , 5u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelMessageSizeExceedsLimit" , docs : "The open request requested the message size that exceeds the global limit." }) , (60u8 , 6u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyExists" , docs : "The channel already exists" }) , (60u8 , 7u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyRequested" , docs : "There is already a request to open the same channel." }) , (60u8 , 8u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelLimitExceeded" , docs : "The sender already has the maximum number of allowed outbound channels." }) , (60u8 , 9u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelDoesntExist" , docs : "The channel from the sender to the origin doesn't exist." }) , (60u8 , 10u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelAlreadyConfirmed" , docs : "The channel is already confirmed." }) , (60u8 , 11u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelLimitExceeded" , docs : "The recipient already has the maximum number of allowed inbound channels." }) , (60u8 , 12u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelUnauthorized" , docs : "The origin tries to close a channel where it is neither the sender nor the recipient." }) , (60u8 , 13u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelDoesntExist" , docs : "The channel to be closed doesn't exist." }) , (60u8 , 14u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelAlreadyUnderway" , docs : "The channel close request is already requested." }) , (60u8 , 15u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CancelHrmpOpenChannelUnauthorized" , docs : "Canceling is requested by neither the sender nor recipient of the open channel request." }) , (60u8 , 16u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelDoesntExist" , docs : "The open request doesn't exist." }) , (60u8 , 17u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyConfirmed" , docs : "Cannot cancel an HRMP open channel request because it is already confirmed." }) , (60u8 , 18u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "WrongWitness" , docs : "The provided witness data is wrong." }) , (62u8 , 0u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "DuplicateDisputeStatementSets" , docs : "Duplicate dispute statement sets provided." }) , (62u8 , 1u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "AncientDisputeStatement" , docs : "Ancient dispute statement provided." }) , (62u8 , 2u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index on statement is out of bounds for session." }) , (62u8 , 3u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "InvalidSignature" , docs : "Invalid signature on statement." }) , (62u8 , 4u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "DuplicateStatement" , docs : "Validator vote submitted more than once to dispute." }) , (62u8 , 5u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "PotentialSpam" , docs : "Too many spam slots used by some specific validator." }) , (62u8 , 6u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "SingleSidedDispute" , docs : "A dispute where there are only votes on one side." }) , (70u8 , 0u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotRegistered" , docs : "The ID is not registered." }) , (70u8 , 1u8) => Some (ErrorDetails { pallet : "Registrar" , error : "AlreadyRegistered" , docs : "The ID is already registered." }) , (70u8 , 2u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotOwner" , docs : "The caller is not the owner of this Id." }) , (70u8 , 3u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CodeTooLarge" , docs : "Invalid para code size." }) , (70u8 , 4u8) => Some (ErrorDetails { pallet : "Registrar" , error : "HeadDataTooLarge" , docs : "Invalid para head data size." }) , (70u8 , 5u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParachain" , docs : "Para is not a Parachain." }) , (70u8 , 6u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParathread" , docs : "Para is not a Parathread." }) , (70u8 , 7u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDeregister" , docs : "Cannot deregister para" }) , (70u8 , 8u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDowngrade" , docs : "Cannot schedule downgrade of parachain to parathread" }) , (70u8 , 9u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotUpgrade" , docs : "Cannot schedule upgrade of parathread to parachain" }) , (70u8 , 10u8) => Some (ErrorDetails { pallet : "Registrar" , error : "ParaLocked" , docs : "Para is locked from manipulation by the manager. Must use parachain or relay chain governance." }) , (70u8 , 11u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotReserved" , docs : "The ID given for registration has not been reserved." }) , (70u8 , 12u8) => Some (ErrorDetails { pallet : "Registrar" , error : "EmptyCode" , docs : "Registering parachain with empty code is not allowed." }) , (70u8 , 13u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotSwap" , docs : "Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are\ncorrect for the swap to work." }) , (71u8 , 0u8) => Some (ErrorDetails { pallet : "Slots" , error : "ParaNotOnboarding" , docs : "The parachain ID is not onboarding." }) , (71u8 , 1u8) => Some (ErrorDetails { pallet : "Slots" , error : "LeaseError" , docs : "There was an error with the lease." }) , (72u8 , 0u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionInProgress" , docs : "This auction is already in progress." }) , (72u8 , 1u8) => Some (ErrorDetails { pallet : "Auctions" , error : "LeasePeriodInPast" , docs : "The lease period is in the past." }) , (72u8 , 2u8) => Some (ErrorDetails { pallet : "Auctions" , error : "ParaNotRegistered" , docs : "Para is not registered" }) , (72u8 , 3u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotCurrentAuction" , docs : "Not a current auction." }) , (72u8 , 4u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotAuction" , docs : "Not an auction." }) , (72u8 , 5u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionEnded" , docs : "Auction has already ended." }) , (72u8 , 6u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AlreadyLeasedOut" , docs : "The para is already leased out for part of this range." }) , (73u8 , 0u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodInPast" , docs : "The current lease period is more than the first lease period." }) , (73u8 , 1u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodTooFarInFuture" , docs : "The first lease period needs to at least be less than 3 `max_value`." }) , (73u8 , 2u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodBeforeFirstPeriod" , docs : "Last lease period must be greater than first lease period." }) , (73u8 , 3u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodTooFarInFuture" , docs : "The last lease period cannot be more than 3 periods after the first period." }) , (73u8 , 4u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CannotEndInPast" , docs : "The campaign ends before the current block number. The end must be in the future." }) , (73u8 , 5u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "EndTooFarInFuture" , docs : "The end date for this crowdloan is not sensible." }) , (73u8 , 6u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "Overflow" , docs : "There was an overflow." }) , (73u8 , 7u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionTooSmall" , docs : "The contribution was below the minimum, `MinContribution`." }) , (73u8 , 8u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidParaId" , docs : "Invalid fund index." }) , (73u8 , 9u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CapExceeded" , docs : "Contributions exceed maximum amount." }) , (73u8 , 10u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionPeriodOver" , docs : "The contribution period has already ended." }) , (73u8 , 11u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidOrigin" , docs : "The origin of this call is invalid." }) , (73u8 , 12u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotParachain" , docs : "This crowdloan does not correspond to a parachain." }) , (73u8 , 13u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LeaseActive" , docs : "This parachain lease is still active and retirement cannot yet begin." }) , (73u8 , 14u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "BidOrLeaseActive" , docs : "This parachain's bid or lease is still active and withdraw cannot yet begin." }) , (73u8 , 15u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FundNotEnded" , docs : "The crowdloan has not yet ended." }) , (73u8 , 16u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoContributions" , docs : "There are no contributions stored in this crowdloan." }) , (73u8 , 17u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotReadyToDissolve" , docs : "The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period." }) , (73u8 , 18u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidSignature" , docs : "Invalid signature." }) , (73u8 , 19u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "MemoTooLarge" , docs : "The provided memo is too large." }) , (73u8 , 20u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "AlreadyInNewRaise" , docs : "The fund is already in `NewRaise`" }) , (73u8 , 21u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "VrfDelayInProgress" , docs : "No contributions allowed during the VRF delay" }) , (73u8 , 22u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoLeasePeriod" , docs : "A lease period has not started yet, due to an offset in the starting block." }) , (99u8 , 0u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Unreachable" , docs : "The desired destination was unreachable, generally because there is a no way of routing\nto it." }) , (99u8 , 1u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "SendFailure" , docs : "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps\na lack of space for buffering the message." }) , (99u8 , 2u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Filtered" , docs : "The message execution fails the filter." }) , (99u8 , 3u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "UnweighableMessage" , docs : "The message's weight could not be determined." }) , (99u8 , 4u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "DestinationNotInvertible" , docs : "The destination `MultiLocation` provided cannot be inverted." }) , (99u8 , 5u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Empty" , docs : "The assets to be sent are empty." }) , (99u8 , 6u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "CannotReanchor" , docs : "Could not re-anchor the assets to declare the fees for the destination chain." }) , (99u8 , 7u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "TooManyAssets" , docs : "Too many assets have been attempted for transfer." }) , (99u8 , 8u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "InvalidOrigin" , docs : "Origin is invalid for sending." }) , (99u8 , 9u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadVersion" , docs : "The version of the `Versioned` value used is not able to be interpreted." }) , (99u8 , 10u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadLocation" , docs : "The given location could not be used (e.g. because it cannot be expressed in the\ndesired version of XCM)." }) , (99u8 , 11u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "NoSubscription" , docs : "The referenced subscription could not be found." }) , (99u8 , 12u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "AlreadySubscribed" , docs : "The location is invalid since it already has a subscription from us." }) , _ => None } - // } else { - // None - // } - // } - // } + impl DispatchError { + pub fn details(&self) -> Option { + if let Self::Module(runtime_types::sp_runtime::ModuleError { index, error }) = self { + match (index , error[0]) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (1u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (1u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (1u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (1u8 , 3u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidConfiguration" , docs : "Submitted configuration is invalid." }) , (3u8 , 0u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotAssigned" , docs : "The index was not already assigned." }) , (3u8 , 1u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotOwner" , docs : "The index is assigned to another account." }) , (3u8 , 2u8) => Some (ErrorDetails { pallet : "Indices" , error : "InUse" , docs : "The index was not available." }) , (3u8 , 3u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotTransfer" , docs : "The source and destination accounts are identical." }) , (3u8 , 4u8) => Some (ErrorDetails { pallet : "Indices" , error : "Permanent" , docs : "The index is permanent and may not be freed/changed." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value" }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal" }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value" }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit" }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account" }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account" }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist" }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (6u8 , 0u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotController" , docs : "Not a controller account." }) , (6u8 , 1u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotStash" , docs : "Not a stash account." }) , (6u8 , 2u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyBonded" , docs : "Stash is already bonded." }) , (6u8 , 3u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyPaired" , docs : "Controller is already paired." }) , (6u8 , 4u8) => Some (ErrorDetails { pallet : "Staking" , error : "EmptyTargets" , docs : "Targets cannot be empty." }) , (6u8 , 5u8) => Some (ErrorDetails { pallet : "Staking" , error : "DuplicateIndex" , docs : "Duplicate index." }) , (6u8 , 6u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidSlashIndex" , docs : "Slash record index out of bounds." }) , (6u8 , 7u8) => Some (ErrorDetails { pallet : "Staking" , error : "InsufficientBond" , docs : "Cannot have a validator or nominator role, with value less than the minimum defined by\ngovernance (see `MinValidatorBond` and `MinNominatorBond`). If unbonding is the\nintention, `chill` first to remove one's role as validator/nominator." }) , (6u8 , 8u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoMoreChunks" , docs : "Can not schedule more unlock chunks." }) , (6u8 , 9u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoUnlockChunk" , docs : "Can not rebond without unlocking chunks." }) , (6u8 , 10u8) => Some (ErrorDetails { pallet : "Staking" , error : "FundedTarget" , docs : "Attempting to target a stash that still has funds." }) , (6u8 , 11u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidEraToReward" , docs : "Invalid era to reward." }) , (6u8 , 12u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidNumberOfNominations" , docs : "Invalid number of nominations." }) , (6u8 , 13u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotSortedAndUnique" , docs : "Items are not sorted and unique." }) , (6u8 , 14u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyClaimed" , docs : "Rewards for this era have already been claimed for this validator." }) , (6u8 , 15u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectHistoryDepth" , docs : "Incorrect previous history depth input provided." }) , (6u8 , 16u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectSlashingSpans" , docs : "Incorrect number of slashing spans provided." }) , (6u8 , 17u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadState" , docs : "Internal state has become somehow corrupted and the operation cannot continue." }) , (6u8 , 18u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyTargets" , docs : "Too many nomination targets supplied." }) , (6u8 , 19u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadTarget" , docs : "A nomination target was supplied that was blocked or otherwise not a validator." }) , (6u8 , 20u8) => Some (ErrorDetails { pallet : "Staking" , error : "CannotChillOther" , docs : "The user has enough bond and thus cannot be chilled forcefully by an external person." }) , (6u8 , 21u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyNominators" , docs : "There are too many nominators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (6u8 , 22u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyValidators" , docs : "There are too many validators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (6u8 , 23u8) => Some (ErrorDetails { pallet : "Staking" , error : "CommissionTooLow" , docs : "Commission is too low. Must be at least `MinCommission`." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (10u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (10u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (10u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (10u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (10u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (10u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (10u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (11u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (11u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ValueLow" , docs : "Value too low" }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalMissing" , docs : "Proposal does not exist" }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyCanceled" , docs : "Cannot cancel the same proposal twice" }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicateProposal" , docs : "Proposal already made" }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalBlacklisted" , docs : "Proposal still blacklisted" }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotSimpleMajority" , docs : "Next external proposal not simple majority" }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InvalidHash" , docs : "Invalid hash" }) , (13u8 , 7u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoProposal" , docs : "No external proposal" }) , (13u8 , 8u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyVetoed" , docs : "Identity may not veto a proposal twice" }) , (13u8 , 9u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicatePreimage" , docs : "Preimage already noted" }) , (13u8 , 10u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotImminent" , docs : "Not imminent" }) , (13u8 , 11u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooEarly" , docs : "Too early" }) , (13u8 , 12u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Imminent" , docs : "Imminent" }) , (13u8 , 13u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageMissing" , docs : "Preimage not found" }) , (13u8 , 14u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ReferendumInvalid" , docs : "Vote given for invalid referendum" }) , (13u8 , 15u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageInvalid" , docs : "Invalid preimage" }) , (13u8 , 16u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoneWaiting" , docs : "No proposals waiting" }) , (13u8 , 17u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotVoter" , docs : "The given account did not vote on the referendum." }) , (13u8 , 18u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoPermission" , docs : "The actor has no permission to conduct the action." }) , (13u8 , 19u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyDelegating" , docs : "The account is already delegating." }) , (13u8 , 20u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InsufficientFunds" , docs : "Too high a balance was provided that the account cannot afford." }) , (13u8 , 21u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotDelegating" , docs : "The account is not currently delegating." }) , (13u8 , 22u8) => Some (ErrorDetails { pallet : "Democracy" , error : "VotesExist" , docs : "The account currently has votes attached to it and the operation cannot succeed until\nthese are removed, either through `unvote` or `reap_vote`." }) , (13u8 , 23u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InstantNotAllowed" , docs : "The instant referendum origin is currently disallowed." }) , (13u8 , 24u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Nonsense" , docs : "Delegation to oneself makes no sense." }) , (13u8 , 25u8) => Some (ErrorDetails { pallet : "Democracy" , error : "WrongUpperBound" , docs : "Invalid upper bound." }) , (13u8 , 26u8) => Some (ErrorDetails { pallet : "Democracy" , error : "MaxVotesReached" , docs : "Maximum number of votes reached." }) , (13u8 , 27u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooManyProposals" , docs : "Maximum number of proposals reached." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "Council" , error : "NotMember" , docs : "Account is not a member" }) , (14u8 , 1u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (14u8 , 2u8) => Some (ErrorDetails { pallet : "Council" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (14u8 , 3u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongIndex" , docs : "Mismatched index" }) , (14u8 , 4u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (14u8 , 5u8) => Some (ErrorDetails { pallet : "Council" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (14u8 , 6u8) => Some (ErrorDetails { pallet : "Council" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (14u8 , 7u8) => Some (ErrorDetails { pallet : "Council" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (14u8 , 8u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (14u8 , 9u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (15u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "NotMember" , docs : "Account is not a member" }) , (15u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (15u8 , 2u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (15u8 , 3u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongIndex" , docs : "Mismatched index" }) , (15u8 , 4u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (15u8 , 5u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (15u8 , 6u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (15u8 , 7u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (15u8 , 8u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (15u8 , 9u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToVote" , docs : "Cannot vote when no candidates or members exist." }) , (16u8 , 1u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NoVotes" , docs : "Must vote for at least one candidate." }) , (16u8 , 2u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "TooManyVotes" , docs : "Cannot vote more than candidates." }) , (16u8 , 3u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MaximumVotesExceeded" , docs : "Cannot vote more than maximum allowed." }) , (16u8 , 4u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "LowBalance" , docs : "Cannot vote with stake less than minimum balance." }) , (16u8 , 5u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToPayBond" , docs : "Voter can not pay voting bond." }) , (16u8 , 6u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MustBeVoter" , docs : "Must be a voter." }) , (16u8 , 7u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "ReportSelf" , docs : "Cannot report self." }) , (16u8 , 8u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "DuplicatedCandidate" , docs : "Duplicated candidate submission." }) , (16u8 , 9u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MemberSubmit" , docs : "Member cannot re-submit candidacy." }) , (16u8 , 10u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "RunnerUpSubmit" , docs : "Runner cannot re-submit candidacy." }) , (16u8 , 11u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InsufficientCandidateFunds" , docs : "Candidate does not have enough funds." }) , (16u8 , 12u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NotMember" , docs : "Not a member." }) , (16u8 , 13u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidWitnessData" , docs : "The provided count of number of candidates is incorrect." }) , (16u8 , 14u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidVoteCount" , docs : "The provided count of number of votes is incorrect." }) , (16u8 , 15u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidRenouncing" , docs : "The renouncing origin presented a wrong `Renouncing` parameter." }) , (16u8 , 16u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidReplacement" , docs : "Prediction regarding replacement after member removal is wrong." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "AlreadyMember" , docs : "Already a member." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "NotMember" , docs : "Not a member." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (18u8 , 2u8) => Some (ErrorDetails { pallet : "Treasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (18u8 , 3u8) => Some (ErrorDetails { pallet : "Treasury" , error : "ProposalNotApproved" , docs : "Proposal has not been approved." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "Claims" , error : "InvalidEthereumSignature" , docs : "Invalid Ethereum signature." }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "Claims" , error : "SignerHasNoClaim" , docs : "Ethereum address has no claim." }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "Claims" , error : "SenderHasNoClaim" , docs : "Account ID sending transaction has no claim." }) , (19u8 , 3u8) => Some (ErrorDetails { pallet : "Claims" , error : "PotUnderflow" , docs : "There's not enough in the pot to pay out some unvested amount. Generally implies a logic\nerror." }) , (19u8 , 4u8) => Some (ErrorDetails { pallet : "Claims" , error : "InvalidStatement" , docs : "A needed statement was not included." }) , (19u8 , 5u8) => Some (ErrorDetails { pallet : "Claims" , error : "VestedBalanceExists" , docs : "The account already has a vested balance." }) , (24u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManySubAccounts" , docs : "Too many subs-accounts." }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotFound" , docs : "Account isn't found." }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotNamed" , docs : "Account isn't named." }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "Identity" , error : "EmptyIndex" , docs : "Empty index." }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "Identity" , error : "FeeChanged" , docs : "Fee is changed." }) , (25u8 , 5u8) => Some (ErrorDetails { pallet : "Identity" , error : "NoIdentity" , docs : "No identity found." }) , (25u8 , 6u8) => Some (ErrorDetails { pallet : "Identity" , error : "StickyJudgement" , docs : "Sticky judgement." }) , (25u8 , 7u8) => Some (ErrorDetails { pallet : "Identity" , error : "JudgementGiven" , docs : "Judgement given." }) , (25u8 , 8u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidJudgement" , docs : "Invalid judgement." }) , (25u8 , 9u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidIndex" , docs : "The index is invalid." }) , (25u8 , 10u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidTarget" , docs : "The target is invalid." }) , (25u8 , 11u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyFields" , docs : "Too many additional fields." }) , (25u8 , 12u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyRegistrars" , docs : "Maximum amount of registrars reached. Cannot add any more." }) , (25u8 , 13u8) => Some (ErrorDetails { pallet : "Identity" , error : "AlreadyClaimed" , docs : "Account ID is already named." }) , (25u8 , 14u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotSub" , docs : "Sender is not a sub-account." }) , (25u8 , 15u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotOwned" , docs : "Sub-account isn't owned by sender." }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Society" , error : "BadPosition" , docs : "An incorrect position was provided." }) , (26u8 , 1u8) => Some (ErrorDetails { pallet : "Society" , error : "NotMember" , docs : "User is not a member." }) , (26u8 , 2u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyMember" , docs : "User is already a member." }) , (26u8 , 3u8) => Some (ErrorDetails { pallet : "Society" , error : "Suspended" , docs : "User is suspended." }) , (26u8 , 4u8) => Some (ErrorDetails { pallet : "Society" , error : "NotSuspended" , docs : "User is not suspended." }) , (26u8 , 5u8) => Some (ErrorDetails { pallet : "Society" , error : "NoPayout" , docs : "Nothing to payout." }) , (26u8 , 6u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyFounded" , docs : "Society already founded." }) , (26u8 , 7u8) => Some (ErrorDetails { pallet : "Society" , error : "InsufficientPot" , docs : "Not enough in pot to accept candidate." }) , (26u8 , 8u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyVouching" , docs : "Member is already vouching or banned from vouching again." }) , (26u8 , 9u8) => Some (ErrorDetails { pallet : "Society" , error : "NotVouching" , docs : "Member is not vouching." }) , (26u8 , 10u8) => Some (ErrorDetails { pallet : "Society" , error : "Head" , docs : "Cannot remove the head of the chain." }) , (26u8 , 11u8) => Some (ErrorDetails { pallet : "Society" , error : "Founder" , docs : "Cannot remove the founder." }) , (26u8 , 12u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyBid" , docs : "User has already made a bid." }) , (26u8 , 13u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyCandidate" , docs : "User is already a candidate." }) , (26u8 , 14u8) => Some (ErrorDetails { pallet : "Society" , error : "NotCandidate" , docs : "User is not a candidate." }) , (26u8 , 15u8) => Some (ErrorDetails { pallet : "Society" , error : "MaxMembers" , docs : "Too many members in the society." }) , (26u8 , 16u8) => Some (ErrorDetails { pallet : "Society" , error : "NotFounder" , docs : "The caller is not the founder." }) , (26u8 , 17u8) => Some (ErrorDetails { pallet : "Society" , error : "NotHead" , docs : "The caller is not the head." }) , (27u8 , 0u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotAllowed" , docs : "User is not allowed to make a call on behalf of this account" }) , (27u8 , 1u8) => Some (ErrorDetails { pallet : "Recovery" , error : "ZeroThreshold" , docs : "Threshold must be greater than zero" }) , (27u8 , 2u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotEnoughFriends" , docs : "Friends list must be greater than zero and threshold" }) , (27u8 , 3u8) => Some (ErrorDetails { pallet : "Recovery" , error : "MaxFriends" , docs : "Friends list must be less than max friends" }) , (27u8 , 4u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotSorted" , docs : "Friends list must be sorted and free of duplicates" }) , (27u8 , 5u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotRecoverable" , docs : "This account is not set up for recovery" }) , (27u8 , 6u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyRecoverable" , docs : "This account is already set up for recovery" }) , (27u8 , 7u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyStarted" , docs : "A recovery process has already started for this account" }) , (27u8 , 8u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotStarted" , docs : "A recovery process has not started for this rescuer" }) , (27u8 , 9u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotFriend" , docs : "This account is not a friend who can vouch" }) , (27u8 , 10u8) => Some (ErrorDetails { pallet : "Recovery" , error : "DelayPeriod" , docs : "The friend must wait until the delay period to vouch for this recovery" }) , (27u8 , 11u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyVouched" , docs : "This user has already vouched for this recovery" }) , (27u8 , 12u8) => Some (ErrorDetails { pallet : "Recovery" , error : "Threshold" , docs : "The threshold for recovering this account has not been met" }) , (27u8 , 13u8) => Some (ErrorDetails { pallet : "Recovery" , error : "StillActive" , docs : "There are still active recovery attempts that need to be closed" }) , (27u8 , 14u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyProxy" , docs : "This account is already set up for recovery" }) , (27u8 , 15u8) => Some (ErrorDetails { pallet : "Recovery" , error : "BadState" , docs : "Some internal state is broken." }) , (28u8 , 0u8) => Some (ErrorDetails { pallet : "Vesting" , error : "NotVesting" , docs : "The account given is not vesting." }) , (28u8 , 1u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AtMaxVestingSchedules" , docs : "The account already has `MaxVestingSchedules` count of schedules and thus\ncannot add another one. Consider merging existing schedules in order to add another." }) , (28u8 , 2u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AmountLow" , docs : "Amount being transferred is too low to create a vesting schedule." }) , (28u8 , 3u8) => Some (ErrorDetails { pallet : "Vesting" , error : "ScheduleIndexOutOfBounds" , docs : "An index was out of bounds of the vesting schedules." }) , (28u8 , 4u8) => Some (ErrorDetails { pallet : "Vesting" , error : "InvalidScheduleParams" , docs : "Failed to create a new schedule because some parameter was invalid." }) , (29u8 , 0u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "FailedToSchedule" , docs : "Failed to schedule a call" }) , (29u8 , 1u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "NotFound" , docs : "Cannot find the scheduled call." }) , (29u8 , 2u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "TargetBlockNumberInPast" , docs : "Given target block number is in the past." }) , (29u8 , 3u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "RescheduleNoChange" , docs : "Reschedule failed because it does not change scheduled time." }) , (30u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (30u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (30u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (30u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (30u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (30u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (30u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (30u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (31u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (31u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (31u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (31u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (31u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (31u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (31u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (31u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (31u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (31u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (31u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (31u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (31u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (31u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (32u8 , 0u8) => Some (ErrorDetails { pallet : "Preimage" , error : "TooLarge" , docs : "Preimage is too large to store on-chain." }) , (32u8 , 1u8) => Some (ErrorDetails { pallet : "Preimage" , error : "AlreadyNoted" , docs : "Preimage has already been noted on-chain." }) , (32u8 , 2u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotAuthorized" , docs : "The user is not authorized to perform this action." }) , (32u8 , 3u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotNoted" , docs : "The preimage cannot be removed since it has not yet been noted." }) , (32u8 , 4u8) => Some (ErrorDetails { pallet : "Preimage" , error : "Requested" , docs : "A preimage may not be removed when there are outstanding requests." }) , (32u8 , 5u8) => Some (ErrorDetails { pallet : "Preimage" , error : "NotRequested" , docs : "The preimage request cannot be removed since no outstanding requests exist." }) , (35u8 , 0u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (35u8 , 1u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (35u8 , 2u8) => Some (ErrorDetails { pallet : "Bounties" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (35u8 , 3u8) => Some (ErrorDetails { pallet : "Bounties" , error : "UnexpectedStatus" , docs : "The bounty status is unexpected." }) , (35u8 , 4u8) => Some (ErrorDetails { pallet : "Bounties" , error : "RequireCurator" , docs : "Require bounty curator." }) , (35u8 , 5u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidValue" , docs : "Invalid bounty value." }) , (35u8 , 6u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidFee" , docs : "Invalid bounty fee." }) , (35u8 , 7u8) => Some (ErrorDetails { pallet : "Bounties" , error : "PendingPayout" , docs : "A bounty payout is pending.\nTo cancel the bounty, you must unassign and slash the curator." }) , (35u8 , 8u8) => Some (ErrorDetails { pallet : "Bounties" , error : "Premature" , docs : "The bounties cannot be claimed/closed because it's still in the countdown period." }) , (35u8 , 9u8) => Some (ErrorDetails { pallet : "Bounties" , error : "HasActiveChildBounty" , docs : "The bounty cannot be closed because it has active child bounties." }) , (35u8 , 10u8) => Some (ErrorDetails { pallet : "Bounties" , error : "TooManyQueued" , docs : "Too many approvals are already queued." }) , (40u8 , 0u8) => Some (ErrorDetails { pallet : "ChildBounties" , error : "ParentBountyNotActive" , docs : "The parent bounty is not in active state." }) , (40u8 , 1u8) => Some (ErrorDetails { pallet : "ChildBounties" , error : "InsufficientBountyBalance" , docs : "The bounty balance is not enough to add new child-bounty." }) , (40u8 , 2u8) => Some (ErrorDetails { pallet : "ChildBounties" , error : "TooManyChildBounties" , docs : "Number of child bounties exceeds limit `MaxActiveChildBountyCount`." }) , (36u8 , 0u8) => Some (ErrorDetails { pallet : "Tips" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (36u8 , 1u8) => Some (ErrorDetails { pallet : "Tips" , error : "AlreadyKnown" , docs : "The tip was already found/started." }) , (36u8 , 2u8) => Some (ErrorDetails { pallet : "Tips" , error : "UnknownTip" , docs : "The tip hash is unknown." }) , (36u8 , 3u8) => Some (ErrorDetails { pallet : "Tips" , error : "NotFinder" , docs : "The account attempting to retract the tip is not the finder of the tip." }) , (36u8 , 4u8) => Some (ErrorDetails { pallet : "Tips" , error : "StillOpen" , docs : "The tip cannot be claimed/closed because there are not enough tippers yet." }) , (36u8 , 5u8) => Some (ErrorDetails { pallet : "Tips" , error : "Premature" , docs : "The tip cannot be claimed/closed because it's still in the countdown period." }) , (37u8 , 0u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchEarlySubmission" , docs : "Submission was too early." }) , (37u8 , 1u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWrongWinnerCount" , docs : "Wrong number of winners presented." }) , (37u8 , 2u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWeakSubmission" , docs : "Submission was too weak, score-wise." }) , (37u8 , 3u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedQueueFull" , docs : "The queue was full, and the solution was not better than any of the existing ones." }) , (37u8 , 4u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedCannotPayDeposit" , docs : "The origin failed to pay the deposit." }) , (37u8 , 5u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedInvalidWitness" , docs : "Witness data to dispatchable is invalid." }) , (37u8 , 6u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedTooMuchWeight" , docs : "The signed submission consumes too much weight" }) , (37u8 , 7u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "OcwCallWrongEra" , docs : "OCW submitted solution for wrong round" }) , (37u8 , 8u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "MissingSnapshotMetadata" , docs : "Snapshot metadata should exist but didn't." }) , (37u8 , 9u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "InvalidSubmissionIndex" , docs : "`Self::insert_submission` returned an invalid index." }) , (37u8 , 10u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "CallNotAllowed" , docs : "The call is not allowed at this point." }) , (37u8 , 11u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "FallbackFailed" , docs : "The fallback failed" }) , (38u8 , 0u8) => Some (ErrorDetails { pallet : "Gilt" , error : "DurationTooSmall" , docs : "The duration of the bid is less than one." }) , (38u8 , 1u8) => Some (ErrorDetails { pallet : "Gilt" , error : "DurationTooBig" , docs : "The duration is the bid is greater than the number of queues." }) , (38u8 , 2u8) => Some (ErrorDetails { pallet : "Gilt" , error : "AmountTooSmall" , docs : "The amount of the bid is less than the minimum allowed." }) , (38u8 , 3u8) => Some (ErrorDetails { pallet : "Gilt" , error : "BidTooLow" , docs : "The queue for the bid's duration is full and the amount bid is too low to get in\nthrough replacing an existing bid." }) , (38u8 , 4u8) => Some (ErrorDetails { pallet : "Gilt" , error : "Unknown" , docs : "Gilt index is unknown." }) , (38u8 , 5u8) => Some (ErrorDetails { pallet : "Gilt" , error : "NotOwner" , docs : "Not the owner of the gilt." }) , (38u8 , 6u8) => Some (ErrorDetails { pallet : "Gilt" , error : "NotExpired" , docs : "Gilt not yet at expiry date." }) , (38u8 , 7u8) => Some (ErrorDetails { pallet : "Gilt" , error : "NotFound" , docs : "The given bid for retraction is not found." }) , (39u8 , 0u8) => Some (ErrorDetails { pallet : "VoterList" , error : "List" , docs : "A error in the list interface implementation." }) , (41u8 , 0u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "PoolNotFound" , docs : "A (bonded) pool id does not exist." }) , (41u8 , 1u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "PoolMemberNotFound" , docs : "An account is not a member." }) , (41u8 , 2u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "RewardPoolNotFound" , docs : "A reward pool does not exist. In all cases this is a system logic error." }) , (41u8 , 3u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "SubPoolsNotFound" , docs : "A sub pool does not exist." }) , (41u8 , 4u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "AccountBelongsToOtherPool" , docs : "An account is already delegating in another pool. An account may only belong to one\npool at a time." }) , (41u8 , 5u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "InsufficientBond" , docs : "The pool has insufficient balance to bond as a nominator." }) , (41u8 , 6u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "AlreadyUnbonding" , docs : "The member is already unbonding in this era." }) , (41u8 , 7u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "FullyUnbonding" , docs : "The member is fully unbonded (and thus cannot access the bonded and reward pool\nanymore to, for example, collect rewards)." }) , (41u8 , 8u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MaxUnbondingLimit" , docs : "The member cannot unbond further chunks due to reaching the limit." }) , (41u8 , 9u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "CannotWithdrawAny" , docs : "None of the funds can be withdrawn yet because the bonding duration has not passed." }) , (41u8 , 10u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MinimumBondNotMet" , docs : "The amount does not meet the minimum bond to either join or create a pool." }) , (41u8 , 11u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "OverflowRisk" , docs : "The transaction could not be executed due to overflow risk for the pool." }) , (41u8 , 12u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotDestroying" , docs : "A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for\nother members to be permissionlessly unbonded." }) , (41u8 , 13u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotOnlyPoolMember" , docs : "The depositor must be the only member in the bonded pool in order to unbond. And the\ndepositor must be the only member in the sub pools in order to withdraw unbonded." }) , (41u8 , 14u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotNominator" , docs : "The caller does not have nominating permissions for the pool." }) , (41u8 , 15u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotKickerOrDestroying" , docs : "Either a) the caller cannot make a valid kick or b) the pool is not destroying." }) , (41u8 , 16u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotOpen" , docs : "The pool is not open to join" }) , (41u8 , 17u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MaxPools" , docs : "The system is maxed out on pools." }) , (41u8 , 18u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MaxPoolMembers" , docs : "Too many members in the pool or system." }) , (41u8 , 19u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "CanNotChangeState" , docs : "The pools state cannot be changed." }) , (41u8 , 20u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "DoesNotHavePermission" , docs : "The caller does not have adequate permissions." }) , (41u8 , 21u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "MetadataExceedsMaxLen" , docs : "Metadata exceeds [`Config::MaxMetadataLen`]" }) , (41u8 , 22u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "DefensiveError" , docs : "Some error occurred that should never happen. This should be reported to the\nmaintainers." }) , (41u8 , 23u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "NotEnoughPointsToUnbond" , docs : "Not enough points. Ty unbonding less." }) , (41u8 , 24u8) => Some (ErrorDetails { pallet : "NominationPools" , error : "PartialUnbondNotAllowedPermissionlessly" , docs : "Partial unbonding now allowed permissionlessly." }) , (51u8 , 0u8) => Some (ErrorDetails { pallet : "Configuration" , error : "InvalidNewValue" , docs : "The new value for a configuration parameter is invalid." }) , (53u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateValidatorIndices" , docs : "Validator indices are out of order or contains duplicates." }) , (53u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateDisputeStatementSet" , docs : "Dispute statement sets are out of order or contain duplicates." }) , (53u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateBackedCandidates" , docs : "Backed candidates are out of order (core index) or contain duplicates." }) , (53u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnexpectedRelayParent" , docs : "A different relay parent was provided compared to the on-chain stored one." }) , (53u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongBitfieldSize" , docs : "Availability bitfield has unexpected size." }) , (53u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldAllZeros" , docs : "Bitfield consists of zeros only." }) , (53u8 , 6u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldDuplicateOrUnordered" , docs : "Multiple bitfields submitted by same validator or validators out of order by index." }) , (53u8 , 7u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index out of bounds." }) , (53u8 , 8u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBitfieldSignature" , docs : "Invalid signature" }) , (53u8 , 9u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnscheduledCandidate" , docs : "Candidate submitted but para not scheduled." }) , (53u8 , 10u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateScheduledBeforeParaFree" , docs : "Candidate scheduled despite pending candidate already existing for the para." }) , (53u8 , 11u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongCollator" , docs : "Candidate included with the wrong collator." }) , (53u8 , 12u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ScheduledOutOfOrder" , docs : "Scheduled cores out of order." }) , (53u8 , 13u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HeadDataTooLarge" , docs : "Head data exceeds the configured maximum." }) , (53u8 , 14u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "PrematureCodeUpgrade" , docs : "Code upgrade prematurely." }) , (53u8 , 15u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NewCodeTooLarge" , docs : "Output code is too large" }) , (53u8 , 16u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateNotInParentContext" , docs : "Candidate not in parent context." }) , (53u8 , 17u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidGroupIndex" , docs : "Invalid group index in core assignment." }) , (53u8 , 18u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InsufficientBacking" , docs : "Insufficient (non-majority) backing." }) , (53u8 , 19u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBacking" , docs : "Invalid (bad signature, unknown validator, etc.) backing." }) , (53u8 , 20u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NotCollatorSigned" , docs : "Collator did not sign PoV." }) , (53u8 , 21u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidationDataHashMismatch" , docs : "The validation data hash does not match expected." }) , (53u8 , 22u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "IncorrectDownwardMessageHandling" , docs : "The downward message queue is not processed correctly." }) , (53u8 , 23u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidUpwardMessages" , docs : "At least one upward message sent does not pass the acceptance criteria." }) , (53u8 , 24u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HrmpWatermarkMishandling" , docs : "The candidate didn't follow the rules of HRMP watermark advancement." }) , (53u8 , 25u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidOutboundHrmp" , docs : "The HRMP messages sent by the candidate is not valid." }) , (53u8 , 26u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidValidationCodeHash" , docs : "The validation code hash of the candidate is not valid." }) , (53u8 , 27u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ParaHeadMismatch" , docs : "The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the\ncommitments." }) , (53u8 , 28u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldReferencesFreedCore" , docs : "A bitfield that references a freed core,\neither intentionally or as part of a concluded\ninvalid dispute." }) , (54u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "TooManyInclusionInherents" , docs : "Inclusion inherent called more than once per block." }) , (54u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InvalidParentHeader" , docs : "The hash of the submitted parent header doesn't correspond to the saved block hash of\nthe parent." }) , (54u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "CandidateConcludedInvalid" , docs : "Disputed candidate that was concluded invalid." }) , (54u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InherentOverweight" , docs : "The data given to the inherent will result in an overweight block." }) , (54u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeStatementsUnsortedOrDuplicates" , docs : "The ordering of dispute statements was invalid." }) , (54u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeInvalid" , docs : "A dispute statement was invalid." }) , (56u8 , 0u8) => Some (ErrorDetails { pallet : "Paras" , error : "NotRegistered" , docs : "Para is not registered in our system." }) , (56u8 , 1u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOnboard" , docs : "Para cannot be onboarded because it is already tracked by our system." }) , (56u8 , 2u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOffboard" , docs : "Para cannot be offboarded at this time." }) , (56u8 , 3u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotUpgrade" , docs : "Para cannot be upgraded to a parachain." }) , (56u8 , 4u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotDowngrade" , docs : "Para cannot be downgraded to a parathread." }) , (56u8 , 5u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementStale" , docs : "The statement for PVF pre-checking is stale." }) , (56u8 , 6u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementFuture" , docs : "The statement for PVF pre-checking is for a future session." }) , (56u8 , 7u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckValidatorIndexOutOfBounds" , docs : "Claimed validator index is out of bounds." }) , (56u8 , 8u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckInvalidSignature" , docs : "The signature for the PVF pre-checking is invalid." }) , (56u8 , 9u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDoubleVote" , docs : "The given validator already has cast a vote." }) , (56u8 , 10u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckSubjectInvalid" , docs : "The given PVF does not exist at the moment of process a vote." }) , (56u8 , 11u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDisabled" , docs : "The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism\nis disabled." }) , (59u8 , 0u8) => Some (ErrorDetails { pallet : "Ump" , error : "UnknownMessageIndex" , docs : "The message index given is unknown." }) , (59u8 , 1u8) => Some (ErrorDetails { pallet : "Ump" , error : "WeightOverLimit" , docs : "The amount of weight given is possibly not enough for executing the message." }) , (60u8 , 0u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelToSelf" , docs : "The sender tried to open a channel to themselves." }) , (60u8 , 1u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelInvalidRecipient" , docs : "The recipient is not a valid para." }) , (60u8 , 2u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroCapacity" , docs : "The requested capacity is zero." }) , (60u8 , 3u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelCapacityExceedsLimit" , docs : "The requested capacity exceeds the global limit." }) , (60u8 , 4u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroMessageSize" , docs : "The requested maximum message size is 0." }) , (60u8 , 5u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelMessageSizeExceedsLimit" , docs : "The open request requested the message size that exceeds the global limit." }) , (60u8 , 6u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyExists" , docs : "The channel already exists" }) , (60u8 , 7u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyRequested" , docs : "There is already a request to open the same channel." }) , (60u8 , 8u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelLimitExceeded" , docs : "The sender already has the maximum number of allowed outbound channels." }) , (60u8 , 9u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelDoesntExist" , docs : "The channel from the sender to the origin doesn't exist." }) , (60u8 , 10u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelAlreadyConfirmed" , docs : "The channel is already confirmed." }) , (60u8 , 11u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelLimitExceeded" , docs : "The recipient already has the maximum number of allowed inbound channels." }) , (60u8 , 12u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelUnauthorized" , docs : "The origin tries to close a channel where it is neither the sender nor the recipient." }) , (60u8 , 13u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelDoesntExist" , docs : "The channel to be closed doesn't exist." }) , (60u8 , 14u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelAlreadyUnderway" , docs : "The channel close request is already requested." }) , (60u8 , 15u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CancelHrmpOpenChannelUnauthorized" , docs : "Canceling is requested by neither the sender nor recipient of the open channel request." }) , (60u8 , 16u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelDoesntExist" , docs : "The open request doesn't exist." }) , (60u8 , 17u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyConfirmed" , docs : "Cannot cancel an HRMP open channel request because it is already confirmed." }) , (60u8 , 18u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "WrongWitness" , docs : "The provided witness data is wrong." }) , (62u8 , 0u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "DuplicateDisputeStatementSets" , docs : "Duplicate dispute statement sets provided." }) , (62u8 , 1u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "AncientDisputeStatement" , docs : "Ancient dispute statement provided." }) , (62u8 , 2u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index on statement is out of bounds for session." }) , (62u8 , 3u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "InvalidSignature" , docs : "Invalid signature on statement." }) , (62u8 , 4u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "DuplicateStatement" , docs : "Validator vote submitted more than once to dispute." }) , (62u8 , 5u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "PotentialSpam" , docs : "Too many spam slots used by some specific validator." }) , (62u8 , 6u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "SingleSidedDispute" , docs : "A dispute where there are only votes on one side." }) , (70u8 , 0u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotRegistered" , docs : "The ID is not registered." }) , (70u8 , 1u8) => Some (ErrorDetails { pallet : "Registrar" , error : "AlreadyRegistered" , docs : "The ID is already registered." }) , (70u8 , 2u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotOwner" , docs : "The caller is not the owner of this Id." }) , (70u8 , 3u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CodeTooLarge" , docs : "Invalid para code size." }) , (70u8 , 4u8) => Some (ErrorDetails { pallet : "Registrar" , error : "HeadDataTooLarge" , docs : "Invalid para head data size." }) , (70u8 , 5u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParachain" , docs : "Para is not a Parachain." }) , (70u8 , 6u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParathread" , docs : "Para is not a Parathread." }) , (70u8 , 7u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDeregister" , docs : "Cannot deregister para" }) , (70u8 , 8u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDowngrade" , docs : "Cannot schedule downgrade of parachain to parathread" }) , (70u8 , 9u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotUpgrade" , docs : "Cannot schedule upgrade of parathread to parachain" }) , (70u8 , 10u8) => Some (ErrorDetails { pallet : "Registrar" , error : "ParaLocked" , docs : "Para is locked from manipulation by the manager. Must use parachain or relay chain governance." }) , (70u8 , 11u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotReserved" , docs : "The ID given for registration has not been reserved." }) , (70u8 , 12u8) => Some (ErrorDetails { pallet : "Registrar" , error : "EmptyCode" , docs : "Registering parachain with empty code is not allowed." }) , (70u8 , 13u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotSwap" , docs : "Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are\ncorrect for the swap to work." }) , (71u8 , 0u8) => Some (ErrorDetails { pallet : "Slots" , error : "ParaNotOnboarding" , docs : "The parachain ID is not onboarding." }) , (71u8 , 1u8) => Some (ErrorDetails { pallet : "Slots" , error : "LeaseError" , docs : "There was an error with the lease." }) , (72u8 , 0u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionInProgress" , docs : "This auction is already in progress." }) , (72u8 , 1u8) => Some (ErrorDetails { pallet : "Auctions" , error : "LeasePeriodInPast" , docs : "The lease period is in the past." }) , (72u8 , 2u8) => Some (ErrorDetails { pallet : "Auctions" , error : "ParaNotRegistered" , docs : "Para is not registered" }) , (72u8 , 3u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotCurrentAuction" , docs : "Not a current auction." }) , (72u8 , 4u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotAuction" , docs : "Not an auction." }) , (72u8 , 5u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionEnded" , docs : "Auction has already ended." }) , (72u8 , 6u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AlreadyLeasedOut" , docs : "The para is already leased out for part of this range." }) , (73u8 , 0u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodInPast" , docs : "The current lease period is more than the first lease period." }) , (73u8 , 1u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodTooFarInFuture" , docs : "The first lease period needs to at least be less than 3 `max_value`." }) , (73u8 , 2u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodBeforeFirstPeriod" , docs : "Last lease period must be greater than first lease period." }) , (73u8 , 3u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodTooFarInFuture" , docs : "The last lease period cannot be more than 3 periods after the first period." }) , (73u8 , 4u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CannotEndInPast" , docs : "The campaign ends before the current block number. The end must be in the future." }) , (73u8 , 5u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "EndTooFarInFuture" , docs : "The end date for this crowdloan is not sensible." }) , (73u8 , 6u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "Overflow" , docs : "There was an overflow." }) , (73u8 , 7u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionTooSmall" , docs : "The contribution was below the minimum, `MinContribution`." }) , (73u8 , 8u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidParaId" , docs : "Invalid fund index." }) , (73u8 , 9u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CapExceeded" , docs : "Contributions exceed maximum amount." }) , (73u8 , 10u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionPeriodOver" , docs : "The contribution period has already ended." }) , (73u8 , 11u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidOrigin" , docs : "The origin of this call is invalid." }) , (73u8 , 12u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotParachain" , docs : "This crowdloan does not correspond to a parachain." }) , (73u8 , 13u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LeaseActive" , docs : "This parachain lease is still active and retirement cannot yet begin." }) , (73u8 , 14u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "BidOrLeaseActive" , docs : "This parachain's bid or lease is still active and withdraw cannot yet begin." }) , (73u8 , 15u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FundNotEnded" , docs : "The crowdloan has not yet ended." }) , (73u8 , 16u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoContributions" , docs : "There are no contributions stored in this crowdloan." }) , (73u8 , 17u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotReadyToDissolve" , docs : "The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period." }) , (73u8 , 18u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidSignature" , docs : "Invalid signature." }) , (73u8 , 19u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "MemoTooLarge" , docs : "The provided memo is too large." }) , (73u8 , 20u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "AlreadyInNewRaise" , docs : "The fund is already in `NewRaise`" }) , (73u8 , 21u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "VrfDelayInProgress" , docs : "No contributions allowed during the VRF delay" }) , (73u8 , 22u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoLeasePeriod" , docs : "A lease period has not started yet, due to an offset in the starting block." }) , (99u8 , 0u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Unreachable" , docs : "The desired destination was unreachable, generally because there is a no way of routing\nto it." }) , (99u8 , 1u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "SendFailure" , docs : "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps\na lack of space for buffering the message." }) , (99u8 , 2u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Filtered" , docs : "The message execution fails the filter." }) , (99u8 , 3u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "UnweighableMessage" , docs : "The message's weight could not be determined." }) , (99u8 , 4u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "DestinationNotInvertible" , docs : "The destination `MultiLocation` provided cannot be inverted." }) , (99u8 , 5u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Empty" , docs : "The assets to be sent are empty." }) , (99u8 , 6u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "CannotReanchor" , docs : "Could not re-anchor the assets to declare the fees for the destination chain." }) , (99u8 , 7u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "TooManyAssets" , docs : "Too many assets have been attempted for transfer." }) , (99u8 , 8u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "InvalidOrigin" , docs : "Origin is invalid for sending." }) , (99u8 , 9u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadVersion" , docs : "The version of the `Versioned` value used is not able to be interpreted." }) , (99u8 , 10u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadLocation" , docs : "The given location could not be used (e.g. because it cannot be expressed in the\ndesired version of XCM)." }) , (99u8 , 11u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "NoSubscription" , docs : "The referenced subscription could not be found." }) , (99u8 , 12u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "AlreadySubscribed" , docs : "The location is invalid since it already has a subscription from us." }) , _ => None } + } else { + None + } + } + } #[doc = r" The default storage entry from which to fetch an account nonce, required for"] #[doc = r" constructing a transaction."] pub enum DefaultAccountData {} @@ -30687,8 +30746,8 @@ pub mod api { pub fn gilt(&self) -> gilt::constants::ConstantsApi { gilt::constants::ConstantsApi } - pub fn bags_list(&self) -> bags_list::constants::ConstantsApi { - bags_list::constants::ConstantsApi + pub fn voter_list(&self) -> voter_list::constants::ConstantsApi { + voter_list::constants::ConstantsApi } pub fn nomination_pools(&self) -> nomination_pools::constants::ConstantsApi { nomination_pools::constants::ConstantsApi @@ -30814,8 +30873,8 @@ pub mod api { pub fn gilt(&self) -> gilt::storage::StorageApi<'a, T> { gilt::storage::StorageApi::new(self.client) } - pub fn bags_list(&self) -> bags_list::storage::StorageApi<'a, T> { - bags_list::storage::StorageApi::new(self.client) + pub fn voter_list(&self) -> voter_list::storage::StorageApi<'a, T> { + voter_list::storage::StorageApi::new(self.client) } pub fn nomination_pools(&self) -> nomination_pools::storage::StorageApi<'a, T> { nomination_pools::storage::StorageApi::new(self.client) @@ -30981,8 +31040,8 @@ pub mod api { pub fn gilt(&self) -> gilt::calls::TransactionApi<'a, T, X, A> { gilt::calls::TransactionApi::new(self.client) } - pub fn bags_list(&self) -> bags_list::calls::TransactionApi<'a, T, X, A> { - bags_list::calls::TransactionApi::new(self.client) + pub fn voter_list(&self) -> voter_list::calls::TransactionApi<'a, T, X, A> { + voter_list::calls::TransactionApi::new(self.client) } pub fn nomination_pools(&self) -> nomination_pools::calls::TransactionApi<'a, T, X, A> { nomination_pools::calls::TransactionApi::new(self.client) diff --git a/frame/assistants/client-kusama/src/types/account.rs b/frame/assistants/client-kusama/src/types/account.rs index 95f429bca..8a7550b2d 100644 --- a/frame/assistants/client-kusama/src/types/account.rs +++ b/frame/assistants/client-kusama/src/types/account.rs @@ -45,7 +45,8 @@ impl KusamaAccount { let account_id = AccountId::from(public); // real account, convert to account id - let real = real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real))); + let real = + real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real.as_ref()))); Ok(Self { account_id, diff --git a/frame/assistants/client-pangolin-parachain/Cargo.toml b/frame/assistants/client-pangolin-parachain/Cargo.toml index ebd519944..09a41391c 100644 --- a/frame/assistants/client-pangolin-parachain/Cargo.toml +++ b/frame/assistants/client-pangolin-parachain/Cargo.toml @@ -18,12 +18,50 @@ readme = 'README.md' edition = "2021" [dependencies] -tracing = "0.1" -thiserror = "1" -array-bytes = "1.4" +thiserror = "1" +tracing = "0.1" serde = { version = "1", features = ["derive"] } -codec = { package = "parity-scale-codec", version = "2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } -support-toolkit = { path = "../../../frame/supports/support-toolkit" } +array-bytes = "2" +codec = { package = "parity-scale-codec", version = "2" } +subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } +bp-pangolin-parachain = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } + +## maybe common +async-trait = { optional = true, version = "0.1" } + +## substrate +sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } + +## s2s client +finality-grandpa = { optional = true, version = "0.14" } +bridge-s2s-traits = { optional = true, path = "../../../frame/traits/bridge-s2s", features = ["advanced-types"] } + +## feemarket s2s +feemarket-s2s-traits = { optional = true, path = "../../../frame/traits/feemarket-s2s", features = ["advanced-types"] } + +support-toolkit = { path = "../../../frame/supports/support-toolkit", features = ["convert"] } + +[features] +default = [] +substrate = [ + "sp-finality-grandpa", + "sp-runtime", + "sp-core", +] +bridge-s2s = [ + "substrate", + "async-trait", + "finality-grandpa", + "bridge-s2s-traits", +] +bridge-s2s-pangolin = ["bridge-s2s"] +feemarket-s2s = [ + "async-trait", + "feemarket-s2s-traits", +] +feemarket-s2s-pangolin = ["feemarket-s2s"] + diff --git a/frame/assistants/client-pangolin-parachain/src/client.rs b/frame/assistants/client-pangolin-parachain/src/client.rs index fa4cb8502..924ae59b2 100644 --- a/frame/assistants/client-pangolin-parachain/src/client.rs +++ b/frame/assistants/client-pangolin-parachain/src/client.rs @@ -1,7 +1,7 @@ -use crate::subxt_runtime::api::RuntimeApi; use subxt::Client; use crate::config::PangolinParachainSubxtConfig; +use crate::subxt_runtime::api::RuntimeApi; use crate::types::{DarwiniaAccount, NodeRuntimeSignedExtra}; /// Pangolin client diff --git a/frame/assistants/client-pangolin-parachain/src/config.rs b/frame/assistants/client-pangolin-parachain/src/config.rs index 192e22f56..902d6b600 100644 --- a/frame/assistants/client-pangolin-parachain/src/config.rs +++ b/frame/assistants/client-pangolin-parachain/src/config.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use subxt::{sp_core, sp_runtime}; +use subxt::sp_runtime; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ClientConfig { @@ -16,13 +16,13 @@ pub struct ClientConfig { pub enum PangolinParachainSubxtConfig {} impl subxt::Config for PangolinParachainSubxtConfig { - type Index = u32; - type BlockNumber = u32; - type Hash = sp_core::H256; - type Hashing = sp_runtime::traits::BlakeTwo256; - type AccountId = sp_runtime::AccountId32; - type Address = sp_runtime::MultiAddress; - type Header = sp_runtime::generic::Header; - type Signature = sp_runtime::MultiSignature; + type Index = bp_pangolin_parachain::Nonce; + type BlockNumber = bp_pangolin_parachain::BlockNumber; + type Hash = bp_pangolin_parachain::Hash; + type Hashing = bp_pangolin_parachain::Hashing; + type AccountId = bp_pangolin_parachain::AccountId; + type Address = bp_pangolin_parachain::Address; + type Header = bp_pangolin_parachain::Header; + type Signature = bp_pangolin_parachain::Signature; type Extrinsic = sp_runtime::OpaqueExtrinsic; } diff --git a/frame/assistants/client-pangolin-parachain/src/error.rs b/frame/assistants/client-pangolin-parachain/src/error.rs index 930abe3cd..811ecc308 100644 --- a/frame/assistants/client-pangolin-parachain/src/error.rs +++ b/frame/assistants/client-pangolin-parachain/src/error.rs @@ -17,11 +17,14 @@ pub enum ClientError { #[error("Wrong seed: {0}")] Seed(String), + #[error("Bytes error: {0}")] + Bytes(String), + #[error(transparent)] Tk(#[from] TkError), #[error("Other error: {0}")] - Other(String), + Custom(String), } impl ClientError { @@ -39,3 +42,26 @@ impl From for ClientError { Self::SubxtBasicError(error) } } + +impl From for ClientError { + fn from(error: subxt::rpc::RpcError) -> Self { + Self::SubxtBasicError(subxt::BasicError::Rpc(error)) + } +} + +impl From for ClientError { + fn from(error: array_bytes::Error) -> Self { + Self::Bytes(format!("{:?}", error)) + } +} + +#[cfg(feature = "bridge-s2s")] +impl From for bridge_s2s_traits::error::S2SClientError { + fn from(error: ClientError) -> Self { + match error { + ClientError::SubxtBasicError(e) => Self::RPC(format!("{:?}", e)), + ClientError::ClientRestartNeed => Self::RPC(format!("Client restart need")), + _ => Self::Custom(format!("{:?}", error)), + } + } +} diff --git a/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/bridge_pangolin.rs b/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/bridge_pangolin.rs new file mode 100644 index 000000000..d0a99bf04 --- /dev/null +++ b/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/bridge_pangolin.rs @@ -0,0 +1,215 @@ +use std::ops::RangeInclusive; + +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay}; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::types::bp_header_chain::justification::GrandpaJustification; +use bridge_s2s_traits::types::bp_messages::{ + InboundLaneData, MessageData, MessageKey, OutboundLaneData, UnrewardedRelayersState, +}; +use bridge_s2s_traits::types::bp_runtime::Chain; +use bridge_s2s_traits::types::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof; +use bridge_s2s_traits::types::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof; +use sp_core::crypto::AccountId32; +use sp_core::storage::StorageKey; +use subxt::storage::StorageKeyPrefix; +use subxt::StorageEntry; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::PangolinParachainClient; +use crate::error::ClientError; +use crate::subxt_runtime::api::bridge_pangolin_messages::storage::{ + InboundLanes, OutboundLanes, OutboundMessages, +}; + +type BundleMessageKey = crate::types::runtime_types::bp_messages::MessageKey; + +/// Message payload for This -> Bridged chain messages. +type FromThisChainMessagePayload = crate::types::runtime_types::bp_message_dispatch::MessagePayload< + sp_core::crypto::AccountId32, + crate::types::runtime_types::sp_runtime::MultiSigner, + crate::types::runtime_types::sp_runtime::MultiSignature, + Vec, +>; + +#[async_trait::async_trait] +impl S2SClientRelay for PangolinParachainClient { + fn gen_outbound_messages_storage_key(&self, lane: [u8; 4], message_nonce: u64) -> StorageKey { + let prefix = StorageKeyPrefix::new::(); + OutboundMessages(BundleMessageKey { + lane_id: lane, + nonce: message_nonce, + }) + .key() + .final_key(prefix) + } + + fn gen_outbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + OutboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + fn gen_inbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + InboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + async fn calculate_dispatch_weight( + &self, + lane: [u8; 4], + nonces: RangeInclusive, + ) -> S2SClientResult { + let mut total_weight = 0u64; + for message_nonce in nonces { + let message_data = self + .outbound_messages( + MessageKey { + lane_id: lane, + nonce: message_nonce, + }, + None, + ) + .await? + .ok_or_else(|| { + ClientError::Custom(format!( + "Can not read message data by nonce {} in pangolin", + message_nonce + )) + })?; + let decoded_payload: FromThisChainMessagePayload = + codec::Decode::decode(&mut &message_data.payload[..])?; + total_weight += decoded_payload.weight; + } + Ok(total_weight) + } + + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { + Ok(self + .runtime() + .storage() + .bridge_pangolin_grandpa() + .best_finalized(at_block) + .await?) + } + + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash> { + let hash = self + .runtime() + .tx() + .bridge_pangolin_grandpa() + .initialize(initialization_data) + .sign_and_submit(self.account().signer()) + .await?; + Ok(hash) + } + + async fn submit_finality_proof( + &self, + finality_target: ::Header, + justification: GrandpaJustification<::Header>, + ) -> S2SClientResult<::Hash> { + let expected_target = SmartCodecMapper::map_to(&finality_target)?; + let expected_justification = SmartCodecMapper::map_to(&justification)?; + Ok(self + .runtime() + .tx() + .bridge_pangolin_grandpa() + .submit_finality_proof(expected_target, expected_justification) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn outbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult { + let outbound_lane_data = self + .runtime() + .storage() + .bridge_pangolin_messages() + .outbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&outbound_lane_data)?; + Ok(expected) + } + + async fn inbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult> { + let inbound_lane_data = self + .runtime() + .storage() + .bridge_pangolin_messages() + .inbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&inbound_lane_data)?; + Ok(expected) + } + + async fn outbound_messages( + &self, + message_key: MessageKey, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let expected_message_key = SmartCodecMapper::map_to(&message_key)?; + match self + .runtime() + .storage() + .bridge_pangolin_messages() + .outbound_messages(expected_message_key, hash) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn receive_messages_proof( + &self, + relayer_id_at_bridged_chain: AccountId32, + proof: FromBridgedChainMessagesProof<::Hash>, + messages_count: u32, + dispatch_weight: u64, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + Ok(self + .runtime() + .tx() + .bridge_pangolin_messages() + .receive_messages_proof( + relayer_id_at_bridged_chain, + expected_proof, + messages_count, + dispatch_weight, + ) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn receive_messages_delivery_proof( + &self, + proof: FromBridgedChainMessagesDeliveryProof<::Hash>, + relayers_state: UnrewardedRelayersState, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + let expected_relayers_state = SmartCodecMapper::map_to(&relayers_state)?; + Ok(self + .runtime() + .tx() + .bridge_pangolin_messages() + .receive_messages_delivery_proof(expected_proof, expected_relayers_state) + .sign_and_submit(self.account().signer()) + .await?) + } +} diff --git a/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/generic.rs b/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/generic.rs new file mode 100644 index 000000000..821b22eaa --- /dev/null +++ b/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/generic.rs @@ -0,0 +1,252 @@ +use bridge_s2s_traits::client::{S2SClientBase, S2SClientGeneric}; +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::types::bp_header_chain; +use bridge_s2s_traits::types::bp_runtime::Chain; +use finality_grandpa::voter_set::VoterSet; +use sp_finality_grandpa::{AuthorityList, ConsensusLog, ScheduledChange}; +use sp_runtime::generic::{Block, SignedBlock}; +use sp_runtime::{ConsensusEngineId, DigestItem}; +use subxt::rpc::{ClientT, Subscription, SubscriptionClientT}; +use subxt::{sp_core, sp_runtime}; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::PangolinParachainClient; +use crate::error::{ClientError, ClientResult}; +use crate::types::runtime_types::bp_header_chain::InitializationData; + +type BundleHeader = crate::types::runtime_types::sp_runtime::generic::header::Header< + u32, + crate::types::runtime_types::sp_runtime::traits::BlakeTwo256, +>; +type SpHeader = sp_runtime::generic::Header; + +const GRANDPA_ENGINE_ID: ConsensusEngineId = *b"FRNK"; + +impl PangolinParachainClient { + async fn grandpa_authorities(&self, at: sp_core::H256) -> ClientResult { + let params = subxt::rpc::rpc_params![ + "GrandpaApi_grandpa_authorities", + sp_core::Bytes(Vec::new()), + at + ]; + let hex: String = self + .subxt() + .rpc() + .client + .request("state_call", params) + .await?; + let raw_authorities_set = array_bytes::hex2bytes(hex.as_ref())?; + let authorities = codec::Decode::decode(&mut &raw_authorities_set[..]).map_err(|err| { + ClientError::Custom(format!( + "[DecodeAuthorities] Can not decode authorities: {:?}", + err + )) + })?; + Ok(authorities) + } + + /// Find header digest that schedules next GRANDPA authorities set. + fn find_grandpa_authorities_scheduled_change( + &self, + header: &SpHeader, + ) -> Option> { + let filter_log = |log: ConsensusLog| match log { + ConsensusLog::ScheduledChange(change) => Some(change), + _ => None, + }; + + // find the first consensus digest with the right ID which converts to + // the right kind of consensus log. + header + .digest + .logs + .iter() + .filter_map(|item| match item { + DigestItem::Consensus(engine, logs) => { + if engine == &GRANDPA_ENGINE_ID { + Some(&logs[..]) + } else { + None + } + } + _ => None, + }) + .find_map(|mut l| { + let log = codec::Decode::decode(&mut l).ok(); + log.and_then(filter_log) + }) + } +} + +impl S2SClientBase for PangolinParachainClient { + const CHAIN: &'static str = "pangolinparachain"; + + type Chain = bp_pangolin_parachain::PangolinParachain; + type Extrinsic = sp_runtime::OpaqueExtrinsic; +} + +#[async_trait::async_trait] +impl S2SClientGeneric for PangolinParachainClient { + type InitializationData = InitializationData; + + async fn subscribe_grandpa_justifications( + &self, + ) -> S2SClientResult> { + Ok(self + .subxt() + .rpc() + .client + .subscribe( + "grandpa_subscribeJustifications", + None, + "grandpa_unsubscribeJustifications", + ) + .await?) + } + + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>> { + match self.subxt().rpc().header(hash).await? { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn block( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>> + { + Ok(self.subxt().rpc().block(hash).await?) + } + + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; + let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); + Ok(proof) + } + + async fn prepare_initialization_data(&self) -> S2SClientResult { + let mut subscription = self.subscribe_grandpa_justifications().await?; + let justification = subscription + .next() + .await + .ok_or_else(|| S2SClientError::Custom("The subscribe is closed".to_string()))??; + let justification: bp_header_chain::justification::GrandpaJustification = + codec::Decode::decode(&mut &justification.0[..]) + .map_err(|err| S2SClientError::Custom(format!("Wrong justification: {:?}", err)))?; + + let (initial_header_hash, initial_header_number) = ( + justification.commit.target_hash, + justification.commit.target_number, + ); + let initial_header = self + .subxt() + .rpc() + .header(Some(initial_header_hash)) + .await? + .ok_or_else(|| { + S2SClientError::Custom(format!( + "Can not get initial header by hash: {:?}", + initial_header_hash + )) + })?; + tracing::trace!(target: "client-pangolin-parachain", "Selected initial header [{}]: {}", + initial_header_number, + initial_header_hash, + ); + let initial_authorities_set = self.grandpa_authorities(initial_header_hash).await?; + tracing::trace!(target: "client-pangolin-parachain", "Selected initial authorities set: {:?}", + initial_authorities_set, + ); + + // If initial header changes the GRANDPA authorities set, then we need previous authorities + // to verify justification. + let mut authorities_for_verification = initial_authorities_set.clone(); + let scheduled_change = self.find_grandpa_authorities_scheduled_change(&initial_header); + if scheduled_change + .as_ref() + .map(|c| c.delay == 0) + .unwrap_or(false) + { + return Err(S2SClientError::Custom(format!( + "GRANDPA authorities change at {} scheduled to happen in {:?} blocks. \ + We expect regular hange to have zero delay", + initial_header_hash, + scheduled_change.as_ref().map(|c| c.delay), + ))); + } + let schedules_change = scheduled_change.is_some(); + if schedules_change { + authorities_for_verification = + self.grandpa_authorities(initial_header.parent_hash).await?; + tracing::trace!( + target: "client-pangolin-parachain", + "Selected header is scheduling GRANDPA authorities set changes. Using previous set: {:?}", + authorities_for_verification, + ); + } + + // Now let's try to guess authorities set id by verifying justification. + let mut initial_authorities_set_id = 0; + let mut min_possible_block_number = 0; + let authorities_for_verification = VoterSet::new(authorities_for_verification.clone()) + .ok_or(S2SClientError::Custom(format!( + "[ReadInvalidAuthorities]: {:?}", + authorities_for_verification, + )))?; + loop { + tracing::trace!( + target: "client-pangolin-parachain", + "Trying GRANDPA authorities set id: {}", + initial_authorities_set_id, + ); + + let is_valid_set_id = bp_header_chain::justification::verify_justification::( + (initial_header_hash, initial_header_number), + initial_authorities_set_id, + &authorities_for_verification, + &justification, + ) + .is_ok(); + + if is_valid_set_id { + break; + } + + initial_authorities_set_id += 1; + min_possible_block_number += 1; + if min_possible_block_number > initial_header_number { + // there can't be more authorities set changes than headers => if we have reached + // `initial_block_number` and still have not found correct value of + // `initial_authorities_set_id`, then something else is broken => fail + return Err(S2SClientError::Custom(format!( + "[GuessInitialAuthorities]: {}", + initial_header_number + ))); + } + } + + let initialization_data = bp_header_chain::InitializationData { + header: Box::new(initial_header), + authority_list: initial_authorities_set, + set_id: if schedules_change { + initial_authorities_set_id + 1 + } else { + initial_authorities_set_id + }, + is_halted: false, + }; + let bytes = codec::Encode::encode(&initialization_data); + Ok(codec::Decode::decode(&mut &bytes[..]).map_err(|e| { + S2SClientError::Custom(format!("Failed to decode initialization data: {:?}", e)) + })?) + } +} diff --git a/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/mod.rs b/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/mod.rs new file mode 100644 index 000000000..efa0d5f32 --- /dev/null +++ b/frame/assistants/client-pangolin-parachain/src/fastapi/bridge_s2s/mod.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "bridge-s2s-pangolin")] +mod bridge_pangolin; +mod generic; diff --git a/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/feemarket_pangolin.rs b/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/feemarket_pangolin.rs new file mode 100644 index 000000000..603643b5c --- /dev/null +++ b/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/feemarket_pangolin.rs @@ -0,0 +1,34 @@ +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::error::AbstractFeemarketResult; +use feemarket_s2s_traits::types::{Chain, Order}; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::PangolinParachainClient; + +#[async_trait::async_trait] +impl FeemarketApiRelay for PangolinParachainClient { + async fn order( + &self, + laned_id: feemarket_s2s_traits::types::LaneId, + message_nonce: feemarket_s2s_traits::types::MessageNonce, + ) -> AbstractFeemarketResult< + Option< + Order< + ::AccountId, + ::BlockNumber, + ::Balance, + >, + >, + > { + match self + .runtime() + .storage() + .pangolin_fee_market() + .orders(laned_id, message_nonce, None) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } +} diff --git a/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/generic.rs b/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/generic.rs new file mode 100644 index 000000000..4f11e8cb8 --- /dev/null +++ b/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/generic.rs @@ -0,0 +1,27 @@ +use feemarket_s2s_traits::api::FeemarketApiBase; +use feemarket_s2s_traits::error::{AbstractFeemarketError, AbstractFeemarketResult}; +use feemarket_s2s_traits::types::Chain; + +use crate::client::PangolinParachainClient; + +#[async_trait::async_trait] +impl FeemarketApiBase for PangolinParachainClient { + const CHAIN: &'static str = "pangolinparachain"; + + type Chain = bp_pangolin_parachain::PangolinParachain; + + async fn best_finalized_header_number( + &self, + ) -> AbstractFeemarketResult<::BlockNumber> { + let head_hash = self.subxt().rpc().finalized_head().await?; + let header = self + .subxt() + .rpc() + .header(Some(head_hash)) + .await? + .ok_or_else(|| { + AbstractFeemarketError::Custom("Can not query best finalized header".to_string()) + })?; + Ok(header.number) + } +} diff --git a/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/mod.rs b/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/mod.rs new file mode 100644 index 000000000..119688744 --- /dev/null +++ b/frame/assistants/client-pangolin-parachain/src/fastapi/feemarket_s2s/mod.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "feemarket-s2s-pangolin")] +pub mod feemarket_pangolin; +pub mod generic; diff --git a/frame/assistants/client-pangolin-parachain/src/fastapi/mod.rs b/frame/assistants/client-pangolin-parachain/src/fastapi/mod.rs new file mode 100644 index 000000000..25fa07d6a --- /dev/null +++ b/frame/assistants/client-pangolin-parachain/src/fastapi/mod.rs @@ -0,0 +1,4 @@ +#[cfg(feature = "bridge-s2s")] +mod bridge_s2s; +#[cfg(feature = "feemarket-s2s")] +mod feemarket_s2s; diff --git a/frame/assistants/client-pangolin-parachain/src/lib.rs b/frame/assistants/client-pangolin-parachain/src/lib.rs index d7a061828..487233c37 100644 --- a/frame/assistants/client-pangolin-parachain/src/lib.rs +++ b/frame/assistants/client-pangolin-parachain/src/lib.rs @@ -3,4 +3,6 @@ pub mod component; pub mod config; pub mod error; pub mod types; -pub mod subxt_runtime; \ No newline at end of file + +mod fastapi; +mod subxt_runtime; diff --git a/frame/assistants/client-pangolin-parachain/src/subxt_runtime/runtime.rs b/frame/assistants/client-pangolin-parachain/src/subxt_runtime/runtime.rs index 4f295b07c..7d37e06c5 100644 --- a/frame/assistants/client-pangolin-parachain/src/subxt_runtime/runtime.rs +++ b/frame/assistants/client-pangolin-parachain/src/subxt_runtime/runtime.rs @@ -33,7 +33,11 @@ pub mod api { #[codec(index = 22)] BridgePangolinDispatch(bridge_pangolin_dispatch::Event), #[codec(index = 23)] - FeeMarket(fee_market::Event), + PangolinFeeMarket(pangolin_fee_market::Event), + #[codec(index = 24)] + FromPangolinIssuing(from_pangolin_issuing::Event), + #[codec(index = 25)] + RemoteGovernment(remote_government::Event), } pub mod system { use super::runtime_types; @@ -707,11 +711,11 @@ pub mod api { 72u8, 80u8, 97u8, 110u8, 103u8, 111u8, 108u8, 105u8, 110u8, 32u8, 80u8, 97u8, 114u8, 97u8, 99u8, 104u8, 97u8, 105u8, 110u8, 72u8, 80u8, 97u8, 110u8, 103u8, 111u8, 108u8, 105u8, 110u8, 32u8, 80u8, 97u8, 114u8, - 97u8, 99u8, 104u8, 97u8, 105u8, 110u8, 1u8, 0u8, 0u8, 0u8, 3u8, 0u8, - 0u8, 0u8, 1u8, 0u8, 0u8, 0u8, 44u8, 223u8, 106u8, 203u8, 104u8, 153u8, + 97u8, 99u8, 104u8, 97u8, 105u8, 110u8, 1u8, 0u8, 0u8, 0u8, 100u8, 20u8, + 0u8, 0u8, 1u8, 0u8, 0u8, 0u8, 48u8, 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, 96u8, 155u8, 4u8, 0u8, 0u8, 0u8, 55u8, 227u8, 151u8, 252u8, 124u8, 145u8, 245u8, 228u8, 1u8, 0u8, 0u8, 0u8, 64u8, 254u8, 58u8, 212u8, 1u8, - 248u8, 149u8, 154u8, 5u8, 0u8, 0u8, 0u8, 210u8, 188u8, 152u8, 151u8, + 248u8, 149u8, 154u8, 6u8, 0u8, 0u8, 0u8, 210u8, 188u8, 152u8, 151u8, 238u8, 208u8, 143u8, 21u8, 3u8, 0u8, 0u8, 0u8, 247u8, 139u8, 39u8, 139u8, 229u8, 63u8, 69u8, 76u8, 2u8, 0u8, 0u8, 0u8, 171u8, 60u8, 5u8, 114u8, 41u8, 31u8, 235u8, 139u8, 1u8, 0u8, 0u8, 0u8, 221u8, 113u8, @@ -719,8 +723,9 @@ pub mod api { 157u8, 137u8, 144u8, 79u8, 91u8, 146u8, 63u8, 1u8, 0u8, 0u8, 0u8, 55u8, 200u8, 187u8, 19u8, 80u8, 169u8, 162u8, 168u8, 1u8, 0u8, 0u8, 0u8, 234u8, 147u8, 227u8, 241u8, 111u8, 61u8, 105u8, 98u8, 2u8, 0u8, 0u8, - 0u8, 45u8, 6u8, 198u8, 53u8, 50u8, 185u8, 56u8, 227u8, 1u8, 0u8, 0u8, - 0u8, 1u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 60u8, 134u8, 72u8, 242u8, 252u8, 32u8, 139u8, 31u8, 1u8, 0u8, 0u8, + 0u8, 37u8, 128u8, 193u8, 193u8, 177u8, 221u8, 230u8, 148u8, 1u8, 0u8, + 0u8, 0u8, 1u8, 0u8, 0u8, 0u8, 0u8, ][..], )?) } @@ -912,7 +917,7 @@ pub mod api { impl ::subxt::StorageEntry for ValidationData { const PALLET: &'static str = "ParachainSystem"; const STORAGE: &'static str = "ValidationData"; - type Value = runtime_types::polkadot_primitives::v1::PersistedValidationData< + type Value = runtime_types::polkadot_primitives::v2::PersistedValidationData< ::subxt::sp_core::H256, ::core::primitive::u32, >; @@ -934,12 +939,21 @@ pub mod api { const PALLET: &'static str = "ParachainSystem"; const STORAGE: &'static str = "UpgradeRestrictionSignal"; type Value = ::core::option::Option< - runtime_types::polkadot_primitives::v1::UpgradeRestriction, + runtime_types::polkadot_primitives::v2::UpgradeRestriction, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } } + pub struct RelayStateProof; + impl ::subxt::StorageEntry for RelayStateProof { + const PALLET: &'static str = "ParachainSystem"; + const STORAGE: &'static str = "RelayStateProof"; + type Value = runtime_types::sp_trie::storage_proof::StorageProof; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } pub struct RelevantMessagingState; impl ::subxt::StorageEntry for RelevantMessagingState { const PALLET: &'static str = "ParachainSystem"; @@ -953,7 +967,7 @@ pub mod api { impl ::subxt::StorageEntry for HostConfiguration { const PALLET: &'static str = "ParachainSystem"; const STORAGE: &'static str = "HostConfiguration"; - type Value = runtime_types::polkadot_primitives::v1::AbridgedHostConfiguration; + type Value = runtime_types::polkadot_primitives::v2::AbridgedHostConfiguration; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -1122,7 +1136,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v1::PersistedValidationData< + runtime_types::polkadot_primitives::v2::PersistedValidationData< ::subxt::sp_core::H256, ::core::primitive::u32, >, @@ -1145,12 +1159,22 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v1::UpgradeRestriction, + runtime_types::polkadot_primitives::v2::UpgradeRestriction, >, ::subxt::BasicError, > { let entry = UpgradeRestrictionSignal; self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn relay_state_proof( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option, + ::subxt::BasicError, + > { + let entry = RelayStateProof; + self.client.storage().fetch(&entry, hash).await } pub async fn relevant_messaging_state (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: cumulus_pallet_parachain_system :: relay_state_snapshot :: MessagingStateSnapshot > , :: subxt :: BasicError >{ let entry = RelevantMessagingState; self.client.storage().fetch(&entry, hash).await @@ -1160,7 +1184,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v1::AbridgedHostConfiguration, + runtime_types::polkadot_primitives::v2::AbridgedHostConfiguration, >, ::subxt::BasicError, > { @@ -1940,17 +1964,6 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn transaction_byte_fee( - &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 128u8, 224u8, 55u8, 121u8, 195u8, 17u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, - ][..], - )?) - } pub fn operational_fee_multiplier( &self, ) -> ::core::result::Result<::core::primitive::u8, ::subxt::BasicError> @@ -1974,6 +1987,23 @@ pub mod api { ][..], )?) } + pub fn length_to_fee( + &self, + ) -> ::core::result::Result< + ::std::vec::Vec< + runtime_types::frame_support::weights::WeightToFeeCoefficient< + ::core::primitive::u128, + >, + >, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 4u8, 0u8, 128u8, 224u8, 55u8, 121u8, 195u8, 17u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, + ][..], + )?) + } } } } @@ -2754,6 +2784,102 @@ pub mod api { const PALLET: &'static str = "XcmpQueue"; const FUNCTION: &'static str = "service_overweight"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct suspend_xcm_execution; + impl ::subxt::Call for suspend_xcm_execution { + const PALLET: &'static str = "XcmpQueue"; + const FUNCTION: &'static str = "suspend_xcm_execution"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct resume_xcm_execution; + impl ::subxt::Call for resume_xcm_execution { + const PALLET: &'static str = "XcmpQueue"; + const FUNCTION: &'static str = "resume_xcm_execution"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_suspend_threshold { + pub new: ::core::primitive::u32, + } + impl ::subxt::Call for update_suspend_threshold { + const PALLET: &'static str = "XcmpQueue"; + const FUNCTION: &'static str = "update_suspend_threshold"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_drop_threshold { + pub new: ::core::primitive::u32, + } + impl ::subxt::Call for update_drop_threshold { + const PALLET: &'static str = "XcmpQueue"; + const FUNCTION: &'static str = "update_drop_threshold"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_resume_threshold { + pub new: ::core::primitive::u32, + } + impl ::subxt::Call for update_resume_threshold { + const PALLET: &'static str = "XcmpQueue"; + const FUNCTION: &'static str = "update_resume_threshold"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_threshold_weight { + pub new: ::core::primitive::u64, + } + impl ::subxt::Call for update_threshold_weight { + const PALLET: &'static str = "XcmpQueue"; + const FUNCTION: &'static str = "update_threshold_weight"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_weight_restrict_decay { + pub new: ::core::primitive::u64, + } + impl ::subxt::Call for update_weight_restrict_decay { + const PALLET: &'static str = "XcmpQueue"; + const FUNCTION: &'static str = "update_weight_restrict_decay"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_xcmp_max_individual_weight { + pub new: ::core::primitive::u64, + } + impl ::subxt::Call for update_xcmp_max_individual_weight { + const PALLET: &'static str = "XcmpQueue"; + const FUNCTION: &'static str = "update_xcmp_max_individual_weight"; + } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, @@ -2782,6 +2908,98 @@ pub mod api { }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn suspend_xcm_execution( + &self, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, suspend_xcm_execution, DispatchError> + { + let call = suspend_xcm_execution {}; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn resume_xcm_execution( + &self, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, resume_xcm_execution, DispatchError> + { + let call = resume_xcm_execution {}; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn update_suspend_threshold( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + update_suspend_threshold, + DispatchError, + > { + let call = update_suspend_threshold { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn update_drop_threshold( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, update_drop_threshold, DispatchError> + { + let call = update_drop_threshold { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn update_resume_threshold( + &self, + new: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + update_resume_threshold, + DispatchError, + > { + let call = update_resume_threshold { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn update_threshold_weight( + &self, + new: ::core::primitive::u64, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + update_threshold_weight, + DispatchError, + > { + let call = update_threshold_weight { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn update_weight_restrict_decay( + &self, + new: ::core::primitive::u64, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + update_weight_restrict_decay, + DispatchError, + > { + let call = update_weight_restrict_decay { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn update_xcmp_max_individual_weight( + &self, + new: ::core::primitive::u64, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + update_xcmp_max_individual_weight, + DispatchError, + > { + let call = update_xcmp_max_individual_weight { new }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } } } pub type Event = runtime_types::cumulus_pallet_xcmp_queue::pallet::Event; @@ -2950,6 +3168,15 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } + pub struct QueueSuspended; + impl ::subxt::StorageEntry for QueueSuspended { + const PALLET: &'static str = "XcmpQueue"; + const STORAGE: &'static str = "QueueSuspended"; + type Value = ::core::primitive::bool; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } pub struct StorageApi<'a, T: ::subxt::Config> { client: &'a ::subxt::Client, } @@ -3083,6 +3310,14 @@ pub mod api { let entry = OverweightCount; self.client.storage().fetch_or_default(&entry, hash).await } + pub async fn queue_suspended( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { + let entry = QueueSuspended; + self.client.storage().fetch_or_default(&entry, hash).await + } } } } @@ -4832,6 +5067,18 @@ pub mod api { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyAdded"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct ProxyRemoved { + pub delegator: ::subxt::sp_core::crypto::AccountId32, + pub delegatee: ::subxt::sp_core::crypto::AccountId32, + pub proxy_type: + runtime_types::pangolin_parachain_runtime::pallets::proxy::ProxyType, + pub delay: ::core::primitive::u32, + } + impl ::subxt::Event for ProxyRemoved { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyRemoved"; + } } pub mod storage { use super::runtime_types; @@ -5970,7 +6217,7 @@ pub mod api { } } } - pub mod fee_market { + pub mod pangolin_fee_market { use super::runtime_types; pub mod calls { use super::runtime_types; @@ -5981,7 +6228,7 @@ pub mod api { pub relay_fee: ::core::option::Option<::core::primitive::u128>, } impl ::subxt::Call for enroll_and_lock_collateral { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "enroll_and_lock_collateral"; } #[derive( @@ -5995,7 +6242,7 @@ pub mod api { pub new_collateral: ::core::primitive::u128, } impl ::subxt::Call for update_locked_collateral { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "update_locked_collateral"; } #[derive( @@ -6009,13 +6256,13 @@ pub mod api { pub new_fee: ::core::primitive::u128, } impl ::subxt::Call for update_relay_fee { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "update_relay_fee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct cancel_enrollment; impl ::subxt::Call for cancel_enrollment { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "cancel_enrollment"; } #[derive( @@ -6029,7 +6276,7 @@ pub mod api { pub slash_protect: ::core::primitive::u128, } impl ::subxt::Call for set_slash_protect { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "set_slash_protect"; } #[derive( @@ -6043,7 +6290,7 @@ pub mod api { pub number: ::core::primitive::u32, } impl ::subxt::Call for set_assigned_relayers_number { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "set_assigned_relayers_number"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { @@ -6143,7 +6390,7 @@ pub mod api { pub ::core::primitive::u128, ); impl ::subxt::Event for Enroll { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "Enroll"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -6152,7 +6399,7 @@ pub mod api { pub ::core::primitive::u128, ); impl ::subxt::Event for UpdateLockedCollateral { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "UpdateLockedCollateral"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -6161,13 +6408,13 @@ pub mod api { pub ::core::primitive::u128, ); impl ::subxt::Event for UpdateRelayFee { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "UpdateRelayFee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct CancelEnrollment(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for CancelEnrollment { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "CancelEnrollment"; } #[derive( @@ -6179,7 +6426,7 @@ pub mod api { )] pub struct UpdateCollateralSlashProtect(pub ::core::primitive::u128); impl ::subxt::Event for UpdateCollateralSlashProtect { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "UpdateCollateralSlashProtect"; } #[derive( @@ -6191,7 +6438,7 @@ pub mod api { )] pub struct UpdateAssignedRelayersNumber(pub ::core::primitive::u32); impl ::subxt::Event for UpdateAssignedRelayersNumber { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "UpdateAssignedRelayersNumber"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -6203,7 +6450,7 @@ pub mod api { >, ); impl ::subxt::Event for FeeMarketSlash { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "FeeMarketSlash"; } } @@ -6211,7 +6458,7 @@ pub mod api { use super::runtime_types; pub struct RelayersMap(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for RelayersMap { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "RelayersMap"; type Value = runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, @@ -6226,7 +6473,7 @@ pub mod api { } pub struct Relayers; impl ::subxt::StorageEntry for Relayers { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "Relayers"; type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; fn key(&self) -> ::subxt::StorageEntryKey { @@ -6235,7 +6482,7 @@ pub mod api { } pub struct AssignedRelayers; impl ::subxt::StorageEntry for AssignedRelayers { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "AssignedRelayers"; type Value = ::std::vec::Vec< runtime_types::pallet_fee_market::types::Relayer< @@ -6252,7 +6499,7 @@ pub mod api { pub ::core::primitive::u64, ); impl ::subxt::StorageEntry for Orders { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "Orders"; type Value = runtime_types::pallet_fee_market::types::Order< ::subxt::sp_core::crypto::AccountId32, @@ -6261,14 +6508,14 @@ pub mod api { >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, + &(&self.0, &self.1), ::subxt::StorageHasher::Blake2_128Concat, )]) } } pub struct CollateralSlashProtect; impl ::subxt::StorageEntry for CollateralSlashProtect { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "CollateralSlashProtect"; type Value = ::core::primitive::u128; fn key(&self) -> ::subxt::StorageEntryKey { @@ -6277,7 +6524,7 @@ pub mod api { } pub struct AssignedRelayersNumber; impl ::subxt::StorageEntry for AssignedRelayersNumber { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "AssignedRelayersNumber"; type Value = ::core::primitive::u32; fn key(&self) -> ::subxt::StorageEntryKey { @@ -6390,16 +6637,6 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::core::result::Result< - runtime_types::frame_support::PalletId, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 97u8, 47u8, 102u8, 101u8, 101u8, 109u8, 107u8][..], - )?) - } pub fn treasury_pallet_id( &self, ) -> ::core::result::Result< @@ -6481,67 +6718,530 @@ pub mod api { } } } - pub mod runtime_types { + pub mod from_pangolin_issuing { use super::runtime_types; - pub mod bitvec { + pub mod calls { use super::runtime_types; - pub mod order { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Msb0; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct issue_from_remote { + pub value: ::core::primitive::u128, + pub recipient: ::subxt::sp_core::crypto::AccountId32, } - } - pub mod bp_header_chain { - use super::runtime_types; - pub mod justification { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct GrandpaJustification<_0> { - pub round: ::core::primitive::u64, - pub commit: runtime_types::finality_grandpa::Commit< - ::subxt::sp_core::H256, - ::core::primitive::u32, - runtime_types::sp_finality_grandpa::app::Signature, - runtime_types::sp_finality_grandpa::app::Public, - >, - pub votes_ancestries: ::std::vec::Vec<_0>, - } + impl ::subxt::Call for issue_from_remote { + const PALLET: &'static str = "FromPangolinIssuing"; + const FUNCTION: &'static str = "issue_from_remote"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AuthoritySet { - pub authorities: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - pub set_id: ::core::primitive::u64, + pub struct burn_and_remote_unlock { + pub spec_version: ::core::primitive::u32, + pub weight: ::core::primitive::u64, + #[codec(compact)] + pub value: ::core::primitive::u128, + #[codec(compact)] + pub fee: ::core::primitive::u128, + pub recipient: ::subxt::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct InitializationData<_0> { - pub header: ::std::boxed::Box<_0>, - pub authority_list: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - pub set_id: ::core::primitive::u64, - pub is_halted: ::core::primitive::bool, + impl ::subxt::Call for burn_and_remote_unlock { + const PALLET: &'static str = "FromPangolinIssuing"; + const FUNCTION: &'static str = "burn_and_remote_unlock"; } - } - pub mod bp_message_dispatch { - use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum CallOrigin<_0, _1, _2> { - #[codec(index = 0)] - SourceRoot, - #[codec(index = 1)] - TargetAccount(_0, _1, _2), - #[codec(index = 2)] - SourceAccount(_0), + pub struct set_remote_backing_account { + pub account: ::subxt::sp_core::crypto::AccountId32, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + impl ::subxt::Call for set_remote_backing_account { + const PALLET: &'static str = "FromPangolinIssuing"; + const FUNCTION: &'static str = "set_remote_backing_account"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct set_secure_limited_period { + pub period: ::core::primitive::u32, + } + impl ::subxt::Call for set_secure_limited_period { + const PALLET: &'static str = "FromPangolinIssuing"; + const FUNCTION: &'static str = "set_secure_limited_period"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct set_security_limitation_ring_amount { + pub limitation: ::core::primitive::u128, + } + impl ::subxt::Call for set_security_limitation_ring_amount { + const PALLET: &'static str = "FromPangolinIssuing"; + const FUNCTION: &'static str = "set_security_limitation_ring_amount"; + } + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, + } + } + pub fn issue_from_remote( + &self, + value: ::core::primitive::u128, + recipient: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, issue_from_remote, DispatchError> + { + let call = issue_from_remote { value, recipient }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn burn_and_remote_unlock( + &self, + spec_version: ::core::primitive::u32, + weight: ::core::primitive::u64, + value: ::core::primitive::u128, + fee: ::core::primitive::u128, + recipient: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, burn_and_remote_unlock, DispatchError> + { + let call = burn_and_remote_unlock { + spec_version, + weight, + value, + fee, + recipient, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_remote_backing_account( + &self, + account: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_remote_backing_account, + DispatchError, + > { + let call = set_remote_backing_account { account }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_secure_limited_period( + &self, + period: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_secure_limited_period, + DispatchError, + > { + let call = set_secure_limited_period { period }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_security_limitation_ring_amount( + &self, + limitation: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_security_limitation_ring_amount, + DispatchError, + > { + let call = set_security_limitation_ring_amount { limitation }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } + } + pub type Event = runtime_types::dp_common_runtime::helixbridge::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenBurnAndRemoteUnlocked( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for TokenBurnAndRemoteUnlocked { + const PALLET: &'static str = "FromPangolinIssuing"; + const EVENT: &'static str = "TokenBurnAndRemoteUnlocked"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenIssued( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for TokenIssued { + const PALLET: &'static str = "FromPangolinIssuing"; + const EVENT: &'static str = "TokenIssued"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct RemoteBackingAccountUpdated(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::Event for RemoteBackingAccountUpdated { + const PALLET: &'static str = "FromPangolinIssuing"; + const EVENT: &'static str = "RemoteBackingAccountUpdated"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenUnlockedConfirmed( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + pub ::core::primitive::bool, + ); + impl ::subxt::Event for TokenUnlockedConfirmed { + const PALLET: &'static str = "FromPangolinIssuing"; + const EVENT: &'static str = "TokenUnlockedConfirmed"; + } + } + pub mod storage { + use super::runtime_types; + pub struct RemoteBackingAccount; + impl ::subxt::StorageEntry for RemoteBackingAccount { + const PALLET: &'static str = "FromPangolinIssuing"; + const STORAGE: &'static str = "RemoteBackingAccount"; + type Value = ::subxt::sp_core::crypto::AccountId32; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct TransactionInfos( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + ); + impl ::subxt::StorageEntry for TransactionInfos { + const PALLET: &'static str = "FromPangolinIssuing"; + const STORAGE: &'static str = "TransactionInfos"; + type Value = ( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ); + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Blake2_128Concat, + )]) + } + } + pub struct SecureLimitedPeriod; + impl ::subxt::StorageEntry for SecureLimitedPeriod { + const PALLET: &'static str = "FromPangolinIssuing"; + const STORAGE: &'static str = "SecureLimitedPeriod"; + type Value = ::core::primitive::u32; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct SecureLimitedRingAmount; + impl ::subxt::StorageEntry for SecureLimitedRingAmount { + const PALLET: &'static str = "FromPangolinIssuing"; + const STORAGE: &'static str = "SecureLimitedRingAmount"; + type Value = (::core::primitive::u128, ::core::primitive::u128); + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct StorageApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> StorageApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } + pub async fn remote_backing_account( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + ::subxt::BasicError, + > { + let entry = RemoteBackingAccount; + self.client.storage().fetch(&entry, hash).await + } + pub async fn transaction_infos( + &self, + _0: [::core::primitive::u8; 4usize], + _1: ::core::primitive::u64, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + ::subxt::BasicError, + > { + let entry = TransactionInfos(_0, _1); + self.client.storage().fetch(&entry, hash).await + } + pub async fn transaction_infos_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, TransactionInfos>, + ::subxt::BasicError, + > { + self.client.storage().iter(hash).await + } + pub async fn secure_limited_period( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + let entry = SecureLimitedPeriod; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn secure_limited_ring_amount( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + (::core::primitive::u128, ::core::primitive::u128), + ::subxt::BasicError, + > { + let entry = SecureLimitedRingAmount; + self.client.storage().fetch_or_default(&entry, hash).await + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn pallet_id( + &self, + ) -> ::core::result::Result< + runtime_types::frame_support::PalletId, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 97u8, 47u8, 112u8, 97u8, 97u8, 105u8, 115u8][..], + )?) + } + pub fn decimal_multiplier( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 202u8, 154u8, 59u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, + ][..], + )?) + } + } + } + } + pub mod remote_government { + use super::runtime_types; + pub mod calls { + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct emergency_safeguard { + pub call: runtime_types::pangolin_parachain_runtime::Call, + } + impl ::subxt::Call for emergency_safeguard { + const PALLET: &'static str = "RemoteGovernment"; + const FUNCTION: &'static str = "emergency_safeguard"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct enact_remote_call { + pub call: runtime_types::pangolin_parachain_runtime::Call, + } + impl ::subxt::Call for enact_remote_call { + const PALLET: &'static str = "RemoteGovernment"; + const FUNCTION: &'static str = "enact_remote_call"; + } + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, + } + } + pub fn emergency_safeguard( + &self, + call: runtime_types::pangolin_parachain_runtime::Call, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, emergency_safeguard, DispatchError> + { + let call = emergency_safeguard { call }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn enact_remote_call( + &self, + call: runtime_types::pangolin_parachain_runtime::Call, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, enact_remote_call, DispatchError> + { + let call = enact_remote_call { call }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } + } + pub type Event = runtime_types::dp_common_runtime::remote_government::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Emergency; + impl ::subxt::Event for Emergency { + const PALLET: &'static str = "RemoteGovernment"; + const EVENT: &'static str = "Emergency"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Recovery; + impl ::subxt::Event for Recovery { + const PALLET: &'static str = "RemoteGovernment"; + const EVENT: &'static str = "Recovery"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct RemoteCallEnacted { + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::Event for RemoteCallEnacted { + const PALLET: &'static str = "RemoteGovernment"; + const EVENT: &'static str = "RemoteCallEnacted"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct EmergencySafeguardDone { + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } + impl ::subxt::Event for EmergencySafeguardDone { + const PALLET: &'static str = "RemoteGovernment"; + const EVENT: &'static str = "EmergencySafeguardDone"; + } + } + pub mod storage { + use super::runtime_types; + pub struct PreviousBridgeFinalized; + impl ::subxt::StorageEntry for PreviousBridgeFinalized { + const PALLET: &'static str = "RemoteGovernment"; + const STORAGE: &'static str = "PreviousBridgeFinalized"; + type Value = ::subxt::sp_core::H256; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct Emergency; + impl ::subxt::StorageEntry for Emergency { + const PALLET: &'static str = "RemoteGovernment"; + const STORAGE: &'static str = "Emergency"; + type Value = ::core::primitive::bool; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct StorageApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> StorageApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } + pub async fn previous_bridge_finalized( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::BasicError> + { + let entry = PreviousBridgeFinalized; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn emergency( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { + let entry = Emergency; + self.client.storage().fetch_or_default(&entry, hash).await + } + } + } + } + pub mod runtime_types { + use super::runtime_types; + pub mod bitvec { + use super::runtime_types; + pub mod order { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Msb0; + } + } + pub mod bp_header_chain { + use super::runtime_types; + pub mod justification { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct GrandpaJustification<_0> { + pub round: ::core::primitive::u64, + pub commit: runtime_types::finality_grandpa::Commit< + ::subxt::sp_core::H256, + ::core::primitive::u32, + runtime_types::sp_finality_grandpa::app::Signature, + runtime_types::sp_finality_grandpa::app::Public, + >, + pub votes_ancestries: ::std::vec::Vec<_0>, + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct AuthoritySet { + pub authorities: ::std::vec::Vec<( + runtime_types::sp_finality_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub set_id: ::core::primitive::u64, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct InitializationData<_0> { + pub header: ::std::boxed::Box<_0>, + pub authority_list: ::std::vec::Vec<( + runtime_types::sp_finality_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub set_id: ::core::primitive::u64, + pub is_halted: ::core::primitive::bool, + } + } + pub mod bp_message_dispatch { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum CallOrigin<_0, _1, _2> { + #[codec(index = 0)] + SourceRoot, + #[codec(index = 1)] + TargetAccount(_0, _1, _2), + #[codec(index = 2)] + SourceAccount(_0), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct MessagePayload<_0, _1, _2, _3> { pub spec_version: ::core::primitive::u32, pub weight: ::core::primitive::u64, @@ -6725,9 +7425,7 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Call { - // # [codec (index = 0)] set_validation_data { - // data : runtime_types :: cumulus_primitives_parachain_inherent :: ParachainInherentData , - // } , + // # [codec (index = 0)] set_validation_data { data : runtime_types :: cumulus_primitives_parachain_inherent :: ParachainInherentData , } , #[codec(index = 1)] sudo_send_upward_message { message: ::std::vec::Vec<::core::primitive::u8>, @@ -6788,11 +7486,11 @@ pub mod api { pub relay_dispatch_queue_size: (::core::primitive::u32, ::core::primitive::u32), pub ingress_channels: ::std::vec::Vec<( runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_primitives::v1::AbridgedHrmpChannel, + runtime_types::polkadot_primitives::v2::AbridgedHrmpChannel, )>, pub egress_channels: ::std::vec::Vec<( runtime_types::polkadot_parachain::primitives::Id, - runtime_types::polkadot_primitives::v1::AbridgedHrmpChannel, + runtime_types::polkadot_primitives::v2::AbridgedHrmpChannel, )>, } } @@ -6843,6 +7541,22 @@ pub mod api { index: ::core::primitive::u64, weight_limit: ::core::primitive::u64, }, + #[codec(index = 1)] + suspend_xcm_execution, + #[codec(index = 2)] + resume_xcm_execution, + #[codec(index = 3)] + update_suspend_threshold { new: ::core::primitive::u32 }, + #[codec(index = 4)] + update_drop_threshold { new: ::core::primitive::u32 }, + #[codec(index = 5)] + update_resume_threshold { new: ::core::primitive::u32 }, + #[codec(index = 6)] + update_threshold_weight { new: ::core::primitive::u64 }, + #[codec(index = 7)] + update_weight_restrict_decay { new: ::core::primitive::u64 }, + #[codec(index = 8)] + update_xcmp_max_individual_weight { new: ::core::primitive::u64 }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -6950,7 +7664,7 @@ pub mod api { // #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] // pub struct ParachainInherentData { // pub validation_data: - // runtime_types::polkadot_primitives::v1::PersistedValidationData< + // runtime_types::polkadot_primitives::v2::PersistedValidationData< // ::subxt::sp_core::H256, // ::core::primitive::u32, // >, @@ -6970,6 +7684,137 @@ pub mod api { // >, // } } + pub mod dp_common_runtime { + use super::runtime_types; + pub mod helixbridge { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + issue_from_remote { + value: ::core::primitive::u128, + recipient: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 1)] + burn_and_remote_unlock { + spec_version: ::core::primitive::u32, + weight: ::core::primitive::u64, + #[codec(compact)] + value: ::core::primitive::u128, + #[codec(compact)] + fee: ::core::primitive::u128, + recipient: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 2)] + set_remote_backing_account { + account: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 3)] + set_secure_limited_period { period: ::core::primitive::u32 }, + #[codec(index = 4)] + set_security_limitation_ring_amount { limitation: ::core::primitive::u128 }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + RingDailyLimited, + #[codec(index = 1)] + InsufficientBalance, + #[codec(index = 2)] + NonceDuplicated, + #[codec(index = 3)] + BackingAccountNone, + #[codec(index = 4)] + ValueOverFlow, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + TokenBurnAndRemoteUnlocked( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 1)] + TokenIssued( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 2)] + RemoteBackingAccountUpdated(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 3)] + TokenUnlockedConfirmed( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::bool, + ), + } + } + } + pub mod remote_government { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + emergency_safeguard { + call: runtime_types::pangolin_parachain_runtime::Call, + }, + #[codec(index = 1)] + enact_remote_call { + call: runtime_types::pangolin_parachain_runtime::Call, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + RequireSourceRoot, + #[codec(index = 1)] + EmergencyOnly, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + Emergency, + #[codec(index = 1)] + Recovery, + #[codec(index = 2)] + RemoteCallEnacted { + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + #[codec(index = 3)] + EmergencySafeguardDone { + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, + } + } + } + } pub mod finality_grandpa { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -6994,6 +7839,20 @@ pub mod api { } pub mod frame_support { use super::runtime_types; + pub mod dispatch { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, + } + } pub mod storage { use super::runtime_types; pub mod bounded_vec { @@ -7302,15 +8161,6 @@ pub mod api { #[codec(index = 2)] Initialization, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawOrigin<_0> { - #[codec(index = 0)] - Root, - #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, - } } pub mod pallet_authorship { use super::runtime_types; @@ -7826,10 +8676,12 @@ pub mod api { #[codec(index = 2)] NotEnrolled, #[codec(index = 3)] - StillHasOrdersNotConfirmed, + CollateralTooLow, #[codec(index = 4)] - RelayFeeTooLow, + StillHasOrdersNotConfirmed, #[codec(index = 5)] + RelayFeeTooLow, + #[codec(index = 6)] OccupiedRelayer, } #[derive( @@ -8169,6 +9021,14 @@ pub mod api { runtime_types::pangolin_parachain_runtime::pallets::proxy::ProxyType, delay: ::core::primitive::u32, }, + #[codec(index = 4)] + ProxyRemoved { + delegator: ::subxt::sp_core::crypto::AccountId32, + delegatee: ::subxt::sp_core::crypto::AccountId32, + proxy_type: + runtime_types::pangolin_parachain_runtime::pallets::proxy::ProxyType, + delay: ::core::primitive::u32, + }, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -8679,7 +9539,11 @@ pub mod api { #[codec(index = 21)] BridgePangolinMessages(runtime_types::pallet_bridge_messages::pallet::Call), #[codec(index = 23)] - FeeMarket(runtime_types::pallet_fee_market::pallet::Call), + PangolinFeeMarket(runtime_types::pallet_fee_market::pallet::Call), + #[codec(index = 24)] + FromPangolinIssuing(runtime_types::dp_common_runtime::helixbridge::pallet::Call), + // #[codec(index = 25)] + // RemoteGovernment(runtime_types::dp_common_runtime::remote_government::pallet::Call), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum Event { @@ -8714,13 +9578,21 @@ pub mod api { #[codec(index = 22)] BridgePangolinDispatch(runtime_types::pallet_bridge_dispatch::pallet::Event), #[codec(index = 23)] - FeeMarket(runtime_types::pallet_fee_market::pallet::Event), + PangolinFeeMarket(runtime_types::pallet_fee_market::pallet::Event), + #[codec(index = 24)] + FromPangolinIssuing(runtime_types::dp_common_runtime::helixbridge::pallet::Event), + #[codec(index = 25)] + RemoteGovernment( + runtime_types::dp_common_runtime::remote_government::pallet::Event, + ), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum OriginCaller { #[codec(index = 0)] system( - runtime_types::frame_system::RawOrigin<::subxt::sp_core::crypto::AccountId32>, + runtime_types::frame_support::dispatch::RawOrigin< + ::subxt::sp_core::crypto::AccountId32, + >, ), #[codec(index = 13)] PolkadotXcm(runtime_types::pallet_xcm::pallet::Origin), @@ -8781,7 +9653,7 @@ pub mod api { } pub mod polkadot_primitives { use super::runtime_types; - pub mod v1 { + pub mod v2 { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -9579,10 +10451,7 @@ pub mod api { #[codec(index = 2)] BadOrigin, #[codec(index = 3)] - Module { - index: ::core::primitive::u8, - error: ::core::primitive::u8, - }, + Module(runtime_types::sp_runtime::ModuleError), #[codec(index = 4)] ConsumerRemaining, #[codec(index = 5)] @@ -9593,6 +10462,13 @@ pub mod api { Token(runtime_types::sp_runtime::TokenError), #[codec(index = 8)] Arithmetic(runtime_types::sp_runtime::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct ModuleError { + pub index: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum MultiSignature { @@ -9629,6 +10505,13 @@ pub mod api { #[codec(index = 6)] Unsupported, } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum TransactionalError { + #[codec(index = 0)] + LimitReached, + #[codec(index = 1)] + NoLayer, + } } pub mod sp_trie { use super::runtime_types; @@ -9638,7 +10521,8 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct StorageProof { - pub trie_nodes: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub trie_nodes: + ::std::collections::BTreeSet<::std::vec::Vec<::core::primitive::u8>>, } } } @@ -10686,8 +11570,8 @@ pub mod api { } impl DispatchError { pub fn details(&self) -> Option { - if let Self::Module { index, error } = self { - match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (1u8 , 0u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "OverlappingUpgrades" , docs : "Attempt to upgrade validation function while existing upgrade pending" }) , (1u8 , 1u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "ProhibitedByPolkadot" , docs : "Polkadot currently prohibits this parachain from upgrading its validation function" }) , (1u8 , 2u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "TooBig" , docs : "The supplied validation function has compiled into a blob larger than Polkadot is\nwilling to run" }) , (1u8 , 3u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "ValidationDataNotAvailable" , docs : "The inherent which supplies the validation data did not run this block" }) , (1u8 , 4u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "HostConfigurationNotAvailable" , docs : "The inherent which supplies the host configuration did not run this block" }) , (1u8 , 5u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "NotScheduled" , docs : "No validation function upgrade is currently scheduled." }) , (1u8 , 6u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "NothingAuthorized" , docs : "No code upgrade has been authorized." }) , (1u8 , 7u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "Unauthorized" , docs : "The given code upgrade has not been authorized." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value" }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal" }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value" }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit" }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account" }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account" }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist" }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "TooManyCandidates" , docs : "Too many candidates" }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "TooFewCandidates" , docs : "Too few candidates" }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "Unknown" , docs : "Unknown error" }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "Permission" , docs : "Permission issue" }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "AlreadyCandidate" , docs : "User is already a candidate" }) , (8u8 , 5u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "NotCandidate" , docs : "User is not a candidate" }) , (8u8 , 6u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "AlreadyInvulnerable" , docs : "User is already an Invulnerable" }) , (8u8 , 7u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "NoAssociatedValidatorId" , docs : "Account has no associated validator ID" }) , (8u8 , 8u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "ValidatorNotRegistered" , docs : "Validator ID is not yet registered" }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (12u8 , 0u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "FailedToSend" , docs : "Failed to send XCM message." }) , (12u8 , 1u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadXcmOrigin" , docs : "Bad XCM origin." }) , (12u8 , 2u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadXcm" , docs : "Bad XCM data." }) , (12u8 , 3u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadOverweightIndex" , docs : "Bad overweight index." }) , (12u8 , 4u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "WeightOverLimit" , docs : "Provided weight is possibly not enough to execute the message." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Unreachable" , docs : "The desired destination was unreachable, generally because there is a no way of routing\nto it." }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "SendFailure" , docs : "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps\na lack of space for buffering the message." }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Filtered" , docs : "The message execution fails the filter." }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "UnweighableMessage" , docs : "The message's weight could not be determined." }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "DestinationNotInvertible" , docs : "The destination `MultiLocation` provided cannot be inverted." }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Empty" , docs : "The assets to be sent are empty." }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "CannotReanchor" , docs : "Could not re-anchor the assets to declare the fees for the destination chain." }) , (13u8 , 7u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "TooManyAssets" , docs : "Too many assets have been attempted for transfer." }) , (13u8 , 8u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "InvalidOrigin" , docs : "Origin is invalid for sending." }) , (13u8 , 9u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "BadVersion" , docs : "The version of the `Versioned` value used is not able to be interpreted." }) , (13u8 , 10u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "BadLocation" , docs : "The given location could not be used (e.g. because it cannot be expressed in the\ndesired version of XCM)." }) , (13u8 , 11u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "NoSubscription" , docs : "The referenced subscription could not be found." }) , (13u8 , 12u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "AlreadySubscribed" , docs : "The location is invalid since it already has a subscription from us." }) , (15u8 , 0u8) => Some (ErrorDetails { pallet : "DmpQueue" , error : "Unknown" , docs : "The message index given is unknown." }) , (15u8 , 1u8) => Some (ErrorDetails { pallet : "DmpQueue" , error : "OverLimit" , docs : "The amount of weight given is possibly not enough for executing the message." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (17u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (17u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (17u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (17u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (18u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (18u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (18u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (18u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (18u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (18u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (20u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (20u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (20u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (20u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (20u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (20u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (20u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (20u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (20u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (20u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (21u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (21u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (21u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (21u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (21u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (21u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (21u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (21u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (21u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (21u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (21u8 , 10u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (21u8 , 11u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (23u8 , 1u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (23u8 , 2u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (23u8 , 3u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (23u8 , 4u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (23u8 , 5u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , _ => None } + if let Self::Module(runtime_types::sp_runtime::ModuleError { index, error }) = self { + match (index , error[0]) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (1u8 , 0u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "OverlappingUpgrades" , docs : "Attempt to upgrade validation function while existing upgrade pending" }) , (1u8 , 1u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "ProhibitedByPolkadot" , docs : "Polkadot currently prohibits this parachain from upgrading its validation function" }) , (1u8 , 2u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "TooBig" , docs : "The supplied validation function has compiled into a blob larger than Polkadot is\nwilling to run" }) , (1u8 , 3u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "ValidationDataNotAvailable" , docs : "The inherent which supplies the validation data did not run this block" }) , (1u8 , 4u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "HostConfigurationNotAvailable" , docs : "The inherent which supplies the host configuration did not run this block" }) , (1u8 , 5u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "NotScheduled" , docs : "No validation function upgrade is currently scheduled." }) , (1u8 , 6u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "NothingAuthorized" , docs : "No code upgrade has been authorized." }) , (1u8 , 7u8) => Some (ErrorDetails { pallet : "ParachainSystem" , error : "Unauthorized" , docs : "The given code upgrade has not been authorized." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value" }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal" }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value" }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit" }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account" }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account" }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist" }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "TooManyCandidates" , docs : "Too many candidates" }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "TooFewCandidates" , docs : "Too few candidates" }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "Unknown" , docs : "Unknown error" }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "Permission" , docs : "Permission issue" }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "AlreadyCandidate" , docs : "User is already a candidate" }) , (8u8 , 5u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "NotCandidate" , docs : "User is not a candidate" }) , (8u8 , 6u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "AlreadyInvulnerable" , docs : "User is already an Invulnerable" }) , (8u8 , 7u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "NoAssociatedValidatorId" , docs : "Account has no associated validator ID" }) , (8u8 , 8u8) => Some (ErrorDetails { pallet : "CollatorSelection" , error : "ValidatorNotRegistered" , docs : "Validator ID is not yet registered" }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (12u8 , 0u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "FailedToSend" , docs : "Failed to send XCM message." }) , (12u8 , 1u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadXcmOrigin" , docs : "Bad XCM origin." }) , (12u8 , 2u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadXcm" , docs : "Bad XCM data." }) , (12u8 , 3u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "BadOverweightIndex" , docs : "Bad overweight index." }) , (12u8 , 4u8) => Some (ErrorDetails { pallet : "XcmpQueue" , error : "WeightOverLimit" , docs : "Provided weight is possibly not enough to execute the message." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Unreachable" , docs : "The desired destination was unreachable, generally because there is a no way of routing\nto it." }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "SendFailure" , docs : "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps\na lack of space for buffering the message." }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Filtered" , docs : "The message execution fails the filter." }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "UnweighableMessage" , docs : "The message's weight could not be determined." }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "DestinationNotInvertible" , docs : "The destination `MultiLocation` provided cannot be inverted." }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "Empty" , docs : "The assets to be sent are empty." }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "CannotReanchor" , docs : "Could not re-anchor the assets to declare the fees for the destination chain." }) , (13u8 , 7u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "TooManyAssets" , docs : "Too many assets have been attempted for transfer." }) , (13u8 , 8u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "InvalidOrigin" , docs : "Origin is invalid for sending." }) , (13u8 , 9u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "BadVersion" , docs : "The version of the `Versioned` value used is not able to be interpreted." }) , (13u8 , 10u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "BadLocation" , docs : "The given location could not be used (e.g. because it cannot be expressed in the\ndesired version of XCM)." }) , (13u8 , 11u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "NoSubscription" , docs : "The referenced subscription could not be found." }) , (13u8 , 12u8) => Some (ErrorDetails { pallet : "PolkadotXcm" , error : "AlreadySubscribed" , docs : "The location is invalid since it already has a subscription from us." }) , (15u8 , 0u8) => Some (ErrorDetails { pallet : "DmpQueue" , error : "Unknown" , docs : "The message index given is unknown." }) , (15u8 , 1u8) => Some (ErrorDetails { pallet : "DmpQueue" , error : "OverLimit" , docs : "The amount of weight given is possibly not enough for executing the message." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (17u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (17u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (17u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (17u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (18u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (18u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (18u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (18u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (18u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (18u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (20u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (20u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (20u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (20u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (20u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (20u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (20u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (20u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (20u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (20u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (21u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (21u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (21u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (21u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (21u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (21u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (21u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (21u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (21u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (21u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (21u8 , 10u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (21u8 , 11u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (23u8 , 1u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (23u8 , 2u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (23u8 , 3u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "CollateralTooLow" , docs : "Locked collateral is too low to cover one order." }) , (23u8 , 4u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (23u8 , 5u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (23u8 , 6u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , (24u8 , 0u8) => Some (ErrorDetails { pallet : "FromPangolinIssuing" , error : "RingDailyLimited" , docs : "Redeem Daily Limited" }) , (24u8 , 1u8) => Some (ErrorDetails { pallet : "FromPangolinIssuing" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (24u8 , 2u8) => Some (ErrorDetails { pallet : "FromPangolinIssuing" , error : "NonceDuplicated" , docs : "Message nonce duplicated." }) , (24u8 , 3u8) => Some (ErrorDetails { pallet : "FromPangolinIssuing" , error : "BackingAccountNone" , docs : "Backing not configured" }) , (24u8 , 4u8) => Some (ErrorDetails { pallet : "FromPangolinIssuing" , error : "ValueOverFlow" , docs : "Issue value overflow" }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "RemoteGovernment" , error : "RequireSourceRoot" , docs : "Origin MUST be `SourceRoot`." }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "RemoteGovernment" , error : "EmergencyOnly" , docs : "Only available on emergency mode." }) , _ => None } } else { None } @@ -10779,8 +11663,11 @@ pub mod api { ) -> bridge_pangolin_messages::constants::ConstantsApi { bridge_pangolin_messages::constants::ConstantsApi } - pub fn fee_market(&self) -> fee_market::constants::ConstantsApi { - fee_market::constants::ConstantsApi + pub fn pangolin_fee_market(&self) -> pangolin_fee_market::constants::ConstantsApi { + pangolin_fee_market::constants::ConstantsApi + } + pub fn from_pangolin_issuing(&self) -> from_pangolin_issuing::constants::ConstantsApi { + from_pangolin_issuing::constants::ConstantsApi } } pub struct StorageApi<'a, T: ::subxt::Config> { @@ -10851,8 +11738,14 @@ pub mod api { ) -> bridge_pangolin_messages::storage::StorageApi<'a, T> { bridge_pangolin_messages::storage::StorageApi::new(self.client) } - pub fn fee_market(&self) -> fee_market::storage::StorageApi<'a, T> { - fee_market::storage::StorageApi::new(self.client) + pub fn pangolin_fee_market(&self) -> pangolin_fee_market::storage::StorageApi<'a, T> { + pangolin_fee_market::storage::StorageApi::new(self.client) + } + pub fn from_pangolin_issuing(&self) -> from_pangolin_issuing::storage::StorageApi<'a, T> { + from_pangolin_issuing::storage::StorageApi::new(self.client) + } + pub fn remote_government(&self) -> remote_government::storage::StorageApi<'a, T> { + remote_government::storage::StorageApi::new(self.client) } } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { @@ -10917,8 +11810,18 @@ pub mod api { ) -> bridge_pangolin_messages::calls::TransactionApi<'a, T, X, A> { bridge_pangolin_messages::calls::TransactionApi::new(self.client) } - pub fn fee_market(&self) -> fee_market::calls::TransactionApi<'a, T, X, A> { - fee_market::calls::TransactionApi::new(self.client) + pub fn pangolin_fee_market( + &self, + ) -> pangolin_fee_market::calls::TransactionApi<'a, T, X, A> { + pangolin_fee_market::calls::TransactionApi::new(self.client) + } + pub fn from_pangolin_issuing( + &self, + ) -> from_pangolin_issuing::calls::TransactionApi<'a, T, X, A> { + from_pangolin_issuing::calls::TransactionApi::new(self.client) + } + pub fn remote_government(&self) -> remote_government::calls::TransactionApi<'a, T, X, A> { + remote_government::calls::TransactionApi::new(self.client) } } } diff --git a/frame/assistants/client-pangolin-parachain/src/types/account.rs b/frame/assistants/client-pangolin-parachain/src/types/account.rs index 0f6b75b7f..ea0253468 100644 --- a/frame/assistants/client-pangolin-parachain/src/types/account.rs +++ b/frame/assistants/client-pangolin-parachain/src/types/account.rs @@ -45,7 +45,8 @@ impl DarwiniaAccount { let account_id = AccountId::from(public); // real account, convert to account id - let real = real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real))); + let real = + real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real.as_ref()))); Ok(Self { account_id, diff --git a/frame/assistants/client-pangolin/Cargo.toml b/frame/assistants/client-pangolin/Cargo.toml index 998e62507..99ea8927b 100644 --- a/frame/assistants/client-pangolin/Cargo.toml +++ b/frame/assistants/client-pangolin/Cargo.toml @@ -17,20 +17,19 @@ thiserror = "1" tracing = "0.1" serde = { version = "1", features = ["derive"] } -serde_json = "1" -array-bytes = "1.4" +array-bytes = "2" codec = { package = "parity-scale-codec", version = "2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } -bp-pangolin = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } +subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } +bp-pangolin = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } ## maybe common async-trait = { optional = true, version = "0.1" } ## substrate -sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } +sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } ## eth-v1 web3 = { optional = true, git = "https://github.com/wuminzhe/rust-web3.git", branch = "master", features = ["signing"] } @@ -39,15 +38,16 @@ shadow-liketh = { optional = true, path = "../shadow-liketh" } ## s2s client finality-grandpa = { optional = true, version = "0.14" } -abstract-bridge-s2s = { optional = true, path = "../../../frame/abstract/bridge-s2s", features = ["advanced-types"] } +bridge-s2s-traits = { optional = true, path = "../../../frame/traits/bridge-s2s", features = ["advanced-types"] } ## feemarket s2s -abstract-feemarket-s2s = { optional = true, path = "../../../frame/abstract/feemarket-s2s", features = ["advanced-types"] } +feemarket-s2s-traits = { optional = true, path = "../../../frame/traits/feemarket-s2s", features = ["advanced-types"] } support-toolkit = { path = "../../../frame/supports/support-toolkit", features = ["convert"] } [dev-dependencies] -tokio = { version = "1", features = ["full"] } +tokio = { version = "1", features = ["full"] } +serde_json = "1" [features] default = [] @@ -61,11 +61,14 @@ bridge-s2s = [ "substrate", "async-trait", "finality-grandpa", - "abstract-bridge-s2s", + "bridge-s2s-traits", ] bridge-s2s-pangoro = ["bridge-s2s"] +bridge-s2s-pangolin-parachain = ["bridge-s2s", "bridge-s2s-traits/bridge-parachain"] + feemarket-s2s = [ "async-trait", - "abstract-feemarket-s2s", + "feemarket-s2s-traits", ] feemarket-s2s-pangoro = ["feemarket-s2s"] +feemarket-s2s-pangolin-parachain = ["feemarket-s2s"] diff --git a/frame/assistants/client-pangolin/src/error.rs b/frame/assistants/client-pangolin/src/error.rs index 05ee5385e..5efaf7a43 100644 --- a/frame/assistants/client-pangolin/src/error.rs +++ b/frame/assistants/client-pangolin/src/error.rs @@ -32,11 +32,6 @@ pub enum ClientError { #[error("Io error: {0}")] Io(#[from] std::io::Error), - // #[error("Rpc error: {0}")] - // Rpc(#[from] jsonrpsee_types::error::Error), - #[error("Serde json error: {0}")] - Serialization(#[from] serde_json::error::Error), - #[cfg(feature = "ethlike-v1")] #[error("Failed to build SecretKey from authority's private key")] FailedToBuildSecretKey(#[from] secp256k1::Error), @@ -102,7 +97,7 @@ impl From for ClientError { } #[cfg(feature = "bridge-s2s")] -impl From for abstract_bridge_s2s::error::S2SClientError { +impl From for bridge_s2s_traits::error::S2SClientError { fn from(error: ClientError) -> Self { match error { ClientError::SubxtBasicError(e) => Self::RPC(format!("{:?}", e)), diff --git a/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/bridge_pangolinparachain.rs b/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/bridge_pangolinparachain.rs new file mode 100644 index 000000000..db7d3a5ef --- /dev/null +++ b/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/bridge_pangolinparachain.rs @@ -0,0 +1,253 @@ +use std::ops::RangeInclusive; + +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay, S2SParaBridgeClientSolochain}; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::types::{ + bp_header_chain, bp_messages, bp_runtime::Chain, bridge_runtime_common, +}; +use sp_runtime::AccountId32; +use subxt::sp_core::storage::StorageKey; +use subxt::storage::StorageKeyPrefix; +use subxt::StorageEntry; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::PangolinClient; +use crate::error::ClientError; +use crate::subxt_runtime::api::bridge_pangolin_parachain_messages::storage::{ + InboundLanes, OutboundLanes, OutboundMessages, +}; + +type BundleMessageKey = crate::types::runtime_types::bp_messages::MessageKey; + +/// Message payload for This -> Bridged chain messages. +type FromThisChainMessagePayload = crate::types::runtime_types::bp_message_dispatch::MessagePayload< + sp_core::crypto::AccountId32, + crate::types::runtime_types::sp_runtime::MultiSigner, + crate::types::runtime_types::sp_runtime::MultiSignature, + Vec, +>; + +#[async_trait::async_trait] +impl S2SClientRelay for PangolinClient { + fn gen_outbound_messages_storage_key(&self, lane: [u8; 4], message_nonce: u64) -> StorageKey { + let prefix = StorageKeyPrefix::new::(); + OutboundMessages(BundleMessageKey { + lane_id: lane, + nonce: message_nonce, + }) + .key() + .final_key(prefix) + } + + fn gen_outbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + OutboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + fn gen_inbound_lanes_storage_key(&self, lane: [u8; 4]) -> StorageKey { + InboundLanes(lane) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + async fn calculate_dispatch_weight( + &self, + lane: [u8; 4], + nonces: RangeInclusive, + ) -> S2SClientResult { + let mut total_weight = 0u64; + for message_nonce in nonces { + let message_data = self + .outbound_messages( + bp_messages::MessageKey { + lane_id: lane, + nonce: message_nonce, + }, + None, + ) + .await? + .ok_or_else(|| { + ClientError::Custom(format!( + "Can not read message data by nonce {} in pangolin", + message_nonce + )) + })?; + let decoded_payload: FromThisChainMessagePayload = + codec::Decode::decode(&mut &message_data.payload[..])?; + total_weight += decoded_payload.weight; + } + Ok(total_weight) + } + + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { + Ok(self + .runtime() + .storage() + .bridge_rococo_grandpa() + .best_finalized(at_block) + .await?) + } + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash> { + let hash = self + .runtime() + .tx() + .bridge_rococo_grandpa() + .initialize(initialization_data) + .sign_and_submit(self.account().signer()) + .await?; + Ok(hash) + } + + async fn submit_finality_proof( + &self, + finality_target: ::Header, + justification: bp_header_chain::justification::GrandpaJustification< + ::Header, + >, + ) -> S2SClientResult<::Hash> { + let expected_target = SmartCodecMapper::map_to(&finality_target)?; + let expected_justification = SmartCodecMapper::map_to(&justification)?; + Ok(self + .runtime() + .tx() + .bridge_rococo_grandpa() + .submit_finality_proof(expected_target, expected_justification) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn outbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult { + let outbound_lane_data = self + .runtime() + .storage() + .bridge_pangolin_parachain_messages() + .outbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&outbound_lane_data)?; + Ok(expected) + } + + async fn inbound_lanes( + &self, + lane: [u8; 4], + hash: Option<::Hash>, + ) -> S2SClientResult> { + let inbound_lane_data = self + .runtime() + .storage() + .bridge_pangolin_parachain_messages() + .inbound_lanes(lane, hash) + .await?; + let expected = SmartCodecMapper::map_to(&inbound_lane_data)?; + Ok(expected) + } + + async fn outbound_messages( + &self, + message_key: bp_messages::MessageKey, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let expected_message_key = SmartCodecMapper::map_to(&message_key)?; + match self + .runtime() + .storage() + .bridge_pangolin_parachain_messages() + .outbound_messages(expected_message_key, hash) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn receive_messages_proof( + &self, + relayer_id_at_bridged_chain: AccountId32, + proof: bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< + ::Hash, + >, + messages_count: u32, + dispatch_weight: u64, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + Ok(self + .runtime() + .tx() + .bridge_pangolin_parachain_messages() + .receive_messages_proof( + relayer_id_at_bridged_chain, + expected_proof, + messages_count, + dispatch_weight, + ) + .sign_and_submit(self.account().signer()) + .await?) + } + + async fn receive_messages_delivery_proof( + &self, + proof: bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< + ::Hash, + >, + relayers_state: bp_messages::UnrewardedRelayersState, + ) -> S2SClientResult<::Hash> { + let expected_proof = SmartCodecMapper::map_to(&proof)?; + let expected_relayers_state = SmartCodecMapper::map_to(&relayers_state)?; + Ok(self + .runtime() + .tx() + .bridge_pangolin_parachain_messages() + .receive_messages_delivery_proof(expected_proof, expected_relayers_state) + .sign_and_submit(self.account().signer()) + .await?) + } +} + +#[async_trait::async_trait] +impl S2SParaBridgeClientSolochain for PangolinClient { + async fn best_para_heads( + &self, + para_id: bridge_s2s_traits::types::ParaId, + hash: Option<::Hash>, + ) -> S2SClientResult> { + let expected_para_id = SmartCodecMapper::map_to(¶_id)?; + match self + .runtime() + .storage() + .bridge_rococo_parachains() + .best_para_heads(expected_para_id, hash) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn submit_parachain_heads( + &self, + relay_block_hash: ::Hash, + parachains: Vec, + parachain_heads_proof: Vec>, + ) -> S2SClientResult<::Hash> { + let expected_parachains = SmartCodecMapper::map_to(¶chains)?; + Ok(self + .runtime() + .tx() + .bridge_rococo_parachains() + .submit_parachain_heads(relay_block_hash, expected_parachains, parachain_heads_proof) + .sign_and_submit(self.account().signer()) + .await?) + } +} diff --git a/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/bridge_pangoro.rs b/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/bridge_pangoro.rs index d29876cf2..bf259bf63 100644 --- a/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/bridge_pangoro.rs +++ b/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/bridge_pangoro.rs @@ -1,16 +1,16 @@ use std::ops::RangeInclusive; -use abstract_bridge_s2s::error::S2SClientResult; -use abstract_bridge_s2s::{ +use bridge_s2s_traits::client::S2SClientGeneric; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::{ client::S2SClientRelay, - config::Config, - types::{bp_header_chain, bp_messages, bridge_runtime_common}, + types::{bp_header_chain, bp_messages, bp_runtime::Chain, bridge_runtime_common}, }; -use sp_runtime::generic::{Block, SignedBlock}; use sp_runtime::AccountId32; use subxt::sp_core::storage::StorageKey; use subxt::storage::StorageKeyPrefix; use subxt::StorageEntry; + use support_toolkit::convert::SmartCodecMapper; use crate::client::PangolinClient; @@ -82,29 +82,10 @@ impl S2SClientRelay for PangolinClient { Ok(total_weight) } - async fn header( - &self, - hash: Option<::Hash>, - ) -> S2SClientResult::Header>> { - match self.subxt().rpc().header(hash).await? { - Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), - None => Ok(None), - } - } - - async fn block( - &self, - hash: Option<::Hash>, - ) -> S2SClientResult< - Option::Header, Self::Extrinsic>>>, - > { - Ok(self.subxt().rpc().block(hash).await?) - } - async fn best_target_finalized( &self, - at_block: Option<::Hash>, - ) -> S2SClientResult<::Hash> { + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { Ok(self .runtime() .storage() @@ -113,13 +94,27 @@ impl S2SClientRelay for PangolinClient { .await?) } + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash> { + let hash = self + .runtime() + .tx() + .bridge_pangoro_grandpa() + .initialize(initialization_data) + .sign_and_submit(self.account().signer()) + .await?; + Ok(hash) + } + async fn submit_finality_proof( &self, - finality_target: ::Header, + finality_target: ::Header, justification: bp_header_chain::justification::GrandpaJustification< - ::Header, + ::Header, >, - ) -> S2SClientResult<::Hash> { + ) -> S2SClientResult<::Hash> { let expected_target = SmartCodecMapper::map_to(&finality_target)?; let expected_justification = SmartCodecMapper::map_to(&justification)?; Ok(self @@ -134,7 +129,7 @@ impl S2SClientRelay for PangolinClient { async fn outbound_lanes( &self, lane: [u8; 4], - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult { let outbound_lane_data = self .runtime() @@ -149,7 +144,7 @@ impl S2SClientRelay for PangolinClient { async fn inbound_lanes( &self, lane: [u8; 4], - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult> { let inbound_lane_data = self .runtime() @@ -164,7 +159,7 @@ impl S2SClientRelay for PangolinClient { async fn outbound_messages( &self, message_key: bp_messages::MessageKey, - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult>> { let expected_message_key = SmartCodecMapper::map_to(&message_key)?; match self @@ -179,25 +174,15 @@ impl S2SClientRelay for PangolinClient { } } - async fn read_proof( - &self, - storage_keys: Vec, - hash: Option<::Hash>, - ) -> S2SClientResult>> { - let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; - let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); - Ok(proof) - } - async fn receive_messages_proof( &self, relayer_id_at_bridged_chain: AccountId32, proof: bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< - ::Hash, + ::Hash, >, messages_count: u32, dispatch_weight: u64, - ) -> S2SClientResult<::Hash> { + ) -> S2SClientResult<::Hash> { let expected_proof = SmartCodecMapper::map_to(&proof)?; Ok(self .runtime() @@ -216,10 +201,10 @@ impl S2SClientRelay for PangolinClient { async fn receive_messages_delivery_proof( &self, proof: bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< - ::Hash, + ::Hash, >, relayers_state: bp_messages::UnrewardedRelayersState, - ) -> S2SClientResult<::Hash> { + ) -> S2SClientResult<::Hash> { let expected_proof = SmartCodecMapper::map_to(&proof)?; let expected_relayers_state = SmartCodecMapper::map_to(&relayers_state)?; Ok(self diff --git a/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/generic.rs b/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/generic.rs index 8bf35d0fd..4ba0ae712 100644 --- a/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/generic.rs +++ b/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/generic.rs @@ -1,14 +1,16 @@ -use abstract_bridge_s2s::config::Config; -use abstract_bridge_s2s::error::{S2SClientError, S2SClientResult}; -use abstract_bridge_s2s::{ +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::{ client::{S2SClientBase, S2SClientGeneric}, types::bp_header_chain, + types::bp_runtime::Chain, }; use finality_grandpa::voter_set::VoterSet; use sp_finality_grandpa::{AuthorityList, ConsensusLog, ScheduledChange}; +use sp_runtime::generic::{Block, SignedBlock}; use sp_runtime::{ConsensusEngineId, DigestItem}; use subxt::rpc::{ClientT, Subscription, SubscriptionClientT}; use subxt::{sp_core, sp_runtime}; +use support_toolkit::convert::SmartCodecMapper; use crate::client::PangolinClient; use crate::error::{ClientError, ClientResult}; @@ -35,7 +37,7 @@ impl PangolinClient { .client .request("state_call", params) .await?; - let raw_authorities_set = array_bytes::hex2bytes(hex)?; + let raw_authorities_set = array_bytes::hex2bytes(hex.as_ref())?; let authorities = codec::Decode::decode(&mut &raw_authorities_set[..]).map_err(|err| { ClientError::Custom(format!( "[DecodeAuthorities] Can not decode authorities: {:?}", @@ -81,7 +83,7 @@ impl PangolinClient { impl S2SClientBase for PangolinClient { const CHAIN: &'static str = "pangolin"; - type Config = bp_pangolin::Pangolin; + type Chain = bp_pangolin::Pangolin; type Extrinsic = sp_runtime::OpaqueExtrinsic; } @@ -104,6 +106,34 @@ impl S2SClientGeneric for PangolinClient { .await?) } + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>> { + match self.subxt().rpc().header(hash).await? { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn block( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>> + { + Ok(self.subxt().rpc().block(hash).await?) + } + + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; + let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); + Ok(proof) + } + async fn prepare_initialization_data(&self) -> S2SClientResult { let mut subscription = self.subscribe_grandpa_justifications().await?; let justification = subscription @@ -220,18 +250,4 @@ impl S2SClientGeneric for PangolinClient { S2SClientError::Custom(format!("Failed to decode initialization data: {:?}", e)) })?) } - - async fn initialize( - &self, - initialization_data: Self::InitializationData, - ) -> S2SClientResult<::Hash> { - let hash = self - .runtime() - .tx() - .bridge_pangoro_grandpa() - .initialize(initialization_data) - .sign_and_submit(self.account().signer()) - .await?; - Ok(hash) - } } diff --git a/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/mod.rs b/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/mod.rs index d2c0fe244..1e53df908 100644 --- a/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/mod.rs +++ b/frame/assistants/client-pangolin/src/fastapi/bridge_s2s/mod.rs @@ -1,3 +1,5 @@ +#[cfg(feature = "bridge-s2s-pangolin-parachain")] +pub mod bridge_pangolinparachain; #[cfg(feature = "bridge-s2s-pangoro")] pub mod bridge_pangoro; pub mod generic; diff --git a/frame/assistants/client-pangolin/src/fastapi/ethereum.rs b/frame/assistants/client-pangolin/src/fastapi/ethereum.rs index d8e5221a9..baa7fe839 100644 --- a/frame/assistants/client-pangolin/src/fastapi/ethereum.rs +++ b/frame/assistants/client-pangolin/src/fastapi/ethereum.rs @@ -184,7 +184,7 @@ impl<'a> EthereumApi<'a> { let ethereum_tx_hash = proof .header .hash - .map(|hash| array_bytes::bytes2hex("", &hash)) + .map(|hash| array_bytes::bytes2hex("", hash.as_ref())) .ok_or(ClientError::NoHeaderHashInEthereumReceiptProofOfThing)?; let account = self.client.account(); let v = match account.real() { diff --git a/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/feemarket_pangolinparachain.rs b/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/feemarket_pangolinparachain.rs new file mode 100644 index 000000000..fa5ce26c7 --- /dev/null +++ b/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/feemarket_pangolinparachain.rs @@ -0,0 +1,34 @@ +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::error::AbstractFeemarketResult; +use feemarket_s2s_traits::types::{Chain, Order}; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::PangolinClient; + +#[async_trait::async_trait] +impl FeemarketApiRelay for PangolinClient { + async fn order( + &self, + laned_id: feemarket_s2s_traits::types::LaneId, + message_nonce: feemarket_s2s_traits::types::MessageNonce, + ) -> AbstractFeemarketResult< + Option< + Order< + ::AccountId, + ::BlockNumber, + ::Balance, + >, + >, + > { + match self + .runtime() + .storage() + .pangolin_parachain_fee_market() + .orders(laned_id, message_nonce, None) + .await? + { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } +} diff --git a/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/feemarket_pangoro.rs b/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/feemarket_pangoro.rs index fb8cfc8dd..0ca32ba89 100644 --- a/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/feemarket_pangoro.rs +++ b/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/feemarket_pangoro.rs @@ -1,6 +1,6 @@ -use abstract_feemarket_s2s::api::FeemarketApiRelay; -use abstract_feemarket_s2s::error::AbstractFeemarketResult; -use abstract_feemarket_s2s::types::{Chain, Order}; +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::error::AbstractFeemarketResult; +use feemarket_s2s_traits::types::{Chain, Order}; use support_toolkit::convert::SmartCodecMapper; use crate::client::PangolinClient; @@ -9,8 +9,8 @@ use crate::client::PangolinClient; impl FeemarketApiRelay for PangolinClient { async fn order( &self, - laned_id: abstract_feemarket_s2s::types::LaneId, - message_nonce: abstract_feemarket_s2s::types::MessageNonce, + laned_id: feemarket_s2s_traits::types::LaneId, + message_nonce: feemarket_s2s_traits::types::MessageNonce, ) -> AbstractFeemarketResult< Option< Order< @@ -23,7 +23,7 @@ impl FeemarketApiRelay for PangolinClient { match self .runtime() .storage() - .fee_market() + .pangoro_fee_market() .orders(laned_id, message_nonce, None) .await? { diff --git a/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/generic.rs b/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/generic.rs index c900b9693..901ac9e5e 100644 --- a/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/generic.rs +++ b/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/generic.rs @@ -1,6 +1,6 @@ -use abstract_feemarket_s2s::api::FeemarketApiBase; -use abstract_feemarket_s2s::error::{AbstractFeemarketError, AbstractFeemarketResult}; -use abstract_feemarket_s2s::types::Chain; +use feemarket_s2s_traits::api::FeemarketApiBase; +use feemarket_s2s_traits::error::{AbstractFeemarketError, AbstractFeemarketResult}; +use feemarket_s2s_traits::types::Chain; use crate::client::PangolinClient; diff --git a/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/mod.rs b/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/mod.rs index 9bd6c256f..d868a6af4 100644 --- a/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/mod.rs +++ b/frame/assistants/client-pangolin/src/fastapi/feemarket_s2s/mod.rs @@ -1,3 +1,5 @@ +#[cfg(feature = "feemarket-s2s-pangolin-parachain")] +pub mod feemarket_pangolinparachain; #[cfg(feature = "feemarket-s2s-pangoro")] pub mod feemarket_pangoro; pub mod generic; diff --git a/frame/assistants/client-pangolin/src/fastapi/generic.rs b/frame/assistants/client-pangolin/src/fastapi/generic.rs index 03751c54d..869daa757 100644 --- a/frame/assistants/client-pangolin/src/fastapi/generic.rs +++ b/frame/assistants/client-pangolin/src/fastapi/generic.rs @@ -106,22 +106,3 @@ impl PangolinClient { // Ok(()) // } } - -// todo: Remove it when all s2s bridge use relay-s2s -use subxt::rpc::{Subscription, SubscriptionClientT}; -impl PangolinClient { - pub async fn subscribe_grandpa_justifications( - &self, - ) -> ClientResult> { - Ok(self - .subxt() - .rpc() - .client - .subscribe( - "grandpa_subscribeJustifications", - None, - "grandpa_unsubscribeJustifications", - ) - .await?) - } -} diff --git a/frame/assistants/client-pangolin/src/helpers.rs b/frame/assistants/client-pangolin/src/helpers.rs index 54c141ee9..ae962ef82 100644 --- a/frame/assistants/client-pangolin/src/helpers.rs +++ b/frame/assistants/client-pangolin/src/helpers.rs @@ -73,7 +73,7 @@ mod ethlike_v1 { term, next_authorities .iter() - .map(|a| array_bytes::bytes2hex("", &a)) + .map(|a| array_bytes::bytes2hex("", a.as_ref())) .collect::>() .join(", ") ); diff --git a/frame/assistants/client-pangolin/src/lib.rs b/frame/assistants/client-pangolin/src/lib.rs index 09bc09668..d6009c626 100644 --- a/frame/assistants/client-pangolin/src/lib.rs +++ b/frame/assistants/client-pangolin/src/lib.rs @@ -2,7 +2,8 @@ pub mod client; pub mod component; pub mod config; pub mod error; -pub mod fastapi; pub mod helpers; -pub mod subxt_runtime; pub mod types; + +mod fastapi; +mod subxt_runtime; diff --git a/frame/assistants/client-pangolin/src/subxt_runtime/error.rs b/frame/assistants/client-pangolin/src/subxt_runtime/error.rs index 719b5a38f..c120f7073 100644 --- a/frame/assistants/client-pangolin/src/subxt_runtime/error.rs +++ b/frame/assistants/client-pangolin/src/subxt_runtime/error.rs @@ -3,7 +3,7 @@ use thiserror::Error as ThisError; /// Bridge ethereum error #[derive(ThisError, Debug)] pub enum ConvertTypeError { - #[error("Custom error: {0}")] + #[error("Custom: {0}")] Custom(String), #[error("Array bytes error: {0}")] diff --git a/frame/assistants/client-pangolin/src/subxt_runtime/patch.rs b/frame/assistants/client-pangolin/src/subxt_runtime/patch.rs index cb6473315..505cab7c8 100644 --- a/frame/assistants/client-pangolin/src/subxt_runtime/patch.rs +++ b/frame/assistants/client-pangolin/src/subxt_runtime/patch.rs @@ -36,7 +36,7 @@ impl<'de> Deserialize<'de> for EthereumReceiptProofThing { D: Deserializer<'de>, { let hex = String::deserialize(deserializer)?; - let bytes = array_bytes::hex2bytes(hex) + let bytes = array_bytes::hex2bytes(hex.as_ref()) .map_err(|_e| D::Error::custom("Wrong serialize bytes, can't convert to bytes"))?; let ret = codec::Decode::decode(&mut bytes.as_slice()) .map_err(|_e| D::Error::custom("Wrong serialize bytes, can't decode to struct."))?; @@ -61,7 +61,7 @@ impl<'de> Deserialize<'de> for EthereumRelayHeaderParcel { D: Deserializer<'de>, { let hex = String::deserialize(deserializer)?; - let bytes = array_bytes::hex2bytes(hex) + let bytes = array_bytes::hex2bytes(hex.as_ref()) .map_err(|_e| D::Error::custom("Wrong serialize bytes, can't convert to bytes"))?; let ret = codec::Decode::decode(&mut bytes.as_slice()) .map_err(|_e| D::Error::custom("Wrong serialize bytes, can't decode to struct."))?; diff --git a/frame/assistants/client-pangolin/src/subxt_runtime/runtime.rs b/frame/assistants/client-pangolin/src/subxt_runtime/runtime.rs index 79dd9c81e..155d35a70 100644 --- a/frame/assistants/client-pangolin/src/subxt_runtime/runtime.rs +++ b/frame/assistants/client-pangolin/src/subxt_runtime/runtime.rs @@ -40,8 +40,6 @@ pub mod api { Bounties(bounties::Event), #[codec(index = 23)] Sudo(sudo::Event), - #[codec(index = 24)] - Claims(claims::Event), #[codec(index = 25)] Vesting(vesting::Event), #[codec(index = 26)] @@ -76,12 +74,20 @@ pub mod api { BridgePangoroDispatch(bridge_pangoro_dispatch::Event), #[codec(index = 43)] BridgePangoroMessages(bridge_pangoro_messages::Event), + #[codec(index = 62)] + BridgePangolinParachainDispatch(bridge_pangolin_parachain_dispatch::Event), + #[codec(index = 63)] + BridgePangolinParachainMessages(bridge_pangolin_parachain_messages::Event), #[codec(index = 53)] - FeeMarket(fee_market::Event), + PangoroFeeMarket(pangoro_fee_market::Event), + #[codec(index = 64)] + PangolinParachainFeeMarket(pangolin_parachain_fee_market::Event), #[codec(index = 54)] TransactionPause(transaction_pause::Event), #[codec(index = 49)] Substrate2SubstrateIssuing(substrate2_substrate_issuing::Event), + #[codec(index = 65)] + ToPangolinParachainBacking(to_pangolin_parachain_backing::Event), } pub mod system { use super::runtime_types; @@ -779,29 +785,28 @@ pub mod api { &mut &[ 32u8, 80u8, 97u8, 110u8, 103u8, 111u8, 108u8, 105u8, 110u8, 32u8, 80u8, 97u8, 110u8, 103u8, 111u8, 108u8, 105u8, 110u8, 0u8, 0u8, 0u8, 0u8, - 166u8, 109u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 84u8, 223u8, 106u8, 203u8, + 226u8, 109u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 80u8, 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, 96u8, 155u8, 3u8, 0u8, 0u8, 0u8, 55u8, 227u8, 151u8, 252u8, 124u8, 145u8, 245u8, 228u8, 1u8, 0u8, 0u8, 0u8, 64u8, 254u8, 58u8, 212u8, 1u8, 248u8, 149u8, 154u8, 5u8, 0u8, 0u8, 0u8, 171u8, 60u8, 5u8, 114u8, 41u8, 31u8, 235u8, 139u8, 1u8, 0u8, 0u8, 0u8, 203u8, 202u8, 37u8, 227u8, 159u8, 20u8, 35u8, 135u8, 2u8, 0u8, 0u8, 0u8, 237u8, 153u8, 197u8, 172u8, 178u8, 94u8, 237u8, 245u8, 3u8, 0u8, 0u8, 0u8, - 73u8, 234u8, 175u8, 27u8, 84u8, 138u8, 12u8, 176u8, 1u8, 0u8, 0u8, 0u8, 104u8, 122u8, 212u8, 74u8, 211u8, 127u8, 3u8, 194u8, 1u8, 0u8, 0u8, 0u8, 188u8, 157u8, 137u8, 144u8, 79u8, 91u8, 146u8, 63u8, 1u8, 0u8, 0u8, 0u8, 210u8, 188u8, 152u8, 151u8, 238u8, 208u8, 143u8, 21u8, 3u8, 0u8, 0u8, 0u8, 247u8, 139u8, 39u8, 139u8, 229u8, 63u8, 69u8, 76u8, 2u8, 0u8, 0u8, 0u8, 55u8, 200u8, 187u8, 19u8, 80u8, 169u8, 162u8, 168u8, - 1u8, 0u8, 0u8, 0u8, 25u8, 154u8, 244u8, 135u8, 216u8, 77u8, 152u8, - 71u8, 1u8, 0u8, 0u8, 0u8, 24u8, 239u8, 88u8, 163u8, 182u8, 123u8, - 167u8, 112u8, 1u8, 0u8, 0u8, 0u8, 45u8, 6u8, 198u8, 53u8, 50u8, 185u8, - 56u8, 227u8, 1u8, 0u8, 0u8, 0u8, 88u8, 34u8, 17u8, 246u8, 91u8, 177u8, - 75u8, 137u8, 4u8, 0u8, 0u8, 0u8, 230u8, 91u8, 0u8, 228u8, 108u8, 237u8, - 208u8, 170u8, 2u8, 0u8, 0u8, 0u8, 189u8, 120u8, 37u8, 93u8, 79u8, - 238u8, 234u8, 31u8, 4u8, 0u8, 0u8, 0u8, 210u8, 173u8, 105u8, 227u8, - 231u8, 140u8, 231u8, 118u8, 1u8, 0u8, 0u8, 0u8, 168u8, 165u8, 144u8, - 75u8, 51u8, 245u8, 176u8, 103u8, 1u8, 0u8, 0u8, 0u8, 197u8, 69u8, - 229u8, 34u8, 98u8, 154u8, 213u8, 20u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 1u8, 0u8, 0u8, 0u8, 88u8, 34u8, 17u8, 246u8, 91u8, 177u8, 75u8, 137u8, + 4u8, 0u8, 0u8, 0u8, 230u8, 91u8, 0u8, 228u8, 108u8, 237u8, 208u8, + 170u8, 2u8, 0u8, 0u8, 0u8, 189u8, 120u8, 37u8, 93u8, 79u8, 238u8, + 234u8, 31u8, 4u8, 0u8, 0u8, 0u8, 210u8, 173u8, 105u8, 227u8, 231u8, + 140u8, 231u8, 118u8, 1u8, 0u8, 0u8, 0u8, 168u8, 165u8, 144u8, 75u8, + 51u8, 245u8, 176u8, 103u8, 1u8, 0u8, 0u8, 0u8, 197u8, 69u8, 229u8, + 34u8, 98u8, 154u8, 213u8, 20u8, 1u8, 0u8, 0u8, 0u8, 49u8, 193u8, 201u8, + 166u8, 223u8, 228u8, 75u8, 117u8, 1u8, 0u8, 0u8, 0u8, 60u8, 177u8, + 33u8, 10u8, 171u8, 77u8, 74u8, 172u8, 1u8, 0u8, 0u8, 0u8, 200u8, 128u8, + 105u8, 169u8, 84u8, 132u8, 148u8, 129u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, ][..], )?) @@ -1623,15 +1628,6 @@ pub mod api { const EVENT: &'static str = "BalanceSet"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Deposit( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); - impl ::subxt::Event for Deposit { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Deposit"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct Reserved( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -1660,6 +1656,33 @@ pub mod api { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "ReserveRepatriated"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Deposit( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Deposit { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Deposit"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Withdraw( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Withdraw { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Withdraw"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Slashed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Slashed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Slashed"; + } } pub mod storage { use super::runtime_types; @@ -1691,9 +1714,8 @@ pub mod api { const STORAGE: &'static str = "Locks"; type Value = runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< + runtime_types::darwinia_balances::pallet::BalanceLock< ::core::primitive::u128, - ::core::primitive::u32, >, >; fn key(&self) -> ::subxt::StorageEntryKey { @@ -1768,9 +1790,8 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< + runtime_types::darwinia_balances::pallet::BalanceLock< ::core::primitive::u128, - ::core::primitive::u32, >, >, ::subxt::BasicError, @@ -2072,15 +2093,6 @@ pub mod api { const EVENT: &'static str = "BalanceSet"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Deposit( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); - impl ::subxt::Event for Deposit { - const PALLET: &'static str = "Kton"; - const EVENT: &'static str = "Deposit"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct Reserved( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -2109,6 +2121,33 @@ pub mod api { const PALLET: &'static str = "Kton"; const EVENT: &'static str = "ReserveRepatriated"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Deposit( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Deposit { + const PALLET: &'static str = "Kton"; + const EVENT: &'static str = "Deposit"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Withdraw( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Withdraw { + const PALLET: &'static str = "Kton"; + const EVENT: &'static str = "Withdraw"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Slashed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Slashed { + const PALLET: &'static str = "Kton"; + const EVENT: &'static str = "Slashed"; + } } pub mod storage { use super::runtime_types; @@ -2140,9 +2179,8 @@ pub mod api { const STORAGE: &'static str = "Locks"; type Value = runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< + runtime_types::darwinia_balances::pallet::BalanceLock< ::core::primitive::u128, - ::core::primitive::u32, >, >; fn key(&self) -> ::subxt::StorageEntryKey { @@ -2217,9 +2255,8 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< + runtime_types::darwinia_balances::pallet::BalanceLock< ::core::primitive::u128, - ::core::primitive::u32, >, >, ::subxt::BasicError, @@ -3130,6 +3167,20 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "unbond"; } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct withdraw_unbonded { + pub num_slashing_spans: ::core::primitive::u32, + } + impl ::subxt::Call for withdraw_unbonded { + const PALLET: &'static str = "Staking"; + const FUNCTION: &'static str = "withdraw_unbonded"; + } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct claim_mature_deposits; impl ::subxt::Call for claim_mature_deposits { @@ -3412,6 +3463,14 @@ pub mod api { let call = unbond { value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn withdraw_unbonded( + &self, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, withdraw_unbonded, DispatchError> + { + let call = withdraw_unbonded { num_slashing_spans }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } pub fn claim_mature_deposits( &self, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, claim_mature_deposits, DispatchError> @@ -4210,6 +4269,15 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } + pub struct OffendingValidators; + impl ::subxt::StorageEntry for OffendingValidators { + const PALLET: &'static str = "Staking"; + const STORAGE: &'static str = "OffendingValidators"; + type Value = ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } pub struct StorageVersion; impl ::subxt::StorageEntry for StorageVersion { const PALLET: &'static str = "Staking"; @@ -4808,6 +4876,16 @@ pub mod api { let entry = CurrentPlannedSession; self.client.storage().fetch_or_default(&entry, hash).await } + pub async fn offending_validators( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, + ::subxt::BasicError, + > { + let entry = OffendingValidators; + self.client.storage().fetch_or_default(&entry, hash).await + } pub async fn storage_version( &self, hash: ::core::option::Option, @@ -5691,197 +5769,6 @@ pub mod api { } } } - pub mod beefy_gadget { - use super::runtime_types; - pub mod calls { - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct set_commitment_contract { - pub commitment_contract: runtime_types::primitive_types::H160, - } - impl ::subxt::Call for set_commitment_contract { - const PALLET: &'static str = "BeefyGadget"; - const FUNCTION: &'static str = "set_commitment_contract"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(X, A)>, - } - impl<'a, T, X, A> TransactionApi<'a, T, X, A> - where - T: ::subxt::Config, - X: ::subxt::SignedExtra, - A: ::subxt::AccountData, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - pub fn set_commitment_contract( - &self, - commitment_contract: runtime_types::primitive_types::H160, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - set_commitment_contract, - DispatchError, - > { - let call = set_commitment_contract { - commitment_contract, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - } - } - pub mod storage { - use super::runtime_types; - pub struct CommitmentContract; - impl ::subxt::StorageEntry for CommitmentContract { - const PALLET: &'static str = "BeefyGadget"; - const STORAGE: &'static str = "CommitmentContract"; - type Value = runtime_types::primitive_types::H160; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - pub async fn commitment_contract( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result - { - let entry = CommitmentContract; - self.client.storage().fetch_or_default(&entry, hash).await - } - } - } - } - pub mod mmr { - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct RootHash; - impl ::subxt::StorageEntry for RootHash { - const PALLET: &'static str = "Mmr"; - const STORAGE: &'static str = "RootHash"; - type Value = ::subxt::sp_core::H256; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct NumberOfLeaves; - impl ::subxt::StorageEntry for NumberOfLeaves { - const PALLET: &'static str = "Mmr"; - const STORAGE: &'static str = "NumberOfLeaves"; - type Value = ::core::primitive::u64; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct Nodes(pub ::core::primitive::u64); - impl ::subxt::StorageEntry for Nodes { - const PALLET: &'static str = "Mmr"; - const STORAGE: &'static str = "Nodes"; - type Value = ::subxt::sp_core::H256; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - pub async fn root_hash( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::sp_core::H256, ::subxt::BasicError> - { - let entry = RootHash; - self.client.storage().fetch_or_default(&entry, hash).await - } - pub async fn number_of_leaves( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> - { - let entry = NumberOfLeaves; - self.client.storage().fetch_or_default(&entry, hash).await - } - pub async fn nodes( - &self, - _0: ::core::primitive::u64, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<::subxt::sp_core::H256>, - ::subxt::BasicError, - > { - let entry = Nodes(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn nodes_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Nodes>, ::subxt::BasicError> - { - self.client.storage().iter(hash).await - } - } - } - } - pub mod mmr_leaf { - use super::runtime_types; - pub mod storage { - use super::runtime_types; - pub struct BeefyNextAuthorities; - impl ::subxt::StorageEntry for BeefyNextAuthorities { - const PALLET: &'static str = "MmrLeaf"; - const STORAGE: &'static str = "BeefyNextAuthorities"; - type Value = runtime_types::beefy_primitives::mmr::BeefyNextAuthoritySet< - ::subxt::sp_core::H256, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - pub async fn beefy_next_authorities( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - runtime_types::beefy_primitives::mmr::BeefyNextAuthoritySet< - ::subxt::sp_core::H256, - >, - ::subxt::BasicError, - > { - let entry = BeefyNextAuthorities; - self.client.storage().fetch_or_default(&entry, hash).await - } - } - } - } pub mod im_online { use super::runtime_types; pub mod calls { @@ -6194,7 +6081,7 @@ pub mod api { #[codec(compact)] pub ref_index: ::core::primitive::u32, pub vote: - runtime_types::darwinia_democracy::vote::AccountVote<::core::primitive::u128>, + runtime_types::pallet_democracy::vote::AccountVote<::core::primitive::u128>, } impl ::subxt::Call for vote { const PALLET: &'static str = "Democracy"; @@ -6282,7 +6169,7 @@ pub mod api { #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct delegate { pub to: ::subxt::sp_core::crypto::AccountId32, - pub conviction: runtime_types::darwinia_democracy::conviction::Conviction, + pub conviction: runtime_types::pallet_democracy::conviction::Conviction, pub balance: ::core::primitive::u128, } impl ::subxt::Call for delegate { @@ -6444,7 +6331,7 @@ pub mod api { pub fn vote( &self, ref_index: ::core::primitive::u32, - vote: runtime_types::darwinia_democracy::vote::AccountVote< + vote: runtime_types::pallet_democracy::vote::AccountVote< ::core::primitive::u128, >, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, vote, DispatchError> @@ -6537,7 +6424,7 @@ pub mod api { pub fn delegate( &self, to: ::subxt::sp_core::crypto::AccountId32, - conviction: runtime_types::darwinia_democracy::conviction::Conviction, + conviction: runtime_types::pallet_democracy::conviction::Conviction, balance: ::core::primitive::u128, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, delegate, DispatchError> { @@ -6677,7 +6564,7 @@ pub mod api { } } } - pub type Event = runtime_types::darwinia_democracy::pallet::Event; + pub type Event = runtime_types::pallet_democracy::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -6705,7 +6592,7 @@ pub mod api { #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct Started( pub ::core::primitive::u32, - pub runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, + pub runtime_types::pallet_democracy::vote_threshold::VoteThreshold, ); impl ::subxt::Event for Started { const PALLET: &'static str = "Democracy"; @@ -6874,7 +6761,7 @@ pub mod api { impl ::subxt::StorageEntry for Preimages { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "Preimages"; - type Value = runtime_types::darwinia_democracy::PreimageStatus< + type Value = runtime_types::pallet_democracy::PreimageStatus< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ::core::primitive::u32, @@ -6908,7 +6795,7 @@ pub mod api { impl ::subxt::StorageEntry for ReferendumInfoOf { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "ReferendumInfoOf"; - type Value = runtime_types::darwinia_democracy::types::ReferendumInfo< + type Value = runtime_types::pallet_democracy::types::ReferendumInfo< ::core::primitive::u32, ::subxt::sp_core::H256, ::core::primitive::u128, @@ -6924,7 +6811,7 @@ pub mod api { impl ::subxt::StorageEntry for VotingOf { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "VotingOf"; - type Value = runtime_types::darwinia_democracy::vote::Voting< + type Value = runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, @@ -6963,7 +6850,7 @@ pub mod api { const STORAGE: &'static str = "NextExternal"; type Value = ( ::subxt::sp_core::H256, - runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, ); fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain @@ -7000,7 +6887,7 @@ pub mod api { impl ::subxt::StorageEntry for StorageVersion { const PALLET: &'static str = "Democracy"; const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::darwinia_democracy::Releases; + type Value = runtime_types::pallet_democracy::Releases; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -7061,7 +6948,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::darwinia_democracy::PreimageStatus< + runtime_types::pallet_democracy::PreimageStatus< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ::core::primitive::u32, @@ -7101,7 +6988,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::darwinia_democracy::types::ReferendumInfo< + runtime_types::pallet_democracy::types::ReferendumInfo< ::core::primitive::u32, ::subxt::sp_core::H256, ::core::primitive::u128, @@ -7126,7 +7013,7 @@ pub mod api { _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::darwinia_democracy::vote::Voting< + runtime_types::pallet_democracy::vote::Voting< ::core::primitive::u128, ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, @@ -7175,7 +7062,7 @@ pub mod api { ) -> ::core::result::Result< ::core::option::Option<( ::subxt::sp_core::H256, - runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, )>, ::subxt::BasicError, > { @@ -7225,7 +7112,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::core::option::Option, + ::core::option::Option, ::subxt::BasicError, > { let entry = StorageVersion; @@ -8146,7 +8033,7 @@ pub mod api { } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct renounce_candidacy { - pub renouncing: runtime_types::darwinia_elections_phragmen::Renouncing, + pub renouncing: runtime_types::pallet_elections_phragmen::Renouncing, } impl ::subxt::Call for renounce_candidacy { const PALLET: &'static str = "PhragmenElection"; @@ -8213,7 +8100,7 @@ pub mod api { } pub fn renounce_candidacy( &self, - renouncing: runtime_types::darwinia_elections_phragmen::Renouncing, + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, renounce_candidacy, DispatchError> { let call = renounce_candidacy { renouncing }; @@ -8248,7 +8135,7 @@ pub mod api { } } } - pub type Event = runtime_types::darwinia_elections_phragmen::pallet::Event; + pub type Event = runtime_types::pallet_elections_phragmen::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -8312,7 +8199,7 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const STORAGE: &'static str = "Members"; type Value = ::std::vec::Vec< - runtime_types::darwinia_elections_phragmen::SeatHolder< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8326,7 +8213,7 @@ pub mod api { const PALLET: &'static str = "PhragmenElection"; const STORAGE: &'static str = "RunnersUp"; type Value = ::std::vec::Vec< - runtime_types::darwinia_elections_phragmen::SeatHolder< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8360,7 +8247,7 @@ pub mod api { impl ::subxt::StorageEntry for Voting { const PALLET: &'static str = "PhragmenElection"; const STORAGE: &'static str = "Voting"; - type Value = runtime_types::darwinia_elections_phragmen::Voter< + type Value = runtime_types::pallet_elections_phragmen::Voter< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >; @@ -8383,7 +8270,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec< - runtime_types::darwinia_elections_phragmen::SeatHolder< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8398,7 +8285,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec< - runtime_types::darwinia_elections_phragmen::SeatHolder< + runtime_types::pallet_elections_phragmen::SeatHolder< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -8434,7 +8321,7 @@ pub mod api { _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::darwinia_elections_phragmen::Voter< + runtime_types::pallet_elections_phragmen::Voter< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -10321,232 +10208,31 @@ pub mod api { } } } - pub mod claims { + pub mod vesting { use super::runtime_types; pub mod calls { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct claim { - pub dest: ::subxt::sp_core::crypto::AccountId32, - pub signature: runtime_types::darwinia_claims::OtherSignature, - } - impl ::subxt::Call for claim { - const PALLET: &'static str = "Claims"; - const FUNCTION: &'static str = "claim"; + pub struct vest; + impl ::subxt::Call for vest { + const PALLET: &'static str = "Vesting"; + const FUNCTION: &'static str = "vest"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct mint_claim { - pub who: runtime_types::darwinia_claims::OtherAddress, - pub value: ::core::primitive::u128, + pub struct vest_other { + pub target: + ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, } - impl ::subxt::Call for mint_claim { - const PALLET: &'static str = "Claims"; - const FUNCTION: &'static str = "mint_claim"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct move_claim { - pub old: runtime_types::darwinia_claims::OtherAddress, - pub new: runtime_types::darwinia_claims::OtherAddress, - } - impl ::subxt::Call for move_claim { - const PALLET: &'static str = "Claims"; - const FUNCTION: &'static str = "move_claim"; - } - pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(X, A)>, - } - impl<'a, T, X, A> TransactionApi<'a, T, X, A> - where - T: ::subxt::Config, - X: ::subxt::SignedExtra, - A: ::subxt::AccountData, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - pub fn claim( - &self, - dest: ::subxt::sp_core::crypto::AccountId32, - signature: runtime_types::darwinia_claims::OtherSignature, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, claim, DispatchError> - { - let call = claim { dest, signature }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn mint_claim( - &self, - who: runtime_types::darwinia_claims::OtherAddress, - value: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, mint_claim, DispatchError> - { - let call = mint_claim { who, value }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn move_claim( - &self, - old: runtime_types::darwinia_claims::OtherAddress, - new: runtime_types::darwinia_claims::OtherAddress, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, move_claim, DispatchError> - { - let call = move_claim { old, new }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - } - } - pub type Event = runtime_types::darwinia_claims::RawEvent< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >; - pub mod events { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Claimed( - pub ::subxt::sp_core::crypto::AccountId32, - pub [::core::primitive::u8; 20usize], - pub ::core::primitive::u128, - ); - impl ::subxt::Event for Claimed { - const PALLET: &'static str = "Claims"; - const EVENT: &'static str = "Claimed"; - } - } - pub mod storage { - use super::runtime_types; - pub struct ClaimsFromEth(pub [::core::primitive::u8; 20usize]); - impl ::subxt::StorageEntry for ClaimsFromEth { - const PALLET: &'static str = "Claims"; - const STORAGE: &'static str = "ClaimsFromEth"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct ClaimsFromTron(pub [::core::primitive::u8; 20usize]); - impl ::subxt::StorageEntry for ClaimsFromTron { - const PALLET: &'static str = "Claims"; - const STORAGE: &'static str = "ClaimsFromTron"; - type Value = ::core::primitive::u128; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Identity, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - pub async fn claims_from_eth( - &self, - _0: [::core::primitive::u8; 20usize], - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - > { - let entry = ClaimsFromEth(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn claims_from_eth_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ClaimsFromEth>, - ::subxt::BasicError, - > { - self.client.storage().iter(hash).await - } - pub async fn claims_from_tron( - &self, - _0: [::core::primitive::u8; 20usize], - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, - ::subxt::BasicError, - > { - let entry = ClaimsFromTron(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn claims_from_tron_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, ClaimsFromTron>, - ::subxt::BasicError, - > { - self.client.storage().iter(hash).await - } - } - } - pub mod constants { - use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::core::result::Result< - runtime_types::frame_support::PalletId, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 97u8, 47u8, 99u8, 108u8, 97u8, 105u8, 109u8][..], - )?) - } - pub fn prefix( - &self, - ) -> ::core::result::Result< - ::std::vec::Vec<::core::primitive::u8>, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 140u8, 80u8, 97u8, 121u8, 32u8, 80u8, 82u8, 73u8, 78u8, 71u8, 115u8, - 32u8, 116u8, 111u8, 32u8, 116u8, 104u8, 101u8, 32u8, 80u8, 97u8, 110u8, - 103u8, 111u8, 108u8, 105u8, 110u8, 32u8, 97u8, 99u8, 99u8, 111u8, - 117u8, 110u8, 116u8, 58u8, - ][..], - )?) - } - } - } - } - pub mod vesting { - use super::runtime_types; - pub mod calls { - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct vest; - impl ::subxt::Call for vest { - const PALLET: &'static str = "Vesting"; - const FUNCTION: &'static str = "vest"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct vest_other { - pub target: - ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, - } - impl ::subxt::Call for vest_other { - const PALLET: &'static str = "Vesting"; - const FUNCTION: &'static str = "vest_other"; + impl ::subxt::Call for vest_other { + const PALLET: &'static str = "Vesting"; + const FUNCTION: &'static str = "vest_other"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct vested_transfer { pub target: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, - pub schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -10561,7 +10247,7 @@ pub mod api { ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, pub target: ::subxt::sp_runtime::MultiAddress<::subxt::sp_core::crypto::AccountId32, ()>, - pub schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< + pub schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -10619,7 +10305,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -10638,7 +10324,7 @@ pub mod api { ::subxt::sp_core::crypto::AccountId32, (), >, - schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -10665,7 +10351,7 @@ pub mod api { } } } - pub type Event = runtime_types::darwinia_vesting::pallet::Event; + pub type Event = runtime_types::pallet_vesting::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -10691,7 +10377,7 @@ pub mod api { const PALLET: &'static str = "Vesting"; const STORAGE: &'static str = "Vesting"; type Value = runtime_types::frame_support::storage::bounded_vec::BoundedVec< - runtime_types::darwinia_vesting::vesting_info::VestingInfo< + runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -10707,7 +10393,7 @@ pub mod api { impl ::subxt::StorageEntry for StorageVersion { const PALLET: &'static str = "Vesting"; const STORAGE: &'static str = "StorageVersion"; - type Value = runtime_types::darwinia_vesting::Releases; + type Value = runtime_types::pallet_vesting::Releases; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -10726,7 +10412,7 @@ pub mod api { ) -> ::core::result::Result< ::core::option::Option< runtime_types::frame_support::storage::bounded_vec::BoundedVec< - runtime_types::darwinia_vesting::vesting_info::VestingInfo< + runtime_types::pallet_vesting::vesting_info::VestingInfo< ::core::primitive::u128, ::core::primitive::u32, >, @@ -10748,7 +10434,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::darwinia_vesting::Releases, + runtime_types::pallet_vesting::Releases, ::subxt::BasicError, > { let entry = StorageVersion; @@ -10892,7 +10578,7 @@ pub mod api { ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode( - &mut &[157u8, 54u8, 0u8, 0u8][..], + &mut &[42u8, 55u8, 0u8, 0u8][..], )?) } } @@ -16601,6 +16287,14 @@ pub mod api { const FUNCTION: &'static str = "transact"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct message_transact { + pub transaction: runtime_types::ethereum::transaction::TransactionV2, + } + impl ::subxt::Call for message_transact { + const PALLET: &'static str = "Ethereum"; + const FUNCTION: &'static str = "message_transact"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct root_transact { pub target: runtime_types::primitive_types::H160, pub input: ::std::vec::Vec<::core::primitive::u8>, @@ -16633,6 +16327,14 @@ pub mod api { let call = transact { transaction }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn message_transact( + &self, + transaction: runtime_types::ethereum::transaction::TransactionV2, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, message_transact, DispatchError> + { + let call = message_transact { transaction }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } pub fn root_transact( &self, target: runtime_types::primitive_types::H160, @@ -17108,13 +16810,14 @@ pub mod api { const EVENT: &'static str = "MessageCallDecodeFailed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageCallRejected( + pub struct MessageCallValidateFailed( pub [::core::primitive::u8; 4usize], pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub runtime_types::sp_runtime::transaction_validity::TransactionValidityError, ); - impl ::subxt::Event for MessageCallRejected { + impl ::subxt::Event for MessageCallValidateFailed { const PALLET: &'static str = "BridgePangoroDispatch"; - const EVENT: &'static str = "MessageCallRejected"; + const EVENT: &'static str = "MessageCallValidateFailed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct MessageDispatchPaymentFailed( @@ -17512,7 +17215,7 @@ pub mod api { const FUNCTION: &'static str = "set_operating_mode"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct update_pallet_parameter { pub parameter : runtime_types :: pangolin_runtime :: bridges :: substrate :: pangoro_messages :: PangolinToPangoroMessagesParameter , } + pub struct update_pallet_parameter { pub parameter : runtime_types :: pangolin_runtime :: bridges_message :: pangoro :: PangolinToPangoroMessagesParameter , } impl ::subxt::Call for update_pallet_parameter { const PALLET: &'static str = "BridgePangoroMessages"; const FUNCTION: &'static str = "update_pallet_parameter"; @@ -17588,7 +17291,7 @@ pub mod api { } pub fn update_pallet_parameter( &self, - parameter : runtime_types :: pangolin_runtime :: bridges :: substrate :: pangoro_messages :: PangolinToPangoroMessagesParameter, + parameter : runtime_types :: pangolin_runtime :: bridges_message :: pangoro :: PangolinToPangoroMessagesParameter, ) -> ::subxt::SubmittableExtrinsic< 'a, T, @@ -17673,7 +17376,7 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ParameterUpdated (pub runtime_types :: pangolin_runtime :: bridges :: substrate :: pangoro_messages :: PangolinToPangoroMessagesParameter ,) ; + pub struct ParameterUpdated (pub runtime_types :: pangolin_runtime :: bridges_message :: pangoro :: PangolinToPangoroMessagesParameter ,) ; impl ::subxt::Event for ParameterUpdated { const PALLET: &'static str = "BridgePangoroMessages"; const EVENT: &'static str = "ParameterUpdated"; @@ -18391,11 +18094,7 @@ pub mod api { ) -> ::core::result::Result<::std::string::String, ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode( - &mut &[ - 96u8, 66u8, 114u8, 105u8, 100u8, 103u8, 101u8, 80u8, 97u8, 110u8, - 103u8, 111u8, 108u8, 105u8, 110u8, 80u8, 97u8, 114u8, 97u8, 99u8, - 104u8, 97u8, 105u8, 110u8, 115u8, - ][..], + &mut &[20u8, 80u8, 97u8, 114u8, 97u8, 115u8][..], )?) } pub fn heads_to_keep( @@ -18409,81 +18108,162 @@ pub mod api { } } } - pub mod fee_market { + pub mod bridge_pangolin_parachain_dispatch { use super::runtime_types; - pub mod calls { + pub type Event = runtime_types::pallet_bridge_dispatch::pallet::Event; + pub mod events { use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct enroll_and_lock_collateral { - pub lock_collateral: ::core::primitive::u128, - pub relay_fee: ::core::option::Option<::core::primitive::u128>, - } - impl ::subxt::Call for enroll_and_lock_collateral { - const PALLET: &'static str = "FeeMarket"; - const FUNCTION: &'static str = "enroll_and_lock_collateral"; - } - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct update_locked_collateral { - pub new_collateral: ::core::primitive::u128, + pub struct MessageRejected( + pub [::core::primitive::u8; 4usize], + pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ); + impl ::subxt::Event for MessageRejected { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "MessageRejected"; } - impl ::subxt::Call for update_locked_collateral { - const PALLET: &'static str = "FeeMarket"; - const FUNCTION: &'static str = "update_locked_collateral"; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessageVersionSpecMismatch( + pub [::core::primitive::u8; 4usize], + pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub ::core::primitive::u32, + pub ::core::primitive::u32, + ); + impl ::subxt::Event for MessageVersionSpecMismatch { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "MessageVersionSpecMismatch"; } - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct update_relay_fee { - pub new_fee: ::core::primitive::u128, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessageWeightMismatch( + pub [::core::primitive::u8; 4usize], + pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub ::core::primitive::u64, + pub ::core::primitive::u64, + ); + impl ::subxt::Event for MessageWeightMismatch { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "MessageWeightMismatch"; } - impl ::subxt::Call for update_relay_fee { - const PALLET: &'static str = "FeeMarket"; - const FUNCTION: &'static str = "update_relay_fee"; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessageSignatureMismatch( + pub [::core::primitive::u8; 4usize], + pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ); + impl ::subxt::Event for MessageSignatureMismatch { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "MessageSignatureMismatch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct cancel_enrollment; - impl ::subxt::Call for cancel_enrollment { - const PALLET: &'static str = "FeeMarket"; - const FUNCTION: &'static str = "cancel_enrollment"; + pub struct MessageCallDecodeFailed( + pub [::core::primitive::u8; 4usize], + pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ); + impl ::subxt::Event for MessageCallDecodeFailed { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "MessageCallDecodeFailed"; } - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct set_slash_protect { - pub slash_protect: ::core::primitive::u128, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessageCallValidateFailed( + pub [::core::primitive::u8; 4usize], + pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub runtime_types::sp_runtime::transaction_validity::TransactionValidityError, + ); + impl ::subxt::Event for MessageCallValidateFailed { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "MessageCallValidateFailed"; } - impl ::subxt::Call for set_slash_protect { - const PALLET: &'static str = "FeeMarket"; - const FUNCTION: &'static str = "set_slash_protect"; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessageDispatchPaymentFailed( + pub [::core::primitive::u8; 4usize], + pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u64, + ); + impl ::subxt::Event for MessageDispatchPaymentFailed { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "MessageDispatchPaymentFailed"; } - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct set_assigned_relayers_number { - pub number: ::core::primitive::u32, + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessageDispatched( + pub [::core::primitive::u8; 4usize], + pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ); + impl ::subxt::Event for MessageDispatched { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "MessageDispatched"; } - impl ::subxt::Call for set_assigned_relayers_number { - const PALLET: &'static str = "FeeMarket"; - const FUNCTION: &'static str = "set_assigned_relayers_number"; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct _Dummy; + impl ::subxt::Event for _Dummy { + const PALLET: &'static str = "BridgePangolinParachainDispatch"; + const EVENT: &'static str = "_Dummy"; + } + } + } + pub mod bridge_pangolin_parachain_messages { + use super::runtime_types; + pub mod calls { + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct set_owner { + pub new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + } + impl ::subxt::Call for set_owner { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const FUNCTION: &'static str = "set_owner"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct set_operating_mode { + pub operating_mode: runtime_types::bp_messages::OperatingMode, + } + impl ::subxt::Call for set_operating_mode { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const FUNCTION: &'static str = "set_operating_mode"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct update_pallet_parameter { pub parameter : runtime_types :: pangolin_runtime :: bridges_message :: pangolin_parachain :: PangolinToPangolinParachainParameter , } + impl ::subxt::Call for update_pallet_parameter { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const FUNCTION: &'static str = "update_pallet_parameter"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct send_message { + pub lane_id: [::core::primitive::u8; 4usize], + pub payload: runtime_types::bp_message_dispatch::MessagePayload< + ::subxt::sp_core::crypto::AccountId32, + runtime_types::sp_runtime::MultiSigner, + runtime_types::sp_runtime::MultiSignature, + ::std::vec::Vec<::core::primitive::u8>, + >, + pub delivery_and_dispatch_fee: ::core::primitive::u128, + } + impl ::subxt::Call for send_message { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const FUNCTION: &'static str = "send_message"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct increase_message_fee { + pub lane_id: [::core::primitive::u8; 4usize], + pub nonce: ::core::primitive::u64, + pub additional_fee: ::core::primitive::u128, + } + impl ::subxt::Call for increase_message_fee { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const FUNCTION: &'static str = "increase_message_fee"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct receive_messages_proof { pub relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , pub proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , pub messages_count : :: core :: primitive :: u32 , pub dispatch_weight : :: core :: primitive :: u64 , } + impl ::subxt::Call for receive_messages_proof { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const FUNCTION: &'static str = "receive_messages_proof"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct receive_messages_delivery_proof { pub proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , pub relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } + impl ::subxt::Call for receive_messages_delivery_proof { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const FUNCTION: &'static str = "receive_messages_delivery_proof"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { client: &'a ::subxt::Client, @@ -18501,202 +18281,159 @@ pub mod api { marker: ::core::marker::PhantomData, } } - pub fn enroll_and_lock_collateral( + pub fn set_owner( &self, - lock_collateral: ::core::primitive::u128, - relay_fee: ::core::option::Option<::core::primitive::u128>, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - enroll_and_lock_collateral, - DispatchError, - > { - let call = enroll_and_lock_collateral { - lock_collateral, - relay_fee, - }; + new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_owner, DispatchError> + { + let call = set_owner { new_owner }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn update_locked_collateral( + pub fn set_operating_mode( &self, - new_collateral: ::core::primitive::u128, + operating_mode: runtime_types::bp_messages::OperatingMode, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_operating_mode, DispatchError> + { + let call = set_operating_mode { operating_mode }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn update_pallet_parameter( + &self, + parameter : runtime_types :: pangolin_runtime :: bridges_message :: pangolin_parachain :: PangolinToPangolinParachainParameter, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - update_locked_collateral, + update_pallet_parameter, DispatchError, > { - let call = update_locked_collateral { new_collateral }; + let call = update_pallet_parameter { parameter }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn update_relay_fee( + pub fn send_message( &self, - new_fee: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, update_relay_fee, DispatchError> + lane_id: [::core::primitive::u8; 4usize], + payload: runtime_types::bp_message_dispatch::MessagePayload< + ::subxt::sp_core::crypto::AccountId32, + runtime_types::sp_runtime::MultiSigner, + runtime_types::sp_runtime::MultiSignature, + ::std::vec::Vec<::core::primitive::u8>, + >, + delivery_and_dispatch_fee: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, send_message, DispatchError> { - let call = update_relay_fee { new_fee }; + let call = send_message { + lane_id, + payload, + delivery_and_dispatch_fee, + }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn cancel_enrollment( + pub fn increase_message_fee( &self, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_enrollment, DispatchError> + lane_id: [::core::primitive::u8; 4usize], + nonce: ::core::primitive::u64, + additional_fee: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, increase_message_fee, DispatchError> { - let call = cancel_enrollment {}; + let call = increase_message_fee { + lane_id, + nonce, + additional_fee, + }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_slash_protect( + pub fn receive_messages_proof( &self, - slash_protect: ::core::primitive::u128, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_slash_protect, DispatchError> + relayer_id_at_bridged_chain: ::subxt::sp_core::crypto::AccountId32, + proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 >, + messages_count: ::core::primitive::u32, + dispatch_weight: ::core::primitive::u64, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, receive_messages_proof, DispatchError> { - let call = set_slash_protect { slash_protect }; + let call = receive_messages_proof { + relayer_id_at_bridged_chain, + proof, + messages_count, + dispatch_weight, + }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_assigned_relayers_number( + pub fn receive_messages_delivery_proof( &self, - number: ::core::primitive::u32, + proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 >, + relayers_state: runtime_types::bp_messages::UnrewardedRelayersState, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - set_assigned_relayers_number, + receive_messages_delivery_proof, DispatchError, > { - let call = set_assigned_relayers_number { number }; + let call = receive_messages_delivery_proof { + proof, + relayers_state, + }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } } - pub type Event = runtime_types::darwinia_fee_market::pallet::Event; + pub type Event = runtime_types::pallet_bridge_messages::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Enroll( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - pub ::core::primitive::u128, - ); - impl ::subxt::Event for Enroll { - const PALLET: &'static str = "FeeMarket"; - const EVENT: &'static str = "Enroll"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct UpdateLockedCollateral( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); - impl ::subxt::Event for UpdateLockedCollateral { - const PALLET: &'static str = "FeeMarket"; - const EVENT: &'static str = "UpdateLockedCollateral"; + pub struct ParameterUpdated (pub runtime_types :: pangolin_runtime :: bridges_message :: pangolin_parachain :: PangolinToPangolinParachainParameter ,) ; + impl ::subxt::Event for ParameterUpdated { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const EVENT: &'static str = "ParameterUpdated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct UpdateRelayFee( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, + pub struct MessageAccepted( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, ); - impl ::subxt::Event for UpdateRelayFee { - const PALLET: &'static str = "FeeMarket"; - const EVENT: &'static str = "UpdateRelayFee"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CancelEnrollment(pub ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::Event for CancelEnrollment { - const PALLET: &'static str = "FeeMarket"; - const EVENT: &'static str = "CancelEnrollment"; - } - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct UpdateCollateralSlashProtect(pub ::core::primitive::u128); - impl ::subxt::Event for UpdateCollateralSlashProtect { - const PALLET: &'static str = "FeeMarket"; - const EVENT: &'static str = "UpdateCollateralSlashProtect"; - } - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct UpdateAssignedRelayersNumber(pub ::core::primitive::u32); - impl ::subxt::Event for UpdateAssignedRelayersNumber { - const PALLET: &'static str = "FeeMarket"; - const EVENT: &'static str = "UpdateAssignedRelayersNumber"; + impl ::subxt::Event for MessageAccepted { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const EVENT: &'static str = "MessageAccepted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct FeeMarketSlash( - pub runtime_types::darwinia_fee_market::types::SlashReport< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::core::primitive::u128, - >, + pub struct MessagesDelivered( + pub [::core::primitive::u8; 4usize], + pub runtime_types::bp_messages::DeliveredMessages, ); - impl ::subxt::Event for FeeMarketSlash { - const PALLET: &'static str = "FeeMarket"; - const EVENT: &'static str = "FeeMarketSlash"; + impl ::subxt::Event for MessagesDelivered { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const EVENT: &'static str = "MessagesDelivered"; } } pub mod storage { use super::runtime_types; - pub struct RelayersMap(pub ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::StorageEntry for RelayersMap { - const PALLET: &'static str = "FeeMarket"; - const STORAGE: &'static str = "RelayersMap"; - type Value = runtime_types::darwinia_fee_market::types::Relayer< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Blake2_128Concat, - )]) - } - } - pub struct Relayers; - impl ::subxt::StorageEntry for Relayers { - const PALLET: &'static str = "FeeMarket"; - const STORAGE: &'static str = "Relayers"; - type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; + pub struct PalletOwner; + impl ::subxt::StorageEntry for PalletOwner { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const STORAGE: &'static str = "PalletOwner"; + type Value = ::subxt::sp_core::crypto::AccountId32; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } } - pub struct AssignedRelayers; - impl ::subxt::StorageEntry for AssignedRelayers { - const PALLET: &'static str = "FeeMarket"; - const STORAGE: &'static str = "AssignedRelayers"; - type Value = ::std::vec::Vec< - runtime_types::darwinia_fee_market::types::Relayer< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - >; + pub struct PalletOperatingMode; + impl ::subxt::StorageEntry for PalletOperatingMode { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const STORAGE: &'static str = "PalletOperatingMode"; + type Value = runtime_types::bp_messages::OperatingMode; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } } - pub struct Orders( - pub [::core::primitive::u8; 4usize], - pub ::core::primitive::u64, - ); - impl ::subxt::StorageEntry for Orders { - const PALLET: &'static str = "FeeMarket"; - const STORAGE: &'static str = "Orders"; - type Value = runtime_types::darwinia_fee_market::types::Order< + pub struct InboundLanes(pub [::core::primitive::u8; 4usize]); + impl ::subxt::StorageEntry for InboundLanes { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const STORAGE: &'static str = "InboundLanes"; + type Value = runtime_types::bp_messages::InboundLaneData< ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::core::primitive::u128, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( @@ -18705,22 +18442,28 @@ pub mod api { )]) } } - pub struct CollateralSlashProtect; - impl ::subxt::StorageEntry for CollateralSlashProtect { - const PALLET: &'static str = "FeeMarket"; - const STORAGE: &'static str = "CollateralSlashProtect"; - type Value = ::core::primitive::u128; + pub struct OutboundLanes(pub [::core::primitive::u8; 4usize]); + impl ::subxt::StorageEntry for OutboundLanes { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const STORAGE: &'static str = "OutboundLanes"; + type Value = runtime_types::bp_messages::OutboundLaneData; fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Blake2_128Concat, + )]) } } - pub struct AssignedRelayersNumber; - impl ::subxt::StorageEntry for AssignedRelayersNumber { - const PALLET: &'static str = "FeeMarket"; - const STORAGE: &'static str = "AssignedRelayersNumber"; - type Value = ::core::primitive::u32; + pub struct OutboundMessages(pub runtime_types::bp_messages::MessageKey); + impl ::subxt::StorageEntry for OutboundMessages { + const PALLET: &'static str = "BridgePangolinParachainMessages"; + const STORAGE: &'static str = "OutboundMessages"; + type Value = runtime_types::bp_messages::MessageData<::core::primitive::u128>; fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Plain + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Blake2_128Concat, + )]) } } pub struct StorageApi<'a, T: ::subxt::Config> { @@ -18730,96 +18473,89 @@ pub mod api { pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } - pub async fn relayers_map( + pub async fn pallet_owner( &self, - _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::darwinia_fee_market::types::Relayer< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, + ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, ::subxt::BasicError, > { - let entry = RelayersMap(_0); - self.client.storage().fetch_or_default(&entry, hash).await + let entry = PalletOwner; + self.client.storage().fetch(&entry, hash).await } - pub async fn relayers_map_iter( + pub async fn pallet_operating_mode( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, RelayersMap>, ::subxt::BasicError> - { - self.client.storage().iter(hash).await + ) -> ::core::result::Result< + runtime_types::bp_messages::OperatingMode, + ::subxt::BasicError, + > { + let entry = PalletOperatingMode; + self.client.storage().fetch_or_default(&entry, hash).await } - pub async fn relayers( + pub async fn inbound_lanes( &self, + _0: [::core::primitive::u8; 4usize], hash: ::core::option::Option, ) -> ::core::result::Result< - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + runtime_types::bp_messages::InboundLaneData< + ::subxt::sp_core::crypto::AccountId32, + >, ::subxt::BasicError, > { - let entry = Relayers; + let entry = InboundLanes(_0); self.client.storage().fetch_or_default(&entry, hash).await } - pub async fn assigned_relayers( + pub async fn inbound_lanes_iter( &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::core::option::Option< - ::std::vec::Vec< - runtime_types::darwinia_fee_market::types::Relayer< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - >, - >, + ::subxt::KeyIter<'a, T, InboundLanes>, ::subxt::BasicError, > { - let entry = AssignedRelayers; - self.client.storage().fetch(&entry, hash).await + self.client.storage().iter(hash).await } - pub async fn orders( + pub async fn outbound_lanes( &self, _0: [::core::primitive::u8; 4usize], - _1: ::core::primitive::u64, hash: ::core::option::Option, ) -> ::core::result::Result< - ::core::option::Option< - runtime_types::darwinia_fee_market::types::Order< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::core::primitive::u128, - >, - >, + runtime_types::bp_messages::OutboundLaneData, ::subxt::BasicError, > { - let entry = Orders(_0, _1); - self.client.storage().fetch(&entry, hash).await + let entry = OutboundLanes(_0); + self.client.storage().fetch_or_default(&entry, hash).await } - pub async fn orders_iter( + pub async fn outbound_lanes_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Orders>, ::subxt::BasicError> - { + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, OutboundLanes>, + ::subxt::BasicError, + > { self.client.storage().iter(hash).await } - pub async fn collateral_slash_protect( + pub async fn outbound_messages( &self, + _0: runtime_types::bp_messages::MessageKey, hash: ::core::option::Option, ) -> ::core::result::Result< - ::core::option::Option<::core::primitive::u128>, + ::core::option::Option< + runtime_types::bp_messages::MessageData<::core::primitive::u128>, + >, ::subxt::BasicError, > { - let entry = CollateralSlashProtect; + let entry = OutboundMessages(_0); self.client.storage().fetch(&entry, hash).await } - pub async fn assigned_relayers_number( + pub async fn outbound_messages_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> - { - let entry = AssignedRelayersNumber; - self.client.storage().fetch_or_default(&entry, hash).await + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, OutboundMessages>, + ::subxt::BasicError, + > { + self.client.storage().iter(hash).await } } } @@ -18827,268 +18563,92 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::core::result::Result< - runtime_types::frame_support::PalletId, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 97u8, 47u8, 102u8, 101u8, 101u8, 109u8, 107u8][..], - )?) - } - pub fn treasury_pallet_id( - &self, - ) -> ::core::result::Result< - runtime_types::frame_support::PalletId, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 97u8, 47u8, 116u8, 114u8, 115u8, 114u8, 121u8][..], - )?) - } - pub fn lock_id( - &self, - ) -> ::core::result::Result<[::core::primitive::u8; 8usize], ::subxt::BasicError> - { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 97u8, 47u8, 102u8, 101u8, 101u8, 108u8, 102u8][..], - )?) - } - pub fn minimum_relay_fee( - &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 214u8, 17u8, 126u8, 3u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, - ][..], - )?) - } - pub fn collateral_per_order( - &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 116u8, 59u8, 164u8, 11u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, - ][..], - )?) - } - pub fn slot( + pub fn bridged_chain_id( &self, - ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + ) -> ::core::result::Result<[::core::primitive::u8; 4usize], ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode( - &mut &[88u8, 2u8, 0u8, 0u8][..], - )?) - } - pub fn assigned_relayers_reward_ratio( - &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Permill, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[192u8, 39u8, 9u8, 0u8][..], - )?) - } - pub fn message_relayers_reward_ratio( - &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Permill, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 53u8, 12u8, 0u8][..], - )?) - } - pub fn confirm_relayers_reward_ratio( - &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Permill, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[64u8, 13u8, 3u8, 0u8][..], + &mut &[112u8, 103u8, 108u8, 112u8][..], )?) } } } } - pub mod transaction_pause { + pub mod pangoro_fee_market { use super::runtime_types; pub mod calls { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct pause_transaction { - pub pallet_name: ::std::vec::Vec<::core::primitive::u8>, - pub function_name: ::std::vec::Vec<::core::primitive::u8>, + pub struct enroll_and_lock_collateral { + pub lock_collateral: ::core::primitive::u128, + pub relay_fee: ::core::option::Option<::core::primitive::u128>, } - impl ::subxt::Call for pause_transaction { - const PALLET: &'static str = "TransactionPause"; - const FUNCTION: &'static str = "pause_transaction"; + impl ::subxt::Call for enroll_and_lock_collateral { + const PALLET: &'static str = "PangoroFeeMarket"; + const FUNCTION: &'static str = "enroll_and_lock_collateral"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct unpause_transaction { - pub pallet_name: ::std::vec::Vec<::core::primitive::u8>, - pub function_name: ::std::vec::Vec<::core::primitive::u8>, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_locked_collateral { + pub new_collateral: ::core::primitive::u128, } - impl ::subxt::Call for unpause_transaction { - const PALLET: &'static str = "TransactionPause"; - const FUNCTION: &'static str = "unpause_transaction"; + impl ::subxt::Call for update_locked_collateral { + const PALLET: &'static str = "PangoroFeeMarket"; + const FUNCTION: &'static str = "update_locked_collateral"; } - pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { - client: &'a ::subxt::Client, - marker: ::core::marker::PhantomData<(X, A)>, - } - impl<'a, T, X, A> TransactionApi<'a, T, X, A> - where - T: ::subxt::Config, - X: ::subxt::SignedExtra, - A: ::subxt::AccountData, - { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { - client, - marker: ::core::marker::PhantomData, - } - } - pub fn pause_transaction( - &self, - pallet_name: ::std::vec::Vec<::core::primitive::u8>, - function_name: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, pause_transaction, DispatchError> - { - let call = pause_transaction { - pallet_name, - function_name, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn unpause_transaction( - &self, - pallet_name: ::std::vec::Vec<::core::primitive::u8>, - function_name: ::std::vec::Vec<::core::primitive::u8>, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unpause_transaction, DispatchError> - { - let call = unpause_transaction { - pallet_name, - function_name, - }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - } - } - pub type Event = runtime_types::module_transaction_pause::module::Event; - pub mod events { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TransactionPaused( - pub ::std::vec::Vec<::core::primitive::u8>, - pub ::std::vec::Vec<::core::primitive::u8>, - ); - impl ::subxt::Event for TransactionPaused { - const PALLET: &'static str = "TransactionPause"; - const EVENT: &'static str = "TransactionPaused"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TransactionUnpaused( - pub ::std::vec::Vec<::core::primitive::u8>, - pub ::std::vec::Vec<::core::primitive::u8>, - ); - impl ::subxt::Event for TransactionUnpaused { - const PALLET: &'static str = "TransactionPause"; - const EVENT: &'static str = "TransactionUnpaused"; - } - } - pub mod storage { - use super::runtime_types; - pub struct PausedTransactions( - pub ::std::vec::Vec<::core::primitive::u8>, - pub ::std::vec::Vec<::core::primitive::u8>, - ); - impl ::subxt::StorageEntry for PausedTransactions { - const PALLET: &'static str = "TransactionPause"; - const STORAGE: &'static str = "PausedTransactions"; - type Value = (); - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } - pub struct StorageApi<'a, T: ::subxt::Config> { - client: &'a ::subxt::Client, - } - impl<'a, T: ::subxt::Config> StorageApi<'a, T> { - pub fn new(client: &'a ::subxt::Client) -> Self { - Self { client } - } - pub async fn paused_transactions( - &self, - _0: ::std::vec::Vec<::core::primitive::u8>, - _1: ::std::vec::Vec<::core::primitive::u8>, - hash: ::core::option::Option, - ) -> ::core::result::Result<::core::option::Option<()>, ::subxt::BasicError> - { - let entry = PausedTransactions(_0, _1); - self.client.storage().fetch(&entry, hash).await - } - pub async fn paused_transactions_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PausedTransactions>, - ::subxt::BasicError, - > { - self.client.storage().iter(hash).await - } - } - } - } - pub mod substrate2_substrate_issuing { - use super::runtime_types; - pub mod calls { - use super::runtime_types; - type DispatchError = runtime_types::sp_runtime::DispatchError; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct register_from_remote { - pub token_metadata: runtime_types::dp_asset::TokenMetadata, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_relay_fee { + pub new_fee: ::core::primitive::u128, } - impl ::subxt::Call for register_from_remote { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const FUNCTION: &'static str = "register_from_remote"; + impl ::subxt::Call for update_relay_fee { + const PALLET: &'static str = "PangoroFeeMarket"; + const FUNCTION: &'static str = "update_relay_fee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct issue_from_remote { - pub token_address: runtime_types::primitive_types::H160, - pub amount: runtime_types::primitive_types::U256, - pub recipient: runtime_types::primitive_types::H160, - } - impl ::subxt::Call for issue_from_remote { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const FUNCTION: &'static str = "issue_from_remote"; + pub struct cancel_enrollment; + impl ::subxt::Call for cancel_enrollment { + const PALLET: &'static str = "PangoroFeeMarket"; + const FUNCTION: &'static str = "cancel_enrollment"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct set_mapping_factory_address { - pub address: runtime_types::primitive_types::H160, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct set_slash_protect { + pub slash_protect: ::core::primitive::u128, } - impl ::subxt::Call for set_mapping_factory_address { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const FUNCTION: &'static str = "set_mapping_factory_address"; + impl ::subxt::Call for set_slash_protect { + const PALLET: &'static str = "PangoroFeeMarket"; + const FUNCTION: &'static str = "set_slash_protect"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct set_remote_backing_account { - pub account: ::subxt::sp_core::crypto::AccountId32, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct set_assigned_relayers_number { + pub number: ::core::primitive::u32, } - impl ::subxt::Call for set_remote_backing_account { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const FUNCTION: &'static str = "set_remote_backing_account"; + impl ::subxt::Call for set_assigned_relayers_number { + const PALLET: &'static str = "PangoroFeeMarket"; + const FUNCTION: &'static str = "set_assigned_relayers_number"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { client: &'a ::subxt::Client, @@ -19106,115 +18666,249 @@ pub mod api { marker: ::core::marker::PhantomData, } } - pub fn register_from_remote( - &self, - token_metadata: runtime_types::dp_asset::TokenMetadata, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, register_from_remote, DispatchError> - { - let call = register_from_remote { token_metadata }; - ::subxt::SubmittableExtrinsic::new(self.client, call) - } - pub fn issue_from_remote( + pub fn enroll_and_lock_collateral( &self, - token_address: runtime_types::primitive_types::H160, - amount: runtime_types::primitive_types::U256, - recipient: runtime_types::primitive_types::H160, - ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, issue_from_remote, DispatchError> - { - let call = issue_from_remote { - token_address, - amount, - recipient, + lock_collateral: ::core::primitive::u128, + relay_fee: ::core::option::Option<::core::primitive::u128>, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + enroll_and_lock_collateral, + DispatchError, + > { + let call = enroll_and_lock_collateral { + lock_collateral, + relay_fee, }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_mapping_factory_address( + pub fn update_locked_collateral( &self, - address: runtime_types::primitive_types::H160, + new_collateral: ::core::primitive::u128, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - set_mapping_factory_address, + update_locked_collateral, DispatchError, > { - let call = set_mapping_factory_address { address }; + let call = update_locked_collateral { new_collateral }; ::subxt::SubmittableExtrinsic::new(self.client, call) } - pub fn set_remote_backing_account( + pub fn update_relay_fee( &self, - account: ::subxt::sp_core::crypto::AccountId32, + new_fee: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, update_relay_fee, DispatchError> + { + let call = update_relay_fee { new_fee }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn cancel_enrollment( + &self, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_enrollment, DispatchError> + { + let call = cancel_enrollment {}; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_slash_protect( + &self, + slash_protect: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_slash_protect, DispatchError> + { + let call = set_slash_protect { slash_protect }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_assigned_relayers_number( + &self, + number: ::core::primitive::u32, ) -> ::subxt::SubmittableExtrinsic< 'a, T, X, A, - set_remote_backing_account, + set_assigned_relayers_number, DispatchError, > { - let call = set_remote_backing_account { account }; + let call = set_assigned_relayers_number { number }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } } - pub type Event = runtime_types::from_substrate_issuing::pallet::Event; + pub type Event = runtime_types::pallet_fee_market::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TokenRegistered( + pub struct Enroll( pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::primitive_types::H160, - pub runtime_types::primitive_types::H160, - pub runtime_types::primitive_types::H160, + pub ::core::primitive::u128, + pub ::core::primitive::u128, ); - impl ::subxt::Event for TokenRegistered { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const EVENT: &'static str = "TokenRegistered"; + impl ::subxt::Event for Enroll { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "Enroll"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TokenIssued( - pub runtime_types::primitive_types::H160, - pub runtime_types::primitive_types::H160, - pub runtime_types::primitive_types::H160, - pub runtime_types::primitive_types::U256, + pub struct UpdateLockedCollateral( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, ); - impl ::subxt::Event for TokenIssued { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const EVENT: &'static str = "TokenIssued"; + impl ::subxt::Event for UpdateLockedCollateral { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "UpdateLockedCollateral"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MappingFactoryAddressUpdated( - pub runtime_types::primitive_types::H160, - pub runtime_types::primitive_types::H160, + pub struct UpdateRelayFee( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, ); - impl ::subxt::Event for MappingFactoryAddressUpdated { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const EVENT: &'static str = "MappingFactoryAddressUpdated"; + impl ::subxt::Event for UpdateRelayFee { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "UpdateRelayFee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct RemoteBackingAccountUpdated(pub ::subxt::sp_core::crypto::AccountId32); - impl ::subxt::Event for RemoteBackingAccountUpdated { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const EVENT: &'static str = "RemoteBackingAccountUpdated"; + pub struct CancelEnrollment(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::Event for CancelEnrollment { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "CancelEnrollment"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct UpdateCollateralSlashProtect(pub ::core::primitive::u128); + impl ::subxt::Event for UpdateCollateralSlashProtect { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "UpdateCollateralSlashProtect"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct UpdateAssignedRelayersNumber(pub ::core::primitive::u32); + impl ::subxt::Event for UpdateAssignedRelayersNumber { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "UpdateAssignedRelayersNumber"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct FeeMarketSlash( + pub runtime_types::pallet_fee_market::types::SlashReport< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >, + ); + impl ::subxt::Event for FeeMarketSlash { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "FeeMarketSlash"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct OrderCreated( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub ::core::primitive::u128, + pub ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + pub ::core::option::Option<::core::primitive::u32>, + ); + impl ::subxt::Event for OrderCreated { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "OrderCreated"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct OrderReward( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub runtime_types::pallet_fee_market::s2s::payment::RewardItem< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ); + impl ::subxt::Event for OrderReward { + const PALLET: &'static str = "PangoroFeeMarket"; + const EVENT: &'static str = "OrderReward"; } } pub mod storage { use super::runtime_types; - pub struct RemoteBackingAccount; - impl ::subxt::StorageEntry for RemoteBackingAccount { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const STORAGE: &'static str = "RemoteBackingAccount"; - type Value = ::subxt::sp_core::crypto::AccountId32; + pub struct RelayersMap(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for RelayersMap { + const PALLET: &'static str = "PangoroFeeMarket"; + const STORAGE: &'static str = "RelayersMap"; + type Value = runtime_types::pallet_fee_market::types::Relayer< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Blake2_128Concat, + )]) + } + } + pub struct Relayers; + impl ::subxt::StorageEntry for Relayers { + const PALLET: &'static str = "PangoroFeeMarket"; + const STORAGE: &'static str = "Relayers"; + type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } } - pub struct MappingFactoryAddress; - impl ::subxt::StorageEntry for MappingFactoryAddress { - const PALLET: &'static str = "Substrate2SubstrateIssuing"; - const STORAGE: &'static str = "MappingFactoryAddress"; - type Value = runtime_types::primitive_types::H160; + pub struct AssignedRelayers; + impl ::subxt::StorageEntry for AssignedRelayers { + const PALLET: &'static str = "PangoroFeeMarket"; + const STORAGE: &'static str = "AssignedRelayers"; + type Value = ::std::vec::Vec< + runtime_types::pallet_fee_market::types::Relayer< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + >; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct Orders( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + ); + impl ::subxt::StorageEntry for Orders { + const PALLET: &'static str = "PangoroFeeMarket"; + const STORAGE: &'static str = "Orders"; + type Value = runtime_types::pallet_fee_market::types::Order< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &(&self.0, &self.1), + ::subxt::StorageHasher::Blake2_128Concat, + )]) + } + } + pub struct CollateralSlashProtect; + impl ::subxt::StorageEntry for CollateralSlashProtect { + const PALLET: &'static str = "PangoroFeeMarket"; + const STORAGE: &'static str = "CollateralSlashProtect"; + type Value = ::core::primitive::u128; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct AssignedRelayersNumber; + impl ::subxt::StorageEntry for AssignedRelayersNumber { + const PALLET: &'static str = "PangoroFeeMarket"; + const STORAGE: &'static str = "AssignedRelayersNumber"; + type Value = ::core::primitive::u32; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -19226,22 +18920,95 @@ pub mod api { pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } } - pub async fn remote_backing_account( + pub async fn relayers_map( &self, + _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - ::subxt::sp_core::crypto::AccountId32, + runtime_types::pallet_fee_market::types::Relayer< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, ::subxt::BasicError, > { - let entry = RemoteBackingAccount; + let entry = RelayersMap(_0); self.client.storage().fetch_or_default(&entry, hash).await } - pub async fn mapping_factory_address( + pub async fn relayers_map_iter( &self, hash: ::core::option::Option, - ) -> ::core::result::Result + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, RelayersMap>, ::subxt::BasicError> { - let entry = MappingFactoryAddress; + self.client.storage().iter(hash).await + } + pub async fn relayers( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::subxt::BasicError, + > { + let entry = Relayers; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn assigned_relayers( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option< + ::std::vec::Vec< + runtime_types::pallet_fee_market::types::Relayer< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + >, + >, + ::subxt::BasicError, + > { + let entry = AssignedRelayers; + self.client.storage().fetch(&entry, hash).await + } + pub async fn orders( + &self, + _0: [::core::primitive::u8; 4usize], + _1: ::core::primitive::u64, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option< + runtime_types::pallet_fee_market::types::Order< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >, + >, + ::subxt::BasicError, + > { + let entry = Orders(_0, _1); + self.client.storage().fetch(&entry, hash).await + } + pub async fn orders_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Orders>, ::subxt::BasicError> + { + self.client.storage().iter(hash).await + } + pub async fn collateral_slash_protect( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<::core::primitive::u128>, + ::subxt::BasicError, + > { + let entry = CollateralSlashProtect; + self.client.storage().fetch(&entry, hash).await + } + pub async fn assigned_relayers_number( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + let entry = AssignedRelayersNumber; self.client.storage().fetch_or_default(&entry, hash).await } } @@ -19250,940 +19017,1430 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn pallet_id( + pub fn treasury_pallet_id( &self, ) -> ::core::result::Result< runtime_types::frame_support::PalletId, ::subxt::BasicError, > { Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 97u8, 47u8, 115u8, 50u8, 115u8, 105u8, 115u8][..], + &mut &[100u8, 97u8, 47u8, 116u8, 114u8, 115u8, 114u8, 121u8][..], )?) } - } - } - } - pub mod runtime_types { - use super::runtime_types; - pub mod beefy_primitives { - use super::runtime_types; - pub mod crypto { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Public(pub runtime_types::sp_core::ecdsa::Public); - } - pub mod mmr { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct BeefyNextAuthoritySet<_0> { - pub id: ::core::primitive::u64, - pub len: ::core::primitive::u32, - pub root: _0, - } - } - } - pub mod bitvec { - use super::runtime_types; - pub mod order { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Msb0; - } - } - pub mod bp_header_chain { - use super::runtime_types; - pub mod justification { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct GrandpaJustification<_0> { - pub round: ::core::primitive::u64, - pub commit: runtime_types::finality_grandpa::Commit< - ::subxt::sp_core::H256, - ::core::primitive::u32, - runtime_types::sp_finality_grandpa::app::Signature, - runtime_types::sp_finality_grandpa::app::Public, - >, - pub votes_ancestries: ::std::vec::Vec<_0>, + pub fn lock_id( + &self, + ) -> ::core::result::Result<[::core::primitive::u8; 8usize], ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 97u8, 47u8, 102u8, 101u8, 101u8, 108u8, 102u8][..], + )?) + } + pub fn minimum_relay_fee( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 214u8, 17u8, 126u8, 3u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn collateral_per_order( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 116u8, 59u8, 164u8, 11u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn slot( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[44u8, 1u8, 0u8, 0u8][..], + )?) + } + pub fn assigned_relayers_reward_ratio( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[192u8, 39u8, 9u8, 0u8][..], + )?) + } + pub fn message_relayers_reward_ratio( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 53u8, 12u8, 0u8][..], + )?) + } + pub fn confirm_relayers_reward_ratio( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[64u8, 13u8, 3u8, 0u8][..], + )?) } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AuthoritySet { - pub authorities: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - pub set_id: ::core::primitive::u64, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct InitializationData<_0> { - pub header: ::std::boxed::Box<_0>, - pub authority_list: ::std::vec::Vec<( - runtime_types::sp_finality_grandpa::app::Public, - ::core::primitive::u64, - )>, - pub set_id: ::core::primitive::u64, - pub is_halted: ::core::primitive::bool, } } - pub mod bp_message_dispatch { + } + pub mod pangolin_parachain_fee_market { + use super::runtime_types; + pub mod calls { use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum CallOrigin<_0, _1, _2> { - #[codec(index = 0)] - SourceRoot, - #[codec(index = 1)] - TargetAccount(_0, _1, _2), - #[codec(index = 2)] - SourceAccount(_0), + pub struct enroll_and_lock_collateral { + pub lock_collateral: ::core::primitive::u128, + pub relay_fee: ::core::option::Option<::core::primitive::u128>, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessagePayload<_0, _1, _2, _3> { - pub spec_version: ::core::primitive::u32, - pub weight: ::core::primitive::u64, - pub origin: runtime_types::bp_message_dispatch::CallOrigin<_0, _1, _2>, - pub dispatch_fee_payment: runtime_types::bp_runtime::messages::DispatchFeePayment, - pub call: _3, + impl ::subxt::Call for enroll_and_lock_collateral { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const FUNCTION: &'static str = "enroll_and_lock_collateral"; } - } - pub mod bp_messages { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct DeliveredMessages { - pub begin: ::core::primitive::u64, - pub end: ::core::primitive::u64, - pub dispatch_results: ::subxt::bitvec::vec::BitVec< - ::subxt::bitvec::order::Msb0, - ::core::primitive::u8, - >, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_locked_collateral { + pub new_collateral: ::core::primitive::u128, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct InboundLaneData<_0> { - pub relayers: ::std::vec::Vec>, - pub last_confirmed_nonce: ::core::primitive::u64, + impl ::subxt::Call for update_locked_collateral { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const FUNCTION: &'static str = "update_locked_collateral"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageData<_0> { - pub payload: ::std::vec::Vec<::core::primitive::u8>, - pub fee: _0, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct update_relay_fee { + pub new_fee: ::core::primitive::u128, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageKey { - pub lane_id: [::core::primitive::u8; 4usize], - pub nonce: ::core::primitive::u64, + impl ::subxt::Call for update_relay_fee { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const FUNCTION: &'static str = "update_relay_fee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum OperatingMode { - #[codec(index = 0)] - Normal, - #[codec(index = 1)] - RejectingOutboundMessages, - #[codec(index = 2)] - Halted, + pub struct cancel_enrollment; + impl ::subxt::Call for cancel_enrollment { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const FUNCTION: &'static str = "cancel_enrollment"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct OutboundLaneData { - pub oldest_unpruned_nonce: ::core::primitive::u64, - pub latest_received_nonce: ::core::primitive::u64, - pub latest_generated_nonce: ::core::primitive::u64, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct set_slash_protect { + pub slash_protect: ::core::primitive::u128, } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct UnrewardedRelayer<_0> { - pub relayer: _0, - pub messages: runtime_types::bp_messages::DeliveredMessages, + impl ::subxt::Call for set_slash_protect { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const FUNCTION: &'static str = "set_slash_protect"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct UnrewardedRelayersState { - pub unrewarded_relayer_entries: ::core::primitive::u64, - pub messages_in_oldest_entry: ::core::primitive::u64, - pub total_messages: ::core::primitive::u64, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct set_assigned_relayers_number { + pub number: ::core::primitive::u32, } - } - pub mod bp_polkadot_core { - use super::runtime_types; - pub mod parachains { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct ParaHead(pub ::std::vec::Vec<::core::primitive::u8>); - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct ParaId(pub ::core::primitive::u32); + impl ::subxt::Call for set_assigned_relayers_number { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const FUNCTION: &'static str = "set_assigned_relayers_number"; } - } - pub mod bp_runtime { - use super::runtime_types; - pub mod messages { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum DispatchFeePayment { - #[codec(index = 0)] - AtSourceChain, - #[codec(index = 1)] - AtTargetChain, - } + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, } - } - pub mod bridge_runtime_common { - use super::runtime_types; - pub mod messages { - use super::runtime_types; - pub mod source { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct FromBridgedChainMessagesDeliveryProof<_0> { - pub bridged_header_hash: _0, - pub storage_proof: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub lane: [::core::primitive::u8; 4usize], + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, } } - pub mod target { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct FromBridgedChainMessagesProof<_0> { - pub bridged_header_hash: _0, - pub storage_proof: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - pub lane: [::core::primitive::u8; 4usize], - pub nonces_start: ::core::primitive::u64, - pub nonces_end: ::core::primitive::u64, - } + pub fn enroll_and_lock_collateral( + &self, + lock_collateral: ::core::primitive::u128, + relay_fee: ::core::option::Option<::core::primitive::u128>, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + enroll_and_lock_collateral, + DispatchError, + > { + let call = enroll_and_lock_collateral { + lock_collateral, + relay_fee, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - } - } - pub mod darwinia_balances { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Call { - #[codec(index = 0)] - transfer { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - set_balance { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - #[codec(compact)] - new_free: ::core::primitive::u128, - #[codec(compact)] - new_reserved: ::core::primitive::u128, - }, - #[codec(index = 2)] - force_transfer { - source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 3)] - transfer_keep_alive { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 4)] - transfer_all { - dest: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - keep_alive: ::core::primitive::bool, - }, - #[codec(index = 5)] - force_unreserve { - who: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - amount: ::core::primitive::u128, - }, + pub fn update_locked_collateral( + &self, + new_collateral: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + update_locked_collateral, + DispatchError, + > { + let call = update_locked_collateral { new_collateral }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - VestingBalance, - #[codec(index = 1)] - LiquidityRestrictions, - #[codec(index = 2)] - InsufficientBalance, - #[codec(index = 3)] - ExistentialDeposit, - #[codec(index = 4)] - KeepAlive, - #[codec(index = 5)] - ExistingVestingSchedule, - #[codec(index = 6)] - DeadAccount, - #[codec(index = 7)] - TooManyReserves, - #[codec(index = 8)] - LockP, + pub fn update_relay_fee( + &self, + new_fee: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, update_relay_fee, DispatchError> + { + let call = update_relay_fee { new_fee }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - Endowed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 1)] - DustLost( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 2)] - Transfer( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 3)] - BalanceSet( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u128, - ), - #[codec(index = 4)] - Deposit( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 5)] - Reserved( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 6)] - Unreserved( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 7)] - ReserveRepatriated( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, - ), + pub fn cancel_enrollment( + &self, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, cancel_enrollment, DispatchError> + { + let call = cancel_enrollment {}; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Releases { - #[codec(index = 0)] - V1_0_0, - #[codec(index = 1)] - V2_0_0, + pub fn set_slash_protect( + &self, + slash_protect: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_slash_protect, DispatchError> + { + let call = set_slash_protect { slash_protect }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct ReserveData<_0, _1> { - pub id: _0, - pub amount: _1, + pub fn set_assigned_relayers_number( + &self, + number: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_assigned_relayers_number, + DispatchError, + > { + let call = set_assigned_relayers_number { number }; + ::subxt::SubmittableExtrinsic::new(self.client, call) } } } - pub mod darwinia_beefy_gadget { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Call { - #[codec(index = 0)] - set_commitment_contract { - commitment_contract: runtime_types::primitive_types::H160, - }, - } - } - } - pub mod darwinia_bridge_ethereum { + pub type Event = runtime_types::pallet_fee_market::pallet::Event; + pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Call { - #[codec(index = 0)] - affirm { - ethereum_relay_header_parcel: - runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, - optional_ethereum_relay_proofs: ::core::option::Option< - runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, - >, - }, - #[codec(index = 1)] - dispute_and_affirm { - ethereum_relay_header_parcel: - runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, - optional_ethereum_relay_proofs: ::core::option::Option< - runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, - >, - }, - #[codec(index = 2)] - complete_relay_proofs { - affirmation_id: - runtime_types::darwinia_relay_primitives::relayer_game::RelayAffirmationId< - ::core::primitive::u64, - >, - ethereum_relay_proofs: ::std::vec::Vec< - runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, - >, - }, - #[codec(index = 3)] - extend_affirmation { - extended_ethereum_relay_affirmation_id: - runtime_types::darwinia_relay_primitives::relayer_game::RelayAffirmationId< - ::core::primitive::u64, - >, - game_sample_points: ::std::vec::Vec< - runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, - >, - optional_ethereum_relay_proofs: ::core::option::Option< - ::std::vec::Vec< - runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, - >, - >, - }, - #[codec(index = 4)] - vote_pending_relay_header_parcel { - ethereum_block_number: ::core::primitive::u64, - aye: ::core::primitive::bool, - }, - #[codec(index = 5)] - check_receipt { - ethereum_proof_record: - runtime_types::ethereum_primitives::receipt::ReceiptProof, - ethereum_header: runtime_types::ethereum_primitives::header::Header, - mmr_proof: runtime_types::darwinia_bridge_ethereum::MMRProof, - }, - #[codec(index = 6)] - set_receipt_verify_fee { - #[codec(compact)] - new: ::core::primitive::u128, - }, - #[codec(index = 7)] - remove_confirmed_parcel_of { - confirmed_block_number: ::core::primitive::u64, - }, - #[codec(index = 8)] - clean_confirmed_parcels, - #[codec(index = 9)] - set_confirmed_parcel { - ethereum_relay_header_parcel: - runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, - }, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct CheckEthereumRelayHeaderParcel<_0>(::core::marker::PhantomData<_0>); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Error { - #[codec(index = 0)] - HeaderInv, - #[codec(index = 1)] - ConfirmedBlocksC, - #[codec(index = 2)] - ContinuousInv, - #[codec(index = 3)] - AffirmationExisted, - #[codec(index = 4)] - HeaderHashInv, - #[codec(index = 5)] - MMRInv, - #[codec(index = 6)] - HeaderHashMis, - #[codec(index = 7)] - ConfirmedHeaderNE, - #[codec(index = 8)] - ReceiptProofInv, - #[codec(index = 9)] - PendingRelayHeaderParcelNE, - #[codec(index = 10)] - PendingRelayHeaderParcelAE, - #[codec(index = 11)] - AlreadyVoteForAyeDup, - #[codec(index = 12)] - AlreadyVoteForNayDup, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct EthereumRelayHeaderParcel { - pub header: runtime_types::ethereum_primitives::header::Header, - pub parent_mmr_root: ::subxt::sp_core::H256, + pub struct Enroll( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Enroll { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "Enroll"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct EthereumRelayProofs { - pub ethash_proof: - ::std::vec::Vec, - pub mmr_proof: ::std::vec::Vec<::subxt::sp_core::H256>, + pub struct UpdateLockedCollateral( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for UpdateLockedCollateral { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "UpdateLockedCollateral"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MMRProof { - pub member_leaf_index: ::core::primitive::u64, - pub last_leaf_index: ::core::primitive::u64, - pub proof: ::std::vec::Vec<::subxt::sp_core::H256>, + pub struct UpdateRelayFee( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for UpdateRelayFee { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "UpdateRelayFee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawEvent<_0, _1> { - #[codec(index = 0)] - Affirmed(_0, _1), - #[codec(index = 1)] - DisputedAndAffirmed(_0, _1), - #[codec(index = 2)] - Extended(_0, _1), - #[codec(index = 3)] - NewRound( - ::core::primitive::u64, - ::std::vec::Vec<::core::primitive::u64>, - ), - #[codec(index = 4)] - GameOver(::core::primitive::u64), - #[codec(index = 5)] - RemoveConfirmedParcel(::core::primitive::u64), - #[codec(index = 6)] - VerifyReceipt( - _0, - runtime_types::ethereum_primitives::receipt::TypedReceipt, - runtime_types::ethereum_primitives::header::Header, - ), - #[codec(index = 7)] - Pended(::core::primitive::u64), - #[codec(index = 8)] - GuardVoted(::core::primitive::u64, ::core::primitive::bool), - #[codec(index = 9)] - PendingRelayHeaderParcelConfirmed( - ::core::primitive::u64, - ::std::vec::Vec<::core::primitive::u8>, - ), - #[codec(index = 10)] - PendingRelayHeaderParcelRejected(::core::primitive::u64), + pub struct CancelEnrollment(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::Event for CancelEnrollment { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "CancelEnrollment"; } - } - pub mod darwinia_claims { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Call { - #[codec(index = 0)] - claim { - dest: ::subxt::sp_core::crypto::AccountId32, - signature: runtime_types::darwinia_claims::OtherSignature, - }, - #[codec(index = 1)] - mint_claim { - who: runtime_types::darwinia_claims::OtherAddress, - value: ::core::primitive::u128, - }, - #[codec(index = 2)] - move_claim { - old: runtime_types::darwinia_claims::OtherAddress, - new: runtime_types::darwinia_claims::OtherAddress, - }, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct UpdateCollateralSlashProtect(pub ::core::primitive::u128); + impl ::subxt::Event for UpdateCollateralSlashProtect { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "UpdateCollateralSlashProtect"; } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct EcdsaSignature(pub [::core::primitive::u8; 65usize]); - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Error { - #[codec(index = 0)] - InvalidSignature, - #[codec(index = 1)] - SignerHasNoClaim, - #[codec(index = 2)] - PotUnderflow, - #[codec(index = 3)] - MoveToExistedAddress, - #[codec(index = 4)] - NewAddressTypeMis, + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct UpdateAssignedRelayersNumber(pub ::core::primitive::u32); + impl ::subxt::Event for UpdateAssignedRelayersNumber { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "UpdateAssignedRelayersNumber"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum OtherAddress { - #[codec(index = 0)] - Eth([::core::primitive::u8; 20usize]), - #[codec(index = 1)] - Tron([::core::primitive::u8; 20usize]), + pub struct FeeMarketSlash( + pub runtime_types::pallet_fee_market::types::SlashReport< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >, + ); + impl ::subxt::Event for FeeMarketSlash { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "FeeMarketSlash"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum OtherSignature { - #[codec(index = 0)] - Eth(runtime_types::darwinia_claims::EcdsaSignature), - #[codec(index = 1)] - Tron(runtime_types::darwinia_claims::EcdsaSignature), + pub struct OrderCreated( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub ::core::primitive::u128, + pub ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + pub ::core::option::Option<::core::primitive::u32>, + ); + impl ::subxt::Event for OrderCreated { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "OrderCreated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawEvent<_0, _1> { - #[codec(index = 0)] - Claimed(_0, [::core::primitive::u8; 20usize], _1), + pub struct OrderReward( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub runtime_types::pallet_fee_market::s2s::payment::RewardItem< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ); + impl ::subxt::Event for OrderReward { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const EVENT: &'static str = "OrderReward"; } } - pub mod darwinia_democracy { + pub mod storage { use super::runtime_types; - pub mod conviction { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Conviction { - #[codec(index = 0)] - None, - #[codec(index = 1)] - Locked1x, - #[codec(index = 2)] - Locked2x, - #[codec(index = 3)] - Locked3x, - #[codec(index = 4)] - Locked4x, - #[codec(index = 5)] - Locked5x, - #[codec(index = 6)] - Locked6x, + pub struct RelayersMap(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::StorageEntry for RelayersMap { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const STORAGE: &'static str = "RelayersMap"; + type Value = runtime_types::pallet_fee_market::types::Relayer< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Blake2_128Concat, + )]) } } - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Call { - #[codec(index = 0)] - propose { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - value: ::core::primitive::u128, - }, - #[codec(index = 1)] - second { - #[codec(compact)] - proposal: ::core::primitive::u32, - #[codec(compact)] - seconds_upper_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - vote { - #[codec(compact)] - ref_index: ::core::primitive::u32, - vote: runtime_types::darwinia_democracy::vote::AccountVote< - ::core::primitive::u128, - >, - }, - #[codec(index = 3)] - emergency_cancel { ref_index: ::core::primitive::u32 }, - #[codec(index = 4)] - external_propose { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 5)] - external_propose_majority { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 6)] - external_propose_default { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 7)] - fast_track { - proposal_hash: ::subxt::sp_core::H256, - voting_period: ::core::primitive::u32, - delay: ::core::primitive::u32, - }, - #[codec(index = 8)] - veto_external { - proposal_hash: ::subxt::sp_core::H256, - }, - #[codec(index = 9)] - cancel_referendum { - #[codec(compact)] - ref_index: ::core::primitive::u32, - }, - #[codec(index = 10)] - cancel_queued { which: ::core::primitive::u32 }, - #[codec(index = 11)] - delegate { - to: ::subxt::sp_core::crypto::AccountId32, - conviction: runtime_types::darwinia_democracy::conviction::Conviction, - balance: ::core::primitive::u128, - }, - #[codec(index = 12)] - undelegate, - #[codec(index = 13)] - clear_public_proposals, - #[codec(index = 14)] - note_preimage { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 15)] - note_preimage_operational { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 16)] - note_imminent_preimage { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 17)] - note_imminent_preimage_operational { - encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 18)] - reap_preimage { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - proposal_len_upper_bound: ::core::primitive::u32, - }, - #[codec(index = 19)] - unlock { - target: ::subxt::sp_core::crypto::AccountId32, - }, - #[codec(index = 20)] - remove_vote { index: ::core::primitive::u32 }, - #[codec(index = 21)] - remove_other_vote { - target: ::subxt::sp_core::crypto::AccountId32, - index: ::core::primitive::u32, - }, - #[codec(index = 22)] - enact_proposal { - proposal_hash: ::subxt::sp_core::H256, - index: ::core::primitive::u32, - }, - #[codec(index = 23)] - blacklist { - proposal_hash: ::subxt::sp_core::H256, - maybe_ref_index: ::core::option::Option<::core::primitive::u32>, - }, - #[codec(index = 24)] - cancel_proposal { - #[codec(compact)] - prop_index: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - ValueLow, - #[codec(index = 1)] - ProposalMissing, - #[codec(index = 2)] - AlreadyCanceled, - #[codec(index = 3)] - DuplicateProposal, - #[codec(index = 4)] - ProposalBlacklisted, - #[codec(index = 5)] - NotSimpleMajority, - #[codec(index = 6)] - InvalidHash, - #[codec(index = 7)] - NoProposal, - #[codec(index = 8)] - AlreadyVetoed, - #[codec(index = 9)] - DuplicatePreimage, - #[codec(index = 10)] - NotImminent, - #[codec(index = 11)] - TooEarly, - #[codec(index = 12)] - Imminent, - #[codec(index = 13)] - PreimageMissing, - #[codec(index = 14)] - ReferendumInvalid, - #[codec(index = 15)] - PreimageInvalid, - #[codec(index = 16)] - NoneWaiting, - #[codec(index = 17)] - NotVoter, - #[codec(index = 18)] - NoPermission, - #[codec(index = 19)] - AlreadyDelegating, - #[codec(index = 20)] - InsufficientFunds, - #[codec(index = 21)] - NotDelegating, - #[codec(index = 22)] - VotesExist, - #[codec(index = 23)] - InstantNotAllowed, - #[codec(index = 24)] - Nonsense, - #[codec(index = 25)] - WrongUpperBound, - #[codec(index = 26)] - MaxVotesReached, - #[codec(index = 27)] - TooManyProposals, + pub struct Relayers; + impl ::subxt::StorageEntry for Relayers { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const STORAGE: &'static str = "Relayers"; + type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - Proposed(::core::primitive::u32, ::core::primitive::u128), - #[codec(index = 1)] - Tabled( - ::core::primitive::u32, - ::core::primitive::u128, - ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - ), - #[codec(index = 2)] - ExternalTabled, - #[codec(index = 3)] - Started( - ::core::primitive::u32, - runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, - ), - #[codec(index = 4)] - Passed(::core::primitive::u32), - #[codec(index = 5)] - NotPassed(::core::primitive::u32), - #[codec(index = 6)] - Cancelled(::core::primitive::u32), - #[codec(index = 7)] - Executed( - ::core::primitive::u32, - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), - #[codec(index = 8)] - Delegated( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::crypto::AccountId32, - ), - #[codec(index = 9)] - Undelegated(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 10)] - Vetoed( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ::core::primitive::u32, - ), - #[codec(index = 11)] - PreimageNoted( - ::subxt::sp_core::H256, + } + pub struct AssignedRelayers; + impl ::subxt::StorageEntry for AssignedRelayers { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const STORAGE: &'static str = "AssignedRelayers"; + type Value = ::std::vec::Vec< + runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, - ), - #[codec(index = 12)] - PreimageUsed( - ::subxt::sp_core::H256, + >, + >; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct Orders( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + ); + impl ::subxt::StorageEntry for Orders { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const STORAGE: &'static str = "Orders"; + type Value = runtime_types::pallet_fee_market::types::Order< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &(&self.0, &self.1), + ::subxt::StorageHasher::Blake2_128Concat, + )]) + } + } + pub struct CollateralSlashProtect; + impl ::subxt::StorageEntry for CollateralSlashProtect { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const STORAGE: &'static str = "CollateralSlashProtect"; + type Value = ::core::primitive::u128; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct AssignedRelayersNumber; + impl ::subxt::StorageEntry for AssignedRelayersNumber { + const PALLET: &'static str = "PangolinParachainFeeMarket"; + const STORAGE: &'static str = "AssignedRelayersNumber"; + type Value = ::core::primitive::u32; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct StorageApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> StorageApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } + pub async fn relayers_map( + &self, + _0: ::subxt::sp_core::crypto::AccountId32, + hash: ::core::option::Option, + ) -> ::core::result::Result< + runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, - ), - #[codec(index = 13)] - PreimageInvalid(::subxt::sp_core::H256, ::core::primitive::u32), - #[codec(index = 14)] - PreimageMissing(::subxt::sp_core::H256, ::core::primitive::u32), - #[codec(index = 15)] - PreimageReaped( - ::subxt::sp_core::H256, + >, + ::subxt::BasicError, + > { + let entry = RelayersMap(_0); + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn relayers_map_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, RelayersMap>, ::subxt::BasicError> + { + self.client.storage().iter(hash).await + } + pub async fn relayers( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::subxt::BasicError, + > { + let entry = Relayers; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn assigned_relayers( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option< + ::std::vec::Vec< + runtime_types::pallet_fee_market::types::Relayer< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + >, + >, + ::subxt::BasicError, + > { + let entry = AssignedRelayers; + self.client.storage().fetch(&entry, hash).await + } + pub async fn orders( + &self, + _0: [::core::primitive::u8; 4usize], + _1: ::core::primitive::u64, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option< + runtime_types::pallet_fee_market::types::Order< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >, + >, + ::subxt::BasicError, + > { + let entry = Orders(_0, _1); + self.client.storage().fetch(&entry, hash).await + } + pub async fn orders_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, Orders>, ::subxt::BasicError> + { + self.client.storage().iter(hash).await + } + pub async fn collateral_slash_protect( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<::core::primitive::u128>, + ::subxt::BasicError, + > { + let entry = CollateralSlashProtect; + self.client.storage().fetch(&entry, hash).await + } + pub async fn assigned_relayers_number( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + let entry = AssignedRelayersNumber; + self.client.storage().fetch_or_default(&entry, hash).await + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn treasury_pallet_id( + &self, + ) -> ::core::result::Result< + runtime_types::frame_support::PalletId, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 97u8, 47u8, 116u8, 114u8, 115u8, 114u8, 121u8][..], + )?) + } + pub fn lock_id( + &self, + ) -> ::core::result::Result<[::core::primitive::u8; 8usize], ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 97u8, 47u8, 102u8, 101u8, 101u8, 112u8, 97u8][..], + )?) + } + pub fn minimum_relay_fee( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 214u8, 17u8, 126u8, 3u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn collateral_per_order( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 116u8, 59u8, 164u8, 11u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, + ][..], + )?) + } + pub fn slot( + &self, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[44u8, 1u8, 0u8, 0u8][..], + )?) + } + pub fn assigned_relayers_reward_ratio( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[192u8, 39u8, 9u8, 0u8][..], + )?) + } + pub fn message_relayers_reward_ratio( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[0u8, 53u8, 12u8, 0u8][..], + )?) + } + pub fn confirm_relayers_reward_ratio( + &self, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[64u8, 13u8, 3u8, 0u8][..], + )?) + } + } + } + } + pub mod transaction_pause { + use super::runtime_types; + pub mod calls { + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct pause_transaction { + pub pallet_name: ::std::vec::Vec<::core::primitive::u8>, + pub function_name: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::Call for pause_transaction { + const PALLET: &'static str = "TransactionPause"; + const FUNCTION: &'static str = "pause_transaction"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct unpause_transaction { + pub pallet_name: ::std::vec::Vec<::core::primitive::u8>, + pub function_name: ::std::vec::Vec<::core::primitive::u8>, + } + impl ::subxt::Call for unpause_transaction { + const PALLET: &'static str = "TransactionPause"; + const FUNCTION: &'static str = "unpause_transaction"; + } + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, + } + } + pub fn pause_transaction( + &self, + pallet_name: ::std::vec::Vec<::core::primitive::u8>, + function_name: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, pause_transaction, DispatchError> + { + let call = pause_transaction { + pallet_name, + function_name, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn unpause_transaction( + &self, + pallet_name: ::std::vec::Vec<::core::primitive::u8>, + function_name: ::std::vec::Vec<::core::primitive::u8>, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unpause_transaction, DispatchError> + { + let call = unpause_transaction { + pallet_name, + function_name, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } + } + pub type Event = runtime_types::module_transaction_pause::module::Event; + pub mod events { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TransactionPaused( + pub ::std::vec::Vec<::core::primitive::u8>, + pub ::std::vec::Vec<::core::primitive::u8>, + ); + impl ::subxt::Event for TransactionPaused { + const PALLET: &'static str = "TransactionPause"; + const EVENT: &'static str = "TransactionPaused"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TransactionUnpaused( + pub ::std::vec::Vec<::core::primitive::u8>, + pub ::std::vec::Vec<::core::primitive::u8>, + ); + impl ::subxt::Event for TransactionUnpaused { + const PALLET: &'static str = "TransactionPause"; + const EVENT: &'static str = "TransactionUnpaused"; + } + } + pub mod storage { + use super::runtime_types; + pub struct PausedTransactions( + pub ::std::vec::Vec<::core::primitive::u8>, + pub ::std::vec::Vec<::core::primitive::u8>, + ); + impl ::subxt::StorageEntry for PausedTransactions { + const PALLET: &'static str = "TransactionPause"; + const STORAGE: &'static str = "PausedTransactions"; + type Value = (); + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Twox64Concat, + )]) + } + } + pub struct StorageApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> StorageApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } + pub async fn paused_transactions( + &self, + _0: ::std::vec::Vec<::core::primitive::u8>, + _1: ::std::vec::Vec<::core::primitive::u8>, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::option::Option<()>, ::subxt::BasicError> + { + let entry = PausedTransactions(_0, _1); + self.client.storage().fetch(&entry, hash).await + } + pub async fn paused_transactions_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, PausedTransactions>, + ::subxt::BasicError, + > { + self.client.storage().iter(hash).await + } + } + } + } + pub mod substrate2_substrate_issuing { + use super::runtime_types; + pub mod calls { + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct register_from_remote { + pub token_metadata: runtime_types::dp_asset::TokenMetadata, + } + impl ::subxt::Call for register_from_remote { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const FUNCTION: &'static str = "register_from_remote"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct issue_from_remote { + pub token_address: runtime_types::primitive_types::H160, + pub amount: runtime_types::primitive_types::U256, + pub recipient: runtime_types::primitive_types::H160, + } + impl ::subxt::Call for issue_from_remote { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const FUNCTION: &'static str = "issue_from_remote"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct set_mapping_factory_address { + pub address: runtime_types::primitive_types::H160, + } + impl ::subxt::Call for set_mapping_factory_address { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const FUNCTION: &'static str = "set_mapping_factory_address"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct set_remote_backing_account { + pub account: ::subxt::sp_core::crypto::AccountId32, + } + impl ::subxt::Call for set_remote_backing_account { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const FUNCTION: &'static str = "set_remote_backing_account"; + } + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, + } + } + pub fn register_from_remote( + &self, + token_metadata: runtime_types::dp_asset::TokenMetadata, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, register_from_remote, DispatchError> + { + let call = register_from_remote { token_metadata }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn issue_from_remote( + &self, + token_address: runtime_types::primitive_types::H160, + amount: runtime_types::primitive_types::U256, + recipient: runtime_types::primitive_types::H160, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, issue_from_remote, DispatchError> + { + let call = issue_from_remote { + token_address, + amount, + recipient, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_mapping_factory_address( + &self, + address: runtime_types::primitive_types::H160, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_mapping_factory_address, + DispatchError, + > { + let call = set_mapping_factory_address { address }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_remote_backing_account( + &self, + account: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_remote_backing_account, + DispatchError, + > { + let call = set_remote_backing_account { account }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } + } + pub type Event = runtime_types::from_substrate_issuing::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenRegistered( + pub ::subxt::sp_core::crypto::AccountId32, + pub runtime_types::primitive_types::H160, + pub runtime_types::primitive_types::H160, + pub runtime_types::primitive_types::H160, + ); + impl ::subxt::Event for TokenRegistered { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const EVENT: &'static str = "TokenRegistered"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenIssued( + pub runtime_types::primitive_types::H160, + pub runtime_types::primitive_types::H160, + pub runtime_types::primitive_types::H160, + pub runtime_types::primitive_types::U256, + ); + impl ::subxt::Event for TokenIssued { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const EVENT: &'static str = "TokenIssued"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MappingFactoryAddressUpdated( + pub runtime_types::primitive_types::H160, + pub runtime_types::primitive_types::H160, + ); + impl ::subxt::Event for MappingFactoryAddressUpdated { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const EVENT: &'static str = "MappingFactoryAddressUpdated"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct RemoteBackingAccountUpdated(pub ::subxt::sp_core::crypto::AccountId32); + impl ::subxt::Event for RemoteBackingAccountUpdated { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const EVENT: &'static str = "RemoteBackingAccountUpdated"; + } + } + pub mod storage { + use super::runtime_types; + pub struct RemoteBackingAccount; + impl ::subxt::StorageEntry for RemoteBackingAccount { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const STORAGE: &'static str = "RemoteBackingAccount"; + type Value = ::subxt::sp_core::crypto::AccountId32; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct MappingFactoryAddress; + impl ::subxt::StorageEntry for MappingFactoryAddress { + const PALLET: &'static str = "Substrate2SubstrateIssuing"; + const STORAGE: &'static str = "MappingFactoryAddress"; + type Value = runtime_types::primitive_types::H160; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct StorageApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> StorageApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } + pub async fn remote_backing_account( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::sp_core::crypto::AccountId32, + ::subxt::BasicError, + > { + let entry = RemoteBackingAccount; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn mapping_factory_address( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result + { + let entry = MappingFactoryAddress; + self.client.storage().fetch_or_default(&entry, hash).await + } + } + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn pallet_id( + &self, + ) -> ::core::result::Result< + runtime_types::frame_support::PalletId, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[100u8, 97u8, 47u8, 115u8, 50u8, 115u8, 105u8, 115u8][..], + )?) + } + } + } + } + pub mod to_pangolin_parachain_backing { + use super::runtime_types; + pub mod calls { + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct lock_and_remote_issue { + pub spec_version: ::core::primitive::u32, + pub weight: ::core::primitive::u64, + #[codec(compact)] + pub value: ::core::primitive::u128, + #[codec(compact)] + pub fee: ::core::primitive::u128, + pub recipient: ::subxt::sp_core::crypto::AccountId32, + } + impl ::subxt::Call for lock_and_remote_issue { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const FUNCTION: &'static str = "lock_and_remote_issue"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct unlock_from_remote { + pub amount: ::core::primitive::u128, + pub recipient: ::subxt::sp_core::crypto::AccountId32, + } + impl ::subxt::Call for unlock_from_remote { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const FUNCTION: &'static str = "unlock_from_remote"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct set_secure_limited_period { + pub period: ::core::primitive::u32, + } + impl ::subxt::Call for set_secure_limited_period { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const FUNCTION: &'static str = "set_secure_limited_period"; + } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct set_security_limitation_ring_amount { + pub limitation: ::core::primitive::u128, + } + impl ::subxt::Call for set_security_limitation_ring_amount { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const FUNCTION: &'static str = "set_security_limitation_ring_amount"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct set_remote_mapping_token_factory_account { + pub account: ::subxt::sp_core::crypto::AccountId32, + } + impl ::subxt::Call for set_remote_mapping_token_factory_account { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const FUNCTION: &'static str = "set_remote_mapping_token_factory_account"; + } + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, + } + } + pub fn lock_and_remote_issue( + &self, + spec_version: ::core::primitive::u32, + weight: ::core::primitive::u64, + value: ::core::primitive::u128, + fee: ::core::primitive::u128, + recipient: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, lock_and_remote_issue, DispatchError> + { + let call = lock_and_remote_issue { + spec_version, + weight, + value, + fee, + recipient, + }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn unlock_from_remote( + &self, + amount: ::core::primitive::u128, + recipient: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, unlock_from_remote, DispatchError> + { + let call = unlock_from_remote { amount, recipient }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_secure_limited_period( + &self, + period: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_secure_limited_period, + DispatchError, + > { + let call = set_secure_limited_period { period }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_security_limitation_ring_amount( + &self, + limitation: ::core::primitive::u128, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_security_limitation_ring_amount, + DispatchError, + > { + let call = set_security_limitation_ring_amount { limitation }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_remote_mapping_token_factory_account( + &self, + account: ::subxt::sp_core::crypto::AccountId32, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + set_remote_mapping_token_factory_account, + DispatchError, + > { + let call = set_remote_mapping_token_factory_account { account }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } + } + pub type Event = runtime_types::to_parachain_backing::pallet::Event; + pub mod events { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenLocked( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for TokenLocked { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const EVENT: &'static str = "TokenLocked"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenUnlocked( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for TokenUnlocked { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const EVENT: &'static str = "TokenUnlocked"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TokenLockedConfirmed( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + pub ::core::primitive::bool, + ); + impl ::subxt::Event for TokenLockedConfirmed { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const EVENT: &'static str = "TokenLockedConfirmed"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct RemoteMappingFactoryAddressUpdated( + pub ::subxt::sp_core::crypto::AccountId32, + ); + impl ::subxt::Event for RemoteMappingFactoryAddressUpdated { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const EVENT: &'static str = "RemoteMappingFactoryAddressUpdated"; + } + } + pub mod storage { + use super::runtime_types; + pub struct SecureLimitedPeriod; + impl ::subxt::StorageEntry for SecureLimitedPeriod { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const STORAGE: &'static str = "SecureLimitedPeriod"; + type Value = ::core::primitive::u32; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct SecureLimitedRingAmount; + impl ::subxt::StorageEntry for SecureLimitedRingAmount { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const STORAGE: &'static str = "SecureLimitedRingAmount"; + type Value = (::core::primitive::u128, ::core::primitive::u128); + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct TransactionInfos( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + ); + impl ::subxt::StorageEntry for TransactionInfos { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const STORAGE: &'static str = "TransactionInfos"; + type Value = ( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ); + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Blake2_128Concat, + )]) + } + } + pub struct RemoteMappingTokenFactoryAccount; + impl ::subxt::StorageEntry for RemoteMappingTokenFactoryAccount { + const PALLET: &'static str = "ToPangolinParachainBacking"; + const STORAGE: &'static str = "RemoteMappingTokenFactoryAccount"; + type Value = ::subxt::sp_core::crypto::AccountId32; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct StorageApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> StorageApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } + pub async fn secure_limited_period( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> + { + let entry = SecureLimitedPeriod; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn secure_limited_ring_amount( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + (::core::primitive::u128, ::core::primitive::u128), + ::subxt::BasicError, + > { + let entry = SecureLimitedRingAmount; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn transaction_infos( + &self, + _0: [::core::primitive::u8; 4usize], + _1: ::core::primitive::u64, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, - ), - #[codec(index = 16)] - Blacklisted(::subxt::sp_core::H256), + )>, + ::subxt::BasicError, + > { + let entry = TransactionInfos(_0, _1); + self.client.storage().fetch(&entry, hash).await + } + pub async fn transaction_infos_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::KeyIter<'a, T, TransactionInfos>, + ::subxt::BasicError, + > { + self.client.storage().iter(hash).await + } + pub async fn remote_mapping_token_factory_account( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::subxt::sp_core::crypto::AccountId32, + ::subxt::BasicError, + > { + let entry = RemoteMappingTokenFactoryAccount; + self.client.storage().fetch_or_default(&entry, hash).await } } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Delegations<_0> { - pub votes: _0, - pub capital: _0, + } + pub mod constants { + use super::runtime_types; + pub struct ConstantsApi; + impl ConstantsApi { + pub fn pallet_id( + &self, + ) -> ::core::result::Result< + runtime_types::frame_support::PalletId, + ::subxt::BasicError, + > { + Ok(::subxt::codec::Decode::decode( + &mut &[112u8, 108u8, 47u8, 115u8, 50u8, 115u8, 98u8, 97u8][..], + )?) } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum ReferendumInfo<_0, _1, _2> { - #[codec(index = 0)] - Ongoing(runtime_types::darwinia_democracy::types::ReferendumStatus<_0, _1, _2>), - #[codec(index = 1)] - Finished { - approved: ::core::primitive::bool, - end: _0, - }, + pub fn max_lock_ring_amount_per_tx( + &self, + ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> + { + Ok(::subxt::codec::Decode::decode( + &mut &[ + 0u8, 160u8, 114u8, 78u8, 24u8, 9u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 0u8, + ][..], + )?) } + } + } + } + pub mod runtime_types { + use super::runtime_types; + pub mod beefy_primitives { + use super::runtime_types; + pub mod crypto { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct ReferendumStatus<_0, _1, _2> { - pub end: _0, - pub proposal_hash: _1, - pub threshold: runtime_types::darwinia_democracy::vote_threshold::VoteThreshold, - pub delay: _0, - pub tally: runtime_types::darwinia_democracy::types::Tally<_2>, - } + pub struct Public(pub runtime_types::sp_core::ecdsa::Public); + } + } + pub mod bitvec { + use super::runtime_types; + pub mod order { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct Tally<_0> { - pub ayes: _0, - pub nays: _0, - pub turnout: _0, - } + pub struct Msb0; } - pub mod vote { + } + pub mod bp_header_chain { + use super::runtime_types; + pub mod justification { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum AccountVote<_0> { - #[codec(index = 0)] - Standard { - vote: runtime_types::darwinia_democracy::vote::Vote, - balance: _0, - }, - #[codec(index = 1)] - Split { aye: _0, nay: _0 }, + pub struct GrandpaJustification<_0> { + pub round: ::core::primitive::u64, + pub commit: runtime_types::finality_grandpa::Commit< + ::subxt::sp_core::H256, + ::core::primitive::u32, + runtime_types::sp_finality_grandpa::app::Signature, + runtime_types::sp_finality_grandpa::app::Public, + >, + pub votes_ancestries: ::std::vec::Vec<_0>, } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct AuthoritySet { + pub authorities: ::std::vec::Vec<( + runtime_types::sp_finality_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub set_id: ::core::primitive::u64, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct InitializationData<_0> { + pub header: ::std::boxed::Box<_0>, + pub authority_list: ::std::vec::Vec<( + runtime_types::sp_finality_grandpa::app::Public, + ::core::primitive::u64, + )>, + pub set_id: ::core::primitive::u64, + pub is_halted: ::core::primitive::bool, + } + } + pub mod bp_message_dispatch { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum CallOrigin<_0, _1, _2> { + #[codec(index = 0)] + SourceRoot, + #[codec(index = 1)] + TargetAccount(_0, _1, _2), + #[codec(index = 2)] + SourceAccount(_0), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessagePayload<_0, _1, _2, _3> { + pub spec_version: ::core::primitive::u32, + pub weight: ::core::primitive::u64, + pub origin: runtime_types::bp_message_dispatch::CallOrigin<_0, _1, _2>, + pub dispatch_fee_payment: runtime_types::bp_runtime::messages::DispatchFeePayment, + pub call: _3, + } + } + pub mod bp_messages { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct DeliveredMessages { + pub begin: ::core::primitive::u64, + pub end: ::core::primitive::u64, + pub dispatch_results: ::subxt::bitvec::vec::BitVec< + ::subxt::bitvec::order::Msb0, + ::core::primitive::u8, + >, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct InboundLaneData<_0> { + pub relayers: ::std::vec::Vec>, + pub last_confirmed_nonce: ::core::primitive::u64, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessageData<_0> { + pub payload: ::std::vec::Vec<::core::primitive::u8>, + pub fee: _0, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MessageKey { + pub lane_id: [::core::primitive::u8; 4usize], + pub nonce: ::core::primitive::u64, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum OperatingMode { + #[codec(index = 0)] + Normal, + #[codec(index = 1)] + RejectingOutboundMessages, + #[codec(index = 2)] + Halted, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct OutboundLaneData { + pub oldest_unpruned_nonce: ::core::primitive::u64, + pub latest_received_nonce: ::core::primitive::u64, + pub latest_generated_nonce: ::core::primitive::u64, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct UnrewardedRelayer<_0> { + pub relayer: _0, + pub messages: runtime_types::bp_messages::DeliveredMessages, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct UnrewardedRelayersState { + pub unrewarded_relayer_entries: ::core::primitive::u64, + pub messages_in_oldest_entry: ::core::primitive::u64, + pub total_messages: ::core::primitive::u64, + } + } + pub mod bp_polkadot_core { + use super::runtime_types; + pub mod parachains { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct PriorLock<_0, _1>(pub _0, pub _1); + pub struct ParaHead(pub ::std::vec::Vec<::core::primitive::u8>); #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, @@ -20191,100 +20448,127 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct Vote(pub ::core::primitive::u8); + pub struct ParaId(pub ::core::primitive::u32); + } + } + pub mod bp_runtime { + use super::runtime_types; + pub mod messages { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Voting<_0, _1, _2> { + pub enum DispatchFeePayment { #[codec(index = 0)] - Direct { - votes: ::std::vec::Vec<( - _2, - runtime_types::darwinia_democracy::vote::AccountVote<_0>, - )>, - delegations: runtime_types::darwinia_democracy::types::Delegations<_0>, - prior: runtime_types::darwinia_democracy::vote::PriorLock<_2, _0>, - }, + AtSourceChain, #[codec(index = 1)] - Delegating { - balance: _0, - target: _1, - conviction: runtime_types::darwinia_democracy::conviction::Conviction, - delegations: runtime_types::darwinia_democracy::types::Delegations<_0>, - prior: runtime_types::darwinia_democracy::vote::PriorLock<_2, _0>, - }, + AtTargetChain, + } + } + } + pub mod bridge_runtime_common { + use super::runtime_types; + pub mod messages { + use super::runtime_types; + pub mod source { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct FromBridgedChainMessagesDeliveryProof<_0> { + pub bridged_header_hash: _0, + pub storage_proof: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub lane: [::core::primitive::u8; 4usize], + } + } + pub mod target { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct FromBridgedChainMessagesProof<_0> { + pub bridged_header_hash: _0, + pub storage_proof: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + pub lane: [::core::primitive::u8; 4usize], + pub nonces_start: ::core::primitive::u64, + pub nonces_end: ::core::primitive::u64, + } } } - pub mod vote_threshold { + } + pub mod darwinia_balances { + use super::runtime_types; + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum VoteThreshold { - #[codec(index = 0)] - SuperMajorityApprove, - #[codec(index = 1)] - SuperMajorityAgainst, - #[codec(index = 2)] - SimpleMajority, + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::darwinia_balances::pallet::Reasons, } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum PreimageStatus<_0, _1, _2> { - #[codec(index = 0)] - Missing(_2), - #[codec(index = 1)] - Available { - data: ::std::vec::Vec<::core::primitive::u8>, - provider: _0, - deposit: _1, - since: _2, - expiry: ::core::option::Option<_2>, - }, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Releases { - #[codec(index = 0)] - V1, - } - } - pub mod darwinia_elections_phragmen { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Call { #[codec(index = 0)] - vote { - votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + transfer { + dest: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, #[codec(compact)] value: ::core::primitive::u128, }, #[codec(index = 1)] - remove_voter, + set_balance { + who: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + new_free: ::core::primitive::u128, + #[codec(compact)] + new_reserved: ::core::primitive::u128, + }, #[codec(index = 2)] - submit_candidacy { + force_transfer { + source: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + dest: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, #[codec(compact)] - candidate_count: ::core::primitive::u32, + value: ::core::primitive::u128, }, #[codec(index = 3)] - renounce_candidacy { - renouncing: runtime_types::darwinia_elections_phragmen::Renouncing, + transfer_keep_alive { + dest: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + value: ::core::primitive::u128, }, #[codec(index = 4)] - remove_member { - who: ::subxt::sp_runtime::MultiAddress< + transfer_all { + dest: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, - has_replacement: ::core::primitive::bool, + keep_alive: ::core::primitive::bool, }, #[codec(index = 5)] - clean_defunct_voters { - num_voters: ::core::primitive::u32, - num_defunct: ::core::primitive::u32, + force_unreserve { + who: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + amount: ::core::primitive::u128, }, } #[derive( @@ -20292,91 +20576,268 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - UnableToVote, + VestingBalance, #[codec(index = 1)] - NoVotes, + LiquidityRestrictions, #[codec(index = 2)] - TooManyVotes, + InsufficientBalance, #[codec(index = 3)] - MaximumVotesExceeded, + ExistentialDeposit, #[codec(index = 4)] - LowBalance, + KeepAlive, #[codec(index = 5)] - UnableToPayBond, + ExistingVestingSchedule, #[codec(index = 6)] - MustBeVoter, + DeadAccount, #[codec(index = 7)] - ReportSelf, + TooManyReserves, #[codec(index = 8)] - DuplicatedCandidate, - #[codec(index = 9)] - MemberSubmit, - #[codec(index = 10)] - RunnerUpSubmit, - #[codec(index = 11)] - InsufficientCandidateFunds, - #[codec(index = 12)] - NotMember, - #[codec(index = 13)] - InvalidWitnessData, - #[codec(index = 14)] - InvalidVoteCount, - #[codec(index = 15)] - InvalidRenouncing, - #[codec(index = 16)] - InvalidReplacement, + LockP, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - NewTerm( - ::std::vec::Vec<( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - )>, + Endowed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, ), #[codec(index = 1)] - EmptyTerm, + DustLost( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), #[codec(index = 2)] - ElectionError, + Transfer( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), #[codec(index = 3)] - MemberKicked(::subxt::sp_core::crypto::AccountId32), + BalanceSet( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u128, + ), #[codec(index = 4)] - Renounced(::subxt::sp_core::crypto::AccountId32), + Reserved( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), #[codec(index = 5)] - CandidateSlashed( + Unreserved( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ), #[codec(index = 6)] - SeatHolderSlashed( + ReserveRepatriated( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, + ), + #[codec(index = 7)] + Deposit( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 8)] + Withdraw( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 9)] + Slashed( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ), } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Releases { + #[codec(index = 0)] + V1_0_0, + #[codec(index = 1)] + V2_0_0, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct ReserveData<_0, _1> { + pub id: _0, + pub amount: _1, + } + } + } + pub mod darwinia_bridge_ethereum { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Call { + #[codec(index = 0)] + affirm { + ethereum_relay_header_parcel: + runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, + optional_ethereum_relay_proofs: ::core::option::Option< + runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, + >, + }, + #[codec(index = 1)] + dispute_and_affirm { + ethereum_relay_header_parcel: + runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, + optional_ethereum_relay_proofs: ::core::option::Option< + runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, + >, + }, + #[codec(index = 2)] + complete_relay_proofs { + affirmation_id: + runtime_types::darwinia_relay_primitives::relayer_game::RelayAffirmationId< + ::core::primitive::u64, + >, + ethereum_relay_proofs: ::std::vec::Vec< + runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, + >, + }, + #[codec(index = 3)] + extend_affirmation { + extended_ethereum_relay_affirmation_id: + runtime_types::darwinia_relay_primitives::relayer_game::RelayAffirmationId< + ::core::primitive::u64, + >, + game_sample_points: ::std::vec::Vec< + runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, + >, + optional_ethereum_relay_proofs: ::core::option::Option< + ::std::vec::Vec< + runtime_types::darwinia_bridge_ethereum::EthereumRelayProofs, + >, + >, + }, + #[codec(index = 4)] + vote_pending_relay_header_parcel { + ethereum_block_number: ::core::primitive::u64, + aye: ::core::primitive::bool, + }, + #[codec(index = 5)] + check_receipt { + ethereum_proof_record: + runtime_types::ethereum_primitives::receipt::ReceiptProof, + ethereum_header: runtime_types::ethereum_primitives::header::Header, + mmr_proof: runtime_types::darwinia_bridge_ethereum::MMRProof, + }, + #[codec(index = 6)] + set_receipt_verify_fee { + #[codec(compact)] + new: ::core::primitive::u128, + }, + #[codec(index = 7)] + remove_confirmed_parcel_of { + confirmed_block_number: ::core::primitive::u64, + }, + #[codec(index = 8)] + clean_confirmed_parcels, + #[codec(index = 9)] + set_confirmed_parcel { + ethereum_relay_header_parcel: + runtime_types::darwinia_bridge_ethereum::EthereumRelayHeaderParcel, + }, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Renouncing { + pub struct CheckEthereumRelayHeaderParcel<_0>(::core::marker::PhantomData<_0>); + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Error { #[codec(index = 0)] - Member, + HeaderInv, #[codec(index = 1)] - RunnerUp, + ConfirmedBlocksC, #[codec(index = 2)] - Candidate(#[codec(compact)] ::core::primitive::u32), + ContinuousInv, + #[codec(index = 3)] + AffirmationExisted, + #[codec(index = 4)] + HeaderHashInv, + #[codec(index = 5)] + MMRInv, + #[codec(index = 6)] + HeaderHashMis, + #[codec(index = 7)] + ConfirmedHeaderNE, + #[codec(index = 8)] + ReceiptProofInv, + #[codec(index = 9)] + PendingRelayHeaderParcelNE, + #[codec(index = 10)] + PendingRelayHeaderParcelAE, + #[codec(index = 11)] + AlreadyVoteForAyeDup, + #[codec(index = 12)] + AlreadyVoteForNayDup, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SeatHolder<_0, _1> { - pub who: _0, - pub stake: _1, - pub deposit: _1, + pub struct EthereumRelayHeaderParcel { + pub header: runtime_types::ethereum_primitives::header::Header, + pub parent_mmr_root: ::subxt::sp_core::H256, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Voter<_0, _1> { - pub votes: ::std::vec::Vec<_0>, - pub stake: _1, - pub deposit: _1, + pub struct EthereumRelayProofs { + pub ethash_proof: + ::std::vec::Vec, + pub mmr_proof: ::std::vec::Vec<::subxt::sp_core::H256>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct MMRProof { + pub member_leaf_index: ::core::primitive::u64, + pub last_leaf_index: ::core::primitive::u64, + pub proof: ::std::vec::Vec<::subxt::sp_core::H256>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum RawEvent<_0, _1> { + #[codec(index = 0)] + Affirmed(_0, _1), + #[codec(index = 1)] + DisputedAndAffirmed(_0, _1), + #[codec(index = 2)] + Extended(_0, _1), + #[codec(index = 3)] + NewRound( + ::core::primitive::u64, + ::std::vec::Vec<::core::primitive::u64>, + ), + #[codec(index = 4)] + GameOver(::core::primitive::u64), + #[codec(index = 5)] + RemoveConfirmedParcel(::core::primitive::u64), + #[codec(index = 6)] + VerifyReceipt( + _0, + runtime_types::ethereum_primitives::receipt::TypedReceipt, + runtime_types::ethereum_primitives::header::Header, + ), + #[codec(index = 7)] + Pended(::core::primitive::u64), + #[codec(index = 8)] + GuardVoted(::core::primitive::u64, ::core::primitive::bool), + #[codec(index = 9)] + PendingRelayHeaderParcelConfirmed( + ::core::primitive::u64, + ::std::vec::Vec<::core::primitive::u8>, + ), + #[codec(index = 10)] + PendingRelayHeaderParcelRejected(::core::primitive::u64), } } pub mod darwinia_ethereum { @@ -20392,6 +20853,10 @@ pub mod api { transaction: runtime_types::ethereum::transaction::TransactionV2, }, #[codec(index = 1)] + message_transact { + transaction: runtime_types::ethereum::transaction::TransactionV2, + }, + #[codec(index = 2)] root_transact { target: runtime_types::primitive_types::H160, input: ::std::vec::Vec<::core::primitive::u8>, @@ -20413,6 +20878,10 @@ pub mod api { InternalTransactionFatalError, #[codec(index = 5)] ReadyOnlyCall, + #[codec(index = 6)] + MessageTransactionError, + #[codec(index = 7)] + MessageValidateError, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -20547,132 +21016,6 @@ pub mod api { } } } - pub mod darwinia_fee_market { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Call { - #[codec(index = 0)] - enroll_and_lock_collateral { - lock_collateral: ::core::primitive::u128, - relay_fee: ::core::option::Option<::core::primitive::u128>, - }, - #[codec(index = 1)] - update_locked_collateral { - new_collateral: ::core::primitive::u128, - }, - #[codec(index = 2)] - update_relay_fee { new_fee: ::core::primitive::u128 }, - #[codec(index = 3)] - cancel_enrollment, - #[codec(index = 4)] - set_slash_protect { - slash_protect: ::core::primitive::u128, - }, - #[codec(index = 5)] - set_assigned_relayers_number { number: ::core::primitive::u32 }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - InsufficientBalance, - #[codec(index = 1)] - AlreadyEnrolled, - #[codec(index = 2)] - NotEnrolled, - #[codec(index = 3)] - StillHasOrdersNotConfirmed, - #[codec(index = 4)] - RelayFeeTooLow, - #[codec(index = 5)] - OccupiedRelayer, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - Enroll( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u128, - ), - #[codec(index = 1)] - UpdateLockedCollateral( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 2)] - UpdateRelayFee( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 3)] - CancelEnrollment(::subxt::sp_core::crypto::AccountId32), - #[codec(index = 4)] - UpdateCollateralSlashProtect(::core::primitive::u128), - #[codec(index = 5)] - UpdateAssignedRelayersNumber(::core::primitive::u32), - #[codec(index = 6)] - FeeMarketSlash( - runtime_types::darwinia_fee_market::types::SlashReport< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::core::primitive::u128, - >, - ), - } - } - pub mod types { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Order<_0, _1, _2> { - pub lane: [::core::primitive::u8; 4usize], - pub message: ::core::primitive::u64, - pub sent_time: _1, - pub confirm_time: ::core::option::Option<_1>, - pub locked_collateral: _2, - pub relayers: ::std::vec::Vec< - runtime_types::darwinia_fee_market::types::PriorRelayer<_0, _1, _2>, - >, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct PriorRelayer<_0, _1, _2> { - pub id: _0, - pub fee: _2, - pub valid_range: ::core::ops::Range<_1>, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Relayer<_0, _1> { - pub id: _0, - pub collateral: _1, - pub fee: _1, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct SlashReport<_0, _1, _2> { - pub lane: [::core::primitive::u8; 4usize], - pub message: ::core::primitive::u64, - pub sent_time: _1, - pub confirm_time: ::core::option::Option<_1>, - pub delay_time: ::core::option::Option<_1>, - pub account_id: _0, - pub amount: _2, - } - } - } pub mod darwinia_relay_authorities { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -20900,14 +21243,18 @@ pub mod api { >, }, #[codec(index = 4)] - claim_mature_deposits, + withdraw_unbonded { + num_slashing_spans: ::core::primitive::u32, + }, #[codec(index = 5)] - try_claim_deposits_with_punish { expire_time: ::core::primitive::u64 }, + claim_mature_deposits, #[codec(index = 6)] + try_claim_deposits_with_punish { expire_time: ::core::primitive::u64 }, + #[codec(index = 7)] validate { prefs: runtime_types::darwinia_staking::structs::ValidatorPrefs, }, - #[codec(index = 7)] + #[codec(index = 8)] nominate { targets: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< @@ -20916,80 +21263,80 @@ pub mod api { >, >, }, - #[codec(index = 8)] - chill, #[codec(index = 9)] + chill, + #[codec(index = 10)] set_payee { payee: runtime_types::darwinia_staking::structs::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, }, - #[codec(index = 10)] + #[codec(index = 11)] set_controller { controller: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, }, - #[codec(index = 11)] + #[codec(index = 12)] set_validator_count { #[codec(compact)] new: ::core::primitive::u32, }, - #[codec(index = 12)] + #[codec(index = 13)] increase_validator_count { #[codec(compact)] additional: ::core::primitive::u32, }, - #[codec(index = 13)] + #[codec(index = 14)] scale_validator_count { factor: runtime_types::sp_arithmetic::per_things::Percent, }, - #[codec(index = 14)] - force_no_eras, #[codec(index = 15)] - force_new_era, + force_no_eras, #[codec(index = 16)] + force_new_era, + #[codec(index = 17)] set_invulnerables { invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, }, - #[codec(index = 17)] + #[codec(index = 18)] force_unstake { stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, }, - #[codec(index = 18)] - force_new_era_always, #[codec(index = 19)] + force_new_era_always, + #[codec(index = 20)] cancel_deferred_slash { era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, }, - #[codec(index = 20)] + #[codec(index = 21)] payout_stakers { validator_stash: ::subxt::sp_core::crypto::AccountId32, era: ::core::primitive::u32, }, - #[codec(index = 21)] + #[codec(index = 22)] rebond { #[codec(compact)] plan_to_rebond_ring: ::core::primitive::u128, #[codec(compact)] plan_to_rebond_kton: ::core::primitive::u128, }, - #[codec(index = 22)] + #[codec(index = 23)] set_history_depth { #[codec(compact)] new_history_depth: ::core::primitive::u32, #[codec(compact)] era_items_deleted: ::core::primitive::u32, }, - #[codec(index = 23)] + #[codec(index = 24)] reap_stash { stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, }, - #[codec(index = 24)] + #[codec(index = 25)] kick { who: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< @@ -20998,7 +21345,7 @@ pub mod api { >, >, }, - #[codec(index = 25)] + #[codec(index = 26)] set_staking_limits { min_nominator_bond: ::core::primitive::u128, min_validator_bond: ::core::primitive::u128, @@ -21008,7 +21355,7 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Percent, >, }, - #[codec(index = 26)] + #[codec(index = 27)] chill_other { controller: ::subxt::sp_core::crypto::AccountId32, }, @@ -21341,34 +21688,6 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BalanceLock<_0, _1> { - pub id: [::core::primitive::u8; 8usize], - pub lock_for: runtime_types::darwinia_support::structs::LockFor<_0, _1>, - pub lock_reasons: runtime_types::darwinia_support::structs::LockReasons, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum LockFor<_0, _1> { - #[codec(index = 0)] - Common { amount: _0 }, - #[codec(index = 1)] - Staking(runtime_types::darwinia_support::structs::StakingLock<_0, _1>), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum LockReasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] pub struct StakingLock<_0, _1> { pub staking_amount: _0, pub unbondings: @@ -21385,102 +21704,6 @@ pub mod api { } } } - pub mod darwinia_vesting { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Call { - #[codec(index = 0)] - vest, - #[codec(index = 1)] - vest_other { - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - }, - #[codec(index = 2)] - vested_transfer { - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - }, - #[codec(index = 3)] - force_vested_transfer { - source: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - target: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - schedule: runtime_types::darwinia_vesting::vesting_info::VestingInfo< - ::core::primitive::u128, - ::core::primitive::u32, - >, - }, - #[codec(index = 4)] - merge_schedules { - schedule1_index: ::core::primitive::u32, - schedule2_index: ::core::primitive::u32, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - NotVesting, - #[codec(index = 1)] - AtMaxVestingSchedules, - #[codec(index = 2)] - AmountLow, - #[codec(index = 3)] - ScheduleIndexOutOfBounds, - #[codec(index = 4)] - InvalidScheduleParams, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - VestingUpdated( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), - #[codec(index = 1)] - VestingCompleted(::subxt::sp_core::crypto::AccountId32), - } - } - pub mod vesting_info { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct VestingInfo<_0, _1> { - pub locked: _0, - pub per_block: _0, - pub starting_block: _1, - } - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Releases { - #[codec(index = 0)] - V0, - #[codec(index = 1)] - V1, - } - } pub mod dp_asset { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -21921,336 +22144,611 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct UncheckedExtrinsic<_0, _1, _2, _3>( - pub - runtime_types::sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic< - _0, - _1, - _2, - _3, - >, - ); + pub struct UncheckedExtrinsic<_0, _1, _2, _3>( + pub + runtime_types::sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic< + _0, + _1, + _2, + _3, + >, + ); + } + } + pub mod frame_support { + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub mod bounded_btree_map { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct BoundedBTreeMap<_0, _1>(pub ::std::collections::BTreeMap<_0, _1>); + } + pub mod bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + pub mod weak_bounded_vec { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + } + } + pub mod traits { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct WrapperOpaque<_0>( + #[codec(compact)] pub ::core::primitive::u32, + pub _0, + ); + } + pub mod tokens { + use super::runtime_types; + pub mod misc { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum BalanceStatus { + #[codec(index = 0)] + Free, + #[codec(index = 1)] + Reserved, + } + } + } + } + pub mod weights { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum DispatchClass { + #[codec(index = 0)] + Normal, + #[codec(index = 1)] + Operational, + #[codec(index = 2)] + Mandatory, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct DispatchInfo { + pub weight: ::core::primitive::u64, + pub class: runtime_types::frame_support::weights::DispatchClass, + pub pays_fee: runtime_types::frame_support::weights::Pays, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Pays { + #[codec(index = 0)] + Yes, + #[codec(index = 1)] + No, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct PerDispatchClass<_0> { + pub normal: _0, + pub operational: _0, + pub mandatory: _0, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct RuntimeDbWeight { + pub read: ::core::primitive::u64, + pub write: ::core::primitive::u64, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct WeightToFeeCoefficient<_0> { + pub coeff_integer: _0, + pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, + pub negative: ::core::primitive::bool, + pub degree: ::core::primitive::u8, + } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct PalletId(pub [::core::primitive::u8; 8usize]); } - pub mod frame_support { + pub mod frame_system { use super::runtime_types; - pub mod storage { + pub mod extensions { use super::runtime_types; - pub mod bounded_btree_map { + pub mod check_genesis { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BoundedBTreeMap<_0, _1>(pub ::std::collections::BTreeMap<_0, _1>); + pub struct CheckGenesis; } - pub mod bounded_vec { + pub mod check_mortality { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BoundedVec<_0>(pub ::std::vec::Vec<_0>); + pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); } - pub mod weak_bounded_vec { + pub mod check_nonce { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct WeakBoundedVec<_0>(pub ::std::vec::Vec<_0>); + pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); } - } - pub mod traits { - use super::runtime_types; - pub mod misc { + pub mod check_spec_version { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct WrapperOpaque<_0>( - #[codec(compact)] pub ::core::primitive::u32, - pub _0, - ); + pub struct CheckSpecVersion; } - pub mod tokens { + pub mod check_tx_version { use super::runtime_types; - pub mod misc { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum BalanceStatus { - #[codec(index = 0)] - Free, - #[codec(index = 1)] - Reserved, - } - } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct CheckTxVersion; + } + pub mod check_weight { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct CheckWeight; } } - pub mod weights { + pub mod limits { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum DispatchClass { + pub struct BlockLength { + pub max: runtime_types::frame_support::weights::PerDispatchClass< + ::core::primitive::u32, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct BlockWeights { + pub base_block: ::core::primitive::u64, + pub max_block: ::core::primitive::u64, + pub per_class: runtime_types::frame_support::weights::PerDispatchClass< + runtime_types::frame_system::limits::WeightsPerClass, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct WeightsPerClass { + pub base_extrinsic: ::core::primitive::u64, + pub max_extrinsic: ::core::option::Option<::core::primitive::u64>, + pub max_total: ::core::option::Option<::core::primitive::u64>, + pub reserved: ::core::option::Option<::core::primitive::u64>, + } + } + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { #[codec(index = 0)] - Normal, + fill_block { + ratio: runtime_types::sp_arithmetic::per_things::Perbill, + }, #[codec(index = 1)] - Operational, + remark { + remark: ::std::vec::Vec<::core::primitive::u8>, + }, #[codec(index = 2)] - Mandatory, + set_heap_pages { pages: ::core::primitive::u64 }, + #[codec(index = 3)] + set_code { + code: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + set_code_without_checks { + code: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 5)] + set_changes_trie_config { + changes_trie_config: ::core::option::Option< + runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, + >, + }, + #[codec(index = 6)] + set_storage { + items: ::std::vec::Vec<( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + )>, + }, + #[codec(index = 7)] + kill_storage { + keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + }, + #[codec(index = 8)] + kill_prefix { + prefix: ::std::vec::Vec<::core::primitive::u8>, + subkeys: ::core::primitive::u32, + }, + #[codec(index = 9)] + remark_with_event { + remark: ::std::vec::Vec<::core::primitive::u8>, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct DispatchInfo { - pub weight: ::core::primitive::u64, - pub class: runtime_types::frame_support::weights::DispatchClass, - pub pays_fee: runtime_types::frame_support::weights::Pays, + pub enum Error { + #[codec(index = 0)] + InvalidSpecName, + #[codec(index = 1)] + SpecVersionNeedsToIncrease, + #[codec(index = 2)] + FailedToExtractRuntimeVersion, + #[codec(index = 3)] + NonDefaultComposite, + #[codec(index = 4)] + NonZeroRefCount, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Pays { + pub enum Event { #[codec(index = 0)] - Yes, + ExtrinsicSuccess(runtime_types::frame_support::weights::DispatchInfo), #[codec(index = 1)] - No, + ExtrinsicFailed( + runtime_types::sp_runtime::DispatchError, + runtime_types::frame_support::weights::DispatchInfo, + ), + #[codec(index = 2)] + CodeUpdated, + #[codec(index = 3)] + NewAccount(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 4)] + KilledAccount(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 5)] + Remarked( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ), } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct AccountInfo<_0, _1> { + pub nonce: _0, + pub consumers: _0, + pub providers: _0, + pub sufficients: _0, + pub data: _1, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct EventRecord<_0, _1> { + pub phase: runtime_types::frame_system::Phase, + pub event: _0, + pub topics: ::std::vec::Vec<_1>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct LastRuntimeUpgradeInfo { + #[codec(compact)] + pub spec_version: ::core::primitive::u32, + pub spec_name: ::std::string::String, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Phase { + #[codec(index = 0)] + ApplyExtrinsic(::core::primitive::u32), + #[codec(index = 1)] + Finalization, + #[codec(index = 2)] + Initialization, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum RawOrigin<_0> { + #[codec(index = 0)] + Root, + #[codec(index = 1)] + Signed(_0), + #[codec(index = 2)] + None, + } + } + pub mod from_ethereum_issuing { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct PerDispatchClass<_0> { - pub normal: _0, - pub operational: _0, - pub mandatory: _0, + pub enum Call { + #[codec(index = 0)] + register_erc20 { + proof: ( + runtime_types::ethereum_primitives::header::Header, + runtime_types::ethereum_primitives::receipt::ReceiptProof, + runtime_types::darwinia_bridge_ethereum::MMRProof, + ), + }, + #[codec(index = 1)] + redeem_erc20 { + proof: ( + runtime_types::ethereum_primitives::header::Header, + runtime_types::ethereum_primitives::receipt::ReceiptProof, + runtime_types::darwinia_bridge_ethereum::MMRProof, + ), + }, + #[codec(index = 2)] + register_response_from_contract { + input: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 3)] + deposit_burn_token_event_from_precompile { + input: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 4)] + set_mapping_factory_address { + address: runtime_types::primitive_types::H160, + }, + #[codec(index = 5)] + set_ethereum_backing_address { + address: runtime_types::primitive_types::H160, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct RuntimeDbWeight { - pub read: ::core::primitive::u64, - pub write: ::core::primitive::u64, + pub enum Error { + #[codec(index = 0)] + InvalidIssuingAccount, + #[codec(index = 1)] + AssetAlreadyRegistered, + #[codec(index = 2)] + AssetAlreadyRedeemed, + #[codec(index = 3)] + StringCF, + #[codec(index = 4)] + InvalidEncodeERC20, + #[codec(index = 5)] + InvalidAddressLen, + #[codec(index = 6)] + InvalidInputData, + #[codec(index = 7)] + DecodeEventFailed, + #[codec(index = 8)] + NoAuthority, + #[codec(index = 9)] + UnsupportedAction, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct WeightToFeeCoefficient<_0> { - pub coeff_integer: _0, - pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, - pub negative: ::core::primitive::bool, - pub degree: ::core::primitive::u8, + pub enum Event { + #[codec(index = 0)] + TokenRegisterSubmitted( + runtime_types::primitive_types::H160, + (::subxt::sp_core::H256, ::core::primitive::u64), + ), + #[codec(index = 1)] + RedeemErc20( + runtime_types::primitive_types::H160, + (::subxt::sp_core::H256, ::core::primitive::u64), + ), + #[codec(index = 2)] + BurnToken( + ::core::primitive::u8, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::U256, + ), + #[codec(index = 3)] + TokenRegisterFinished( + ::core::primitive::u8, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + ), + #[codec(index = 4)] + MappingFactoryAddressUpdated( + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + ), + #[codec(index = 5)] + EthereumBackingAddressUpdated( + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + ), } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PalletId(pub [::core::primitive::u8; 8usize]); } - pub mod frame_system { + pub mod from_substrate_issuing { use super::runtime_types; - pub mod extensions { - use super::runtime_types; - pub mod check_genesis { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckGenesis; - } - pub mod check_mortality { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckMortality(pub runtime_types::sp_runtime::generic::era::Era); - } - pub mod check_nonce { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckNonce(#[codec(compact)] pub ::core::primitive::u32); - } - pub mod check_spec_version { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckSpecVersion; - } - pub mod check_tx_version { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckTxVersion; - } - pub mod check_weight { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct CheckWeight; - } - } - pub mod limits { + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BlockLength { - pub max: runtime_types::frame_support::weights::PerDispatchClass< - ::core::primitive::u32, - >, + pub enum Call { + #[codec(index = 0)] + register_from_remote { + token_metadata: runtime_types::dp_asset::TokenMetadata, + }, + #[codec(index = 1)] + issue_from_remote { + token_address: runtime_types::primitive_types::H160, + amount: runtime_types::primitive_types::U256, + recipient: runtime_types::primitive_types::H160, + }, + #[codec(index = 2)] + set_mapping_factory_address { + address: runtime_types::primitive_types::H160, + }, + #[codec(index = 3)] + set_remote_backing_account { + account: ::subxt::sp_core::crypto::AccountId32, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BlockWeights { - pub base_block: ::core::primitive::u64, - pub max_block: ::core::primitive::u64, - pub per_class: runtime_types::frame_support::weights::PerDispatchClass< - runtime_types::frame_system::limits::WeightsPerClass, - >, + pub enum Error { + #[codec(index = 0)] + TokenUnregistered, + #[codec(index = 1)] + InvalidIssuingAccount, + #[codec(index = 2)] + StringCF, + #[codec(index = 3)] + InvalidEncodeERC20, + #[codec(index = 4)] + InvalidIssueEncoding, + #[codec(index = 5)] + InvalidAddressLen, + #[codec(index = 6)] + InvalidMessageSender, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct WeightsPerClass { - pub base_extrinsic: ::core::primitive::u64, - pub max_extrinsic: ::core::option::Option<::core::primitive::u64>, - pub max_total: ::core::option::Option<::core::primitive::u64>, - pub reserved: ::core::option::Option<::core::primitive::u64>, + pub enum Event { + #[codec(index = 0)] + TokenRegistered( + ::subxt::sp_core::crypto::AccountId32, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + ), + #[codec(index = 1)] + TokenIssued( + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::U256, + ), + #[codec(index = 2)] + MappingFactoryAddressUpdated( + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + ), + #[codec(index = 3)] + RemoteBackingAccountUpdated(::subxt::sp_core::crypto::AccountId32), } } - pub mod pallet { + } + pub mod module_transaction_pause { + use super::runtime_types; + pub mod module { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Call { #[codec(index = 0)] - fill_block { - ratio: runtime_types::sp_arithmetic::per_things::Perbill, + pause_transaction { + pallet_name: ::std::vec::Vec<::core::primitive::u8>, + function_name: ::std::vec::Vec<::core::primitive::u8>, }, #[codec(index = 1)] - remark { - remark: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 2)] - set_heap_pages { pages: ::core::primitive::u64 }, - #[codec(index = 3)] - set_code { - code: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 4)] - set_code_without_checks { - code: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 5)] - set_changes_trie_config { - changes_trie_config: ::core::option::Option< - runtime_types::sp_core::changes_trie::ChangesTrieConfiguration, - >, - }, - #[codec(index = 6)] - set_storage { - items: ::std::vec::Vec<( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, - )>, - }, - #[codec(index = 7)] - kill_storage { - keys: ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, - }, - #[codec(index = 8)] - kill_prefix { - prefix: ::std::vec::Vec<::core::primitive::u8>, - subkeys: ::core::primitive::u32, - }, - #[codec(index = 9)] - remark_with_event { - remark: ::std::vec::Vec<::core::primitive::u8>, + unpause_transaction { + pallet_name: ::std::vec::Vec<::core::primitive::u8>, + function_name: ::std::vec::Vec<::core::primitive::u8>, }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Error { + pub enum Error { + #[codec(index = 0)] + CannotPause, + #[codec(index = 1)] + InvalidCharacter, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { #[codec(index = 0)] - InvalidSpecName, + TransactionPaused( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + ), #[codec(index = 1)] - SpecVersionNeedsToIncrease, - #[codec(index = 2)] - FailedToExtractRuntimeVersion, - #[codec(index = 3)] - NonDefaultComposite, - #[codec(index = 4)] - NonZeroRefCount, + TransactionUnpaused( + ::std::vec::Vec<::core::primitive::u8>, + ::std::vec::Vec<::core::primitive::u8>, + ), } + } + } + pub mod pallet_authorship { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Event { + pub enum Call { #[codec(index = 0)] - ExtrinsicSuccess(runtime_types::frame_support::weights::DispatchInfo), + set_uncles { + new_uncles: ::std::vec::Vec< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + InvalidUncleParent, #[codec(index = 1)] - ExtrinsicFailed( - runtime_types::sp_runtime::DispatchError, - runtime_types::frame_support::weights::DispatchInfo, - ), + UnclesAlreadySet, #[codec(index = 2)] - CodeUpdated, + TooManyUncles, #[codec(index = 3)] - NewAccount(::subxt::sp_core::crypto::AccountId32), + GenesisUncle, #[codec(index = 4)] - KilledAccount(::subxt::sp_core::crypto::AccountId32), + TooHighUncle, #[codec(index = 5)] - Remarked( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ), + UncleAlreadyIncluded, + #[codec(index = 6)] + OldUncle, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AccountInfo<_0, _1> { - pub nonce: _0, - pub consumers: _0, - pub providers: _0, - pub sufficients: _0, - pub data: _1, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct EventRecord<_0, _1> { - pub phase: runtime_types::frame_system::Phase, - pub event: _0, - pub topics: ::std::vec::Vec<_1>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct LastRuntimeUpgradeInfo { - #[codec(compact)] - pub spec_version: ::core::primitive::u32, - pub spec_name: ::std::string::String, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum Phase { - #[codec(index = 0)] - ApplyExtrinsic(::core::primitive::u32), - #[codec(index = 1)] - Finalization, - #[codec(index = 2)] - Initialization, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawOrigin<_0> { + pub enum UncleEntryItem<_0, _1, _2> { #[codec(index = 0)] - Root, + InclusionHeight(_0), #[codec(index = 1)] - Signed(_0), - #[codec(index = 2)] - None, + Uncle(_1, ::core::option::Option<_2>), } } - pub mod from_ethereum_issuing { + pub mod pallet_babe { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -22259,36 +22757,34 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - register_erc20 { - proof: ( - runtime_types::ethereum_primitives::header::Header, - runtime_types::ethereum_primitives::receipt::ReceiptProof, - runtime_types::darwinia_bridge_ethereum::MMRProof, - ), + report_equivocation { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, }, #[codec(index = 1)] - redeem_erc20 { - proof: ( - runtime_types::ethereum_primitives::header::Header, - runtime_types::ethereum_primitives::receipt::ReceiptProof, - runtime_types::darwinia_bridge_ethereum::MMRProof, - ), + report_equivocation_unsigned { + equivocation_proof: ::std::boxed::Box< + runtime_types::sp_consensus_slots::EquivocationProof< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + runtime_types::sp_consensus_babe::app::Public, + >, + >, + key_owner_proof: runtime_types::sp_session::MembershipProof, }, #[codec(index = 2)] - register_response_from_contract { - input: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 3)] - deposit_burn_token_event_from_precompile { - input: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 4)] - set_mapping_factory_address { - address: runtime_types::primitive_types::H160, - }, - #[codec(index = 5)] - set_ethereum_backing_address { - address: runtime_types::primitive_types::H160, + plan_config_change { + config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, }, } #[derive( @@ -22296,71 +22792,49 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - InvalidIssuingAccount, + InvalidEquivocationProof, #[codec(index = 1)] - AssetAlreadyRegistered, + InvalidKeyOwnershipProof, #[codec(index = 2)] - AssetAlreadyRedeemed, - #[codec(index = 3)] - StringCF, - #[codec(index = 4)] - InvalidEncodeERC20, - #[codec(index = 5)] - InvalidAddressLen, - #[codec(index = 6)] - InvalidInputData, - #[codec(index = 7)] - DecodeEventFailed, - #[codec(index = 8)] - NoAuthority, - #[codec(index = 9)] - UnsupportedAction, + DuplicateOffenceReport, + } + } + } + pub mod pallet_base_fee { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + set_base_fee_per_gas { + fee: runtime_types::primitive_types::U256, + }, + #[codec(index = 1)] + set_is_active { is_active: ::core::primitive::bool }, + #[codec(index = 2)] + set_elasticity { + elasticity: runtime_types::sp_arithmetic::per_things::Permill, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - TokenRegisterSubmitted( - runtime_types::primitive_types::H160, - (::subxt::sp_core::H256, ::core::primitive::u64), - ), + NewBaseFeePerGas(runtime_types::primitive_types::U256), #[codec(index = 1)] - RedeemErc20( - runtime_types::primitive_types::H160, - (::subxt::sp_core::H256, ::core::primitive::u64), - ), + BaseFeeOverflow, #[codec(index = 2)] - BurnToken( - ::core::primitive::u8, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::U256, - ), + IsActive(::core::primitive::bool), #[codec(index = 3)] - TokenRegisterFinished( - ::core::primitive::u8, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - ), - #[codec(index = 4)] - MappingFactoryAddressUpdated( - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - ), - #[codec(index = 5)] - EthereumBackingAddressUpdated( - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - ), + NewElasticity(runtime_types::sp_arithmetic::per_things::Permill), } } } - pub mod from_substrate_issuing { + pub mod pallet_bounties { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -22369,22 +22843,61 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - register_from_remote { - token_metadata: runtime_types::dp_asset::TokenMetadata, + propose_bounty { + #[codec(compact)] + value: ::core::primitive::u128, + description: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 1)] + approve_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 2)] + propose_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + curator: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + #[codec(compact)] + fee: ::core::primitive::u128, + }, + #[codec(index = 3)] + unassign_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, }, - #[codec(index = 1)] - issue_from_remote { - token_address: runtime_types::primitive_types::H160, - amount: runtime_types::primitive_types::U256, - recipient: runtime_types::primitive_types::H160, + #[codec(index = 4)] + accept_curator { + #[codec(compact)] + bounty_id: ::core::primitive::u32, }, - #[codec(index = 2)] - set_mapping_factory_address { - address: runtime_types::primitive_types::H160, + #[codec(index = 5)] + award_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + beneficiary: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, }, - #[codec(index = 3)] - set_remote_backing_account { - account: ::subxt::sp_core::crypto::AccountId32, + #[codec(index = 6)] + claim_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 7)] + close_bounty { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + }, + #[codec(index = 8)] + extend_bounty_expiry { + #[codec(compact)] + bounty_id: ::core::primitive::u32, + remark: ::std::vec::Vec<::core::primitive::u8>, }, } #[derive( @@ -22392,92 +22905,142 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - TokenUnregistered, + InsufficientProposersBalance, #[codec(index = 1)] - InvalidIssuingAccount, + InvalidIndex, #[codec(index = 2)] - StringCF, + ReasonTooBig, #[codec(index = 3)] - InvalidEncodeERC20, + UnexpectedStatus, #[codec(index = 4)] - InvalidIssueEncoding, + RequireCurator, #[codec(index = 5)] - InvalidAddressLen, + InvalidValue, + #[codec(index = 6)] + InvalidFee, + #[codec(index = 7)] + PendingPayout, + #[codec(index = 8)] + Premature, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - TokenRegistered( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - ), + BountyProposed(::core::primitive::u32), #[codec(index = 1)] - TokenIssued( - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::U256, - ), + BountyRejected(::core::primitive::u32, ::core::primitive::u128), #[codec(index = 2)] - MappingFactoryAddressUpdated( - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - ), + BountyBecameActive(::core::primitive::u32), #[codec(index = 3)] - RemoteBackingAccountUpdated(::subxt::sp_core::crypto::AccountId32), + BountyAwarded( + ::core::primitive::u32, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 4)] + BountyClaimed( + ::core::primitive::u32, + ::core::primitive::u128, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 5)] + BountyCanceled(::core::primitive::u32), + #[codec(index = 6)] + BountyExtended(::core::primitive::u32), } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Bounty<_0, _1, _2> { + pub proposer: _0, + pub value: _1, + pub fee: _1, + pub curator_deposit: _1, + pub bond: _1, + pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum BountyStatus<_0, _1> { + #[codec(index = 0)] + Proposed, + #[codec(index = 1)] + Approved, + #[codec(index = 2)] + Funded, + #[codec(index = 3)] + CuratorProposed { curator: _0 }, + #[codec(index = 4)] + Active { curator: _0, update_due: _1 }, + #[codec(index = 5)] + PendingPayout { + curator: _0, + beneficiary: _0, + unlock_at: _1, + }, + } } - pub mod module_transaction_pause { + pub mod pallet_bridge_dispatch { use super::runtime_types; - pub mod module { + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { - #[codec(index = 0)] - pause_transaction { - pallet_name: ::std::vec::Vec<::core::primitive::u8>, - function_name: ::std::vec::Vec<::core::primitive::u8>, - }, - #[codec(index = 1)] - unpause_transaction { - pallet_name: ::std::vec::Vec<::core::primitive::u8>, - function_name: ::std::vec::Vec<::core::primitive::u8>, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - CannotPause, - #[codec(index = 1)] - InvalidCharacter, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] pub enum Event { #[codec(index = 0)] - TransactionPaused( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, + MessageRejected( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), ), #[codec(index = 1)] - TransactionUnpaused( - ::std::vec::Vec<::core::primitive::u8>, - ::std::vec::Vec<::core::primitive::u8>, + MessageVersionSpecMismatch( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ::core::primitive::u32, + ::core::primitive::u32, + ), + #[codec(index = 2)] + MessageWeightMismatch( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ::core::primitive::u64, + ::core::primitive::u64, + ), + #[codec(index = 3)] + MessageSignatureMismatch( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ), + #[codec(index = 4)] + MessageCallDecodeFailed( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ), + #[codec(index = 5)] + MessageCallValidateFailed( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + runtime_types::sp_runtime::transaction_validity::TransactionValidityError, + ), + #[codec(index = 6)] + MessageDispatchPaymentFailed( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u64, + ), + #[codec(index = 7)] + MessageDispatched( + [::core::primitive::u8; 4usize], + ([::core::primitive::u8; 4usize], ::core::primitive::u64), + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, ), + #[codec(index = 8)] + _Dummy, } } } - pub mod pallet_authorship { + pub mod pallet_bridge_grandpa { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -22486,44 +23049,67 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - set_uncles { - new_uncles: ::std::vec::Vec< + submit_finality_proof { + finality_target: ::std::boxed::Box< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + justification: + runtime_types::bp_header_chain::justification::GrandpaJustification< + runtime_types::sp_runtime::generic::header::Header< + ::core::primitive::u32, + runtime_types::sp_runtime::traits::BlakeTwo256, + >, + >, + }, + #[codec(index = 1)] + initialize { + init_data: runtime_types::bp_header_chain::InitializationData< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, runtime_types::sp_runtime::traits::BlakeTwo256, >, >, }, + #[codec(index = 2)] + set_owner { + new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + }, + #[codec(index = 3)] + set_operational { + operational: ::core::primitive::bool, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Error { #[codec(index = 0)] - InvalidUncleParent, + InvalidJustification, #[codec(index = 1)] - UnclesAlreadySet, + InvalidAuthoritySet, #[codec(index = 2)] - TooManyUncles, + TooManyRequests, #[codec(index = 3)] - GenesisUncle, + OldHeader, #[codec(index = 4)] - TooHighUncle, + UnknownHeader, #[codec(index = 5)] - UncleAlreadyIncluded, + UnsupportedScheduledChange, #[codec(index = 6)] - OldUncle, + NotInitialized, + #[codec(index = 7)] + AlreadyInitialized, + #[codec(index = 8)] + Halted, + #[codec(index = 9)] + StorageRootMismatch, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum UncleEntryItem<_0, _1, _2> { - #[codec(index = 0)] - InclusionHeight(_0), - #[codec(index = 1)] - Uncle(_1, ::core::option::Option<_2>), - } } - pub mod pallet_babe { + pub mod pallet_bridge_messages { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -22531,51 +23117,44 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Call { - #[codec(index = 0)] - report_equivocation { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 1)] - report_equivocation_unsigned { - equivocation_proof: ::std::boxed::Box< - runtime_types::sp_consensus_slots::EquivocationProof< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - runtime_types::sp_consensus_babe::app::Public, - >, - >, - key_owner_proof: runtime_types::sp_session::MembershipProof, - }, - #[codec(index = 2)] - plan_config_change { - config: runtime_types::sp_consensus_babe::digests::NextConfigDescriptor, - }, - } + # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: OperatingMode , } , # [codec (index = 2)] update_pallet_parameter { parameter : runtime_types :: pangolin_runtime :: bridges_message :: pangolin_parachain :: PangolinToPangolinParachainParameter , } , # [codec (index = 3)] send_message { lane_id : [:: core :: primitive :: u8 ; 4usize] , payload : runtime_types :: bp_message_dispatch :: MessagePayload < :: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_runtime :: MultiSigner , runtime_types :: sp_runtime :: MultiSignature , :: std :: vec :: Vec < :: core :: primitive :: u8 > > , delivery_and_dispatch_fee : :: core :: primitive :: u128 , } , # [codec (index = 4)] increase_message_fee { lane_id : [:: core :: primitive :: u8 ; 4usize] , nonce : :: core :: primitive :: u64 , additional_fee : :: core :: primitive :: u128 , } , # [codec (index = 5)] receive_messages_proof { relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: core :: primitive :: u64 , } , # [codec (index = 6)] receive_messages_delivery_proof { proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } , } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Error { #[codec(index = 0)] - InvalidEquivocationProof, + Halted, #[codec(index = 1)] - InvalidKeyOwnershipProof, + MessageRejectedByChainVerifier, #[codec(index = 2)] - DuplicateOffenceReport, + MessageRejectedByLaneVerifier, + #[codec(index = 3)] + FailedToWithdrawMessageFee, + #[codec(index = 4)] + TooManyMessagesInTheProof, + #[codec(index = 5)] + InvalidMessagesProof, + #[codec(index = 6)] + InvalidMessagesDeliveryProof, + #[codec(index = 7)] + InvalidUnrewardedRelayers, + #[codec(index = 8)] + InvalidUnrewardedRelayersState, + #[codec(index = 9)] + MessageIsAlreadyDelivered, + #[codec(index = 10)] + MessageIsNotYetSent, + #[codec(index = 11)] + TryingToConfirmMoreMessagesThanExpected, } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + # [codec (index = 0)] ParameterUpdated (runtime_types :: pangolin_runtime :: bridges_message :: pangolin_parachain :: PangolinToPangolinParachainParameter ,) , # [codec (index = 1)] MessageAccepted ([:: core :: primitive :: u8 ; 4usize] , :: core :: primitive :: u64 ,) , # [codec (index = 2)] MessagesDelivered ([:: core :: primitive :: u8 ; 4usize] , runtime_types :: bp_messages :: DeliveredMessages ,) , } } } - pub mod pallet_base_fee { + pub mod pallet_bridge_parachains { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -22584,32 +23163,38 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - set_base_fee_per_gas { - fee: runtime_types::primitive_types::U256, - }, - #[codec(index = 1)] - set_is_active { is_active: ::core::primitive::bool }, - #[codec(index = 2)] - set_elasticity { - elasticity: runtime_types::sp_arithmetic::per_things::Permill, + submit_parachain_heads { + relay_block_hash: ::subxt::sp_core::H256, + parachains: + ::std::vec::Vec, + parachain_heads_proof: + ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Event { + pub enum Error { #[codec(index = 0)] - NewBaseFeePerGas(runtime_types::primitive_types::U256), + UnknownRelayChainBlock, #[codec(index = 1)] - BaseFeeOverflow, + InvalidStorageProof, #[codec(index = 2)] - IsActive(::core::primitive::bool), + UnknownParaHead, #[codec(index = 3)] - NewElasticity(runtime_types::sp_arithmetic::per_things::Permill), + StorageRootMismatch, + #[codec(index = 4)] + FailedToExtractStateRoot, } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct BestParaHead { + pub at_relay_block_number: ::core::primitive::u32, + pub head_hash: ::subxt::sp_core::H256, + pub next_imported_hash_position: ::core::primitive::u32, + } } - pub mod pallet_bounties { + pub mod pallet_collective { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -22618,61 +23203,45 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - propose_bounty { - #[codec(compact)] - value: ::core::primitive::u128, - description: ::std::vec::Vec<::core::primitive::u8>, + set_members { + new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + old_count: ::core::primitive::u32, }, #[codec(index = 1)] - approve_bounty { + execute { + proposal: ::std::boxed::Box, #[codec(compact)] - bounty_id: ::core::primitive::u32, + length_bound: ::core::primitive::u32, }, #[codec(index = 2)] - propose_curator { + propose { #[codec(compact)] - bounty_id: ::core::primitive::u32, - curator: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, + threshold: ::core::primitive::u32, + proposal: ::std::boxed::Box, #[codec(compact)] - fee: ::core::primitive::u128, + length_bound: ::core::primitive::u32, }, #[codec(index = 3)] - unassign_curator { + vote { + proposal: ::subxt::sp_core::H256, #[codec(compact)] - bounty_id: ::core::primitive::u32, + index: ::core::primitive::u32, + approve: ::core::primitive::bool, }, #[codec(index = 4)] - accept_curator { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 5)] - award_bounty { + close { + proposal_hash: ::subxt::sp_core::H256, #[codec(compact)] - bounty_id: ::core::primitive::u32, - beneficiary: ::subxt::sp_runtime::MultiAddress< - ::subxt::sp_core::crypto::AccountId32, - (), - >, - }, - #[codec(index = 6)] - claim_bounty { + index: ::core::primitive::u32, #[codec(compact)] - bounty_id: ::core::primitive::u32, - }, - #[codec(index = 7)] - close_bounty { + proposal_weight_bound: ::core::primitive::u64, #[codec(compact)] - bounty_id: ::core::primitive::u32, + length_bound: ::core::primitive::u32, }, - #[codec(index = 8)] - extend_bounty_expiry { - #[codec(compact)] - bounty_id: ::core::primitive::u32, - remark: ::std::vec::Vec<::core::primitive::u8>, + #[codec(index = 5)] + disapprove_proposal { + proposal_hash: ::subxt::sp_core::H256, }, } #[derive( @@ -22680,142 +23249,109 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - InsufficientProposersBalance, + NotMember, #[codec(index = 1)] - InvalidIndex, + DuplicateProposal, #[codec(index = 2)] - ReasonTooBig, + ProposalMissing, #[codec(index = 3)] - UnexpectedStatus, + WrongIndex, #[codec(index = 4)] - RequireCurator, + DuplicateVote, #[codec(index = 5)] - InvalidValue, + AlreadyInitialized, #[codec(index = 6)] - InvalidFee, + TooEarly, #[codec(index = 7)] - PendingPayout, + TooManyProposals, #[codec(index = 8)] - Premature, + WrongProposalWeight, + #[codec(index = 9)] + WrongProposalLength, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - BountyProposed(::core::primitive::u32), - #[codec(index = 1)] - BountyRejected(::core::primitive::u32, ::core::primitive::u128), - #[codec(index = 2)] - BountyBecameActive(::core::primitive::u32), - #[codec(index = 3)] - BountyAwarded( + Proposed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::subxt::sp_core::H256, ::core::primitive::u32, + ), + #[codec(index = 1)] + Voted( ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ::core::primitive::bool, + ::core::primitive::u32, + ::core::primitive::u32, ), + #[codec(index = 2)] + Approved(::subxt::sp_core::H256), + #[codec(index = 3)] + Disapproved(::subxt::sp_core::H256), #[codec(index = 4)] - BountyClaimed( - ::core::primitive::u32, - ::core::primitive::u128, - ::subxt::sp_core::crypto::AccountId32, + Executed( + ::subxt::sp_core::H256, + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, ), #[codec(index = 5)] - BountyCanceled(::core::primitive::u32), + MemberExecuted( + ::subxt::sp_core::H256, + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ), #[codec(index = 6)] - BountyExtended(::core::primitive::u32), + Closed( + ::subxt::sp_core::H256, + ::core::primitive::u32, + ::core::primitive::u32, + ), } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Bounty<_0, _1, _2> { - pub proposer: _0, - pub value: _1, - pub fee: _1, - pub curator_deposit: _1, - pub bond: _1, - pub status: runtime_types::pallet_bounties::BountyStatus<_0, _2>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum BountyStatus<_0, _1> { + pub enum RawOrigin<_0> { #[codec(index = 0)] - Proposed, + Members(::core::primitive::u32, ::core::primitive::u32), #[codec(index = 1)] - Approved, + Member(_0), #[codec(index = 2)] - Funded, - #[codec(index = 3)] - CuratorProposed { curator: _0 }, - #[codec(index = 4)] - Active { curator: _0, update_due: _1 }, - #[codec(index = 5)] - PendingPayout { - curator: _0, - beneficiary: _0, - unlock_at: _1, - }, + _Phantom, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Votes<_0, _1> { + pub index: _1, + pub threshold: _1, + pub ayes: ::std::vec::Vec<_0>, + pub nays: ::std::vec::Vec<_0>, + pub end: _1, } } - pub mod pallet_bridge_dispatch { + pub mod pallet_democracy { use super::runtime_types; - pub mod pallet { + pub mod conviction { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Event { + pub enum Conviction { #[codec(index = 0)] - MessageRejected( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + None, #[codec(index = 1)] - MessageVersionSpecMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::core::primitive::u32, - ::core::primitive::u32, - ), + Locked1x, #[codec(index = 2)] - MessageWeightMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::core::primitive::u64, - ::core::primitive::u64, - ), + Locked2x, #[codec(index = 3)] - MessageSignatureMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + Locked3x, #[codec(index = 4)] - MessageCallDecodeFailed( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + Locked4x, #[codec(index = 5)] - MessageCallRejected( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + Locked5x, #[codec(index = 6)] - MessageDispatchPaymentFailed( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u64, - ), - #[codec(index = 7)] - MessageDispatched( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), - #[codec(index = 8)] - _Dummy, + Locked6x, } } - } - pub mod pallet_bridge_grandpa { - use super::runtime_types; pub mod pallet { use super::runtime_types; #[derive( @@ -22823,37 +23359,114 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - submit_finality_proof { - finality_target: ::std::boxed::Box< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, - justification: - runtime_types::bp_header_chain::justification::GrandpaJustification< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, + propose { + proposal_hash: ::subxt::sp_core::H256, + #[codec(compact)] + value: ::core::primitive::u128, }, #[codec(index = 1)] - initialize { - init_data: runtime_types::bp_header_chain::InitializationData< - runtime_types::sp_runtime::generic::header::Header< - ::core::primitive::u32, - runtime_types::sp_runtime::traits::BlakeTwo256, - >, - >, + second { + #[codec(compact)] + proposal: ::core::primitive::u32, + #[codec(compact)] + seconds_upper_bound: ::core::primitive::u32, }, #[codec(index = 2)] - set_owner { - new_owner: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, + vote { + #[codec(compact)] + ref_index: ::core::primitive::u32, + vote: runtime_types::pallet_democracy::vote::AccountVote< + ::core::primitive::u128, + >, }, #[codec(index = 3)] - set_operational { - operational: ::core::primitive::bool, + emergency_cancel { ref_index: ::core::primitive::u32 }, + #[codec(index = 4)] + external_propose { + proposal_hash: ::subxt::sp_core::H256, + }, + #[codec(index = 5)] + external_propose_majority { + proposal_hash: ::subxt::sp_core::H256, + }, + #[codec(index = 6)] + external_propose_default { + proposal_hash: ::subxt::sp_core::H256, + }, + #[codec(index = 7)] + fast_track { + proposal_hash: ::subxt::sp_core::H256, + voting_period: ::core::primitive::u32, + delay: ::core::primitive::u32, + }, + #[codec(index = 8)] + veto_external { + proposal_hash: ::subxt::sp_core::H256, + }, + #[codec(index = 9)] + cancel_referendum { + #[codec(compact)] + ref_index: ::core::primitive::u32, + }, + #[codec(index = 10)] + cancel_queued { which: ::core::primitive::u32 }, + #[codec(index = 11)] + delegate { + to: ::subxt::sp_core::crypto::AccountId32, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + balance: ::core::primitive::u128, + }, + #[codec(index = 12)] + undelegate, + #[codec(index = 13)] + clear_public_proposals, + #[codec(index = 14)] + note_preimage { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 15)] + note_preimage_operational { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 16)] + note_imminent_preimage { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 17)] + note_imminent_preimage_operational { + encoded_proposal: ::std::vec::Vec<::core::primitive::u8>, + }, + #[codec(index = 18)] + reap_preimage { + proposal_hash: ::subxt::sp_core::H256, + #[codec(compact)] + proposal_len_upper_bound: ::core::primitive::u32, + }, + #[codec(index = 19)] + unlock { + target: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 20)] + remove_vote { index: ::core::primitive::u32 }, + #[codec(index = 21)] + remove_other_vote { + target: ::subxt::sp_core::crypto::AccountId32, + index: ::core::primitive::u32, + }, + #[codec(index = 22)] + enact_proposal { + proposal_hash: ::subxt::sp_core::H256, + index: ::core::primitive::u32, + }, + #[codec(index = 23)] + blacklist { + proposal_hash: ::subxt::sp_core::H256, + maybe_ref_index: ::core::option::Option<::core::primitive::u32>, + }, + #[codec(index = 24)] + cancel_proposal { + #[codec(compact)] + prop_index: ::core::primitive::u32, }, } #[derive( @@ -22861,245 +23474,252 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - InvalidJustification, + ValueLow, #[codec(index = 1)] - InvalidAuthoritySet, + ProposalMissing, #[codec(index = 2)] - TooManyRequests, + AlreadyCanceled, #[codec(index = 3)] - OldHeader, + DuplicateProposal, #[codec(index = 4)] - UnknownHeader, + ProposalBlacklisted, #[codec(index = 5)] - UnsupportedScheduledChange, + NotSimpleMajority, #[codec(index = 6)] - NotInitialized, + InvalidHash, #[codec(index = 7)] - AlreadyInitialized, + NoProposal, #[codec(index = 8)] - Halted, + AlreadyVetoed, #[codec(index = 9)] - StorageRootMismatch, + DuplicatePreimage, + #[codec(index = 10)] + NotImminent, + #[codec(index = 11)] + TooEarly, + #[codec(index = 12)] + Imminent, + #[codec(index = 13)] + PreimageMissing, + #[codec(index = 14)] + ReferendumInvalid, + #[codec(index = 15)] + PreimageInvalid, + #[codec(index = 16)] + NoneWaiting, + #[codec(index = 17)] + NotVoter, + #[codec(index = 18)] + NoPermission, + #[codec(index = 19)] + AlreadyDelegating, + #[codec(index = 20)] + InsufficientFunds, + #[codec(index = 21)] + NotDelegating, + #[codec(index = 22)] + VotesExist, + #[codec(index = 23)] + InstantNotAllowed, + #[codec(index = 24)] + Nonsense, + #[codec(index = 25)] + WrongUpperBound, + #[codec(index = 26)] + MaxVotesReached, + #[codec(index = 27)] + TooManyProposals, } - } - } - pub mod pallet_bridge_messages { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Call { - # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: OperatingMode , } , # [codec (index = 2)] update_pallet_parameter { parameter : runtime_types :: pangolin_runtime :: bridges :: substrate :: pangoro_messages :: PangolinToPangoroMessagesParameter , } , # [codec (index = 3)] send_message { lane_id : [:: core :: primitive :: u8 ; 4usize] , payload : runtime_types :: bp_message_dispatch :: MessagePayload < :: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_runtime :: MultiSigner , runtime_types :: sp_runtime :: MultiSignature , :: std :: vec :: Vec < :: core :: primitive :: u8 > > , delivery_and_dispatch_fee : :: core :: primitive :: u128 , } , # [codec (index = 4)] increase_message_fee { lane_id : [:: core :: primitive :: u8 ; 4usize] , nonce : :: core :: primitive :: u64 , additional_fee : :: core :: primitive :: u128 , } , # [codec (index = 5)] receive_messages_proof { relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: core :: primitive :: u64 , } , # [codec (index = 6)] receive_messages_delivery_proof { proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } , } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Error { + pub enum Event { #[codec(index = 0)] - Halted, + Proposed(::core::primitive::u32, ::core::primitive::u128), #[codec(index = 1)] - MessageRejectedByChainVerifier, + Tabled( + ::core::primitive::u32, + ::core::primitive::u128, + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ), #[codec(index = 2)] - MessageRejectedByLaneVerifier, + ExternalTabled, #[codec(index = 3)] - FailedToWithdrawMessageFee, + Started( + ::core::primitive::u32, + runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + ), #[codec(index = 4)] - TooManyMessagesInTheProof, + Passed(::core::primitive::u32), #[codec(index = 5)] - InvalidMessagesProof, + NotPassed(::core::primitive::u32), #[codec(index = 6)] - InvalidMessagesDeliveryProof, + Cancelled(::core::primitive::u32), #[codec(index = 7)] - InvalidUnrewardedRelayers, + Executed( + ::core::primitive::u32, + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + ), #[codec(index = 8)] - InvalidUnrewardedRelayersState, + Delegated( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ), #[codec(index = 9)] - MessageIsAlreadyDelivered, + Undelegated(::subxt::sp_core::crypto::AccountId32), #[codec(index = 10)] - MessageIsNotYetSent, + Vetoed( + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::H256, + ::core::primitive::u32, + ), #[codec(index = 11)] - TryingToConfirmMoreMessagesThanExpected, + PreimageNoted( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 12)] + PreimageUsed( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 13)] + PreimageInvalid(::subxt::sp_core::H256, ::core::primitive::u32), + #[codec(index = 14)] + PreimageMissing(::subxt::sp_core::H256, ::core::primitive::u32), + #[codec(index = 15)] + PreimageReaped( + ::subxt::sp_core::H256, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::subxt::sp_core::crypto::AccountId32, + ), + #[codec(index = 16)] + Blacklisted(::subxt::sp_core::H256), } + } + pub mod types { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Event { - # [codec (index = 0)] ParameterUpdated (runtime_types :: pangolin_runtime :: bridges :: substrate :: pangoro_messages :: PangolinToPangoroMessagesParameter ,) , # [codec (index = 1)] MessageAccepted ([:: core :: primitive :: u8 ; 4usize] , :: core :: primitive :: u64 ,) , # [codec (index = 2)] MessagesDelivered ([:: core :: primitive :: u8 ; 4usize] , runtime_types :: bp_messages :: DeliveredMessages ,) , } - } - } - pub mod pallet_bridge_parachains { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; + pub struct Delegations<_0> { + pub votes: _0, + pub capital: _0, + } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { + pub enum ReferendumInfo<_0, _1, _2> { #[codec(index = 0)] - submit_parachain_heads { - relay_block_hash: ::subxt::sp_core::H256, - parachains: - ::std::vec::Vec, - parachain_heads_proof: - ::std::vec::Vec<::std::vec::Vec<::core::primitive::u8>>, + Ongoing(runtime_types::pallet_democracy::types::ReferendumStatus<_0, _1, _2>), + #[codec(index = 1)] + Finished { + approved: ::core::primitive::bool, + end: _0, }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Error { - #[codec(index = 0)] - UnknownRelayChainBlock, - #[codec(index = 1)] - InvalidStorageProof, - #[codec(index = 2)] - UnknownParaHead, - #[codec(index = 3)] - StorageRootMismatch, - #[codec(index = 4)] - FailedToExtractStateRoot, + pub struct ReferendumStatus<_0, _1, _2> { + pub end: _0, + pub proposal_hash: _1, + pub threshold: runtime_types::pallet_democracy::vote_threshold::VoteThreshold, + pub delay: _0, + pub tally: runtime_types::pallet_democracy::types::Tally<_2>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Tally<_0> { + pub ayes: _0, + pub nays: _0, + pub turnout: _0, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct BestParaHead { - pub at_relay_block_number: ::core::primitive::u32, - pub head_hash: ::subxt::sp_core::H256, - pub next_imported_hash_position: ::core::primitive::u32, - } - } - pub mod pallet_collective { - use super::runtime_types; - pub mod pallet { + pub mod vote { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { + pub enum AccountVote<_0> { #[codec(index = 0)] - set_members { - new_members: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, - prime: ::core::option::Option<::subxt::sp_core::crypto::AccountId32>, - old_count: ::core::primitive::u32, + Standard { + vote: runtime_types::pallet_democracy::vote::Vote, + balance: _0, }, #[codec(index = 1)] - execute { - proposal: ::std::boxed::Box, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 2)] - propose { - #[codec(compact)] - threshold: ::core::primitive::u32, - proposal: ::std::boxed::Box, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 3)] - vote { - proposal: ::subxt::sp_core::H256, - #[codec(compact)] - index: ::core::primitive::u32, - approve: ::core::primitive::bool, - }, - #[codec(index = 4)] - close { - proposal_hash: ::subxt::sp_core::H256, - #[codec(compact)] - index: ::core::primitive::u32, - #[codec(compact)] - proposal_weight_bound: ::core::primitive::u64, - #[codec(compact)] - length_bound: ::core::primitive::u32, - }, - #[codec(index = 5)] - disapprove_proposal { - proposal_hash: ::subxt::sp_core::H256, - }, + Split { aye: _0, nay: _0 }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Error { + pub struct PriorLock<_0, _1>(pub _0, pub _1); + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct Vote(pub ::core::primitive::u8); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Voting<_0, _1, _2> { #[codec(index = 0)] - NotMember, + Direct { + votes: ::std::vec::Vec<( + _2, + runtime_types::pallet_democracy::vote::AccountVote<_0>, + )>, + delegations: runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, #[codec(index = 1)] - DuplicateProposal, - #[codec(index = 2)] - ProposalMissing, - #[codec(index = 3)] - WrongIndex, - #[codec(index = 4)] - DuplicateVote, - #[codec(index = 5)] - AlreadyInitialized, - #[codec(index = 6)] - TooEarly, - #[codec(index = 7)] - TooManyProposals, - #[codec(index = 8)] - WrongProposalWeight, - #[codec(index = 9)] - WrongProposalLength, + Delegating { + balance: _0, + target: _1, + conviction: runtime_types::pallet_democracy::conviction::Conviction, + delegations: runtime_types::pallet_democracy::types::Delegations<_0>, + prior: runtime_types::pallet_democracy::vote::PriorLock<_2, _0>, + }, } + } + pub mod vote_threshold { + use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Event { + pub enum VoteThreshold { #[codec(index = 0)] - Proposed( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::subxt::sp_core::H256, - ::core::primitive::u32, - ), + SuperMajorityApprove, #[codec(index = 1)] - Voted( - ::subxt::sp_core::crypto::AccountId32, - ::subxt::sp_core::H256, - ::core::primitive::bool, - ::core::primitive::u32, - ::core::primitive::u32, - ), + SuperMajorityAgainst, #[codec(index = 2)] - Approved(::subxt::sp_core::H256), - #[codec(index = 3)] - Disapproved(::subxt::sp_core::H256), - #[codec(index = 4)] - Executed( - ::subxt::sp_core::H256, - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), - #[codec(index = 5)] - MemberExecuted( - ::subxt::sp_core::H256, - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), - #[codec(index = 6)] - Closed( - ::subxt::sp_core::H256, - ::core::primitive::u32, - ::core::primitive::u32, - ), + SimpleMajority, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawOrigin<_0> { + pub enum PreimageStatus<_0, _1, _2> { #[codec(index = 0)] - Members(::core::primitive::u32, ::core::primitive::u32), + Missing(_2), #[codec(index = 1)] - Member(_0), - #[codec(index = 2)] - _Phantom, + Available { + data: ::std::vec::Vec<::core::primitive::u8>, + provider: _0, + deposit: _1, + since: _2, + expiry: ::core::option::Option<_2>, + }, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Votes<_0, _1> { - pub index: _1, - pub threshold: _1, - pub ayes: ::std::vec::Vec<_0>, - pub nays: ::std::vec::Vec<_0>, - pub end: _1, + pub enum Releases { + #[codec(index = 0)] + V1, } } pub mod pallet_election_provider_multi_phase { @@ -23231,6 +23851,297 @@ pub mod api { pub targets: ::core::primitive::u32, } } + pub mod pallet_elections_phragmen { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + vote { + votes: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + #[codec(compact)] + value: ::core::primitive::u128, + }, + #[codec(index = 1)] + remove_voter, + #[codec(index = 2)] + submit_candidacy { + #[codec(compact)] + candidate_count: ::core::primitive::u32, + }, + #[codec(index = 3)] + renounce_candidacy { + renouncing: runtime_types::pallet_elections_phragmen::Renouncing, + }, + #[codec(index = 4)] + remove_member { + who: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + has_replacement: ::core::primitive::bool, + }, + #[codec(index = 5)] + clean_defunct_voters { + num_voters: ::core::primitive::u32, + num_defunct: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + UnableToVote, + #[codec(index = 1)] + NoVotes, + #[codec(index = 2)] + TooManyVotes, + #[codec(index = 3)] + MaximumVotesExceeded, + #[codec(index = 4)] + LowBalance, + #[codec(index = 5)] + UnableToPayBond, + #[codec(index = 6)] + MustBeVoter, + #[codec(index = 7)] + ReportSelf, + #[codec(index = 8)] + DuplicatedCandidate, + #[codec(index = 9)] + MemberSubmit, + #[codec(index = 10)] + RunnerUpSubmit, + #[codec(index = 11)] + InsufficientCandidateFunds, + #[codec(index = 12)] + NotMember, + #[codec(index = 13)] + InvalidWitnessData, + #[codec(index = 14)] + InvalidVoteCount, + #[codec(index = 15)] + InvalidRenouncing, + #[codec(index = 16)] + InvalidReplacement, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + NewTerm( + ::std::vec::Vec<( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + )>, + ), + #[codec(index = 1)] + EmptyTerm, + #[codec(index = 2)] + ElectionError, + #[codec(index = 3)] + MemberKicked(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 4)] + Renounced(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 5)] + CandidateSlashed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 6)] + SeatHolderSlashed( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Renouncing { + #[codec(index = 0)] + Member, + #[codec(index = 1)] + RunnerUp, + #[codec(index = 2)] + Candidate(#[codec(compact)] ::core::primitive::u32), + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct SeatHolder<_0, _1> { + pub who: _0, + pub stake: _1, + pub deposit: _1, + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Voter<_0, _1> { + pub votes: ::std::vec::Vec<_0>, + pub stake: _1, + pub deposit: _1, + } + } + pub mod pallet_fee_market { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + enroll_and_lock_collateral { + lock_collateral: ::core::primitive::u128, + relay_fee: ::core::option::Option<::core::primitive::u128>, + }, + #[codec(index = 1)] + update_locked_collateral { + new_collateral: ::core::primitive::u128, + }, + #[codec(index = 2)] + update_relay_fee { new_fee: ::core::primitive::u128 }, + #[codec(index = 3)] + cancel_enrollment, + #[codec(index = 4)] + set_slash_protect { + slash_protect: ::core::primitive::u128, + }, + #[codec(index = 5)] + set_assigned_relayers_number { number: ::core::primitive::u32 }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + InsufficientBalance, + #[codec(index = 1)] + AlreadyEnrolled, + #[codec(index = 2)] + NotEnrolled, + #[codec(index = 3)] + CollateralTooLow, + #[codec(index = 4)] + StillHasOrdersNotConfirmed, + #[codec(index = 5)] + RelayFeeTooLow, + #[codec(index = 6)] + OccupiedRelayer, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + Enroll( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u128, + ), + #[codec(index = 1)] + UpdateLockedCollateral( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 2)] + UpdateRelayFee( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 3)] + CancelEnrollment(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 4)] + UpdateCollateralSlashProtect(::core::primitive::u128), + #[codec(index = 5)] + UpdateAssignedRelayersNumber(::core::primitive::u32), + #[codec(index = 6)] + FeeMarketSlash( + runtime_types::pallet_fee_market::types::SlashReport< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >, + ), + #[codec(index = 7)] + OrderCreated( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + ::core::primitive::u128, + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::core::option::Option<::core::primitive::u32>, + ), + #[codec(index = 8)] + OrderReward( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + runtime_types::pallet_fee_market::s2s::payment::RewardItem< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ), + } + } + pub mod s2s { + use super::runtime_types; + pub mod payment { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct RewardItem<_0, _1> { + pub to_slot_relayer: ::core::option::Option<(_0, _1)>, + pub to_treasury: ::core::option::Option<_1>, + pub to_message_relayer: ::core::option::Option<(_0, _1)>, + pub to_confirm_relayer: ::core::option::Option<(_0, _1)>, + } + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Order<_0, _1, _2> { + pub lane: [::core::primitive::u8; 4usize], + pub message: ::core::primitive::u64, + pub sent_time: _1, + pub confirm_time: ::core::option::Option<_1>, + pub locked_collateral: _2, + pub relayers: ::std::vec::Vec< + runtime_types::pallet_fee_market::types::PriorRelayer<_0, _1, _2>, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct PriorRelayer<_0, _1, _2> { + pub id: _0, + pub fee: _2, + pub valid_range: ::core::ops::Range<_1>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Relayer<_0, _1> { + pub id: _0, + pub collateral: _1, + pub fee: _1, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct SlashReport<_0, _1, _2> { + pub lane: [::core::primitive::u8; 4usize], + pub message: ::core::primitive::u64, + pub sent_time: _1, + pub confirm_time: ::core::option::Option<_1>, + pub delay_time: ::core::option::Option<_1>, + pub account_id: _0, + pub amount: _2, + } + } + } pub mod pallet_grandpa { use super::runtime_types; pub mod pallet { @@ -24864,23 +25775,128 @@ pub mod api { } } } + pub mod pallet_vesting { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + vest, + #[codec(index = 1)] + vest_other { + target: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + }, + #[codec(index = 2)] + vested_transfer { + target: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 3)] + force_vested_transfer { + source: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + target: ::subxt::sp_runtime::MultiAddress< + ::subxt::sp_core::crypto::AccountId32, + (), + >, + schedule: runtime_types::pallet_vesting::vesting_info::VestingInfo< + ::core::primitive::u128, + ::core::primitive::u32, + >, + }, + #[codec(index = 4)] + merge_schedules { + schedule1_index: ::core::primitive::u32, + schedule2_index: ::core::primitive::u32, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + NotVesting, + #[codec(index = 1)] + AtMaxVestingSchedules, + #[codec(index = 2)] + AmountLow, + #[codec(index = 3)] + ScheduleIndexOutOfBounds, + #[codec(index = 4)] + InvalidScheduleParams, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + VestingUpdated( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 1)] + VestingCompleted(::subxt::sp_core::crypto::AccountId32), + } + } + pub mod vesting_info { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct VestingInfo<_0, _1> { + pub locked: _0, + pub per_block: _0, + pub starting_block: _1, + } + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum Releases { + #[codec(index = 0)] + V0, + #[codec(index = 1)] + V1, + } + } pub mod pangolin_runtime { use super::runtime_types; - pub mod bridges { + pub mod bridges_message { use super::runtime_types; - pub mod substrate { + pub mod pangolin_parachain { use super::runtime_types; - pub mod pangoro_messages { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum PangolinToPangoroMessagesParameter { - #[codec(index = 0)] - PangoroToPangolinConversionRate( - runtime_types::sp_arithmetic::fixed_point::FixedU128, - ), - } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum PangolinToPangolinParachainParameter { + #[codec(index = 0)] + PangolinParachainToPangolinConversionRate( + runtime_types::sp_arithmetic::fixed_point::FixedU128, + ), + } + } + pub mod pangoro { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum PangolinToPangoroMessagesParameter { + #[codec(index = 0)] + PangoroToPangolinConversionRate( + runtime_types::sp_arithmetic::fixed_point::FixedU128, + ), } } } @@ -25137,18 +26153,16 @@ pub mod api { Session(runtime_types::pallet_session::pallet::Call), #[codec(index = 13)] Grandpa(runtime_types::pallet_grandpa::pallet::Call), - #[codec(index = 58)] - BeefyGadget(runtime_types::darwinia_beefy_gadget::pallet::Call), #[codec(index = 14)] ImOnline(runtime_types::pallet_im_online::pallet::Call), #[codec(index = 17)] - Democracy(runtime_types::darwinia_democracy::pallet::Call), + Democracy(runtime_types::pallet_democracy::pallet::Call), #[codec(index = 18)] Council(runtime_types::pallet_collective::pallet::Call), #[codec(index = 19)] TechnicalCommittee(runtime_types::pallet_collective::pallet::Call), #[codec(index = 20)] - PhragmenElection(runtime_types::darwinia_elections_phragmen::pallet::Call), + PhragmenElection(runtime_types::pallet_elections_phragmen::pallet::Call), #[codec(index = 21)] TechnicalMembership(runtime_types::pallet_membership::pallet::Call), #[codec(index = 22)] @@ -25161,10 +26175,8 @@ pub mod api { Bounties(runtime_types::pallet_bounties::pallet::Call), #[codec(index = 23)] Sudo(runtime_types::pallet_sudo::pallet::Call), - #[codec(index = 24)] - Claims(runtime_types::darwinia_claims::Call), #[codec(index = 25)] - Vesting(runtime_types::darwinia_vesting::pallet::Call), + Vesting(runtime_types::pallet_vesting::pallet::Call), #[codec(index = 26)] Utility(runtime_types::pallet_utility::pallet::Call), #[codec(index = 27)] @@ -25201,12 +26213,20 @@ pub mod api { BridgeRococoGrandpa(runtime_types::pallet_bridge_grandpa::pallet::Call), #[codec(index = 61)] BridgeRococoParachains(runtime_types::pallet_bridge_parachains::pallet::Call), + #[codec(index = 63)] + BridgePangolinParachainMessages( + runtime_types::pallet_bridge_messages::pallet::Call, + ), #[codec(index = 53)] - FeeMarket(runtime_types::darwinia_fee_market::pallet::Call), + PangoroFeeMarket(runtime_types::pallet_fee_market::pallet::Call), + #[codec(index = 64)] + PangolinParachainFeeMarket(runtime_types::pallet_fee_market::pallet::Call), #[codec(index = 54)] TransactionPause(runtime_types::module_transaction_pause::module::Call), #[codec(index = 49)] Substrate2SubstrateIssuing(runtime_types::from_substrate_issuing::pallet::Call), + #[codec(index = 65)] + ToPangolinParachainBacking(runtime_types::to_parachain_backing::pallet::Call), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum Event { @@ -25231,13 +26251,13 @@ pub mod api { #[codec(index = 14)] ImOnline(runtime_types::pallet_im_online::pallet::Event), #[codec(index = 17)] - Democracy(runtime_types::darwinia_democracy::pallet::Event), + Democracy(runtime_types::pallet_democracy::pallet::Event), #[codec(index = 18)] Council(runtime_types::pallet_collective::pallet::Event), #[codec(index = 19)] TechnicalCommittee(runtime_types::pallet_collective::pallet::Event), #[codec(index = 20)] - PhragmenElection(runtime_types::darwinia_elections_phragmen::pallet::Event), + PhragmenElection(runtime_types::pallet_elections_phragmen::pallet::Event), #[codec(index = 21)] TechnicalMembership(runtime_types::pallet_membership::pallet::Event), #[codec(index = 22)] @@ -25250,15 +26270,8 @@ pub mod api { Bounties(runtime_types::pallet_bounties::pallet::Event), #[codec(index = 23)] Sudo(runtime_types::pallet_sudo::pallet::Event), - #[codec(index = 24)] - Claims( - runtime_types::darwinia_claims::RawEvent< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - >, - ), #[codec(index = 25)] - Vesting(runtime_types::darwinia_vesting::pallet::Event), + Vesting(runtime_types::pallet_vesting::pallet::Event), #[codec(index = 26)] Utility(runtime_types::pallet_utility::pallet::Event), #[codec(index = 27)] @@ -25309,12 +26322,24 @@ pub mod api { BridgePangoroDispatch(runtime_types::pallet_bridge_dispatch::pallet::Event), #[codec(index = 43)] BridgePangoroMessages(runtime_types::pallet_bridge_messages::pallet::Event), + #[codec(index = 62)] + BridgePangolinParachainDispatch( + runtime_types::pallet_bridge_dispatch::pallet::Event, + ), + #[codec(index = 63)] + BridgePangolinParachainMessages( + runtime_types::pallet_bridge_messages::pallet::Event, + ), #[codec(index = 53)] - FeeMarket(runtime_types::darwinia_fee_market::pallet::Event), + PangoroFeeMarket(runtime_types::pallet_fee_market::pallet::Event), + #[codec(index = 64)] + PangolinParachainFeeMarket(runtime_types::pallet_fee_market::pallet::Event), #[codec(index = 54)] TransactionPause(runtime_types::module_transaction_pause::module::Event), #[codec(index = 49)] Substrate2SubstrateIssuing(runtime_types::from_substrate_issuing::pallet::Event), + #[codec(index = 65)] + ToPangolinParachainBacking(runtime_types::to_parachain_backing::pallet::Event), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum OriginCaller { @@ -26219,6 +27244,54 @@ pub mod api { )] pub struct BlakeTwo256; } + pub mod transaction_validity { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum InvalidTransaction { + #[codec(index = 0)] + Call, + #[codec(index = 1)] + Payment, + #[codec(index = 2)] + Future, + #[codec(index = 3)] + Stale, + #[codec(index = 4)] + BadProof, + #[codec(index = 5)] + AncientBirthBlock, + #[codec(index = 6)] + ExhaustsResources, + #[codec(index = 7)] + Custom(::core::primitive::u8), + #[codec(index = 8)] + BadMandatory, + #[codec(index = 9)] + MandatoryDispatch, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum TransactionValidityError { + #[codec(index = 0)] + Invalid(runtime_types::sp_runtime::transaction_validity::InvalidTransaction), + #[codec(index = 1)] + Unknown(runtime_types::sp_runtime::transaction_validity::UnknownTransaction), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum UnknownTransaction { + #[codec(index = 0)] + CannotLookup, + #[codec(index = 1)] + NoUnsignedValidator, + #[codec(index = 2)] + Custom(::core::primitive::u8), + } + } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum ArithmeticError { #[codec(index = 0)] @@ -26462,6 +27535,83 @@ pub mod api { } } } + pub mod to_parachain_backing { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + lock_and_remote_issue { + spec_version: ::core::primitive::u32, + weight: ::core::primitive::u64, + #[codec(compact)] + value: ::core::primitive::u128, + #[codec(compact)] + fee: ::core::primitive::u128, + recipient: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 1)] + unlock_from_remote { + amount: ::core::primitive::u128, + recipient: ::subxt::sp_core::crypto::AccountId32, + }, + #[codec(index = 2)] + set_secure_limited_period { period: ::core::primitive::u32 }, + #[codec(index = 3)] + set_security_limitation_ring_amount { limitation: ::core::primitive::u128 }, + #[codec(index = 4)] + set_remote_mapping_token_factory_account { + account: ::subxt::sp_core::crypto::AccountId32, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + InsufficientBalance, + #[codec(index = 1)] + RingLockLimited, + #[codec(index = 2)] + RingDailyLimited, + #[codec(index = 3)] + NonceDuplicated, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + TokenLocked( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + ::subxt::sp_core::crypto::AccountId32, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 1)] + TokenUnlocked( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 2)] + TokenLockedConfirmed( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::bool, + ), + #[codec(index = 3)] + RemoteMappingFactoryAddressUpdated(::subxt::sp_core::crypto::AccountId32), + } + } + } } #[doc = r" The default error type returned when there is a runtime issue."] pub type DispatchError = self::runtime_types::sp_runtime::DispatchError; @@ -26473,7 +27623,7 @@ pub mod api { impl DispatchError { pub fn details(&self) -> Option { if let Self::Module { index, error } = self { - match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (2u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (2u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (2u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (4u8 , 8u8) => Some (ErrorDetails { pallet : "Balances" , error : "LockP" , docs : "Lock - POISONED." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Kton" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Kton" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Kton" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Kton" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Kton" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Kton" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (5u8 , 8u8) => Some (ErrorDetails { pallet : "Kton" , error : "LockP" , docs : "Lock - POISONED." }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchEarlySubmission" , docs : "Submission was too early." }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWrongWinnerCount" , docs : "Wrong number of winners presented." }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWeakSubmission" , docs : "Submission was too weak, score-wise." }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedQueueFull" , docs : "The queue was full, and the solution was not better than any of the existing ones." }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedCannotPayDeposit" , docs : "The origin failed to pay the deposit." }) , (8u8 , 5u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedInvalidWitness" , docs : "Witness data to dispatchable is invalid." }) , (8u8 , 6u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedTooMuchWeight" , docs : "The signed submission consumes too much weight" }) , (8u8 , 7u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "OcwCallWrongEra" , docs : "OCW submitted solution for wrong round" }) , (8u8 , 8u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "MissingSnapshotMetadata" , docs : "Snapshot metadata should exist but didn't." }) , (8u8 , 9u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "InvalidSubmissionIndex" , docs : "`Self::insert_submission` returned an invalid index." }) , (8u8 , 10u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "CallNotAllowed" , docs : "The call is not allowed at this point." }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotController" , docs : "Not a controller account." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotStash" , docs : "Not a stash account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyBonded" , docs : "Stash is already bonded." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyPaired" , docs : "Controller is already paired." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Staking" , error : "EmptyTargets" , docs : "Targets cannot be empty." }) , (9u8 , 5u8) => Some (ErrorDetails { pallet : "Staking" , error : "DuplicateIndex" , docs : "Duplicate index." }) , (9u8 , 6u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidSlashIndex" , docs : "Slash record index out of bounds." }) , (9u8 , 7u8) => Some (ErrorDetails { pallet : "Staking" , error : "InsufficientBond" , docs : "Can not bond with value less than minimum required." }) , (9u8 , 8u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoMoreChunks" , docs : "Can not schedule more unlock chunks." }) , (9u8 , 9u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoUnlockChunk" , docs : "Can not rebond without unlocking chunks." }) , (9u8 , 10u8) => Some (ErrorDetails { pallet : "Staking" , error : "FundedTarget" , docs : "Attempting to target a stash that still has funds." }) , (9u8 , 11u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidEraToReward" , docs : "Invalid era to reward." }) , (9u8 , 12u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidNumberOfNominations" , docs : "Invalid number of nominations." }) , (9u8 , 13u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotSortedAndUnique" , docs : "Items are not sorted and unique." }) , (9u8 , 14u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyClaimed" , docs : "Rewards for this era have already been claimed for this validator." }) , (9u8 , 15u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectHistoryDepth" , docs : "Incorrect previous history depth input provided." }) , (9u8 , 16u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectSlashingSpans" , docs : "Incorrect number of slashing spans provided." }) , (9u8 , 17u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadState" , docs : "Internal state has become somehow corrupted and the operation cannot continue." }) , (9u8 , 18u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyTargets" , docs : "Too many nomination targets supplied." }) , (9u8 , 19u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadTarget" , docs : "A nomination target was supplied that was blocked or otherwise not a validator." }) , (9u8 , 20u8) => Some (ErrorDetails { pallet : "Staking" , error : "CannotChillOther" , docs : "The user has enough bond and thus cannot be chilled forcefully by an external person." }) , (9u8 , 21u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyNominators" , docs : "There are too many nominators in the system. Governance needs to adjust the staking settings\nto keep things safe for the runtime." }) , (9u8 , 22u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyValidators" , docs : "There are too many validators in the system. Governance needs to adjust the staking settings\nto keep things safe for the runtime." }) , (9u8 , 23u8) => Some (ErrorDetails { pallet : "Staking" , error : "PayoutIns" , docs : "Payout - INSUFFICIENT" }) , (12u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (12u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (12u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (12u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (12u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (14u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ValueLow" , docs : "Value too low" }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalMissing" , docs : "Proposal does not exist" }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyCanceled" , docs : "Cannot cancel the same proposal twice" }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicateProposal" , docs : "Proposal already made" }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalBlacklisted" , docs : "Proposal still blacklisted" }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotSimpleMajority" , docs : "Next external proposal not simple majority" }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InvalidHash" , docs : "Invalid hash" }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoProposal" , docs : "No external proposal" }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyVetoed" , docs : "Identity may not veto a proposal twice" }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicatePreimage" , docs : "Preimage already noted" }) , (17u8 , 10u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotImminent" , docs : "Not imminent" }) , (17u8 , 11u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooEarly" , docs : "Too early" }) , (17u8 , 12u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Imminent" , docs : "Imminent" }) , (17u8 , 13u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageMissing" , docs : "Preimage not found" }) , (17u8 , 14u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ReferendumInvalid" , docs : "Vote given for invalid referendum" }) , (17u8 , 15u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageInvalid" , docs : "Invalid preimage" }) , (17u8 , 16u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoneWaiting" , docs : "No proposals waiting" }) , (17u8 , 17u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotVoter" , docs : "The given account did not vote on the referendum." }) , (17u8 , 18u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoPermission" , docs : "The actor has no permission to conduct the action." }) , (17u8 , 19u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyDelegating" , docs : "The account is already delegating." }) , (17u8 , 20u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InsufficientFunds" , docs : "Too high a balance was provided that the account cannot afford." }) , (17u8 , 21u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotDelegating" , docs : "The account is not currently delegating." }) , (17u8 , 22u8) => Some (ErrorDetails { pallet : "Democracy" , error : "VotesExist" , docs : "The account currently has votes attached to it and the operation cannot succeed until\nthese are removed, either through `unvote` or `reap_vote`." }) , (17u8 , 23u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InstantNotAllowed" , docs : "The instant referendum origin is currently disallowed." }) , (17u8 , 24u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Nonsense" , docs : "Delegation to oneself makes no sense." }) , (17u8 , 25u8) => Some (ErrorDetails { pallet : "Democracy" , error : "WrongUpperBound" , docs : "Invalid upper bound." }) , (17u8 , 26u8) => Some (ErrorDetails { pallet : "Democracy" , error : "MaxVotesReached" , docs : "Maximum number of votes reached." }) , (17u8 , 27u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooManyProposals" , docs : "Maximum number of proposals reached." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "Council" , error : "NotMember" , docs : "Account is not a member" }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (18u8 , 2u8) => Some (ErrorDetails { pallet : "Council" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (18u8 , 3u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongIndex" , docs : "Mismatched index" }) , (18u8 , 4u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (18u8 , 5u8) => Some (ErrorDetails { pallet : "Council" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (18u8 , 6u8) => Some (ErrorDetails { pallet : "Council" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (18u8 , 7u8) => Some (ErrorDetails { pallet : "Council" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (18u8 , 8u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (18u8 , 9u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "NotMember" , docs : "Account is not a member" }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (19u8 , 3u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongIndex" , docs : "Mismatched index" }) , (19u8 , 4u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (19u8 , 5u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (19u8 , 6u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (19u8 , 7u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (19u8 , 8u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (19u8 , 9u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (20u8 , 0u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToVote" , docs : "Cannot vote when no candidates or members exist." }) , (20u8 , 1u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NoVotes" , docs : "Must vote for at least one candidate." }) , (20u8 , 2u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "TooManyVotes" , docs : "Cannot vote more than candidates." }) , (20u8 , 3u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MaximumVotesExceeded" , docs : "Cannot vote more than maximum allowed." }) , (20u8 , 4u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "LowBalance" , docs : "Cannot vote with stake less than minimum balance." }) , (20u8 , 5u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToPayBond" , docs : "Voter can not pay voting bond." }) , (20u8 , 6u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MustBeVoter" , docs : "Must be a voter." }) , (20u8 , 7u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "ReportSelf" , docs : "Cannot report self." }) , (20u8 , 8u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "DuplicatedCandidate" , docs : "Duplicated candidate submission." }) , (20u8 , 9u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MemberSubmit" , docs : "Member cannot re-submit candidacy." }) , (20u8 , 10u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "RunnerUpSubmit" , docs : "Runner cannot re-submit candidacy." }) , (20u8 , 11u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InsufficientCandidateFunds" , docs : "Candidate does not have enough funds." }) , (20u8 , 12u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NotMember" , docs : "Not a member." }) , (20u8 , 13u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidWitnessData" , docs : "The provided count of number of candidates is incorrect." }) , (20u8 , 14u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidVoteCount" , docs : "The provided count of number of votes is incorrect." }) , (20u8 , 15u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidRenouncing" , docs : "The renouncing origin presented a wrong `Renouncing` parameter." }) , (20u8 , 16u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidReplacement" , docs : "Prediction regarding replacement after member removal is wrong." }) , (21u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "AlreadyMember" , docs : "Already a member." }) , (21u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "NotMember" , docs : "Not a member." }) , (22u8 , 0u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (22u8 , 1u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (22u8 , 2u8) => Some (ErrorDetails { pallet : "Treasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (50u8 , 0u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (50u8 , 1u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (50u8 , 2u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (51u8 , 0u8) => Some (ErrorDetails { pallet : "Tips" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (51u8 , 1u8) => Some (ErrorDetails { pallet : "Tips" , error : "AlreadyKnown" , docs : "The tip was already found/started." }) , (51u8 , 2u8) => Some (ErrorDetails { pallet : "Tips" , error : "UnknownTip" , docs : "The tip hash is unknown." }) , (51u8 , 3u8) => Some (ErrorDetails { pallet : "Tips" , error : "NotFinder" , docs : "The account attempting to retract the tip is not the finder of the tip." }) , (51u8 , 4u8) => Some (ErrorDetails { pallet : "Tips" , error : "StillOpen" , docs : "The tip cannot be claimed/closed because there are not enough tippers yet." }) , (51u8 , 5u8) => Some (ErrorDetails { pallet : "Tips" , error : "Premature" , docs : "The tip cannot be claimed/closed because it's still in the countdown period." }) , (52u8 , 0u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (52u8 , 1u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (52u8 , 2u8) => Some (ErrorDetails { pallet : "Bounties" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (52u8 , 3u8) => Some (ErrorDetails { pallet : "Bounties" , error : "UnexpectedStatus" , docs : "The bounty status is unexpected." }) , (52u8 , 4u8) => Some (ErrorDetails { pallet : "Bounties" , error : "RequireCurator" , docs : "Require bounty curator." }) , (52u8 , 5u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidValue" , docs : "Invalid bounty value." }) , (52u8 , 6u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidFee" , docs : "Invalid bounty fee." }) , (52u8 , 7u8) => Some (ErrorDetails { pallet : "Bounties" , error : "PendingPayout" , docs : "A bounty payout is pending.\nTo cancel the bounty, you must unassign and slash the curator." }) , (52u8 , 8u8) => Some (ErrorDetails { pallet : "Bounties" , error : "Premature" , docs : "The bounties cannot be claimed/closed because it's still in the countdown period." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (24u8 , 0u8) => Some (ErrorDetails { pallet : "Claims" , error : "InvalidSignature" , docs : "Invalid Ethereum signature." }) , (24u8 , 1u8) => Some (ErrorDetails { pallet : "Claims" , error : "SignerHasNoClaim" , docs : "Ethereum address has no claim." }) , (24u8 , 2u8) => Some (ErrorDetails { pallet : "Claims" , error : "PotUnderflow" , docs : "There's not enough in the pot to pay out some unvested amount. Generally implies a logic\nlog::error." }) , (24u8 , 3u8) => Some (ErrorDetails { pallet : "Claims" , error : "MoveToExistedAddress" , docs : "Can NOT Move Claim to an EXISTED Address." }) , (24u8 , 4u8) => Some (ErrorDetails { pallet : "Claims" , error : "NewAddressTypeMis" , docs : "New Address Type - MISMATCHED" }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "Vesting" , error : "NotVesting" , docs : "The account given is not vesting." }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AtMaxVestingSchedules" , docs : "The account already has `MaxVestingSchedules` count of schedules and thus\ncannot add another one. Consider merging existing schedules in order to add another." }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AmountLow" , docs : "Amount being transferred is too low to create a vesting schedule." }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "Vesting" , error : "ScheduleIndexOutOfBounds" , docs : "An index was out of bounds of the vesting schedules." }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "Vesting" , error : "InvalidScheduleParams" , docs : "Failed to create a new schedule because some parameter was invalid." }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (27u8 , 0u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManySubAccounts" , docs : "Too many subs-accounts." }) , (27u8 , 1u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotFound" , docs : "Account isn't found." }) , (27u8 , 2u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotNamed" , docs : "Account isn't named." }) , (27u8 , 3u8) => Some (ErrorDetails { pallet : "Identity" , error : "EmptyIndex" , docs : "Empty index." }) , (27u8 , 4u8) => Some (ErrorDetails { pallet : "Identity" , error : "FeeChanged" , docs : "Fee is changed." }) , (27u8 , 5u8) => Some (ErrorDetails { pallet : "Identity" , error : "NoIdentity" , docs : "No identity found." }) , (27u8 , 6u8) => Some (ErrorDetails { pallet : "Identity" , error : "StickyJudgement" , docs : "Sticky judgement." }) , (27u8 , 7u8) => Some (ErrorDetails { pallet : "Identity" , error : "JudgementGiven" , docs : "Judgement given." }) , (27u8 , 8u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidJudgement" , docs : "Invalid judgement." }) , (27u8 , 9u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidIndex" , docs : "The index is invalid." }) , (27u8 , 10u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidTarget" , docs : "The target is invalid." }) , (27u8 , 11u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyFields" , docs : "Too many additional fields." }) , (27u8 , 12u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyRegistrars" , docs : "Maximum amount of registrars reached. Cannot add any more." }) , (27u8 , 13u8) => Some (ErrorDetails { pallet : "Identity" , error : "AlreadyClaimed" , docs : "Account ID is already named." }) , (27u8 , 14u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotSub" , docs : "Sender is not a sub-account." }) , (27u8 , 15u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotOwned" , docs : "Sub-account isn't owned by sender." }) , (28u8 , 0u8) => Some (ErrorDetails { pallet : "Society" , error : "BadPosition" , docs : "An incorrect position was provided." }) , (28u8 , 1u8) => Some (ErrorDetails { pallet : "Society" , error : "NotMember" , docs : "User is not a member." }) , (28u8 , 2u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyMember" , docs : "User is already a member." }) , (28u8 , 3u8) => Some (ErrorDetails { pallet : "Society" , error : "Suspended" , docs : "User is suspended." }) , (28u8 , 4u8) => Some (ErrorDetails { pallet : "Society" , error : "NotSuspended" , docs : "User is not suspended." }) , (28u8 , 5u8) => Some (ErrorDetails { pallet : "Society" , error : "NoPayout" , docs : "Nothing to payout." }) , (28u8 , 6u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyFounded" , docs : "Society already founded." }) , (28u8 , 7u8) => Some (ErrorDetails { pallet : "Society" , error : "InsufficientPot" , docs : "Not enough in pot to accept candidate." }) , (28u8 , 8u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyVouching" , docs : "Member is already vouching or banned from vouching again." }) , (28u8 , 9u8) => Some (ErrorDetails { pallet : "Society" , error : "NotVouching" , docs : "Member is not vouching." }) , (28u8 , 10u8) => Some (ErrorDetails { pallet : "Society" , error : "Head" , docs : "Cannot remove the head of the chain." }) , (28u8 , 11u8) => Some (ErrorDetails { pallet : "Society" , error : "Founder" , docs : "Cannot remove the founder." }) , (28u8 , 12u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyBid" , docs : "User has already made a bid." }) , (28u8 , 13u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyCandidate" , docs : "User is already a candidate." }) , (28u8 , 14u8) => Some (ErrorDetails { pallet : "Society" , error : "NotCandidate" , docs : "User is not a candidate." }) , (28u8 , 15u8) => Some (ErrorDetails { pallet : "Society" , error : "MaxMembers" , docs : "Too many members in the society." }) , (28u8 , 16u8) => Some (ErrorDetails { pallet : "Society" , error : "NotFounder" , docs : "The caller is not the founder." }) , (28u8 , 17u8) => Some (ErrorDetails { pallet : "Society" , error : "NotHead" , docs : "The caller is not the head." }) , (29u8 , 0u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotAllowed" , docs : "User is not allowed to make a call on behalf of this account" }) , (29u8 , 1u8) => Some (ErrorDetails { pallet : "Recovery" , error : "ZeroThreshold" , docs : "Threshold must be greater than zero" }) , (29u8 , 2u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotEnoughFriends" , docs : "Friends list must be greater than zero and threshold" }) , (29u8 , 3u8) => Some (ErrorDetails { pallet : "Recovery" , error : "MaxFriends" , docs : "Friends list must be less than max friends" }) , (29u8 , 4u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotSorted" , docs : "Friends list must be sorted and free of duplicates" }) , (29u8 , 5u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotRecoverable" , docs : "This account is not set up for recovery" }) , (29u8 , 6u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyRecoverable" , docs : "This account is already set up for recovery" }) , (29u8 , 7u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyStarted" , docs : "A recovery process has already started for this account" }) , (29u8 , 8u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotStarted" , docs : "A recovery process has not started for this rescuer" }) , (29u8 , 9u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotFriend" , docs : "This account is not a friend who can vouch" }) , (29u8 , 10u8) => Some (ErrorDetails { pallet : "Recovery" , error : "DelayPeriod" , docs : "The friend must wait until the delay period to vouch for this recovery" }) , (29u8 , 11u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyVouched" , docs : "This user has already vouched for this recovery" }) , (29u8 , 12u8) => Some (ErrorDetails { pallet : "Recovery" , error : "Threshold" , docs : "The threshold for recovering this account has not been met" }) , (29u8 , 13u8) => Some (ErrorDetails { pallet : "Recovery" , error : "StillActive" , docs : "There are still active recovery attempts that need to be closed" }) , (29u8 , 14u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyProxy" , docs : "This account is already set up for recovery" }) , (29u8 , 15u8) => Some (ErrorDetails { pallet : "Recovery" , error : "BadState" , docs : "Some internal state is broken." }) , (30u8 , 0u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "FailedToSchedule" , docs : "Failed to schedule a call" }) , (30u8 , 1u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "NotFound" , docs : "Cannot find the scheduled call." }) , (30u8 , 2u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "TargetBlockNumberInPast" , docs : "Given target block number is in the past." }) , (30u8 , 3u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "RescheduleNoChange" , docs : "Reschedule failed because it does not change scheduled time." }) , (31u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (31u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (31u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (31u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (31u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (31u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (31u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (31u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (32u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (32u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (32u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (32u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (32u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (32u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (32u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (32u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (32u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (32u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (32u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (32u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (32u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (32u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (35u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderInv" , docs : "Header - INVALID" }) , (35u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ConfirmedBlocksC" , docs : "Confirmed Blocks - CONFLICT" }) , (35u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ContinuousInv" , docs : "Continuous - INVALID" }) , (35u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AffirmationExisted" , docs : "Affirmation - EXISTED" }) , (35u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderHashInv" , docs : "Header Hash - INVALID" }) , (35u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "MMRInv" , docs : "MMR - INVALID" }) , (35u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderHashMis" , docs : "Header Hash - MISMATCHED" }) , (35u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ConfirmedHeaderNE" , docs : "Confirmed Header - NOT EXISTED" }) , (35u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ReceiptProofInv" , docs : "EthereumReceipt Proof - INVALID" }) , (35u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "PendingRelayHeaderParcelNE" , docs : "Pending Relay Header Parcel - NOT EXISTED" }) , (35u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "PendingRelayHeaderParcelAE" , docs : "Pending Relay Header Parcel - ALREADY EXISTED" }) , (35u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AlreadyVoteForAyeDup" , docs : "Already Vote for Aye - DUPLICATED" }) , (35u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AlreadyVoteForNayDup" , docs : "Already Vote for Nay - DUPLICATED" }) , (36u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AddrLenMis" , docs : "Address Length - MISMATCHED" }) , (36u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "PubkeyPrefixMis" , docs : "Pubkey Prefix - MISMATCHED" }) , (36u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "BytesCF" , docs : "Bytes - CONVERSION FAILED" }) , (36u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "IntCF" , docs : "Int - CONVERSION FAILED" }) , (36u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "ArrayCF" , docs : "Array - CONVERSION FAILED" }) , (36u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AddressCF" , docs : "Address - CONVERSION FAILED" }) , (36u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AssetAR" , docs : "Asset - ALREADY REDEEMED" }) , (36u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AuthoritiesChangeAR" , docs : "Authorities Change - ALREADY SYNCED" }) , (36u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "EthLogPF" , docs : "Eth Log - PARSING FAILED" }) , (36u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "KtonLockedNSBA" , docs : "*KTON* Locked - NO SUFFICIENT BACKING ASSETS" }) , (36u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RingLockedNSBA" , docs : "*RING* Locked - NO SUFFICIENT BACKING ASSETS" }) , (36u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "LogEntryNE" , docs : "Log Entry - NOT EXISTED" }) , (36u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RedeemDis" , docs : "Redeem - DISABLED" }) , (36u8 , 13u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RingLockLim" , docs : "Ring Lock - LIMITED" }) , (36u8 , 14u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "KtonLockLim" , docs : "Kton Lock - LIMITED" }) , (42u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "InvalidIssuingAccount" , docs : "Invalid Issuing System Account" }) , (42u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "AssetAlreadyRegistered" , docs : "assert already registered" }) , (42u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "AssetAlreadyRedeemed" , docs : "assert already redeemed" }) , (42u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "StringCF" , docs : "StringCF" }) , (42u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "InvalidEncodeERC20" , docs : "encode erc20 tx failed" }) , (42u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "InvalidAddressLen" , docs : "invalid ethereum address length" }) , (42u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "InvalidInputData" , docs : "decode input value error" }) , (42u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "DecodeEventFailed" , docs : "decode ethereum event failed" }) , (42u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "NoAuthority" , docs : "caller has no authority" }) , (42u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "UnsupportedAction" , docs : "the action is not supported" }) , (37u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayParcelAR" , docs : "Relay Parcel - ALREADY RELAYED" }) , (37u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RoundMis" , docs : "Round - MISMATCHED" }) , (37u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ActiveGamesTM" , docs : "Active Games - TOO MANY" }) , (37u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ExistedAffirmationsFoundC" , docs : "Existed Affirmation(s) Found - CONFLICT" }) , (37u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "GameAtThisRoundC" , docs : "Game at This Round - CLOSED" }) , (37u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayAffirmationDup" , docs : "Relay Affirmation - DUPLICATED" }) , (37u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "StakeIns" , docs : "Usable *RING* for Stake - INSUFFICIENT" }) , (37u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayProofsQuantityInv" , docs : "Relay Proofs Quantity - INVALID" }) , (37u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayAffirmationNE" , docs : "Relay Affirmation - NOT EXISTED" }) , (37u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ExtendedRelayAffirmationNE" , docs : "Extended Relay Affirmation - NOT EXISTED" }) , (37u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "PreviousRelayProofsInc" , docs : "Previous Relay Proofs - INCOMPLETE" }) , (37u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "PendingRelayParcelNE" , docs : "Pending Relay Parcel - NOT EXISTED" }) , (38u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "CandidateAE" , docs : "Candidate - ALREADY EXISTED" }) , (38u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "CandidateNE" , docs : "Candidate - NOT EXISTED" }) , (38u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityAE" , docs : "Authority - ALREADY EXISTED" }) , (38u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityNE" , docs : "Authority - NOT EXISTED" }) , (38u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityIT" , docs : "Authority - IN TERM" }) , (38u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthoritiesCountTL" , docs : "Authorities Count - TOO LOW" }) , (38u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "StakeIns" , docs : "Stake - INSUFFICIENT" }) , (38u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "OnAuthoritiesChangeDis" , docs : "On Authorities Change - DISABLED" }) , (38u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "ScheduledTM" , docs : "Scheduled Items - TOO MANY" }) , (38u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "ScheduledSignNE" , docs : "Scheduled Sign -NOT EXISTED" }) , (38u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "SignatureInv" , docs : "Signature - INVALID" }) , (38u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "TermMis" , docs : "Term - MISMATCHED" }) , (38u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthoritiesMis" , docs : "Authorities - MISMATCHED" }) , (38u8 , 13u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "NextAuthoritiesNE" , docs : "Next Authorities - NOT EXISTED" }) , (40u8 , 0u8) => Some (ErrorDetails { pallet : "EVM" , error : "BalanceLow" , docs : "Not enough balance to perform action" }) , (40u8 , 1u8) => Some (ErrorDetails { pallet : "EVM" , error : "FeeOverflow" , docs : "Calculating total fee overflowed" }) , (40u8 , 2u8) => Some (ErrorDetails { pallet : "EVM" , error : "PaymentOverflow" , docs : "Calculating total payment overflowed" }) , (40u8 , 3u8) => Some (ErrorDetails { pallet : "EVM" , error : "WithdrawFailed" , docs : "Withdraw fee failed" }) , (40u8 , 4u8) => Some (ErrorDetails { pallet : "EVM" , error : "GasPriceTooLow" , docs : "Gas price is too low." }) , (40u8 , 5u8) => Some (ErrorDetails { pallet : "EVM" , error : "InvalidNonce" , docs : "Nonce is invalid" }) , (41u8 , 0u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InvalidSignature" , docs : "Signature is invalid." }) , (41u8 , 1u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "PreLogExists" , docs : "Pre-log is present, therefore transact is not allowed." }) , (41u8 , 2u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionExitError" , docs : "The internal transaction failed." }) , (41u8 , 3u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionRevertError" , docs : "" }) , (41u8 , 4u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionFatalError" , docs : "" }) , (41u8 , 5u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "ReadyOnlyCall" , docs : "The internal call failed." }) , (45u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (45u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (45u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (45u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (45u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (45u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (45u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (45u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (45u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (45u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (43u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (43u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (43u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (43u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (43u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (43u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (43u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (43u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (43u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (43u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (43u8 , 10u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (43u8 , 11u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (60u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (60u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (60u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (60u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (60u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (60u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (60u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (60u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (60u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (60u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (61u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "UnknownRelayChainBlock" , docs : "Relay chain block is unknown to us." }) , (61u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "InvalidStorageProof" , docs : "Invalid storage proof has been passed." }) , (61u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "UnknownParaHead" , docs : "Given parachain head is unknown." }) , (61u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (61u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "FailedToExtractStateRoot" , docs : "Failed to extract state root from given parachain head." }) , (53u8 , 0u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (53u8 , 1u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (53u8 , 2u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (53u8 , 3u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (53u8 , 4u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (53u8 , 5u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , (54u8 , 0u8) => Some (ErrorDetails { pallet : "TransactionPause" , error : "CannotPause" , docs : "can not pause" }) , (54u8 , 1u8) => Some (ErrorDetails { pallet : "TransactionPause" , error : "InvalidCharacter" , docs : "invalid character encoding" }) , (49u8 , 0u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "TokenUnregistered" , docs : "Token unregistered when issuing" }) , (49u8 , 1u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidIssuingAccount" , docs : "Invalid Issuing System Account" }) , (49u8 , 2u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "StringCF" , docs : "StringCF" }) , (49u8 , 3u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidEncodeERC20" , docs : "encode erc20 tx failed" }) , (49u8 , 4u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidIssueEncoding" , docs : "encode issue tx failed" }) , (49u8 , 5u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidAddressLen" , docs : "invalid ethereum address length" }) , _ => None } + match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (2u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (2u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (2u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (4u8 , 8u8) => Some (ErrorDetails { pallet : "Balances" , error : "LockP" , docs : "Lock - POISONED." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Kton" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Kton" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Kton" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Kton" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Kton" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Kton" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (5u8 , 8u8) => Some (ErrorDetails { pallet : "Kton" , error : "LockP" , docs : "Lock - POISONED." }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchEarlySubmission" , docs : "Submission was too early." }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWrongWinnerCount" , docs : "Wrong number of winners presented." }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWeakSubmission" , docs : "Submission was too weak, score-wise." }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedQueueFull" , docs : "The queue was full, and the solution was not better than any of the existing ones." }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedCannotPayDeposit" , docs : "The origin failed to pay the deposit." }) , (8u8 , 5u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedInvalidWitness" , docs : "Witness data to dispatchable is invalid." }) , (8u8 , 6u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedTooMuchWeight" , docs : "The signed submission consumes too much weight" }) , (8u8 , 7u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "OcwCallWrongEra" , docs : "OCW submitted solution for wrong round" }) , (8u8 , 8u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "MissingSnapshotMetadata" , docs : "Snapshot metadata should exist but didn't." }) , (8u8 , 9u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "InvalidSubmissionIndex" , docs : "`Self::insert_submission` returned an invalid index." }) , (8u8 , 10u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "CallNotAllowed" , docs : "The call is not allowed at this point." }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotController" , docs : "Not a controller account." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotStash" , docs : "Not a stash account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyBonded" , docs : "Stash is already bonded." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyPaired" , docs : "Controller is already paired." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Staking" , error : "EmptyTargets" , docs : "Targets cannot be empty." }) , (9u8 , 5u8) => Some (ErrorDetails { pallet : "Staking" , error : "DuplicateIndex" , docs : "Duplicate index." }) , (9u8 , 6u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidSlashIndex" , docs : "Slash record index out of bounds." }) , (9u8 , 7u8) => Some (ErrorDetails { pallet : "Staking" , error : "InsufficientBond" , docs : "Can not bond with value less than minimum required." }) , (9u8 , 8u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoMoreChunks" , docs : "Can not schedule more unlock chunks." }) , (9u8 , 9u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoUnlockChunk" , docs : "Can not rebond without unlocking chunks." }) , (9u8 , 10u8) => Some (ErrorDetails { pallet : "Staking" , error : "FundedTarget" , docs : "Attempting to target a stash that still has funds." }) , (9u8 , 11u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidEraToReward" , docs : "Invalid era to reward." }) , (9u8 , 12u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidNumberOfNominations" , docs : "Invalid number of nominations." }) , (9u8 , 13u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotSortedAndUnique" , docs : "Items are not sorted and unique." }) , (9u8 , 14u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyClaimed" , docs : "Rewards for this era have already been claimed for this validator." }) , (9u8 , 15u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectHistoryDepth" , docs : "Incorrect previous history depth input provided." }) , (9u8 , 16u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectSlashingSpans" , docs : "Incorrect number of slashing spans provided." }) , (9u8 , 17u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadState" , docs : "Internal state has become somehow corrupted and the operation cannot continue." }) , (9u8 , 18u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyTargets" , docs : "Too many nomination targets supplied." }) , (9u8 , 19u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadTarget" , docs : "A nomination target was supplied that was blocked or otherwise not a validator." }) , (9u8 , 20u8) => Some (ErrorDetails { pallet : "Staking" , error : "CannotChillOther" , docs : "The user has enough bond and thus cannot be chilled forcefully by an external person." }) , (9u8 , 21u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyNominators" , docs : "There are too many nominators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (9u8 , 22u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyValidators" , docs : "There are too many validators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (9u8 , 23u8) => Some (ErrorDetails { pallet : "Staking" , error : "PayoutIns" , docs : "Payout - INSUFFICIENT" }) , (12u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (12u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (12u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (12u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (12u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (14u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ValueLow" , docs : "Value too low" }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalMissing" , docs : "Proposal does not exist" }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyCanceled" , docs : "Cannot cancel the same proposal twice" }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicateProposal" , docs : "Proposal already made" }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ProposalBlacklisted" , docs : "Proposal still blacklisted" }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotSimpleMajority" , docs : "Next external proposal not simple majority" }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InvalidHash" , docs : "Invalid hash" }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoProposal" , docs : "No external proposal" }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyVetoed" , docs : "Identity may not veto a proposal twice" }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "Democracy" , error : "DuplicatePreimage" , docs : "Preimage already noted" }) , (17u8 , 10u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotImminent" , docs : "Not imminent" }) , (17u8 , 11u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooEarly" , docs : "Too early" }) , (17u8 , 12u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Imminent" , docs : "Imminent" }) , (17u8 , 13u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageMissing" , docs : "Preimage not found" }) , (17u8 , 14u8) => Some (ErrorDetails { pallet : "Democracy" , error : "ReferendumInvalid" , docs : "Vote given for invalid referendum" }) , (17u8 , 15u8) => Some (ErrorDetails { pallet : "Democracy" , error : "PreimageInvalid" , docs : "Invalid preimage" }) , (17u8 , 16u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoneWaiting" , docs : "No proposals waiting" }) , (17u8 , 17u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotVoter" , docs : "The given account did not vote on the referendum." }) , (17u8 , 18u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NoPermission" , docs : "The actor has no permission to conduct the action." }) , (17u8 , 19u8) => Some (ErrorDetails { pallet : "Democracy" , error : "AlreadyDelegating" , docs : "The account is already delegating." }) , (17u8 , 20u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InsufficientFunds" , docs : "Too high a balance was provided that the account cannot afford." }) , (17u8 , 21u8) => Some (ErrorDetails { pallet : "Democracy" , error : "NotDelegating" , docs : "The account is not currently delegating." }) , (17u8 , 22u8) => Some (ErrorDetails { pallet : "Democracy" , error : "VotesExist" , docs : "The account currently has votes attached to it and the operation cannot succeed until\nthese are removed, either through `unvote` or `reap_vote`." }) , (17u8 , 23u8) => Some (ErrorDetails { pallet : "Democracy" , error : "InstantNotAllowed" , docs : "The instant referendum origin is currently disallowed." }) , (17u8 , 24u8) => Some (ErrorDetails { pallet : "Democracy" , error : "Nonsense" , docs : "Delegation to oneself makes no sense." }) , (17u8 , 25u8) => Some (ErrorDetails { pallet : "Democracy" , error : "WrongUpperBound" , docs : "Invalid upper bound." }) , (17u8 , 26u8) => Some (ErrorDetails { pallet : "Democracy" , error : "MaxVotesReached" , docs : "Maximum number of votes reached." }) , (17u8 , 27u8) => Some (ErrorDetails { pallet : "Democracy" , error : "TooManyProposals" , docs : "Maximum number of proposals reached." }) , (18u8 , 0u8) => Some (ErrorDetails { pallet : "Council" , error : "NotMember" , docs : "Account is not a member" }) , (18u8 , 1u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (18u8 , 2u8) => Some (ErrorDetails { pallet : "Council" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (18u8 , 3u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongIndex" , docs : "Mismatched index" }) , (18u8 , 4u8) => Some (ErrorDetails { pallet : "Council" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (18u8 , 5u8) => Some (ErrorDetails { pallet : "Council" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (18u8 , 6u8) => Some (ErrorDetails { pallet : "Council" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (18u8 , 7u8) => Some (ErrorDetails { pallet : "Council" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (18u8 , 8u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (18u8 , 9u8) => Some (ErrorDetails { pallet : "Council" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "NotMember" , docs : "Account is not a member" }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (19u8 , 3u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongIndex" , docs : "Mismatched index" }) , (19u8 , 4u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (19u8 , 5u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (19u8 , 6u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (19u8 , 7u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (19u8 , 8u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (19u8 , 9u8) => Some (ErrorDetails { pallet : "TechnicalCommittee" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (20u8 , 0u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToVote" , docs : "Cannot vote when no candidates or members exist." }) , (20u8 , 1u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NoVotes" , docs : "Must vote for at least one candidate." }) , (20u8 , 2u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "TooManyVotes" , docs : "Cannot vote more than candidates." }) , (20u8 , 3u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MaximumVotesExceeded" , docs : "Cannot vote more than maximum allowed." }) , (20u8 , 4u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "LowBalance" , docs : "Cannot vote with stake less than minimum balance." }) , (20u8 , 5u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "UnableToPayBond" , docs : "Voter can not pay voting bond." }) , (20u8 , 6u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MustBeVoter" , docs : "Must be a voter." }) , (20u8 , 7u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "ReportSelf" , docs : "Cannot report self." }) , (20u8 , 8u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "DuplicatedCandidate" , docs : "Duplicated candidate submission." }) , (20u8 , 9u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "MemberSubmit" , docs : "Member cannot re-submit candidacy." }) , (20u8 , 10u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "RunnerUpSubmit" , docs : "Runner cannot re-submit candidacy." }) , (20u8 , 11u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InsufficientCandidateFunds" , docs : "Candidate does not have enough funds." }) , (20u8 , 12u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "NotMember" , docs : "Not a member." }) , (20u8 , 13u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidWitnessData" , docs : "The provided count of number of candidates is incorrect." }) , (20u8 , 14u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidVoteCount" , docs : "The provided count of number of votes is incorrect." }) , (20u8 , 15u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidRenouncing" , docs : "The renouncing origin presented a wrong `Renouncing` parameter." }) , (20u8 , 16u8) => Some (ErrorDetails { pallet : "PhragmenElection" , error : "InvalidReplacement" , docs : "Prediction regarding replacement after member removal is wrong." }) , (21u8 , 0u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "AlreadyMember" , docs : "Already a member." }) , (21u8 , 1u8) => Some (ErrorDetails { pallet : "TechnicalMembership" , error : "NotMember" , docs : "Not a member." }) , (22u8 , 0u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (22u8 , 1u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (22u8 , 2u8) => Some (ErrorDetails { pallet : "Treasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (50u8 , 0u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (50u8 , 1u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (50u8 , 2u8) => Some (ErrorDetails { pallet : "KtonTreasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (51u8 , 0u8) => Some (ErrorDetails { pallet : "Tips" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (51u8 , 1u8) => Some (ErrorDetails { pallet : "Tips" , error : "AlreadyKnown" , docs : "The tip was already found/started." }) , (51u8 , 2u8) => Some (ErrorDetails { pallet : "Tips" , error : "UnknownTip" , docs : "The tip hash is unknown." }) , (51u8 , 3u8) => Some (ErrorDetails { pallet : "Tips" , error : "NotFinder" , docs : "The account attempting to retract the tip is not the finder of the tip." }) , (51u8 , 4u8) => Some (ErrorDetails { pallet : "Tips" , error : "StillOpen" , docs : "The tip cannot be claimed/closed because there are not enough tippers yet." }) , (51u8 , 5u8) => Some (ErrorDetails { pallet : "Tips" , error : "Premature" , docs : "The tip cannot be claimed/closed because it's still in the countdown period." }) , (52u8 , 0u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (52u8 , 1u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (52u8 , 2u8) => Some (ErrorDetails { pallet : "Bounties" , error : "ReasonTooBig" , docs : "The reason given is just too big." }) , (52u8 , 3u8) => Some (ErrorDetails { pallet : "Bounties" , error : "UnexpectedStatus" , docs : "The bounty status is unexpected." }) , (52u8 , 4u8) => Some (ErrorDetails { pallet : "Bounties" , error : "RequireCurator" , docs : "Require bounty curator." }) , (52u8 , 5u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidValue" , docs : "Invalid bounty value." }) , (52u8 , 6u8) => Some (ErrorDetails { pallet : "Bounties" , error : "InvalidFee" , docs : "Invalid bounty fee." }) , (52u8 , 7u8) => Some (ErrorDetails { pallet : "Bounties" , error : "PendingPayout" , docs : "A bounty payout is pending.\nTo cancel the bounty, you must unassign and slash the curator." }) , (52u8 , 8u8) => Some (ErrorDetails { pallet : "Bounties" , error : "Premature" , docs : "The bounties cannot be claimed/closed because it's still in the countdown period." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "Vesting" , error : "NotVesting" , docs : "The account given is not vesting." }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AtMaxVestingSchedules" , docs : "The account already has `MaxVestingSchedules` count of schedules and thus\ncannot add another one. Consider merging existing schedules in order to add another." }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "Vesting" , error : "AmountLow" , docs : "Amount being transferred is too low to create a vesting schedule." }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "Vesting" , error : "ScheduleIndexOutOfBounds" , docs : "An index was out of bounds of the vesting schedules." }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "Vesting" , error : "InvalidScheduleParams" , docs : "Failed to create a new schedule because some parameter was invalid." }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (27u8 , 0u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManySubAccounts" , docs : "Too many subs-accounts." }) , (27u8 , 1u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotFound" , docs : "Account isn't found." }) , (27u8 , 2u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotNamed" , docs : "Account isn't named." }) , (27u8 , 3u8) => Some (ErrorDetails { pallet : "Identity" , error : "EmptyIndex" , docs : "Empty index." }) , (27u8 , 4u8) => Some (ErrorDetails { pallet : "Identity" , error : "FeeChanged" , docs : "Fee is changed." }) , (27u8 , 5u8) => Some (ErrorDetails { pallet : "Identity" , error : "NoIdentity" , docs : "No identity found." }) , (27u8 , 6u8) => Some (ErrorDetails { pallet : "Identity" , error : "StickyJudgement" , docs : "Sticky judgement." }) , (27u8 , 7u8) => Some (ErrorDetails { pallet : "Identity" , error : "JudgementGiven" , docs : "Judgement given." }) , (27u8 , 8u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidJudgement" , docs : "Invalid judgement." }) , (27u8 , 9u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidIndex" , docs : "The index is invalid." }) , (27u8 , 10u8) => Some (ErrorDetails { pallet : "Identity" , error : "InvalidTarget" , docs : "The target is invalid." }) , (27u8 , 11u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyFields" , docs : "Too many additional fields." }) , (27u8 , 12u8) => Some (ErrorDetails { pallet : "Identity" , error : "TooManyRegistrars" , docs : "Maximum amount of registrars reached. Cannot add any more." }) , (27u8 , 13u8) => Some (ErrorDetails { pallet : "Identity" , error : "AlreadyClaimed" , docs : "Account ID is already named." }) , (27u8 , 14u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotSub" , docs : "Sender is not a sub-account." }) , (27u8 , 15u8) => Some (ErrorDetails { pallet : "Identity" , error : "NotOwned" , docs : "Sub-account isn't owned by sender." }) , (28u8 , 0u8) => Some (ErrorDetails { pallet : "Society" , error : "BadPosition" , docs : "An incorrect position was provided." }) , (28u8 , 1u8) => Some (ErrorDetails { pallet : "Society" , error : "NotMember" , docs : "User is not a member." }) , (28u8 , 2u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyMember" , docs : "User is already a member." }) , (28u8 , 3u8) => Some (ErrorDetails { pallet : "Society" , error : "Suspended" , docs : "User is suspended." }) , (28u8 , 4u8) => Some (ErrorDetails { pallet : "Society" , error : "NotSuspended" , docs : "User is not suspended." }) , (28u8 , 5u8) => Some (ErrorDetails { pallet : "Society" , error : "NoPayout" , docs : "Nothing to payout." }) , (28u8 , 6u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyFounded" , docs : "Society already founded." }) , (28u8 , 7u8) => Some (ErrorDetails { pallet : "Society" , error : "InsufficientPot" , docs : "Not enough in pot to accept candidate." }) , (28u8 , 8u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyVouching" , docs : "Member is already vouching or banned from vouching again." }) , (28u8 , 9u8) => Some (ErrorDetails { pallet : "Society" , error : "NotVouching" , docs : "Member is not vouching." }) , (28u8 , 10u8) => Some (ErrorDetails { pallet : "Society" , error : "Head" , docs : "Cannot remove the head of the chain." }) , (28u8 , 11u8) => Some (ErrorDetails { pallet : "Society" , error : "Founder" , docs : "Cannot remove the founder." }) , (28u8 , 12u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyBid" , docs : "User has already made a bid." }) , (28u8 , 13u8) => Some (ErrorDetails { pallet : "Society" , error : "AlreadyCandidate" , docs : "User is already a candidate." }) , (28u8 , 14u8) => Some (ErrorDetails { pallet : "Society" , error : "NotCandidate" , docs : "User is not a candidate." }) , (28u8 , 15u8) => Some (ErrorDetails { pallet : "Society" , error : "MaxMembers" , docs : "Too many members in the society." }) , (28u8 , 16u8) => Some (ErrorDetails { pallet : "Society" , error : "NotFounder" , docs : "The caller is not the founder." }) , (28u8 , 17u8) => Some (ErrorDetails { pallet : "Society" , error : "NotHead" , docs : "The caller is not the head." }) , (29u8 , 0u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotAllowed" , docs : "User is not allowed to make a call on behalf of this account" }) , (29u8 , 1u8) => Some (ErrorDetails { pallet : "Recovery" , error : "ZeroThreshold" , docs : "Threshold must be greater than zero" }) , (29u8 , 2u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotEnoughFriends" , docs : "Friends list must be greater than zero and threshold" }) , (29u8 , 3u8) => Some (ErrorDetails { pallet : "Recovery" , error : "MaxFriends" , docs : "Friends list must be less than max friends" }) , (29u8 , 4u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotSorted" , docs : "Friends list must be sorted and free of duplicates" }) , (29u8 , 5u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotRecoverable" , docs : "This account is not set up for recovery" }) , (29u8 , 6u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyRecoverable" , docs : "This account is already set up for recovery" }) , (29u8 , 7u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyStarted" , docs : "A recovery process has already started for this account" }) , (29u8 , 8u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotStarted" , docs : "A recovery process has not started for this rescuer" }) , (29u8 , 9u8) => Some (ErrorDetails { pallet : "Recovery" , error : "NotFriend" , docs : "This account is not a friend who can vouch" }) , (29u8 , 10u8) => Some (ErrorDetails { pallet : "Recovery" , error : "DelayPeriod" , docs : "The friend must wait until the delay period to vouch for this recovery" }) , (29u8 , 11u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyVouched" , docs : "This user has already vouched for this recovery" }) , (29u8 , 12u8) => Some (ErrorDetails { pallet : "Recovery" , error : "Threshold" , docs : "The threshold for recovering this account has not been met" }) , (29u8 , 13u8) => Some (ErrorDetails { pallet : "Recovery" , error : "StillActive" , docs : "There are still active recovery attempts that need to be closed" }) , (29u8 , 14u8) => Some (ErrorDetails { pallet : "Recovery" , error : "AlreadyProxy" , docs : "This account is already set up for recovery" }) , (29u8 , 15u8) => Some (ErrorDetails { pallet : "Recovery" , error : "BadState" , docs : "Some internal state is broken." }) , (30u8 , 0u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "FailedToSchedule" , docs : "Failed to schedule a call" }) , (30u8 , 1u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "NotFound" , docs : "Cannot find the scheduled call." }) , (30u8 , 2u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "TargetBlockNumberInPast" , docs : "Given target block number is in the past." }) , (30u8 , 3u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "RescheduleNoChange" , docs : "Reschedule failed because it does not change scheduled time." }) , (31u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (31u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (31u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (31u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (31u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (31u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (31u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (31u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (32u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (32u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (32u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (32u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (32u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (32u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (32u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (32u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (32u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (32u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (32u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (32u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (32u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (32u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (35u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderInv" , docs : "Header - INVALID" }) , (35u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ConfirmedBlocksC" , docs : "Confirmed Blocks - CONFLICT" }) , (35u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ContinuousInv" , docs : "Continuous - INVALID" }) , (35u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AffirmationExisted" , docs : "Affirmation - EXISTED" }) , (35u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderHashInv" , docs : "Header Hash - INVALID" }) , (35u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "MMRInv" , docs : "MMR - INVALID" }) , (35u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "HeaderHashMis" , docs : "Header Hash - MISMATCHED" }) , (35u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ConfirmedHeaderNE" , docs : "Confirmed Header - NOT EXISTED" }) , (35u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "ReceiptProofInv" , docs : "EthereumReceipt Proof - INVALID" }) , (35u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "PendingRelayHeaderParcelNE" , docs : "Pending Relay Header Parcel - NOT EXISTED" }) , (35u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "PendingRelayHeaderParcelAE" , docs : "Pending Relay Header Parcel - ALREADY EXISTED" }) , (35u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AlreadyVoteForAyeDup" , docs : "Already Vote for Aye - DUPLICATED" }) , (35u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumRelay" , error : "AlreadyVoteForNayDup" , docs : "Already Vote for Nay - DUPLICATED" }) , (36u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AddrLenMis" , docs : "Address Length - MISMATCHED" }) , (36u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "PubkeyPrefixMis" , docs : "Pubkey Prefix - MISMATCHED" }) , (36u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "BytesCF" , docs : "Bytes - CONVERSION FAILED" }) , (36u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "IntCF" , docs : "Int - CONVERSION FAILED" }) , (36u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "ArrayCF" , docs : "Array - CONVERSION FAILED" }) , (36u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AddressCF" , docs : "Address - CONVERSION FAILED" }) , (36u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AssetAR" , docs : "Asset - ALREADY REDEEMED" }) , (36u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "AuthoritiesChangeAR" , docs : "Authorities Change - ALREADY SYNCED" }) , (36u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "EthLogPF" , docs : "Eth Log - PARSING FAILED" }) , (36u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "KtonLockedNSBA" , docs : "*KTON* Locked - NO SUFFICIENT BACKING ASSETS" }) , (36u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RingLockedNSBA" , docs : "*RING* Locked - NO SUFFICIENT BACKING ASSETS" }) , (36u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "LogEntryNE" , docs : "Log Entry - NOT EXISTED" }) , (36u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RedeemDis" , docs : "Redeem - DISABLED" }) , (36u8 , 13u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "RingLockLim" , docs : "Ring Lock - LIMITED" }) , (36u8 , 14u8) => Some (ErrorDetails { pallet : "EthereumBacking" , error : "KtonLockLim" , docs : "Kton Lock - LIMITED" }) , (42u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "InvalidIssuingAccount" , docs : "Invalid Issuing System Account" }) , (42u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "AssetAlreadyRegistered" , docs : "assert already registered" }) , (42u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "AssetAlreadyRedeemed" , docs : "assert already redeemed" }) , (42u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "StringCF" , docs : "StringCF" }) , (42u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "InvalidEncodeERC20" , docs : "encode erc20 tx failed" }) , (42u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "InvalidAddressLen" , docs : "invalid ethereum address length" }) , (42u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "InvalidInputData" , docs : "decode input value error" }) , (42u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "DecodeEventFailed" , docs : "decode ethereum event failed" }) , (42u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "NoAuthority" , docs : "caller has no authority" }) , (42u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumIssuing" , error : "UnsupportedAction" , docs : "the action is not supported" }) , (37u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayParcelAR" , docs : "Relay Parcel - ALREADY RELAYED" }) , (37u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RoundMis" , docs : "Round - MISMATCHED" }) , (37u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ActiveGamesTM" , docs : "Active Games - TOO MANY" }) , (37u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ExistedAffirmationsFoundC" , docs : "Existed Affirmation(s) Found - CONFLICT" }) , (37u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "GameAtThisRoundC" , docs : "Game at This Round - CLOSED" }) , (37u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayAffirmationDup" , docs : "Relay Affirmation - DUPLICATED" }) , (37u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "StakeIns" , docs : "Usable *RING* for Stake - INSUFFICIENT" }) , (37u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayProofsQuantityInv" , docs : "Relay Proofs Quantity - INVALID" }) , (37u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "RelayAffirmationNE" , docs : "Relay Affirmation - NOT EXISTED" }) , (37u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "ExtendedRelayAffirmationNE" , docs : "Extended Relay Affirmation - NOT EXISTED" }) , (37u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "PreviousRelayProofsInc" , docs : "Previous Relay Proofs - INCOMPLETE" }) , (37u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelayerGame" , error : "PendingRelayParcelNE" , docs : "Pending Relay Parcel - NOT EXISTED" }) , (38u8 , 0u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "CandidateAE" , docs : "Candidate - ALREADY EXISTED" }) , (38u8 , 1u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "CandidateNE" , docs : "Candidate - NOT EXISTED" }) , (38u8 , 2u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityAE" , docs : "Authority - ALREADY EXISTED" }) , (38u8 , 3u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityNE" , docs : "Authority - NOT EXISTED" }) , (38u8 , 4u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthorityIT" , docs : "Authority - IN TERM" }) , (38u8 , 5u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthoritiesCountTL" , docs : "Authorities Count - TOO LOW" }) , (38u8 , 6u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "StakeIns" , docs : "Stake - INSUFFICIENT" }) , (38u8 , 7u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "OnAuthoritiesChangeDis" , docs : "On Authorities Change - DISABLED" }) , (38u8 , 8u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "ScheduledTM" , docs : "Scheduled Items - TOO MANY" }) , (38u8 , 9u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "ScheduledSignNE" , docs : "Scheduled Sign -NOT EXISTED" }) , (38u8 , 10u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "SignatureInv" , docs : "Signature - INVALID" }) , (38u8 , 11u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "TermMis" , docs : "Term - MISMATCHED" }) , (38u8 , 12u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "AuthoritiesMis" , docs : "Authorities - MISMATCHED" }) , (38u8 , 13u8) => Some (ErrorDetails { pallet : "EthereumRelayAuthorities" , error : "NextAuthoritiesNE" , docs : "Next Authorities - NOT EXISTED" }) , (40u8 , 0u8) => Some (ErrorDetails { pallet : "EVM" , error : "BalanceLow" , docs : "Not enough balance to perform action" }) , (40u8 , 1u8) => Some (ErrorDetails { pallet : "EVM" , error : "FeeOverflow" , docs : "Calculating total fee overflowed" }) , (40u8 , 2u8) => Some (ErrorDetails { pallet : "EVM" , error : "PaymentOverflow" , docs : "Calculating total payment overflowed" }) , (40u8 , 3u8) => Some (ErrorDetails { pallet : "EVM" , error : "WithdrawFailed" , docs : "Withdraw fee failed" }) , (40u8 , 4u8) => Some (ErrorDetails { pallet : "EVM" , error : "GasPriceTooLow" , docs : "Gas price is too low." }) , (40u8 , 5u8) => Some (ErrorDetails { pallet : "EVM" , error : "InvalidNonce" , docs : "Nonce is invalid" }) , (41u8 , 0u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InvalidSignature" , docs : "Signature is invalid." }) , (41u8 , 1u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "PreLogExists" , docs : "Pre-log is present, therefore transact is not allowed." }) , (41u8 , 2u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionExitError" , docs : "The internal transaction failed." }) , (41u8 , 3u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionRevertError" , docs : "" }) , (41u8 , 4u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionFatalError" , docs : "" }) , (41u8 , 5u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "ReadyOnlyCall" , docs : "The internal call failed." }) , (41u8 , 6u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "MessageTransactionError" , docs : "Message transaction invalid" }) , (41u8 , 7u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "MessageValidateError" , docs : "Message validate invalid" }) , (45u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (45u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (45u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (45u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (45u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (45u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (45u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (45u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (45u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (45u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangoroGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (43u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (43u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (43u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (43u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (43u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (43u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (43u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (43u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (43u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (43u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (43u8 , 10u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (43u8 , 11u8) => Some (ErrorDetails { pallet : "BridgePangoroMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (60u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (60u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (60u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (60u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (60u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (60u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (60u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (60u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (60u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (60u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (61u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "UnknownRelayChainBlock" , docs : "Relay chain block is unknown to us." }) , (61u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "InvalidStorageProof" , docs : "Invalid storage proof has been passed." }) , (61u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "UnknownParaHead" , docs : "Given parachain head is unknown." }) , (61u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (61u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeRococoParachains" , error : "FailedToExtractStateRoot" , docs : "Failed to extract state root from given parachain head." }) , (63u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (63u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (63u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (63u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (63u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (63u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (63u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (63u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (63u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (63u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (63u8 , 10u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (63u8 , 11u8) => Some (ErrorDetails { pallet : "BridgePangolinParachainMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (53u8 , 0u8) => Some (ErrorDetails { pallet : "PangoroFeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (53u8 , 1u8) => Some (ErrorDetails { pallet : "PangoroFeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (53u8 , 2u8) => Some (ErrorDetails { pallet : "PangoroFeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (53u8 , 3u8) => Some (ErrorDetails { pallet : "PangoroFeeMarket" , error : "CollateralTooLow" , docs : "Locked collateral is too low to cover one order." }) , (53u8 , 4u8) => Some (ErrorDetails { pallet : "PangoroFeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (53u8 , 5u8) => Some (ErrorDetails { pallet : "PangoroFeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (53u8 , 6u8) => Some (ErrorDetails { pallet : "PangoroFeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , (64u8 , 0u8) => Some (ErrorDetails { pallet : "PangolinParachainFeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (64u8 , 1u8) => Some (ErrorDetails { pallet : "PangolinParachainFeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (64u8 , 2u8) => Some (ErrorDetails { pallet : "PangolinParachainFeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (64u8 , 3u8) => Some (ErrorDetails { pallet : "PangolinParachainFeeMarket" , error : "CollateralTooLow" , docs : "Locked collateral is too low to cover one order." }) , (64u8 , 4u8) => Some (ErrorDetails { pallet : "PangolinParachainFeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (64u8 , 5u8) => Some (ErrorDetails { pallet : "PangolinParachainFeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (64u8 , 6u8) => Some (ErrorDetails { pallet : "PangolinParachainFeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , (54u8 , 0u8) => Some (ErrorDetails { pallet : "TransactionPause" , error : "CannotPause" , docs : "can not pause" }) , (54u8 , 1u8) => Some (ErrorDetails { pallet : "TransactionPause" , error : "InvalidCharacter" , docs : "invalid character encoding" }) , (49u8 , 0u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "TokenUnregistered" , docs : "Token unregistered when issuing" }) , (49u8 , 1u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidIssuingAccount" , docs : "Invalid Issuing System Account" }) , (49u8 , 2u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "StringCF" , docs : "StringCF" }) , (49u8 , 3u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidEncodeERC20" , docs : "encode erc20 tx failed" }) , (49u8 , 4u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidIssueEncoding" , docs : "encode issue tx failed" }) , (49u8 , 5u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidAddressLen" , docs : "invalid ethereum address length" }) , (49u8 , 6u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateIssuing" , error : "InvalidMessageSender" , docs : "invalid message sender" }) , (65u8 , 0u8) => Some (ErrorDetails { pallet : "ToPangolinParachainBacking" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (65u8 , 1u8) => Some (ErrorDetails { pallet : "ToPangolinParachainBacking" , error : "RingLockLimited" , docs : "Ring Lock LIMITED." }) , (65u8 , 2u8) => Some (ErrorDetails { pallet : "ToPangolinParachainBacking" , error : "RingDailyLimited" , docs : "Redeem Daily Limited" }) , (65u8 , 3u8) => Some (ErrorDetails { pallet : "ToPangolinParachainBacking" , error : "NonceDuplicated" , docs : "Message nonce duplicated." }) , _ => None } } else { None } @@ -26586,9 +27736,6 @@ pub mod api { pub fn bounties(&self) -> bounties::constants::ConstantsApi { bounties::constants::ConstantsApi } - pub fn claims(&self) -> claims::constants::ConstantsApi { - claims::constants::ConstantsApi - } pub fn vesting(&self) -> vesting::constants::ConstantsApi { vesting::constants::ConstantsApi } @@ -26650,14 +27797,29 @@ pub mod api { ) -> bridge_rococo_parachains::constants::ConstantsApi { bridge_rococo_parachains::constants::ConstantsApi } - pub fn fee_market(&self) -> fee_market::constants::ConstantsApi { - fee_market::constants::ConstantsApi + pub fn bridge_pangolin_parachain_messages( + &self, + ) -> bridge_pangolin_parachain_messages::constants::ConstantsApi { + bridge_pangolin_parachain_messages::constants::ConstantsApi + } + pub fn pangoro_fee_market(&self) -> pangoro_fee_market::constants::ConstantsApi { + pangoro_fee_market::constants::ConstantsApi + } + pub fn pangolin_parachain_fee_market( + &self, + ) -> pangolin_parachain_fee_market::constants::ConstantsApi { + pangolin_parachain_fee_market::constants::ConstantsApi } pub fn substrate2_substrate_issuing( &self, ) -> substrate2_substrate_issuing::constants::ConstantsApi { substrate2_substrate_issuing::constants::ConstantsApi } + pub fn to_pangolin_parachain_backing( + &self, + ) -> to_pangolin_parachain_backing::constants::ConstantsApi { + to_pangolin_parachain_backing::constants::ConstantsApi + } } pub struct StorageApi<'a, T: ::subxt::Config> { client: &'a ::subxt::Client, @@ -26707,15 +27869,6 @@ pub mod api { pub fn beefy(&self) -> beefy::storage::StorageApi<'a, T> { beefy::storage::StorageApi::new(self.client) } - pub fn beefy_gadget(&self) -> beefy_gadget::storage::StorageApi<'a, T> { - beefy_gadget::storage::StorageApi::new(self.client) - } - pub fn mmr(&self) -> mmr::storage::StorageApi<'a, T> { - mmr::storage::StorageApi::new(self.client) - } - pub fn mmr_leaf(&self) -> mmr_leaf::storage::StorageApi<'a, T> { - mmr_leaf::storage::StorageApi::new(self.client) - } pub fn im_online(&self) -> im_online::storage::StorageApi<'a, T> { im_online::storage::StorageApi::new(self.client) } @@ -26752,9 +27905,6 @@ pub mod api { pub fn sudo(&self) -> sudo::storage::StorageApi<'a, T> { sudo::storage::StorageApi::new(self.client) } - pub fn claims(&self) -> claims::storage::StorageApi<'a, T> { - claims::storage::StorageApi::new(self.client) - } pub fn vesting(&self) -> vesting::storage::StorageApi<'a, T> { vesting::storage::StorageApi::new(self.client) } @@ -26818,8 +27968,18 @@ pub mod api { ) -> bridge_rococo_parachains::storage::StorageApi<'a, T> { bridge_rococo_parachains::storage::StorageApi::new(self.client) } - pub fn fee_market(&self) -> fee_market::storage::StorageApi<'a, T> { - fee_market::storage::StorageApi::new(self.client) + pub fn bridge_pangolin_parachain_messages( + &self, + ) -> bridge_pangolin_parachain_messages::storage::StorageApi<'a, T> { + bridge_pangolin_parachain_messages::storage::StorageApi::new(self.client) + } + pub fn pangoro_fee_market(&self) -> pangoro_fee_market::storage::StorageApi<'a, T> { + pangoro_fee_market::storage::StorageApi::new(self.client) + } + pub fn pangolin_parachain_fee_market( + &self, + ) -> pangolin_parachain_fee_market::storage::StorageApi<'a, T> { + pangolin_parachain_fee_market::storage::StorageApi::new(self.client) } pub fn transaction_pause(&self) -> transaction_pause::storage::StorageApi<'a, T> { transaction_pause::storage::StorageApi::new(self.client) @@ -26829,6 +27989,11 @@ pub mod api { ) -> substrate2_substrate_issuing::storage::StorageApi<'a, T> { substrate2_substrate_issuing::storage::StorageApi::new(self.client) } + pub fn to_pangolin_parachain_backing( + &self, + ) -> to_pangolin_parachain_backing::storage::StorageApi<'a, T> { + to_pangolin_parachain_backing::storage::StorageApi::new(self.client) + } } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { client: &'a ::subxt::Client, @@ -26872,9 +28037,6 @@ pub mod api { pub fn grandpa(&self) -> grandpa::calls::TransactionApi<'a, T, X, A> { grandpa::calls::TransactionApi::new(self.client) } - pub fn beefy_gadget(&self) -> beefy_gadget::calls::TransactionApi<'a, T, X, A> { - beefy_gadget::calls::TransactionApi::new(self.client) - } pub fn im_online(&self) -> im_online::calls::TransactionApi<'a, T, X, A> { im_online::calls::TransactionApi::new(self.client) } @@ -26912,9 +28074,6 @@ pub mod api { pub fn sudo(&self) -> sudo::calls::TransactionApi<'a, T, X, A> { sudo::calls::TransactionApi::new(self.client) } - pub fn claims(&self) -> claims::calls::TransactionApi<'a, T, X, A> { - claims::calls::TransactionApi::new(self.client) - } pub fn vesting(&self) -> vesting::calls::TransactionApi<'a, T, X, A> { vesting::calls::TransactionApi::new(self.client) } @@ -26982,8 +28141,18 @@ pub mod api { ) -> bridge_rococo_parachains::calls::TransactionApi<'a, T, X, A> { bridge_rococo_parachains::calls::TransactionApi::new(self.client) } - pub fn fee_market(&self) -> fee_market::calls::TransactionApi<'a, T, X, A> { - fee_market::calls::TransactionApi::new(self.client) + pub fn bridge_pangolin_parachain_messages( + &self, + ) -> bridge_pangolin_parachain_messages::calls::TransactionApi<'a, T, X, A> { + bridge_pangolin_parachain_messages::calls::TransactionApi::new(self.client) + } + pub fn pangoro_fee_market(&self) -> pangoro_fee_market::calls::TransactionApi<'a, T, X, A> { + pangoro_fee_market::calls::TransactionApi::new(self.client) + } + pub fn pangolin_parachain_fee_market( + &self, + ) -> pangolin_parachain_fee_market::calls::TransactionApi<'a, T, X, A> { + pangolin_parachain_fee_market::calls::TransactionApi::new(self.client) } pub fn transaction_pause(&self) -> transaction_pause::calls::TransactionApi<'a, T, X, A> { transaction_pause::calls::TransactionApi::new(self.client) @@ -26993,5 +28162,10 @@ pub mod api { ) -> substrate2_substrate_issuing::calls::TransactionApi<'a, T, X, A> { substrate2_substrate_issuing::calls::TransactionApi::new(self.client) } + pub fn to_pangolin_parachain_backing( + &self, + ) -> to_pangolin_parachain_backing::calls::TransactionApi<'a, T, X, A> { + to_pangolin_parachain_backing::calls::TransactionApi::new(self.client) + } } } diff --git a/frame/assistants/client-pangolin/src/subxt_runtime/x_shadow.rs b/frame/assistants/client-pangolin/src/subxt_runtime/x_shadow.rs index 45cd4312a..ccdaf5e24 100644 --- a/frame/assistants/client-pangolin/src/subxt_runtime/x_shadow.rs +++ b/frame/assistants/client-pangolin/src/subxt_runtime/x_shadow.rs @@ -62,18 +62,24 @@ impl TryFrom for ethereum_primitives::header::Header { fn try_from(that: EthereumHeaderJson) -> Result { Ok(Self { - parent_hash: subxt::sp_core::H256(array_bytes::hex2array(&that.parent_hash)?), + parent_hash: subxt::sp_core::H256(array_bytes::hex2array(that.parent_hash.as_ref())?), timestamp: that.timestamp, number: that.number, - author: runtime_types::primitive_types::H160(array_bytes::hex2array(that.author)?), // bytes!(that.author.as_str(), 20), + author: runtime_types::primitive_types::H160(array_bytes::hex2array( + that.author.as_ref(), + )?), // bytes!(that.author.as_str(), 20), transactions_root: subxt::sp_core::H256(array_bytes::hex2array( - that.transactions_root, + that.transactions_root.as_ref(), )?), - uncles_hash: subxt::sp_core::H256(array_bytes::hex2array(that.uncles_hash)?), - extra_data: array_bytes::hex2bytes(that.extra_data)?, // no length - state_root: subxt::sp_core::H256(array_bytes::hex2array(that.state_root)?), - receipts_root: subxt::sp_core::H256(array_bytes::hex2array(that.receipts_root)?), - log_bloom: runtime_types::ethbloom::Bloom(array_bytes::hex2array(that.log_bloom)?), // Bloom(bytes!(that.log_bloom.as_str(), 256)), + uncles_hash: subxt::sp_core::H256(array_bytes::hex2array(that.uncles_hash.as_ref())?), + extra_data: array_bytes::hex2bytes(that.extra_data.as_ref())?, // no length + state_root: subxt::sp_core::H256(array_bytes::hex2array(that.state_root.as_ref())?), + receipts_root: subxt::sp_core::H256(array_bytes::hex2array( + that.receipts_root.as_ref(), + )?), + log_bloom: runtime_types::ethbloom::Bloom(array_bytes::hex2array( + that.log_bloom.as_ref(), + )?), // Bloom(bytes!(that.log_bloom.as_str(), 256)), gas_used: runtime_types::primitive_types::U256( subxt::sp_core::U256::from(that.gas_used).0, ), @@ -86,7 +92,7 @@ impl TryFrom for ethereum_primitives::header::Header { seal: { let mut rets = Vec::with_capacity(that.seal.len()); for item in that.seal { - let bytes = array_bytes::hex2bytes(item)?; + let bytes = array_bytes::hex2bytes(item.as_ref())?; rets.push(bytes); } rets @@ -94,7 +100,9 @@ impl TryFrom for ethereum_primitives::header::Header { base_fee_per_gas: that .base_fee_per_gas .map(|v| runtime_types::primitive_types::U256(subxt::sp_core::U256::from(v).0)), - hash: Some(subxt::sp_core::H256(array_bytes::hex2array(that.hash)?)), //Some(bytes!(that.hash.as_str(), 32)), + hash: Some(subxt::sp_core::H256(array_bytes::hex2array( + that.hash.as_ref(), + )?)), //Some(bytes!(that.hash.as_str(), 32)), }) } } @@ -117,7 +125,7 @@ impl TryFrom for ethereum_primitives::receipt::ReceiptProof { Ok(Self { index: u64::from_str_radix(index, 16).unwrap_or(0), - proof: array_bytes::hex2bytes(that.proof)?, + proof: array_bytes::hex2bytes(that.proof.as_ref())?, header_hash: subxt::sp_core::H256(hash), }) } diff --git a/frame/assistants/client-pangolin/src/types/account.rs b/frame/assistants/client-pangolin/src/types/account.rs index 8c082f9cd..8965a7283 100644 --- a/frame/assistants/client-pangolin/src/types/account.rs +++ b/frame/assistants/client-pangolin/src/types/account.rs @@ -56,7 +56,8 @@ mod darwinia { let account_id = AccountId::from(public); // real account, convert to account id - let real = real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real))); + let real = + real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real.as_ref()))); Ok(Self { account_id, @@ -97,7 +98,7 @@ mod darwinia { mod ethlike_v1 { use std::fmt::{Debug, Formatter}; - use crate::subxt_runtime::api::runtime_types::darwinia_claims::EcdsaSignature; + use crate::types::EcdsaSignature; use secp256k1::SecretKey; use web3::signing::SecretKeyRef; diff --git a/frame/assistants/client-pangolin/src/types/patch.rs b/frame/assistants/client-pangolin/src/types/patch.rs index 7893cb575..0f704cb88 100644 --- a/frame/assistants/client-pangolin/src/types/patch.rs +++ b/frame/assistants/client-pangolin/src/types/patch.rs @@ -1,11 +1,13 @@ use std::collections::HashMap; #[cfg(feature = "ethlike-v1")] -use codec::Encode; -use crate::subxt_runtime::api::runtime_types::{darwinia_bridge_ethereum, darwinia_relay_primitives}; +use codec::{Decode, Encode}; use subxt::DefaultExtra; use crate::config::PangolinSubxtConfig; +use crate::subxt_runtime::api::runtime_types::{ + darwinia_bridge_ethereum, darwinia_relay_primitives, +}; use crate::types::Balance; /// Real relay affirmation types @@ -42,3 +44,8 @@ where /// mmr_root or next authorities pub _4: _4, } + +/// EcdsaSignature +#[cfg(feature = "ethlike-v1")] +#[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] +pub struct EcdsaSignature(pub [u8; 65]); diff --git a/frame/assistants/client-pangolin/tests/test_component.rs b/frame/assistants/client-pangolin/tests/test_component.rs index b0542975d..9a57ee3e1 100644 --- a/frame/assistants/client-pangolin/tests/test_component.rs +++ b/frame/assistants/client-pangolin/tests/test_component.rs @@ -89,8 +89,6 @@ async fn test_query_ethereum_relay_confirmed_block_numbers() { // println!("{}", current_term); // } - - #[tokio::test] async fn authorities_to_sign() { let client = common::client().await.unwrap(); @@ -119,15 +117,23 @@ async fn authorities() { #[tokio::test] async fn test_subscribe() { - use futures_util::stream::StreamExt; - use client_pangolin::types::runtime_types::{bp_header_chain::justification::GrandpaJustification, sp_runtime::generic::header::Header}; + use client_pangolin::types::runtime_types::{ + bp_header_chain::justification::GrandpaJustification, sp_runtime::generic::header::Header, + }; use codec::Decode; + use futures_util::stream::StreamExt; use subxt::sp_runtime::traits::BlakeTwo256; let client = common::client().await.unwrap(); - let mut it = client.subscribe_grandpa_justifications().await.unwrap().take(1); + let mut it = client + .subscribe_grandpa_justifications() + .await + .unwrap() + .take(1); if let Some(item) = it.next().await { - let i = GrandpaJustification::>::decode(&mut item.unwrap().as_ref()).unwrap(); + let i = + GrandpaJustification::>::decode(&mut item.unwrap().as_ref()) + .unwrap(); println!("{:?}", i); } } diff --git a/frame/assistants/client-pangoro/Cargo.toml b/frame/assistants/client-pangoro/Cargo.toml index 2dad1dfd2..b21b67e7b 100644 --- a/frame/assistants/client-pangoro/Cargo.toml +++ b/frame/assistants/client-pangoro/Cargo.toml @@ -24,25 +24,25 @@ thiserror = "1" serde = { version = "1", features = ["derive"] } serde_json = "1" -array-bytes = "1.4" +array-bytes = "2" codec = { package = "parity-scale-codec", version = "2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } -bp-pangoro = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } +subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } +bp-pangoro = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } ## maybe common async-trait = { optional = true, version = "0.1" } ## substrate -sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } +sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } ## s2s client finality-grandpa = { optional = true, version = "0.14" } -abstract-bridge-s2s = { optional = true, path = "../../../frame/abstract/bridge-s2s", features = ["advanced-types"] } +bridge-s2s-traits = { optional = true, path = "../../../frame/traits/bridge-s2s", features = ["advanced-types"] } ## feemarket s2s -abstract-feemarket-s2s = { optional = true, path = "../../../frame/abstract/feemarket-s2s", features = ["advanced-types"] } +feemarket-s2s-traits = { optional = true, path = "../../../frame/traits/feemarket-s2s", features = ["advanced-types"] } support-toolkit = { path = "../../../frame/supports/support-toolkit", features = ["convert"] } @@ -57,14 +57,15 @@ bridge-s2s = [ "substrate", "async-trait", "finality-grandpa", - "abstract-bridge-s2s", + "bridge-s2s-traits", ] bridge-s2s-pangolin = ["bridge-s2s"] feemarket-s2s = [ "async-trait", - "abstract-feemarket-s2s", + "feemarket-s2s-traits", ] feemarket-s2s-pangolin = ["feemarket-s2s"] +bridge-chapel = [] [dev-dependencies] tokio = { version = "1", features = ["full"] } diff --git a/frame/assistants/client-pangoro/src/error.rs b/frame/assistants/client-pangoro/src/error.rs index b4ecdfd53..885e4efb6 100644 --- a/frame/assistants/client-pangoro/src/error.rs +++ b/frame/assistants/client-pangoro/src/error.rs @@ -66,7 +66,7 @@ impl From for ClientError { } #[cfg(feature = "bridge-s2s")] -impl From for abstract_bridge_s2s::error::S2SClientError { +impl From for bridge_s2s_traits::error::S2SClientError { fn from(error: ClientError) -> Self { match error { ClientError::SubxtBasicError(e) => Self::RPC(format!("{:?}", e)), diff --git a/frame/assistants/client-pangoro/src/fastapi/generic.rs b/frame/assistants/client-pangoro/src/fastapi/bridge_chapel/mod.rs similarity index 100% rename from frame/assistants/client-pangoro/src/fastapi/generic.rs rename to frame/assistants/client-pangoro/src/fastapi/bridge_chapel/mod.rs diff --git a/frame/assistants/client-pangoro/src/fastapi/bridge_s2s/bridge_pangolin.rs b/frame/assistants/client-pangoro/src/fastapi/bridge_s2s/bridge_pangolin.rs index 58a622e82..8453be10b 100644 --- a/frame/assistants/client-pangoro/src/fastapi/bridge_s2s/bridge_pangolin.rs +++ b/frame/assistants/client-pangoro/src/fastapi/bridge_s2s/bridge_pangolin.rs @@ -1,12 +1,11 @@ use std::ops::RangeInclusive; -use abstract_bridge_s2s::error::S2SClientResult; -use abstract_bridge_s2s::{ +use bridge_s2s_traits::client::S2SClientGeneric; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::{ client::S2SClientRelay, - config::Config, - types::{bp_header_chain, bp_messages, bridge_runtime_common}, + types::{bp_header_chain, bp_messages, bp_runtime::Chain, bridge_runtime_common}, }; -use sp_runtime::generic::{Block, SignedBlock}; use sp_runtime::AccountId32; use subxt::sp_core::storage::StorageKey; use subxt::storage::StorageKeyPrefix; @@ -82,29 +81,10 @@ impl S2SClientRelay for PangoroClient { Ok(total_weight) } - async fn header( - &self, - hash: Option<::Hash>, - ) -> S2SClientResult::Header>> { - match self.subxt().rpc().header(hash).await? { - Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), - None => Ok(None), - } - } - - async fn block( - &self, - hash: Option<::Hash>, - ) -> S2SClientResult< - Option::Header, Self::Extrinsic>>>, - > { - Ok(self.subxt().rpc().block(hash).await?) - } - async fn best_target_finalized( &self, - at_block: Option<::Hash>, - ) -> S2SClientResult<::Hash> { + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { Ok(self .runtime() .storage() @@ -113,13 +93,27 @@ impl S2SClientRelay for PangoroClient { .await?) } + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash> { + let hash = self + .runtime() + .tx() + .bridge_pangolin_grandpa() + .initialize(initialization_data) + .sign_and_submit(self.account().signer()) + .await?; + Ok(hash) + } + async fn submit_finality_proof( &self, - finality_target: ::Header, + finality_target: ::Header, justification: bp_header_chain::justification::GrandpaJustification< - ::Header, + ::Header, >, - ) -> S2SClientResult<::Hash> { + ) -> S2SClientResult<::Hash> { let expected_target = SmartCodecMapper::map_to(&finality_target)?; let expected_justification = SmartCodecMapper::map_to(&justification)?; Ok(self @@ -134,7 +128,7 @@ impl S2SClientRelay for PangoroClient { async fn outbound_lanes( &self, lane: [u8; 4], - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult { let outbound_lane_data = self .runtime() @@ -149,7 +143,7 @@ impl S2SClientRelay for PangoroClient { async fn inbound_lanes( &self, lane: [u8; 4], - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult> { let inbound_lane_data = self .runtime() @@ -164,7 +158,7 @@ impl S2SClientRelay for PangoroClient { async fn outbound_messages( &self, message_key: bp_messages::MessageKey, - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult>> { let expected_message_key = SmartCodecMapper::map_to(&message_key)?; match self @@ -179,25 +173,15 @@ impl S2SClientRelay for PangoroClient { } } - async fn read_proof( - &self, - storage_keys: Vec, - hash: Option<::Hash>, - ) -> S2SClientResult>> { - let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; - let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); - Ok(proof) - } - async fn receive_messages_proof( &self, relayer_id_at_bridged_chain: AccountId32, proof: bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< - ::Hash, + ::Hash, >, messages_count: u32, dispatch_weight: u64, - ) -> S2SClientResult<::Hash> { + ) -> S2SClientResult<::Hash> { let expected_proof = SmartCodecMapper::map_to(&proof)?; Ok(self .runtime() @@ -216,10 +200,10 @@ impl S2SClientRelay for PangoroClient { async fn receive_messages_delivery_proof( &self, proof: bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< - ::Hash, + ::Hash, >, relayers_state: bp_messages::UnrewardedRelayersState, - ) -> S2SClientResult<::Hash> { + ) -> S2SClientResult<::Hash> { let expected_proof = SmartCodecMapper::map_to(&proof)?; let expected_relayers_state = SmartCodecMapper::map_to(&relayers_state)?; Ok(self diff --git a/frame/assistants/client-pangoro/src/fastapi/bridge_s2s/generic.rs b/frame/assistants/client-pangoro/src/fastapi/bridge_s2s/generic.rs index efd1bf52f..873269520 100644 --- a/frame/assistants/client-pangoro/src/fastapi/bridge_s2s/generic.rs +++ b/frame/assistants/client-pangoro/src/fastapi/bridge_s2s/generic.rs @@ -1,14 +1,16 @@ -use abstract_bridge_s2s::config::Config; -use abstract_bridge_s2s::error::{S2SClientError, S2SClientResult}; -use abstract_bridge_s2s::{ +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::{ client::{S2SClientBase, S2SClientGeneric}, types::bp_header_chain, + types::bp_runtime::Chain, }; use finality_grandpa::voter_set::VoterSet; use sp_finality_grandpa::{AuthorityList, ConsensusLog, ScheduledChange}; +use sp_runtime::generic::{Block, SignedBlock}; use sp_runtime::{ConsensusEngineId, DigestItem}; use subxt::rpc::{ClientT, Subscription, SubscriptionClientT}; use subxt::{sp_core, sp_runtime}; +use support_toolkit::convert::SmartCodecMapper; use crate::client::PangoroClient; use crate::error::{ClientError, ClientResult}; @@ -35,7 +37,7 @@ impl PangoroClient { .client .request("state_call", params) .await?; - let raw_authorities_set = array_bytes::hex2bytes(hex)?; + let raw_authorities_set = array_bytes::hex2bytes(hex.as_ref())?; let authorities = codec::Decode::decode(&mut &raw_authorities_set[..]).map_err(|err| { ClientError::Custom(format!( "[DecodeAuthorities] Can not decode authorities: {:?}", @@ -81,7 +83,7 @@ impl PangoroClient { impl S2SClientBase for PangoroClient { const CHAIN: &'static str = "pangoro"; - type Config = bp_pangoro::Pangoro; + type Chain = bp_pangoro::Pangoro; type Extrinsic = sp_runtime::OpaqueExtrinsic; } @@ -104,6 +106,34 @@ impl S2SClientGeneric for PangoroClient { .await?) } + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>> { + match self.subxt().rpc().header(hash).await? { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn block( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>> + { + Ok(self.subxt().rpc().block(hash).await?) + } + + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; + let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); + Ok(proof) + } + async fn prepare_initialization_data(&self) -> S2SClientResult { let mut subscription = self.subscribe_grandpa_justifications().await?; let justification = subscription @@ -220,18 +250,4 @@ impl S2SClientGeneric for PangoroClient { S2SClientError::Custom(format!("Failed to decode initialization data: {:?}", e)) })?) } - - async fn initialize( - &self, - initialization_data: Self::InitializationData, - ) -> S2SClientResult<::Hash> { - let hash = self - .runtime() - .tx() - .bridge_pangolin_grandpa() - .initialize(initialization_data) - .sign_and_submit(self.account().signer()) - .await?; - Ok(hash) - } } diff --git a/frame/assistants/client-pangoro/src/fastapi/feemarket_s2s/feemarket_pangolin.rs b/frame/assistants/client-pangoro/src/fastapi/feemarket_s2s/feemarket_pangolin.rs index 1e108461f..6b5e6cee5 100644 --- a/frame/assistants/client-pangoro/src/fastapi/feemarket_s2s/feemarket_pangolin.rs +++ b/frame/assistants/client-pangoro/src/fastapi/feemarket_s2s/feemarket_pangolin.rs @@ -1,6 +1,6 @@ -use abstract_feemarket_s2s::api::FeemarketApiRelay; -use abstract_feemarket_s2s::error::AbstractFeemarketResult; -use abstract_feemarket_s2s::types::{Chain, Order}; +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::error::AbstractFeemarketResult; +use feemarket_s2s_traits::types::{Chain, Order}; use support_toolkit::convert::SmartCodecMapper; use crate::client::PangoroClient; @@ -9,8 +9,8 @@ use crate::client::PangoroClient; impl FeemarketApiRelay for PangoroClient { async fn order( &self, - laned_id: abstract_feemarket_s2s::types::LaneId, - message_nonce: abstract_feemarket_s2s::types::MessageNonce, + laned_id: feemarket_s2s_traits::types::LaneId, + message_nonce: feemarket_s2s_traits::types::MessageNonce, ) -> AbstractFeemarketResult< Option< Order< @@ -23,7 +23,7 @@ impl FeemarketApiRelay for PangoroClient { match self .runtime() .storage() - .fee_market() + .pangolin_fee_market() .orders(laned_id, message_nonce, None) .await? { diff --git a/frame/assistants/client-pangoro/src/fastapi/feemarket_s2s/generic.rs b/frame/assistants/client-pangoro/src/fastapi/feemarket_s2s/generic.rs index c6287b47a..e2669683d 100644 --- a/frame/assistants/client-pangoro/src/fastapi/feemarket_s2s/generic.rs +++ b/frame/assistants/client-pangoro/src/fastapi/feemarket_s2s/generic.rs @@ -1,6 +1,6 @@ -use abstract_feemarket_s2s::api::FeemarketApiBase; -use abstract_feemarket_s2s::error::{AbstractFeemarketError, AbstractFeemarketResult}; -use abstract_feemarket_s2s::types::Chain; +use feemarket_s2s_traits::api::FeemarketApiBase; +use feemarket_s2s_traits::error::{AbstractFeemarketError, AbstractFeemarketResult}; +use feemarket_s2s_traits::types::Chain; use crate::client::PangoroClient; diff --git a/frame/assistants/client-pangoro/src/fastapi/mod.rs b/frame/assistants/client-pangoro/src/fastapi/mod.rs index 7d2456ded..d3afb3f1d 100644 --- a/frame/assistants/client-pangoro/src/fastapi/mod.rs +++ b/frame/assistants/client-pangoro/src/fastapi/mod.rs @@ -1,5 +1,6 @@ +#[cfg(feature = "bridge-chapel")] +mod bridge_chapel; #[cfg(feature = "bridge-s2s")] -pub mod bridge_s2s; +mod bridge_s2s; #[cfg(feature = "feemarket-s2s")] -pub mod feemarket_s2s; -pub mod generic; +mod feemarket_s2s; diff --git a/frame/assistants/client-pangoro/src/lib.rs b/frame/assistants/client-pangoro/src/lib.rs index b1a51addf..487233c37 100644 --- a/frame/assistants/client-pangoro/src/lib.rs +++ b/frame/assistants/client-pangoro/src/lib.rs @@ -2,6 +2,7 @@ pub mod client; pub mod component; pub mod config; pub mod error; -pub mod fastapi; -pub mod subxt_runtime; pub mod types; + +mod fastapi; +mod subxt_runtime; diff --git a/frame/assistants/client-pangoro/src/subxt_runtime/runtime.rs b/frame/assistants/client-pangoro/src/subxt_runtime/runtime.rs index 697562c48..a8cc1f2af 100644 --- a/frame/assistants/client-pangoro/src/subxt_runtime/runtime.rs +++ b/frame/assistants/client-pangoro/src/subxt_runtime/runtime.rs @@ -31,7 +31,7 @@ pub mod api { #[codec(index = 17)] BridgePangolinMessages(bridge_pangolin_messages::Event), #[codec(index = 22)] - FeeMarket(fee_market::Event), + PangolinFeeMarket(pangolin_fee_market::Event), #[codec(index = 23)] TransactionPause(transaction_pause::Event), #[codec(index = 20)] @@ -40,6 +40,8 @@ pub mod api { EVM(evm::Event), #[codec(index = 26)] Ethereum(ethereum::Event), + #[codec(index = 31)] + BaseFee(base_fee::Event), } pub mod system { use super::runtime_types; @@ -310,7 +312,7 @@ pub mod api { const STORAGE: &'static str = "Account"; type Value = runtime_types::frame_system::AccountInfo< ::core::primitive::u32, - runtime_types::common_runtime::impls::AccountData<::core::primitive::u128>, + runtime_types::drml_common_runtime::impls::AccountData<::core::primitive::u128>, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( @@ -484,7 +486,9 @@ pub mod api { ) -> ::core::result::Result< runtime_types::frame_system::AccountInfo< ::core::primitive::u32, - runtime_types::common_runtime::impls::AccountData<::core::primitive::u128>, + runtime_types::drml_common_runtime::impls::AccountData< + ::core::primitive::u128, + >, >, ::subxt::BasicError, > { @@ -734,28 +738,26 @@ pub mod api { Ok(::subxt::codec::Decode::decode( &mut &[ 28u8, 80u8, 97u8, 110u8, 103u8, 111u8, 114u8, 111u8, 28u8, 80u8, 97u8, - 110u8, 103u8, 111u8, 114u8, 111u8, 0u8, 0u8, 0u8, 0u8, 126u8, 109u8, - 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 76u8, 223u8, 106u8, 203u8, 104u8, 153u8, + 110u8, 103u8, 111u8, 114u8, 111u8, 0u8, 0u8, 0u8, 0u8, 226u8, 109u8, + 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 68u8, 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, 96u8, 155u8, 3u8, 0u8, 0u8, 0u8, 55u8, 227u8, 151u8, 252u8, 124u8, 145u8, 245u8, 228u8, 1u8, 0u8, 0u8, 0u8, 64u8, 254u8, 58u8, 212u8, 1u8, - 248u8, 149u8, 154u8, 5u8, 0u8, 0u8, 0u8, 188u8, 157u8, 137u8, 144u8, - 79u8, 91u8, 146u8, 63u8, 1u8, 0u8, 0u8, 0u8, 210u8, 188u8, 152u8, - 151u8, 238u8, 208u8, 143u8, 21u8, 3u8, 0u8, 0u8, 0u8, 247u8, 139u8, - 39u8, 139u8, 229u8, 63u8, 69u8, 76u8, 2u8, 0u8, 0u8, 0u8, 203u8, 202u8, - 37u8, 227u8, 159u8, 20u8, 35u8, 135u8, 2u8, 0u8, 0u8, 0u8, 237u8, - 153u8, 197u8, 172u8, 178u8, 94u8, 237u8, 245u8, 3u8, 0u8, 0u8, 0u8, - 104u8, 122u8, 212u8, 74u8, 211u8, 127u8, 3u8, 194u8, 1u8, 0u8, 0u8, - 0u8, 171u8, 60u8, 5u8, 114u8, 41u8, 31u8, 235u8, 139u8, 1u8, 0u8, 0u8, + 248u8, 149u8, 154u8, 5u8, 0u8, 0u8, 0u8, 171u8, 60u8, 5u8, 114u8, 41u8, + 31u8, 235u8, 139u8, 1u8, 0u8, 0u8, 0u8, 203u8, 202u8, 37u8, 227u8, + 159u8, 20u8, 35u8, 135u8, 2u8, 0u8, 0u8, 0u8, 237u8, 153u8, 197u8, + 172u8, 178u8, 94u8, 237u8, 245u8, 3u8, 0u8, 0u8, 0u8, 104u8, 122u8, + 212u8, 74u8, 211u8, 127u8, 3u8, 194u8, 1u8, 0u8, 0u8, 0u8, 188u8, + 157u8, 137u8, 144u8, 79u8, 91u8, 146u8, 63u8, 1u8, 0u8, 0u8, 0u8, + 210u8, 188u8, 152u8, 151u8, 238u8, 208u8, 143u8, 21u8, 3u8, 0u8, 0u8, + 0u8, 247u8, 139u8, 39u8, 139u8, 229u8, 63u8, 69u8, 76u8, 2u8, 0u8, 0u8, 0u8, 55u8, 200u8, 187u8, 19u8, 80u8, 169u8, 162u8, 168u8, 1u8, 0u8, - 0u8, 0u8, 25u8, 154u8, 244u8, 135u8, 216u8, 77u8, 152u8, 71u8, 1u8, - 0u8, 0u8, 0u8, 24u8, 239u8, 88u8, 163u8, 182u8, 123u8, 167u8, 112u8, - 1u8, 0u8, 0u8, 0u8, 45u8, 6u8, 198u8, 53u8, 50u8, 185u8, 56u8, 227u8, - 1u8, 0u8, 0u8, 0u8, 60u8, 134u8, 72u8, 242u8, 252u8, 32u8, 139u8, 31u8, - 1u8, 0u8, 0u8, 0u8, 37u8, 128u8, 193u8, 193u8, 177u8, 221u8, 230u8, - 148u8, 1u8, 0u8, 0u8, 0u8, 30u8, 228u8, 178u8, 234u8, 109u8, 212u8, - 202u8, 64u8, 1u8, 0u8, 0u8, 0u8, 88u8, 34u8, 17u8, 246u8, 91u8, 177u8, - 75u8, 137u8, 1u8, 0u8, 0u8, 0u8, 189u8, 120u8, 37u8, 93u8, 79u8, 238u8, - 234u8, 31u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 0u8, 88u8, 34u8, 17u8, 246u8, 91u8, 177u8, 75u8, 137u8, 4u8, 0u8, + 0u8, 0u8, 230u8, 91u8, 0u8, 228u8, 108u8, 237u8, 208u8, 170u8, 2u8, + 0u8, 0u8, 0u8, 189u8, 120u8, 37u8, 93u8, 79u8, 238u8, 234u8, 31u8, 4u8, + 0u8, 0u8, 0u8, 60u8, 134u8, 72u8, 242u8, 252u8, 32u8, 139u8, 31u8, 1u8, + 0u8, 0u8, 0u8, 37u8, 128u8, 193u8, 193u8, 177u8, 221u8, 230u8, 148u8, + 1u8, 0u8, 0u8, 0u8, 30u8, 228u8, 178u8, 234u8, 109u8, 212u8, 202u8, + 64u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, ][..], )?) } @@ -1576,15 +1578,6 @@ pub mod api { const EVENT: &'static str = "BalanceSet"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Deposit( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); - impl ::subxt::Event for Deposit { - const PALLET: &'static str = "Balances"; - const EVENT: &'static str = "Deposit"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct Reserved( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -1613,6 +1606,33 @@ pub mod api { const PALLET: &'static str = "Balances"; const EVENT: &'static str = "ReserveRepatriated"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Deposit( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Deposit { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Deposit"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Withdraw( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Withdraw { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Withdraw"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Slashed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Slashed { + const PALLET: &'static str = "Balances"; + const EVENT: &'static str = "Slashed"; + } } pub mod storage { use super::runtime_types; @@ -1630,7 +1650,7 @@ pub mod api { const PALLET: &'static str = "Balances"; const STORAGE: &'static str = "Account"; type Value = - runtime_types::common_runtime::impls::AccountData<::core::primitive::u128>; + runtime_types::drml_common_runtime::impls::AccountData<::core::primitive::u128>; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( &self.0, @@ -1644,9 +1664,8 @@ pub mod api { const STORAGE: &'static str = "Locks"; type Value = runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< + runtime_types::darwinia_balances::pallet::BalanceLock< ::core::primitive::u128, - ::core::primitive::u32, >, >; fn key(&self) -> ::subxt::StorageEntryKey { @@ -1702,7 +1721,7 @@ pub mod api { _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::common_runtime::impls::AccountData<::core::primitive::u128>, + runtime_types::drml_common_runtime::impls::AccountData<::core::primitive::u128>, ::subxt::BasicError, > { let entry = Account(_0); @@ -1721,9 +1740,8 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< + runtime_types::darwinia_balances::pallet::BalanceLock< ::core::primitive::u128, - ::core::primitive::u32, >, >, ::subxt::BasicError, @@ -2025,15 +2043,6 @@ pub mod api { const EVENT: &'static str = "BalanceSet"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Deposit( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); - impl ::subxt::Event for Deposit { - const PALLET: &'static str = "Kton"; - const EVENT: &'static str = "Deposit"; - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct Reserved( pub ::subxt::sp_core::crypto::AccountId32, pub ::core::primitive::u128, @@ -2062,6 +2071,33 @@ pub mod api { const PALLET: &'static str = "Kton"; const EVENT: &'static str = "ReserveRepatriated"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Deposit( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Deposit { + const PALLET: &'static str = "Kton"; + const EVENT: &'static str = "Deposit"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Withdraw( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Withdraw { + const PALLET: &'static str = "Kton"; + const EVENT: &'static str = "Withdraw"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct Slashed( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::core::primitive::u128, + ); + impl ::subxt::Event for Slashed { + const PALLET: &'static str = "Kton"; + const EVENT: &'static str = "Slashed"; + } } pub mod storage { use super::runtime_types; @@ -2079,7 +2115,7 @@ pub mod api { const PALLET: &'static str = "Kton"; const STORAGE: &'static str = "Account"; type Value = - runtime_types::common_runtime::impls::AccountData<::core::primitive::u128>; + runtime_types::drml_common_runtime::impls::AccountData<::core::primitive::u128>; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( &self.0, @@ -2093,9 +2129,8 @@ pub mod api { const STORAGE: &'static str = "Locks"; type Value = runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< + runtime_types::darwinia_balances::pallet::BalanceLock< ::core::primitive::u128, - ::core::primitive::u32, >, >; fn key(&self) -> ::subxt::StorageEntryKey { @@ -2151,7 +2186,7 @@ pub mod api { _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::common_runtime::impls::AccountData<::core::primitive::u128>, + runtime_types::drml_common_runtime::impls::AccountData<::core::primitive::u128>, ::subxt::BasicError, > { let entry = Account(_0); @@ -2170,9 +2205,8 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< runtime_types::frame_support::storage::weak_bounded_vec::WeakBoundedVec< - runtime_types::darwinia_support::structs::BalanceLock< + runtime_types::darwinia_balances::pallet::BalanceLock< ::core::primitive::u128, - ::core::primitive::u32, >, >, ::subxt::BasicError, @@ -3083,6 +3117,20 @@ pub mod api { const PALLET: &'static str = "Staking"; const FUNCTION: &'static str = "unbond"; } + #[derive( + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, + )] + pub struct withdraw_unbonded { + pub num_slashing_spans: ::core::primitive::u32, + } + impl ::subxt::Call for withdraw_unbonded { + const PALLET: &'static str = "Staking"; + const FUNCTION: &'static str = "withdraw_unbonded"; + } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct claim_mature_deposits; impl ::subxt::Call for claim_mature_deposits { @@ -3365,6 +3413,14 @@ pub mod api { let call = unbond { value }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn withdraw_unbonded( + &self, + num_slashing_spans: ::core::primitive::u32, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, withdraw_unbonded, DispatchError> + { + let call = withdraw_unbonded { num_slashing_spans }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } pub fn claim_mature_deposits( &self, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, claim_mature_deposits, DispatchError> @@ -4163,6 +4219,15 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } + pub struct OffendingValidators; + impl ::subxt::StorageEntry for OffendingValidators { + const PALLET: &'static str = "Staking"; + const STORAGE: &'static str = "OffendingValidators"; + type Value = ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } pub struct StorageVersion; impl ::subxt::StorageEntry for StorageVersion { const PALLET: &'static str = "Staking"; @@ -4761,6 +4826,16 @@ pub mod api { let entry = CurrentPlannedSession; self.client.storage().fetch_or_default(&entry, hash).await } + pub async fn offending_validators( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::std::vec::Vec<(::core::primitive::u32, ::core::primitive::bool)>, + ::subxt::BasicError, + > { + let entry = OffendingValidators; + self.client.storage().fetch_or_default(&entry, hash).await + } pub async fn storage_version( &self, hash: ::core::option::Option, @@ -5575,6 +5650,75 @@ pub mod api { } } } + pub mod beefy { + use super::runtime_types; + pub mod storage { + use super::runtime_types; + pub struct Authorities; + impl ::subxt::StorageEntry for Authorities { + const PALLET: &'static str = "Beefy"; + const STORAGE: &'static str = "Authorities"; + type Value = ::std::vec::Vec; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct ValidatorSetId; + impl ::subxt::StorageEntry for ValidatorSetId { + const PALLET: &'static str = "Beefy"; + const STORAGE: &'static str = "ValidatorSetId"; + type Value = ::core::primitive::u64; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct NextAuthorities; + impl ::subxt::StorageEntry for NextAuthorities { + const PALLET: &'static str = "Beefy"; + const STORAGE: &'static str = "NextAuthorities"; + type Value = ::std::vec::Vec; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct StorageApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> StorageApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } + pub async fn authorities( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::std::vec::Vec, + ::subxt::BasicError, + > { + let entry = Authorities; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn validator_set_id( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> + { + let entry = ValidatorSetId; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn next_authorities( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::std::vec::Vec, + ::subxt::BasicError, + > { + let entry = NextAuthorities; + self.client.storage().fetch_or_default(&entry, hash).await + } + } + } + } pub mod im_online { use super::runtime_types; pub mod calls { @@ -6671,13 +6815,14 @@ pub mod api { const EVENT: &'static str = "MessageCallDecodeFailed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageCallRejected( + pub struct MessageCallValidateFailed( pub [::core::primitive::u8; 4usize], pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub runtime_types::sp_runtime::transaction_validity::TransactionValidityError, ); - impl ::subxt::Event for MessageCallRejected { + impl ::subxt::Event for MessageCallValidateFailed { const PALLET: &'static str = "BridgePangolinDispatch"; - const EVENT: &'static str = "MessageCallRejected"; + const EVENT: &'static str = "MessageCallValidateFailed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct MessageDispatchPaymentFailed( @@ -7075,7 +7220,7 @@ pub mod api { const FUNCTION: &'static str = "set_operating_mode"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct update_pallet_parameter { pub parameter : runtime_types :: pangoro_runtime :: pangolin_messages :: PangoroToPangolinMessagesParameter , } + pub struct update_pallet_parameter { pub parameter : runtime_types :: pangoro_runtime :: bridges_message :: pangolin :: PangoroToPangolinMessagesParameter , } impl ::subxt::Call for update_pallet_parameter { const PALLET: &'static str = "BridgePangolinMessages"; const FUNCTION: &'static str = "update_pallet_parameter"; @@ -7151,7 +7296,7 @@ pub mod api { } pub fn update_pallet_parameter( &self, - parameter : runtime_types :: pangoro_runtime :: pangolin_messages :: PangoroToPangolinMessagesParameter, + parameter : runtime_types :: pangoro_runtime :: bridges_message :: pangolin :: PangoroToPangolinMessagesParameter, ) -> ::subxt::SubmittableExtrinsic< 'a, T, @@ -7236,7 +7381,7 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ParameterUpdated (pub runtime_types :: pangoro_runtime :: pangolin_messages :: PangoroToPangolinMessagesParameter ,) ; + pub struct ParameterUpdated (pub runtime_types :: pangoro_runtime :: bridges_message :: pangolin :: PangoroToPangolinMessagesParameter ,) ; impl ::subxt::Event for ParameterUpdated { const PALLET: &'static str = "BridgePangolinMessages"; const EVENT: &'static str = "ParameterUpdated"; @@ -7426,7 +7571,7 @@ pub mod api { } } } - pub mod fee_market { + pub mod pangolin_fee_market { use super::runtime_types; pub mod calls { use super::runtime_types; @@ -7437,7 +7582,7 @@ pub mod api { pub relay_fee: ::core::option::Option<::core::primitive::u128>, } impl ::subxt::Call for enroll_and_lock_collateral { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "enroll_and_lock_collateral"; } #[derive( @@ -7451,7 +7596,7 @@ pub mod api { pub new_collateral: ::core::primitive::u128, } impl ::subxt::Call for update_locked_collateral { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "update_locked_collateral"; } #[derive( @@ -7465,13 +7610,13 @@ pub mod api { pub new_fee: ::core::primitive::u128, } impl ::subxt::Call for update_relay_fee { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "update_relay_fee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct cancel_enrollment; impl ::subxt::Call for cancel_enrollment { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "cancel_enrollment"; } #[derive( @@ -7485,7 +7630,7 @@ pub mod api { pub slash_protect: ::core::primitive::u128, } impl ::subxt::Call for set_slash_protect { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "set_slash_protect"; } #[derive( @@ -7499,7 +7644,7 @@ pub mod api { pub number: ::core::primitive::u32, } impl ::subxt::Call for set_assigned_relayers_number { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const FUNCTION: &'static str = "set_assigned_relayers_number"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { @@ -7589,7 +7734,7 @@ pub mod api { } } } - pub type Event = runtime_types::darwinia_fee_market::pallet::Event; + pub type Event = runtime_types::pallet_fee_market::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -7599,7 +7744,7 @@ pub mod api { pub ::core::primitive::u128, ); impl ::subxt::Event for Enroll { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "Enroll"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -7608,7 +7753,7 @@ pub mod api { pub ::core::primitive::u128, ); impl ::subxt::Event for UpdateLockedCollateral { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "UpdateLockedCollateral"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -7617,13 +7762,13 @@ pub mod api { pub ::core::primitive::u128, ); impl ::subxt::Event for UpdateRelayFee { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "UpdateRelayFee"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct CancelEnrollment(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::Event for CancelEnrollment { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "CancelEnrollment"; } #[derive( @@ -7635,7 +7780,7 @@ pub mod api { )] pub struct UpdateCollateralSlashProtect(pub ::core::primitive::u128); impl ::subxt::Event for UpdateCollateralSlashProtect { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "UpdateCollateralSlashProtect"; } #[derive( @@ -7647,29 +7792,54 @@ pub mod api { )] pub struct UpdateAssignedRelayersNumber(pub ::core::primitive::u32); impl ::subxt::Event for UpdateAssignedRelayersNumber { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "UpdateAssignedRelayersNumber"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct FeeMarketSlash( - pub runtime_types::dp_fee::SlashReport< + pub runtime_types::pallet_fee_market::types::SlashReport< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, ::core::primitive::u128, >, ); impl ::subxt::Event for FeeMarketSlash { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const EVENT: &'static str = "FeeMarketSlash"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct OrderCreated( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub ::core::primitive::u128, + pub ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + pub ::core::option::Option<::core::primitive::u32>, + ); + impl ::subxt::Event for OrderCreated { + const PALLET: &'static str = "PangolinFeeMarket"; + const EVENT: &'static str = "OrderCreated"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct OrderReward( + pub [::core::primitive::u8; 4usize], + pub ::core::primitive::u64, + pub runtime_types::pallet_fee_market::s2s::payment::RewardItem< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ); + impl ::subxt::Event for OrderReward { + const PALLET: &'static str = "PangolinFeeMarket"; + const EVENT: &'static str = "OrderReward"; + } } pub mod storage { use super::runtime_types; pub struct RelayersMap(pub ::subxt::sp_core::crypto::AccountId32); impl ::subxt::StorageEntry for RelayersMap { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "RelayersMap"; - type Value = runtime_types::dp_fee::Relayer< + type Value = runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >; @@ -7682,7 +7852,7 @@ pub mod api { } pub struct Relayers; impl ::subxt::StorageEntry for Relayers { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "Relayers"; type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; fn key(&self) -> ::subxt::StorageEntryKey { @@ -7691,10 +7861,10 @@ pub mod api { } pub struct AssignedRelayers; impl ::subxt::StorageEntry for AssignedRelayers { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "AssignedRelayers"; type Value = ::std::vec::Vec< - runtime_types::dp_fee::Relayer< + runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -7708,23 +7878,23 @@ pub mod api { pub ::core::primitive::u64, ); impl ::subxt::StorageEntry for Orders { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "Orders"; - type Value = runtime_types::dp_fee::Order< + type Value = runtime_types::pallet_fee_market::types::Order< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, ::core::primitive::u128, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, + &(&self.0, &self.1), ::subxt::StorageHasher::Blake2_128Concat, )]) } } pub struct CollateralSlashProtect; impl ::subxt::StorageEntry for CollateralSlashProtect { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "CollateralSlashProtect"; type Value = ::core::primitive::u128; fn key(&self) -> ::subxt::StorageEntryKey { @@ -7733,7 +7903,7 @@ pub mod api { } pub struct AssignedRelayersNumber; impl ::subxt::StorageEntry for AssignedRelayersNumber { - const PALLET: &'static str = "FeeMarket"; + const PALLET: &'static str = "PangolinFeeMarket"; const STORAGE: &'static str = "AssignedRelayersNumber"; type Value = ::core::primitive::u32; fn key(&self) -> ::subxt::StorageEntryKey { @@ -7752,7 +7922,7 @@ pub mod api { _0: ::subxt::sp_core::crypto::AccountId32, hash: ::core::option::Option, ) -> ::core::result::Result< - runtime_types::dp_fee::Relayer< + runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -7784,7 +7954,7 @@ pub mod api { ) -> ::core::result::Result< ::core::option::Option< ::std::vec::Vec< - runtime_types::dp_fee::Relayer< + runtime_types::pallet_fee_market::types::Relayer< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, >, @@ -7802,7 +7972,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::dp_fee::Order< + runtime_types::pallet_fee_market::types::Order< ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u32, ::core::primitive::u128, @@ -7844,16 +8014,6 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn pallet_id( - &self, - ) -> ::core::result::Result< - runtime_types::frame_support::PalletId, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 97u8, 47u8, 102u8, 101u8, 101u8, 109u8, 107u8][..], - )?) - } pub fn treasury_pallet_id( &self, ) -> ::core::result::Result< @@ -7889,7 +8049,7 @@ pub mod api { { Ok(::subxt::codec::Decode::decode( &mut &[ - 0u8, 88u8, 71u8, 248u8, 13u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 0u8, 116u8, 59u8, 164u8, 11u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, ][..], )?) @@ -7899,7 +8059,7 @@ pub mod api { ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode( - &mut &[88u8, 2u8, 0u8, 0u8][..], + &mut &[44u8, 1u8, 0u8, 0u8][..], )?) } pub fn assigned_relayers_reward_ratio( @@ -8478,8 +8638,14 @@ pub mod api { pub input: ::std::vec::Vec<::core::primitive::u8>, pub value: runtime_types::primitive_types::U256, pub gas_limit: ::core::primitive::u64, - pub gas_price: runtime_types::primitive_types::U256, + pub max_fee_per_gas: runtime_types::primitive_types::U256, + pub max_priority_fee_per_gas: + ::core::option::Option, pub nonce: ::core::option::Option, + pub access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, } impl ::subxt::Call for call { const PALLET: &'static str = "EVM"; @@ -8491,8 +8657,14 @@ pub mod api { pub init: ::std::vec::Vec<::core::primitive::u8>, pub value: runtime_types::primitive_types::U256, pub gas_limit: ::core::primitive::u64, - pub gas_price: runtime_types::primitive_types::U256, + pub max_fee_per_gas: runtime_types::primitive_types::U256, + pub max_priority_fee_per_gas: + ::core::option::Option, pub nonce: ::core::option::Option, + pub access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, } impl ::subxt::Call for create { const PALLET: &'static str = "EVM"; @@ -8505,8 +8677,14 @@ pub mod api { pub salt: ::subxt::sp_core::H256, pub value: runtime_types::primitive_types::U256, pub gas_limit: ::core::primitive::u64, - pub gas_price: runtime_types::primitive_types::U256, + pub max_fee_per_gas: runtime_types::primitive_types::U256, + pub max_priority_fee_per_gas: + ::core::option::Option, pub nonce: ::core::option::Option, + pub access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, } impl ::subxt::Call for create2 { const PALLET: &'static str = "EVM"; @@ -8535,8 +8713,15 @@ pub mod api { input: ::std::vec::Vec<::core::primitive::u8>, value: runtime_types::primitive_types::U256, gas_limit: ::core::primitive::u64, - gas_price: runtime_types::primitive_types::U256, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: ::core::option::Option< + runtime_types::primitive_types::U256, + >, nonce: ::core::option::Option, + access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, call, DispatchError> { let call = call { @@ -8545,8 +8730,10 @@ pub mod api { input, value, gas_limit, - gas_price, + max_fee_per_gas, + max_priority_fee_per_gas, nonce, + access_list, }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8556,8 +8743,15 @@ pub mod api { init: ::std::vec::Vec<::core::primitive::u8>, value: runtime_types::primitive_types::U256, gas_limit: ::core::primitive::u64, - gas_price: runtime_types::primitive_types::U256, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: ::core::option::Option< + runtime_types::primitive_types::U256, + >, nonce: ::core::option::Option, + access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, create, DispatchError> { let call = create { @@ -8565,8 +8759,10 @@ pub mod api { init, value, gas_limit, - gas_price, + max_fee_per_gas, + max_priority_fee_per_gas, nonce, + access_list, }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8577,8 +8773,15 @@ pub mod api { salt: ::subxt::sp_core::H256, value: runtime_types::primitive_types::U256, gas_limit: ::core::primitive::u64, - gas_price: runtime_types::primitive_types::U256, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: ::core::option::Option< + runtime_types::primitive_types::U256, + >, nonce: ::core::option::Option, + access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, create2, DispatchError> { let call = create2 { @@ -8587,8 +8790,10 @@ pub mod api { salt, value, gas_limit, - gas_price, + max_fee_per_gas, + max_priority_fee_per_gas, nonce, + access_list, }; ::subxt::SubmittableExtrinsic::new(self.client, call) } @@ -8739,13 +8944,21 @@ pub mod api { type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct transact { - pub transaction: runtime_types::ethereum::transaction::LegacyTransaction, + pub transaction: runtime_types::ethereum::transaction::TransactionV2, } impl ::subxt::Call for transact { const PALLET: &'static str = "Ethereum"; const FUNCTION: &'static str = "transact"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct message_transact { + pub transaction: runtime_types::ethereum::transaction::TransactionV2, + } + impl ::subxt::Call for message_transact { + const PALLET: &'static str = "Ethereum"; + const FUNCTION: &'static str = "message_transact"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct root_transact { pub target: runtime_types::primitive_types::H160, pub input: ::std::vec::Vec<::core::primitive::u8>, @@ -8772,12 +8985,20 @@ pub mod api { } pub fn transact( &self, - transaction: runtime_types::ethereum::transaction::LegacyTransaction, + transaction: runtime_types::ethereum::transaction::TransactionV2, ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, transact, DispatchError> { let call = transact { transaction }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn message_transact( + &self, + transaction: runtime_types::ethereum::transaction::TransactionV2, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, message_transact, DispatchError> + { + let call = message_transact { transaction }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } pub fn root_transact( &self, target: runtime_types::primitive_types::H160, @@ -8789,7 +9010,7 @@ pub mod api { } } } - pub type Event = runtime_types::dvm_ethereum::pallet::Event; + pub type Event = runtime_types::darwinia_ethereum::pallet::Event; pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -8805,14 +9026,24 @@ pub mod api { } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct DVMTransfer( - pub runtime_types::primitive_types::H160, - pub runtime_types::primitive_types::H160, + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, pub runtime_types::primitive_types::U256, ); impl ::subxt::Event for DVMTransfer { const PALLET: &'static str = "Ethereum"; const EVENT: &'static str = "DVMTransfer"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct KtonDVMTransfer( + pub ::subxt::sp_core::crypto::AccountId32, + pub ::subxt::sp_core::crypto::AccountId32, + pub runtime_types::primitive_types::U256, + ); + impl ::subxt::Event for KtonDVMTransfer { + const PALLET: &'static str = "Ethereum"; + const EVENT: &'static str = "KtonDVMTransfer"; + } } pub mod storage { use super::runtime_types; @@ -8821,9 +9052,9 @@ pub mod api { const PALLET: &'static str = "Ethereum"; const STORAGE: &'static str = "Pending"; type Value = ::std::vec::Vec<( - runtime_types::ethereum::transaction::LegacyTransaction, - runtime_types::dvm_rpc_runtime_api::TransactionStatus, - runtime_types::ethereum::receipt::Receipt, + runtime_types::ethereum::transaction::TransactionV2, + runtime_types::fp_rpc::TransactionStatus, + runtime_types::ethereum::receipt::ReceiptV3, )>; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain @@ -8834,7 +9065,7 @@ pub mod api { const PALLET: &'static str = "Ethereum"; const STORAGE: &'static str = "CurrentBlock"; type Value = runtime_types::ethereum::block::Block< - runtime_types::ethereum::transaction::LegacyTransaction, + runtime_types::ethereum::transaction::TransactionV2, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain @@ -8844,7 +9075,7 @@ pub mod api { impl ::subxt::StorageEntry for CurrentReceipts { const PALLET: &'static str = "Ethereum"; const STORAGE: &'static str = "CurrentReceipts"; - type Value = ::std::vec::Vec; + type Value = ::std::vec::Vec; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -8853,7 +9084,7 @@ pub mod api { impl ::subxt::StorageEntry for CurrentTransactionStatuses { const PALLET: &'static str = "Ethereum"; const STORAGE: &'static str = "CurrentTransactionStatuses"; - type Value = ::std::vec::Vec; + type Value = ::std::vec::Vec; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -8906,9 +9137,9 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec<( - runtime_types::ethereum::transaction::LegacyTransaction, - runtime_types::dvm_rpc_runtime_api::TransactionStatus, - runtime_types::ethereum::receipt::Receipt, + runtime_types::ethereum::transaction::TransactionV2, + runtime_types::fp_rpc::TransactionStatus, + runtime_types::ethereum::receipt::ReceiptV3, )>, ::subxt::BasicError, > { @@ -8921,7 +9152,7 @@ pub mod api { ) -> ::core::result::Result< ::core::option::Option< runtime_types::ethereum::block::Block< - runtime_types::ethereum::transaction::LegacyTransaction, + runtime_types::ethereum::transaction::TransactionV2, >, >, ::subxt::BasicError, @@ -8934,7 +9165,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - ::std::vec::Vec, + ::std::vec::Vec, >, ::subxt::BasicError, > { @@ -8946,7 +9177,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - ::std::vec::Vec, + ::std::vec::Vec, >, ::subxt::BasicError, > { @@ -9024,18 +9255,34 @@ pub mod api { } } } - pub mod bsc { + pub mod base_fee { use super::runtime_types; pub mod calls { use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct relay_finalized_epoch_header { - pub proof: ::std::vec::Vec, + pub struct set_base_fee_per_gas { + pub fee: runtime_types::primitive_types::U256, } - impl ::subxt::Call for relay_finalized_epoch_header { - const PALLET: &'static str = "Bsc"; - const FUNCTION: &'static str = "relay_finalized_epoch_header"; + impl ::subxt::Call for set_base_fee_per_gas { + const PALLET: &'static str = "BaseFee"; + const FUNCTION: &'static str = "set_base_fee_per_gas"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct set_is_active { + pub is_active: ::core::primitive::bool, + } + impl ::subxt::Call for set_is_active { + const PALLET: &'static str = "BaseFee"; + const FUNCTION: &'static str = "set_is_active"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct set_elasticity { + pub elasticity: runtime_types::sp_arithmetic::per_things::Permill, + } + impl ::subxt::Call for set_elasticity { + const PALLET: &'static str = "BaseFee"; + const FUNCTION: &'static str = "set_elasticity"; } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { client: &'a ::subxt::Client, @@ -9053,28 +9300,176 @@ pub mod api { marker: ::core::marker::PhantomData, } } - pub fn relay_finalized_epoch_header( + pub fn set_base_fee_per_gas( &self, - proof: ::std::vec::Vec, - ) -> ::subxt::SubmittableExtrinsic< - 'a, - T, - X, - A, - relay_finalized_epoch_header, - DispatchError, - > { - let call = relay_finalized_epoch_header { proof }; + fee: runtime_types::primitive_types::U256, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_base_fee_per_gas, DispatchError> + { + let call = set_base_fee_per_gas { fee }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_is_active( + &self, + is_active: ::core::primitive::bool, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_is_active, DispatchError> + { + let call = set_is_active { is_active }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + pub fn set_elasticity( + &self, + elasticity: runtime_types::sp_arithmetic::per_things::Permill, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, set_elasticity, DispatchError> + { + let call = set_elasticity { elasticity }; ::subxt::SubmittableExtrinsic::new(self.client, call) } } } - pub mod storage { + pub type Event = runtime_types::pallet_base_fee::pallet::Event; + pub mod events { use super::runtime_types; - pub struct FinalizedAuthorities; - impl ::subxt::StorageEntry for FinalizedAuthorities { - const PALLET: &'static str = "Bsc"; - const STORAGE: &'static str = "FinalizedAuthorities"; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct NewBaseFeePerGas(pub runtime_types::primitive_types::U256); + impl ::subxt::Event for NewBaseFeePerGas { + const PALLET: &'static str = "BaseFee"; + const EVENT: &'static str = "NewBaseFeePerGas"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct BaseFeeOverflow; + impl ::subxt::Event for BaseFeeOverflow { + const PALLET: &'static str = "BaseFee"; + const EVENT: &'static str = "BaseFeeOverflow"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct IsActive(pub ::core::primitive::bool); + impl ::subxt::Event for IsActive { + const PALLET: &'static str = "BaseFee"; + const EVENT: &'static str = "IsActive"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct NewElasticity(pub runtime_types::sp_arithmetic::per_things::Permill); + impl ::subxt::Event for NewElasticity { + const PALLET: &'static str = "BaseFee"; + const EVENT: &'static str = "NewElasticity"; + } + } + pub mod storage { + use super::runtime_types; + pub struct BaseFeePerGas; + impl ::subxt::StorageEntry for BaseFeePerGas { + const PALLET: &'static str = "BaseFee"; + const STORAGE: &'static str = "BaseFeePerGas"; + type Value = runtime_types::primitive_types::U256; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct IsActive; + impl ::subxt::StorageEntry for IsActive { + const PALLET: &'static str = "BaseFee"; + const STORAGE: &'static str = "IsActive"; + type Value = ::core::primitive::bool; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct Elasticity; + impl ::subxt::StorageEntry for Elasticity { + const PALLET: &'static str = "BaseFee"; + const STORAGE: &'static str = "Elasticity"; + type Value = runtime_types::sp_arithmetic::per_things::Permill; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Plain + } + } + pub struct StorageApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> StorageApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } + pub async fn base_fee_per_gas( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result + { + let entry = BaseFeePerGas; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn is_active( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> + { + let entry = IsActive; + self.client.storage().fetch_or_default(&entry, hash).await + } + pub async fn elasticity( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result< + runtime_types::sp_arithmetic::per_things::Permill, + ::subxt::BasicError, + > { + let entry = Elasticity; + self.client.storage().fetch_or_default(&entry, hash).await + } + } + } + } + pub mod bsc { + use super::runtime_types; + pub mod calls { + use super::runtime_types; + type DispatchError = runtime_types::sp_runtime::DispatchError; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct relay_finalized_epoch_header { + pub proof: ::std::vec::Vec, + } + impl ::subxt::Call for relay_finalized_epoch_header { + const PALLET: &'static str = "Bsc"; + const FUNCTION: &'static str = "relay_finalized_epoch_header"; + } + pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { + client: &'a ::subxt::Client, + marker: ::core::marker::PhantomData<(X, A)>, + } + impl<'a, T, X, A> TransactionApi<'a, T, X, A> + where + T: ::subxt::Config, + X: ::subxt::SignedExtra, + A: ::subxt::AccountData, + { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { + client, + marker: ::core::marker::PhantomData, + } + } + pub fn relay_finalized_epoch_header( + &self, + proof: ::std::vec::Vec, + ) -> ::subxt::SubmittableExtrinsic< + 'a, + T, + X, + A, + relay_finalized_epoch_header, + DispatchError, + > { + let call = relay_finalized_epoch_header { proof }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } + } + } + pub mod storage { + use super::runtime_types; + pub struct FinalizedAuthorities; + impl ::subxt::StorageEntry for FinalizedAuthorities { + const PALLET: &'static str = "Bsc"; + const STORAGE: &'static str = "FinalizedAuthorities"; type Value = ::std::vec::Vec; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain @@ -9172,6 +9567,16 @@ pub mod api { } pub mod runtime_types { use super::runtime_types; + pub mod beefy_primitives { + use super::runtime_types; + pub mod crypto { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Public(pub runtime_types::sp_core::ecdsa::Public); + } + } pub mod bitvec { use super::runtime_types; pub mod order { @@ -9358,25 +9763,18 @@ pub mod api { pub nonce: ::std::vec::Vec<::core::primitive::u8>, } } - pub mod common_runtime { + pub mod darwinia_balances { use super::runtime_types; - pub mod impls { + pub mod pallet { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct AccountData<_0> { - pub free: _0, - pub reserved: _0, - pub free_kton: _0, - pub reserved_kton: _0, + pub struct BalanceLock<_0> { + pub id: [::core::primitive::u8; 8usize], + pub amount: _0, + pub reasons: runtime_types::darwinia_balances::pallet::Reasons, } - } - } - pub mod darwinia_balances { - use super::runtime_types; - pub mod pallet { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] @@ -9490,31 +9888,52 @@ pub mod api { ::core::primitive::u128, ), #[codec(index = 4)] - Deposit( + Reserved( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ), #[codec(index = 5)] - Reserved( + Unreserved( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, ), #[codec(index = 6)] - Unreserved( + ReserveRepatriated( + ::subxt::sp_core::crypto::AccountId32, ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, + runtime_types::frame_support::traits::tokens::misc::BalanceStatus, ), #[codec(index = 7)] - ReserveRepatriated( + Deposit( ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 8)] + Withdraw( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 9)] + Slashed( ::subxt::sp_core::crypto::AccountId32, ::core::primitive::u128, - runtime_types::frame_support::traits::tokens::misc::BalanceStatus, ), } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] + pub enum Reasons { + #[codec(index = 0)] + Fee, + #[codec(index = 1)] + Misc, + #[codec(index = 2)] + All, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] pub enum Releases { #[codec(index = 0)] V1_0_0, @@ -9596,7 +10015,7 @@ pub mod api { } } } - pub mod darwinia_evm { + pub mod darwinia_ethereum { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -9605,33 +10024,17 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - call { - source: runtime_types::primitive_types::H160, - target: runtime_types::primitive_types::H160, - input: ::std::vec::Vec<::core::primitive::u8>, - value: runtime_types::primitive_types::U256, - gas_limit: ::core::primitive::u64, - gas_price: runtime_types::primitive_types::U256, - nonce: ::core::option::Option, + transact { + transaction: runtime_types::ethereum::transaction::TransactionV2, }, #[codec(index = 1)] - create { - source: runtime_types::primitive_types::H160, - init: ::std::vec::Vec<::core::primitive::u8>, - value: runtime_types::primitive_types::U256, - gas_limit: ::core::primitive::u64, - gas_price: runtime_types::primitive_types::U256, - nonce: ::core::option::Option, + message_transact { + transaction: runtime_types::ethereum::transaction::TransactionV2, }, #[codec(index = 2)] - create2 { - source: runtime_types::primitive_types::H160, - init: ::std::vec::Vec<::core::primitive::u8>, - salt: ::subxt::sp_core::H256, - value: runtime_types::primitive_types::U256, - gas_limit: ::core::primitive::u64, - gas_price: runtime_types::primitive_types::U256, - nonce: ::core::option::Option, + root_transact { + target: runtime_types::primitive_types::H160, + input: ::std::vec::Vec<::core::primitive::u8>, }, } #[derive( @@ -9639,44 +10042,54 @@ pub mod api { )] pub enum Error { #[codec(index = 0)] - BalanceLow, + InvalidSignature, #[codec(index = 1)] - WithdrawFailed, + PreLogExists, #[codec(index = 2)] - GasPriceTooLow, + InternalTransactionExitError, #[codec(index = 3)] - InvalidNonce, + InternalTransactionRevertError, + #[codec(index = 4)] + InternalTransactionFatalError, + #[codec(index = 5)] + ReadyOnlyCall, + #[codec(index = 6)] + MessageTransactionError, + #[codec(index = 7)] + MessageValidateError, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - Log(runtime_types::ethereum::log::Log), + Executed( + runtime_types::primitive_types::H160, + runtime_types::primitive_types::H160, + ::subxt::sp_core::H256, + runtime_types::evm_core::error::ExitReason, + ), #[codec(index = 1)] - Created(runtime_types::primitive_types::H160), - #[codec(index = 2)] - CreatedFailed(runtime_types::primitive_types::H160), - #[codec(index = 3)] - Executed(runtime_types::primitive_types::H160), - #[codec(index = 4)] - ExecutedFailed(runtime_types::primitive_types::H160), - #[codec(index = 5)] - BalanceDeposit( + DVMTransfer( + ::subxt::sp_core::crypto::AccountId32, ::subxt::sp_core::crypto::AccountId32, - runtime_types::primitive_types::H160, runtime_types::primitive_types::U256, ), - #[codec(index = 6)] - BalanceWithdraw( + #[codec(index = 2)] + KtonDVMTransfer( + ::subxt::sp_core::crypto::AccountId32, ::subxt::sp_core::crypto::AccountId32, - runtime_types::primitive_types::H160, runtime_types::primitive_types::U256, ), } } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum RawOrigin { + #[codec(index = 0)] + EthereumTransaction(runtime_types::primitive_types::H160), + } } - pub mod darwinia_fee_market { + pub mod darwinia_evm { use super::runtime_types; pub mod pallet { use super::runtime_types; @@ -9685,77 +10098,95 @@ pub mod api { )] pub enum Call { #[codec(index = 0)] - enroll_and_lock_collateral { - lock_collateral: ::core::primitive::u128, - relay_fee: ::core::option::Option<::core::primitive::u128>, + call { + source: runtime_types::primitive_types::H160, + target: runtime_types::primitive_types::H160, + input: ::std::vec::Vec<::core::primitive::u8>, + value: runtime_types::primitive_types::U256, + gas_limit: ::core::primitive::u64, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: + ::core::option::Option, + nonce: ::core::option::Option, + access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, }, #[codec(index = 1)] - update_locked_collateral { - new_collateral: ::core::primitive::u128, + create { + source: runtime_types::primitive_types::H160, + init: ::std::vec::Vec<::core::primitive::u8>, + value: runtime_types::primitive_types::U256, + gas_limit: ::core::primitive::u64, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: + ::core::option::Option, + nonce: ::core::option::Option, + access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, }, #[codec(index = 2)] - update_relay_fee { new_fee: ::core::primitive::u128 }, - #[codec(index = 3)] - cancel_enrollment, - #[codec(index = 4)] - set_slash_protect { - slash_protect: ::core::primitive::u128, + create2 { + source: runtime_types::primitive_types::H160, + init: ::std::vec::Vec<::core::primitive::u8>, + salt: ::subxt::sp_core::H256, + value: runtime_types::primitive_types::U256, + gas_limit: ::core::primitive::u64, + max_fee_per_gas: runtime_types::primitive_types::U256, + max_priority_fee_per_gas: + ::core::option::Option, + nonce: ::core::option::Option, + access_list: ::std::vec::Vec<( + runtime_types::primitive_types::H160, + ::std::vec::Vec<::subxt::sp_core::H256>, + )>, }, - #[codec(index = 5)] - set_assigned_relayers_number { number: ::core::primitive::u32 }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Error { #[codec(index = 0)] - InsufficientBalance, + BalanceLow, #[codec(index = 1)] - AlreadyEnrolled, + FeeOverflow, #[codec(index = 2)] - NotEnrolled, + PaymentOverflow, #[codec(index = 3)] - StillHasOrdersNotConfirmed, + WithdrawFailed, #[codec(index = 4)] - RelayFeeTooLow, + GasPriceTooLow, #[codec(index = 5)] - OccupiedRelayer, - #[codec(index = 6)] - ExtendLockFailed, + InvalidNonce, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { #[codec(index = 0)] - Enroll( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u128, - ), + Log(runtime_types::ethereum::log::Log), #[codec(index = 1)] - UpdateLockedCollateral( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + Created(runtime_types::primitive_types::H160), #[codec(index = 2)] - UpdateRelayFee( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + CreatedFailed(runtime_types::primitive_types::H160), #[codec(index = 3)] - CancelEnrollment(::subxt::sp_core::crypto::AccountId32), + Executed(runtime_types::primitive_types::H160), #[codec(index = 4)] - UpdateCollateralSlashProtect(::core::primitive::u128), + ExecutedFailed(runtime_types::primitive_types::H160), #[codec(index = 5)] - UpdateAssignedRelayersNumber(::core::primitive::u32), + BalanceDeposit( + ::subxt::sp_core::crypto::AccountId32, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::U256, + ), #[codec(index = 6)] - FeeMarketSlash( - runtime_types::dp_fee::SlashReport< - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::core::primitive::u128, - >, + BalanceWithdraw( + ::subxt::sp_core::crypto::AccountId32, + runtime_types::primitive_types::H160, + runtime_types::primitive_types::U256, ), } } @@ -9804,14 +10235,18 @@ pub mod api { >, }, #[codec(index = 4)] - claim_mature_deposits, + withdraw_unbonded { + num_slashing_spans: ::core::primitive::u32, + }, #[codec(index = 5)] - try_claim_deposits_with_punish { expire_time: ::core::primitive::u64 }, + claim_mature_deposits, #[codec(index = 6)] + try_claim_deposits_with_punish { expire_time: ::core::primitive::u64 }, + #[codec(index = 7)] validate { prefs: runtime_types::darwinia_staking::structs::ValidatorPrefs, }, - #[codec(index = 7)] + #[codec(index = 8)] nominate { targets: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< @@ -9820,80 +10255,80 @@ pub mod api { >, >, }, - #[codec(index = 8)] - chill, #[codec(index = 9)] + chill, + #[codec(index = 10)] set_payee { payee: runtime_types::darwinia_staking::structs::RewardDestination< ::subxt::sp_core::crypto::AccountId32, >, }, - #[codec(index = 10)] + #[codec(index = 11)] set_controller { controller: ::subxt::sp_runtime::MultiAddress< ::subxt::sp_core::crypto::AccountId32, (), >, }, - #[codec(index = 11)] + #[codec(index = 12)] set_validator_count { #[codec(compact)] new: ::core::primitive::u32, }, - #[codec(index = 12)] + #[codec(index = 13)] increase_validator_count { #[codec(compact)] additional: ::core::primitive::u32, }, - #[codec(index = 13)] + #[codec(index = 14)] scale_validator_count { factor: runtime_types::sp_arithmetic::per_things::Percent, }, - #[codec(index = 14)] - force_no_eras, #[codec(index = 15)] - force_new_era, + force_no_eras, #[codec(index = 16)] + force_new_era, + #[codec(index = 17)] set_invulnerables { invulnerables: ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, }, - #[codec(index = 17)] + #[codec(index = 18)] force_unstake { stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, }, - #[codec(index = 18)] - force_new_era_always, #[codec(index = 19)] + force_new_era_always, + #[codec(index = 20)] cancel_deferred_slash { era: ::core::primitive::u32, slash_indices: ::std::vec::Vec<::core::primitive::u32>, }, - #[codec(index = 20)] + #[codec(index = 21)] payout_stakers { validator_stash: ::subxt::sp_core::crypto::AccountId32, era: ::core::primitive::u32, }, - #[codec(index = 21)] + #[codec(index = 22)] rebond { #[codec(compact)] plan_to_rebond_ring: ::core::primitive::u128, #[codec(compact)] plan_to_rebond_kton: ::core::primitive::u128, }, - #[codec(index = 22)] + #[codec(index = 23)] set_history_depth { #[codec(compact)] new_history_depth: ::core::primitive::u32, #[codec(compact)] era_items_deleted: ::core::primitive::u32, }, - #[codec(index = 23)] + #[codec(index = 24)] reap_stash { stash: ::subxt::sp_core::crypto::AccountId32, num_slashing_spans: ::core::primitive::u32, }, - #[codec(index = 24)] + #[codec(index = 25)] kick { who: ::std::vec::Vec< ::subxt::sp_runtime::MultiAddress< @@ -9902,7 +10337,7 @@ pub mod api { >, >, }, - #[codec(index = 25)] + #[codec(index = 26)] set_staking_limits { min_nominator_bond: ::core::primitive::u128, min_validator_bond: ::core::primitive::u128, @@ -9912,7 +10347,7 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Percent, >, }, - #[codec(index = 26)] + #[codec(index = 27)] chill_other { controller: ::subxt::sp_core::crypto::AccountId32, }, @@ -10186,7 +10621,7 @@ pub mod api { pub struct StakingLedger<_0, _1, _2, _3> { pub stash: _0, #[codec(compact)] - pub active_ring: _1, + pub active: _1, #[codec(compact)] pub active_deposit_ring: _1, #[codec(compact)] @@ -10245,34 +10680,6 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct BalanceLock<_0, _1> { - pub id: [::core::primitive::u8; 8usize], - pub lock_for: runtime_types::darwinia_support::structs::LockFor<_0, _1>, - pub lock_reasons: runtime_types::darwinia_support::structs::LockReasons, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum LockFor<_0, _1> { - #[codec(index = 0)] - Common { amount: _0 }, - #[codec(index = 1)] - Staking(runtime_types::darwinia_support::structs::StakingLock<_0, _1>), - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum LockReasons { - #[codec(index = 0)] - Fee, - #[codec(index = 1)] - Misc, - #[codec(index = 2)] - All, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] pub struct StakingLock<_0, _1> { pub staking_amount: _0, pub unbondings: @@ -10300,112 +10707,20 @@ pub mod api { pub decimal: ::core::primitive::u8, } } - pub mod dp_fee { + pub mod drml_common_runtime { use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Order<_0, _1, _2> { - pub lane: [::core::primitive::u8; 4usize], - pub message: ::core::primitive::u64, - pub sent_time: _1, - pub confirm_time: ::core::option::Option<_1>, - pub locked_collateral: _2, - pub relayers: ::std::vec::Vec>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PriorRelayer<_0, _1, _2> { - pub id: _0, - pub fee: _2, - pub valid_range: ::core::ops::Range<_1>, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Relayer<_0, _1> { - pub id: _0, - pub collateral: _1, - pub fee: _1, - } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct SlashReport<_0, _1, _2> { - pub lane: [::core::primitive::u8; 4usize], - pub message: ::core::primitive::u64, - pub sent_time: _1, - pub confirm_time: ::core::option::Option<_1>, - pub delay_time: ::core::option::Option<_1>, - pub account_id: _0, - pub amount: _2, - } - } - pub mod dvm_ethereum { - use super::runtime_types; - pub mod pallet { + pub mod impls { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub enum Call { - #[codec(index = 0)] - transact { - transaction: runtime_types::ethereum::transaction::LegacyTransaction, - }, - #[codec(index = 1)] - root_transact { - target: runtime_types::primitive_types::H160, - input: ::std::vec::Vec<::core::primitive::u8>, - }, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Error { - #[codec(index = 0)] - InvalidSignature, - #[codec(index = 1)] - PreLogExists, - #[codec(index = 2)] - InternalTransactionExitError, - #[codec(index = 3)] - InternalTransactionRevertError, - #[codec(index = 4)] - InternalTransactionFatalError, - #[codec(index = 5)] - ReadyOnlyCall, - } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum Event { - #[codec(index = 0)] - Executed( - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - ::subxt::sp_core::H256, - runtime_types::evm_core::error::ExitReason, - ), - #[codec(index = 1)] - DVMTransfer( - runtime_types::primitive_types::H160, - runtime_types::primitive_types::H160, - runtime_types::primitive_types::U256, - ), + pub struct AccountData<_0> { + pub free: _0, + pub reserved: _0, + pub free_kton: _0, + pub reserved_kton: _0, } } - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub enum RawOrigin { - #[codec(index = 0)] - EthereumTransaction(runtime_types::primitive_types::H160), - } - } - pub mod dvm_rpc_runtime_api { - use super::runtime_types; - #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct TransactionStatus { - pub transaction_hash: ::subxt::sp_core::H256, - pub transaction_index: ::core::primitive::u32, - pub from: runtime_types::primitive_types::H160, - pub to: ::core::option::Option, - pub contract_address: ::core::option::Option, - pub logs: ::std::vec::Vec, - pub logs_bloom: runtime_types::ethbloom::Bloom, - } } pub mod ethbloom { use super::runtime_types; @@ -10453,26 +10768,79 @@ pub mod api { #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct Log { - pub address: runtime_types::primitive_types::H160, - pub topics: ::std::vec::Vec<::subxt::sp_core::H256>, - pub data: ::std::vec::Vec<::core::primitive::u8>, + pub struct Log { + pub address: runtime_types::primitive_types::H160, + pub topics: ::std::vec::Vec<::subxt::sp_core::H256>, + pub data: ::std::vec::Vec<::core::primitive::u8>, + } + } + pub mod receipt { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct EIP658ReceiptData { + pub status_code: ::core::primitive::u8, + pub used_gas: runtime_types::primitive_types::U256, + pub logs_bloom: runtime_types::ethbloom::Bloom, + pub logs: ::std::vec::Vec, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum ReceiptV3 { + #[codec(index = 0)] + Legacy(runtime_types::ethereum::receipt::EIP658ReceiptData), + #[codec(index = 1)] + EIP2930(runtime_types::ethereum::receipt::EIP658ReceiptData), + #[codec(index = 2)] + EIP1559(runtime_types::ethereum::receipt::EIP658ReceiptData), + } + } + pub mod transaction { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct AccessListItem { + pub address: runtime_types::primitive_types::H160, + pub slots: ::std::vec::Vec<::subxt::sp_core::H256>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct EIP1559Transaction { + pub chain_id: ::core::primitive::u64, + pub nonce: runtime_types::primitive_types::U256, + pub max_priority_fee_per_gas: runtime_types::primitive_types::U256, + pub max_fee_per_gas: runtime_types::primitive_types::U256, + pub gas_limit: runtime_types::primitive_types::U256, + pub action: runtime_types::ethereum::transaction::TransactionAction, + pub value: runtime_types::primitive_types::U256, + pub input: ::std::vec::Vec<::core::primitive::u8>, + pub access_list: + ::std::vec::Vec, + pub odd_y_parity: ::core::primitive::bool, + pub r: ::subxt::sp_core::H256, + pub s: ::subxt::sp_core::H256, } - } - pub mod receipt { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct Receipt { - pub state_root: ::subxt::sp_core::H256, - pub used_gas: runtime_types::primitive_types::U256, - pub logs_bloom: runtime_types::ethbloom::Bloom, - pub logs: ::std::vec::Vec, + pub struct EIP2930Transaction { + pub chain_id: ::core::primitive::u64, + pub nonce: runtime_types::primitive_types::U256, + pub gas_price: runtime_types::primitive_types::U256, + pub gas_limit: runtime_types::primitive_types::U256, + pub action: runtime_types::ethereum::transaction::TransactionAction, + pub value: runtime_types::primitive_types::U256, + pub input: ::std::vec::Vec<::core::primitive::u8>, + pub access_list: + ::std::vec::Vec, + pub odd_y_parity: ::core::primitive::bool, + pub r: ::subxt::sp_core::H256, + pub s: ::subxt::sp_core::H256, } - } - pub mod transaction { - use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] @@ -10510,6 +10878,17 @@ pub mod api { pub r: ::subxt::sp_core::H256, pub s: ::subxt::sp_core::H256, } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum TransactionV2 { + #[codec(index = 0)] + Legacy(runtime_types::ethereum::transaction::LegacyTransaction), + #[codec(index = 1)] + EIP2930(runtime_types::ethereum::transaction::EIP2930Transaction), + #[codec(index = 2)] + EIP1559(runtime_types::ethereum::transaction::EIP1559Transaction), + } } } pub mod ethereum_types { @@ -10547,16 +10926,18 @@ pub mod api { #[codec(index = 7)] CreateContractLimit, #[codec(index = 8)] - OutOfOffset, + InvalidCode, #[codec(index = 9)] - OutOfGas, + OutOfOffset, #[codec(index = 10)] - OutOfFund, + OutOfGas, #[codec(index = 11)] - PCUnderflow, + OutOfFund, #[codec(index = 12)] - CreateEmpty, + PCUnderflow, #[codec(index = 13)] + CreateEmpty, + #[codec(index = 14)] Other(::std::string::String), } #[derive( @@ -10639,6 +11020,19 @@ pub mod api { pub id: _3, } } + pub mod fp_rpc { + use super::runtime_types; + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct TransactionStatus { + pub transaction_hash: ::subxt::sp_core::H256, + pub transaction_index: ::core::primitive::u32, + pub from: runtime_types::primitive_types::H160, + pub to: ::core::option::Option, + pub contract_address: ::core::option::Option, + pub logs: ::std::vec::Vec, + pub logs_bloom: runtime_types::ethbloom::Bloom, + } + } pub mod fp_self_contained { use super::runtime_types; pub mod unchecked_extrinsic { @@ -11118,6 +11512,40 @@ pub mod api { } } } + pub mod pallet_base_fee { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + set_base_fee_per_gas { + fee: runtime_types::primitive_types::U256, + }, + #[codec(index = 1)] + set_is_active { is_active: ::core::primitive::bool }, + #[codec(index = 2)] + set_elasticity { + elasticity: runtime_types::sp_arithmetic::per_things::Permill, + }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + NewBaseFeePerGas(runtime_types::primitive_types::U256), + #[codec(index = 1)] + BaseFeeOverflow, + #[codec(index = 2)] + IsActive(::core::primitive::bool), + #[codec(index = 3)] + NewElasticity(runtime_types::sp_arithmetic::per_things::Permill), + } + } + } pub mod pallet_bridge_dispatch { use super::runtime_types; pub mod pallet { @@ -11156,9 +11584,10 @@ pub mod api { ([::core::primitive::u8; 4usize], ::core::primitive::u64), ), #[codec(index = 5)] - MessageCallRejected( + MessageCallValidateFailed( [::core::primitive::u8; 4usize], ([::core::primitive::u8; 4usize], ::core::primitive::u64), + runtime_types::sp_runtime::transaction_validity::TransactionValidityError, ), #[codec(index = 6)] MessageDispatchPaymentFailed( @@ -11255,7 +11684,7 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Call { - # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: OperatingMode , } , # [codec (index = 2)] update_pallet_parameter { parameter : runtime_types :: pangoro_runtime :: pangolin_messages :: PangoroToPangolinMessagesParameter , } , # [codec (index = 3)] send_message { lane_id : [:: core :: primitive :: u8 ; 4usize] , payload : runtime_types :: bp_message_dispatch :: MessagePayload < :: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_runtime :: MultiSigner , runtime_types :: sp_runtime :: MultiSignature , :: std :: vec :: Vec < :: core :: primitive :: u8 > > , delivery_and_dispatch_fee : :: core :: primitive :: u128 , } , # [codec (index = 4)] increase_message_fee { lane_id : [:: core :: primitive :: u8 ; 4usize] , nonce : :: core :: primitive :: u64 , additional_fee : :: core :: primitive :: u128 , } , # [codec (index = 5)] receive_messages_proof { relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: core :: primitive :: u64 , } , # [codec (index = 6)] receive_messages_delivery_proof { proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } , } + # [codec (index = 0)] set_owner { new_owner : :: core :: option :: Option < :: subxt :: sp_core :: crypto :: AccountId32 > , } , # [codec (index = 1)] set_operating_mode { operating_mode : runtime_types :: bp_messages :: OperatingMode , } , # [codec (index = 2)] update_pallet_parameter { parameter : runtime_types :: pangoro_runtime :: bridges_message :: pangolin :: PangoroToPangolinMessagesParameter , } , # [codec (index = 3)] send_message { lane_id : [:: core :: primitive :: u8 ; 4usize] , payload : runtime_types :: bp_message_dispatch :: MessagePayload < :: subxt :: sp_core :: crypto :: AccountId32 , runtime_types :: sp_runtime :: MultiSigner , runtime_types :: sp_runtime :: MultiSignature , :: std :: vec :: Vec < :: core :: primitive :: u8 > > , delivery_and_dispatch_fee : :: core :: primitive :: u128 , } , # [codec (index = 4)] increase_message_fee { lane_id : [:: core :: primitive :: u8 ; 4usize] , nonce : :: core :: primitive :: u64 , additional_fee : :: core :: primitive :: u128 , } , # [codec (index = 5)] receive_messages_proof { relayer_id_at_bridged_chain : :: subxt :: sp_core :: crypto :: AccountId32 , proof : runtime_types :: bridge_runtime_common :: messages :: target :: FromBridgedChainMessagesProof < :: subxt :: sp_core :: H256 > , messages_count : :: core :: primitive :: u32 , dispatch_weight : :: core :: primitive :: u64 , } , # [codec (index = 6)] receive_messages_delivery_proof { proof : runtime_types :: bridge_runtime_common :: messages :: source :: FromBridgedChainMessagesDeliveryProof < :: subxt :: sp_core :: H256 > , relayers_state : runtime_types :: bp_messages :: UnrewardedRelayersState , } , } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] @@ -11289,7 +11718,7 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub enum Event { - # [codec (index = 0)] ParameterUpdated (runtime_types :: pangoro_runtime :: pangolin_messages :: PangoroToPangolinMessagesParameter ,) , # [codec (index = 1)] MessageAccepted ([:: core :: primitive :: u8 ; 4usize] , :: core :: primitive :: u64 ,) , # [codec (index = 2)] MessagesDelivered ([:: core :: primitive :: u8 ; 4usize] , runtime_types :: bp_messages :: DeliveredMessages ,) , } + # [codec (index = 0)] ParameterUpdated (runtime_types :: pangoro_runtime :: bridges_message :: pangolin :: PangoroToPangolinMessagesParameter ,) , # [codec (index = 1)] MessageAccepted ([:: core :: primitive :: u8 ; 4usize] , :: core :: primitive :: u64 ,) , # [codec (index = 2)] MessagesDelivered ([:: core :: primitive :: u8 ; 4usize] , runtime_types :: bp_messages :: DeliveredMessages ,) , } } } pub mod pallet_election_provider_multi_phase { @@ -11421,6 +11850,166 @@ pub mod api { pub targets: ::core::primitive::u32, } } + pub mod pallet_fee_market { + use super::runtime_types; + pub mod pallet { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Call { + #[codec(index = 0)] + enroll_and_lock_collateral { + lock_collateral: ::core::primitive::u128, + relay_fee: ::core::option::Option<::core::primitive::u128>, + }, + #[codec(index = 1)] + update_locked_collateral { + new_collateral: ::core::primitive::u128, + }, + #[codec(index = 2)] + update_relay_fee { new_fee: ::core::primitive::u128 }, + #[codec(index = 3)] + cancel_enrollment, + #[codec(index = 4)] + set_slash_protect { + slash_protect: ::core::primitive::u128, + }, + #[codec(index = 5)] + set_assigned_relayers_number { number: ::core::primitive::u32 }, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Error { + #[codec(index = 0)] + InsufficientBalance, + #[codec(index = 1)] + AlreadyEnrolled, + #[codec(index = 2)] + NotEnrolled, + #[codec(index = 3)] + CollateralTooLow, + #[codec(index = 4)] + StillHasOrdersNotConfirmed, + #[codec(index = 5)] + RelayFeeTooLow, + #[codec(index = 6)] + OccupiedRelayer, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum Event { + #[codec(index = 0)] + Enroll( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ::core::primitive::u128, + ), + #[codec(index = 1)] + UpdateLockedCollateral( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 2)] + UpdateRelayFee( + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + ), + #[codec(index = 3)] + CancelEnrollment(::subxt::sp_core::crypto::AccountId32), + #[codec(index = 4)] + UpdateCollateralSlashProtect(::core::primitive::u128), + #[codec(index = 5)] + UpdateAssignedRelayersNumber(::core::primitive::u32), + #[codec(index = 6)] + FeeMarketSlash( + runtime_types::pallet_fee_market::types::SlashReport< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u32, + ::core::primitive::u128, + >, + ), + #[codec(index = 7)] + OrderCreated( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + ::core::primitive::u128, + ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>, + ::core::option::Option<::core::primitive::u32>, + ), + #[codec(index = 8)] + OrderReward( + [::core::primitive::u8; 4usize], + ::core::primitive::u64, + runtime_types::pallet_fee_market::s2s::payment::RewardItem< + ::subxt::sp_core::crypto::AccountId32, + ::core::primitive::u128, + >, + ), + } + } + pub mod s2s { + use super::runtime_types; + pub mod payment { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct RewardItem<_0, _1> { + pub to_slot_relayer: ::core::option::Option<(_0, _1)>, + pub to_treasury: ::core::option::Option<_1>, + pub to_message_relayer: ::core::option::Option<(_0, _1)>, + pub to_confirm_relayer: ::core::option::Option<(_0, _1)>, + } + } + } + pub mod types { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Order<_0, _1, _2> { + pub lane: [::core::primitive::u8; 4usize], + pub message: ::core::primitive::u64, + pub sent_time: _1, + pub confirm_time: ::core::option::Option<_1>, + pub locked_collateral: _2, + pub relayers: ::std::vec::Vec< + runtime_types::pallet_fee_market::types::PriorRelayer<_0, _1, _2>, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct PriorRelayer<_0, _1, _2> { + pub id: _0, + pub fee: _2, + pub valid_range: ::core::ops::Range<_1>, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Relayer<_0, _1> { + pub id: _0, + pub collateral: _1, + pub fee: _1, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct SlashReport<_0, _1, _2> { + pub lane: [::core::primitive::u8; 4usize], + pub message: ::core::primitive::u64, + pub sent_time: _1, + pub confirm_time: ::core::option::Option<_1>, + pub delay_time: ::core::option::Option<_1>, + pub account_id: _0, + pub amount: _2, + } + } + } pub mod pallet_grandpa { use super::runtime_types; pub mod pallet { @@ -11916,6 +12505,21 @@ pub mod api { } pub mod pangoro_runtime { use super::runtime_types; + pub mod bridges_message { + use super::runtime_types; + pub mod pangolin { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum PangoroToPangolinMessagesParameter { + #[codec(index = 0)] + PangolinToPangoroConversionRate( + runtime_types::sp_arithmetic::fixed_point::FixedU128, + ), + } + } + } pub mod pallets { use super::runtime_types; pub mod election_provider_multi_phase { @@ -12056,24 +12660,13 @@ pub mod api { pub struct SessionKeys { pub babe: runtime_types::sp_consensus_babe::app::Public, pub grandpa: runtime_types::sp_finality_grandpa::app::Public, + pub beefy: runtime_types::beefy_primitives::crypto::Public, pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, } } } - pub mod pangolin_messages { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum PangoroToPangolinMessagesParameter { - #[codec(index = 0)] - PangolinToPangoroConversionRate( - runtime_types::sp_arithmetic::fixed_point::FixedU128, - ), - } - } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum Call { #[codec(index = 0)] @@ -12111,7 +12704,7 @@ pub mod api { #[codec(index = 17)] BridgePangolinMessages(runtime_types::pallet_bridge_messages::pallet::Call), #[codec(index = 22)] - FeeMarket(runtime_types::darwinia_fee_market::pallet::Call), + PangolinFeeMarket(runtime_types::pallet_fee_market::pallet::Call), #[codec(index = 23)] TransactionPause(runtime_types::module_transaction_pause::module::Call), #[codec(index = 20)] @@ -12119,7 +12712,9 @@ pub mod api { #[codec(index = 25)] EVM(runtime_types::darwinia_evm::pallet::Call), #[codec(index = 26)] - Ethereum(runtime_types::dvm_ethereum::pallet::Call), + Ethereum(runtime_types::darwinia_ethereum::pallet::Call), + #[codec(index = 31)] + BaseFee(runtime_types::pallet_base_fee::pallet::Call), #[codec(index = 46)] Bsc(runtime_types::darwinia_bridge_bsc::pallet::Call), } @@ -12156,7 +12751,7 @@ pub mod api { #[codec(index = 17)] BridgePangolinMessages(runtime_types::pallet_bridge_messages::pallet::Event), #[codec(index = 22)] - FeeMarket(runtime_types::darwinia_fee_market::pallet::Event), + PangolinFeeMarket(runtime_types::pallet_fee_market::pallet::Event), #[codec(index = 23)] TransactionPause(runtime_types::module_transaction_pause::module::Event), #[codec(index = 20)] @@ -12164,7 +12759,9 @@ pub mod api { #[codec(index = 25)] EVM(runtime_types::darwinia_evm::pallet::Event), #[codec(index = 26)] - Ethereum(runtime_types::dvm_ethereum::pallet::Event), + Ethereum(runtime_types::darwinia_ethereum::pallet::Event), + #[codec(index = 31)] + BaseFee(runtime_types::pallet_base_fee::pallet::Event), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum OriginCaller { @@ -12173,7 +12770,7 @@ pub mod api { runtime_types::frame_system::RawOrigin<::subxt::sp_core::crypto::AccountId32>, ), #[codec(index = 26)] - Ethereum(runtime_types::dvm_ethereum::RawOrigin), + Ethereum(runtime_types::darwinia_ethereum::RawOrigin), #[codec(index = 2)] Void(runtime_types::sp_core::Void), } @@ -13055,6 +13652,54 @@ pub mod api { )] pub struct BlakeTwo256; } + pub mod transaction_validity { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum InvalidTransaction { + #[codec(index = 0)] + Call, + #[codec(index = 1)] + Payment, + #[codec(index = 2)] + Future, + #[codec(index = 3)] + Stale, + #[codec(index = 4)] + BadProof, + #[codec(index = 5)] + AncientBirthBlock, + #[codec(index = 6)] + ExhaustsResources, + #[codec(index = 7)] + Custom(::core::primitive::u8), + #[codec(index = 8)] + BadMandatory, + #[codec(index = 9)] + MandatoryDispatch, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum TransactionValidityError { + #[codec(index = 0)] + Invalid(runtime_types::sp_runtime::transaction_validity::InvalidTransaction), + #[codec(index = 1)] + Unknown(runtime_types::sp_runtime::transaction_validity::UnknownTransaction), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum UnknownTransaction { + #[codec(index = 0)] + CannotLookup, + #[codec(index = 1)] + NoUnsignedValidator, + #[codec(index = 2)] + Custom(::core::primitive::u8), + } + } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum ArithmeticError { #[codec(index = 0)] @@ -13264,7 +13909,7 @@ pub mod api { impl DispatchError { pub fn details(&self) -> Option { if let Self::Module { index, error } = self { - match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (2u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (2u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (2u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (4u8 , 8u8) => Some (ErrorDetails { pallet : "Balances" , error : "LockP" , docs : "Lock - POISONED." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Kton" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Kton" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Kton" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Kton" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Kton" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Kton" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (5u8 , 8u8) => Some (ErrorDetails { pallet : "Kton" , error : "LockP" , docs : "Lock - POISONED." }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchEarlySubmission" , docs : "Submission was too early." }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWrongWinnerCount" , docs : "Wrong number of winners presented." }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWeakSubmission" , docs : "Submission was too weak, score-wise." }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedQueueFull" , docs : "The queue was full, and the solution was not better than any of the existing ones." }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedCannotPayDeposit" , docs : "The origin failed to pay the deposit." }) , (8u8 , 5u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedInvalidWitness" , docs : "Witness data to dispatchable is invalid." }) , (8u8 , 6u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedTooMuchWeight" , docs : "The signed submission consumes too much weight" }) , (8u8 , 7u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "OcwCallWrongEra" , docs : "OCW submitted solution for wrong round" }) , (8u8 , 8u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "MissingSnapshotMetadata" , docs : "Snapshot metadata should exist but didn't." }) , (8u8 , 9u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "InvalidSubmissionIndex" , docs : "`Self::insert_submission` returned an invalid index." }) , (8u8 , 10u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "CallNotAllowed" , docs : "The call is not allowed at this point." }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotController" , docs : "Not a controller account." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotStash" , docs : "Not a stash account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyBonded" , docs : "Stash is already bonded." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyPaired" , docs : "Controller is already paired." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Staking" , error : "EmptyTargets" , docs : "Targets cannot be empty." }) , (9u8 , 5u8) => Some (ErrorDetails { pallet : "Staking" , error : "DuplicateIndex" , docs : "Duplicate index." }) , (9u8 , 6u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidSlashIndex" , docs : "Slash record index out of bounds." }) , (9u8 , 7u8) => Some (ErrorDetails { pallet : "Staking" , error : "InsufficientBond" , docs : "Can not bond with value less than minimum required." }) , (9u8 , 8u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoMoreChunks" , docs : "Can not schedule more unlock chunks." }) , (9u8 , 9u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoUnlockChunk" , docs : "Can not rebond without unlocking chunks." }) , (9u8 , 10u8) => Some (ErrorDetails { pallet : "Staking" , error : "FundedTarget" , docs : "Attempting to target a stash that still has funds." }) , (9u8 , 11u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidEraToReward" , docs : "Invalid era to reward." }) , (9u8 , 12u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidNumberOfNominations" , docs : "Invalid number of nominations." }) , (9u8 , 13u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotSortedAndUnique" , docs : "Items are not sorted and unique." }) , (9u8 , 14u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyClaimed" , docs : "Rewards for this era have already been claimed for this validator." }) , (9u8 , 15u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectHistoryDepth" , docs : "Incorrect previous history depth input provided." }) , (9u8 , 16u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectSlashingSpans" , docs : "Incorrect number of slashing spans provided." }) , (9u8 , 17u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadState" , docs : "Internal state has become somehow corrupted and the operation cannot continue." }) , (9u8 , 18u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyTargets" , docs : "Too many nomination targets supplied." }) , (9u8 , 19u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadTarget" , docs : "A nomination target was supplied that was blocked or otherwise not a validator." }) , (9u8 , 20u8) => Some (ErrorDetails { pallet : "Staking" , error : "CannotChillOther" , docs : "The user has enough bond and thus cannot be chilled forcefully by an external person." }) , (9u8 , 21u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyNominators" , docs : "There are too many nominators in the system. Governance needs to adjust the staking settings\nto keep things safe for the runtime." }) , (9u8 , 22u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyValidators" , docs : "There are too many validators in the system. Governance needs to adjust the staking settings\nto keep things safe for the runtime." }) , (9u8 , 23u8) => Some (ErrorDetails { pallet : "Staking" , error : "PayoutIns" , docs : "Payout - INSUFFICIENT" }) , (12u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (12u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (12u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (12u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (12u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (14u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (24u8 , 0u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (24u8 , 1u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (24u8 , 2u8) => Some (ErrorDetails { pallet : "Treasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (21u8 , 0u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "FailedToSchedule" , docs : "Failed to schedule a call" }) , (21u8 , 1u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "NotFound" , docs : "Cannot find the scheduled call." }) , (21u8 , 2u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "TargetBlockNumberInPast" , docs : "Given target block number is in the past." }) , (21u8 , 3u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "RescheduleNoChange" , docs : "Reschedule failed because it does not change scheduled time." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (19u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (19u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (19u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (19u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (19u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (19u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (19u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (17u8 , 10u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (17u8 , 11u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (22u8 , 0u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (22u8 , 1u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (22u8 , 2u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (22u8 , 3u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (22u8 , 4u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (22u8 , 5u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , (22u8 , 6u8) => Some (ErrorDetails { pallet : "FeeMarket" , error : "ExtendLockFailed" , docs : "Extend lock failed." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "TransactionPause" , error : "CannotPause" , docs : "can not pause" }) , (23u8 , 1u8) => Some (ErrorDetails { pallet : "TransactionPause" , error : "InvalidCharacter" , docs : "invalid character encoding" }) , (20u8 , 0u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (20u8 , 1u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "RingLockLimited" , docs : "Ring Lock LIMITED." }) , (20u8 , 2u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "RingDailyLimited" , docs : "Redeem Daily Limited" }) , (20u8 , 3u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "NonceDuplicated" , docs : "Message nonce duplicated." }) , (20u8 , 4u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "UnsupportedToken" , docs : "Unsupported token" }) , (20u8 , 5u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "InvalidRecipient" , docs : "Invalid recipient" }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "EVM" , error : "BalanceLow" , docs : "Not enough balance to perform action" }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "EVM" , error : "WithdrawFailed" , docs : "Withdraw fee failed" }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "EVM" , error : "GasPriceTooLow" , docs : "Gas price is too low." }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "EVM" , error : "InvalidNonce" , docs : "Nonce is invalid" }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InvalidSignature" , docs : "Signature is invalid." }) , (26u8 , 1u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "PreLogExists" , docs : "Pre-log is present, therefore transact is not allowed." }) , (26u8 , 2u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionExitError" , docs : "The internal transaction failed." }) , (26u8 , 3u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionRevertError" , docs : "" }) , (26u8 , 4u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionFatalError" , docs : "" }) , (26u8 , 5u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "ReadyOnlyCall" , docs : "The internal call failed." }) , (46u8 , 0u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidHeadersSize" , docs : "The size of submitted headers is not N/2+1" }) , (46u8 , 1u8) => Some (ErrorDetails { pallet : "Bsc" , error : "RidiculousNumber" , docs : "Block number isn't sensible" }) , (46u8 , 2u8) => Some (ErrorDetails { pallet : "Bsc" , error : "NotCheckpoint" , docs : "This header is not checkpoint" }) , (46u8 , 3u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidSigner" , docs : "Invalid signer" }) , (46u8 , 4u8) => Some (ErrorDetails { pallet : "Bsc" , error : "SignedRecently" , docs : "Signed recently" }) , (46u8 , 5u8) => Some (ErrorDetails { pallet : "Bsc" , error : "HeadersNotEnough" , docs : "Submitted headers not enough" }) , (46u8 , 6u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidNonce" , docs : "Non empty nonce\nInvalidNonce is returned if a block header nonce is non-empty" }) , (46u8 , 7u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidGasLimit" , docs : "Gas limit header field is invalid." }) , (46u8 , 8u8) => Some (ErrorDetails { pallet : "Bsc" , error : "TooMuchGasUsed" , docs : "Block has too much gas used." }) , (46u8 , 9u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidUncleHash" , docs : "Non empty uncle hash\nInvalidUncleHash is returned if a block contains an non-empty uncle list" }) , (46u8 , 10u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidDifficulty" , docs : "Difficulty header field is invalid." }) , (46u8 , 11u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidMixDigest" , docs : "Non-zero mix digest\nInvalidMixDigest is returned if a block's mix digest is non-zero" }) , (46u8 , 12u8) => Some (ErrorDetails { pallet : "Bsc" , error : "HeaderTimestampIsAhead" , docs : "Header timestamp is ahead of on-chain timestamp" }) , (46u8 , 13u8) => Some (ErrorDetails { pallet : "Bsc" , error : "MissingVanity" , docs : "Extra-data 32 byte vanity prefix missing\nMissingVanity is returned if a block's extra-data section is shorter than\n32 bytes, which is required to store the validator(signer) vanity\n\nExtra-data 32 byte vanity prefix missing" }) , (46u8 , 14u8) => Some (ErrorDetails { pallet : "Bsc" , error : "MissingSignature" , docs : "Extra-data 65 byte signature suffix missing\nMissingSignature is returned if a block's extra-data section doesn't seem\nto contain a 65 byte secp256k1 signature" }) , (46u8 , 15u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidCheckpointValidators" , docs : "Invalid validator list on checkpoint block\nerrInvalidCheckpointValidators is returned if a checkpoint block contains an\ninvalid list of validators (i.e. non divisible by 20 bytes)" }) , (46u8 , 16u8) => Some (ErrorDetails { pallet : "Bsc" , error : "ExtraValidators" , docs : "Non-checkpoint block contains extra validator list\nExtraValidators is returned if non-checkpoint block contain validator data in\ntheir extra-data fields" }) , (46u8 , 17u8) => Some (ErrorDetails { pallet : "Bsc" , error : "UnknownAncestor" , docs : "UnknownAncestor is returned when validating a block requires an ancestor that is unknown." }) , (46u8 , 18u8) => Some (ErrorDetails { pallet : "Bsc" , error : "HeaderTimestampTooClose" , docs : "Header timestamp too close while header timestamp is too close with parent's" }) , (46u8 , 19u8) => Some (ErrorDetails { pallet : "Bsc" , error : "CheckpointNoSigner" , docs : "Missing signers" }) , (46u8 , 20u8) => Some (ErrorDetails { pallet : "Bsc" , error : "CheckpointInvalidSigners" , docs : "List of signers is invalid" }) , (46u8 , 21u8) => Some (ErrorDetails { pallet : "Bsc" , error : "RecoverPubkeyFail" , docs : "EC_RECOVER error\n\nRecover pubkey from signature error" }) , (46u8 , 22u8) => Some (ErrorDetails { pallet : "Bsc" , error : "VerifyStorageFail" , docs : "Verfiy Storage Proof Failed" }) , _ => None } + match (index , error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (2u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (2u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (2u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (4u8 , 8u8) => Some (ErrorDetails { pallet : "Balances" , error : "LockP" , docs : "Lock - POISONED." }) , (5u8 , 0u8) => Some (ErrorDetails { pallet : "Kton" , error : "VestingBalance" , docs : "Vesting balance too high to send value." }) , (5u8 , 1u8) => Some (ErrorDetails { pallet : "Kton" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal." }) , (5u8 , 2u8) => Some (ErrorDetails { pallet : "Kton" , error : "InsufficientBalance" , docs : "Balance too low to send value." }) , (5u8 , 3u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit." }) , (5u8 , 4u8) => Some (ErrorDetails { pallet : "Kton" , error : "KeepAlive" , docs : "Transfer/payment would kill account." }) , (5u8 , 5u8) => Some (ErrorDetails { pallet : "Kton" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account." }) , (5u8 , 6u8) => Some (ErrorDetails { pallet : "Kton" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist." }) , (5u8 , 7u8) => Some (ErrorDetails { pallet : "Kton" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (5u8 , 8u8) => Some (ErrorDetails { pallet : "Kton" , error : "LockP" , docs : "Lock - POISONED." }) , (7u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (7u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (7u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (7u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (7u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (7u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (7u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (8u8 , 0u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchEarlySubmission" , docs : "Submission was too early." }) , (8u8 , 1u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWrongWinnerCount" , docs : "Wrong number of winners presented." }) , (8u8 , 2u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "PreDispatchWeakSubmission" , docs : "Submission was too weak, score-wise." }) , (8u8 , 3u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedQueueFull" , docs : "The queue was full, and the solution was not better than any of the existing ones." }) , (8u8 , 4u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedCannotPayDeposit" , docs : "The origin failed to pay the deposit." }) , (8u8 , 5u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedInvalidWitness" , docs : "Witness data to dispatchable is invalid." }) , (8u8 , 6u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "SignedTooMuchWeight" , docs : "The signed submission consumes too much weight" }) , (8u8 , 7u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "OcwCallWrongEra" , docs : "OCW submitted solution for wrong round" }) , (8u8 , 8u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "MissingSnapshotMetadata" , docs : "Snapshot metadata should exist but didn't." }) , (8u8 , 9u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "InvalidSubmissionIndex" , docs : "`Self::insert_submission` returned an invalid index." }) , (8u8 , 10u8) => Some (ErrorDetails { pallet : "ElectionProviderMultiPhase" , error : "CallNotAllowed" , docs : "The call is not allowed at this point." }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotController" , docs : "Not a controller account." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotStash" , docs : "Not a stash account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyBonded" , docs : "Stash is already bonded." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyPaired" , docs : "Controller is already paired." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Staking" , error : "EmptyTargets" , docs : "Targets cannot be empty." }) , (9u8 , 5u8) => Some (ErrorDetails { pallet : "Staking" , error : "DuplicateIndex" , docs : "Duplicate index." }) , (9u8 , 6u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidSlashIndex" , docs : "Slash record index out of bounds." }) , (9u8 , 7u8) => Some (ErrorDetails { pallet : "Staking" , error : "InsufficientBond" , docs : "Can not bond with value less than minimum required." }) , (9u8 , 8u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoMoreChunks" , docs : "Can not schedule more unlock chunks." }) , (9u8 , 9u8) => Some (ErrorDetails { pallet : "Staking" , error : "NoUnlockChunk" , docs : "Can not rebond without unlocking chunks." }) , (9u8 , 10u8) => Some (ErrorDetails { pallet : "Staking" , error : "FundedTarget" , docs : "Attempting to target a stash that still has funds." }) , (9u8 , 11u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidEraToReward" , docs : "Invalid era to reward." }) , (9u8 , 12u8) => Some (ErrorDetails { pallet : "Staking" , error : "InvalidNumberOfNominations" , docs : "Invalid number of nominations." }) , (9u8 , 13u8) => Some (ErrorDetails { pallet : "Staking" , error : "NotSortedAndUnique" , docs : "Items are not sorted and unique." }) , (9u8 , 14u8) => Some (ErrorDetails { pallet : "Staking" , error : "AlreadyClaimed" , docs : "Rewards for this era have already been claimed for this validator." }) , (9u8 , 15u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectHistoryDepth" , docs : "Incorrect previous history depth input provided." }) , (9u8 , 16u8) => Some (ErrorDetails { pallet : "Staking" , error : "IncorrectSlashingSpans" , docs : "Incorrect number of slashing spans provided." }) , (9u8 , 17u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadState" , docs : "Internal state has become somehow corrupted and the operation cannot continue." }) , (9u8 , 18u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyTargets" , docs : "Too many nomination targets supplied." }) , (9u8 , 19u8) => Some (ErrorDetails { pallet : "Staking" , error : "BadTarget" , docs : "A nomination target was supplied that was blocked or otherwise not a validator." }) , (9u8 , 20u8) => Some (ErrorDetails { pallet : "Staking" , error : "CannotChillOther" , docs : "The user has enough bond and thus cannot be chilled forcefully by an external person." }) , (9u8 , 21u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyNominators" , docs : "There are too many nominators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (9u8 , 22u8) => Some (ErrorDetails { pallet : "Staking" , error : "TooManyValidators" , docs : "There are too many validators in the system. Governance needs to adjust the staking\nsettings to keep things safe for the runtime." }) , (9u8 , 23u8) => Some (ErrorDetails { pallet : "Staking" , error : "PayoutIns" , docs : "Payout - INSUFFICIENT" }) , (12u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (12u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (12u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (12u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (12u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (13u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (13u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (13u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (13u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (13u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (13u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (13u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (14u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (24u8 , 0u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InsufficientProposersBalance" , docs : "Proposer's balance is too low." }) , (24u8 , 1u8) => Some (ErrorDetails { pallet : "Treasury" , error : "InvalidIndex" , docs : "No proposal or bounty at that index." }) , (24u8 , 2u8) => Some (ErrorDetails { pallet : "Treasury" , error : "TooManyApprovals" , docs : "Too many approvals in the queue." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (21u8 , 0u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "FailedToSchedule" , docs : "Failed to schedule a call" }) , (21u8 , 1u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "NotFound" , docs : "Cannot find the scheduled call." }) , (21u8 , 2u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "TargetBlockNumberInPast" , docs : "Given target block number is in the past." }) , (21u8 , 3u8) => Some (ErrorDetails { pallet : "Scheduler" , error : "RescheduleNoChange" , docs : "Reschedule failed because it does not change scheduled time." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (19u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (19u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (19u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (19u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (19u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (19u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (19u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (17u8 , 6u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (17u8 , 7u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (17u8 , 8u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (17u8 , 9u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (17u8 , 10u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (17u8 , 11u8) => Some (ErrorDetails { pallet : "BridgePangolinMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (22u8 , 0u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (22u8 , 1u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "AlreadyEnrolled" , docs : "The relayer has been enrolled." }) , (22u8 , 2u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "NotEnrolled" , docs : "This relayer doesn't enroll ever." }) , (22u8 , 3u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "CollateralTooLow" , docs : "Locked collateral is too low to cover one order." }) , (22u8 , 4u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "StillHasOrdersNotConfirmed" , docs : "Update locked collateral is not allow since some orders are not confirm." }) , (22u8 , 5u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "RelayFeeTooLow" , docs : "The fee is lower than MinimumRelayFee." }) , (22u8 , 6u8) => Some (ErrorDetails { pallet : "PangolinFeeMarket" , error : "OccupiedRelayer" , docs : "The relayer is occupied, and can't cancel enrollment now." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "TransactionPause" , error : "CannotPause" , docs : "can not pause" }) , (23u8 , 1u8) => Some (ErrorDetails { pallet : "TransactionPause" , error : "InvalidCharacter" , docs : "invalid character encoding" }) , (20u8 , 0u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "InsufficientBalance" , docs : "Insufficient balance." }) , (20u8 , 1u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "RingLockLimited" , docs : "Ring Lock LIMITED." }) , (20u8 , 2u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "RingDailyLimited" , docs : "Redeem Daily Limited" }) , (20u8 , 3u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "NonceDuplicated" , docs : "Message nonce duplicated." }) , (20u8 , 4u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "UnsupportedToken" , docs : "Unsupported token" }) , (20u8 , 5u8) => Some (ErrorDetails { pallet : "Substrate2SubstrateBacking" , error : "InvalidRecipient" , docs : "Invalid recipient" }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "EVM" , error : "BalanceLow" , docs : "Not enough balance to perform action" }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "EVM" , error : "FeeOverflow" , docs : "Calculating total fee overflowed" }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "EVM" , error : "PaymentOverflow" , docs : "Calculating total payment overflowed" }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "EVM" , error : "WithdrawFailed" , docs : "Withdraw fee failed" }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "EVM" , error : "GasPriceTooLow" , docs : "Gas price is too low." }) , (25u8 , 5u8) => Some (ErrorDetails { pallet : "EVM" , error : "InvalidNonce" , docs : "Nonce is invalid" }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InvalidSignature" , docs : "Signature is invalid." }) , (26u8 , 1u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "PreLogExists" , docs : "Pre-log is present, therefore transact is not allowed." }) , (26u8 , 2u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionExitError" , docs : "The internal transaction failed." }) , (26u8 , 3u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionRevertError" , docs : "" }) , (26u8 , 4u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "InternalTransactionFatalError" , docs : "" }) , (26u8 , 5u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "ReadyOnlyCall" , docs : "The internal call failed." }) , (26u8 , 6u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "MessageTransactionError" , docs : "Message transaction invalid" }) , (26u8 , 7u8) => Some (ErrorDetails { pallet : "Ethereum" , error : "MessageValidateError" , docs : "Message validate invalid" }) , (46u8 , 0u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidHeadersSize" , docs : "The size of submitted headers is not N/2+1" }) , (46u8 , 1u8) => Some (ErrorDetails { pallet : "Bsc" , error : "RidiculousNumber" , docs : "Block number isn't sensible" }) , (46u8 , 2u8) => Some (ErrorDetails { pallet : "Bsc" , error : "NotCheckpoint" , docs : "This header is not checkpoint" }) , (46u8 , 3u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidSigner" , docs : "Invalid signer" }) , (46u8 , 4u8) => Some (ErrorDetails { pallet : "Bsc" , error : "SignedRecently" , docs : "Signed recently" }) , (46u8 , 5u8) => Some (ErrorDetails { pallet : "Bsc" , error : "HeadersNotEnough" , docs : "Submitted headers not enough" }) , (46u8 , 6u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidNonce" , docs : "Non empty nonce\nInvalidNonce is returned if a block header nonce is non-empty" }) , (46u8 , 7u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidGasLimit" , docs : "Gas limit header field is invalid." }) , (46u8 , 8u8) => Some (ErrorDetails { pallet : "Bsc" , error : "TooMuchGasUsed" , docs : "Block has too much gas used." }) , (46u8 , 9u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidUncleHash" , docs : "Non empty uncle hash\nInvalidUncleHash is returned if a block contains an non-empty uncle list" }) , (46u8 , 10u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidDifficulty" , docs : "Difficulty header field is invalid." }) , (46u8 , 11u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidMixDigest" , docs : "Non-zero mix digest\nInvalidMixDigest is returned if a block's mix digest is non-zero" }) , (46u8 , 12u8) => Some (ErrorDetails { pallet : "Bsc" , error : "HeaderTimestampIsAhead" , docs : "Header timestamp is ahead of on-chain timestamp" }) , (46u8 , 13u8) => Some (ErrorDetails { pallet : "Bsc" , error : "MissingVanity" , docs : "Extra-data 32 byte vanity prefix missing\nMissingVanity is returned if a block's extra-data section is shorter than\n32 bytes, which is required to store the validator(signer) vanity\n\nExtra-data 32 byte vanity prefix missing" }) , (46u8 , 14u8) => Some (ErrorDetails { pallet : "Bsc" , error : "MissingSignature" , docs : "Extra-data 65 byte signature suffix missing\nMissingSignature is returned if a block's extra-data section doesn't seem\nto contain a 65 byte secp256k1 signature" }) , (46u8 , 15u8) => Some (ErrorDetails { pallet : "Bsc" , error : "InvalidCheckpointValidators" , docs : "Invalid validator list on checkpoint block\nerrInvalidCheckpointValidators is returned if a checkpoint block contains an\ninvalid list of validators (i.e. non divisible by 20 bytes)" }) , (46u8 , 16u8) => Some (ErrorDetails { pallet : "Bsc" , error : "ExtraValidators" , docs : "Non-checkpoint block contains extra validator list\nExtraValidators is returned if non-checkpoint block contain validator data in\ntheir extra-data fields" }) , (46u8 , 17u8) => Some (ErrorDetails { pallet : "Bsc" , error : "UnknownAncestor" , docs : "UnknownAncestor is returned when validating a block requires an ancestor that is\nunknown." }) , (46u8 , 18u8) => Some (ErrorDetails { pallet : "Bsc" , error : "HeaderTimestampTooClose" , docs : "Header timestamp too close while header timestamp is too close with parent's" }) , (46u8 , 19u8) => Some (ErrorDetails { pallet : "Bsc" , error : "CheckpointNoSigner" , docs : "Missing signers" }) , (46u8 , 20u8) => Some (ErrorDetails { pallet : "Bsc" , error : "CheckpointInvalidSigners" , docs : "List of signers is invalid" }) , (46u8 , 21u8) => Some (ErrorDetails { pallet : "Bsc" , error : "RecoverPubkeyFail" , docs : "EC_RECOVER error\n\nRecover pubkey from signature error" }) , (46u8 , 22u8) => Some (ErrorDetails { pallet : "Bsc" , error : "VerifyStorageFail" , docs : "Verfiy Storage Proof Failed" }) , _ => None } } else { None } @@ -13373,8 +14018,8 @@ pub mod api { ) -> bridge_pangolin_messages::constants::ConstantsApi { bridge_pangolin_messages::constants::ConstantsApi } - pub fn fee_market(&self) -> fee_market::constants::ConstantsApi { - fee_market::constants::ConstantsApi + pub fn pangolin_fee_market(&self) -> pangolin_fee_market::constants::ConstantsApi { + pangolin_fee_market::constants::ConstantsApi } pub fn substrate2_substrate_backing( &self, @@ -13430,6 +14075,9 @@ pub mod api { pub fn grandpa(&self) -> grandpa::storage::StorageApi<'a, T> { grandpa::storage::StorageApi::new(self.client) } + pub fn beefy(&self) -> beefy::storage::StorageApi<'a, T> { + beefy::storage::StorageApi::new(self.client) + } pub fn im_online(&self) -> im_online::storage::StorageApi<'a, T> { im_online::storage::StorageApi::new(self.client) } @@ -13452,8 +14100,8 @@ pub mod api { ) -> bridge_pangolin_messages::storage::StorageApi<'a, T> { bridge_pangolin_messages::storage::StorageApi::new(self.client) } - pub fn fee_market(&self) -> fee_market::storage::StorageApi<'a, T> { - fee_market::storage::StorageApi::new(self.client) + pub fn pangolin_fee_market(&self) -> pangolin_fee_market::storage::StorageApi<'a, T> { + pangolin_fee_market::storage::StorageApi::new(self.client) } pub fn transaction_pause(&self) -> transaction_pause::storage::StorageApi<'a, T> { transaction_pause::storage::StorageApi::new(self.client) @@ -13469,6 +14117,9 @@ pub mod api { pub fn ethereum(&self) -> ethereum::storage::StorageApi<'a, T> { ethereum::storage::StorageApi::new(self.client) } + pub fn base_fee(&self) -> base_fee::storage::StorageApi<'a, T> { + base_fee::storage::StorageApi::new(self.client) + } pub fn bsc(&self) -> bsc::storage::StorageApi<'a, T> { bsc::storage::StorageApi::new(self.client) } @@ -13537,8 +14188,10 @@ pub mod api { ) -> bridge_pangolin_messages::calls::TransactionApi<'a, T, X, A> { bridge_pangolin_messages::calls::TransactionApi::new(self.client) } - pub fn fee_market(&self) -> fee_market::calls::TransactionApi<'a, T, X, A> { - fee_market::calls::TransactionApi::new(self.client) + pub fn pangolin_fee_market( + &self, + ) -> pangolin_fee_market::calls::TransactionApi<'a, T, X, A> { + pangolin_fee_market::calls::TransactionApi::new(self.client) } pub fn transaction_pause(&self) -> transaction_pause::calls::TransactionApi<'a, T, X, A> { transaction_pause::calls::TransactionApi::new(self.client) @@ -13554,6 +14207,9 @@ pub mod api { pub fn ethereum(&self) -> ethereum::calls::TransactionApi<'a, T, X, A> { ethereum::calls::TransactionApi::new(self.client) } + pub fn base_fee(&self) -> base_fee::calls::TransactionApi<'a, T, X, A> { + base_fee::calls::TransactionApi::new(self.client) + } pub fn bsc(&self) -> bsc::calls::TransactionApi<'a, T, X, A> { bsc::calls::TransactionApi::new(self.client) } diff --git a/frame/assistants/client-pangoro/src/types/account.rs b/frame/assistants/client-pangoro/src/types/account.rs index 2b74f9b72..1db427db7 100644 --- a/frame/assistants/client-pangoro/src/types/account.rs +++ b/frame/assistants/client-pangoro/src/types/account.rs @@ -45,7 +45,8 @@ impl DarwiniaAccount { let account_id = AccountId::from(public); // real account, convert to account id - let real = real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real))); + let real = + real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real.as_ref()))); Ok(Self { account_id, @@ -79,4 +80,4 @@ impl DarwiniaAccount { &self.account_id } } -} \ No newline at end of file +} diff --git a/frame/assistants/client-pangoro/src/types/custom.rs b/frame/assistants/client-pangoro/src/types/custom.rs index 56f6876f7..7262980f5 100644 --- a/frame/assistants/client-pangoro/src/types/custom.rs +++ b/frame/assistants/client-pangoro/src/types/custom.rs @@ -14,4 +14,4 @@ pub type EcdsaMessage = [u8; 32]; // pub struct HeaderMMRRpc { // mmr_size: String, // proof: String, -// } \ No newline at end of file +// } diff --git a/frame/assistants/client-pangoro/src/types/mod.rs b/frame/assistants/client-pangoro/src/types/mod.rs index 6f2fd203e..686888039 100644 --- a/frame/assistants/client-pangoro/src/types/mod.rs +++ b/frame/assistants/client-pangoro/src/types/mod.rs @@ -1,5 +1,5 @@ // expose raw client runtime types -pub use crate::subxt_runtime::{api::runtime_types}; +pub use crate::subxt_runtime::api::runtime_types; pub use self::account::*; pub use self::custom::*; @@ -7,4 +7,4 @@ pub use self::patch::*; mod account; mod custom; -mod patch; \ No newline at end of file +mod patch; diff --git a/frame/assistants/client-pangoro/tests/common.rs b/frame/assistants/client-pangoro/tests/common.rs index aa9b8e417..5c9276aae 100644 --- a/frame/assistants/client-pangoro/tests/common.rs +++ b/frame/assistants/client-pangoro/tests/common.rs @@ -1,19 +1,14 @@ +#![allow(dead_code)] use client_pangoro::client::PangoroClient; use client_pangoro::component::PangoroClientComponent; use client_pangoro::config::ClientConfig; -use web3::transports::Http; -use web3::Web3; +use client_pangoro::error::ClientResult; -pub async fn client() -> color_eyre::Result { +pub async fn client() -> ClientResult { let config = ClientConfig { - endpoint: "wss://pangoro-rpc.darwinia.network:443".to_string(), + endpoint: "wss://pangoro-rpc.darwinia.network".to_string(), relayer_private_key: "//Alice".to_string(), relayer_real_account: None, }; PangoroClientComponent::component(config).await } - -pub fn web3_client() -> color_eyre::Result> { - let transport = web3::transports::Http::new("https://data-seed-prebsc-2-s3.binance.org:8545/")?; - Ok(web3::Web3::new(transport)) -} diff --git a/frame/assistants/client-pangoro/tests/test_component.rs b/frame/assistants/client-pangoro/tests/test_component.rs deleted file mode 100644 index edaf29204..000000000 --- a/frame/assistants/client-pangoro/tests/test_component.rs +++ /dev/null @@ -1,106 +0,0 @@ -use client_pangoro::client::PangoroClient; -use crate::subxt_runtime::api::runtime_types::bsc_primitives::BscHeader; -use crate::subxt_runtime::api::runtime_types::ethbloom::Bloom; -use crate::subxt_runtime::api::runtime_types::primitive_types::{H160, U256}; -use subxt::BasicError; -use web3::futures::TryFutureExt; -use web3::transports::Http; -use web3::types::{BlockId, BlockNumber, U64}; -use web3::Web3; - -mod common; - -pub async fn get_bsc_header( - client: &Web3, - block_number: u64, -) -> color_eyre::Result { - let block_number = BlockId::Number(BlockNumber::Number(U64::from(block_number))); - let block = client.eth().block(block_number).await.unwrap().unwrap(); - - Ok(BscHeader { - parent_hash: block.parent_hash, - uncle_hash: block.uncles_hash, - coinbase: H160(block.author.0), - state_root: block.state_root, - transactions_root: block.transactions_root, - receipts_root: block.receipts_root, - log_bloom: Bloom(block.logs_bloom.unwrap().0), - difficulty: U256(block.difficulty.0), - number: block.number.unwrap().as_u64(), - gas_limit: U256(block.gas_limit.0), - gas_used: U256(block.gas_used.0), - timestamp: block.timestamp.as_u64(), - extra_data: block.extra_data.0, - mix_digest: block.mix_hash.unwrap(), - nonce: block.nonce.unwrap().0.to_vec(), - }) -} - -pub async fn get_finalized_checkpoint(client: &PangoroClient) -> Result { - client - .runtime() - .storage() - .bsc() - .finalized_checkpoint(None) - .await -} - -#[tokio::test] -async fn test_get_finalized_authority_set() { - let client = common::client().await.unwrap(); - let result = client - .runtime() - .storage() - .bsc() - .finalized_authorities(None) - .await - .unwrap(); - println!("{:?}", result); -} - -#[tokio::test] -async fn test_get_finalized_checkpoint() { - let client = common::client().await.unwrap(); - let result = get_finalized_checkpoint(&client).await.unwrap(); - println!("{:?}", &result); -} - -#[tokio::test] -async fn test_send_finalized_checkpoint() { - let client = common::client().await.unwrap(); - let web3_client = common::web3_client().unwrap(); - let checkpoint = get_finalized_checkpoint(&client).await.unwrap(); - let mut bsc_headers: Vec = Vec::new(); - - let authorities = client - .runtime() - .storage() - .bsc() - .finalized_authorities(None) - .await - .unwrap(); - - for i in 0..(authorities.len() as u64 / 2 + 1) { - let header = get_bsc_header(&web3_client, checkpoint.number + 200 + i) - .await - .unwrap(); - println!("{:?}", header.number); - bsc_headers.push(header); - } - let events = client - .relay_finalized_epoch_header(bsc_headers) - .await - .unwrap(); - - // let runtime = client.runtime(); - // let progress = runtime - // .tx() - // .bsc() - // .relay_finalized_epoch_header(bsc_headers) - // .sign_and_submit_then_watch(client.account().signer()) - // .await - // .unwrap(); - // - // let events = progress.wait_for_finalized_success().await.unwrap(); - println!("{:?}", events); -} diff --git a/frame/assistants/client-rococo/Cargo.toml b/frame/assistants/client-rococo/Cargo.toml index a6f799e0b..a1c90a5a6 100644 --- a/frame/assistants/client-rococo/Cargo.toml +++ b/frame/assistants/client-rococo/Cargo.toml @@ -13,15 +13,41 @@ repository = "https://github.com/darwinia-network/bridger" version = "0.5.7" [dependencies] -array-bytes = "1.4" -thiserror = "1" -tracing = "0.1" +thiserror = "1" +tracing = "0.1" -serde = { version = "1", features = ["derive"] } +serde = { version = "1", features = ["derive"] } -codec = { package = "parity-scale-codec", version = "2" } -jsonrpsee = { version = "0.8.0", features = ["async-client", "client-ws-transport"] } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } +array-bytes = "2" +codec = { package = "parity-scale-codec", version = "2" } +subxt = { git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } +bp-rococo = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } -support-toolkit = { path = "../../../frame/supports/support-toolkit" } +## maybe common +async-trait = { optional = true, version = "0.1" } + +## substrate +sp-finality-grandpa = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-core = { optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } + +## s2s client +finality-grandpa = { optional = true, version = "0.14" } +bridge-s2s-traits = { optional = true, path = "../../../frame/traits/bridge-s2s", features = ["advanced-types"] } + +support-toolkit = { path = "../../../frame/supports/support-toolkit", features = ["convert"] } + +[features] +default = [] +substrate = [ + "sp-finality-grandpa", + "sp-runtime", + "sp-core", +] +bridge-s2s = [ + "substrate", + "async-trait", + "finality-grandpa", + "bridge-s2s-traits", +] +bridge-s2s-pangolin = ["bridge-s2s", "bridge-s2s-traits/bridge-parachain"] diff --git a/frame/assistants/client-rococo/src/client.rs b/frame/assistants/client-rococo/src/client.rs index 925b00c5e..40198f75a 100644 --- a/frame/assistants/client-rococo/src/client.rs +++ b/frame/assistants/client-rococo/src/client.rs @@ -1,9 +1,7 @@ -use crate::error::ClientResult; -use crate::subxt_runtime::api::RuntimeApi; use subxt::Client; -use subxt::rpc::{Subscription, SubscriptionClientT}; use crate::config::RococoSubxtConfig; +use crate::subxt_runtime::api::RuntimeApi; use crate::types::{NodeRuntimeSignedExtra, RococoAccount}; /// Rococo client @@ -41,16 +39,3 @@ impl RococoClient { self.client.clone().to_runtime_api() } } - -impl RococoClient { - - pub async fn subscribe_grandpa_justifications(&self) -> ClientResult> { - let sub = self.client.rpc().client.subscribe( - "grandpa_subscribeJustifications", - None, - "grandpa_unsubscribeJustifications", - ).await?; - Ok(sub) - } - -} \ No newline at end of file diff --git a/frame/assistants/client-rococo/src/config.rs b/frame/assistants/client-rococo/src/config.rs index 8129361ad..87351cfc2 100644 --- a/frame/assistants/client-rococo/src/config.rs +++ b/frame/assistants/client-rococo/src/config.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use subxt::{sp_core, sp_runtime}; +use subxt::sp_runtime; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct ClientConfig { @@ -16,13 +16,13 @@ pub struct ClientConfig { pub enum RococoSubxtConfig {} impl subxt::Config for RococoSubxtConfig { - type Index = u32; - type BlockNumber = u32; - type Hash = sp_core::H256; - type Hashing = sp_runtime::traits::BlakeTwo256; - type AccountId = sp_runtime::AccountId32; - type Address = sp_runtime::MultiAddress; - type Header = sp_runtime::generic::Header; - type Signature = sp_runtime::MultiSignature; + type Index = bp_rococo::Nonce; + type BlockNumber = bp_rococo::BlockNumber; + type Hash = bp_rococo::Hash; + type Hashing = bp_rococo::Hashing; + type AccountId = bp_rococo::AccountId; + type Address = bp_rococo::Address; + type Header = bp_rococo::Header; + type Signature = bp_rococo::Signature; type Extrinsic = sp_runtime::OpaqueExtrinsic; } diff --git a/frame/assistants/client-rococo/src/error.rs b/frame/assistants/client-rococo/src/error.rs index 3ceb37a31..056f5fa72 100644 --- a/frame/assistants/client-rococo/src/error.rs +++ b/frame/assistants/client-rococo/src/error.rs @@ -2,7 +2,6 @@ use support_toolkit::error::TkError; use thiserror::Error as ThisError; -use jsonrpsee::core::error::Error as RpcError; pub type ClientResult = Result; @@ -12,20 +11,20 @@ pub enum ClientError { #[error(transparent)] SubxtBasicError(subxt::BasicError), - #[error(transparent)] - RpcBasicError(RpcError), - #[error("Please reconnect to rpc server")] ClientRestartNeed, #[error("Wrong seed: {0}")] Seed(String), + #[error("Bytes error: {0}")] + Bytes(String), + #[error(transparent)] Tk(#[from] TkError), - #[error("Other error: {0}")] - Other(String), + #[error("Custom: {0}")] + Custom(String), } impl ClientError { @@ -44,12 +43,25 @@ impl From for ClientError { } } +impl From for ClientError { + fn from(error: subxt::rpc::RpcError) -> Self { + Self::SubxtBasicError(subxt::BasicError::Rpc(error)) + } +} -impl From for ClientError { - fn from(error: RpcError) -> Self { - if let RpcError::RestartNeeded(_) = &error { - return Self::ClientRestartNeed; +impl From for ClientError { + fn from(error: array_bytes::Error) -> Self { + Self::Bytes(format!("{:?}", error)) + } +} + +#[cfg(feature = "bridge-s2s")] +impl From for bridge_s2s_traits::error::S2SClientError { + fn from(error: ClientError) -> Self { + match error { + ClientError::SubxtBasicError(e) => Self::RPC(format!("{:?}", e)), + ClientError::ClientRestartNeed => Self::RPC(format!("Client restart need")), + _ => Self::Custom(format!("{:?}", error)), } - Self::RpcBasicError(error) } } diff --git a/frame/assistants/client-rococo/src/fastapi/bridge_s2s/bridge_pangolin.rs b/frame/assistants/client-rococo/src/fastapi/bridge_s2s/bridge_pangolin.rs new file mode 100644 index 000000000..9d325b56e --- /dev/null +++ b/frame/assistants/client-rococo/src/fastapi/bridge_s2s/bridge_pangolin.rs @@ -0,0 +1,36 @@ +use bridge_s2s_traits::client::S2SParaBridgeClientRelaychain; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::types::bp_runtime::Chain; +use bridge_s2s_traits::types::{HeadData, ParaId}; +use sp_core::storage::StorageKey; +use subxt::storage::StorageKeyPrefix; +use subxt::StorageEntry; +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::RococoClient; +use crate::subxt_runtime::api::paras::storage::Heads; +use crate::types::runtime_types::polkadot_parachain; + +#[async_trait::async_trait] +impl S2SParaBridgeClientRelaychain for RococoClient { + fn gen_parachain_head_storage_key(&self, para_id: u32) -> StorageKey { + Heads(polkadot_parachain::primitives::Id(para_id)) + .key() + .final_key(StorageKeyPrefix::new::()) + } + + async fn para_head_data( + &self, + para_id: ParaId, + hash: Option<::Hash>, + ) -> S2SClientResult> { + let expected_para_id = SmartCodecMapper::map_to(¶_id)?; + Ok(self + .runtime() + .storage() + .paras() + .heads(expected_para_id, hash) + .await? + .map(|v| HeadData(v.0))) + } +} diff --git a/frame/assistants/client-rococo/src/fastapi/bridge_s2s/generic.rs b/frame/assistants/client-rococo/src/fastapi/bridge_s2s/generic.rs new file mode 100644 index 000000000..94d101c9f --- /dev/null +++ b/frame/assistants/client-rococo/src/fastapi/bridge_s2s/generic.rs @@ -0,0 +1,80 @@ +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::{ + client::{S2SClientBase, S2SClientGeneric}, + types::bp_runtime::Chain, +}; +use sp_runtime::generic::{Block, SignedBlock}; +use subxt::rpc::{Subscription, SubscriptionClientT}; +use subxt::{sp_core, sp_runtime}; + +use support_toolkit::convert::SmartCodecMapper; + +use crate::client::RococoClient; +use crate::types::runtime_types::bp_header_chain::InitializationData; + +type BundleHeader = crate::types::runtime_types::sp_runtime::generic::header::Header< + u32, + crate::types::runtime_types::sp_runtime::traits::BlakeTwo256, +>; + +impl S2SClientBase for RococoClient { + const CHAIN: &'static str = "rococo"; + + type Chain = bp_rococo::Rococo; + type Extrinsic = sp_runtime::OpaqueExtrinsic; +} + +#[async_trait::async_trait] +impl S2SClientGeneric for RococoClient { + type InitializationData = InitializationData; + + async fn subscribe_grandpa_justifications( + &self, + ) -> S2SClientResult> { + Ok(self + .subxt() + .rpc() + .client + .subscribe( + "grandpa_subscribeJustifications", + None, + "grandpa_unsubscribeJustifications", + ) + .await?) + } + + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>> { + match self.subxt().rpc().header(hash).await? { + Some(v) => Ok(Some(SmartCodecMapper::map_to(&v)?)), + None => Ok(None), + } + } + + async fn block( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>> + { + Ok(self.subxt().rpc().block(hash).await?) + } + + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>> { + let read_proof = self.subxt().rpc().read_proof(storage_keys, hash).await?; + let proof: Vec> = read_proof.proof.into_iter().map(|item| item.0).collect(); + Ok(proof) + } + + async fn prepare_initialization_data(&self) -> S2SClientResult { + Err(S2SClientError::Custom(format!( + "[{}] not needed prepare_initialization_data", + ::CHAIN + ))) + } +} diff --git a/frame/assistants/client-rococo/src/fastapi/bridge_s2s/mod.rs b/frame/assistants/client-rococo/src/fastapi/bridge_s2s/mod.rs new file mode 100644 index 000000000..efa0d5f32 --- /dev/null +++ b/frame/assistants/client-rococo/src/fastapi/bridge_s2s/mod.rs @@ -0,0 +1,3 @@ +#[cfg(feature = "bridge-s2s-pangolin")] +mod bridge_pangolin; +mod generic; diff --git a/frame/assistants/client-rococo/src/fastapi/mod.rs b/frame/assistants/client-rococo/src/fastapi/mod.rs new file mode 100644 index 000000000..c065eca5b --- /dev/null +++ b/frame/assistants/client-rococo/src/fastapi/mod.rs @@ -0,0 +1,2 @@ +#[cfg(feature = "bridge-s2s")] +mod bridge_s2s; diff --git a/frame/assistants/client-rococo/src/lib.rs b/frame/assistants/client-rococo/src/lib.rs index c92ee065a..487233c37 100644 --- a/frame/assistants/client-rococo/src/lib.rs +++ b/frame/assistants/client-rococo/src/lib.rs @@ -3,4 +3,6 @@ pub mod component; pub mod config; pub mod error; pub mod types; -pub mod subxt_runtime; + +mod fastapi; +mod subxt_runtime; diff --git a/frame/assistants/client-rococo/src/subxt_runtime/runtime.rs b/frame/assistants/client-rococo/src/subxt_runtime/runtime.rs index f46cb8bb2..edcb5f730 100644 --- a/frame/assistants/client-rococo/src/subxt_runtime/runtime.rs +++ b/frame/assistants/client-rococo/src/subxt_runtime/runtime.rs @@ -678,14 +678,14 @@ pub mod api { > { Ok(::subxt::codec::Decode::decode( &mut &[ - 0u8, 242u8, 5u8, 42u8, 1u8, 0u8, 0u8, 0u8, 0u8, 32u8, 74u8, 169u8, - 209u8, 1u8, 0u8, 0u8, 64u8, 89u8, 115u8, 7u8, 0u8, 0u8, 0u8, 0u8, 1u8, - 192u8, 118u8, 108u8, 143u8, 88u8, 1u8, 0u8, 0u8, 1u8, 0u8, 152u8, - 247u8, 62u8, 93u8, 1u8, 0u8, 0u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 64u8, 89u8, 115u8, 7u8, 0u8, 0u8, 0u8, 0u8, 1u8, 192u8, - 254u8, 190u8, 249u8, 204u8, 1u8, 0u8, 0u8, 1u8, 0u8, 32u8, 74u8, 169u8, - 209u8, 1u8, 0u8, 0u8, 1u8, 0u8, 136u8, 82u8, 106u8, 116u8, 0u8, 0u8, - 0u8, 64u8, 89u8, 115u8, 7u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 16u8, 80u8, 69u8, 220u8, 0u8, 0u8, 0u8, 0u8, 0u8, 32u8, 74u8, 169u8, + 209u8, 1u8, 0u8, 0u8, 72u8, 74u8, 170u8, 4u8, 0u8, 0u8, 0u8, 0u8, 1u8, + 184u8, 133u8, 53u8, 146u8, 88u8, 1u8, 0u8, 0u8, 1u8, 0u8, 152u8, 247u8, + 62u8, 93u8, 1u8, 0u8, 0u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 72u8, 74u8, 170u8, 4u8, 0u8, 0u8, 0u8, 0u8, 1u8, 184u8, 13u8, 136u8, + 252u8, 204u8, 1u8, 0u8, 0u8, 1u8, 0u8, 32u8, 74u8, 169u8, 209u8, 1u8, + 0u8, 0u8, 1u8, 0u8, 136u8, 82u8, 106u8, 116u8, 0u8, 0u8, 0u8, 72u8, + 74u8, 170u8, 4u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, ][..], )?) } @@ -732,11 +732,11 @@ pub mod api { &mut &[ 24u8, 114u8, 111u8, 99u8, 111u8, 99u8, 111u8, 72u8, 112u8, 97u8, 114u8, 105u8, 116u8, 121u8, 45u8, 114u8, 111u8, 99u8, 111u8, 99u8, 111u8, - 45u8, 118u8, 50u8, 46u8, 48u8, 0u8, 0u8, 0u8, 0u8, 220u8, 35u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, 80u8, 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, + 45u8, 118u8, 50u8, 46u8, 48u8, 0u8, 0u8, 0u8, 0u8, 14u8, 36u8, 0u8, + 0u8, 0u8, 0u8, 0u8, 0u8, 72u8, 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, 96u8, 155u8, 4u8, 0u8, 0u8, 0u8, 55u8, 227u8, 151u8, 252u8, 124u8, 145u8, 245u8, 228u8, 1u8, 0u8, 0u8, 0u8, 64u8, 254u8, 58u8, 212u8, 1u8, - 248u8, 149u8, 154u8, 5u8, 0u8, 0u8, 0u8, 210u8, 188u8, 152u8, 151u8, + 248u8, 149u8, 154u8, 6u8, 0u8, 0u8, 0u8, 210u8, 188u8, 152u8, 151u8, 238u8, 208u8, 143u8, 21u8, 3u8, 0u8, 0u8, 0u8, 247u8, 139u8, 39u8, 139u8, 229u8, 63u8, 69u8, 76u8, 2u8, 0u8, 0u8, 0u8, 175u8, 44u8, 2u8, 151u8, 162u8, 62u8, 109u8, 61u8, 2u8, 0u8, 0u8, 0u8, 237u8, 153u8, @@ -749,12 +749,10 @@ pub mod api { 0u8, 0u8, 209u8, 250u8, 76u8, 185u8, 116u8, 16u8, 9u8, 23u8, 1u8, 0u8, 0u8, 0u8, 229u8, 189u8, 199u8, 82u8, 184u8, 236u8, 43u8, 161u8, 1u8, 0u8, 0u8, 0u8, 145u8, 163u8, 198u8, 146u8, 47u8, 208u8, 166u8, 8u8, - 1u8, 0u8, 0u8, 0u8, 49u8, 40u8, 151u8, 200u8, 97u8, 161u8, 219u8, - 206u8, 1u8, 0u8, 0u8, 0u8, 182u8, 151u8, 130u8, 196u8, 73u8, 148u8, - 98u8, 229u8, 1u8, 0u8, 0u8, 0u8, 134u8, 80u8, 31u8, 141u8, 250u8, - 128u8, 92u8, 111u8, 1u8, 0u8, 0u8, 0u8, 188u8, 157u8, 137u8, 144u8, - 79u8, 91u8, 146u8, 63u8, 1u8, 0u8, 0u8, 0u8, 55u8, 200u8, 187u8, 19u8, - 80u8, 169u8, 162u8, 168u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, + 1u8, 0u8, 0u8, 0u8, 182u8, 151u8, 130u8, 196u8, 73u8, 148u8, 98u8, + 229u8, 1u8, 0u8, 0u8, 0u8, 188u8, 157u8, 137u8, 144u8, 79u8, 91u8, + 146u8, 63u8, 1u8, 0u8, 0u8, 0u8, 55u8, 200u8, 187u8, 19u8, 80u8, 169u8, + 162u8, 168u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, ][..], )?) } @@ -991,7 +989,8 @@ pub mod api { impl ::subxt::StorageEntry for Initialized { const PALLET: &'static str = "Babe"; const STORAGE: &'static str = "Initialized"; - type Value = ::core::option::Option<[::core::primitive::u8; 32usize]>; + type Value = + ::core::option::Option; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -1165,7 +1164,9 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - ::core::option::Option<[::core::primitive::u8; 32usize]>, + ::core::option::Option< + runtime_types::sp_consensus_babe::digests::PreDigest, + >, >, ::subxt::BasicError, > { @@ -2103,40 +2104,12 @@ pub mod api { use super::runtime_types; pub struct ConstantsApi; impl ConstantsApi { - pub fn transaction_byte_fee( - &self, - ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> - { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 225u8, 245u8, 5u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, - ][..], - )?) - } pub fn operational_fee_multiplier( &self, ) -> ::core::result::Result<::core::primitive::u8, ::subxt::BasicError> { Ok(::subxt::codec::Decode::decode(&mut &[5u8][..])?) } - pub fn weight_to_fee( - &self, - ) -> ::core::result::Result< - ::std::vec::Vec< - runtime_types::frame_support::weights::WeightToFeeCoefficient< - ::core::primitive::u128, - >, - >, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 4u8, 8u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 1u8, - ][..], - )?) - } } } } @@ -4496,18 +4469,6 @@ pub mod api { ::subxt::StorageEntryKey::Plain } } - pub struct PendingConfig(pub ::core::primitive::u32); - impl ::subxt::StorageEntry for PendingConfig { - const PALLET: &'static str = "Configuration"; - const STORAGE: &'static str = "PendingConfig"; - type Value = runtime_types :: polkadot_runtime_parachains :: configuration :: migration :: v1 :: HostConfiguration < :: core :: primitive :: u32 > ; - fn key(&self) -> ::subxt::StorageEntryKey { - ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( - &self.0, - ::subxt::StorageHasher::Twox64Concat, - )]) - } - } pub struct PendingConfigs; impl ::subxt::StorageEntry for PendingConfigs { const PALLET: &'static str = "Configuration"; @@ -4549,18 +4510,6 @@ pub mod api { > { let entry = ActiveConfig; self.client.storage().fetch_or_default(&entry, hash).await - } pub async fn pending_config (& self , _0 : :: core :: primitive :: u32 , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: configuration :: migration :: v1 :: HostConfiguration < :: core :: primitive :: u32 > > , :: subxt :: BasicError >{ - let entry = PendingConfig(_0); - self.client.storage().fetch(&entry, hash).await - } - pub async fn pending_config_iter( - &self, - hash: ::core::option::Option, - ) -> ::core::result::Result< - ::subxt::KeyIter<'a, T, PendingConfig>, - ::subxt::BasicError, - > { - self.client.storage().iter(hash).await } pub async fn pending_configs (& self , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: std :: vec :: Vec < (:: core :: primitive :: u32 , runtime_types :: polkadot_runtime_parachains :: configuration :: HostConfiguration < :: core :: primitive :: u32 > ,) > , :: subxt :: BasicError >{ let entry = PendingConfigs; self.client.storage().fetch_or_default(&entry, hash).await @@ -4615,7 +4564,7 @@ pub mod api { const PALLET: &'static str = "ParasShared"; const STORAGE: &'static str = "ActiveValidatorIndices"; type Value = - ::std::vec::Vec; + ::std::vec::Vec; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -4625,7 +4574,7 @@ pub mod api { const PALLET: &'static str = "ParasShared"; const STORAGE: &'static str = "ActiveValidatorKeys"; type Value = - ::std::vec::Vec; + ::std::vec::Vec; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -4649,7 +4598,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::std::vec::Vec, + ::std::vec::Vec, ::subxt::BasicError, > { let entry = ActiveValidatorIndices; @@ -4659,7 +4608,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::std::vec::Vec, + ::std::vec::Vec, ::subxt::BasicError, > { let entry = ActiveValidatorKeys; @@ -4696,10 +4645,10 @@ pub mod api { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct CandidateBacked( - pub runtime_types::polkadot_primitives::v1::CandidateReceipt<::subxt::sp_core::H256>, + pub runtime_types::polkadot_primitives::v2::CandidateReceipt<::subxt::sp_core::H256>, pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v1::CoreIndex, - pub runtime_types::polkadot_primitives::v1::GroupIndex, + pub runtime_types::polkadot_primitives::v2::CoreIndex, + pub runtime_types::polkadot_primitives::v2::GroupIndex, ); impl ::subxt::Event for CandidateBacked { const PALLET: &'static str = "ParaInclusion"; @@ -4707,10 +4656,10 @@ pub mod api { } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct CandidateIncluded( - pub runtime_types::polkadot_primitives::v1::CandidateReceipt<::subxt::sp_core::H256>, + pub runtime_types::polkadot_primitives::v2::CandidateReceipt<::subxt::sp_core::H256>, pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v1::CoreIndex, - pub runtime_types::polkadot_primitives::v1::GroupIndex, + pub runtime_types::polkadot_primitives::v2::CoreIndex, + pub runtime_types::polkadot_primitives::v2::GroupIndex, ); impl ::subxt::Event for CandidateIncluded { const PALLET: &'static str = "ParaInclusion"; @@ -4718,9 +4667,9 @@ pub mod api { } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct CandidateTimedOut( - pub runtime_types::polkadot_primitives::v1::CandidateReceipt<::subxt::sp_core::H256>, + pub runtime_types::polkadot_primitives::v2::CandidateReceipt<::subxt::sp_core::H256>, pub runtime_types::polkadot_parachain::primitives::HeadData, - pub runtime_types::polkadot_primitives::v1::CoreIndex, + pub runtime_types::polkadot_primitives::v2::CoreIndex, ); impl ::subxt::Event for CandidateTimedOut { const PALLET: &'static str = "ParaInclusion"; @@ -4730,7 +4679,7 @@ pub mod api { pub mod storage { use super::runtime_types; pub struct AvailabilityBitfields( - pub runtime_types::polkadot_primitives::v0::ValidatorIndex, + pub runtime_types::polkadot_primitives::v2::ValidatorIndex, ); impl ::subxt::StorageEntry for AvailabilityBitfields { const PALLET: &'static str = "ParaInclusion"; @@ -4761,7 +4710,7 @@ pub mod api { impl ::subxt::StorageEntry for PendingAvailabilityCommitments { const PALLET: &'static str = "ParaInclusion"; const STORAGE: &'static str = "PendingAvailabilityCommitments"; - type Value = runtime_types::polkadot_primitives::v1::CandidateCommitments< + type Value = runtime_types::polkadot_primitives::v2::CandidateCommitments< ::core::primitive::u32, >; fn key(&self) -> ::subxt::StorageEntryKey { @@ -4777,7 +4726,7 @@ pub mod api { impl<'a, T: ::subxt::Config> StorageApi<'a, T> { pub fn new(client: &'a ::subxt::Client) -> Self { Self { client } - } pub async fn availability_bitfields (& self , _0 : runtime_types :: polkadot_primitives :: v0 :: ValidatorIndex , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: BasicError >{ + } pub async fn availability_bitfields (& self , _0 : runtime_types :: polkadot_primitives :: v2 :: ValidatorIndex , hash : :: core :: option :: Option < T :: Hash > ,) -> :: core :: result :: Result < :: core :: option :: Option < runtime_types :: polkadot_runtime_parachains :: inclusion :: AvailabilityBitfieldRecord < :: core :: primitive :: u32 > > , :: subxt :: BasicError >{ let entry = AvailabilityBitfields(_0); self.client.storage().fetch(&entry, hash).await } @@ -4808,7 +4757,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v1::CandidateCommitments< + runtime_types::polkadot_primitives::v2::CandidateCommitments< ::core::primitive::u32, >, >, @@ -4836,7 +4785,7 @@ pub mod api { type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct enter { - pub data: runtime_types::polkadot_primitives::v1::InherentData< + pub data: runtime_types::polkadot_primitives::v2::InherentData< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, runtime_types::sp_runtime::traits::BlakeTwo256, @@ -4865,7 +4814,7 @@ pub mod api { } pub fn enter( &self, - data: runtime_types::polkadot_primitives::v1::InherentData< + data: runtime_types::polkadot_primitives::v2::InherentData< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, runtime_types::sp_runtime::traits::BlakeTwo256, @@ -4893,7 +4842,7 @@ pub mod api { impl ::subxt::StorageEntry for OnChainVotes { const PALLET: &'static str = "ParaInherent"; const STORAGE: &'static str = "OnChainVotes"; - type Value = runtime_types::polkadot_primitives::v1::ScrapedOnChainVotes< + type Value = runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< ::subxt::sp_core::H256, >; fn key(&self) -> ::subxt::StorageEntryKey { @@ -4920,7 +4869,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v1::ScrapedOnChainVotes< + runtime_types::polkadot_primitives::v2::ScrapedOnChainVotes< ::subxt::sp_core::H256, >, >, @@ -4941,7 +4890,7 @@ pub mod api { const PALLET: &'static str = "ParaScheduler"; const STORAGE: &'static str = "ValidatorGroups"; type Value = ::std::vec::Vec< - ::std::vec::Vec, + ::std::vec::Vec, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain @@ -4962,7 +4911,7 @@ pub mod api { const PALLET: &'static str = "ParaScheduler"; const STORAGE: &'static str = "AvailabilityCores"; type Value = ::std::vec::Vec< - ::core::option::Option, + ::core::option::Option, >; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain @@ -5009,7 +4958,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::std::vec::Vec< - ::std::vec::Vec, + ::std::vec::Vec, >, ::subxt::BasicError, > { @@ -5032,7 +4981,7 @@ pub mod api { ) -> ::core::result::Result< ::std::vec::Vec< ::core::option::Option< - runtime_types::polkadot_primitives::v1::CoreOccupied, + runtime_types::polkadot_primitives::v2::CoreOccupied, >, >, ::subxt::BasicError, @@ -5143,7 +5092,7 @@ pub mod api { #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct include_pvf_check_statement { pub stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, - pub signature: runtime_types::polkadot_primitives::v0::validator_app::Signature, + pub signature: runtime_types::polkadot_primitives::v2::validator_app::Signature, } impl ::subxt::Call for include_pvf_check_statement { const PALLET: &'static str = "Paras"; @@ -5253,7 +5202,7 @@ pub mod api { pub fn include_pvf_check_statement( &self, stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, - signature: runtime_types::polkadot_primitives::v0::validator_app::Signature, + signature: runtime_types::polkadot_primitives::v2::validator_app::Signature, ) -> ::subxt::SubmittableExtrinsic< 'a, T, @@ -5475,7 +5424,7 @@ pub mod api { impl ::subxt::StorageEntry for UpgradeGoAheadSignal { const PALLET: &'static str = "Paras"; const STORAGE: &'static str = "UpgradeGoAheadSignal"; - type Value = runtime_types::polkadot_primitives::v1::UpgradeGoAhead; + type Value = runtime_types::polkadot_primitives::v2::UpgradeGoAhead; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( &self.0, @@ -5489,7 +5438,7 @@ pub mod api { impl ::subxt::StorageEntry for UpgradeRestrictionSignal { const PALLET: &'static str = "Paras"; const STORAGE: &'static str = "UpgradeRestrictionSignal"; - type Value = runtime_types::polkadot_primitives::v1::UpgradeRestriction; + type Value = runtime_types::polkadot_primitives::v2::UpgradeRestriction; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( &self.0, @@ -5793,7 +5742,7 @@ pub mod api { _0: runtime_types::polkadot_parachain::primitives::Id, hash: ::core::option::Option, ) -> ::core::result::Result< - ::core::option::Option, + ::core::option::Option, ::subxt::BasicError, > { let entry = UpgradeGoAheadSignal(_0); @@ -5814,7 +5763,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v1::UpgradeRestriction, + runtime_types::polkadot_primitives::v2::UpgradeRestriction, >, ::subxt::BasicError, > { @@ -7067,7 +7016,7 @@ pub mod api { const PALLET: &'static str = "ParaSessionInfo"; const STORAGE: &'static str = "AssignmentKeysUnsafe"; type Value = - ::std::vec::Vec; + ::std::vec::Vec; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Plain } @@ -7093,6 +7042,18 @@ pub mod api { )]) } } + pub struct AccountKeys(pub ::core::primitive::u32); + impl ::subxt::StorageEntry for AccountKeys { + const PALLET: &'static str = "ParaSessionInfo"; + const STORAGE: &'static str = "AccountKeys"; + type Value = ::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>; + fn key(&self) -> ::subxt::StorageEntryKey { + ::subxt::StorageEntryKey::Map(vec![::subxt::StorageMapKey::new( + &self.0, + ::subxt::StorageHasher::Identity, + )]) + } + } pub struct StorageApi<'a, T: ::subxt::Config> { client: &'a ::subxt::Client, } @@ -7104,7 +7065,7 @@ pub mod api { &self, hash: ::core::option::Option, ) -> ::core::result::Result< - ::std::vec::Vec, + ::std::vec::Vec, ::subxt::BasicError, > { let entry = AssignmentKeysUnsafe; @@ -7136,6 +7097,24 @@ pub mod api { { self.client.storage().iter(hash).await } + pub async fn account_keys( + &self, + _0: ::core::primitive::u32, + hash: ::core::option::Option, + ) -> ::core::result::Result< + ::core::option::Option<::std::vec::Vec<::subxt::sp_core::crypto::AccountId32>>, + ::subxt::BasicError, + > { + let entry = AccountKeys(_0); + self.client.storage().fetch(&entry, hash).await + } + pub async fn account_keys_iter( + &self, + hash: ::core::option::Option, + ) -> ::core::result::Result<::subxt::KeyIter<'a, T, AccountKeys>, ::subxt::BasicError> + { + self.client.storage().iter(hash).await + } } } } @@ -7234,7 +7213,7 @@ pub mod api { const PALLET: &'static str = "ParasDisputes"; const STORAGE: &'static str = "Disputes"; type Value = - runtime_types::polkadot_primitives::v1::DisputeState<::core::primitive::u32>; + runtime_types::polkadot_primitives::v2::DisputeState<::core::primitive::u32>; fn key(&self) -> ::subxt::StorageEntryKey { ::subxt::StorageEntryKey::Map(vec![ ::subxt::StorageMapKey::new(&self.0, ::subxt::StorageHasher::Twox64Concat), @@ -7308,7 +7287,7 @@ pub mod api { hash: ::core::option::Option, ) -> ::core::result::Result< ::core::option::Option< - runtime_types::polkadot_primitives::v1::DisputeState< + runtime_types::polkadot_primitives::v2::DisputeState< ::core::primitive::u32, >, >, @@ -7518,25 +7497,27 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Registered( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::subxt::sp_core::crypto::AccountId32, - ); + pub struct Registered { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub manager: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for Registered { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Registered"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Deregistered(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct Deregistered { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for Deregistered { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Deregistered"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Reserved( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::subxt::sp_core::crypto::AccountId32, - ); + pub struct Reserved { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub who: ::subxt::sp_core::crypto::AccountId32, + } impl ::subxt::Event for Reserved { const PALLET: &'static str = "Registrar"; const EVENT: &'static str = "Reserved"; @@ -7767,11 +7748,11 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AuctionStarted( - pub ::core::primitive::u32, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + pub struct AuctionStarted { + pub auction_index: ::core::primitive::u32, + pub lease_period: ::core::primitive::u32, + pub ending: ::core::primitive::u32, + } impl ::subxt::Event for AuctionStarted { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionStarted"; @@ -7783,54 +7764,59 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct AuctionClosed(pub ::core::primitive::u32); + pub struct AuctionClosed { + pub auction_index: ::core::primitive::u32, + } impl ::subxt::Event for AuctionClosed { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "AuctionClosed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Reserved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - pub ::core::primitive::u128, - ); + pub struct Reserved { + pub bidder: ::subxt::sp_core::crypto::AccountId32, + pub extra_reserved: ::core::primitive::u128, + pub total_amount: ::core::primitive::u128, + } impl ::subxt::Event for Reserved { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "Reserved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Unreserved( - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + pub struct Unreserved { + pub bidder: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Unreserved { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "Unreserved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ReserveConfiscated( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u128, - ); + pub struct ReserveConfiscated { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub leaser: ::subxt::sp_core::crypto::AccountId32, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for ReserveConfiscated { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "ReserveConfiscated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct BidAccepted( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u128, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + pub struct BidAccepted { + pub bidder: ::subxt::sp_core::crypto::AccountId32, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, + pub first_slot: ::core::primitive::u32, + pub last_slot: ::core::primitive::u32, + } impl ::subxt::Event for BidAccepted { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "BidAccepted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct WinningOffset(pub ::core::primitive::u32, pub ::core::primitive::u32); + pub struct WinningOffset { + pub auction_index: ::core::primitive::u32, + pub block_number: ::core::primitive::u32, + } impl ::subxt::Event for WinningOffset { const PALLET: &'static str = "Auctions"; const EVENT: &'static str = "WinningOffset"; @@ -8233,76 +8219,88 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Created(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct Created { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for Created { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Created"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Contributed( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u128, - ); + pub struct Contributed { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub fund_index: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Contributed { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Contributed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Withdrew( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::primitive::u128, - ); + pub struct Withdrew { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub fund_index: runtime_types::polkadot_parachain::primitives::Id, + pub amount: ::core::primitive::u128, + } impl ::subxt::Event for Withdrew { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Withdrew"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct PartiallyRefunded(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct PartiallyRefunded { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for PartiallyRefunded { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "PartiallyRefunded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AllRefunded(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct AllRefunded { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for AllRefunded { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "AllRefunded"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Dissolved(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct Dissolved { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for Dissolved { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Dissolved"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct HandleBidResult( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + pub struct HandleBidResult { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for HandleBidResult { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "HandleBidResult"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Edited(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct Edited { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for Edited { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "Edited"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MemoUpdated( - pub ::subxt::sp_core::crypto::AccountId32, - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::std::vec::Vec<::core::primitive::u8>, - ); + pub struct MemoUpdated { + pub who: ::subxt::sp_core::crypto::AccountId32, + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub memo: ::std::vec::Vec<::core::primitive::u8>, + } impl ::subxt::Event for MemoUpdated { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "MemoUpdated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct AddedToNewRaise(pub runtime_types::polkadot_parachain::primitives::Id); + pub struct AddedToNewRaise { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + } impl ::subxt::Event for AddedToNewRaise { const PALLET: &'static str = "Crowdloan"; const EVENT: &'static str = "AddedToNewRaise"; @@ -8545,20 +8543,22 @@ pub mod api { Clone, :: subxt :: codec :: CompactAs, )] - pub struct NewLeasePeriod(pub ::core::primitive::u32); + pub struct NewLeasePeriod { + pub lease_period: ::core::primitive::u32, + } impl ::subxt::Event for NewLeasePeriod { const PALLET: &'static str = "Slots"; const EVENT: &'static str = "NewLeasePeriod"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct Leased( - pub runtime_types::polkadot_parachain::primitives::Id, - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u32, - pub ::core::primitive::u32, - pub ::core::primitive::u128, - pub ::core::primitive::u128, - ); + pub struct Leased { + pub para_id: runtime_types::polkadot_parachain::primitives::Id, + pub leaser: ::subxt::sp_core::crypto::AccountId32, + pub period_begin: ::core::primitive::u32, + pub period_count: ::core::primitive::u32, + pub extra_reserved: ::core::primitive::u128, + pub total_amount: ::core::primitive::u128, + } impl ::subxt::Event for Leased { const PALLET: &'static str = "Slots"; const EVENT: &'static str = "Leased"; @@ -10465,25 +10465,27 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ParameterUpdated(pub ()); + pub struct ParameterUpdated { + pub parameter: (), + } impl ::subxt::Event for ParameterUpdated { const PALLET: &'static str = "BridgeRococoMessages"; const EVENT: &'static str = "ParameterUpdated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageAccepted( - pub [::core::primitive::u8; 4usize], - pub ::core::primitive::u64, - ); + pub struct MessageAccepted { + pub lane_id: [::core::primitive::u8; 4usize], + pub nonce: ::core::primitive::u64, + } impl ::subxt::Event for MessageAccepted { const PALLET: &'static str = "BridgeRococoMessages"; const EVENT: &'static str = "MessageAccepted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessagesDelivered( - pub [::core::primitive::u8; 4usize], - pub runtime_types::bp_messages::DeliveredMessages, - ); + pub struct MessagesDelivered { + pub lane_id: [::core::primitive::u8; 4usize], + pub messages: runtime_types::bp_messages::DeliveredMessages, + } impl ::subxt::Event for MessagesDelivered { const PALLET: &'static str = "BridgeRococoMessages"; const EVENT: &'static str = "MessagesDelivered"; @@ -10840,25 +10842,27 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct ParameterUpdated(pub ()); + pub struct ParameterUpdated { + pub parameter: (), + } impl ::subxt::Event for ParameterUpdated { const PALLET: &'static str = "BridgeWococoMessages"; const EVENT: &'static str = "ParameterUpdated"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageAccepted( - pub [::core::primitive::u8; 4usize], - pub ::core::primitive::u64, - ); + pub struct MessageAccepted { + pub lane_id: [::core::primitive::u8; 4usize], + pub nonce: ::core::primitive::u64, + } impl ::subxt::Event for MessageAccepted { const PALLET: &'static str = "BridgeWococoMessages"; const EVENT: &'static str = "MessageAccepted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessagesDelivered( - pub [::core::primitive::u8; 4usize], - pub runtime_types::bp_messages::DeliveredMessages, - ); + pub struct MessagesDelivered { + pub lane_id: [::core::primitive::u8; 4usize], + pub messages: runtime_types::bp_messages::DeliveredMessages, + } impl ::subxt::Event for MessagesDelivered { const PALLET: &'static str = "BridgeWococoMessages"; const EVENT: &'static str = "MessagesDelivered"; @@ -11036,80 +11040,80 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageRejected( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ); + pub struct MessageRejected { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + } impl ::subxt::Event for MessageRejected { const PALLET: &'static str = "BridgeRococoMessagesDispatch"; const EVENT: &'static str = "MessageRejected"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageVersionSpecMismatch( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + pub struct MessageVersionSpecMismatch { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub expected_version: ::core::primitive::u32, + pub passed_version: ::core::primitive::u32, + } impl ::subxt::Event for MessageVersionSpecMismatch { const PALLET: &'static str = "BridgeRococoMessagesDispatch"; const EVENT: &'static str = "MessageVersionSpecMismatch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageWeightMismatch( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - pub ::core::primitive::u64, - pub ::core::primitive::u64, - ); + pub struct MessageWeightMismatch { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub expected_weight: ::core::primitive::u64, + pub passed_weight: ::core::primitive::u64, + } impl ::subxt::Event for MessageWeightMismatch { const PALLET: &'static str = "BridgeRococoMessagesDispatch"; const EVENT: &'static str = "MessageWeightMismatch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageSignatureMismatch( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ); + pub struct MessageSignatureMismatch { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + } impl ::subxt::Event for MessageSignatureMismatch { const PALLET: &'static str = "BridgeRococoMessagesDispatch"; const EVENT: &'static str = "MessageSignatureMismatch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageCallDecodeFailed( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ); + pub struct MessageCallDecodeFailed { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + } impl ::subxt::Event for MessageCallDecodeFailed { const PALLET: &'static str = "BridgeRococoMessagesDispatch"; const EVENT: &'static str = "MessageCallDecodeFailed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageCallRejected( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ); + pub struct MessageCallRejected { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + } impl ::subxt::Event for MessageCallRejected { const PALLET: &'static str = "BridgeRococoMessagesDispatch"; const EVENT: &'static str = "MessageCallRejected"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageDispatchPaymentFailed( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u64, - ); + pub struct MessageDispatchPaymentFailed { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub origin_account: ::subxt::sp_core::crypto::AccountId32, + pub weight: ::core::primitive::u64, + } impl ::subxt::Event for MessageDispatchPaymentFailed { const PALLET: &'static str = "BridgeRococoMessagesDispatch"; const EVENT: &'static str = "MessageDispatchPaymentFailed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageDispatched( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + pub struct MessageDispatched { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for MessageDispatched { const PALLET: &'static str = "BridgeRococoMessagesDispatch"; const EVENT: &'static str = "MessageDispatched"; @@ -11128,80 +11132,80 @@ pub mod api { pub mod events { use super::runtime_types; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageRejected( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ); + pub struct MessageRejected { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + } impl ::subxt::Event for MessageRejected { const PALLET: &'static str = "BridgeWococoMessagesDispatch"; const EVENT: &'static str = "MessageRejected"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageVersionSpecMismatch( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - pub ::core::primitive::u32, - pub ::core::primitive::u32, - ); + pub struct MessageVersionSpecMismatch { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub expected_version: ::core::primitive::u32, + pub passed_version: ::core::primitive::u32, + } impl ::subxt::Event for MessageVersionSpecMismatch { const PALLET: &'static str = "BridgeWococoMessagesDispatch"; const EVENT: &'static str = "MessageVersionSpecMismatch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageWeightMismatch( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - pub ::core::primitive::u64, - pub ::core::primitive::u64, - ); + pub struct MessageWeightMismatch { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub expected_weight: ::core::primitive::u64, + pub passed_weight: ::core::primitive::u64, + } impl ::subxt::Event for MessageWeightMismatch { const PALLET: &'static str = "BridgeWococoMessagesDispatch"; const EVENT: &'static str = "MessageWeightMismatch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageSignatureMismatch( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ); + pub struct MessageSignatureMismatch { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + } impl ::subxt::Event for MessageSignatureMismatch { const PALLET: &'static str = "BridgeWococoMessagesDispatch"; const EVENT: &'static str = "MessageSignatureMismatch"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageCallDecodeFailed( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ); + pub struct MessageCallDecodeFailed { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + } impl ::subxt::Event for MessageCallDecodeFailed { const PALLET: &'static str = "BridgeWococoMessagesDispatch"; const EVENT: &'static str = "MessageCallDecodeFailed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageCallRejected( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ); + pub struct MessageCallRejected { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + } impl ::subxt::Event for MessageCallRejected { const PALLET: &'static str = "BridgeWococoMessagesDispatch"; const EVENT: &'static str = "MessageCallRejected"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageDispatchPaymentFailed( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - pub ::subxt::sp_core::crypto::AccountId32, - pub ::core::primitive::u64, - ); + pub struct MessageDispatchPaymentFailed { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub origin_account: ::subxt::sp_core::crypto::AccountId32, + pub weight: ::core::primitive::u64, + } impl ::subxt::Event for MessageDispatchPaymentFailed { const PALLET: &'static str = "BridgeWococoMessagesDispatch"; const EVENT: &'static str = "MessageDispatchPaymentFailed"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] - pub struct MessageDispatched( - pub [::core::primitive::u8; 4usize], - pub ([::core::primitive::u8; 4usize], ::core::primitive::u64), - pub ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ); + pub struct MessageDispatched { + pub source_chain: [::core::primitive::u8; 4usize], + pub id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + } impl ::subxt::Event for MessageDispatched { const PALLET: &'static str = "BridgeWococoMessagesDispatch"; const EVENT: &'static str = "MessageDispatched"; @@ -11872,6 +11876,14 @@ pub mod api { const PALLET: &'static str = "Utility"; const FUNCTION: &'static str = "dispatch_as"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct force_batch { + pub calls: ::std::vec::Vec, + } + impl ::subxt::Call for force_batch { + const PALLET: &'static str = "Utility"; + const FUNCTION: &'static str = "force_batch"; + } pub struct TransactionApi<'a, T: ::subxt::Config, X, A> { client: &'a ::subxt::Client, marker: ::core::marker::PhantomData<(X, A)>, @@ -11928,6 +11940,14 @@ pub mod api { }; ::subxt::SubmittableExtrinsic::new(self.client, call) } + pub fn force_batch( + &self, + calls: ::std::vec::Vec, + ) -> ::subxt::SubmittableExtrinsic<'a, T, X, A, force_batch, DispatchError> + { + let call = force_batch { calls }; + ::subxt::SubmittableExtrinsic::new(self.client, call) + } } } pub type Event = runtime_types::pallet_utility::pallet::Event; @@ -11949,12 +11969,26 @@ pub mod api { const EVENT: &'static str = "BatchCompleted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct BatchCompletedWithErrors; + impl ::subxt::Event for BatchCompletedWithErrors { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "BatchCompletedWithErrors"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct ItemCompleted; impl ::subxt::Event for ItemCompleted { const PALLET: &'static str = "Utility"; const EVENT: &'static str = "ItemCompleted"; } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct ItemFailed { + pub error: runtime_types::sp_runtime::DispatchError, + } + impl ::subxt::Event for ItemFailed { + const PALLET: &'static str = "Utility"; + const EVENT: &'static str = "ItemFailed"; + } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct DispatchedAs { pub result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, } @@ -12275,6 +12309,17 @@ pub mod api { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyAdded"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub struct ProxyRemoved { + pub delegator: ::subxt::sp_core::crypto::AccountId32, + pub delegatee: ::subxt::sp_core::crypto::AccountId32, + pub proxy_type: runtime_types::rococo_runtime::ProxyType, + pub delay: ::core::primitive::u32, + } + impl ::subxt::Event for ProxyRemoved { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyRemoved"; + } } pub mod storage { use super::runtime_types; @@ -13838,15 +13883,6 @@ pub mod api { pub read: ::core::primitive::u64, pub write: ::core::primitive::u64, } - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct WeightToFeeCoefficient<_0> { - pub coeff_integer: _0, - pub coeff_frac: runtime_types::sp_arithmetic::per_things::Perbill, - pub negative: ::core::primitive::bool, - pub degree: ::core::primitive::u8, - } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct PalletId(pub [::core::primitive::u8; 8usize]); @@ -14152,6 +14188,8 @@ pub mod api { InvalidKeyOwnershipProof, #[codec(index = 2)] DuplicateOffenceReport, + #[codec(index = 3)] + InvalidConfiguration, } } } @@ -14358,52 +14396,53 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - MessageRejected( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + MessageRejected { + source_chain: [::core::primitive::u8; 4usize], + id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + }, #[codec(index = 1)] - MessageVersionSpecMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::core::primitive::u32, - ::core::primitive::u32, - ), + MessageVersionSpecMismatch { + source_chain: [::core::primitive::u8; 4usize], + id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + expected_version: ::core::primitive::u32, + passed_version: ::core::primitive::u32, + }, #[codec(index = 2)] - MessageWeightMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::core::primitive::u64, - ::core::primitive::u64, - ), + MessageWeightMismatch { + source_chain: [::core::primitive::u8; 4usize], + id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + expected_weight: ::core::primitive::u64, + passed_weight: ::core::primitive::u64, + }, #[codec(index = 3)] - MessageSignatureMismatch( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + MessageSignatureMismatch { + source_chain: [::core::primitive::u8; 4usize], + id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + }, #[codec(index = 4)] - MessageCallDecodeFailed( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + MessageCallDecodeFailed { + source_chain: [::core::primitive::u8; 4usize], + id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + }, #[codec(index = 5)] - MessageCallRejected( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ), + MessageCallRejected { + source_chain: [::core::primitive::u8; 4usize], + id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + }, #[codec(index = 6)] - MessageDispatchPaymentFailed( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u64, - ), + MessageDispatchPaymentFailed { + source_chain: [::core::primitive::u8; 4usize], + id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + origin_account: ::subxt::sp_core::crypto::AccountId32, + weight: ::core::primitive::u64, + }, #[codec(index = 7)] - MessageDispatched( - [::core::primitive::u8; 4usize], - ([::core::primitive::u8; 4usize], ::core::primitive::u64), - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), + MessageDispatched { + source_chain: [::core::primitive::u8; 4usize], + id: ([::core::primitive::u8; 4usize], ::core::primitive::u64), + result: + ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, + }, #[codec(index = 8)] _Dummy, } @@ -14521,14 +14560,17 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - ParameterUpdated(()), + ParameterUpdated { parameter: () }, #[codec(index = 1)] - MessageAccepted([::core::primitive::u8; 4usize], ::core::primitive::u64), + MessageAccepted { + lane_id: [::core::primitive::u8; 4usize], + nonce: ::core::primitive::u64, + }, #[codec(index = 2)] - MessagesDelivered( - [::core::primitive::u8; 4usize], - runtime_types::bp_messages::DeliveredMessages, - ), + MessagesDelivered { + lane_id: [::core::primitive::u8; 4usize], + messages: runtime_types::bp_messages::DeliveredMessages, + }, } } } @@ -15227,6 +15269,13 @@ pub mod api { proxy_type: runtime_types::rococo_runtime::ProxyType, delay: ::core::primitive::u32, }, + #[codec(index = 4)] + ProxyRemoved { + delegator: ::subxt::sp_core::crypto::AccountId32, + delegatee: ::subxt::sp_core::crypto::AccountId32, + proxy_type: runtime_types::rococo_runtime::ProxyType, + delay: ::core::primitive::u32, + }, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] @@ -15399,6 +15448,10 @@ pub mod api { as_origin: ::std::boxed::Box, call: ::std::boxed::Box, }, + #[codec(index = 4)] + force_batch { + calls: ::std::vec::Vec, + }, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -15419,8 +15472,14 @@ pub mod api { #[codec(index = 1)] BatchCompleted, #[codec(index = 2)] - ItemCompleted, + BatchCompletedWithErrors, #[codec(index = 3)] + ItemCompleted, + #[codec(index = 4)] + ItemFailed { + error: runtime_types::sp_runtime::DispatchError, + }, + #[codec(index = 5)] DispatchedAs { result: ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, @@ -15717,20 +15776,16 @@ pub mod api { } pub mod polkadot_primitives { use super::runtime_types; - pub mod v0 { + pub mod v2 { use super::runtime_types; - pub mod collator_app { + pub mod assignment_app { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct Public(pub runtime_types::sp_core::sr25519::Public); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } - pub mod validator_app { + pub mod collator_app { use super::runtime_types; #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -15741,33 +15796,6 @@ pub mod api { )] pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); } - #[derive( - :: subxt :: codec :: Encode, - :: subxt :: codec :: Decode, - Debug, - Clone, - :: subxt :: codec :: CompactAs, - )] - pub struct ValidatorIndex(pub ::core::primitive::u32); - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub enum ValidityAttestation { - #[codec(index = 1)] - Implicit(runtime_types::polkadot_primitives::v0::validator_app::Signature), - #[codec(index = 2)] - Explicit(runtime_types::polkadot_primitives::v0::validator_app::Signature), - } - } - pub mod v1 { - use super::runtime_types; - pub mod assignment_app { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct Public(pub runtime_types::sp_core::sr25519::Public); - } pub mod signed { use super::runtime_types; #[derive( @@ -15775,13 +15803,24 @@ pub mod api { )] pub struct UncheckedSigned<_0, _1> { pub payload: _0, - pub validator_index: runtime_types::polkadot_primitives::v0::ValidatorIndex, + pub validator_index: runtime_types::polkadot_primitives::v2::ValidatorIndex, pub signature: - runtime_types::polkadot_primitives::v0::validator_app::Signature, + runtime_types::polkadot_primitives::v2::validator_app::Signature, #[codec(skip)] pub __subxt_unused_type_params: ::core::marker::PhantomData<_1>, } } + pub mod validator_app { + use super::runtime_types; + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Public(pub runtime_types::sp_core::sr25519::Public); + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct Signature(pub runtime_types::sp_core::sr25519::Signature); + } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] @@ -15796,9 +15835,9 @@ pub mod api { )] pub struct BackedCandidate<_0> { pub candidate: - runtime_types::polkadot_primitives::v1::CommittedCandidateReceipt<_0>, + runtime_types::polkadot_primitives::v2::CommittedCandidateReceipt<_0>, pub validity_votes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v0::ValidityAttestation, + runtime_types::polkadot_primitives::v2::ValidityAttestation, >, pub validator_indices: ::subxt::bitvec::vec::BitVec< ::subxt::bitvec::order::Lsb0, @@ -15828,11 +15867,11 @@ pub mod api { pub struct CandidateDescriptor<_0> { pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub relay_parent: _0, - pub collator: runtime_types::polkadot_primitives::v0::collator_app::Public, + pub collator: runtime_types::polkadot_primitives::v2::collator_app::Public, pub persisted_validation_data_hash: _0, pub pov_hash: _0, pub erasure_root: _0, - pub signature: runtime_types::polkadot_primitives::v0::collator_app::Signature, + pub signature: runtime_types::polkadot_primitives::v2::collator_app::Signature, pub para_head: _0, pub validation_code_hash: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, @@ -15841,15 +15880,15 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct CandidateReceipt<_0> { - pub descriptor: runtime_types::polkadot_primitives::v1::CandidateDescriptor<_0>, + pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, pub commitments_hash: _0, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct CommittedCandidateReceipt<_0> { - pub descriptor: runtime_types::polkadot_primitives::v1::CandidateDescriptor<_0>, - pub commitments: runtime_types::polkadot_primitives::v1::CandidateCommitments< + pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, + pub commitments: runtime_types::polkadot_primitives::v2::CandidateCommitments< ::core::primitive::u32, >, } @@ -15866,7 +15905,7 @@ pub mod api { )] pub enum CoreOccupied { #[codec(index = 0)] - Parathread(runtime_types::polkadot_primitives::v1::ParathreadEntry), + Parathread(runtime_types::polkadot_primitives::v2::ParathreadEntry), #[codec(index = 1)] Parachain, } @@ -15890,9 +15929,9 @@ pub mod api { )] pub enum DisputeStatement { #[codec(index = 0)] - Valid(runtime_types::polkadot_primitives::v1::ValidDisputeStatementKind), + Valid(runtime_types::polkadot_primitives::v2::ValidDisputeStatementKind), #[codec(index = 1)] - Invalid(runtime_types::polkadot_primitives::v1::InvalidDisputeStatementKind), + Invalid(runtime_types::polkadot_primitives::v2::InvalidDisputeStatementKind), } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -15901,9 +15940,9 @@ pub mod api { pub candidate_hash: runtime_types::polkadot_core_primitives::CandidateHash, pub session: ::core::primitive::u32, pub statements: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v1::DisputeStatement, - runtime_types::polkadot_primitives::v0::ValidatorIndex, - runtime_types::polkadot_primitives::v0::validator_app::Signature, + runtime_types::polkadot_primitives::v2::DisputeStatement, + runtime_types::polkadot_primitives::v2::ValidatorIndex, + runtime_types::polkadot_primitives::v2::validator_app::Signature, )>, } #[derive( @@ -15919,18 +15958,18 @@ pub mod api { )] pub struct InherentData<_0> { pub bitfields: ::std::vec::Vec< - runtime_types::polkadot_primitives::v1::signed::UncheckedSigned< - runtime_types::polkadot_primitives::v1::AvailabilityBitfield, - runtime_types::polkadot_primitives::v1::AvailabilityBitfield, + runtime_types::polkadot_primitives::v2::signed::UncheckedSigned< + runtime_types::polkadot_primitives::v2::AvailabilityBitfield, + runtime_types::polkadot_primitives::v2::AvailabilityBitfield, >, >, pub backed_candidates: ::std::vec::Vec< - runtime_types::polkadot_primitives::v1::BackedCandidate< + runtime_types::polkadot_primitives::v2::BackedCandidate< ::subxt::sp_core::H256, >, >, pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v1::DisputeStatementSet, + runtime_types::polkadot_primitives::v2::DisputeStatementSet, >, pub parent_header: _0, } @@ -15946,30 +15985,65 @@ pub mod api { )] pub struct ParathreadClaim( pub runtime_types::polkadot_parachain::primitives::Id, - pub runtime_types::polkadot_primitives::v0::collator_app::Public, + pub runtime_types::polkadot_primitives::v2::collator_app::Public, ); #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct ParathreadEntry { - pub claim: runtime_types::polkadot_primitives::v1::ParathreadClaim, + pub claim: runtime_types::polkadot_primitives::v2::ParathreadClaim, pub retries: ::core::primitive::u32, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] + pub struct PvfCheckStatement { + pub accept: ::core::primitive::bool, + pub subject: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, + pub session_index: ::core::primitive::u32, + pub validator_index: runtime_types::polkadot_primitives::v2::ValidatorIndex, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] pub struct ScrapedOnChainVotes<_0> { pub session: ::core::primitive::u32, pub backing_validators_per_candidate: ::std::vec::Vec<( - runtime_types::polkadot_primitives::v1::CandidateReceipt<_0>, + runtime_types::polkadot_primitives::v2::CandidateReceipt<_0>, ::std::vec::Vec<( - runtime_types::polkadot_primitives::v0::ValidatorIndex, - runtime_types::polkadot_primitives::v0::ValidityAttestation, + runtime_types::polkadot_primitives::v2::ValidatorIndex, + runtime_types::polkadot_primitives::v2::ValidityAttestation, )>, )>, pub disputes: ::std::vec::Vec< - runtime_types::polkadot_primitives::v1::DisputeStatementSet, + runtime_types::polkadot_primitives::v2::DisputeStatementSet, + >, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct SessionInfo { + pub active_validator_indices: + ::std::vec::Vec, + pub random_seed: [::core::primitive::u8; 32usize], + pub dispute_period: ::core::primitive::u32, + pub validators: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::validator_app::Public, + >, + pub discovery_keys: + ::std::vec::Vec, + pub assignment_keys: ::std::vec::Vec< + runtime_types::polkadot_primitives::v2::assignment_app::Public, >, + pub validator_groups: ::std::vec::Vec< + ::std::vec::Vec, + >, + pub n_cores: ::core::primitive::u32, + pub zeroth_delay_tranche_width: ::core::primitive::u32, + pub relay_vrf_modulo_samples: ::core::primitive::u32, + pub n_delay_tranches: ::core::primitive::u32, + pub no_show_slots: ::core::primitive::u32, + pub needed_approvals: ::core::primitive::u32, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -16000,43 +16074,22 @@ pub mod api { #[codec(index = 3)] ApprovalChecking, } - } - pub mod v2 { - use super::runtime_types; #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + :: subxt :: codec :: Encode, + :: subxt :: codec :: Decode, + Debug, + Clone, + :: subxt :: codec :: CompactAs, )] - pub struct PvfCheckStatement { - pub accept: ::core::primitive::bool, - pub subject: runtime_types::polkadot_parachain::primitives::ValidationCodeHash, - pub session_index: ::core::primitive::u32, - pub validator_index: runtime_types::polkadot_primitives::v0::ValidatorIndex, - } + pub struct ValidatorIndex(pub ::core::primitive::u32); #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] - pub struct SessionInfo { - pub active_validator_indices: - ::std::vec::Vec, - pub random_seed: [::core::primitive::u8; 32usize], - pub dispute_period: ::core::primitive::u32, - pub validators: ::std::vec::Vec< - runtime_types::polkadot_primitives::v0::validator_app::Public, - >, - pub discovery_keys: - ::std::vec::Vec, - pub assignment_keys: ::std::vec::Vec< - runtime_types::polkadot_primitives::v1::assignment_app::Public, - >, - pub validator_groups: ::std::vec::Vec< - ::std::vec::Vec, - >, - pub n_cores: ::core::primitive::u32, - pub zeroth_delay_tranche_width: ::core::primitive::u32, - pub relay_vrf_modulo_samples: ::core::primitive::u32, - pub n_delay_tranches: ::core::primitive::u32, - pub no_show_slots: ::core::primitive::u32, - pub needed_approvals: ::core::primitive::u32, + pub enum ValidityAttestation { + #[codec(index = 1)] + Implicit(runtime_types::polkadot_primitives::v2::validator_app::Signature), + #[codec(index = 2)] + Explicit(runtime_types::polkadot_primitives::v2::validator_app::Signature), } } } @@ -16159,40 +16212,45 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - AuctionStarted( - ::core::primitive::u32, - ::core::primitive::u32, - ::core::primitive::u32, - ), + AuctionStarted { + auction_index: ::core::primitive::u32, + lease_period: ::core::primitive::u32, + ending: ::core::primitive::u32, + }, #[codec(index = 1)] - AuctionClosed(::core::primitive::u32), + AuctionClosed { + auction_index: ::core::primitive::u32, + }, #[codec(index = 2)] - Reserved( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ::core::primitive::u128, - ), + Reserved { + bidder: ::subxt::sp_core::crypto::AccountId32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, #[codec(index = 3)] - Unreserved( - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + Unreserved { + bidder: ::subxt::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, #[codec(index = 4)] - ReserveConfiscated( - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u128, - ), + ReserveConfiscated { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::subxt::sp_core::crypto::AccountId32, + amount: ::core::primitive::u128, + }, #[codec(index = 5)] - BidAccepted( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - ::core::primitive::u32, - ::core::primitive::u32, - ), + BidAccepted { + bidder: ::subxt::sp_core::crypto::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + first_slot: ::core::primitive::u32, + last_slot: ::core::primitive::u32, + }, #[codec(index = 6)] - WinningOffset(::core::primitive::u32, ::core::primitive::u32), + WinningOffset { + auction_index: ::core::primitive::u32, + block_number: ::core::primitive::u32, + }, } } } @@ -16332,40 +16390,55 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - Created(runtime_types::polkadot_parachain::primitives::Id), + Created { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 1)] - Contributed( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - ), + Contributed { + who: ::subxt::sp_core::crypto::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, #[codec(index = 2)] - Withdrew( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::core::primitive::u128, - ), + Withdrew { + who: ::subxt::sp_core::crypto::AccountId32, + fund_index: runtime_types::polkadot_parachain::primitives::Id, + amount: ::core::primitive::u128, + }, #[codec(index = 3)] - PartiallyRefunded(runtime_types::polkadot_parachain::primitives::Id), + PartiallyRefunded { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 4)] - AllRefunded(runtime_types::polkadot_parachain::primitives::Id), + AllRefunded { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 5)] - Dissolved(runtime_types::polkadot_parachain::primitives::Id), + Dissolved { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 6)] - HandleBidResult( - runtime_types::polkadot_parachain::primitives::Id, - ::core::result::Result<(), runtime_types::sp_runtime::DispatchError>, - ), + HandleBidResult { + para_id: runtime_types::polkadot_parachain::primitives::Id, + result: ::core::result::Result< + (), + runtime_types::sp_runtime::DispatchError, + >, + }, #[codec(index = 7)] - Edited(runtime_types::polkadot_parachain::primitives::Id), + Edited { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 8)] - MemoUpdated( - ::subxt::sp_core::crypto::AccountId32, - runtime_types::polkadot_parachain::primitives::Id, - ::std::vec::Vec<::core::primitive::u8>, - ), + MemoUpdated { + who: ::subxt::sp_core::crypto::AccountId32, + para_id: runtime_types::polkadot_parachain::primitives::Id, + memo: ::std::vec::Vec<::core::primitive::u8>, + }, #[codec(index = 9)] - AddedToNewRaise(runtime_types::polkadot_parachain::primitives::Id), + AddedToNewRaise { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, } } #[derive( @@ -16476,17 +16549,19 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - Registered( - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::sp_core::crypto::AccountId32, - ), + Registered { + para_id: runtime_types::polkadot_parachain::primitives::Id, + manager: ::subxt::sp_core::crypto::AccountId32, + }, #[codec(index = 1)] - Deregistered(runtime_types::polkadot_parachain::primitives::Id), + Deregistered { + para_id: runtime_types::polkadot_parachain::primitives::Id, + }, #[codec(index = 2)] - Reserved( - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::sp_core::crypto::AccountId32, - ), + Reserved { + para_id: runtime_types::polkadot_parachain::primitives::Id, + who: ::subxt::sp_core::crypto::AccountId32, + }, } } #[derive( @@ -16599,16 +16674,18 @@ pub mod api { )] pub enum Event { #[codec(index = 0)] - NewLeasePeriod(::core::primitive::u32), + NewLeasePeriod { + lease_period: ::core::primitive::u32, + }, #[codec(index = 1)] - Leased( - runtime_types::polkadot_parachain::primitives::Id, - ::subxt::sp_core::crypto::AccountId32, - ::core::primitive::u32, - ::core::primitive::u32, - ::core::primitive::u128, - ::core::primitive::u128, - ), + Leased { + para_id: runtime_types::polkadot_parachain::primitives::Id, + leaser: ::subxt::sp_core::crypto::AccountId32, + period_begin: ::core::primitive::u32, + period_count: ::core::primitive::u32, + extra_reserved: ::core::primitive::u128, + total_amount: ::core::primitive::u128, + }, } } } @@ -16617,57 +16694,6 @@ pub mod api { use super::runtime_types; pub mod configuration { use super::runtime_types; - pub mod migration { - use super::runtime_types; - pub mod v1 { - use super::runtime_types; - #[derive( - :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, - )] - pub struct HostConfiguration<_0> { - pub max_code_size: _0, - pub max_head_data_size: _0, - pub max_upward_queue_count: _0, - pub max_upward_queue_size: _0, - pub max_upward_message_size: _0, - pub max_upward_message_num_per_candidate: _0, - pub hrmp_max_message_num_per_candidate: _0, - pub validation_upgrade_frequency: _0, - pub validation_upgrade_delay: _0, - pub max_pov_size: _0, - pub max_downward_message_size: _0, - pub ump_service_total_weight: ::core::primitive::u64, - pub hrmp_max_parachain_outbound_channels: _0, - pub hrmp_max_parathread_outbound_channels: _0, - pub hrmp_sender_deposit: ::core::primitive::u128, - pub hrmp_recipient_deposit: ::core::primitive::u128, - pub hrmp_channel_max_capacity: _0, - pub hrmp_channel_max_total_size: _0, - pub hrmp_max_parachain_inbound_channels: _0, - pub hrmp_max_parathread_inbound_channels: _0, - pub hrmp_channel_max_message_size: _0, - pub code_retention_period: _0, - pub parathread_cores: _0, - pub parathread_retries: _0, - pub group_rotation_frequency: _0, - pub chain_availability_period: _0, - pub thread_availability_period: _0, - pub scheduling_lookahead: _0, - pub max_validators_per_core: ::core::option::Option<_0>, - pub max_validators: ::core::option::Option<_0>, - pub dispute_period: _0, - pub dispute_post_conclusion_acceptance_period: _0, - pub dispute_max_spam_slots: _0, - pub dispute_conclusion_by_time_out_period: _0, - pub no_show_slots: _0, - pub n_delay_tranches: _0, - pub zeroth_delay_tranche_width: _0, - pub needed_approvals: _0, - pub relay_vrf_modulo_samples: _0, - pub ump_max_individual_weight: ::core::primitive::u64, - } - } - } pub mod pallet { use super::runtime_types; #[derive( @@ -17120,29 +17146,29 @@ pub mod api { pub enum Event { #[codec(index = 0)] CandidateBacked( - runtime_types::polkadot_primitives::v1::CandidateReceipt< + runtime_types::polkadot_primitives::v2::CandidateReceipt< ::subxt::sp_core::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v1::CoreIndex, - runtime_types::polkadot_primitives::v1::GroupIndex, + runtime_types::polkadot_primitives::v2::CoreIndex, + runtime_types::polkadot_primitives::v2::GroupIndex, ), #[codec(index = 1)] CandidateIncluded( - runtime_types::polkadot_primitives::v1::CandidateReceipt< + runtime_types::polkadot_primitives::v2::CandidateReceipt< ::subxt::sp_core::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v1::CoreIndex, - runtime_types::polkadot_primitives::v1::GroupIndex, + runtime_types::polkadot_primitives::v2::CoreIndex, + runtime_types::polkadot_primitives::v2::GroupIndex, ), #[codec(index = 2)] CandidateTimedOut( - runtime_types::polkadot_primitives::v1::CandidateReceipt< + runtime_types::polkadot_primitives::v2::CandidateReceipt< ::subxt::sp_core::H256, >, runtime_types::polkadot_parachain::primitives::HeadData, - runtime_types::polkadot_primitives::v1::CoreIndex, + runtime_types::polkadot_primitives::v2::CoreIndex, ), } } @@ -17150,16 +17176,16 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct AvailabilityBitfieldRecord<_0> { - pub bitfield: runtime_types::polkadot_primitives::v1::AvailabilityBitfield, + pub bitfield: runtime_types::polkadot_primitives::v2::AvailabilityBitfield, pub submitted_at: _0, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct CandidatePendingAvailability<_0, _1> { - pub core: runtime_types::polkadot_primitives::v1::CoreIndex, + pub core: runtime_types::polkadot_primitives::v2::CoreIndex, pub hash: runtime_types::polkadot_core_primitives::CandidateHash, - pub descriptor: runtime_types::polkadot_primitives::v1::CandidateDescriptor<_0>, + pub descriptor: runtime_types::polkadot_primitives::v2::CandidateDescriptor<_0>, pub availability_votes: ::subxt::bitvec::vec::BitVec< ::subxt::bitvec::order::Lsb0, ::core::primitive::u8, @@ -17170,7 +17196,7 @@ pub mod api { >, pub relay_parent_number: _1, pub backed_in_number: _1, - pub backing_group: runtime_types::polkadot_primitives::v1::GroupIndex, + pub backing_group: runtime_types::polkadot_primitives::v2::GroupIndex, } } pub mod initializer { @@ -17190,10 +17216,10 @@ pub mod api { )] pub struct BufferedSessionChange { pub validators: ::std::vec::Vec< - runtime_types::polkadot_primitives::v0::validator_app::Public, + runtime_types::polkadot_primitives::v2::validator_app::Public, >, pub queued: ::std::vec::Vec< - runtime_types::polkadot_primitives::v0::validator_app::Public, + runtime_types::polkadot_primitives::v2::validator_app::Public, >, pub session_index: ::core::primitive::u32, } @@ -17258,7 +17284,7 @@ pub mod api { include_pvf_check_statement { stmt: runtime_types::polkadot_primitives::v2::PvfCheckStatement, signature: - runtime_types::polkadot_primitives::v0::validator_app::Signature, + runtime_types::polkadot_primitives::v2::validator_app::Signature, }, } #[derive( @@ -17409,7 +17435,7 @@ pub mod api { pub enum Call { #[codec(index = 0)] enter { - data: runtime_types::polkadot_primitives::v1::InherentData< + data: runtime_types::polkadot_primitives::v2::InherentData< runtime_types::sp_runtime::generic::header::Header< ::core::primitive::u32, runtime_types::sp_runtime::traits::BlakeTwo256, @@ -17446,7 +17472,7 @@ pub mod api { Parachain, #[codec(index = 1)] Parathread( - runtime_types::polkadot_primitives::v0::collator_app::Public, + runtime_types::polkadot_primitives::v2::collator_app::Public, ::core::primitive::u32, ), } @@ -17454,10 +17480,10 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct CoreAssignment { - pub core: runtime_types::polkadot_primitives::v1::CoreIndex, + pub core: runtime_types::polkadot_primitives::v2::CoreIndex, pub para_id: runtime_types::polkadot_parachain::primitives::Id, pub kind: runtime_types::polkadot_runtime_parachains::scheduler::AssignmentKind, - pub group_idx: runtime_types::polkadot_primitives::v1::GroupIndex, + pub group_idx: runtime_types::polkadot_primitives::v2::GroupIndex, } #[derive( :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, @@ -17472,7 +17498,7 @@ pub mod api { :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, )] pub struct QueuedParathread { - pub claim: runtime_types::polkadot_primitives::v1::ParathreadEntry, + pub claim: runtime_types::polkadot_primitives::v2::ParathreadEntry, pub core_offset: ::core::primitive::u32, } } @@ -17773,8 +17799,8 @@ pub mod api { pub grandpa: runtime_types::sp_finality_grandpa::app::Public, pub babe: runtime_types::sp_consensus_babe::app::Public, pub im_online: runtime_types::pallet_im_online::sr25519::app_sr25519::Public, - pub para_validator: runtime_types::polkadot_primitives::v0::validator_app::Public, - pub para_assignment: runtime_types::polkadot_primitives::v1::assignment_app::Public, + pub para_validator: runtime_types::polkadot_primitives::v2::validator_app::Public, + pub para_assignment: runtime_types::polkadot_primitives::v2::assignment_app::Public, pub authority_discovery: runtime_types::sp_authority_discovery::app::Public, pub beefy: runtime_types::beefy_primitives::crypto::Public, } @@ -17835,6 +17861,44 @@ pub mod api { allowed_slots: runtime_types::sp_consensus_babe::AllowedSlots, }, } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub enum PreDigest { + #[codec(index = 1)] + Primary(runtime_types::sp_consensus_babe::digests::PrimaryPreDigest), + #[codec(index = 2)] + SecondaryPlain( + runtime_types::sp_consensus_babe::digests::SecondaryPlainPreDigest, + ), + #[codec(index = 3)] + SecondaryVRF(runtime_types::sp_consensus_babe::digests::SecondaryVRFPreDigest), + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct PrimaryPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_output: [::core::primitive::u8; 32usize], + pub vrf_proof: [::core::primitive::u8; 64usize], + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct SecondaryPlainPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + } + #[derive( + :: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone, + )] + pub struct SecondaryVRFPreDigest { + pub authority_index: ::core::primitive::u32, + pub slot: runtime_types::sp_consensus_slots::Slot, + pub vrf_output: [::core::primitive::u8; 32usize], + pub vrf_proof: [::core::primitive::u8; 64usize], + } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum AllowedSlots { @@ -18612,11 +18676,13 @@ pub mod api { Token(runtime_types::sp_runtime::TokenError), #[codec(index = 8)] Arithmetic(runtime_types::sp_runtime::ArithmeticError), + #[codec(index = 9)] + Transactional(runtime_types::sp_runtime::TransactionalError), } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub struct ModuleError { pub index: ::core::primitive::u8, - pub error: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] pub enum MultiSignature { @@ -18653,6 +18719,13 @@ pub mod api { #[codec(index = 6)] Unsupported, } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug, Clone)] + pub enum TransactionalError { + #[codec(index = 0)] + LimitReached, + #[codec(index = 1)] + NoLayer, + } } pub mod sp_session { use super::runtime_types; @@ -19720,8 +19793,8 @@ pub mod api { } impl DispatchError { pub fn details(&self) -> Option { - if let Self::Module(e) = self { - match (e.index , e.error) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (1u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (1u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (1u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (3u8 , 0u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotAssigned" , docs : "The index was not already assigned." }) , (3u8 , 1u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotOwner" , docs : "The index is assigned to another account." }) , (3u8 , 2u8) => Some (ErrorDetails { pallet : "Indices" , error : "InUse" , docs : "The index was not available." }) , (3u8 , 3u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotTransfer" , docs : "The source and destination accounts are identical." }) , (3u8 , 4u8) => Some (ErrorDetails { pallet : "Indices" , error : "Permanent" , docs : "The index is permanent and may not be freed/changed." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value" }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal" }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value" }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit" }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account" }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account" }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist" }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (6u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (6u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (6u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (6u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (6u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (6u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (6u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (10u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (10u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (10u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (10u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (10u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (10u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (10u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (11u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (11u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "Configuration" , error : "InvalidNewValue" , docs : "The new value for a configuration parameter is invalid." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateValidatorIndices" , docs : "Validator indices are out of order or contains duplicates." }) , (16u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateDisputeStatementSet" , docs : "Dispute statement sets are out of order or contain duplicates." }) , (16u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateBackedCandidates" , docs : "Backed candidates are out of order (core index) or contain duplicates." }) , (16u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnexpectedRelayParent" , docs : "A different relay parent was provided compared to the on-chain stored one." }) , (16u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongBitfieldSize" , docs : "Availability bitfield has unexpected size." }) , (16u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldAllZeros" , docs : "Bitfield consists of zeros only." }) , (16u8 , 6u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldDuplicateOrUnordered" , docs : "Multiple bitfields submitted by same validator or validators out of order by index." }) , (16u8 , 7u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index out of bounds." }) , (16u8 , 8u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBitfieldSignature" , docs : "Invalid signature" }) , (16u8 , 9u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnscheduledCandidate" , docs : "Candidate submitted but para not scheduled." }) , (16u8 , 10u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateScheduledBeforeParaFree" , docs : "Candidate scheduled despite pending candidate already existing for the para." }) , (16u8 , 11u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongCollator" , docs : "Candidate included with the wrong collator." }) , (16u8 , 12u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ScheduledOutOfOrder" , docs : "Scheduled cores out of order." }) , (16u8 , 13u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HeadDataTooLarge" , docs : "Head data exceeds the configured maximum." }) , (16u8 , 14u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "PrematureCodeUpgrade" , docs : "Code upgrade prematurely." }) , (16u8 , 15u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NewCodeTooLarge" , docs : "Output code is too large" }) , (16u8 , 16u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateNotInParentContext" , docs : "Candidate not in parent context." }) , (16u8 , 17u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidGroupIndex" , docs : "Invalid group index in core assignment." }) , (16u8 , 18u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InsufficientBacking" , docs : "Insufficient (non-majority) backing." }) , (16u8 , 19u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBacking" , docs : "Invalid (bad signature, unknown validator, etc.) backing." }) , (16u8 , 20u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NotCollatorSigned" , docs : "Collator did not sign PoV." }) , (16u8 , 21u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidationDataHashMismatch" , docs : "The validation data hash does not match expected." }) , (16u8 , 22u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "IncorrectDownwardMessageHandling" , docs : "The downward message queue is not processed correctly." }) , (16u8 , 23u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidUpwardMessages" , docs : "At least one upward message sent does not pass the acceptance criteria." }) , (16u8 , 24u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HrmpWatermarkMishandling" , docs : "The candidate didn't follow the rules of HRMP watermark advancement." }) , (16u8 , 25u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidOutboundHrmp" , docs : "The HRMP messages sent by the candidate is not valid." }) , (16u8 , 26u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidValidationCodeHash" , docs : "The validation code hash of the candidate is not valid." }) , (16u8 , 27u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ParaHeadMismatch" , docs : "The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the\ncommitments." }) , (16u8 , 28u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldReferencesFreedCore" , docs : "A bitfield that references a freed core,\neither intentionally or as part of a concluded\ninvalid dispute." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "TooManyInclusionInherents" , docs : "Inclusion inherent called more than once per block." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InvalidParentHeader" , docs : "The hash of the submitted parent header doesn't correspond to the saved block hash of\nthe parent." }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "CandidateConcludedInvalid" , docs : "Disputed candidate that was concluded invalid." }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InherentOverweight" , docs : "The data given to the inherent will result in an overweight block." }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeStatementsUnsortedOrDuplicates" , docs : "The ordering of dispute statements was invalid." }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeInvalid" , docs : "A dispute statement was invalid." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "Paras" , error : "NotRegistered" , docs : "Para is not registered in our system." }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOnboard" , docs : "Para cannot be onboarded because it is already tracked by our system." }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOffboard" , docs : "Para cannot be offboarded at this time." }) , (19u8 , 3u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotUpgrade" , docs : "Para cannot be upgraded to a parachain." }) , (19u8 , 4u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotDowngrade" , docs : "Para cannot be downgraded to a parathread." }) , (19u8 , 5u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementStale" , docs : "The statement for PVF pre-checking is stale." }) , (19u8 , 6u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementFuture" , docs : "The statement for PVF pre-checking is for a future session." }) , (19u8 , 7u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckValidatorIndexOutOfBounds" , docs : "Claimed validator index is out of bounds." }) , (19u8 , 8u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckInvalidSignature" , docs : "The signature for the PVF pre-checking is invalid." }) , (19u8 , 9u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDoubleVote" , docs : "The given validator already has cast a vote." }) , (19u8 , 10u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckSubjectInvalid" , docs : "The given PVF does not exist at the moment of process a vote." }) , (19u8 , 11u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDisabled" , docs : "The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism\nis disabled." }) , (22u8 , 0u8) => Some (ErrorDetails { pallet : "Ump" , error : "UnknownMessageIndex" , docs : "The message index given is unknown." }) , (22u8 , 1u8) => Some (ErrorDetails { pallet : "Ump" , error : "WeightOverLimit" , docs : "The amount of weight given is possibly not enough for executing the message." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelToSelf" , docs : "The sender tried to open a channel to themselves." }) , (23u8 , 1u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelInvalidRecipient" , docs : "The recipient is not a valid para." }) , (23u8 , 2u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroCapacity" , docs : "The requested capacity is zero." }) , (23u8 , 3u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelCapacityExceedsLimit" , docs : "The requested capacity exceeds the global limit." }) , (23u8 , 4u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroMessageSize" , docs : "The requested maximum message size is 0." }) , (23u8 , 5u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelMessageSizeExceedsLimit" , docs : "The open request requested the message size that exceeds the global limit." }) , (23u8 , 6u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyExists" , docs : "The channel already exists" }) , (23u8 , 7u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyRequested" , docs : "There is already a request to open the same channel." }) , (23u8 , 8u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelLimitExceeded" , docs : "The sender already has the maximum number of allowed outbound channels." }) , (23u8 , 9u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelDoesntExist" , docs : "The channel from the sender to the origin doesn't exist." }) , (23u8 , 10u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelAlreadyConfirmed" , docs : "The channel is already confirmed." }) , (23u8 , 11u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelLimitExceeded" , docs : "The recipient already has the maximum number of allowed inbound channels." }) , (23u8 , 12u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelUnauthorized" , docs : "The origin tries to close a channel where it is neither the sender nor the recipient." }) , (23u8 , 13u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelDoesntExist" , docs : "The channel to be closed doesn't exist." }) , (23u8 , 14u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelAlreadyUnderway" , docs : "The channel close request is already requested." }) , (23u8 , 15u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CancelHrmpOpenChannelUnauthorized" , docs : "Canceling is requested by neither the sender nor recipient of the open channel request." }) , (23u8 , 16u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelDoesntExist" , docs : "The open request doesn't exist." }) , (23u8 , 17u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyConfirmed" , docs : "Cannot cancel an HRMP open channel request because it is already confirmed." }) , (23u8 , 18u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "WrongWitness" , docs : "The provided witness data is wrong." }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "DuplicateDisputeStatementSets" , docs : "Duplicate dispute statement sets provided." }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "AncientDisputeStatement" , docs : "Ancient dispute statement provided." }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index on statement is out of bounds for session." }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "InvalidSignature" , docs : "Invalid signature on statement." }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "DuplicateStatement" , docs : "Validator vote submitted more than once to dispute." }) , (25u8 , 5u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "PotentialSpam" , docs : "Too many spam slots used by some specific validator." }) , (25u8 , 6u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "SingleSidedDispute" , docs : "A dispute where there are only votes on one side." }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotRegistered" , docs : "The ID is not registered." }) , (26u8 , 1u8) => Some (ErrorDetails { pallet : "Registrar" , error : "AlreadyRegistered" , docs : "The ID is already registered." }) , (26u8 , 2u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotOwner" , docs : "The caller is not the owner of this Id." }) , (26u8 , 3u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CodeTooLarge" , docs : "Invalid para code size." }) , (26u8 , 4u8) => Some (ErrorDetails { pallet : "Registrar" , error : "HeadDataTooLarge" , docs : "Invalid para head data size." }) , (26u8 , 5u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParachain" , docs : "Para is not a Parachain." }) , (26u8 , 6u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParathread" , docs : "Para is not a Parathread." }) , (26u8 , 7u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDeregister" , docs : "Cannot deregister para" }) , (26u8 , 8u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDowngrade" , docs : "Cannot schedule downgrade of parachain to parathread" }) , (26u8 , 9u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotUpgrade" , docs : "Cannot schedule upgrade of parathread to parachain" }) , (26u8 , 10u8) => Some (ErrorDetails { pallet : "Registrar" , error : "ParaLocked" , docs : "Para is locked from manipulation by the manager. Must use parachain or relay chain governance." }) , (26u8 , 11u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotReserved" , docs : "The ID given for registration has not been reserved." }) , (26u8 , 12u8) => Some (ErrorDetails { pallet : "Registrar" , error : "EmptyCode" , docs : "Registering parachain with empty code is not allowed." }) , (26u8 , 13u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotSwap" , docs : "Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are\ncorrect for the swap to work." }) , (27u8 , 0u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionInProgress" , docs : "This auction is already in progress." }) , (27u8 , 1u8) => Some (ErrorDetails { pallet : "Auctions" , error : "LeasePeriodInPast" , docs : "The lease period is in the past." }) , (27u8 , 2u8) => Some (ErrorDetails { pallet : "Auctions" , error : "ParaNotRegistered" , docs : "Para is not registered" }) , (27u8 , 3u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotCurrentAuction" , docs : "Not a current auction." }) , (27u8 , 4u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotAuction" , docs : "Not an auction." }) , (27u8 , 5u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionEnded" , docs : "Auction has already ended." }) , (27u8 , 6u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AlreadyLeasedOut" , docs : "The para is already leased out for part of this range." }) , (28u8 , 0u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodInPast" , docs : "The current lease period is more than the first lease period." }) , (28u8 , 1u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodTooFarInFuture" , docs : "The first lease period needs to at least be less than 3 `max_value`." }) , (28u8 , 2u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodBeforeFirstPeriod" , docs : "Last lease period must be greater than first lease period." }) , (28u8 , 3u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodTooFarInFuture" , docs : "The last lease period cannot be more than 3 periods after the first period." }) , (28u8 , 4u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CannotEndInPast" , docs : "The campaign ends before the current block number. The end must be in the future." }) , (28u8 , 5u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "EndTooFarInFuture" , docs : "The end date for this crowdloan is not sensible." }) , (28u8 , 6u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "Overflow" , docs : "There was an overflow." }) , (28u8 , 7u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionTooSmall" , docs : "The contribution was below the minimum, `MinContribution`." }) , (28u8 , 8u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidParaId" , docs : "Invalid fund index." }) , (28u8 , 9u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CapExceeded" , docs : "Contributions exceed maximum amount." }) , (28u8 , 10u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionPeriodOver" , docs : "The contribution period has already ended." }) , (28u8 , 11u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidOrigin" , docs : "The origin of this call is invalid." }) , (28u8 , 12u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotParachain" , docs : "This crowdloan does not correspond to a parachain." }) , (28u8 , 13u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LeaseActive" , docs : "This parachain lease is still active and retirement cannot yet begin." }) , (28u8 , 14u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "BidOrLeaseActive" , docs : "This parachain's bid or lease is still active and withdraw cannot yet begin." }) , (28u8 , 15u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FundNotEnded" , docs : "The crowdloan has not yet ended." }) , (28u8 , 16u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoContributions" , docs : "There are no contributions stored in this crowdloan." }) , (28u8 , 17u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotReadyToDissolve" , docs : "The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period." }) , (28u8 , 18u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidSignature" , docs : "Invalid signature." }) , (28u8 , 19u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "MemoTooLarge" , docs : "The provided memo is too large." }) , (28u8 , 20u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "AlreadyInNewRaise" , docs : "The fund is already in `NewRaise`" }) , (28u8 , 21u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "VrfDelayInProgress" , docs : "No contributions allowed during the VRF delay" }) , (28u8 , 22u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoLeasePeriod" , docs : "A lease period has not started yet, due to an offset in the starting block." }) , (29u8 , 0u8) => Some (ErrorDetails { pallet : "Slots" , error : "ParaNotOnboarding" , docs : "The parachain ID is not onboarding." }) , (29u8 , 1u8) => Some (ErrorDetails { pallet : "Slots" , error : "LeaseError" , docs : "There was an error with the lease." }) , (30u8 , 0u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "ParaDoesntExist" , docs : "The specified parachain or parathread is not registered." }) , (30u8 , 1u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "ParaAlreadyExists" , docs : "The specified parachain or parathread is already registered." }) , (30u8 , 2u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "ExceedsMaxMessageSize" , docs : "A DMP message couldn't be sent because it exceeds the maximum size allowed for a downward\nmessage." }) , (30u8 , 3u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "CouldntCleanup" , docs : "Could not schedule para cleanup." }) , (30u8 , 4u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "NotParathread" , docs : "Not a parathread." }) , (30u8 , 5u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "NotParachain" , docs : "Not a parachain." }) , (30u8 , 6u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "CannotUpgrade" , docs : "Cannot upgrade parathread." }) , (30u8 , 7u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "CannotDowngrade" , docs : "Cannot downgrade parachain." }) , (31u8 , 0u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "ParaDoesntExist" , docs : "The specified parachain or parathread is not registered." }) , (31u8 , 1u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "NotParathread" , docs : "Not a parathread." }) , (31u8 , 2u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "CannotUpgrade" , docs : "Cannot upgrade parathread." }) , (31u8 , 3u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "CannotDowngrade" , docs : "Cannot downgrade parachain." }) , (31u8 , 4u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "SlotAlreadyAssigned" , docs : "Permanent or Temporary slot already assigned." }) , (31u8 , 5u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "SlotNotAssigned" , docs : "Permanent or Temporary slot has not been assigned." }) , (31u8 , 6u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "OngoingLeaseExists" , docs : "An ongoing lease already exists." }) , (31u8 , 7u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "MaxPermanentSlotsExceeded" , docs : "" }) , (31u8 , 8u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "MaxTemporarySlotsExceeded" , docs : "" }) , (32u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (40u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (40u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (40u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (40u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (40u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (40u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (40u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (40u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (40u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (40u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (41u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (41u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (41u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (41u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (41u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (41u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (41u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (41u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (41u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (41u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (43u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (43u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (43u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (43u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (43u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (43u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (43u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (43u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (43u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (43u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (43u8 , 10u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (43u8 , 11u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (44u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (44u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (44u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (44u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (44u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (44u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (44u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (44u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (44u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (44u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (44u8 , 10u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (44u8 , 11u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (80u8 , 0u8) => Some (ErrorDetails { pallet : "Collective" , error : "NotMember" , docs : "Account is not a member" }) , (80u8 , 1u8) => Some (ErrorDetails { pallet : "Collective" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (80u8 , 2u8) => Some (ErrorDetails { pallet : "Collective" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (80u8 , 3u8) => Some (ErrorDetails { pallet : "Collective" , error : "WrongIndex" , docs : "Mismatched index" }) , (80u8 , 4u8) => Some (ErrorDetails { pallet : "Collective" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (80u8 , 5u8) => Some (ErrorDetails { pallet : "Collective" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (80u8 , 6u8) => Some (ErrorDetails { pallet : "Collective" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (80u8 , 7u8) => Some (ErrorDetails { pallet : "Collective" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (80u8 , 8u8) => Some (ErrorDetails { pallet : "Collective" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (80u8 , 9u8) => Some (ErrorDetails { pallet : "Collective" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (81u8 , 0u8) => Some (ErrorDetails { pallet : "Membership" , error : "AlreadyMember" , docs : "Already a member." }) , (81u8 , 1u8) => Some (ErrorDetails { pallet : "Membership" , error : "NotMember" , docs : "Not a member." }) , (90u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (91u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (91u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (91u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (91u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (91u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (91u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (91u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (91u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (92u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (92u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (92u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (92u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (92u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (92u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (92u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (92u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (92u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (92u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (92u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (92u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (92u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (92u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (99u8 , 0u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Unreachable" , docs : "The desired destination was unreachable, generally because there is a no way of routing\nto it." }) , (99u8 , 1u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "SendFailure" , docs : "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps\na lack of space for buffering the message." }) , (99u8 , 2u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Filtered" , docs : "The message execution fails the filter." }) , (99u8 , 3u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "UnweighableMessage" , docs : "The message's weight could not be determined." }) , (99u8 , 4u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "DestinationNotInvertible" , docs : "The destination `MultiLocation` provided cannot be inverted." }) , (99u8 , 5u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Empty" , docs : "The assets to be sent are empty." }) , (99u8 , 6u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "CannotReanchor" , docs : "Could not re-anchor the assets to declare the fees for the destination chain." }) , (99u8 , 7u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "TooManyAssets" , docs : "Too many assets have been attempted for transfer." }) , (99u8 , 8u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "InvalidOrigin" , docs : "Origin is invalid for sending." }) , (99u8 , 9u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadVersion" , docs : "The version of the `Versioned` value used is not able to be interpreted." }) , (99u8 , 10u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadLocation" , docs : "The given location could not be used (e.g. because it cannot be expressed in the\ndesired version of XCM)." }) , (99u8 , 11u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "NoSubscription" , docs : "The referenced subscription could not be found." }) , (99u8 , 12u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "AlreadySubscribed" , docs : "The location is invalid since it already has a subscription from us." }) , _ => None } + if let Self::Module(runtime_types::sp_runtime::ModuleError { index, error }) = self { + match (index , error[0]) { (0u8 , 0u8) => Some (ErrorDetails { pallet : "System" , error : "InvalidSpecName" , docs : "The name of specification does not match between the current runtime\nand the new runtime." }) , (0u8 , 1u8) => Some (ErrorDetails { pallet : "System" , error : "SpecVersionNeedsToIncrease" , docs : "The specification version is not allowed to decrease between the current runtime\nand the new runtime." }) , (0u8 , 2u8) => Some (ErrorDetails { pallet : "System" , error : "FailedToExtractRuntimeVersion" , docs : "Failed to extract the runtime version from the new runtime.\n\nEither calling `Core_version` or decoding `RuntimeVersion` failed." }) , (0u8 , 3u8) => Some (ErrorDetails { pallet : "System" , error : "NonDefaultComposite" , docs : "Suicide called when the account has non-default composite data." }) , (0u8 , 4u8) => Some (ErrorDetails { pallet : "System" , error : "NonZeroRefCount" , docs : "There is a non-zero reference count preventing the account from being purged." }) , (0u8 , 5u8) => Some (ErrorDetails { pallet : "System" , error : "CallFiltered" , docs : "The origin filter prevent the call to be dispatched." }) , (1u8 , 0u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (1u8 , 1u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (1u8 , 2u8) => Some (ErrorDetails { pallet : "Babe" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (1u8 , 3u8) => Some (ErrorDetails { pallet : "Babe" , error : "InvalidConfiguration" , docs : "Submitted configuration is invalid." }) , (3u8 , 0u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotAssigned" , docs : "The index was not already assigned." }) , (3u8 , 1u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotOwner" , docs : "The index is assigned to another account." }) , (3u8 , 2u8) => Some (ErrorDetails { pallet : "Indices" , error : "InUse" , docs : "The index was not available." }) , (3u8 , 3u8) => Some (ErrorDetails { pallet : "Indices" , error : "NotTransfer" , docs : "The source and destination accounts are identical." }) , (3u8 , 4u8) => Some (ErrorDetails { pallet : "Indices" , error : "Permanent" , docs : "The index is permanent and may not be freed/changed." }) , (4u8 , 0u8) => Some (ErrorDetails { pallet : "Balances" , error : "VestingBalance" , docs : "Vesting balance too high to send value" }) , (4u8 , 1u8) => Some (ErrorDetails { pallet : "Balances" , error : "LiquidityRestrictions" , docs : "Account liquidity restrictions prevent withdrawal" }) , (4u8 , 2u8) => Some (ErrorDetails { pallet : "Balances" , error : "InsufficientBalance" , docs : "Balance too low to send value" }) , (4u8 , 3u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistentialDeposit" , docs : "Value too low to create account due to existential deposit" }) , (4u8 , 4u8) => Some (ErrorDetails { pallet : "Balances" , error : "KeepAlive" , docs : "Transfer/payment would kill account" }) , (4u8 , 5u8) => Some (ErrorDetails { pallet : "Balances" , error : "ExistingVestingSchedule" , docs : "A vesting schedule already exists for this account" }) , (4u8 , 6u8) => Some (ErrorDetails { pallet : "Balances" , error : "DeadAccount" , docs : "Beneficiary account must pre-exist" }) , (4u8 , 7u8) => Some (ErrorDetails { pallet : "Balances" , error : "TooManyReserves" , docs : "Number of named reserves exceed MaxReserves" }) , (6u8 , 0u8) => Some (ErrorDetails { pallet : "Authorship" , error : "InvalidUncleParent" , docs : "The uncle parent not in the chain." }) , (6u8 , 1u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UnclesAlreadySet" , docs : "Uncles already set in the block." }) , (6u8 , 2u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooManyUncles" , docs : "Too many uncles." }) , (6u8 , 3u8) => Some (ErrorDetails { pallet : "Authorship" , error : "GenesisUncle" , docs : "The uncle is genesis." }) , (6u8 , 4u8) => Some (ErrorDetails { pallet : "Authorship" , error : "TooHighUncle" , docs : "The uncle is too high in chain." }) , (6u8 , 5u8) => Some (ErrorDetails { pallet : "Authorship" , error : "UncleAlreadyIncluded" , docs : "The uncle is already included." }) , (6u8 , 6u8) => Some (ErrorDetails { pallet : "Authorship" , error : "OldUncle" , docs : "The uncle isn't recent enough to be included." }) , (9u8 , 0u8) => Some (ErrorDetails { pallet : "Session" , error : "InvalidProof" , docs : "Invalid ownership proof." }) , (9u8 , 1u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAssociatedValidatorId" , docs : "No associated validator ID for account." }) , (9u8 , 2u8) => Some (ErrorDetails { pallet : "Session" , error : "DuplicatedKey" , docs : "Registered duplicate key." }) , (9u8 , 3u8) => Some (ErrorDetails { pallet : "Session" , error : "NoKeys" , docs : "No keys are associated with this account." }) , (9u8 , 4u8) => Some (ErrorDetails { pallet : "Session" , error : "NoAccount" , docs : "Key setting account is not live, so it's impossible to associate keys." }) , (10u8 , 0u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "PauseFailed" , docs : "Attempt to signal GRANDPA pause when the authority set isn't live\n(either paused or already pending pause)." }) , (10u8 , 1u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ResumeFailed" , docs : "Attempt to signal GRANDPA resume when the authority set isn't paused\n(either live or already pending resume)." }) , (10u8 , 2u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "ChangePending" , docs : "Attempt to signal GRANDPA change with one already pending." }) , (10u8 , 3u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "TooSoon" , docs : "Cannot signal forced change so soon after last." }) , (10u8 , 4u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidKeyOwnershipProof" , docs : "A key ownership proof provided as part of an equivocation report is invalid." }) , (10u8 , 5u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "InvalidEquivocationProof" , docs : "An equivocation proof provided as part of an equivocation report is invalid." }) , (10u8 , 6u8) => Some (ErrorDetails { pallet : "Grandpa" , error : "DuplicateOffenceReport" , docs : "A given equivocation report is valid but already previously reported." }) , (11u8 , 0u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "InvalidKey" , docs : "Non existent public key." }) , (11u8 , 1u8) => Some (ErrorDetails { pallet : "ImOnline" , error : "DuplicatedHeartbeat" , docs : "Duplicated heartbeat." }) , (14u8 , 0u8) => Some (ErrorDetails { pallet : "Configuration" , error : "InvalidNewValue" , docs : "The new value for a configuration parameter is invalid." }) , (16u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateValidatorIndices" , docs : "Validator indices are out of order or contains duplicates." }) , (16u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateDisputeStatementSet" , docs : "Dispute statement sets are out of order or contain duplicates." }) , (16u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnsortedOrDuplicateBackedCandidates" , docs : "Backed candidates are out of order (core index) or contain duplicates." }) , (16u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnexpectedRelayParent" , docs : "A different relay parent was provided compared to the on-chain stored one." }) , (16u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongBitfieldSize" , docs : "Availability bitfield has unexpected size." }) , (16u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldAllZeros" , docs : "Bitfield consists of zeros only." }) , (16u8 , 6u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldDuplicateOrUnordered" , docs : "Multiple bitfields submitted by same validator or validators out of order by index." }) , (16u8 , 7u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index out of bounds." }) , (16u8 , 8u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBitfieldSignature" , docs : "Invalid signature" }) , (16u8 , 9u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "UnscheduledCandidate" , docs : "Candidate submitted but para not scheduled." }) , (16u8 , 10u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateScheduledBeforeParaFree" , docs : "Candidate scheduled despite pending candidate already existing for the para." }) , (16u8 , 11u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "WrongCollator" , docs : "Candidate included with the wrong collator." }) , (16u8 , 12u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ScheduledOutOfOrder" , docs : "Scheduled cores out of order." }) , (16u8 , 13u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HeadDataTooLarge" , docs : "Head data exceeds the configured maximum." }) , (16u8 , 14u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "PrematureCodeUpgrade" , docs : "Code upgrade prematurely." }) , (16u8 , 15u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NewCodeTooLarge" , docs : "Output code is too large" }) , (16u8 , 16u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "CandidateNotInParentContext" , docs : "Candidate not in parent context." }) , (16u8 , 17u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidGroupIndex" , docs : "Invalid group index in core assignment." }) , (16u8 , 18u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InsufficientBacking" , docs : "Insufficient (non-majority) backing." }) , (16u8 , 19u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidBacking" , docs : "Invalid (bad signature, unknown validator, etc.) backing." }) , (16u8 , 20u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "NotCollatorSigned" , docs : "Collator did not sign PoV." }) , (16u8 , 21u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ValidationDataHashMismatch" , docs : "The validation data hash does not match expected." }) , (16u8 , 22u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "IncorrectDownwardMessageHandling" , docs : "The downward message queue is not processed correctly." }) , (16u8 , 23u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidUpwardMessages" , docs : "At least one upward message sent does not pass the acceptance criteria." }) , (16u8 , 24u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "HrmpWatermarkMishandling" , docs : "The candidate didn't follow the rules of HRMP watermark advancement." }) , (16u8 , 25u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidOutboundHrmp" , docs : "The HRMP messages sent by the candidate is not valid." }) , (16u8 , 26u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "InvalidValidationCodeHash" , docs : "The validation code hash of the candidate is not valid." }) , (16u8 , 27u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "ParaHeadMismatch" , docs : "The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the\ncommitments." }) , (16u8 , 28u8) => Some (ErrorDetails { pallet : "ParaInclusion" , error : "BitfieldReferencesFreedCore" , docs : "A bitfield that references a freed core,\neither intentionally or as part of a concluded\ninvalid dispute." }) , (17u8 , 0u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "TooManyInclusionInherents" , docs : "Inclusion inherent called more than once per block." }) , (17u8 , 1u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InvalidParentHeader" , docs : "The hash of the submitted parent header doesn't correspond to the saved block hash of\nthe parent." }) , (17u8 , 2u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "CandidateConcludedInvalid" , docs : "Disputed candidate that was concluded invalid." }) , (17u8 , 3u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "InherentOverweight" , docs : "The data given to the inherent will result in an overweight block." }) , (17u8 , 4u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeStatementsUnsortedOrDuplicates" , docs : "The ordering of dispute statements was invalid." }) , (17u8 , 5u8) => Some (ErrorDetails { pallet : "ParaInherent" , error : "DisputeInvalid" , docs : "A dispute statement was invalid." }) , (19u8 , 0u8) => Some (ErrorDetails { pallet : "Paras" , error : "NotRegistered" , docs : "Para is not registered in our system." }) , (19u8 , 1u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOnboard" , docs : "Para cannot be onboarded because it is already tracked by our system." }) , (19u8 , 2u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotOffboard" , docs : "Para cannot be offboarded at this time." }) , (19u8 , 3u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotUpgrade" , docs : "Para cannot be upgraded to a parachain." }) , (19u8 , 4u8) => Some (ErrorDetails { pallet : "Paras" , error : "CannotDowngrade" , docs : "Para cannot be downgraded to a parathread." }) , (19u8 , 5u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementStale" , docs : "The statement for PVF pre-checking is stale." }) , (19u8 , 6u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckStatementFuture" , docs : "The statement for PVF pre-checking is for a future session." }) , (19u8 , 7u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckValidatorIndexOutOfBounds" , docs : "Claimed validator index is out of bounds." }) , (19u8 , 8u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckInvalidSignature" , docs : "The signature for the PVF pre-checking is invalid." }) , (19u8 , 9u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDoubleVote" , docs : "The given validator already has cast a vote." }) , (19u8 , 10u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckSubjectInvalid" , docs : "The given PVF does not exist at the moment of process a vote." }) , (19u8 , 11u8) => Some (ErrorDetails { pallet : "Paras" , error : "PvfCheckDisabled" , docs : "The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism\nis disabled." }) , (22u8 , 0u8) => Some (ErrorDetails { pallet : "Ump" , error : "UnknownMessageIndex" , docs : "The message index given is unknown." }) , (22u8 , 1u8) => Some (ErrorDetails { pallet : "Ump" , error : "WeightOverLimit" , docs : "The amount of weight given is possibly not enough for executing the message." }) , (23u8 , 0u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelToSelf" , docs : "The sender tried to open a channel to themselves." }) , (23u8 , 1u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelInvalidRecipient" , docs : "The recipient is not a valid para." }) , (23u8 , 2u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroCapacity" , docs : "The requested capacity is zero." }) , (23u8 , 3u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelCapacityExceedsLimit" , docs : "The requested capacity exceeds the global limit." }) , (23u8 , 4u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelZeroMessageSize" , docs : "The requested maximum message size is 0." }) , (23u8 , 5u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelMessageSizeExceedsLimit" , docs : "The open request requested the message size that exceeds the global limit." }) , (23u8 , 6u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyExists" , docs : "The channel already exists" }) , (23u8 , 7u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyRequested" , docs : "There is already a request to open the same channel." }) , (23u8 , 8u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelLimitExceeded" , docs : "The sender already has the maximum number of allowed outbound channels." }) , (23u8 , 9u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelDoesntExist" , docs : "The channel from the sender to the origin doesn't exist." }) , (23u8 , 10u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelAlreadyConfirmed" , docs : "The channel is already confirmed." }) , (23u8 , 11u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "AcceptHrmpChannelLimitExceeded" , docs : "The recipient already has the maximum number of allowed inbound channels." }) , (23u8 , 12u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelUnauthorized" , docs : "The origin tries to close a channel where it is neither the sender nor the recipient." }) , (23u8 , 13u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelDoesntExist" , docs : "The channel to be closed doesn't exist." }) , (23u8 , 14u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CloseHrmpChannelAlreadyUnderway" , docs : "The channel close request is already requested." }) , (23u8 , 15u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "CancelHrmpOpenChannelUnauthorized" , docs : "Canceling is requested by neither the sender nor recipient of the open channel request." }) , (23u8 , 16u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelDoesntExist" , docs : "The open request doesn't exist." }) , (23u8 , 17u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "OpenHrmpChannelAlreadyConfirmed" , docs : "Cannot cancel an HRMP open channel request because it is already confirmed." }) , (23u8 , 18u8) => Some (ErrorDetails { pallet : "Hrmp" , error : "WrongWitness" , docs : "The provided witness data is wrong." }) , (25u8 , 0u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "DuplicateDisputeStatementSets" , docs : "Duplicate dispute statement sets provided." }) , (25u8 , 1u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "AncientDisputeStatement" , docs : "Ancient dispute statement provided." }) , (25u8 , 2u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "ValidatorIndexOutOfBounds" , docs : "Validator index on statement is out of bounds for session." }) , (25u8 , 3u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "InvalidSignature" , docs : "Invalid signature on statement." }) , (25u8 , 4u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "DuplicateStatement" , docs : "Validator vote submitted more than once to dispute." }) , (25u8 , 5u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "PotentialSpam" , docs : "Too many spam slots used by some specific validator." }) , (25u8 , 6u8) => Some (ErrorDetails { pallet : "ParasDisputes" , error : "SingleSidedDispute" , docs : "A dispute where there are only votes on one side." }) , (26u8 , 0u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotRegistered" , docs : "The ID is not registered." }) , (26u8 , 1u8) => Some (ErrorDetails { pallet : "Registrar" , error : "AlreadyRegistered" , docs : "The ID is already registered." }) , (26u8 , 2u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotOwner" , docs : "The caller is not the owner of this Id." }) , (26u8 , 3u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CodeTooLarge" , docs : "Invalid para code size." }) , (26u8 , 4u8) => Some (ErrorDetails { pallet : "Registrar" , error : "HeadDataTooLarge" , docs : "Invalid para head data size." }) , (26u8 , 5u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParachain" , docs : "Para is not a Parachain." }) , (26u8 , 6u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotParathread" , docs : "Para is not a Parathread." }) , (26u8 , 7u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDeregister" , docs : "Cannot deregister para" }) , (26u8 , 8u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotDowngrade" , docs : "Cannot schedule downgrade of parachain to parathread" }) , (26u8 , 9u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotUpgrade" , docs : "Cannot schedule upgrade of parathread to parachain" }) , (26u8 , 10u8) => Some (ErrorDetails { pallet : "Registrar" , error : "ParaLocked" , docs : "Para is locked from manipulation by the manager. Must use parachain or relay chain governance." }) , (26u8 , 11u8) => Some (ErrorDetails { pallet : "Registrar" , error : "NotReserved" , docs : "The ID given for registration has not been reserved." }) , (26u8 , 12u8) => Some (ErrorDetails { pallet : "Registrar" , error : "EmptyCode" , docs : "Registering parachain with empty code is not allowed." }) , (26u8 , 13u8) => Some (ErrorDetails { pallet : "Registrar" , error : "CannotSwap" , docs : "Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are\ncorrect for the swap to work." }) , (27u8 , 0u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionInProgress" , docs : "This auction is already in progress." }) , (27u8 , 1u8) => Some (ErrorDetails { pallet : "Auctions" , error : "LeasePeriodInPast" , docs : "The lease period is in the past." }) , (27u8 , 2u8) => Some (ErrorDetails { pallet : "Auctions" , error : "ParaNotRegistered" , docs : "Para is not registered" }) , (27u8 , 3u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotCurrentAuction" , docs : "Not a current auction." }) , (27u8 , 4u8) => Some (ErrorDetails { pallet : "Auctions" , error : "NotAuction" , docs : "Not an auction." }) , (27u8 , 5u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AuctionEnded" , docs : "Auction has already ended." }) , (27u8 , 6u8) => Some (ErrorDetails { pallet : "Auctions" , error : "AlreadyLeasedOut" , docs : "The para is already leased out for part of this range." }) , (28u8 , 0u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodInPast" , docs : "The current lease period is more than the first lease period." }) , (28u8 , 1u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FirstPeriodTooFarInFuture" , docs : "The first lease period needs to at least be less than 3 `max_value`." }) , (28u8 , 2u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodBeforeFirstPeriod" , docs : "Last lease period must be greater than first lease period." }) , (28u8 , 3u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LastPeriodTooFarInFuture" , docs : "The last lease period cannot be more than 3 periods after the first period." }) , (28u8 , 4u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CannotEndInPast" , docs : "The campaign ends before the current block number. The end must be in the future." }) , (28u8 , 5u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "EndTooFarInFuture" , docs : "The end date for this crowdloan is not sensible." }) , (28u8 , 6u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "Overflow" , docs : "There was an overflow." }) , (28u8 , 7u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionTooSmall" , docs : "The contribution was below the minimum, `MinContribution`." }) , (28u8 , 8u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidParaId" , docs : "Invalid fund index." }) , (28u8 , 9u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "CapExceeded" , docs : "Contributions exceed maximum amount." }) , (28u8 , 10u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "ContributionPeriodOver" , docs : "The contribution period has already ended." }) , (28u8 , 11u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidOrigin" , docs : "The origin of this call is invalid." }) , (28u8 , 12u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotParachain" , docs : "This crowdloan does not correspond to a parachain." }) , (28u8 , 13u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "LeaseActive" , docs : "This parachain lease is still active and retirement cannot yet begin." }) , (28u8 , 14u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "BidOrLeaseActive" , docs : "This parachain's bid or lease is still active and withdraw cannot yet begin." }) , (28u8 , 15u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "FundNotEnded" , docs : "The crowdloan has not yet ended." }) , (28u8 , 16u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoContributions" , docs : "There are no contributions stored in this crowdloan." }) , (28u8 , 17u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NotReadyToDissolve" , docs : "The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period." }) , (28u8 , 18u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "InvalidSignature" , docs : "Invalid signature." }) , (28u8 , 19u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "MemoTooLarge" , docs : "The provided memo is too large." }) , (28u8 , 20u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "AlreadyInNewRaise" , docs : "The fund is already in `NewRaise`" }) , (28u8 , 21u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "VrfDelayInProgress" , docs : "No contributions allowed during the VRF delay" }) , (28u8 , 22u8) => Some (ErrorDetails { pallet : "Crowdloan" , error : "NoLeasePeriod" , docs : "A lease period has not started yet, due to an offset in the starting block." }) , (29u8 , 0u8) => Some (ErrorDetails { pallet : "Slots" , error : "ParaNotOnboarding" , docs : "The parachain ID is not onboarding." }) , (29u8 , 1u8) => Some (ErrorDetails { pallet : "Slots" , error : "LeaseError" , docs : "There was an error with the lease." }) , (30u8 , 0u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "ParaDoesntExist" , docs : "The specified parachain or parathread is not registered." }) , (30u8 , 1u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "ParaAlreadyExists" , docs : "The specified parachain or parathread is already registered." }) , (30u8 , 2u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "ExceedsMaxMessageSize" , docs : "A DMP message couldn't be sent because it exceeds the maximum size allowed for a downward\nmessage." }) , (30u8 , 3u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "CouldntCleanup" , docs : "Could not schedule para cleanup." }) , (30u8 , 4u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "NotParathread" , docs : "Not a parathread." }) , (30u8 , 5u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "NotParachain" , docs : "Not a parachain." }) , (30u8 , 6u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "CannotUpgrade" , docs : "Cannot upgrade parathread." }) , (30u8 , 7u8) => Some (ErrorDetails { pallet : "ParasSudoWrapper" , error : "CannotDowngrade" , docs : "Cannot downgrade parachain." }) , (31u8 , 0u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "ParaDoesntExist" , docs : "The specified parachain or parathread is not registered." }) , (31u8 , 1u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "NotParathread" , docs : "Not a parathread." }) , (31u8 , 2u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "CannotUpgrade" , docs : "Cannot upgrade parathread." }) , (31u8 , 3u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "CannotDowngrade" , docs : "Cannot downgrade parachain." }) , (31u8 , 4u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "SlotAlreadyAssigned" , docs : "Permanent or Temporary slot already assigned." }) , (31u8 , 5u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "SlotNotAssigned" , docs : "Permanent or Temporary slot has not been assigned." }) , (31u8 , 6u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "OngoingLeaseExists" , docs : "An ongoing lease already exists." }) , (31u8 , 7u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "MaxPermanentSlotsExceeded" , docs : "" }) , (31u8 , 8u8) => Some (ErrorDetails { pallet : "AssignedSlots" , error : "MaxTemporarySlotsExceeded" , docs : "" }) , (32u8 , 0u8) => Some (ErrorDetails { pallet : "Sudo" , error : "RequireSudo" , docs : "Sender must be the Sudo account" }) , (40u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (40u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (40u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (40u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (40u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (40u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (40u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (40u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (40u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (40u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeRococoGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (41u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "InvalidJustification" , docs : "The given justification is invalid for the given header." }) , (41u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "InvalidAuthoritySet" , docs : "The authority set from the underlying header chain is invalid." }) , (41u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "TooManyRequests" , docs : "There are too many requests for the current window to handle." }) , (41u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "OldHeader" , docs : "The header being imported is older than the best finalized header known to the pallet." }) , (41u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "UnknownHeader" , docs : "The header is unknown to the pallet." }) , (41u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "UnsupportedScheduledChange" , docs : "The scheduled authority set change found in the header is unsupported by the pallet.\n\nThis is the case for non-standard (e.g forced) authority set changes." }) , (41u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "NotInitialized" , docs : "The pallet is not yet initialized." }) , (41u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "AlreadyInitialized" , docs : "The pallet has already been initialized." }) , (41u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "Halted" , docs : "All pallet operations are halted." }) , (41u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeWococoGrandpa" , error : "StorageRootMismatch" , docs : "The storage proof doesn't contains storage root. So it is invalid for given header." }) , (43u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (43u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (43u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (43u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (43u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (43u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (43u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (43u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (43u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (43u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (43u8 , 10u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (43u8 , 11u8) => Some (ErrorDetails { pallet : "BridgeRococoMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (44u8 , 0u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "Halted" , docs : "All pallet operations are halted." }) , (44u8 , 1u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "MessageRejectedByChainVerifier" , docs : "Message has been treated as invalid by chain verifier." }) , (44u8 , 2u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "MessageRejectedByLaneVerifier" , docs : "Message has been treated as invalid by lane verifier." }) , (44u8 , 3u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "FailedToWithdrawMessageFee" , docs : "Submitter has failed to pay fee for delivering and dispatching messages." }) , (44u8 , 4u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "TooManyMessagesInTheProof" , docs : "The transaction brings too many messages." }) , (44u8 , 5u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "InvalidMessagesProof" , docs : "Invalid messages has been submitted." }) , (44u8 , 6u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "InvalidMessagesDeliveryProof" , docs : "Invalid messages delivery proof has been submitted." }) , (44u8 , 7u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "InvalidUnrewardedRelayers" , docs : "The bridged chain has invalid `UnrewardedRelayers` in its storage (fatal for the lane)." }) , (44u8 , 8u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "InvalidUnrewardedRelayersState" , docs : "The relayer has declared invalid unrewarded relayers state in the\n`receive_messages_delivery_proof` call." }) , (44u8 , 9u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "MessageIsAlreadyDelivered" , docs : "The message someone is trying to work with (i.e. increase fee) is already-delivered." }) , (44u8 , 10u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "MessageIsNotYetSent" , docs : "The message someone is trying to work with (i.e. increase fee) is not yet sent." }) , (44u8 , 11u8) => Some (ErrorDetails { pallet : "BridgeWococoMessages" , error : "TryingToConfirmMoreMessagesThanExpected" , docs : "The number of actually confirmed messages is going to be larger than the number of\nmessages in the proof. This may mean that this or bridged chain storage is corrupted." }) , (80u8 , 0u8) => Some (ErrorDetails { pallet : "Collective" , error : "NotMember" , docs : "Account is not a member" }) , (80u8 , 1u8) => Some (ErrorDetails { pallet : "Collective" , error : "DuplicateProposal" , docs : "Duplicate proposals not allowed" }) , (80u8 , 2u8) => Some (ErrorDetails { pallet : "Collective" , error : "ProposalMissing" , docs : "Proposal must exist" }) , (80u8 , 3u8) => Some (ErrorDetails { pallet : "Collective" , error : "WrongIndex" , docs : "Mismatched index" }) , (80u8 , 4u8) => Some (ErrorDetails { pallet : "Collective" , error : "DuplicateVote" , docs : "Duplicate vote ignored" }) , (80u8 , 5u8) => Some (ErrorDetails { pallet : "Collective" , error : "AlreadyInitialized" , docs : "Members are already initialized!" }) , (80u8 , 6u8) => Some (ErrorDetails { pallet : "Collective" , error : "TooEarly" , docs : "The close call was made too early, before the end of the voting." }) , (80u8 , 7u8) => Some (ErrorDetails { pallet : "Collective" , error : "TooManyProposals" , docs : "There can only be a maximum of `MaxProposals` active proposals." }) , (80u8 , 8u8) => Some (ErrorDetails { pallet : "Collective" , error : "WrongProposalWeight" , docs : "The given weight bound for the proposal was too low." }) , (80u8 , 9u8) => Some (ErrorDetails { pallet : "Collective" , error : "WrongProposalLength" , docs : "The given length bound for the proposal was too low." }) , (81u8 , 0u8) => Some (ErrorDetails { pallet : "Membership" , error : "AlreadyMember" , docs : "Already a member." }) , (81u8 , 1u8) => Some (ErrorDetails { pallet : "Membership" , error : "NotMember" , docs : "Not a member." }) , (90u8 , 0u8) => Some (ErrorDetails { pallet : "Utility" , error : "TooManyCalls" , docs : "Too many calls batched." }) , (91u8 , 0u8) => Some (ErrorDetails { pallet : "Proxy" , error : "TooMany" , docs : "There are too many proxies registered or too many announcements pending." }) , (91u8 , 1u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotFound" , docs : "Proxy registration not found." }) , (91u8 , 2u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NotProxy" , docs : "Sender is not a proxy of the account to be proxied." }) , (91u8 , 3u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unproxyable" , docs : "A call which is incompatible with the proxy type's filter was attempted." }) , (91u8 , 4u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Duplicate" , docs : "Account is already a proxy." }) , (91u8 , 5u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoPermission" , docs : "Call may not be made by proxy because it may escalate its privileges." }) , (91u8 , 6u8) => Some (ErrorDetails { pallet : "Proxy" , error : "Unannounced" , docs : "Announcement, if made at all, was made too recently." }) , (91u8 , 7u8) => Some (ErrorDetails { pallet : "Proxy" , error : "NoSelfProxy" , docs : "Cannot add self as proxy." }) , (92u8 , 0u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MinimumThreshold" , docs : "Threshold must be 2 or greater." }) , (92u8 , 1u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyApproved" , docs : "Call is already approved by this signatory." }) , (92u8 , 2u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoApprovalsNeeded" , docs : "Call doesn't need any (more) approvals." }) , (92u8 , 3u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooFewSignatories" , docs : "There are too few signatories in the list." }) , (92u8 , 4u8) => Some (ErrorDetails { pallet : "Multisig" , error : "TooManySignatories" , docs : "There are too many signatories in the list." }) , (92u8 , 5u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SignatoriesOutOfOrder" , docs : "The signatories were provided out of order; they should be ordered." }) , (92u8 , 6u8) => Some (ErrorDetails { pallet : "Multisig" , error : "SenderInSignatories" , docs : "The sender was contained in the other signatories; it shouldn't be." }) , (92u8 , 7u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotFound" , docs : "Multisig operation not found when attempting to cancel." }) , (92u8 , 8u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NotOwner" , docs : "Only the account that originally created the multisig is able to cancel it." }) , (92u8 , 9u8) => Some (ErrorDetails { pallet : "Multisig" , error : "NoTimepoint" , docs : "No timepoint was given, yet the multisig operation is already underway." }) , (92u8 , 10u8) => Some (ErrorDetails { pallet : "Multisig" , error : "WrongTimepoint" , docs : "A different timepoint was given to the multisig operation that is underway." }) , (92u8 , 11u8) => Some (ErrorDetails { pallet : "Multisig" , error : "UnexpectedTimepoint" , docs : "A timepoint was given, yet no multisig operation is underway." }) , (92u8 , 12u8) => Some (ErrorDetails { pallet : "Multisig" , error : "MaxWeightTooLow" , docs : "The maximum weight information provided was too low." }) , (92u8 , 13u8) => Some (ErrorDetails { pallet : "Multisig" , error : "AlreadyStored" , docs : "The data to be stored is already stored." }) , (99u8 , 0u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Unreachable" , docs : "The desired destination was unreachable, generally because there is a no way of routing\nto it." }) , (99u8 , 1u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "SendFailure" , docs : "There was some other issue (i.e. not to do with routing) in sending the message. Perhaps\na lack of space for buffering the message." }) , (99u8 , 2u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Filtered" , docs : "The message execution fails the filter." }) , (99u8 , 3u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "UnweighableMessage" , docs : "The message's weight could not be determined." }) , (99u8 , 4u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "DestinationNotInvertible" , docs : "The destination `MultiLocation` provided cannot be inverted." }) , (99u8 , 5u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "Empty" , docs : "The assets to be sent are empty." }) , (99u8 , 6u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "CannotReanchor" , docs : "Could not re-anchor the assets to declare the fees for the destination chain." }) , (99u8 , 7u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "TooManyAssets" , docs : "Too many assets have been attempted for transfer." }) , (99u8 , 8u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "InvalidOrigin" , docs : "Origin is invalid for sending." }) , (99u8 , 9u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadVersion" , docs : "The version of the `Versioned` value used is not able to be interpreted." }) , (99u8 , 10u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "BadLocation" , docs : "The given location could not be used (e.g. because it cannot be expressed in the\ndesired version of XCM)." }) , (99u8 , 11u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "NoSubscription" , docs : "The referenced subscription could not be found." }) , (99u8 , 12u8) => Some (ErrorDetails { pallet : "XcmPallet" , error : "AlreadySubscribed" , docs : "The location is invalid since it already has a subscription from us." }) , _ => None } } else { None } diff --git a/frame/assistants/client-rococo/src/types/account.rs b/frame/assistants/client-rococo/src/types/account.rs index 235ef08bd..1868df508 100644 --- a/frame/assistants/client-rococo/src/types/account.rs +++ b/frame/assistants/client-rococo/src/types/account.rs @@ -45,7 +45,8 @@ impl RococoAccount { let account_id = AccountId::from(public); // real account, convert to account id - let real = real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real))); + let real = + real.map(|real| AccountId::from(array_bytes::hex2array_unchecked(real.as_ref()))); Ok(Self { account_id, diff --git a/frame/assistants/feemarket-ns2s/Cargo.toml b/frame/assistants/feemarket-ns2s/Cargo.toml deleted file mode 100644 index c4a143997..000000000 --- a/frame/assistants/feemarket-ns2s/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] -authors = ["Darwinia Network "] -description = "Darwinia bridger" -documentation = "https://rust-docs.darwinia.network/bridger" -edition = "2021" -homepage = "https://github.com/darwinia-network/bridger" -include = ["Cargo.toml", "**/*.rs", "README.md", "LICENSE"] -keywords = ["substrate", "darwinia"] -license = "MIT" -name = "feemarket-ns2s" -readme = 'README.md' -repository = "https://github.com/darwinia-network/bridger" -version = "0.5.7" - -[dependencies] - -async-trait = "0.1" -serde = { version = "1", features = ["derive"] } -thiserror = "1.0" -tracing = "0.1" - -component-subscan = { path = "../../components/subscan" } - -abstract-bridge-s2s = { path = "../../abstract/bridge-s2s" } -abstract-feemarket-s2s = { path = "../../abstract/feemarket-s2s" } -support-toolkit = { path = "../../supports/support-toolkit", features = ["log"] } diff --git a/frame/assistants/feemarket-ns2s/src/error.rs b/frame/assistants/feemarket-ns2s/src/error.rs deleted file mode 100644 index dd760ed11..000000000 --- a/frame/assistants/feemarket-ns2s/src/error.rs +++ /dev/null @@ -1,13 +0,0 @@ -use thiserror::Error as ThisError; - -pub type FeemarketResult = Result; - -#[derive(ThisError, Debug)] -pub enum FeemarketError { - #[error("Wrong data convert: {0}")] - WrongConvert(String), - #[error(transparent)] - Subscan(#[from] component_subscan::SubscanComponentError), - #[error("Custom: {0}")] - Custom(String), -} diff --git a/frame/assistants/feemarket-ns2s/src/lib.rs b/frame/assistants/feemarket-ns2s/src/lib.rs deleted file mode 100644 index 291d8f86c..000000000 --- a/frame/assistants/feemarket-ns2s/src/lib.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod error; -pub mod relay; diff --git a/frame/assistants/feemarket-ns2s/src/relay/basic.rs b/frame/assistants/feemarket-ns2s/src/relay/basic.rs deleted file mode 100644 index c5a2a247a..000000000 --- a/frame/assistants/feemarket-ns2s/src/relay/basic.rs +++ /dev/null @@ -1,136 +0,0 @@ -use std::ops::Range; - -use abstract_bridge_s2s::error::{S2SClientError, S2SClientResult}; -use abstract_bridge_s2s::strategy::{RelayReference, RelayStrategy}; - -use abstract_feemarket_s2s::api::FeemarketApiRelay; -use abstract_feemarket_s2s::types::Chain; -use support_toolkit::logk; - -/// Basic relay strategy -/// 1. if you are assigned relayer you will relay all order whether or not it times out -/// 2. if you aren't assigned relayer, only participate in the part about time out, earn more rewards -/// 3. if not have any assigned relayers, everyone participates in the relay. -// #[derive(Clone)] -pub struct BasicRelayStrategy { - api: A, - account: ::AccountId, -} - -impl BasicRelayStrategy { - pub fn new(api: A, account: ::AccountId) -> Self { - Self { api, account } - } -} - -impl Clone for BasicRelayStrategy { - fn clone(&self) -> Self { - Self { - api: self.api.clone(), - account: self.account.clone(), - } - } -} - -#[async_trait::async_trait] -impl RelayStrategy for BasicRelayStrategy { - async fn decide(&mut self, reference: RelayReference) -> S2SClientResult { - let lane = reference.lane; - let nonce = reference.nonce; - tracing::trace!( - target: "feemarket", - "{} determine whether to relay for nonce: {}", - logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), - nonce, - ); - let order = self - .api - .order(lane, nonce) - .await - .map_err(|e| S2SClientError::Custom(format!("[feemarket]: {:?}", e)))?; - - // If the order is not exists. - // 1. You are too behind. - // 2. The network question - // So, you can skip this currently - // Related: https://github.com/darwinia-network/darwinia-common/blob/90add536ed320ec7e17898e695c65ee9d7ce79b0/frame/fee-market/src/lib.rs?#L177 - if order.is_none() { - tracing::info!( - target: "feemarket", - "{} not found order by nonce: {}, so decide don't relay this nonce", - logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), - nonce, - ); - return Ok(false); - } - // ----- - - let order = order.unwrap(); - let relayers = order.relayers; - - // If not have any assigned relayers, everyone participates in the relay. - if relayers.is_empty() { - tracing::info!( - target: "feemarket", - "{} not found any assigned relayers so relay this nonce({}) anyway", - logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), - nonce, - ); - return Ok(true); - } - - // ----- - - let prior_relayer = relayers.iter().find(|item| item.id == self.account); - let is_assigned_relayer = prior_relayer.is_some(); - - // If you are assigned relayer, you must relay this nonce. - // If you don't do that, the fee market pallet will slash your deposit. - // Even though it is a timeout, although it will slash your deposit after the timeout is delivered, - // you can still get relay rewards. - if is_assigned_relayer { - tracing::info!( - target: "feemarket", - "{} you are assigned relayer, you must be relay this nonce({})", - logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), - nonce, - ); - return Ok(true); - } - - // ----- - - // If you aren't assigned relayer, only participate in the part about time out, earn more rewards - let latest_block_number = self - .api - .best_finalized_header_number() - .await - .map_err(|e| S2SClientError::Custom(format!("[feemarket]: {:?}", e)))?; - let ranges = relayers - .iter() - .map(|item| item.valid_range.clone()) - .collect::::BlockNumber>>>(); - - let mut maximum_timeout: ::BlockNumber = Default::default(); - for range in ranges { - maximum_timeout = std::cmp::max(maximum_timeout, range.end); - } - // If this order has timed out, decide to relay - if latest_block_number > maximum_timeout { - tracing::info!( - target: "feemarket", - "{} you aren't assigned relayer. but this nonce is timeout. so the decide is relay this nonce: {}", - logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), - nonce, - ); - return Ok(true); - } - tracing::info!( - target: "feemarket", - "{} you aren't assigned relay. and this nonce({}) is on-time. so don't relay this", - logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), - nonce, - ); - Ok(false) - } -} diff --git a/frame/assistants/feemarket-s2s/Cargo.toml b/frame/assistants/feemarket-s2s/Cargo.toml index c3f814644..e450ad41d 100644 --- a/frame/assistants/feemarket-s2s/Cargo.toml +++ b/frame/assistants/feemarket-s2s/Cargo.toml @@ -19,27 +19,8 @@ serde = { version = "1", features = ["derive"] } thiserror = "1.0" tracing = "0.1" -codec = { package = "parity-scale-codec", version = "2" } +component-subscan = { path = "../../components/subscan" } -bp-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -messages-relay = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-substrate-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -relay-utils = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } - -pallet-fee-market = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } - -## Substrate Dependencies -frame-support = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } - - -component-subscan = { path = "../../components/subscan" } - - -# Substrate Dependencies - -[dev-dependencies] -tokio = { version = "1", features = ["full"] } - -relay-pangolin-client = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } +bridge-s2s-traits = { path = "../../traits/bridge-s2s" } +feemarket-s2s-traits = { path = "../../traits/feemarket-s2s" } +support-toolkit = { path = "../../supports/support-toolkit", features = ["log"] } diff --git a/frame/assistants/feemarket-s2s/src/api.rs b/frame/assistants/feemarket-s2s/src/api.rs deleted file mode 100644 index 9cedc38a8..000000000 --- a/frame/assistants/feemarket-s2s/src/api.rs +++ /dev/null @@ -1,79 +0,0 @@ -use bp_messages::{LaneId, MessageNonce}; -use pallet_fee_market::types::{Order, Relayer}; -use relay_substrate_client::{Chain, ChainBase}; - -use crate::error::FeemarketResult; - -#[async_trait::async_trait] -pub trait FeemarketApi: 'static + Send + Sync + Clone { - type Chain: Chain; - - /// Reconnect - async fn reconnect(&mut self) -> FeemarketResult<()>; - - fn lane_id(&self) -> LaneId; - - /// Return number of the best finalized block. - async fn best_finalized_header_number( - &self, - ) -> FeemarketResult<::BlockNumber>; - - /// Query assigned relayers - async fn assigned_relayers( - &self, - ) -> FeemarketResult< - Vec::AccountId, ::Balance>>, - >; - - /// The assigned relayer index where the current account is located - async fn my_assigned_info( - &self, - ) -> FeemarketResult< - Option<( - usize, - Relayer<::AccountId, ::Balance>, - )>, - >; - - /// Query order - async fn order( - &self, - laned_id: LaneId, - message_nonce: MessageNonce, - ) -> FeemarketResult< - Option< - Order< - ::AccountId, - ::BlockNumber, - ::Balance, - >, - >, - >; - - /// Query all relayers - async fn relayers(&self) -> FeemarketResult::AccountId>>; - - /// Query relayer info by account id - async fn relayer( - &self, - account: ::AccountId, - ) -> FeemarketResult< - Option::AccountId, ::Balance>>, - >; - - async fn is_relayer(&self) -> FeemarketResult; - - /// Update relay fee - async fn update_relay_fee( - &self, - // signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()>; - - /// Update locked collateral - async fn update_locked_collateral( - &self, - // signer: ::AccountKeyPair, - amount: ::Balance, - ) -> FeemarketResult<()>; -} diff --git a/frame/assistants/feemarket-s2s/src/config.rs b/frame/assistants/feemarket-s2s/src/config.rs deleted file mode 100644 index ae3b76ed5..000000000 --- a/frame/assistants/feemarket-s2s/src/config.rs +++ /dev/null @@ -1,14 +0,0 @@ -use serde::{Deserialize, Serialize}; - -use component_subscan::SubscanConfig; - -/// feemarket config -#[derive(Clone, Debug, Deserialize, Serialize)] -pub struct FeemarketConfig { - /// left chain subscan config - #[serde(skip_serializing_if = "Option::is_none")] - pub subscan_left: Option, - /// right chain subscan config - #[serde(skip_serializing_if = "Option::is_none")] - pub subscan_right: Option, -} diff --git a/frame/assistants/feemarket-s2s/src/error.rs b/frame/assistants/feemarket-s2s/src/error.rs index 2c9f39697..dd760ed11 100644 --- a/frame/assistants/feemarket-s2s/src/error.rs +++ b/frame/assistants/feemarket-s2s/src/error.rs @@ -4,8 +4,6 @@ pub type FeemarketResult = Result; #[derive(ThisError, Debug)] pub enum FeemarketError { - #[error(transparent)] - RelayClient(#[from] relay_substrate_client::Error), #[error("Wrong data convert: {0}")] WrongConvert(String), #[error(transparent)] diff --git a/frame/assistants/feemarket-s2s/src/fee/crazy.rs b/frame/assistants/feemarket-s2s/src/fee/crazy.rs deleted file mode 100644 index 5126da366..000000000 --- a/frame/assistants/feemarket-s2s/src/fee/crazy.rs +++ /dev/null @@ -1,119 +0,0 @@ -use relay_substrate_client::Chain; - -use crate::api::FeemarketApi; -use crate::error::{FeemarketError, FeemarketResult}; -use crate::fee::UpdateFeeStrategy; - -#[derive(Clone)] -pub struct CrazyStrategy { - api_left: AS, - api_right: AT, -} - -impl CrazyStrategy { - pub fn new(api_left: AS, api_right: AT) -> Self { - Self { - api_left, - api_right, - } - } -} - -#[async_trait::async_trait] -impl UpdateFeeStrategy for CrazyStrategy { - async fn handle(&self) -> FeemarketResult<()> { - tracing::trace!( - target: "feemarket", - "[femarket] [crazy] Start update fee", - ); - self.handle_source().await?; - self.handle_target().await?; - tracing::trace!( - target: "feemarket", - "[femarket] [crazy] Fee updated", - ); - Ok(()) - } -} - -impl CrazyStrategy { - async fn handle_source(&self) -> FeemarketResult<()> { - if !self.api_left.is_relayer().await? { - tracing::warn!( - target: "feemarket", - "[femarket] [crazy] [{}] You are not a relayer, please register first", - AS::Chain::NAME, - ); - return Ok(()); - } - - // Query all assigned relayers - let min_fee = match self.api_left.my_assigned_info().await? { - Some((0, _)) => { - tracing::info!( - target: "feemarket", - "[femarket] [crazy] [{}] You are first assigned relayer, nothing to do", - AS::Chain::NAME, - ); - return Ok(()); - } - Some((_i, relayer)) => relayer.fee, - None => 51u32.into(), - }; - - // Nice ( - // RISK: If the cost is not judged, it may be a negative benefit. - let new_fee = min_fee - 1u32.into(); - let num_balance: u64 = new_fee - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - tracing::info!( - target: "feemarket", - "[femarket] [crazy] [{}] Update pangolin fee: {}", - AS::Chain::NAME, - num_balance, - ); - self.api_left.update_relay_fee(new_fee).await?; - Ok(()) - } - - async fn handle_target(&self) -> FeemarketResult<()> { - if !self.api_right.is_relayer().await? { - tracing::warn!( - target: "feemarket", - "[femarket] [crazy] [{}] You are not a relayer, please register first", - AT::Chain::NAME, - ); - return Ok(()); - } - - // Query all assigned relayers - let min_fee = match self.api_right.my_assigned_info().await? { - Some((0, _)) => { - tracing::info!( - target: "feemarket", - "[femarket] [crazy] [{}] You are first assigned relayer, nothing to do", - AS::Chain::NAME, - ); - return Ok(()); - } - Some((_i, relayer)) => relayer.fee, - None => 51u32.into(), - }; - - // Nice ( - // RISK: If the cost is not judged, it may be a negative benefit. - let new_fee = min_fee - 1u32.into(); - let num_balance: u64 = new_fee - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - tracing::info!( - target: "feemarket", - "[femarket] [crazy] [{}] Update pangolin fee: {}", - AT::Chain::NAME, - num_balance, - ); - self.api_right.update_relay_fee(new_fee).await?; - Ok(()) - } -} diff --git a/frame/assistants/feemarket-s2s/src/fee/mod.rs b/frame/assistants/feemarket-s2s/src/fee/mod.rs deleted file mode 100644 index eab4db48e..000000000 --- a/frame/assistants/feemarket-s2s/src/fee/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub use self::crazy::*; -pub use self::nothing::*; -pub use self::reasonable::*; -pub use self::traits::*; - -mod crazy; -mod nothing; -mod reasonable; -mod traits; diff --git a/frame/assistants/feemarket-s2s/src/fee/nothing.rs b/frame/assistants/feemarket-s2s/src/fee/nothing.rs deleted file mode 100644 index 2ce732db7..000000000 --- a/frame/assistants/feemarket-s2s/src/fee/nothing.rs +++ /dev/null @@ -1,12 +0,0 @@ -use crate::error::FeemarketResult; -use crate::fee::UpdateFeeStrategy; - -#[derive(Clone)] -pub struct NothingStrategy; - -#[async_trait::async_trait] -impl UpdateFeeStrategy for NothingStrategy { - async fn handle(&self) -> FeemarketResult<()> { - Ok(()) - } -} diff --git a/frame/assistants/feemarket-s2s/src/fee/reasonable.rs b/frame/assistants/feemarket-s2s/src/fee/reasonable.rs deleted file mode 100644 index 3c75d0b68..000000000 --- a/frame/assistants/feemarket-s2s/src/fee/reasonable.rs +++ /dev/null @@ -1,299 +0,0 @@ -use std::marker::PhantomData; -use std::time::{SystemTime, UNIX_EPOCH}; - -use relay_substrate_client::{Chain, ChainBase}; -use relay_utils::MaybeConnectionError; -use sp_runtime::traits::Saturating; -use sp_runtime::{FixedPointNumber, FixedU128}; - -use component_subscan::{Subscan, SubscanComponent}; - -use crate::api::FeemarketApi; -use crate::config::FeemarketConfig; -use crate::error::{FeemarketError, FeemarketResult}; -use crate::fee::UpdateFeeStrategy; - -#[derive(Clone)] -pub struct ReasonableStrategy { - api_left: AS, - api_right: AT, - subscan_left: Subscan, - subscan_right: Subscan, - min_relay_fee_left: ::Balance, - min_relay_fee_right: ::Balance, -} - -impl ReasonableStrategy { - pub fn new( - feemarket_config: FeemarketConfig, - api_left: AS, - api_right: AT, - min_relay_fee_left: u128, - min_relay_fee_right: u128, - ) -> FeemarketResult { - let subscan_config_left = feemarket_config.subscan_left; - let subscan_config_right = feemarket_config.subscan_right; - let exists_subscan_config = subscan_config_left.is_some() && subscan_config_right.is_some(); - if !exists_subscan_config { - return Err(FeemarketError::Custom("Missing subscan config".to_string())); - } - - let min_source = min_relay_fee_left - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - let min_target = min_relay_fee_right - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - - let subscan_left = SubscanComponent::component(subscan_config_left.unwrap())?; - let subscan_right = SubscanComponent::component(subscan_config_right.unwrap())?; - - Ok(Self { - api_left, - api_right, - subscan_left, - subscan_right, - min_relay_fee_left: min_source, - min_relay_fee_right: min_target, - }) - } -} - -#[async_trait::async_trait] -impl UpdateFeeStrategy for ReasonableStrategy { - async fn handle(&self) -> FeemarketResult<()> { - let top100_source = self.subscan_left.extrinsics(1, 100).await?; - let top100_target = self.subscan_right.extrinsics(1, 100).await?; - let top100_source = top100_source.data()?.ok_or_else(|| { - FeemarketError::Custom("Can not query pangolin extrinsics data".to_string()) - })?; - let top100_target = top100_target.data()?.ok_or_else(|| { - FeemarketError::Custom("Can not query pangoro extrinsics data".to_string()) - })?; - - let max_fee_source = top100_source - .extrinsics - .unwrap_or_default() - .iter() - .map(|item| item.fee) - .max() - .unwrap_or(0) - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - let max_fee_target = top100_target - .extrinsics - .unwrap_or_default() - .iter() - .map(|item| item.fee) - .max() - .unwrap_or(0) - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - - let conversion_balance = - ConversionBalance::::new(&self.subscan_left, &self.subscan_right); - - let top100_max_cost_source = conversion_balance - .conversion_right_to_left(max_fee_target) - .await? - .saturating_add(max_fee_source); - let top100_max_cost_target = conversion_balance - .conversion_left_to_right(max_fee_source) - .await? - .saturating_add(max_fee_target); - - // Nice ( - let mul_source: ::Balance = 15u64 - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - let expected_fee_source = top100_max_cost_source - .saturating_mul(mul_source) - .saturating_add(self.min_relay_fee_left); - let mul_target: ::Balance = 15u64 - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - let expected_fee_target = top100_max_cost_target - .saturating_mul(mul_target) - .saturating_add(self.min_relay_fee_right); - - match self.update_left_fee(expected_fee_source).await { - Err(FeemarketError::RelayClient(e)) => { - if e.is_connection_error() { - tracing::debug!( - target: "feemarket", - "[feemarket] [reasonable] [{}] Lost rpc connection", - AS::Chain::NAME, - ); - // if let Err(re) = self.helper.reconnect_pangoro().await { - // tracing::error!( - // target: "feemarket", - // "[pangoro] Failed to reconnect substrate client: {:?} (update fee strategy)", - // re - // ); - // } - } - return Err(e.into()); - } - Err(e) => return Err(e), - _ => {} - } - match self.update_right_fee(expected_fee_target).await { - Err(FeemarketError::RelayClient(e)) => { - if e.is_connection_error() { - tracing::debug!( - target: "feemarket", - "[feemarket] [reasonable] [{}] Lost rpc connection", - AT::Chain::NAME, - ); - // if let Err(re) = self.helper.reconnect_pangoro().await { - // tracing::error!( - // target: "feemarket", - // "[pangoro] Failed to reconnect substrate client: {:?} (update fee strategy)", - // re - // ); - // } - } - return Err(e.into()); - } - Err(e) => return Err(e), - _ => {} - } - Ok(()) - } -} - -impl ReasonableStrategy { - async fn update_left_fee( - &self, - expected_fee_source: ::Balance, - ) -> FeemarketResult<()> { - let efpu: u128 = expected_fee_source - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - tracing::info!( - target: "ffeemarket", - "[feemarket] [reasonable] [{}] Update pangolin fee: {}", - AS::Chain::NAME, - efpu, - ); - self.api_left.update_relay_fee(expected_fee_source).await - } - - async fn update_right_fee( - &self, - expected_fee_target: ::Balance, - ) -> FeemarketResult<()> { - let efpu: u128 = expected_fee_target - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - tracing::info!( - target: "feemarket", - "[feemarket] [reasonable] [{}] Update pangoro fee: {}", - AT::Chain::NAME, - efpu, - ); - self.api_right.update_relay_fee(expected_fee_target).await - } -} - -struct ConversionBalance<'a, SC: Chain, TC: Chain> { - _marker0: PhantomData, - _marker1: PhantomData, - subscan_left: &'a Subscan, - subscan_right: &'a Subscan, -} - -impl<'a, SC: Chain, TC: Chain> ConversionBalance<'a, SC, TC> { - pub fn new(subscan_left: &'a Subscan, subscan_right: &'a Subscan) -> Self { - Self { - _marker0: Default::default(), - _marker1: Default::default(), - subscan_left, - subscan_right, - } - } - - /// conversion source chain balance to target chain balance - pub async fn conversion_left_to_right( - &self, - source_currency: SC::Balance, - ) -> FeemarketResult { - let price_source = self.source_open_price().await?; - let price_target = self.target_open_price().await?; - let rate = price_source / price_target; - let rate = FixedU128::from_float(rate); - let ret: u128 = rate - .saturating_mul_int(source_currency) - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - Ok(ret - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?) - } - - /// conversion target chain balance to source chain balance - pub async fn conversion_right_to_left( - &self, - target_currency: TC::Balance, - ) -> FeemarketResult { - let price_source = self.source_open_price().await?; - let price_target = self.target_open_price().await?; - let rate = price_target / price_source; - let rate = FixedU128::from_float(rate); - let ret: u128 = rate - .saturating_mul_int(target_currency) - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?; - Ok(ret - .try_into() - .map_err(|_e| FeemarketError::WrongConvert("Wrong balance".to_string()))?) - } - - async fn source_open_price(&self) -> FeemarketResult { - let now = SystemTime::now() - .duration_since(UNIX_EPOCH) - .map_err(|e| FeemarketError::Custom(format!("{:?}", e)))? - .as_secs(); - match self.subscan_left.price(now).await?.data() { - Ok(Some(v)) => Ok(v.price), - _ => { - let subscan = self - .subscan_left - .clone() - .endpoint("https://darwinia.api.subscan.io"); - let open_price = subscan.price(now).await?; - let data = open_price.data()?; - match data { - Some(v) => Ok(v.price), - None => Err(FeemarketError::Custom( - "Can not query pangolin price".to_string(), - )), - } - } - } - } - - async fn target_open_price(&self) -> FeemarketResult { - let now = SystemTime::now() - .duration_since(UNIX_EPOCH) - .map_err(|e| FeemarketError::Custom(format!("{:?}", e)))? - .as_secs(); - match self.subscan_right.price(now).await?.data() { - Ok(Some(v)) => Ok(v.price), - _ => { - let subscan = self - .subscan_right - .clone() - .endpoint("https://dock.api.subscan.io"); - let open_price = subscan.price(now).await?; - let data = open_price.data()?; - match data { - Some(v) => Ok(v.price), - None => Err(FeemarketError::Custom( - "Can not query pangolin price".to_string(), - )), - } - } - } - } -} diff --git a/frame/assistants/feemarket-s2s/src/fee/traits.rs b/frame/assistants/feemarket-s2s/src/fee/traits.rs deleted file mode 100644 index 186b3a5fe..000000000 --- a/frame/assistants/feemarket-s2s/src/fee/traits.rs +++ /dev/null @@ -1,7 +0,0 @@ -use crate::error::FeemarketResult; - -/// Update fee strategy -#[async_trait::async_trait] -pub trait UpdateFeeStrategy { - async fn handle(&self) -> FeemarketResult<()>; -} diff --git a/frame/assistants/feemarket-s2s/src/helpers.rs b/frame/assistants/feemarket-s2s/src/helpers.rs deleted file mode 100644 index e40c3c3e5..000000000 --- a/frame/assistants/feemarket-s2s/src/helpers.rs +++ /dev/null @@ -1,15 +0,0 @@ -use frame_support::StorageHasher; - -/// Returns the storage prefix for a specific pallet name and storage name. -/// -/// The storage prefix is `concat(twox_128(pallet_name), twox_128(storage_name))`. -pub fn storage_prefix(pallet_name: &[u8], storage_name: &[u8]) -> [u8; 32] { - let pallet_hash = frame_support::Twox128::hash(pallet_name); - let storage_hash = frame_support::Twox128::hash(storage_name); - - let mut final_key = [0u8; 32]; - final_key[..16].copy_from_slice(&pallet_hash); - final_key[16..].copy_from_slice(&storage_hash); - - final_key -} diff --git a/frame/assistants/feemarket-s2s/src/lib.rs b/frame/assistants/feemarket-s2s/src/lib.rs index 03deef32a..291d8f86c 100644 --- a/frame/assistants/feemarket-s2s/src/lib.rs +++ b/frame/assistants/feemarket-s2s/src/lib.rs @@ -1,7 +1,2 @@ -pub mod api; -pub mod config; pub mod error; -pub mod fee; -pub mod helpers; pub mod relay; -pub mod types; diff --git a/frame/assistants/feemarket-ns2s/src/relay.rs b/frame/assistants/feemarket-s2s/src/relay.rs similarity index 100% rename from frame/assistants/feemarket-ns2s/src/relay.rs rename to frame/assistants/feemarket-s2s/src/relay.rs diff --git a/frame/assistants/feemarket-s2s/src/relay/basic.rs b/frame/assistants/feemarket-s2s/src/relay/basic.rs index c92106b39..3e6814e79 100644 --- a/frame/assistants/feemarket-s2s/src/relay/basic.rs +++ b/frame/assistants/feemarket-s2s/src/relay/basic.rs @@ -1,49 +1,53 @@ use std::ops::Range; -use messages_relay::message_lane::MessageLane; -use messages_relay::message_lane_loop::{ - SourceClient as MessageLaneSourceClient, TargetClient as MessageLaneTargetClient, -}; -use messages_relay::relay_strategy::{RelayReference, RelayStrategy}; -use relay_substrate_client::{Chain, ChainBase}; -use relay_utils::MaybeConnectionError; +use bridge_s2s_traits::error::{S2SClientError, S2SClientResult}; +use bridge_s2s_traits::strategy::{RelayReference, RelayStrategy}; -use crate::api::FeemarketApi; -use crate::error::{FeemarketError, FeemarketResult}; +use feemarket_s2s_traits::api::FeemarketApiRelay; +use feemarket_s2s_traits::types::Chain; +use support_toolkit::logk; /// Basic relay strategy /// 1. if you are assigned relayer you will relay all order whether or not it times out /// 2. if you aren't assigned relayer, only participate in the part about time out, earn more rewards /// 3. if not have any assigned relayers, everyone participates in the relay. -#[derive(Clone)] -pub struct BasicRelayStrategy { +// #[derive(Clone)] +pub struct BasicRelayStrategy { api: A, - account: ::AccountId, + account: ::AccountId, } -impl BasicRelayStrategy { - pub fn new(api: A, account: ::AccountId) -> Self { +impl BasicRelayStrategy { + pub fn new(api: A, account: ::AccountId) -> Self { Self { api, account } } } -impl BasicRelayStrategy { - async fn handle< - P: MessageLane, - SourceClient: MessageLaneSourceClient

, - TargetClient: MessageLaneTargetClient

, - >( - &self, - reference: &mut RelayReference, - ) -> FeemarketResult { - let nonce = &reference.nonce; +impl Clone for BasicRelayStrategy { + fn clone(&self) -> Self { + Self { + api: self.api.clone(), + account: self.account.clone(), + } + } +} + +#[async_trait::async_trait] +impl RelayStrategy for BasicRelayStrategy { + async fn decide(&mut self, reference: RelayReference) -> S2SClientResult { + let lane = reference.lane; + let nonce = reference.nonce; tracing::trace!( target: "feemarket", - "[feemarket] [relay] [{}] Determine whether to relay for nonce: {}", - A::Chain::NAME, + "{} determine whether to relay for nonce: {}", + logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), nonce, ); - let order = self.api.order(self.api.lane_id(), *nonce).await?; + let order = self + .api + .order(lane, nonce) + .await + .map_err(|e| S2SClientError::Custom(format!("[feemarket]: {:?}", e)))?; // If the order is not exists. // 1. You are too behind. @@ -53,8 +57,8 @@ impl BasicRelayStrategy { if order.is_none() { tracing::info!( target: "feemarket", - "[feemarket] [relay] [{}] Not found order by nonce: {}, so decide don't relay this nonce", - A::Chain::NAME, + "{} not found order by nonce: {}, so decide don't relay this nonce", + logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), nonce, ); return Ok(false); @@ -68,8 +72,8 @@ impl BasicRelayStrategy { if relayers.is_empty() { tracing::info!( target: "feemarket", - "[feemarket] [relay] [{}] Not found any assigned relayers so relay this nonce({}) anyway", - A::Chain::NAME, + "{} not found any assigned relayers so relay this nonce({}) anyway", + logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), nonce, ); return Ok(true); @@ -87,8 +91,8 @@ impl BasicRelayStrategy { if is_assigned_relayer { tracing::info!( target: "feemarket", - "[feemarket] [relay] [{}] You are assigned relayer, you must be relay this nonce({})", - A::Chain::NAME, + "{} you are assigned relayer, you must be relay this nonce({})", + logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), nonce, ); return Ok(true); @@ -97,13 +101,17 @@ impl BasicRelayStrategy { // ----- // If you aren't assigned relayer, only participate in the part about time out, earn more rewards - let latest_block_number = self.api.best_finalized_header_number().await?; + let latest_block_number = self + .api + .best_finalized_header_number() + .await + .map_err(|e| S2SClientError::Custom(format!("[feemarket]: {:?}", e)))?; let ranges = relayers .iter() .map(|item| item.valid_range.clone()) - .collect::::BlockNumber>>>(); + .collect::::BlockNumber>>>(); - let mut maximum_timeout: ::BlockNumber = Default::default(); + let mut maximum_timeout: ::BlockNumber = Default::default(); for range in ranges { maximum_timeout = std::cmp::max(maximum_timeout, range.end); } @@ -111,78 +119,18 @@ impl BasicRelayStrategy { if latest_block_number > maximum_timeout { tracing::info!( target: "feemarket", - "[feemarket] [relay] [{}] You aren't assigned relayer. but this nonce is timeout. so the decide is relay this nonce: {}", - A::Chain::NAME, + "{} you aren't assigned relayer. but this nonce is timeout. so the decide is relay this nonce: {}", + logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), nonce, ); return Ok(true); } tracing::info!( target: "feemarket", - "[feemarket] [relay] [{}] You aren't assigned relay. and this nonce({}) is ontime. so don't relay this", - A::Chain::NAME, + "{} you aren't assigned relay. and this nonce({}) is on-time. so don't relay this", + logk::prefix_with_relation("feemarket", "relay", A::CHAIN, "::"), nonce, ); Ok(false) } } - -#[async_trait::async_trait] -impl RelayStrategy for BasicRelayStrategy { - async fn decide< - P: MessageLane, - SourceClient: MessageLaneSourceClient

, - TargetClient: MessageLaneTargetClient

, - >( - &mut self, - reference: &mut RelayReference, - ) -> bool { - let mut times = 0; - loop { - times += 1; - if times > 5 { - tracing::error!( - target: "feemarket", - "[feemarket] [relay] [{}] Try decide failed many times ({}). so decide don't relay this nonce({}) at the moment", - A::Chain::NAME, - times, - reference.nonce - ); - return false; - } - - let decide = match self.handle(reference).await { - Ok(v) => v, - Err(e) => { - if let FeemarketError::RelayClient(rce) = &e { - if rce.is_connection_error() { - if let Err(fe) = self.api.reconnect().await { - tracing::error!( - target: "feemarket", - "[feemarket] [relay] [{}] Failed reconnect client: {:?}", - A::Chain::NAME, - fe, - ); - } - } - } - tracing::error!( - target: "feemarket", - "[feemarket] [relay] [{}] Failed to decide relay: {:?}", - A::Chain::NAME, - e, - ); - continue; - } - }; - tracing::info!( - target: "feemarket", - "[feemarket] [relay] [{}] About nonce {} decide is {}", - A::Chain::NAME, - reference.nonce, - decide - ); - return decide; - } - } -} diff --git a/frame/assistants/feemarket-s2s/src/relay/mod.rs b/frame/assistants/feemarket-s2s/src/relay/mod.rs deleted file mode 100644 index b7851c9b6..000000000 --- a/frame/assistants/feemarket-s2s/src/relay/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub use self::basic::*; - -mod basic; diff --git a/frame/assistants/feemarket-s2s/src/types.rs b/frame/assistants/feemarket-s2s/src/types.rs deleted file mode 100644 index 018e5ebac..000000000 --- a/frame/assistants/feemarket-s2s/src/types.rs +++ /dev/null @@ -1,9 +0,0 @@ -/// Strategy names -pub enum StrategyNames { - /// Not have any changes - Nothing, - /// A reasonable strate, query fees from subscan and upadte it - Reasonable, - /// The first forever - Crazy, -} diff --git a/frame/assistants/feemarket-s2s/tests/common.rs b/frame/assistants/feemarket-s2s/tests/common.rs deleted file mode 100644 index 09c2017e8..000000000 --- a/frame/assistants/feemarket-s2s/tests/common.rs +++ /dev/null @@ -1,73 +0,0 @@ -use bp_messages::{LaneId, MessageNonce}; -use dp_fee::{Order, Relayer}; -use relay_substrate_client::{ChainBase, Client}; - -use feemarket_s2s::api::FeemarketApi; -use feemarket_s2s::error::FeemarketResult; - -#[derive(Clone)] -pub struct TestFeemarketApi; - -#[async_trait::async_trait] -impl FeemarketApi for TestFeemarketApi { - type Chain = relay_pangolin_client::PangolinChain; - - fn lane_id(&self) -> LaneId { - [0, 1, 2, 3] - } - - async fn best_finalized_header_number(&self) -> FeemarketResult { - Ok(1u32.into()) - } - - async fn assigned_relayers( - &self, - ) -> FeemarketResult< - Vec::AccountId, ::Balance>>, - > { - Ok(Vec::new()) - } - - async fn order( - &self, - _laned_id: LaneId, - _message_nonce: MessageNonce, - ) -> FeemarketResult< - Option< - Order< - ::AccountId, - ::BlockNumber, - ::Balance, - >, - >, - > { - Ok(None) - } - - async fn relayers(&self) -> FeemarketResult::AccountId>> { - Ok(Vec::new()) - } - - async fn relayer( - &self, - _account: ::AccountId, - ) -> FeemarketResult< - Option::AccountId, ::Balance>>, - > { - Ok(None) - } - - async fn update_relay_fee( - &self, - _amount: ::Balance, - ) -> FeemarketResult<()> { - Ok(()) - } - - async fn update_locked_collateral( - &self, - _amount: ::Balance, - ) -> FeemarketResult<()> { - Ok(()) - } -} diff --git a/frame/assistants/feemarket-s2s/tests/fee_strategy.rs b/frame/assistants/feemarket-s2s/tests/fee_strategy.rs deleted file mode 100644 index 5899443cc..000000000 --- a/frame/assistants/feemarket-s2s/tests/fee_strategy.rs +++ /dev/null @@ -1,17 +0,0 @@ -mod common; - -use common::TestFeemarketApi; -use feemarket_s2s::fee::{CrazyStrategy, UpdateFeeStrategy}; -use relay_pangolin_client::PangolinChain; -use relay_substrate_client::TransactionSignScheme; -use sp_core::Pair; - -#[tokio::test] -async fn test_fee_crazy_strategy() { - let api = TestFeemarketApi; - let pair = - ::AccountKeyPair::from_string("//Alice", None) - .unwrap(); - let strategy = CrazyStrategy::::new(api, pair); - strategy.handle().await.unwrap(); -} diff --git a/frame/assistants/relay-s2s/Cargo.toml b/frame/assistants/relay-s2s/Cargo.toml index 4ae0f2bb4..c1ad77a76 100644 --- a/frame/assistants/relay-s2s/Cargo.toml +++ b/frame/assistants/relay-s2s/Cargo.toml @@ -20,21 +20,22 @@ edition = "2021" [dependencies] tracing = "0.1" thiserror = "1.0" -array-bytes = "1.4" +array-bytes = "2" tokio = { version = "1", features = ["time"] } once_cell = "1" +async-trait = "0.1" -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } support-toolkit = { path = "../../supports/support-toolkit", features = ["convert", "log"] } -abstract-bridge-s2s = { path = "../../abstract/bridge-s2s" } +bridge-s2s-traits = { path = "../../traits/bridge-s2s" } subquery-s2s = { path = "../subquery-s2s" } subquery-parachain = { path = "../subquery-parachain" } [features] default = [] bridge-parachain = [ - "abstract-bridge-s2s/bridge-parachain", + "bridge-s2s-traits/bridge-parachain", ] diff --git a/frame/assistants/relay-s2s/src/error.rs b/frame/assistants/relay-s2s/src/error.rs index 19091eba8..2f6221ad0 100644 --- a/frame/assistants/relay-s2s/src/error.rs +++ b/frame/assistants/relay-s2s/src/error.rs @@ -1,4 +1,4 @@ -use abstract_bridge_s2s::error::S2SClientError; +use bridge_s2s_traits::error::S2SClientError; use sp_runtime::codec; use subquery_s2s::SubqueryComponentError; use thiserror::Error as ThisError; diff --git a/frame/assistants/relay-s2s/src/header/para_head_relay.rs b/frame/assistants/relay-s2s/src/header/para_head_relay.rs index 5e19b3f8a..4da0331e8 100644 --- a/frame/assistants/relay-s2s/src/header/para_head_relay.rs +++ b/frame/assistants/relay-s2s/src/header/para_head_relay.rs @@ -1,5 +1,5 @@ -use abstract_bridge_s2s::client::{S2SParaBridgeClientRelaychain, S2SParaBridgeClientSolochain}; -use abstract_bridge_s2s::types::ParaId; +use bridge_s2s_traits::client::{S2SParaBridgeClientRelaychain, S2SParaBridgeClientSolochain}; +use bridge_s2s_traits::types::ParaId; use sp_runtime::traits::Hash; use sp_runtime::traits::Header; use support_toolkit::{convert::SmartCodecMapper, logk}; @@ -12,6 +12,12 @@ pub struct ParaHeaderRunner, } +impl ParaHeaderRunner { + pub fn new(input: ParaHeaderInput) -> Self { + Self { input } + } +} + impl ParaHeaderRunner { pub async fn start(&self) -> RelayResult<()> { loop { @@ -40,10 +46,10 @@ impl ParaHe .await?; tracing::trace!( target: "relay-s2s", - "{} the last para-head on {}: {:?}", + "{} the last para-head on {}: {}", logk::prefix_with_bridge(M_PARA_HEAD, SC::CHAIN, TC::CHAIN), SC::CHAIN, - ¶_head_at_target, + para_head_at_target.clone().map(|v| v.at_relay_block_number.to_string()).unwrap_or("None".to_string()), ); let best_finalized_source_block_hash = client_solochain @@ -97,7 +103,7 @@ impl ParaHe (Some(_), Some(_)) => { tracing::info!( target: "relay-s2s", - "{} not need need to relay", + "{} not need to relay", logk::prefix_with_bridge(M_PARA_HEAD, SC::CHAIN, TC::CHAIN), ); false @@ -132,7 +138,7 @@ impl ParaHe target: "relay-s2s", "{} the tx hash {} emitted", logk::prefix_with_bridge(M_PARA_HEAD, SC::CHAIN, TC::CHAIN), - array_bytes::bytes2hex("0x", hash), + array_bytes::bytes2hex("0x", hash.as_ref()), ); Ok(()) } diff --git a/frame/assistants/relay-s2s/src/header/relaychain_head_relay.rs b/frame/assistants/relay-s2s/src/header/relaychain_head_relay.rs index 487578daf..86a509087 100644 --- a/frame/assistants/relay-s2s/src/header/relaychain_head_relay.rs +++ b/frame/assistants/relay-s2s/src/header/relaychain_head_relay.rs @@ -1,21 +1,28 @@ use std::str::FromStr; -use abstract_bridge_s2s::client::S2SClientRelay; -use abstract_bridge_s2s::config::Config; -use abstract_bridge_s2s::types::bp_header_chain; +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay}; +use bridge_s2s_traits::types::bp_header_chain; +use bridge_s2s_traits::types::bp_runtime::Chain; use sp_runtime::codec; use sp_runtime::traits::Header; + use support_toolkit::{convert::SmartCodecMapper, logk}; use crate::error::{RelayError, RelayResult}; use crate::types::{RelaychainHeaderInput, M_HEADER}; /// relay chain to solo chain header relay runner -pub struct RelaychainHeaderRunner { +pub struct RelaychainHeaderRunner { input: RelaychainHeaderInput, } -impl RelaychainHeaderRunner { +impl RelaychainHeaderRunner { + pub fn new(input: RelaychainHeaderInput) -> Self { + Self { input } + } +} + +impl RelaychainHeaderRunner { pub async fn start(&self) -> RelayResult<()> { loop { self.run().await?; @@ -30,19 +37,19 @@ impl RelaychainHeaderRunner { client_solochain.best_target_finalized(None).await?; let expected_relaychain_hash = SmartCodecMapper::map_to(&last_relayed_relaychain_hash_in_solochain)?; - tracing::debug!( - target: "relay-s2s", - "{} get last relayed rococo block hash: {:?}", - logk::prefix_with_bridge(M_HEADER, SC::CHAIN, TC::CHAIN), - array_bytes::bytes2hex("0x", expected_relaychain_hash), - ); + // tracing::debug!( + // target: "relay-s2s", + // "{} get last relayed relaychain block hash: {:?}", + // logk::prefix_with_bridge(M_HEADER, SC::CHAIN, TC::CHAIN), + // array_bytes::bytes2hex("0x", expected_relaychain_hash.as_ref()), + // ); let last_relayed_relaychain_block_in_solochain = client_relaychain .block(Some(expected_relaychain_hash)) .await? .ok_or_else(|| { RelayError::Custom(format!( - "Failed to query block by [{}] in rococo", - array_bytes::bytes2hex("0x", expected_relaychain_hash) + "Failed to query block by [{}] in relaychain", + array_bytes::bytes2hex("0x", expected_relaychain_hash.as_ref()) )) })?; @@ -53,7 +60,7 @@ impl RelaychainHeaderRunner { let block_number: u32 = SmartCodecMapper::map_to(block_number)?; tracing::info!( target: "relay-s2s", - "{} get last relayed rococo block number: {:?}", + "{} get last relayed relaychain block number: {:?}", logk::prefix_with_bridge(M_HEADER, SC::CHAIN, TC::CHAIN), block_number, ); @@ -93,7 +100,7 @@ impl RelaychainHeaderRunner { target: "relay-s2s", "{} header relayed: {:?}", logk::prefix_with_bridge(M_HEADER, SC::CHAIN, TC::CHAIN), - array_bytes::bytes2hex("0x", hash), + array_bytes::bytes2hex("0x", hash.as_ref()), ); Ok(()) } @@ -145,6 +152,12 @@ impl RelaychainHeaderRunner { return Ok(()); } let next_para_header = next_para_header.expect("Unreachable"); + tracing::trace!( + target: "relay-s2s", + "{} queryied last need relay parachain header is {}", + logk::prefix_with_bridge(M_HEADER, SC::CHAIN, TC::CHAIN), + next_para_header.block_number, + ); let subquery_candidate = &self.input.subquery_candidate; let next_header = subquery_candidate @@ -153,9 +166,10 @@ impl RelaychainHeaderRunner { .filter(|header| { tracing::debug!( target: "relay-s2s", - "{} get related realy chain header: {:?}", + "{} get related realy chain header: {}, last relayed header at solochain is {}", logk::prefix_with_bridge(M_HEADER, SC::CHAIN, TC::CHAIN), header.included_relay_block, + last_block_number, ); header.included_relay_block > last_block_number }); @@ -173,25 +187,29 @@ impl RelaychainHeaderRunner { match crate::keepstate::get_recently_justification(SC::CHAIN) { Some(justification) => { let grandpa_justification: bp_header_chain::justification::GrandpaJustification< - ::Header, + ::Header, > = codec::Decode::decode(&mut justification.as_ref()).map_err(|err| { RelayError::Custom(format!( - "Failed to decode justification of rococo: {:?}", + "Failed to decode justification of relaychain: {:?}", err )) })?; tracing::debug!( target: "relay-s2s", - "{} test justification: {:?}", + "{} found justification at block {} and last block number is {}", logk::prefix_with_bridge(M_HEADER, SC::CHAIN, TC::CHAIN), grandpa_justification.commit.target_number, + last_block_number, ); let target_number: u32 = SmartCodecMapper::map_to(&grandpa_justification.commit.target_number)?; if target_number > last_block_number { self.submit_finality( - array_bytes::bytes2hex("", grandpa_justification.commit.target_hash), + array_bytes::bytes2hex( + "", + grandpa_justification.commit.target_hash.as_ref(), + ), justification.to_vec(), ) .await?; diff --git a/frame/assistants/relay-s2s/src/header/solochain_head_relay.rs b/frame/assistants/relay-s2s/src/header/solochain_head_relay.rs index a6b9e45d7..096a1890d 100644 --- a/frame/assistants/relay-s2s/src/header/solochain_head_relay.rs +++ b/frame/assistants/relay-s2s/src/header/solochain_head_relay.rs @@ -1,8 +1,8 @@ use std::str::FromStr; -use abstract_bridge_s2s::client::S2SClientRelay; -use abstract_bridge_s2s::config::Config; -use abstract_bridge_s2s::types::bp_header_chain; +use bridge_s2s_traits::client::S2SClientRelay; +use bridge_s2s_traits::types::bp_header_chain; +use bridge_s2s_traits::types::bp_runtime::Chain; use sp_runtime::codec; use sp_runtime::traits::Header; use support_toolkit::{convert::SmartCodecMapper, logk}; @@ -42,7 +42,7 @@ impl SolochainHeaderRunner { .ok_or_else(|| { RelayError::Custom(format!( "Failed to query block by [{}] in {}", - array_bytes::bytes2hex("0x", expected_source_hash), + array_bytes::bytes2hex("0x", expected_source_hash.as_ref()), SC::CHAIN, )) })?; @@ -92,7 +92,7 @@ impl SolochainHeaderRunner { target: "relay-s2s", "{} header relayed: {:?}", logk::prefix_with_bridge(M_HEADER, SC::CHAIN, TC::CHAIN), - array_bytes::bytes2hex("0x", hash), + array_bytes::bytes2hex("0x", hash.as_ref()), ); Ok(()) } @@ -176,7 +176,7 @@ impl SolochainHeaderRunner { next_header.block_number, ); let grandpa_justification: bp_header_chain::justification::GrandpaJustification< - ::Header, + ::Header, > = codec::Decode::decode(&mut justification.as_ref()).map_err(|err| { RelayError::Custom(format!( "Failed to decode justification of {}: {:?}", @@ -188,7 +188,10 @@ impl SolochainHeaderRunner { SmartCodecMapper::map_to(&grandpa_justification.commit.target_number)?; if target_number > last_block_number { self.submit_finality( - array_bytes::bytes2hex("", grandpa_justification.commit.target_hash), + array_bytes::bytes2hex( + "", + grandpa_justification.commit.target_hash.as_ref(), + ), justification.to_vec(), ) .await?; diff --git a/frame/assistants/relay-s2s/src/lib.rs b/frame/assistants/relay-s2s/src/lib.rs index 281bff829..1222368c4 100644 --- a/frame/assistants/relay-s2s/src/lib.rs +++ b/frame/assistants/relay-s2s/src/lib.rs @@ -5,4 +5,5 @@ pub mod subscribe; pub mod types; mod keepstate; +mod special; mod strategy; diff --git a/frame/assistants/relay-s2s/src/message/bridge_parachain/delivery_relay.rs b/frame/assistants/relay-s2s/src/message/bridge_parachain/delivery_relay.rs new file mode 100644 index 000000000..6ef12d99d --- /dev/null +++ b/frame/assistants/relay-s2s/src/message/bridge_parachain/delivery_relay.rs @@ -0,0 +1,36 @@ +use bridge_s2s_traits::client::{S2SClientRelay, S2SParaBridgeClientSolochain}; +use bridge_s2s_traits::strategy::RelayStrategy; + +use crate::error::RelayResult; +use crate::message::common::CommonDeliveryRunner; +use crate::special::ParachainSpecialClientApi; +use crate::types::MessageDeliveryInput; + +pub struct BridgeParachainDeliveryRunner +where + SC: S2SClientRelay, + TC: S2SParaBridgeClientSolochain, + Strategy: RelayStrategy, +{ + common: CommonDeliveryRunner, Strategy>, +} + +impl BridgeParachainDeliveryRunner +where + SC: S2SClientRelay, + TC: S2SParaBridgeClientSolochain, + Strategy: RelayStrategy, +{ + pub fn new(input: MessageDeliveryInput, para_id: u32) -> Self { + let different = ParachainSpecialClientApi { + para_id, + client: input.client_target.clone(), + }; + let common = CommonDeliveryRunner::new(input, different); + Self { common } + } + + pub async fn start(&self) -> RelayResult<()> { + self.common.start().await + } +} diff --git a/frame/assistants/relay-s2s/src/message/bridge_parachain/mod.rs b/frame/assistants/relay-s2s/src/message/bridge_parachain/mod.rs new file mode 100644 index 000000000..61a0ecf25 --- /dev/null +++ b/frame/assistants/relay-s2s/src/message/bridge_parachain/mod.rs @@ -0,0 +1,5 @@ +pub use self::delivery_relay::*; +pub use self::receiving_relay::*; + +mod delivery_relay; +mod receiving_relay; diff --git a/frame/assistants/relay-s2s/src/message/bridge_parachain/receiving_relay.rs b/frame/assistants/relay-s2s/src/message/bridge_parachain/receiving_relay.rs new file mode 100644 index 000000000..c8b41e791 --- /dev/null +++ b/frame/assistants/relay-s2s/src/message/bridge_parachain/receiving_relay.rs @@ -0,0 +1,33 @@ +use bridge_s2s_traits::client::{S2SClientRelay, S2SParaBridgeClientSolochain}; + +use crate::error::RelayResult; +use crate::message::common::CommonReceivingRunner; +use crate::special::ParachainSpecialClientApi; +use crate::types::MessageReceivingInput; + +pub struct BridgeParachainReceivingRunner +where + SC: S2SParaBridgeClientSolochain, + TC: S2SClientRelay, +{ + common: CommonReceivingRunner>, +} + +impl BridgeParachainReceivingRunner +where + SC: S2SParaBridgeClientSolochain, + TC: S2SClientRelay, +{ + pub fn new(input: MessageReceivingInput, para_id: u32) -> Self { + let different = ParachainSpecialClientApi { + para_id, + client: input.client_source.clone(), + }; + let common = CommonReceivingRunner::new(input, different); + Self { common } + } + + pub async fn start(&self) -> RelayResult<()> { + self.common.start().await + } +} diff --git a/frame/assistants/relay-s2s/src/message/bridge_solochain/delivery_relay.rs b/frame/assistants/relay-s2s/src/message/bridge_solochain/delivery_relay.rs new file mode 100644 index 000000000..1c5dff015 --- /dev/null +++ b/frame/assistants/relay-s2s/src/message/bridge_solochain/delivery_relay.rs @@ -0,0 +1,35 @@ +use bridge_s2s_traits::client::S2SClientRelay; +use bridge_s2s_traits::strategy::RelayStrategy; + +use crate::error::RelayResult; +use crate::message::common::CommonDeliveryRunner; +use crate::special::SolochainSpecialClientApi; +use crate::types::MessageDeliveryInput; + +pub struct BridgeSolochainDeliveryRunner +where + SC: S2SClientRelay, + TC: S2SClientRelay, + Strategy: RelayStrategy, +{ + common: CommonDeliveryRunner, Strategy>, +} + +impl BridgeSolochainDeliveryRunner +where + SC: S2SClientRelay, + TC: S2SClientRelay, + Strategy: RelayStrategy, +{ + pub fn new(input: MessageDeliveryInput) -> Self { + let different = SolochainSpecialClientApi { + client: input.client_target.clone(), + }; + let common = CommonDeliveryRunner::new(input, different); + Self { common } + } + + pub async fn start(&self) -> RelayResult<()> { + self.common.start().await + } +} diff --git a/frame/assistants/relay-s2s/src/message/bridge_solochain/mod.rs b/frame/assistants/relay-s2s/src/message/bridge_solochain/mod.rs new file mode 100644 index 000000000..61a0ecf25 --- /dev/null +++ b/frame/assistants/relay-s2s/src/message/bridge_solochain/mod.rs @@ -0,0 +1,5 @@ +pub use self::delivery_relay::*; +pub use self::receiving_relay::*; + +mod delivery_relay; +mod receiving_relay; diff --git a/frame/assistants/relay-s2s/src/message/bridge_solochain/receiving_relay.rs b/frame/assistants/relay-s2s/src/message/bridge_solochain/receiving_relay.rs new file mode 100644 index 000000000..1d75a2f11 --- /dev/null +++ b/frame/assistants/relay-s2s/src/message/bridge_solochain/receiving_relay.rs @@ -0,0 +1,32 @@ +use bridge_s2s_traits::client::S2SClientRelay; + +use crate::error::RelayResult; +use crate::message::common::CommonReceivingRunner; +use crate::special::SolochainSpecialClientApi; +use crate::types::MessageReceivingInput; + +pub struct BridgeSolochainReceivingRunner +where + SC: S2SClientRelay, + TC: S2SClientRelay, +{ + common: CommonReceivingRunner>, +} + +impl BridgeSolochainReceivingRunner +where + SC: S2SClientRelay, + TC: S2SClientRelay, +{ + pub fn new(input: MessageReceivingInput) -> Self { + let different = SolochainSpecialClientApi { + client: input.client_source.clone(), + }; + let common = CommonReceivingRunner::new(input, different); + Self { common } + } + + pub async fn start(&self) -> RelayResult<()> { + self.common.start().await + } +} diff --git a/frame/assistants/relay-s2s/src/message/delivery_relay.rs b/frame/assistants/relay-s2s/src/message/common/delivery_relay.rs similarity index 89% rename from frame/assistants/relay-s2s/src/message/delivery_relay.rs rename to frame/assistants/relay-s2s/src/message/common/delivery_relay.rs index 0c393d154..99bfaea46 100644 --- a/frame/assistants/relay-s2s/src/message/delivery_relay.rs +++ b/frame/assistants/relay-s2s/src/message/common/delivery_relay.rs @@ -1,42 +1,48 @@ use std::ops::RangeInclusive; -use abstract_bridge_s2s::client::S2SClientRelay; -use abstract_bridge_s2s::strategy::RelayStrategy; -use abstract_bridge_s2s::types::bp_messages::OutboundLaneData; -use abstract_bridge_s2s::types::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof; +use bridge_s2s_traits::client::S2SClientRelay; +use bridge_s2s_traits::strategy::RelayStrategy; +use bridge_s2s_traits::types::bp_messages::OutboundLaneData; +use bridge_s2s_traits::types::bridge_runtime_common::messages::target::FromBridgedChainMessagesProof; use sp_runtime::traits::Header; + use support_toolkit::{convert::SmartCodecMapper, logk}; use crate::error::{RelayError, RelayResult}; use crate::keepstate; +use crate::special::DifferentClientApi; use crate::strategy::{EnforcementDecideReference, EnforcementRelayStrategy}; use crate::types::{MessageDeliveryInput, M_DELIVERY}; -pub struct DeliveryRunner +pub struct CommonDeliveryRunner where SC: S2SClientRelay, TC: S2SClientRelay, + DC: DifferentClientApi, Strategy: RelayStrategy, { + different: DC, input: MessageDeliveryInput, } -impl DeliveryRunner +impl CommonDeliveryRunner where SC: S2SClientRelay, TC: S2SClientRelay, + DC: DifferentClientApi, Strategy: RelayStrategy, { - pub fn new(input: MessageDeliveryInput) -> Self { - Self { input } + pub fn new(input: MessageDeliveryInput, different: DC) -> Self { + Self { input, different } } } // defined -impl DeliveryRunner +impl CommonDeliveryRunner where SC: S2SClientRelay, TC: S2SClientRelay, + DC: DifferentClientApi, Strategy: RelayStrategy, { async fn source_outbound_lane_data(&self) -> RelayResult { @@ -93,10 +99,11 @@ where } } -impl DeliveryRunner +impl CommonDeliveryRunner where SC: S2SClientRelay, TC: S2SClientRelay, + DC: DifferentClientApi, Strategy: RelayStrategy, { pub async fn start(&self) -> RelayResult<()> { @@ -165,7 +172,8 @@ where }; // query last relayed header - let last_relayed_source_hash_in_target = client_target.best_target_finalized(None).await?; + // let last_relayed_source_hash_in_target = client_target.best_target_finalized(None).await?; + let last_relayed_source_hash_in_target = self.different.best_target_finalized(None).await?; let expected_source_hash = SmartCodecMapper::map_to(&last_relayed_source_hash_in_target)?; let last_relayed_source_block_in_target = client_source .block(Some(expected_source_hash)) @@ -173,7 +181,7 @@ where .ok_or_else(|| { RelayError::Custom(format!( "Failed to query block by [{}] in {}", - array_bytes::bytes2hex("0x", expected_source_hash), + array_bytes::bytes2hex("0x", expected_source_hash.as_ref()), SC::CHAIN, )) })?; @@ -264,7 +272,7 @@ where "{} the nonces {:?} in delivered to target chain -> {}", logk::prefix_with_bridge(M_DELIVERY, SC::CHAIN, TC::CHAIN), nonces, - array_bytes::bytes2hex("0x", hash), + array_bytes::bytes2hex("0x", hash.as_ref()), ); Ok(Some(*nonces.end())) } diff --git a/frame/assistants/relay-s2s/src/message/common/mod.rs b/frame/assistants/relay-s2s/src/message/common/mod.rs new file mode 100644 index 000000000..d467d9807 --- /dev/null +++ b/frame/assistants/relay-s2s/src/message/common/mod.rs @@ -0,0 +1,5 @@ +pub use delivery_relay::*; +pub use receiving_relay::*; + +mod delivery_relay; +mod receiving_relay; diff --git a/frame/assistants/relay-s2s/src/message/receiving_relay.rs b/frame/assistants/relay-s2s/src/message/common/receiving_relay.rs similarity index 82% rename from frame/assistants/relay-s2s/src/message/receiving_relay.rs rename to frame/assistants/relay-s2s/src/message/common/receiving_relay.rs index 285ca6da4..f7682b347 100644 --- a/frame/assistants/relay-s2s/src/message/receiving_relay.rs +++ b/frame/assistants/relay-s2s/src/message/common/receiving_relay.rs @@ -1,26 +1,35 @@ -use abstract_bridge_s2s::client::S2SClientRelay; -use abstract_bridge_s2s::config::Config; -use abstract_bridge_s2s::types::bp_messages::{OutboundLaneData, UnrewardedRelayersState}; -use abstract_bridge_s2s::types::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof; +use bridge_s2s_traits::client::S2SClientRelay; +use bridge_s2s_traits::types::bp_messages::{OutboundLaneData, UnrewardedRelayersState}; +use bridge_s2s_traits::types::bp_runtime::Chain; +use bridge_s2s_traits::types::bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof; + use support_toolkit::{convert::SmartCodecMapper, logk}; use crate::error::RelayResult; use crate::keepstate; +use crate::special::DifferentClientApi; use crate::types::{MessageReceivingInput, M_RECEIVING}; -pub struct ReceivingRunner { +pub struct CommonReceivingRunner> +{ + different: DC, input: MessageReceivingInput, } -impl ReceivingRunner { - pub fn new(message_relay: MessageReceivingInput) -> Self { +impl> + CommonReceivingRunner +{ + pub fn new(message_relay: MessageReceivingInput, different: DC) -> Self { Self { + different, input: message_relay, } } } -impl ReceivingRunner { +impl> + CommonReceivingRunner +{ async fn source_outbound_lane_data(&self) -> RelayResult { let lane = self.input.lane()?; let outbound_lane_data = self.input.client_source.outbound_lanes(lane, None).await?; @@ -29,10 +38,10 @@ impl ReceivingRunner { async fn target_unrewarded_relayers_state( &self, - at_block: ::Hash, + at_block: ::Hash, source_outbound_lane_data: &OutboundLaneData, ) -> RelayResult> { - // let block_hex = array_bytes::bytes2hex("0x", at_block); + let block_hex = array_bytes::bytes2hex("0x", at_block.as_ref()); let lane = self.input.lane()?; let inbound_lane_data = self .input @@ -48,9 +57,10 @@ impl ReceivingRunner { if max_confirm_end_at_target == source_outbound_lane_data.latest_received_nonce { tracing::info!( target: "relay-s2s", - "{} max dispatch nonce({}) at target is same with last received nonce({}) at source. nothing to do.", + "{} the last dispatched nonce({}) at target({}) is same with last received nonce({}) at source. nothing to do.", logk::prefix_with_bridge(M_RECEIVING, SC::CHAIN, TC::CHAIN), max_confirm_end_at_target, + block_hex, source_outbound_lane_data.latest_received_nonce, ); return Ok(None); @@ -100,7 +110,9 @@ impl ReceivingRunner { } } -impl ReceivingRunner { +impl> + CommonReceivingRunner +{ pub async fn start(&self) -> RelayResult<()> { tracing::info!( target: "relay-s2s", @@ -138,7 +150,7 @@ impl ReceivingRunner { } // query last relayed header - let last_relayed_target_hash_in_source = client_source.best_target_finalized(None).await?; + let last_relayed_target_hash_in_source = self.different.best_target_finalized(None).await?; let expected_target_hash = SmartCodecMapper::map_to(&last_relayed_target_hash_in_source)?; // assemble unrewarded relayers state @@ -178,7 +190,7 @@ impl ReceivingRunner { target: "relay-s2s", "{} receiving extensics sent successful: {}", logk::prefix_with_bridge(M_RECEIVING, SC::CHAIN, TC::CHAIN), - array_bytes::bytes2hex("0x", hash), + array_bytes::bytes2hex("0x", hash.as_ref()), ); Ok(Some(max_confirmed_nonce_at_target)) } diff --git a/frame/assistants/relay-s2s/src/message/mod.rs b/frame/assistants/relay-s2s/src/message/mod.rs index d467d9807..5b3f6c219 100644 --- a/frame/assistants/relay-s2s/src/message/mod.rs +++ b/frame/assistants/relay-s2s/src/message/mod.rs @@ -1,5 +1,8 @@ -pub use delivery_relay::*; -pub use receiving_relay::*; +#[cfg(feature = "bridge-parachain")] +pub use self::bridge_parachain::*; +pub use self::bridge_solochain::*; -mod delivery_relay; -mod receiving_relay; +#[cfg(feature = "bridge-parachain")] +mod bridge_parachain; +mod bridge_solochain; +mod common; diff --git a/frame/assistants/relay-s2s/src/special/impls.rs b/frame/assistants/relay-s2s/src/special/impls.rs new file mode 100644 index 000000000..d0a450aba --- /dev/null +++ b/frame/assistants/relay-s2s/src/special/impls.rs @@ -0,0 +1,51 @@ +use bridge_s2s_traits::client::S2SClientRelay; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::types::bp_runtime::Chain; +#[cfg(feature = "bridge-parachain")] +use bridge_s2s_traits::{client::S2SParaBridgeClientSolochain, types::ParaId}; + +#[cfg(feature = "bridge-parachain")] +use support_toolkit::convert::SmartCodecMapper; + +use crate::special::traits::DifferentClientApi; + +#[cfg(feature = "bridge-parachain")] +pub struct ParachainSpecialClientApi { + pub para_id: u32, + pub client: T, +} + +#[cfg(feature = "bridge-parachain")] +#[async_trait::async_trait] +impl DifferentClientApi for ParachainSpecialClientApi { + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { + match self + .client + .best_para_heads(ParaId(self.para_id), at_block) + .await? + { + Some(v) => { + let hash = sp_core::H256(v.head_hash.0); + Ok(SmartCodecMapper::map_to(&hash)?) + } + None => Ok(Default::default()), + } + } +} + +pub struct SolochainSpecialClientApi { + pub client: T, +} + +#[async_trait::async_trait] +impl DifferentClientApi for SolochainSpecialClientApi { + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash> { + self.client.best_target_finalized(at_block).await + } +} diff --git a/frame/assistants/relay-s2s/src/special/mod.rs b/frame/assistants/relay-s2s/src/special/mod.rs new file mode 100644 index 000000000..2015adb4b --- /dev/null +++ b/frame/assistants/relay-s2s/src/special/mod.rs @@ -0,0 +1,5 @@ +pub use self::impls::*; +pub use self::traits::*; + +mod impls; +mod traits; diff --git a/frame/assistants/relay-s2s/src/special/traits.rs b/frame/assistants/relay-s2s/src/special/traits.rs new file mode 100644 index 000000000..4f66efb47 --- /dev/null +++ b/frame/assistants/relay-s2s/src/special/traits.rs @@ -0,0 +1,12 @@ +use bridge_s2s_traits::client::S2SClientRelay; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::types::bp_runtime::Chain; + +#[async_trait::async_trait] +pub trait DifferentClientApi { + /// query best target finalized at source + async fn best_target_finalized( + &self, + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash>; +} diff --git a/frame/assistants/relay-s2s/src/strategy/relay.rs b/frame/assistants/relay-s2s/src/strategy/relay.rs index 9e71f4aa4..ce65f66c2 100644 --- a/frame/assistants/relay-s2s/src/strategy/relay.rs +++ b/frame/assistants/relay-s2s/src/strategy/relay.rs @@ -1,7 +1,7 @@ use std::ops::RangeInclusive; -use abstract_bridge_s2s::error::S2SClientResult; -use abstract_bridge_s2s::strategy::{RelayReference, RelayStrategy}; +use bridge_s2s_traits::error::S2SClientResult; +use bridge_s2s_traits::strategy::{RelayReference, RelayStrategy}; use crate::types::LaneId; diff --git a/frame/assistants/relay-s2s/src/subscribe/justification.rs b/frame/assistants/relay-s2s/src/subscribe/justification.rs index 867952d00..6d7aa9aa5 100644 --- a/frame/assistants/relay-s2s/src/subscribe/justification.rs +++ b/frame/assistants/relay-s2s/src/subscribe/justification.rs @@ -1,23 +1,23 @@ -use abstract_bridge_s2s::client::S2SClientRelay; -use abstract_bridge_s2s::error::S2SClientError; +use bridge_s2s_traits::client::S2SClientGeneric; +use bridge_s2s_traits::error::S2SClientError; use support_toolkit::logk; -use crate::error::RelayResult; +use crate::error::{RelayError, RelayResult}; use crate::keepstate; use crate::types::JustificationInput; -pub struct SubscribeJustification { +pub struct SubscribeJustification { input: JustificationInput, } -impl SubscribeJustification { +impl SubscribeJustification { pub fn new(input: JustificationInput) -> Self { Self { input } } } -impl SubscribeJustification { +impl SubscribeJustification { pub async fn start(self) -> RelayResult<()> { let client_source = self.input.client_source; let client_target = self.input.client_target; @@ -41,7 +41,7 @@ impl SubscribeJustification { async fn run_until_connection_lost(client: T, callback: F) -> RelayResult<()> where - T: S2SClientRelay, + T: S2SClientGeneric, F: Send + Sync + Fn(sp_core::Bytes), { if let Err(err) = subscribe_justification(&client, callback).await { @@ -52,25 +52,40 @@ where T::CHAIN, err ); + return Err(err); } Ok(()) } async fn subscribe_justification(client: &T, callback: F) -> RelayResult<()> where - T: S2SClientRelay, + T: S2SClientGeneric, F: Send + Sync + Fn(sp_core::Bytes), { let mut subscribe = client.subscribe_grandpa_justifications().await?; - while let Some(justification) = subscribe.next().await { - let justification = justification.map_err(|e| S2SClientError::RPC(format!("{:?}", e)))?; - tracing::info!( - target: "relay-s2s", - "{} subscribed new justification for {}", - logk::prefix_multi("subscribe", vec![T::CHAIN]), - T::CHAIN, - ); - callback(justification); + loop { + match subscribe.next().await { + Some(justification) => { + let justification = + justification.map_err(|e| S2SClientError::RPC(format!("{:?}", e)))?; + tracing::info!( + target: "relay-s2s", + "{} subscribed new justification for {}", + logk::prefix_multi("subscribe", vec![T::CHAIN]), + T::CHAIN, + ); + callback(justification); + } + None => { + tracing::error!( + target: "relay-s2s", + "{} the subscription has been terminated", + logk::prefix_multi("subscribe", vec![T::CHAIN]), + ); + return Err(RelayError::Custom( + "the subscription has been terminated".to_string(), + )); + } + } } - Ok(()) } diff --git a/frame/assistants/relay-s2s/src/types.rs b/frame/assistants/relay-s2s/src/types.rs index 2542a84a2..c71a6cdcf 100644 --- a/frame/assistants/relay-s2s/src/types.rs +++ b/frame/assistants/relay-s2s/src/types.rs @@ -1,8 +1,8 @@ -use abstract_bridge_s2s::client::S2SClientRelay; +use bridge_s2s_traits::client::{S2SClientGeneric, S2SClientRelay}; #[cfg(feature = "bridge-parachain")] -use abstract_bridge_s2s::client::{S2SParaBridgeClientRelaychain, S2SParaBridgeClientSolochain}; -use abstract_bridge_s2s::config::Config; -use abstract_bridge_s2s::strategy::RelayStrategy; +use bridge_s2s_traits::client::{S2SParaBridgeClientRelaychain, S2SParaBridgeClientSolochain}; +use bridge_s2s_traits::strategy::RelayStrategy; +use bridge_s2s_traits::types::bp_runtime::Chain; use subquery_s2s::types::{OriginType, RelayBlockOrigin}; use subquery_s2s::Subquery; @@ -25,7 +25,7 @@ pub struct SolochainHeaderInput { } #[cfg(feature = "bridge-parachain")] -pub struct RelaychainHeaderInput { +pub struct RelaychainHeaderInput { pub client_relaychain: SC, pub client_solochain: TC, pub subquery_relaychain: Subquery, @@ -42,7 +42,7 @@ pub struct ParaHeaderInput { +pub struct JustificationInput { pub client_source: SC, pub client_target: TC, } @@ -50,7 +50,7 @@ pub struct JustificationInput { pub struct MessageDeliveryInput { pub lanes: Vec, pub nonces_limit: u64, - pub relayer_account: ::AccountId, + pub relayer_account: ::AccountId, pub client_source: SC, pub client_target: TC, pub subquery_source: Subquery, @@ -74,7 +74,7 @@ impl pub struct MessageReceivingInput { pub lanes: Vec, - pub relayer_account: ::AccountId, + pub relayer_account: ::AccountId, pub client_source: SC, pub client_target: TC, pub subquery_source: Subquery, diff --git a/frame/assistants/shadow-liketh/Cargo.toml b/frame/assistants/shadow-liketh/Cargo.toml index d2e6cb6e0..4049b571d 100644 --- a/frame/assistants/shadow-liketh/Cargo.toml +++ b/frame/assistants/shadow-liketh/Cargo.toml @@ -41,5 +41,5 @@ support-mmr = { path = "../../supports/support-mmr" } [dev-dependencies] tokio = { version = "1", features = ["full"] } -array-bytes = "1.4" +array-bytes = "2" cmmr = { version = "0.3", package = "ckb-merkle-mountain-range"} diff --git a/frame/assistants/subquery-s2s/Cargo.toml b/frame/assistants/subquery-s2s/Cargo.toml index 2a9f7544d..e71c8971c 100644 --- a/frame/assistants/subquery-s2s/Cargo.toml +++ b/frame/assistants/subquery-s2s/Cargo.toml @@ -23,6 +23,9 @@ serde = { version = "1.0", features = ["derive"] } serde-aux = "0.6" serde-hex = "0.1" strum = { version = "0.21", features = ["derive"] } -array-bytes = "1.4" +array-bytes = "2" gql_client = "1" + +[dev-dependencies] +tokio = { version = "1", features = ["full"] } diff --git a/frame/assistants/subquery-s2s/src/types/mark.rs b/frame/assistants/subquery-s2s/src/types/mark.rs index 00973869f..3312ed499 100644 --- a/frame/assistants/subquery-s2s/src/types/mark.rs +++ b/frame/assistants/subquery-s2s/src/types/mark.rs @@ -9,6 +9,8 @@ pub enum BridgeName { PangolinPangoro, /// bridge pangolin<>pangolin-parachain CrabParachain, + /// bridge darwinia<>crab + DarwiniaCrab, } impl BridgeName { @@ -18,6 +20,7 @@ impl BridgeName { Self::PangolinParachain => "pangolin-parachain", Self::PangolinPangoro => "pangolin-pangoro", Self::CrabParachain => "crab-parachain", + Self::DarwiniaCrab => "darwinia-crab", } } } diff --git a/frame/assistants/subquery-s2s/src/types/s2s.rs b/frame/assistants/subquery-s2s/src/types/s2s.rs index a47641b26..110b29954 100644 --- a/frame/assistants/subquery-s2s/src/types/s2s.rs +++ b/frame/assistants/subquery-s2s/src/types/s2s.rs @@ -66,6 +66,7 @@ pub enum RelayBlockOrigin { BridgePangolinParachain, // from pangolin send message to pangolin parachain BridgeCrabParachain, // from crab send messages to crab parachain BridgeCrab, // from crab parachain send messages to crab + BridgeDarwinia, // from crab send message to darwinia } /// justification mapping diff --git a/frame/assistants/subquery-s2s/src/types/subquery.rs b/frame/assistants/subquery-s2s/src/types/subquery.rs index 9e4419ebd..624463142 100644 --- a/frame/assistants/subquery-s2s/src/types/subquery.rs +++ b/frame/assistants/subquery-s2s/src/types/subquery.rs @@ -24,6 +24,8 @@ pub enum OriginType { BridgeCrabParachain, #[serde(rename = "bridge-crab")] BridgeCrab, + #[serde(rename = "bridge-darwinia")] + BridgeDarwinia, } #[derive(Clone, Debug, Serialize)] diff --git a/frame/components/ethereum/Cargo.toml b/frame/components/ethereum/Cargo.toml index 67e30cf45..7af35fd3e 100644 --- a/frame/components/ethereum/Cargo.toml +++ b/frame/components/ethereum/Cargo.toml @@ -25,5 +25,5 @@ serde = { version = "1.0", features = ["derive"] } web3 = { git = "https://github.com/wuminzhe/rust-web3.git", branch = "master", features = ["signing"] } reqwest = { version = "0.11", features = ["rustls-tls", "json"] } -array-bytes = "1.1.0" +array-bytes = "2" secp256k1 = { version = "0.20", features = ["recovery"] } diff --git a/frame/supports/support-common/src/initialize.rs b/frame/supports/support-common/src/initialize.rs index f6cf4decc..c4d0877b9 100644 --- a/frame/supports/support-common/src/initialize.rs +++ b/frame/supports/support-common/src/initialize.rs @@ -46,7 +46,7 @@ fn init_log() -> color_eyre::Result<()> { .unwrap_or(Level::TRACE); if use_json_adapter { - let _subscriber = tracing_subscriber::FmtSubscriber::builder() + tracing_subscriber::FmtSubscriber::builder() .with_max_level(max_log_level) .with_env_filter( EnvFilter::try_from_default_env() @@ -59,7 +59,7 @@ fn init_log() -> color_eyre::Result<()> { return Ok(()); } - let _subscriber = tracing_subscriber::FmtSubscriber::builder() + tracing_subscriber::FmtSubscriber::builder() .with_max_level(max_log_level) .with_env_filter( EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::from(def_log_filter)), diff --git a/frame/abstract/.gitignore b/frame/traits/.gitignore similarity index 100% rename from frame/abstract/.gitignore rename to frame/traits/.gitignore diff --git a/frame/abstract/bridge-s2s/Cargo.toml b/frame/traits/bridge-s2s/Cargo.toml similarity index 73% rename from frame/abstract/bridge-s2s/Cargo.toml rename to frame/traits/bridge-s2s/Cargo.toml index 1e7697f8d..20198c7e2 100644 --- a/frame/abstract/bridge-s2s/Cargo.toml +++ b/frame/traits/bridge-s2s/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "abstract-bridge-s2s" +name = "bridge-s2s-traits" authors = ["Darwinia Network "] description = "Darwinia bridger" documentation = "https://rust-docs.darwinia.network/bridger" @@ -23,16 +23,16 @@ codec = { package = "parity-scale-codec", version = "2" } scale-info = { version = "1.0.0", features = ["bit-vec"] } jsonrpsee-core = "0.8" -sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } -sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.2" } +sp-core = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } +sp-runtime = { git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-v0.12.3" } -bp-runtime = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bridge-runtime-common = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -bp-header-chain = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } +bp-runtime = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } +bp-messages = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } +bridge-runtime-common = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } +bp-header-chain = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } -array-bytes = { optional = true, version = "1.4" } -subxt = { optional = true, git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } +array-bytes = { optional = true, version = "2" } +subxt = { optional = true, git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } [features] default = [] diff --git a/frame/abstract/bridge-s2s/src/client.rs b/frame/traits/bridge-s2s/src/client.rs similarity index 74% rename from frame/abstract/bridge-s2s/src/client.rs rename to frame/traits/bridge-s2s/src/client.rs index afee8e06b..f7a39a9ec 100644 --- a/frame/abstract/bridge-s2s/src/client.rs +++ b/frame/traits/bridge-s2s/src/client.rs @@ -6,13 +6,13 @@ use jsonrpsee_core::client::Subscription; use sp_runtime::generic::{Block, SignedBlock}; use sp_runtime::traits::{Extrinsic, MaybeSerializeDeserialize}; -use crate::config::Config; use crate::error::S2SClientResult; +use crate::types::bp_runtime::Chain; /// S2S bridge client types defined -pub trait S2SClientBase: Send + Sync + 'static { +pub trait S2SClientBase: 'static + Send + Sync + Clone { const CHAIN: &'static str; - type Config: Config; + type Chain: Chain; type Extrinsic: Codec + EncodeLike + Clone + Eq + Extrinsic + Debug + MaybeSerializeDeserialize; } @@ -27,14 +27,27 @@ pub trait S2SClientGeneric: S2SClientBase { &self, ) -> S2SClientResult>; - /// prepare initialization data - async fn prepare_initialization_data(&self) -> S2SClientResult; + /// query header by hash + async fn header( + &self, + hash: Option<::Hash>, + ) -> S2SClientResult::Header>>; - /// initialize bridge - async fn initialize( + /// query block by hash + async fn block( &self, - initialization_data: Self::InitializationData, - ) -> S2SClientResult<::Hash>; + hash: Option<::Hash>, + ) -> S2SClientResult::Header, Self::Extrinsic>>>>; + + /// read proof + async fn read_proof( + &self, + storage_keys: Vec, + hash: Option<::Hash>, + ) -> S2SClientResult>>; + + /// prepare initialization data + async fn prepare_initialization_data(&self) -> S2SClientResult; } /// S2S bridge header/message api @@ -60,82 +73,67 @@ pub trait S2SClientRelay: S2SClientGeneric { nonces: RangeInclusive, ) -> S2SClientResult; - /// query header by hash - async fn header( - &self, - hash: Option<::Hash>, - ) -> S2SClientResult::Header>>; - - /// query block by hash - async fn block( - &self, - hash: Option<::Hash>, - ) -> S2SClientResult< - Option::Header, Self::Extrinsic>>>, - >; - /// query best target finalized at source async fn best_target_finalized( &self, - at_block: Option<::Hash>, - ) -> S2SClientResult<::Hash>; + at_block: Option<::Hash>, + ) -> S2SClientResult<::Hash>; + + /// initialize bridge + async fn initialize( + &self, + initialization_data: ::InitializationData, + ) -> S2SClientResult<::Hash>; /// submit finality proof async fn submit_finality_proof( &self, - finality_target: ::Header, + finality_target: ::Header, justification: bp_header_chain::justification::GrandpaJustification< - ::Header, + ::Header, >, - ) -> S2SClientResult<::Hash>; + ) -> S2SClientResult<::Hash>; /// query outbound lane async fn outbound_lanes( &self, lane: [u8; 4], - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult; /// query inbound lane async fn inbound_lanes( &self, lane: [u8; 4], - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult>; /// query oubound message data async fn outbound_messages( &self, message_key: bp_messages::MessageKey, - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult>>; - /// read proof - async fn read_proof( - &self, - storage_keys: Vec, - hash: Option<::Hash>, - ) -> S2SClientResult>>; - /// send receive messages proof extrinsics async fn receive_messages_proof( &self, relayer_id_at_bridged_chain: sp_core::crypto::AccountId32, proof: bridge_runtime_common::messages::target::FromBridgedChainMessagesProof< - ::Hash, + ::Hash, >, messages_count: u32, dispatch_weight: u64, - ) -> S2SClientResult<::Hash>; + ) -> S2SClientResult<::Hash>; /// receive messages delivery proof async fn receive_messages_delivery_proof( &self, proof: bridge_runtime_common::messages::source::FromBridgedChainMessagesDeliveryProof< - ::Hash, + ::Hash, >, relayers_state: bp_messages::UnrewardedRelayersState, - ) -> S2SClientResult<::Hash>; + ) -> S2SClientResult<::Hash>; } /// S2S with parachain bridge api for solo chain @@ -146,22 +144,22 @@ pub trait S2SParaBridgeClientSolochain: S2SClientRelay { async fn best_para_heads( &self, para_id: crate::types::ParaId, - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult>; /// submit parachain heads async fn submit_parachain_heads( &self, - relay_block_hash: ::Hash, + relay_block_hash: ::Hash, parachains: Vec, parachain_heads_proof: Vec>, - ) -> S2SClientResult<::Hash>; + ) -> S2SClientResult<::Hash>; } /// S2S with parachain bridge api for relay chain #[cfg(feature = "bridge-parachain")] #[async_trait::async_trait] -pub trait S2SParaBridgeClientRelaychain: S2SClientRelay { +pub trait S2SParaBridgeClientRelaychain: S2SClientGeneric { /// generate parachain head storage key fn gen_parachain_head_storage_key(&self, para_id: u32) -> sp_core::storage::StorageKey; @@ -169,6 +167,6 @@ pub trait S2SParaBridgeClientRelaychain: S2SClientRelay { async fn para_head_data( &self, para_id: crate::types::ParaId, - hash: Option<::Hash>, + hash: Option<::Hash>, ) -> S2SClientResult>; } diff --git a/frame/abstract/bridge-s2s/src/error.rs b/frame/traits/bridge-s2s/src/error.rs similarity index 100% rename from frame/abstract/bridge-s2s/src/error.rs rename to frame/traits/bridge-s2s/src/error.rs diff --git a/frame/abstract/bridge-s2s/src/lib.rs b/frame/traits/bridge-s2s/src/lib.rs similarity index 77% rename from frame/abstract/bridge-s2s/src/lib.rs rename to frame/traits/bridge-s2s/src/lib.rs index eb83e386a..323741fc6 100644 --- a/frame/abstract/bridge-s2s/src/lib.rs +++ b/frame/traits/bridge-s2s/src/lib.rs @@ -1,5 +1,5 @@ pub mod client; -pub mod config; +// pub mod config; pub mod error; pub mod strategy; pub mod types; diff --git a/frame/abstract/bridge-s2s/src/strategy.rs b/frame/traits/bridge-s2s/src/strategy.rs similarity index 100% rename from frame/abstract/bridge-s2s/src/strategy.rs rename to frame/traits/bridge-s2s/src/strategy.rs diff --git a/frame/abstract/bridge-s2s/src/types.rs b/frame/traits/bridge-s2s/src/types.rs similarity index 100% rename from frame/abstract/bridge-s2s/src/types.rs rename to frame/traits/bridge-s2s/src/types.rs diff --git a/frame/abstract/feemarket-s2s/Cargo.toml b/frame/traits/feemarket-s2s/Cargo.toml similarity index 79% rename from frame/abstract/feemarket-s2s/Cargo.toml rename to frame/traits/feemarket-s2s/Cargo.toml index ae8861207..9bc3662ad 100644 --- a/frame/abstract/feemarket-s2s/Cargo.toml +++ b/frame/traits/feemarket-s2s/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "abstract-feemarket-s2s" +name = "feemarket-s2s-traits" authors = ["Darwinia Network "] description = "Darwinia bridger" documentation = "https://rust-docs.darwinia.network/bridger" @@ -17,10 +17,10 @@ thiserror = "1" async-trait = "0.1" codec = { package = "parity-scale-codec", version = "2" } -bp-runtime = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } -pallet-fee-market = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.2" } +bp-runtime = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } +pallet-fee-market = { git = "https://github.com/darwinia-network/darwinia-bridges-substrate.git", branch = "darwinia-v0.12.3" } -subxt = { optional = true, git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.2" } +subxt = { optional = true, git = "https://github.com/darwinia-network/subxt.git", branch = "darwinia-v0.12.3" } [features] default = [] diff --git a/frame/abstract/feemarket-s2s/src/api.rs b/frame/traits/feemarket-s2s/src/api.rs similarity index 100% rename from frame/abstract/feemarket-s2s/src/api.rs rename to frame/traits/feemarket-s2s/src/api.rs diff --git a/frame/abstract/feemarket-s2s/src/error.rs b/frame/traits/feemarket-s2s/src/error.rs similarity index 100% rename from frame/abstract/feemarket-s2s/src/error.rs rename to frame/traits/feemarket-s2s/src/error.rs diff --git a/frame/abstract/feemarket-s2s/src/lib.rs b/frame/traits/feemarket-s2s/src/lib.rs similarity index 100% rename from frame/abstract/feemarket-s2s/src/lib.rs rename to frame/traits/feemarket-s2s/src/lib.rs diff --git a/frame/abstract/feemarket-s2s/src/types.rs b/frame/traits/feemarket-s2s/src/types.rs similarity index 100% rename from frame/abstract/feemarket-s2s/src/types.rs rename to frame/traits/feemarket-s2s/src/types.rs diff --git a/scripts/subxt-gen.sh b/scripts/subxt-gen.sh index 963c67b4f..e7d7477e5 100755 --- a/scripts/subxt-gen.sh +++ b/scripts/subxt-gen.sh @@ -31,8 +31,8 @@ OUTPUT_FILE= if [ "${CHAIN}" == "pangolin" ]; then - #ENDPOINT='https://pangolin-rpc.darwinia.network' - ENDPOINT='http://127.0.0.1:9966' + ENDPOINT='https://pangolin-rpc.darwinia.network' +# ENDPOINT='http://127.0.0.1:9966' OUTPUT_PATH=${WORK_PATH}/frame/assistants/client-pangolin fi @@ -42,8 +42,8 @@ if [ "${CHAIN}" == "pangoro" ]; then fi if [ "${CHAIN}" == "darwinia" ]; then -# ENDPOINT='https://rpc.darwinia.network' - ENDPOINT='http://127.0.0.1:9936' + ENDPOINT='https://rpc.darwinia.network' +# ENDPOINT='http://127.0.0.1:9936' OUTPUT_PATH=${WORK_PATH}/frame/assistants/client-darwinia fi @@ -53,7 +53,8 @@ if [ "${CHAIN}" == "rococo" ]; then fi if [ "${CHAIN}" == "pangolin-parachain" ]; then - ENDPOINT='http://127.0.0.1:40338' + ENDPOINT='https://pangolin-parachain-rpc.darwinia.network' +# ENDPOINT='http://127.0.0.1:40338' OUTPUT_PATH=${WORK_PATH}/frame/assistants/client-pangolin-parachain fi diff --git a/subql/s2s/crab-parachain/project.yaml b/subql/s2s/crab-parachain/project.yaml index 16cb0f34d..490833737 100644 --- a/subql/s2s/crab-parachain/project.yaml +++ b/subql/s2s/crab-parachain/project.yaml @@ -18,10 +18,16 @@ dataSources: handlers: - handler: handleBlock kind: substrate/BlockHandler + - handler: handleCall + kind: substrate/CallHandler + - handler: handleEvent kind: substrate/EventHandler filter: - module: bridgeCrabMessages method: MessageAccepted - - handler: handleCall - kind: substrate/CallHandler + + - handler: handleEvent + kind: substrate/EventHandler + filter: + module: bridgeCrabDispatch diff --git a/subql/s2s/crab-parachain/schema.graphql b/subql/s2s/crab-parachain/schema.graphql index e05dab4ec..3a082185c 100644 --- a/subql/s2s/crab-parachain/schema.graphql +++ b/subql/s2s/crab-parachain/schema.graphql @@ -22,6 +22,9 @@ type NeedRelayBlock @entity { extrinsicsRoot: String! digest: String! + onDemandType: String, + additional: String + timestamp: Date } diff --git a/subql/s2s/crab-parachain/src/handler/event.ts b/subql/s2s/crab-parachain/src/handler/event.ts index 38bc41149..a3814c5b4 100644 --- a/subql/s2s/crab-parachain/src/handler/event.ts +++ b/subql/s2s/crab-parachain/src/handler/event.ts @@ -1,6 +1,6 @@ import {FastEvent} from '../helpers'; import * as storage from '../storage'; -import {RelayBlockOrigin} from "../storage"; +import {OnDemandType, RelayBlockOrigin} from "../storage"; import {BlockHandler} from "./block"; export class EventHandler { @@ -21,10 +21,25 @@ export class EventHandler { logger.info(`[event] Received event: [${eventKey}] [${eventId}] in block ${blockNumber}`); switch (eventKey) { case 'bridgeCrabMessages:MessageAccepted': { - await storage.storeNeedRelayBlock(this.event, RelayBlockOrigin.BridgeCrab); + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.BridgeCrab, + OnDemandType.SendMessage, + eventMethod, + ); return; } } + if (eventSection === 'bridgeCrabDispatch') { + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.BridgeCrab, + OnDemandType.Dispatch, + eventMethod, + ); + return; + } + } } diff --git a/subql/s2s/crab-parachain/src/storage/event.ts b/subql/s2s/crab-parachain/src/storage/event.ts index 8fdb761ae..ba81a7cc3 100644 --- a/subql/s2s/crab-parachain/src/storage/event.ts +++ b/subql/s2s/crab-parachain/src/storage/event.ts @@ -7,6 +7,11 @@ export enum RelayBlockType { OnDemand = 'on-demand', } +export enum OnDemandType { + SendMessage = 'send-message', + Dispatch = 'dispatch', +} + export enum RelayBlockOrigin { Mandatory = 'mandatory', BridgeCrab = 'bridge-crab', @@ -14,13 +19,17 @@ export enum RelayBlockOrigin { export async function storeNeedRelayBlock( event: FastEvent, - origin: RelayBlockOrigin + origin: RelayBlockOrigin, + onDemandType?: OnDemandType, + additional?: string, ) { const _event = new NeedRelayBlock(event.id); _event.blockNumber = event.blockNumber; _event.blockHash = event.blockHash; _event.type = origin == RelayBlockOrigin.Mandatory ? RelayBlockType.Mandatory : RelayBlockType.OnDemand; _event.origin = origin; + _event.onDemandType = onDemandType; + _event.additional = additional; const block = new FastBlock(event.block); const header = block.raw.block.header; @@ -29,12 +38,19 @@ export async function storeNeedRelayBlock( _event.extrinsicsRoot = header.extrinsicsRoot.toString(); _event.digest = header.digest.toHex(); - if (_event.type == RelayBlockType.OnDemand) { + if (_event.type == RelayBlockType.OnDemand && onDemandType == OnDemandType.SendMessage) { const data = event.data; const [laneId, messageNonce] = data as unknown as [string, number]; _event.laneId = laneId.toString().replace('0x', ''); _event.messageNonce = messageNonce; } + if (_event.type == RelayBlockType.OnDemand && onDemandType == OnDemandType.Dispatch) { + const data = event.data; + const [chainId, bridgeMessageIdOf] = data as unknown as [string, any]; + const [laneId, messageNonce] = bridgeMessageIdOf as unknown as [string, number]; + _event.laneId = laneId.toString().replace('0x', ''); + _event.messageNonce = messageNonce; + } if (_event.type == RelayBlockType.Mandatory) { let justificationMapping = await JustificationMapping.get(block.number.toString()); if (!justificationMapping) { diff --git a/subql/s2s/crab/project.yaml b/subql/s2s/crab/project.yaml index 36fb3f3d4..c4e2dacef 100644 --- a/subql/s2s/crab/project.yaml +++ b/subql/s2s/crab/project.yaml @@ -19,12 +19,34 @@ dataSources: handlers: - handler: handleBlock kind: substrate/BlockHandler + + - handler: handleCall + kind: substrate/CallHandler + - handler: handleEvent kind: substrate/EventHandler filter: - - module: grandpa - method: NewAuthorities - - module: bridgeCrabParachainMessages - method: MessageAccepted - - handler: handleCall - kind: substrate/CallHandler + module: grandpa + method: NewAuthorities + + - handler: handleEvent + kind: substrate/EventHandler + filter: + module: bridgeCrabParachainMessages + method: MessageAccepted + + - handler: handleEvent + kind: substrate/EventHandler + filter: + module: bridgeCrabParachainDispatch + + - handler: handleEvent + kind: substrate/EventHandler + filter: + module: bridgeDarwiniaMessages + method: MessageAccepted + + - handler: handleEvent + kind: substrate/EventHandler + filter: + module: bridgeDarwiniaDispatch diff --git a/subql/s2s/crab/schema.graphql b/subql/s2s/crab/schema.graphql index e05dab4ec..407b588c0 100644 --- a/subql/s2s/crab/schema.graphql +++ b/subql/s2s/crab/schema.graphql @@ -22,6 +22,10 @@ type NeedRelayBlock @entity { extrinsicsRoot: String! digest: String! + onDemandType: String, + + additional: String + timestamp: Date } diff --git a/subql/s2s/crab/src/handler/event.ts b/subql/s2s/crab/src/handler/event.ts index 3246f0f29..5239b5720 100644 --- a/subql/s2s/crab/src/handler/event.ts +++ b/subql/s2s/crab/src/handler/event.ts @@ -1,6 +1,6 @@ import {FastEvent} from '../helpers'; import * as storage from '../storage'; -import {RelayBlockOrigin} from "../storage"; +import {OnDemandType, RelayBlockOrigin} from "../storage"; import {BlockHandler} from "./block"; export class EventHandler { @@ -21,14 +21,50 @@ export class EventHandler { logger.info(`[event] Received event: [${eventKey}] [${eventId}] in block ${blockNumber}`); switch (eventKey) { case 'grandpa:NewAuthorities': { - await storage.storeNeedRelayBlock(this.event, RelayBlockOrigin.Mandatory); + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.Mandatory, + ); + return; + } + case 'bridgeDarwiniaMessages:MessageAccepted': { + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.BridgeDarwinia, + OnDemandType.SendMessage, + ); return; } case 'bridgeCrabParachainMessages:MessageAccepted': { - await storage.storeNeedRelayBlock(this.event, RelayBlockOrigin.BridgeCrabParachain); + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.BridgeCrabParachain, + OnDemandType.SendMessage, + ); return; } } + // dispatch + + if (eventSection === 'bridgeDarwiniaDispatch') { + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.BridgeDarwinia, + OnDemandType.Dispatch, + eventMethod, + ); + return; + } + if (eventSection === 'bridgeCrabParachainDispatch') { + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.BridgeCrabParachain, + OnDemandType.Dispatch, + eventMethod, + ); + return; + } + } } diff --git a/subql/s2s/crab/src/storage/event.ts b/subql/s2s/crab/src/storage/event.ts index a1497c92b..bbaaa62b9 100644 --- a/subql/s2s/crab/src/storage/event.ts +++ b/subql/s2s/crab/src/storage/event.ts @@ -7,21 +7,31 @@ export enum RelayBlockType { OnDemand = 'on-demand', } +export enum OnDemandType { + SendMessage = 'send-message', + Dispatch = 'dispatch', +} + export enum RelayBlockOrigin { Mandatory = 'mandatory', BridgeCrabParachain = 'bridge-crab-parachain', + BridgeDarwinia = 'bridge-darwinia', } export async function storeNeedRelayBlock( event: FastEvent, - origin: RelayBlockOrigin + origin: RelayBlockOrigin, + onDemandType?: OnDemandType, + additional?: string, ) { const _event = new NeedRelayBlock(event.id); _event.blockNumber = event.blockNumber; _event.blockHash = event.blockHash; _event.type = origin == RelayBlockOrigin.Mandatory ? RelayBlockType.Mandatory : RelayBlockType.OnDemand; _event.origin = origin; + _event.onDemandType = onDemandType; + _event.additional = additional; const block = new FastBlock(event.block); const header = block.raw.block.header; @@ -30,12 +40,19 @@ export async function storeNeedRelayBlock( _event.extrinsicsRoot = header.extrinsicsRoot.toString(); _event.digest = header.digest.toHex(); - if (_event.type == RelayBlockType.OnDemand) { + if (_event.type == RelayBlockType.OnDemand && onDemandType == OnDemandType.SendMessage) { const data = event.data; const [laneId, messageNonce] = data as unknown as [string, number]; _event.laneId = laneId.toString().replace('0x', ''); _event.messageNonce = messageNonce; } + if (_event.type == RelayBlockType.OnDemand && onDemandType == OnDemandType.Dispatch) { + const data = event.data; + const [chainId, bridgeMessageIdOf] = data as unknown as [string, any]; + const [laneId, messageNonce] = bridgeMessageIdOf as unknown as [string, number]; + _event.laneId = laneId.toString().replace('0x', ''); + _event.messageNonce = messageNonce; + } if (_event.type == RelayBlockType.Mandatory) { let justificationMapping = await JustificationMapping.get(block.number.toString()); if (!justificationMapping) { diff --git a/subql/s2s/darwinia/.gitignore b/subql/s2s/darwinia/.gitignore new file mode 100644 index 000000000..f032df436 --- /dev/null +++ b/subql/s2s/darwinia/.gitignore @@ -0,0 +1,55 @@ +# These are some examples of commonly ignored file patterns. +# You should customize this list as applicable to your project. +# Learn more about .gitignore: +# https://www.atlassian.com/git/tutorials/saving-changes/gitignore + +# Node artifact files +node_modules/ +dist/ + +# lock files +yarn.lock +package-lock.json + +# Compiled Java class files +*.class + +# Compiled Python bytecode +*.py[cod] + +# Log files +*.log + +# Package files +*.jar + +# Maven +target/ +dist/ +src/types + +# JetBrains IDE +.idea/ + +# Unit test reports +TEST*.xml + +# Generated by MacOS +.DS_Store + +# Generated by Windows +Thumbs.db + +# Applications +*.app +*.exe +*.war + +# Large media files +*.mp4 +*.tiff +*.avi +*.flv +*.mov +*.wmv + diff --git a/subql/s2s/darwinia/LICENSE b/subql/s2s/darwinia/LICENSE new file mode 100644 index 000000000..3c806ae55 --- /dev/null +++ b/subql/s2s/darwinia/LICENSE @@ -0,0 +1,21 @@ +MIT LICENSE + +Copyright 2020-2021 OnFinality Limited authors & contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/subql/s2s/darwinia/README.md b/subql/s2s/darwinia/README.md new file mode 100644 index 000000000..e21cd2bab --- /dev/null +++ b/subql/s2s/darwinia/README.md @@ -0,0 +1,102 @@ +# SubQuery - Starter Package + + +The Starter Package is an example that you can use as a starting point for developing your SubQuery project. +A SubQuery package defines which data The SubQuery will index from the Substrate blockchain, and how it will store it. + +## Preparation + +#### Environment + +- [Typescript](https://www.typescriptlang.org/) are required to compile project and define types. + +- Both SubQuery CLI and generated Project have dependencies and require [Node](https://nodejs.org/en/). + + +#### Install the SubQuery CLI + +Install SubQuery CLI globally on your terminal by using NPM: + +``` +npm install -g @subql/cli +``` + +Run help to see available commands and usage provide by CLI +``` +subql help +``` + +## Initialize the starter package + +Inside the directory in which you want to create the SubQuery project, simply replace `project-name` with your project name and run the command: +``` +subql init --starter project-name +``` +Then you should see a folder with your project name has been created inside the directory, you can use this as the start point of your project. And the files should be identical as in the [Directory Structure](https://doc.subquery.network/directory_structure.html). + +Last, under the project directory, run following command to install all the dependency. +``` +yarn install +``` + + +## Configure your project + +In the starter package, we have provided a simple example of project configuration. You will be mainly working on the following files: + +- The Manifest in `project.yaml` +- The GraphQL Schema in `schema.graphql` +- The Mapping functions in `src/mappings/` directory + +For more information on how to write the SubQuery, +check out our doc section on [Define the SubQuery](https://doc.subquery.network/define_a_subquery.html) + +#### Code generation + +In order to index your SubQuery project, it is mandatory to build your project first. +Run this command under the project directory. + +```` +yarn codegen +```` + +## Build the project + +In order to deploy your SubQuery project to our hosted service, it is mandatory to pack your configuration before upload. +Run pack command from root directory of your project will automatically generate a `your-project-name.tgz` file. + +``` +yarn build +``` + +## Indexing and Query + +#### Run required systems in docker + + +Under the project directory run following command: + +``` +docker-compose pull && docker-compose up +``` +#### Query the project + +Open your browser and head to `http://localhost:3000`. + +Finally, you should see a GraphQL playground is showing in the explorer and the schemas that ready to query. + +For the `subql-starter` project, you can try to query with the following code to get a taste of how it works. + +````graphql +{ + query{ + starterEntities(first:10){ + nodes{ + field1, + field2, + field3 + } + } + } +} +```` diff --git a/subql/s2s/darwinia/docker-compose.yml b/subql/s2s/darwinia/docker-compose.yml new file mode 100644 index 000000000..5e73f7e93 --- /dev/null +++ b/subql/s2s/darwinia/docker-compose.yml @@ -0,0 +1,60 @@ +version: "3" + +services: + postgres: + image: postgres:12-alpine + # ports: + # - 5432:5432 + volumes: + - .data/postgres:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: postgres + healthcheck: + test: ["CMD-SHELL", "pg_isready -U postgres"] + interval: 5s + timeout: 5s + retries: 5 + + subquery-node: + image: onfinality/subql-node:v1.0.0 + depends_on: + "postgres": + condition: service_healthy + restart: always + environment: + DB_USER: postgres + DB_PASS: postgres + DB_DATABASE: postgres + DB_HOST: postgres + DB_PORT: 5432 + volumes: + - ./:/app + command: + - -f=/app + - --db-schema=app + healthcheck: + test: ["CMD", "curl", "-f", "http://subquery-node:3000/ready"] + interval: 3s + timeout: 5s + retries: 10 + + graphql-engine: + image: onfinality/subql-query:v1.0.0 + ports: + - 3000:3000 + depends_on: + "postgres": + condition: service_healthy + "subquery-node": + condition: service_healthy + restart: always + environment: + DB_USER: postgres + DB_PASS: postgres + DB_DATABASE: postgres + DB_HOST: postgres + DB_PORT: 5432 + command: + - --name=app + - --playground + - --indexer=http://subquery-node:3000 diff --git a/subql/s2s/darwinia/examples/need_relay_block.query.txt b/subql/s2s/darwinia/examples/need_relay_block.query.txt new file mode 100644 index 000000000..0dd15ebb4 --- /dev/null +++ b/subql/s2s/darwinia/examples/need_relay_block.query.txt @@ -0,0 +1,30 @@ + +query queryNeedRelayBlockPage { + justificationMappings ( + first: 5 + orderBy: BLOCK_NUMBER_DESC + ) { + nodes { + id + blockNumber + blockHash + mandatory + justification + } + } + needRelayBlocks ( + first: 5 + orderBy: BLOCK_NUMBER_ASC + ) { + nodes { + id + blockNumber + blockHash + type + origin + laneId + messageNonce + timestamp + } + } +} diff --git a/subql/s2s/darwinia/package.json b/subql/s2s/darwinia/package.json new file mode 100644 index 000000000..6b5488a50 --- /dev/null +++ b/subql/s2s/darwinia/package.json @@ -0,0 +1,29 @@ +{ + "name": "subql-s2s-darwinia", + "version": "0.5.7", + "description": "This SubQuery project can be use as a starting point for Darwinia network", + "main": "dist/index.js", + "scripts": { + "build": "tsc -b", + "prepack": "rm -rf dist && npm build", + "test": "jest", + "codegen": "./node_modules/.bin/subql codegen" + }, + "homepage": "https://github.com/darwinia-network/bridger", + "repository": "https://github.com/darwinia-network/bridger", + "files": [ + "dist", + "schema.graphql", + "project.yaml" + ], + "author": "Darwinia Network", + "devDependencies": { + "@polkadot/api": "^7", + "@subql/types": "latest", + "typescript": "^4.2.4", + "@subql/cli": "latest" + }, + "resolutions": { + "ipfs-unixfs": "6.0.6" + } +} diff --git a/subql/s2s/darwinia/project.yaml b/subql/s2s/darwinia/project.yaml new file mode 100644 index 000000000..0b9852afb --- /dev/null +++ b/subql/s2s/darwinia/project.yaml @@ -0,0 +1,43 @@ +specVersion: 1.0.0 +name: subql-s2s-darwinia +version: 0.5.7 +runner: + node: + name: '@subql/node' + version: '*' + query: + name: '@subql/query' + version: '*' +description: S2S bridge crab subql +repository: 'https://github.com/darwinia-network/bridger' +schema: + file: ./schema.graphql +network: + chainId: '0x729cb8f2cf428adcf81fe69610edda32c5711b2ff17de747e8604a3587021db8' + endpoint: 'https://rpc.darwinia.network' + dictionary: 'https://api.subquery.network/sq/darwinia-network/darwinia-dictionary' +dataSources: + - name: main + kind: substrate/Runtime + startBlock: 9149928 + mapping: + file: ./dist/index.js + handlers: + - handler: handleBlock + kind: substrate/BlockHandler + - handler: handleCall + kind: substrate/CallHandler + - handler: handleEvent + kind: substrate/EventHandler + filter: + module: grandpa + method: NewAuthorities + - handler: handleEvent + kind: substrate/EventHandler + filter: + module: bridgeCrabMessages + method: MessageAccepted + - handler: handleEvent + kind: substrate/EventHandler + filter: + module: bridgeCrabDispatch diff --git a/subql/s2s/darwinia/schema.graphql b/subql/s2s/darwinia/schema.graphql new file mode 100644 index 000000000..407b588c0 --- /dev/null +++ b/subql/s2s/darwinia/schema.graphql @@ -0,0 +1,40 @@ + +type Block @entity { + id: ID! + + number: Int + timestamp: Date + parentHash: String + specVersion: Int +} + +type NeedRelayBlock @entity { + id: ID! + + blockNumber: Int! + blockHash: String! + type: String! + origin: String! + laneId: String + messageNonce: Int + parentHash: String! + stateRoot: String! + extrinsicsRoot: String! + digest: String! + + onDemandType: String, + + additional: String + + timestamp: Date +} + +type JustificationMapping @entity { + id: ID! + + blockNumber: Int! + blockHash: String! + mandatory: Boolean! + justification: String! + +} diff --git a/subql/s2s/darwinia/src/handler/block.ts b/subql/s2s/darwinia/src/handler/block.ts new file mode 100644 index 000000000..bce029bff --- /dev/null +++ b/subql/s2s/darwinia/src/handler/block.ts @@ -0,0 +1,25 @@ +import {SubstrateBlock} from '@subql/types'; +import * as storage from '../storage'; +import {Block} from '../types'; +import {FastBlock} from "../helpers"; + +export class BlockHandler { + private readonly block: SubstrateBlock; + + static async ensureBlock(id: string): Promise { + const block = await Block.get(id); + + if (!block) { + await new Block(id).save(); + } + } + + constructor(block: SubstrateBlock) { + this.block = block; + } + + public async save() { + const fastBlock = new FastBlock(this.block); + await storage.storeJustification(fastBlock); + } +} diff --git a/subql/s2s/darwinia/src/handler/event.ts b/subql/s2s/darwinia/src/handler/event.ts new file mode 100644 index 000000000..86b72edb6 --- /dev/null +++ b/subql/s2s/darwinia/src/handler/event.ts @@ -0,0 +1,53 @@ +import {FastEvent} from '../helpers'; +import * as storage from '../storage'; +import {OnDemandType, RelayBlockOrigin} from "../storage"; +import {BlockHandler} from "./block"; + +export class EventHandler { + private readonly event: FastEvent; + + constructor(event: FastEvent) { + this.event = event; + } + + public async save() { + await BlockHandler.ensureBlock(this.event.blockHash); + + const eventId = this.event.id; + const eventSection = this.event.section; + const eventMethod = this.event.method; + const blockNumber = this.event.blockNumber; + const eventKey = `${eventSection}:${eventMethod}`; + logger.info(`[event] Received event: [${eventKey}] [${eventId}] in block ${blockNumber}`); + switch (eventKey) { + case 'grandpa:NewAuthorities': { + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.Mandatory, + ); + return; + } + case 'bridgeCrabMessages:MessageAccepted': { + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.BridgeCrab, + OnDemandType.SendMessage, + ); + return; + } + } + + // dispatch + + if (eventSection === 'bridgeCrabDispatch') { + await storage.storeNeedRelayBlock( + this.event, + RelayBlockOrigin.BridgeCrab, + OnDemandType.Dispatch, + eventMethod, + ); + return; + } + + } +} diff --git a/subql/s2s/darwinia/src/helpers/block.ts b/subql/s2s/darwinia/src/helpers/block.ts new file mode 100644 index 000000000..5d811254c --- /dev/null +++ b/subql/s2s/darwinia/src/helpers/block.ts @@ -0,0 +1,42 @@ +import { Block } from '@polkadot/types/interfaces/runtime'; +import {SubstrateBlock} from "@subql/types"; + +export const getBlockTimestamp = (block: Block): Date => { + const extrinsicForSetTimestamp = block.extrinsics.find((item) => { + return item.method.method === 'set' && item.method.section === 'timestamp'; + }); + + if (extrinsicForSetTimestamp) { + return new Date(Number(extrinsicForSetTimestamp?.args?.[0].toString())); + } + + return new Date(); +}; + +export class FastBlock { + private readonly block: SubstrateBlock; + + constructor(block: SubstrateBlock) { + this.block = block; + } + + get raw() { + return this.block; + } + + get number() { + return this.block.block.header.number.toNumber() || Number(0); + } + + get hash() { + return this.block.block.hash.toString(); + } + + get specVersion() { + return this.block.specVersion; + } + + get parentHash() { + return this.block.block.header.parentHash.toString(); + } +} diff --git a/subql/s2s/darwinia/src/helpers/event.ts b/subql/s2s/darwinia/src/helpers/event.ts new file mode 100644 index 000000000..dad2eafc2 --- /dev/null +++ b/subql/s2s/darwinia/src/helpers/event.ts @@ -0,0 +1,60 @@ +import {SubstrateEvent} from "@subql/types"; + +export class FastEvent { + private readonly event: SubstrateEvent; + + constructor(event: SubstrateEvent) { + this.event = event; + } + + get raw() { + return this.event; + } + + get index() { + return this.event.idx; + } + + get block() { + return this.event.block + } + + get blockNumber() { + return this.event.block.block.header.number.toNumber(); + } + + get blockHash() { + return this.event.block.block.hash.toString(); + } + + get events() { + return this.event.block.events; + } + + get section() { + return this.event.event.section; + } + + get method() { + return this.event.event.method; + } + + get data() { + return this.event.event.data; + } + + get extrinsicHash() { + const i = this.event?.extrinsic?.extrinsic?.hash?.toString(); + + return i === 'null' ? undefined : i; + } + + get id() { + return `${this.blockNumber}-${this.index}`; + } + + get timestamp() { + return this.event.block.timestamp; + } + +} diff --git a/subql/s2s/darwinia/src/helpers/index.ts b/subql/s2s/darwinia/src/helpers/index.ts new file mode 100644 index 000000000..1b59dc413 --- /dev/null +++ b/subql/s2s/darwinia/src/helpers/index.ts @@ -0,0 +1,2 @@ +export * from './block' +export * from './event' diff --git a/subql/s2s/darwinia/src/index.ts b/subql/s2s/darwinia/src/index.ts new file mode 100644 index 000000000..69d499bb2 --- /dev/null +++ b/subql/s2s/darwinia/src/index.ts @@ -0,0 +1,3 @@ +//Exports all handler functions +export * from './mappings/mappingHandlers' +import "@polkadot/api-augment" diff --git a/subql/s2s/darwinia/src/mappings/mappingHandlers.ts b/subql/s2s/darwinia/src/mappings/mappingHandlers.ts new file mode 100644 index 000000000..c85480169 --- /dev/null +++ b/subql/s2s/darwinia/src/mappings/mappingHandlers.ts @@ -0,0 +1,21 @@ +import {SubstrateExtrinsic, SubstrateEvent, SubstrateBlock} from '@subql/types'; +import {FastEvent} from '../helpers'; +import {EventHandler} from "../handler/event"; +import {BlockHandler} from "../handler/block"; + + +export async function handleBlock(block: SubstrateBlock): Promise { + const handler = new BlockHandler(block); + await handler.save(); +} + +export async function handleEvent(event: SubstrateEvent): Promise { + const fastEvent = new FastEvent(event); + const handler = new EventHandler(fastEvent); + await handler.save(); +} + +export async function handleCall(extrinsic: SubstrateExtrinsic): Promise { +} + + diff --git a/subql/s2s/darwinia/src/storage/block.ts b/subql/s2s/darwinia/src/storage/block.ts new file mode 100644 index 000000000..aa96c794a --- /dev/null +++ b/subql/s2s/darwinia/src/storage/block.ts @@ -0,0 +1,29 @@ +import {Justifications} from "@polkadot/types/interfaces/runtime/types"; +import {JustificationMapping} from "../types"; +import {FastBlock} from "../helpers"; + + + +export async function storeJustification( + block: FastBlock, +) { + const rawBlock = block.raw; + if (rawBlock.justifications.isNone) { + return; + } + const justifications = rawBlock.justifications.value as unknown as Justifications; + + for (const justification of justifications) { + const [consensusEngineId, encodedJustification] = justification; + if (!consensusEngineId.isGrandpa) continue; + + const _justification = new JustificationMapping(block.number.toString()); + _justification.blockNumber = block.number; + _justification.blockHash = block.hash; + _justification.mandatory = false; + _justification.justification = encodedJustification.toString(); + await _justification.save(); + break; + } + +} diff --git a/subql/s2s/darwinia/src/storage/event.ts b/subql/s2s/darwinia/src/storage/event.ts new file mode 100644 index 000000000..331f230e8 --- /dev/null +++ b/subql/s2s/darwinia/src/storage/event.ts @@ -0,0 +1,67 @@ +import {FastBlock, FastEvent} from '../helpers'; +import {JustificationMapping, NeedRelayBlock} from '../types'; +import {storeJustification} from "./block"; + +export enum RelayBlockType { + Mandatory = 'mandatory', + OnDemand = 'on-demand', +} + +export enum OnDemandType { + SendMessage = 'send-message', + Dispatch = 'dispatch', +} + +export enum RelayBlockOrigin { + Mandatory = 'mandatory', + BridgeCrab = 'bridge-crab', +} + + +export async function storeNeedRelayBlock( + event: FastEvent, + origin: RelayBlockOrigin, + onDemandType?: OnDemandType, + additional?: string, +) { + const _event = new NeedRelayBlock(event.id); + _event.blockNumber = event.blockNumber; + _event.blockHash = event.blockHash; + _event.type = origin == RelayBlockOrigin.Mandatory ? RelayBlockType.Mandatory : RelayBlockType.OnDemand; + _event.origin = origin; + _event.onDemandType = onDemandType; + _event.additional = additional; + + const block = new FastBlock(event.block); + const header = block.raw.block.header; + _event.parentHash = header.parentHash.toString(); + _event.stateRoot = header.stateRoot.toString(); + _event.extrinsicsRoot = header.extrinsicsRoot.toString(); + _event.digest = header.digest.toHex(); + + if (_event.type == RelayBlockType.OnDemand && onDemandType == OnDemandType.SendMessage) { + const data = event.data; + const [laneId, messageNonce] = data as unknown as [string, number]; + _event.laneId = laneId.toString().replace('0x', ''); + _event.messageNonce = messageNonce; + } + if (_event.type == RelayBlockType.OnDemand && onDemandType == OnDemandType.Dispatch) { + const data = event.data; + const [chainId, bridgeMessageIdOf] = data as unknown as [string, any]; + const [laneId, messageNonce] = bridgeMessageIdOf as unknown as [string, number]; + _event.laneId = laneId.toString().replace('0x', ''); + _event.messageNonce = messageNonce; + } + if (_event.type == RelayBlockType.Mandatory) { + let justificationMapping = await JustificationMapping.get(block.number.toString()); + if (!justificationMapping) { + await storeJustification(block); + justificationMapping = await JustificationMapping.get(block.number.toString()); + } + justificationMapping.mandatory = true; + await justificationMapping.save(); + } + + _event.timestamp = event.timestamp; + await _event.save(); +} diff --git a/subql/s2s/darwinia/src/storage/index.ts b/subql/s2s/darwinia/src/storage/index.ts new file mode 100644 index 000000000..b9ab01ced --- /dev/null +++ b/subql/s2s/darwinia/src/storage/index.ts @@ -0,0 +1,2 @@ +export * from './event' +export * from './block' diff --git a/subql/s2s/darwinia/tsconfig.json b/subql/s2s/darwinia/tsconfig.json new file mode 100644 index 000000000..9b95212d1 --- /dev/null +++ b/subql/s2s/darwinia/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "esModuleInterop": true, + "declaration": true, + "importHelpers": true, + "resolveJsonModule": true, + "module": "commonjs", + "outDir": "dist", + "rootDir": "src", + "target": "es2017" + }, + "include": [ + "src/**/*", + "node_modules/@subql/types/dist/global.d.ts" + ] +}