difftreelog
Merge branch 'develop' into feature/CORE-238
in: master
73 files changed
.envdiffbeforeafterboth--- a/.env
+++ b/.env
@@ -1,6 +1,6 @@
RUST_TOOLCHAIN=nightly-2021-11-11
RUST_C=1.58.0-nightly
-POLKA_VERSION=release-v0.9.17
+POLKA_VERSION=release-v0.9.18
UNIQUE_BRANCH=develop
USER=***
PASS=***
.gitignorediffbeforeafterboth--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
*store_key*.json
/.idea/
+/.cargo/
tests/.vscode
cumulus-parachain/
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -44,7 +44,7 @@
dependencies = [
"cfg-if 1.0.0",
"cipher",
- "cpufeatures 0.2.1",
+ "cpufeatures 0.2.2",
"opaque-debug 0.3.0",
]
@@ -68,7 +68,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
dependencies = [
- "getrandom 0.2.5",
+ "getrandom 0.2.6",
"once_cell",
"version_check",
]
@@ -99,9 +99,9 @@
[[package]]
name = "anyhow"
-version = "1.0.55"
+version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd"
+checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27"
[[package]]
name = "approx"
@@ -188,9 +188,9 @@
[[package]]
name = "async-global-executor"
-version = "2.0.3"
+version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c026b7e44f1316b567ee750fea85103f87fcb80792b860e979f221259796ca0a"
+checksum = "c290043c9a95b05d45e952fb6383c67bcb61471f60cfa21e890dba6654234f43"
dependencies = [
"async-channel",
"async-executor",
@@ -258,16 +258,15 @@
[[package]]
name = "async-std"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952"
+checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c"
dependencies = [
"async-attributes",
"async-channel",
"async-global-executor",
"async-io",
"async-lock",
- "async-process",
"crossbeam-utils",
"futures-channel",
"futures-core",
@@ -301,15 +300,15 @@
[[package]]
name = "async-task"
-version = "4.1.0"
+version = "4.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "677d306121baf53310a3fd342d88dc0824f6bbeace68347593658525565abee8"
+checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9"
[[package]]
name = "async-trait"
-version = "0.1.52"
+version = "0.1.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3"
+checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600"
dependencies = [
"proc-macro2",
"quote",
@@ -387,6 +386,20 @@
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
+name = "backoff"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1"
+dependencies = [
+ "futures-core",
+ "getrandom 0.2.6",
+ "instant",
+ "pin-project-lite 0.2.8",
+ "rand 0.8.5",
+ "tokio 1.17.0",
+]
+
+[[package]]
name = "backtrace"
version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -408,6 +421,12 @@
checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b"
[[package]]
+name = "base16ct"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce"
+
+[[package]]
name = "base58"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -420,6 +439,12 @@
checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
+name = "base64ct"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dea908e7347a8c64e378c17e30ef880ad73e3b4498346b055c2c00ea342f3179"
+
+[[package]]
name = "beef"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -431,14 +456,15 @@
[[package]]
name = "beefy-gadget"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"beefy-primitives",
"fnv",
"futures 0.3.21",
+ "hex",
"log",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-chain-spec",
"sc-client-api",
"sc-keystore",
@@ -460,7 +486,7 @@
[[package]]
name = "beefy-gadget-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"beefy-gadget",
"beefy-primitives",
@@ -471,7 +497,7 @@
"jsonrpc-pubsub",
"log",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-rpc",
"sc-utils",
"serde",
@@ -483,12 +509,12 @@
[[package]]
name = "beefy-merkle-tree"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
[[package]]
name = "beefy-primitives"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -541,11 +567,11 @@
[[package]]
name = "bitvec"
-version = "0.20.4"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848"
+checksum = "1489fcb93a5bb47da0462ca93ad252ad6af2145cce58d10d46a83931ba9f016b"
dependencies = [
- "funty",
+ "funty 2.0.0",
"radium",
"tap",
"wyz",
@@ -563,6 +589,15 @@
]
[[package]]
+name = "blake2"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388"
+dependencies = [
+ "digest 0.10.3",
+]
+
+[[package]]
name = "blake2-rfc"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -610,6 +645,20 @@
]
[[package]]
+name = "blake3"
+version = "1.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a08e53fc5a564bb15bfe6fae56bd71522205f1f91893f9c0116edad6496c183f"
+dependencies = [
+ "arrayref",
+ "arrayvec 0.7.2",
+ "cc",
+ "cfg-if 1.0.0",
+ "constant_time_eq",
+ "digest 0.10.3",
+]
+
+[[package]]
name = "block-buffer"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -657,9 +706,9 @@
[[package]]
name = "blocking"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427"
+checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc"
dependencies = [
"async-channel",
"async-task",
@@ -681,7 +730,7 @@
[[package]]
name = "bp-header-chain"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"finality-grandpa",
"frame-support",
@@ -697,7 +746,7 @@
[[package]]
name = "bp-message-dispatch"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bp-runtime",
"frame-support",
@@ -709,7 +758,7 @@
[[package]]
name = "bp-messages"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bitvec",
"bp-runtime",
@@ -725,7 +774,7 @@
[[package]]
name = "bp-polkadot-core"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bp-messages",
"bp-runtime",
@@ -743,7 +792,7 @@
[[package]]
name = "bp-rococo"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bp-messages",
"bp-polkadot-core",
@@ -760,7 +809,7 @@
[[package]]
name = "bp-runtime"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-support",
"hash-db",
@@ -778,7 +827,7 @@
[[package]]
name = "bp-test-utils"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bp-header-chain",
"ed25519-dalek",
@@ -793,7 +842,7 @@
[[package]]
name = "bp-wococo"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bp-messages",
"bp-polkadot-core",
@@ -808,7 +857,7 @@
[[package]]
name = "bridge-runtime-common"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bp-message-dispatch",
"bp-messages",
@@ -899,6 +948,17 @@
checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
[[package]]
+name = "bzip2-sys"
+version = "0.1.11+1.0.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc"
+dependencies = [
+ "cc",
+ "libc",
+ "pkg-config",
+]
+
+[[package]]
name = "cache-padded"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -930,7 +990,7 @@
dependencies = [
"camino",
"cargo-platform",
- "semver 1.0.6",
+ "semver 1.0.7",
"serde",
"serde_json",
]
@@ -1051,9 +1111,9 @@
[[package]]
name = "clap"
-version = "3.1.5"
+version = "3.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312"
+checksum = "71c47df61d9e16dc010b55dba1952a57d8c215dbb533fd13cdd13369aac73b1c"
dependencies = [
"atty",
"bitflags",
@@ -1068,9 +1128,9 @@
[[package]]
name = "clap_derive"
-version = "3.1.4"
+version = "3.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16"
+checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1"
dependencies = [
"heck 0.4.0",
"proc-macro-error",
@@ -1080,15 +1140,6 @@
]
[[package]]
-name = "cloudabi"
-version = "0.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
-dependencies = [
- "bitflags",
-]
-
-[[package]]
name = "concurrent-queue"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1098,6 +1149,12 @@
]
[[package]]
+name = "const-oid"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3"
+
+[[package]]
name = "constant_time_eq"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1145,9 +1202,9 @@
[[package]]
name = "cpufeatures"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469"
+checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b"
dependencies = [
"libc",
]
@@ -1252,9 +1309,9 @@
[[package]]
name = "crossbeam-channel"
-version = "0.5.2"
+version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa"
+checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
@@ -1273,10 +1330,11 @@
[[package]]
name = "crossbeam-epoch"
-version = "0.9.7"
+version = "0.9.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9"
+checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c"
dependencies = [
+ "autocfg",
"cfg-if 1.0.0",
"crossbeam-utils",
"lazy_static",
@@ -1286,9 +1344,9 @@
[[package]]
name = "crossbeam-utils"
-version = "0.8.7"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6"
+checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
dependencies = [
"cfg-if 1.0.0",
"lazy_static",
@@ -1301,6 +1359,18 @@
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
+name = "crypto-bigint"
+version = "0.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21"
+dependencies = [
+ "generic-array 0.14.5",
+ "rand_core 0.6.3",
+ "subtle 2.4.1",
+ "zeroize",
+]
+
+[[package]]
name = "crypto-common"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1351,9 +1421,9 @@
[[package]]
name = "ctor"
-version = "0.1.21"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa"
+checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c"
dependencies = [
"quote",
"syn",
@@ -1382,17 +1452,18 @@
[[package]]
name = "cumulus-client-cli"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"clap",
"sc-cli",
"sc-service",
+ "url 2.2.2",
]
[[package]]
name = "cumulus-client-collator"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-client-consensus-common",
"cumulus-client-network",
@@ -1400,7 +1471,7 @@
"cumulus-relay-chain-interface",
"futures 0.3.21",
"parity-scale-codec",
- "parking_lot 0.10.2",
+ "parking_lot 0.12.0",
"polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-overseer",
@@ -1416,7 +1487,7 @@
[[package]]
name = "cumulus-client-consensus-aura"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"async-trait",
"cumulus-client-consensus-common",
@@ -1445,7 +1516,7 @@
[[package]]
name = "cumulus-client-consensus-common"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"async-trait",
"cumulus-relay-chain-interface",
@@ -1466,7 +1537,7 @@
[[package]]
name = "cumulus-client-network"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"async-trait",
"cumulus-relay-chain-interface",
@@ -1491,7 +1562,7 @@
[[package]]
name = "cumulus-client-pov-recovery"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-primitives-core",
"cumulus-relay-chain-interface",
@@ -1515,8 +1586,9 @@
[[package]]
name = "cumulus-client-service"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
+ "cumulus-client-cli",
"cumulus-client-collator",
"cumulus-client-consensus-common",
"cumulus-client-pov-recovery",
@@ -1544,7 +1616,7 @@
[[package]]
name = "cumulus-pallet-aura-ext"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"frame-executive",
"frame-support",
@@ -1562,7 +1634,7 @@
[[package]]
name = "cumulus-pallet-dmp-queue"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1580,7 +1652,7 @@
[[package]]
name = "cumulus-pallet-parachain-system"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-pallet-parachain-system-proc-macro",
"cumulus-primitives-core",
@@ -1610,7 +1682,7 @@
[[package]]
name = "cumulus-pallet-parachain-system-proc-macro"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
@@ -1621,7 +1693,7 @@
[[package]]
name = "cumulus-pallet-xcm"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1638,7 +1710,7 @@
[[package]]
name = "cumulus-pallet-xcmp-queue"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1656,7 +1728,7 @@
[[package]]
name = "cumulus-primitives-core"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -1672,7 +1744,7 @@
[[package]]
name = "cumulus-primitives-parachain-inherent"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"async-trait",
"cumulus-primitives-core",
@@ -1695,9 +1767,11 @@
[[package]]
name = "cumulus-primitives-timestamp"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-primitives-core",
+ "futures 0.3.21",
+ "parity-scale-codec",
"sp-inherents",
"sp-std",
"sp-timestamp",
@@ -1706,7 +1780,7 @@
[[package]]
name = "cumulus-primitives-utility"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1721,16 +1795,47 @@
]
[[package]]
+name = "cumulus-relay-chain-inprocess-interface"
+version = "0.1.0"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
+dependencies = [
+ "async-trait",
+ "cumulus-primitives-core",
+ "cumulus-relay-chain-interface",
+ "futures 0.3.21",
+ "futures-timer",
+ "parking_lot 0.12.0",
+ "polkadot-client",
+ "polkadot-service",
+ "sc-client-api",
+ "sc-consensus-babe",
+ "sc-network",
+ "sc-service",
+ "sc-telemetry",
+ "sc-tracing",
+ "sp-api",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-core",
+ "sp-runtime",
+ "sp-state-machine",
+ "tracing",
+]
+
+[[package]]
name = "cumulus-relay-chain-interface"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"async-trait",
"cumulus-primitives-core",
"derive_more",
"futures 0.3.21",
+ "jsonrpsee-core 0.9.0",
+ "parity-scale-codec",
"parking_lot 0.12.0",
"polkadot-overseer",
+ "polkadot-service",
"sc-client-api",
"sc-service",
"sp-api",
@@ -1742,37 +1847,35 @@
]
[[package]]
-name = "cumulus-relay-chain-local"
+name = "cumulus-relay-chain-rpc-interface"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"async-trait",
+ "backoff",
"cumulus-primitives-core",
"cumulus-relay-chain-interface",
"futures 0.3.21",
"futures-timer",
+ "jsonrpsee 0.9.0",
+ "parity-scale-codec",
"parking_lot 0.12.0",
- "polkadot-client",
"polkadot-service",
"sc-client-api",
- "sc-consensus-babe",
- "sc-network",
- "sc-service",
- "sc-telemetry",
- "sc-tracing",
+ "sc-rpc-api",
"sp-api",
- "sp-blockchain",
- "sp-consensus",
"sp-core",
"sp-runtime",
"sp-state-machine",
+ "sp-storage",
"tracing",
+ "url 2.2.2",
]
[[package]]
name = "cumulus-test-relay-sproof-builder"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-primitives-core",
"parity-scale-codec",
@@ -1810,9 +1913,9 @@
[[package]]
name = "darling"
-version = "0.13.1"
+version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0d720b8683f8dd83c65155f0530560cba68cd2bf395f6513a483caee57ff7f4"
+checksum = "4e92cb285610dd935f60ee8b4d62dd1988bd12b7ea50579bd6a138201525318e"
dependencies = [
"darling_core",
"darling_macro",
@@ -1820,9 +1923,9 @@
[[package]]
name = "darling_core"
-version = "0.13.1"
+version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a340f241d2ceed1deb47ae36c4144b2707ec7dd0b649f894cb39bb595986324"
+checksum = "5c29e95ab498b18131ea460b2c0baa18cbf041231d122b0b7bfebef8c8e88989"
dependencies = [
"fnv",
"ident_case",
@@ -1834,9 +1937,9 @@
[[package]]
name = "darling_macro"
-version = "0.13.1"
+version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72c41b3b7352feb3211a0d743dc5700a4e3b60f51bd2b368892d1e0f9a95f44b"
+checksum = "b21dd6b221dd547528bd6fb15f1a3b7ab03b9a06f76bff288a8c629bcfbe7f0e"
dependencies = [
"darling_core",
"quote",
@@ -1870,6 +1973,15 @@
]
[[package]]
+name = "der"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c"
+dependencies = [
+ "const-oid",
+]
+
+[[package]]
name = "derivative"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1919,6 +2031,7 @@
dependencies = [
"block-buffer 0.10.2",
"crypto-common",
+ "subtle 2.4.1",
]
[[package]]
@@ -1942,9 +2055,9 @@
[[package]]
name = "dirs-sys"
-version = "0.3.6"
+version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780"
+checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
dependencies = [
"libc",
"redox_users",
@@ -2007,15 +2120,26 @@
[[package]]
name = "dyn-clone"
-version = "1.0.4"
+version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee2626afccd7561a06cf1367e2950c4718ea04565e20fb5029b6c7d8ad09abcf"
+checksum = "21e50f3adc76d6a43f5ed73b698a87d0760ca74617f60f7c3b879003536fdd28"
[[package]]
+name = "ecdsa"
+version = "0.13.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9"
+dependencies = [
+ "der",
+ "elliptic-curve",
+ "signature",
+]
+
+[[package]]
name = "ed25519"
-version = "1.4.0"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eed12bbf7b5312f8da1c2722bc06d8c6b12c2d86a7fb35a194c7f3e6fc2bbe39"
+checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4"
dependencies = [
"signature",
]
@@ -2041,6 +2165,24 @@
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
+name = "elliptic-curve"
+version = "0.11.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6"
+dependencies = [
+ "base16ct",
+ "crypto-bigint",
+ "der",
+ "ff",
+ "generic-array 0.14.5",
+ "group",
+ "rand_core 0.6.3",
+ "sec1",
+ "subtle 2.4.1",
+ "zeroize",
+]
+
+[[package]]
name = "enum-as-inner"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2125,9 +2267,9 @@
[[package]]
name = "ethbloom"
-version = "0.11.1"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8"
+checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef"
dependencies = [
"crunchy",
"fixed-hash",
@@ -2140,9 +2282,9 @@
[[package]]
name = "ethereum"
-version = "0.11.1"
+version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34c90e0a755da706ce0970ec0fa8cc48aabcc8e8efa1245336acf718dab06ffe"
+checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef"
dependencies = [
"bytes 1.1.0",
"ethereum-types",
@@ -2153,22 +2295,22 @@
"rlp-derive",
"scale-info",
"serde",
- "sha3 0.9.1",
+ "sha3 0.10.1",
"triehash",
]
[[package]]
name = "ethereum-types"
-version = "0.12.1"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf"
+checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6"
dependencies = [
"ethbloom",
"fixed-hash",
"impl-codec",
"impl-rlp",
"impl-serde",
- "primitive-types 0.10.1",
+ "primitive-types",
"scale-info",
"uint",
]
@@ -2182,7 +2324,7 @@
[[package]]
name = "evm"
version = "0.33.1"
-source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.16#b6d849f3906eafc4f9a0aaa2d0fe5403d4e2c0a8"
+source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.18#5012fe9034f0a5cc6881d385890b11ef35d2e39a"
dependencies = [
"auto_impl",
"environmental",
@@ -2192,7 +2334,7 @@
"evm-runtime",
"log",
"parity-scale-codec",
- "primitive-types 0.10.1",
+ "primitive-types",
"rlp",
"scale-info",
"serde",
@@ -2209,7 +2351,7 @@
"hex",
"hex-literal",
"impl-trait-for-tuples",
- "primitive-types 0.10.1",
+ "primitive-types",
]
[[package]]
@@ -2228,11 +2370,11 @@
[[package]]
name = "evm-core"
version = "0.33.0"
-source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.16#b6d849f3906eafc4f9a0aaa2d0fe5403d4e2c0a8"
+source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.18#5012fe9034f0a5cc6881d385890b11ef35d2e39a"
dependencies = [
- "funty",
+ "funty 1.1.0",
"parity-scale-codec",
- "primitive-types 0.10.1",
+ "primitive-types",
"scale-info",
"serde",
]
@@ -2240,23 +2382,23 @@
[[package]]
name = "evm-gasometer"
version = "0.33.0"
-source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.16#b6d849f3906eafc4f9a0aaa2d0fe5403d4e2c0a8"
+source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.18#5012fe9034f0a5cc6881d385890b11ef35d2e39a"
dependencies = [
"environmental",
"evm-core",
"evm-runtime",
- "primitive-types 0.10.1",
+ "primitive-types",
]
[[package]]
name = "evm-runtime"
version = "0.33.0"
-source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.16#b6d849f3906eafc4f9a0aaa2d0fe5403d4e2c0a8"
+source = "git+https://github.com/uniquenetwork/evm.git?branch=unique-polkadot-v0.9.18#5012fe9034f0a5cc6881d385890b11ef35d2e39a"
dependencies = [
"auto_impl",
"environmental",
"evm-core",
- "primitive-types 0.10.1",
+ "primitive-types",
"sha3 0.8.2",
]
@@ -2270,6 +2412,30 @@
]
[[package]]
+name = "expander"
+version = "0.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a718c0675c555c5f976fff4ea9e2c150fa06cefa201cadef87cfbf9324075881"
+dependencies = [
+ "blake3 1.3.1",
+ "fs-err",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
+name = "expander"
+version = "0.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "309f21c39e8e38e4b6eda07e155bd7a4e5fc4d707cefd0402cc82a8b6bb65aaa"
+dependencies = [
+ "blake2 0.10.4",
+ "fs-err",
+ "proc-macro2",
+ "quote",
+]
+
+[[package]]
name = "fake-simd"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2291,9 +2457,34 @@
]
[[package]]
+name = "fatality"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2ad875162843b0d046276327afe0136e9ed3a23d5a754210fb6f1f33610d39ab"
+dependencies = [
+ "fatality-proc-macro",
+ "thiserror",
+]
+
+[[package]]
+name = "fatality-proc-macro"
+version = "0.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd"
+dependencies = [
+ "expander 0.0.4",
+ "indexmap",
+ "proc-macro-crate 1.1.3",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "thiserror",
+]
+
+[[package]]
name = "fc-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"async-trait",
"derive_more",
@@ -2320,7 +2511,7 @@
[[package]]
name = "fc-db"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"fp-storage",
"kvdb",
@@ -2336,7 +2527,7 @@
[[package]]
name = "fc-mapping-sync"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"fc-consensus",
"fc-db",
@@ -2354,7 +2545,7 @@
[[package]]
name = "fc-rpc"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2400,7 +2591,7 @@
[[package]]
name = "fc-rpc-core"
version = "1.1.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2425,6 +2616,16 @@
]
[[package]]
+name = "ff"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b2958d04124b9f27f175eaeb9a9f383d026098aa837eadd8ba22c11f13a05b9e"
+dependencies = [
+ "rand_core 0.6.3",
+ "subtle 2.4.1",
+]
+
+[[package]]
name = "file-per-thread-logger"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2436,9 +2637,9 @@
[[package]]
name = "finality-grandpa"
-version = "0.14.4"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a"
+checksum = "d9def033d8505edf199f6a5d07aa7e6d2d6185b164293b77f0efd108f4f3e11d"
dependencies = [
"either",
"futures 0.3.21",
@@ -2506,7 +2707,7 @@
[[package]]
name = "fork-tree"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
]
@@ -2524,7 +2725,7 @@
[[package]]
name = "fp-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"ethereum",
"parity-scale-codec",
@@ -2538,7 +2739,7 @@
[[package]]
name = "fp-evm"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"evm",
"impl-trait-for-tuples",
@@ -2550,9 +2751,18 @@
]
[[package]]
+name = "fp-evm-mapping"
+version = "0.1.0"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
+dependencies = [
+ "frame-support",
+ "sp-core",
+]
+
+[[package]]
name = "fp-rpc"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2569,7 +2779,7 @@
[[package]]
name = "fp-self-contained"
version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"ethereum",
"frame-support",
@@ -2586,12 +2796,12 @@
[[package]]
name = "fp-storage"
version = "2.0.0"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
[[package]]
name = "frame-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -2613,7 +2823,7 @@
[[package]]
name = "frame-benchmarking-cli"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"Inflector",
"chrono",
@@ -2621,26 +2831,40 @@
"frame-benchmarking",
"frame-support",
"handlebars",
+ "hash-db",
+ "hex",
+ "itertools",
+ "kvdb",
"linked-hash-map",
"log",
+ "memory-db",
"parity-scale-codec",
+ "rand 0.8.5",
"sc-cli",
+ "sc-client-api",
"sc-client-db",
"sc-executor",
"sc-service",
"serde",
"serde_json",
+ "serde_nanos",
+ "sp-api",
+ "sp-blockchain",
"sp-core",
+ "sp-database",
"sp-externalities",
"sp-keystore",
"sp-runtime",
"sp-state-machine",
+ "sp-std",
+ "sp-storage",
+ "sp-trie",
]
[[package]]
name = "frame-election-provider-support"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -2654,7 +2878,7 @@
[[package]]
name = "frame-executive"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -2669,9 +2893,9 @@
[[package]]
name = "frame-metadata"
-version = "14.2.0"
+version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37ed5e5c346de62ca5c184b4325a6600d1eaca210666e4606fe4e449574978d0"
+checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d"
dependencies = [
"cfg-if 1.0.0",
"parity-scale-codec",
@@ -2682,7 +2906,7 @@
[[package]]
name = "frame-support"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"bitflags",
"frame-metadata",
@@ -2711,7 +2935,7 @@
[[package]]
name = "frame-support-procedural"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"Inflector",
"frame-support-procedural-tools",
@@ -2723,7 +2947,7 @@
[[package]]
name = "frame-support-procedural-tools"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate 1.1.3",
@@ -2735,7 +2959,7 @@
[[package]]
name = "frame-support-procedural-tools-derive"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"proc-macro2",
"quote",
@@ -2745,7 +2969,7 @@
[[package]]
name = "frame-system"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"log",
@@ -2762,7 +2986,7 @@
[[package]]
name = "frame-system-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -2777,7 +3001,7 @@
[[package]]
name = "frame-system-rpc-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -2786,7 +3010,7 @@
[[package]]
name = "frame-try-runtime"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"sp-api",
@@ -2823,6 +3047,12 @@
]
[[package]]
+name = "fs_extra"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394"
+
+[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2845,6 +3075,12 @@
checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7"
[[package]]
+name = "funty"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
+
+[[package]]
name = "futures"
version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3007,9 +3243,9 @@
[[package]]
name = "getrandom"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77"
+checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad"
dependencies = [
"cfg-if 1.0.0",
"libc",
@@ -3069,10 +3305,21 @@
]
[[package]]
+name = "group"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89"
+dependencies = [
+ "ff",
+ "rand_core 0.6.3",
+ "subtle 2.4.1",
+]
+
+[[package]]
name = "h2"
-version = "0.3.11"
+version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e"
+checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57"
dependencies = [
"bytes 1.1.0",
"fnv",
@@ -3083,15 +3330,15 @@
"indexmap",
"slab",
"tokio 1.17.0",
- "tokio-util",
+ "tokio-util 0.7.1",
"tracing",
]
[[package]]
name = "handlebars"
-version = "4.2.1"
+version = "4.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25546a65e5cf1f471f3438796fc634650b31d7fcde01d444c309aeb28b92e3a8"
+checksum = "99d6a30320f094710245150395bc763ad23128d6a1ebbad7594dc4164b62c56b"
dependencies = [
"log",
"pest",
@@ -3281,9 +3528,9 @@
[[package]]
name = "hyper"
-version = "0.14.17"
+version = "0.14.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "043f0e083e9901b6cc658a77d1eb86f4fc650bbb977a4337dd63192826aa85dd"
+checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2"
dependencies = [
"bytes 1.1.0",
"futures-channel",
@@ -3321,6 +3568,22 @@
]
[[package]]
+name = "hyper-rustls"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac"
+dependencies = [
+ "http",
+ "hyper",
+ "log",
+ "rustls 0.20.4",
+ "rustls-native-certs 0.6.1",
+ "tokio 1.17.0",
+ "tokio-rustls 0.23.3",
+ "webpki-roots 0.22.2",
+]
+
+[[package]]
name = "ident_case"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3387,9 +3650,9 @@
[[package]]
name = "impl-codec"
-version = "0.5.1"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443"
+checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f"
dependencies = [
"parity-scale-codec",
]
@@ -3425,9 +3688,9 @@
[[package]]
name = "indexmap"
-version = "1.8.0"
+version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
+checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee"
dependencies = [
"autocfg",
"hashbrown 0.11.2",
@@ -3496,9 +3759,9 @@
[[package]]
name = "ipnet"
-version = "2.3.1"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9"
+checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c"
[[package]]
name = "itertools"
@@ -3652,7 +3915,7 @@
"log",
"tokio 1.17.0",
"tokio-stream",
- "tokio-util",
+ "tokio-util 0.6.9",
"unicase",
]
@@ -3688,13 +3951,25 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05fd8cd6c6b1bbd06881d2cf88f1fc83cc36c98f2219090f839115fb4a956cb9"
dependencies = [
- "jsonrpsee-core",
+ "jsonrpsee-core 0.8.0",
"jsonrpsee-proc-macros",
"jsonrpsee-types 0.8.0",
"jsonrpsee-ws-client 0.8.0",
]
[[package]]
+name = "jsonrpsee"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0d0b8cc1959f8c05256ace093b2317482da9127f1d9227564f47e7e6bf9bda8"
+dependencies = [
+ "jsonrpsee-core 0.9.0",
+ "jsonrpsee-http-client",
+ "jsonrpsee-types 0.9.0",
+ "jsonrpsee-ws-client 0.9.0",
+]
+
+[[package]]
name = "jsonrpsee-client-transport"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3702,20 +3977,41 @@
dependencies = [
"futures 0.3.21",
"http",
- "jsonrpsee-core",
+ "jsonrpsee-core 0.8.0",
"jsonrpsee-types 0.8.0",
"pin-project 1.0.10",
"rustls-native-certs 0.6.1",
"soketto",
"thiserror",
"tokio 1.17.0",
- "tokio-rustls 0.23.2",
- "tokio-util",
+ "tokio-rustls 0.23.3",
+ "tokio-util 0.6.9",
"tracing",
"webpki-roots 0.22.2",
]
[[package]]
+name = "jsonrpsee-client-transport"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa370c2c717d798c3c0a315ae3f0a707a388c6963c11f9da7dbbe1d3f7392f5f"
+dependencies = [
+ "futures 0.3.21",
+ "http",
+ "jsonrpsee-core 0.9.0",
+ "jsonrpsee-types 0.9.0",
+ "pin-project 1.0.10",
+ "rustls-native-certs 0.6.1",
+ "soketto",
+ "thiserror",
+ "tokio 1.17.0",
+ "tokio-rustls 0.23.3",
+ "tokio-util 0.6.9",
+ "tracing",
+ "webpki-roots 0.22.2",
+]
+
+[[package]]
name = "jsonrpsee-core"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3739,6 +4035,48 @@
]
[[package]]
+name = "jsonrpsee-core"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22abc3274b265dcefe2e26c4beecf9fda4fffa48cf94930443a6c73678f020d5"
+dependencies = [
+ "anyhow",
+ "arrayvec 0.7.2",
+ "async-trait",
+ "beef",
+ "futures-channel",
+ "futures-util",
+ "hyper",
+ "jsonrpsee-types 0.9.0",
+ "rustc-hash",
+ "serde",
+ "serde_json",
+ "soketto",
+ "thiserror",
+ "tokio 1.17.0",
+ "tracing",
+]
+
+[[package]]
+name = "jsonrpsee-http-client"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d31b837273d09dd80051eefa57d337769dff6c3266108c43a3544ac7ffed9d68"
+dependencies = [
+ "async-trait",
+ "hyper",
+ "hyper-rustls 0.23.0",
+ "jsonrpsee-core 0.9.0",
+ "jsonrpsee-types 0.9.0",
+ "rustc-hash",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tokio 1.17.0",
+ "tracing",
+]
+
+[[package]]
name = "jsonrpsee-proc-macros"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3784,6 +4122,20 @@
]
[[package]]
+name = "jsonrpsee-types"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f4c45d2e2aa1db4c7d7d7dbaabc10a5b5258d99cd9d42fbfd5260b76f80c324"
+dependencies = [
+ "anyhow",
+ "beef",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "tracing",
+]
+
+[[package]]
name = "jsonrpsee-utils"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3815,7 +4167,7 @@
"thiserror",
"tokio 1.17.0",
"tokio-rustls 0.22.0",
- "tokio-util",
+ "tokio-util 0.6.9",
]
[[package]]
@@ -3824,12 +4176,35 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aff425cee7c779e33920913bc695447416078ee6d119f443f3060feffa4e86b5"
dependencies = [
- "jsonrpsee-client-transport",
- "jsonrpsee-core",
+ "jsonrpsee-client-transport 0.8.0",
+ "jsonrpsee-core 0.8.0",
"jsonrpsee-types 0.8.0",
]
[[package]]
+name = "jsonrpsee-ws-client"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "31b58983485b2b626c276f1eb367d62dae82132451b281072a7bfa536a33ddf3"
+dependencies = [
+ "jsonrpsee-client-transport 0.9.0",
+ "jsonrpsee-core 0.9.0",
+ "jsonrpsee-types 0.9.0",
+]
+
+[[package]]
+name = "k256"
+version = "0.10.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19c3a5e0a0b8450278feda242592512e09f61c72e018b8cd5c859482802daf2d"
+dependencies = [
+ "cfg-if 1.0.0",
+ "ecdsa",
+ "elliptic-curve",
+ "sec1",
+]
+
+[[package]]
name = "keccak"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3847,8 +4222,8 @@
[[package]]
name = "kusama-runtime"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -3935,8 +4310,8 @@
[[package]]
name = "kusama-runtime-constants"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -3956,9 +4331,9 @@
[[package]]
name = "kvdb"
-version = "0.10.0"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45a3f58dc069ec0e205a27f5b45920722a46faed802a0541538241af6228f512"
+checksum = "a301d8ecb7989d4a6e2c57a49baca77d353bdbf879909debe3f375fe25d61f86"
dependencies = [
"parity-util-mem",
"smallvec",
@@ -3966,20 +4341,20 @@
[[package]]
name = "kvdb-memorydb"
-version = "0.10.0"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3b6b85fc643f5acd0bffb2cc8a6d150209379267af0d41db72170021841f9f5"
+checksum = "ece7e668abd21387aeb6628130a6f4c802787f014fa46bc83221448322250357"
dependencies = [
"kvdb",
"parity-util-mem",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
]
[[package]]
name = "kvdb-rocksdb"
-version = "0.14.0"
+version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b1b6ea8f2536f504b645ad78419c8246550e19d2c3419a167080ce08edee35a"
+checksum = "ca7fbdfd71cd663dceb0faf3367a99f8cf724514933e9867cec4995b6027cbc1"
dependencies = [
"fs-swap",
"kvdb",
@@ -3987,7 +4362,7 @@
"num_cpus",
"owning_ref",
"parity-util-mem",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"regex",
"rocksdb",
"smallvec",
@@ -4007,9 +4382,9 @@
[[package]]
name = "libc"
-version = "0.2.119"
+version = "0.2.121"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
+checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f"
[[package]]
name = "libloading"
@@ -4512,14 +4887,17 @@
[[package]]
name = "librocksdb-sys"
-version = "6.20.3"
+version = "0.6.1+6.28.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d"
+checksum = "81bc587013734dadb7cf23468e531aa120788b87243648be42e2d3a072186291"
dependencies = [
"bindgen",
+ "bzip2-sys",
"cc",
"glob",
"libc",
+ "libz-sys",
+ "tikv-jemalloc-sys",
]
[[package]]
@@ -4588,9 +4966,9 @@
[[package]]
name = "libz-sys"
-version = "1.1.3"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66"
+checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859"
dependencies = [
"cc",
"pkg-config",
@@ -4630,27 +5008,19 @@
[[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"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
+checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53"
dependencies = [
+ "autocfg",
"scopeguard",
]
[[package]]
name = "log"
-version = "0.4.14"
+version = "0.4.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
+checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
dependencies = [
"cfg-if 1.0.0",
"value-bag",
@@ -4685,9 +5055,9 @@
[[package]]
name = "lz4"
-version = "1.23.2"
+version = "1.23.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c"
+checksum = "4edcb94251b1c375c459e5abe9fb0168c1c826c3370172684844f8f3f8d1a885"
dependencies = [
"libc",
"lz4-sys",
@@ -4695,9 +5065,9 @@
[[package]]
name = "lz4-sys"
-version = "1.9.2"
+version = "1.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dca79aa95d8b3226213ad454d328369853be3a1382d89532a854f4d69640acae"
+checksum = "d7be8908e2ed6f31c02db8a9fa962f03e36c53fbfde437363eae3306b85d7e17"
dependencies = [
"cc",
"libc",
@@ -4783,12 +5153,12 @@
[[package]]
name = "memory-db"
-version = "0.28.0"
+version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d505169b746dacf02f7d14d8c80b34edfd8212159c63d23c977739a0d960c626"
+checksum = "6566c70c1016f525ced45d7b7f97730a2bafb037c788211d0c186ef5b2189f0a"
dependencies = [
"hash-db",
- "hashbrown 0.11.2",
+ "hashbrown 0.12.0",
"parity-util-mem",
]
@@ -4821,8 +5191,8 @@
[[package]]
name = "metered-channel"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"derive_more",
"futures 0.3.21",
@@ -4833,9 +5203,9 @@
[[package]]
name = "mick-jaeger"
-version = "0.1.7"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd2c2cc134e57461f0898b0e921f0a7819b5e3f3a4335b9aa390ce81a5f36fb9"
+checksum = "69672161530e8aeca1d1400fbf3f1a1747ff60ea604265a4e906c2442df20532"
dependencies = [
"futures 0.3.21",
"rand 0.8.5",
@@ -4879,14 +5249,15 @@
[[package]]
name = "mio"
-version = "0.8.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba272f85fa0b41fc91872be579b3bbe0f56b792aa361a380eb669469f68dafb2"
+checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9"
dependencies = [
"libc",
"log",
"miow 0.3.7",
"ntapi",
+ "wasi 0.11.0+wasi-snapshot-preview1",
"winapi 0.3.9",
]
@@ -4966,7 +5337,7 @@
dependencies = [
"blake2b_simd",
"blake2s_simd",
- "blake3",
+ "blake3 0.3.8",
"digest 0.9.0",
"generic-array 0.14.5",
"multihash-derive",
@@ -5085,13 +5456,12 @@
[[package]]
name = "nom"
-version = "7.1.0"
+version = "7.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109"
+checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36"
dependencies = [
"memchr",
"minimal-lexical",
- "version_check",
]
[[package]]
@@ -5124,6 +5494,16 @@
]
[[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"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5195,7 +5575,7 @@
[[package]]
name = "opal-runtime"
-version = "0.1.0"
+version = "0.9.18"
dependencies = [
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
@@ -5206,6 +5586,7 @@
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"derivative",
+ "fp-evm-mapping",
"fp-rpc",
"fp-self-contained",
"frame-benchmarking",
@@ -5262,7 +5643,6 @@
"substrate-wasm-builder",
"unique-runtime-common",
"up-data-structs",
- "up-evm-mapping",
"up-rpc",
"xcm",
"xcm-builder",
@@ -5322,7 +5702,7 @@
[[package]]
name = "orml-vesting"
version = "0.4.1-dev"
-source = "git+https://github.com/UniqueNetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.17#8cea7142d6ac4471e226e92c20005794e8e78063"
+source = "git+https://github.com/UniqueNetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.18#4690ac0d5e85a35351608d27c4304dfc6df4eb03"
dependencies = [
"frame-support",
"frame-system",
@@ -5355,7 +5735,7 @@
[[package]]
name = "pallet-aura"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -5371,7 +5751,7 @@
[[package]]
name = "pallet-authority-discovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -5387,7 +5767,7 @@
[[package]]
name = "pallet-authorship"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -5402,7 +5782,7 @@
[[package]]
name = "pallet-babe"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5426,7 +5806,7 @@
[[package]]
name = "pallet-bags-list"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -5446,7 +5826,7 @@
[[package]]
name = "pallet-balances"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5461,7 +5841,7 @@
[[package]]
name = "pallet-base-fee"
version = "1.0.0"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"frame-support",
"frame-system",
@@ -5476,7 +5856,7 @@
[[package]]
name = "pallet-beefy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"beefy-primitives",
"frame-support",
@@ -5492,14 +5872,14 @@
[[package]]
name = "pallet-beefy-mmr"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"beefy-merkle-tree",
"beefy-primitives",
"frame-support",
"frame-system",
"hex",
- "libsecp256k1 0.7.0",
+ "k256",
"log",
"pallet-beefy",
"pallet-mmr",
@@ -5517,7 +5897,7 @@
[[package]]
name = "pallet-bounties"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5535,7 +5915,7 @@
[[package]]
name = "pallet-bridge-dispatch"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bp-message-dispatch",
"bp-runtime",
@@ -5552,7 +5932,7 @@
[[package]]
name = "pallet-bridge-grandpa"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bp-header-chain",
"bp-runtime",
@@ -5574,7 +5954,7 @@
[[package]]
name = "pallet-bridge-messages"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bitvec",
"bp-message-dispatch",
@@ -5595,7 +5975,7 @@
[[package]]
name = "pallet-collective"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5614,6 +5994,7 @@
version = "0.1.0"
dependencies = [
"evm-coder",
+ "fp-evm-mapping",
"frame-support",
"frame-system",
"pallet-evm",
@@ -5625,13 +6006,12 @@
"sp-runtime",
"sp-std",
"up-data-structs",
- "up-evm-mapping",
]
[[package]]
name = "pallet-democracy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5647,7 +6027,7 @@
[[package]]
name = "pallet-election-provider-multi-phase"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -5664,13 +6044,13 @@
"sp-runtime",
"sp-std",
"static_assertions",
- "strum",
+ "strum 0.23.0",
]
[[package]]
name = "pallet-elections-phragmen"
version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5688,13 +6068,14 @@
[[package]]
name = "pallet-ethereum"
version = "4.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"ethereum",
"ethereum-types",
"evm",
"fp-consensus",
"fp-evm",
+ "fp-evm-mapping",
"fp-rpc",
"fp-self-contained",
"fp-storage",
@@ -5718,12 +6099,13 @@
[[package]]
name = "pallet-evm"
version = "6.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.17#f08656c065b5d7ba35393cd5d57a19b1997e382c"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.18-2#82310d1dd3189f34bd901a9ac894ad33eca5cf89"
dependencies = [
"evm",
"evm-gasometer",
"evm-runtime",
"fp-evm",
+ "fp-evm-mapping",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -5733,7 +6115,7 @@
"pallet-balances",
"pallet-timestamp",
"parity-scale-codec",
- "primitive-types 0.9.1",
+ "primitive-types",
"rlp",
"scale-info",
"serde",
@@ -5766,6 +6148,7 @@
version = "0.1.0"
dependencies = [
"evm-coder",
+ "fp-evm-mapping",
"frame-support",
"frame-system",
"log",
@@ -5801,6 +6184,7 @@
version = "0.1.0"
dependencies = [
"fp-evm",
+ "fp-evm-mapping",
"frame-support",
"frame-system",
"pallet-ethereum",
@@ -5811,7 +6195,6 @@
"sp-io",
"sp-runtime",
"sp-std",
- "up-evm-mapping",
"up-sponsorship",
]
@@ -5825,6 +6208,7 @@
"frame-support",
"frame-system",
"pallet-common",
+ "pallet-evm",
"pallet-evm-coder-substrate",
"parity-scale-codec",
"scale-info",
@@ -5837,7 +6221,7 @@
[[package]]
name = "pallet-gilt"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5852,7 +6236,7 @@
[[package]]
name = "pallet-grandpa"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5875,7 +6259,7 @@
[[package]]
name = "pallet-identity"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -5891,7 +6275,7 @@
[[package]]
name = "pallet-im-online"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5911,7 +6295,7 @@
[[package]]
name = "pallet-indices"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5947,7 +6331,7 @@
[[package]]
name = "pallet-membership"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -5964,7 +6348,7 @@
[[package]]
name = "pallet-mmr"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"ckb-merkle-mountain-range",
"frame-benchmarking",
@@ -5982,7 +6366,7 @@
[[package]]
name = "pallet-mmr-primitives"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -5998,7 +6382,7 @@
[[package]]
name = "pallet-mmr-rpc"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -6015,7 +6399,7 @@
[[package]]
name = "pallet-multisig"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6030,7 +6414,7 @@
[[package]]
name = "pallet-nicks"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -6051,6 +6435,7 @@
"frame-support",
"frame-system",
"pallet-common",
+ "pallet-evm",
"pallet-evm-coder-substrate",
"parity-scale-codec",
"scale-info",
@@ -6063,7 +6448,7 @@
[[package]]
name = "pallet-offences"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -6080,7 +6465,7 @@
[[package]]
name = "pallet-offences-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6103,7 +6488,7 @@
[[package]]
name = "pallet-preimage"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6119,7 +6504,7 @@
[[package]]
name = "pallet-proxy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6134,7 +6519,7 @@
[[package]]
name = "pallet-randomness-collective-flip"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -6148,7 +6533,7 @@
[[package]]
name = "pallet-recovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -6167,6 +6552,7 @@
"frame-support",
"frame-system",
"pallet-common",
+ "pallet-evm",
"parity-scale-codec",
"scale-info",
"sp-core",
@@ -6178,7 +6564,7 @@
[[package]]
name = "pallet-scheduler"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6194,7 +6580,7 @@
[[package]]
name = "pallet-session"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -6215,7 +6601,7 @@
[[package]]
name = "pallet-session-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6231,7 +6617,7 @@
[[package]]
name = "pallet-society"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -6245,7 +6631,7 @@
[[package]]
name = "pallet-staking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6268,7 +6654,7 @@
[[package]]
name = "pallet-staking-reward-curve"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
@@ -6279,7 +6665,7 @@
[[package]]
name = "pallet-staking-reward-fn"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"log",
"sp-arithmetic",
@@ -6288,7 +6674,7 @@
[[package]]
name = "pallet-sudo"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -6302,7 +6688,7 @@
[[package]]
name = "pallet-template-transaction-payment"
version = "3.0.0"
-source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.17#28f311f8de67155865d362f6ded1d0d5229f3202"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.18#7bc842b35a53f762ee6ee89e5f5bef84a284c9f4"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6322,7 +6708,7 @@
[[package]]
name = "pallet-timestamp"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6340,7 +6726,7 @@
[[package]]
name = "pallet-tips"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6359,7 +6745,7 @@
[[package]]
name = "pallet-transaction-payment"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-support",
"frame-system",
@@ -6376,7 +6762,7 @@
[[package]]
name = "pallet-transaction-payment-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -6393,7 +6779,7 @@
[[package]]
name = "pallet-transaction-payment-rpc-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"pallet-transaction-payment",
"parity-scale-codec",
@@ -6404,7 +6790,7 @@
[[package]]
name = "pallet-treasury"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6425,6 +6811,7 @@
"ethereum",
"evm-coder",
"fp-evm",
+ "fp-evm-mapping",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -6441,7 +6828,7 @@
"pallet-timestamp",
"pallet-transaction-payment",
"parity-scale-codec",
- "primitive-types 0.10.1",
+ "primitive-types",
"rlp",
"scale-info",
"serde",
@@ -6451,7 +6838,6 @@
"sp-runtime",
"sp-std",
"up-data-structs",
- "up-evm-mapping",
"up-sponsorship",
]
@@ -6477,7 +6863,7 @@
[[package]]
name = "pallet-utility"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6493,7 +6879,7 @@
[[package]]
name = "pallet-vesting"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6507,8 +6893,8 @@
[[package]]
name = "pallet-xcm"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-support",
"frame-system",
@@ -6525,8 +6911,8 @@
[[package]]
name = "pallet-xcm-benchmarks"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6543,7 +6929,7 @@
[[package]]
name = "parachain-info"
version = "0.1.0"
-source = "git+https://github.com/uniqueNetwork/cumulus.git?branch=polkadot-v0.9.17#0f5779b5e9f1e8bd851aaa94dad15870078d9528"
+source = "git+https://github.com/paritytech/cumulus.git?branch=polkadot-v0.9.18#b1e91afb7421309b203d7627b736d9bcf58260eb"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -6555,9 +6941,9 @@
[[package]]
name = "parity-db"
-version = "0.3.8"
+version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "865edee5b792f537356d9e55cbc138e7f4718dc881a7ea45a18b37bf61c21e3d"
+checksum = "3d121a9af17a43efd0a38c6afa508b927ba07785bd4709efb2ac03bf77efef8d"
dependencies = [
"blake2-rfc",
"crc32fast",
@@ -6574,9 +6960,9 @@
[[package]]
name = "parity-scale-codec"
-version = "2.3.1"
+version = "3.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909"
+checksum = "e8b44461635bbb1a0300f100a841e571e7d919c81c73075ef5d152ffdb521066"
dependencies = [
"arrayvec 0.7.2",
"bitvec",
@@ -6588,9 +6974,9 @@
[[package]]
name = "parity-scale-codec-derive"
-version = "2.3.1"
+version = "3.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27"
+checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
@@ -6620,18 +7006,18 @@
[[package]]
name = "parity-util-mem"
-version = "0.10.2"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f4cb4e169446179cbc6b8b6320cc9fca49bd2e94e8db25f25f200a8ea774770"
+checksum = "c32561d248d352148124f036cac253a644685a21dc9fea383eb4907d7bd35a8f"
dependencies = [
"cfg-if 1.0.0",
"ethereum-types",
- "hashbrown 0.11.2",
+ "hashbrown 0.12.0",
"impl-trait-for-tuples",
- "lru 0.6.6",
+ "lru 0.7.3",
"parity-util-mem-derive",
- "parking_lot 0.11.2",
- "primitive-types 0.10.1",
+ "parking_lot 0.12.0",
+ "primitive-types",
"smallvec",
"winapi 0.3.9",
]
@@ -6685,16 +7071,6 @@
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"
@@ -6703,7 +7079,7 @@
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
dependencies = [
"instant",
- "lock_api 0.4.6",
+ "lock_api",
"parking_lot_core 0.8.5",
]
@@ -6713,22 +7089,8 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58"
dependencies = [
- "lock_api 0.4.6",
- "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 0.3.9",
+ "lock_api",
+ "parking_lot_core 0.9.2",
]
[[package]]
@@ -6740,29 +7102,29 @@
"cfg-if 1.0.0",
"instant",
"libc",
- "redox_syscall 0.2.11",
+ "redox_syscall",
"smallvec",
"winapi 0.3.9",
]
[[package]]
name = "parking_lot_core"
-version = "0.9.1"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954"
+checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37"
dependencies = [
"cfg-if 1.0.0",
"libc",
- "redox_syscall 0.2.11",
+ "redox_syscall",
"smallvec",
"windows-sys",
]
[[package]]
name = "paste"
-version = "1.0.6"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5"
+checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc"
[[package]]
name = "pbkdf2"
@@ -6912,10 +7274,21 @@
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
+name = "pkcs8"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0"
+dependencies = [
+ "der",
+ "spki",
+ "zeroize",
+]
+
+[[package]]
name = "pkg-config"
-version = "0.3.24"
+version = "0.3.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
+checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
[[package]]
name = "platforms"
@@ -6925,8 +7298,8 @@
[[package]]
name = "polkadot-approval-distribution"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"polkadot-node-network-protocol",
@@ -6939,8 +7312,8 @@
[[package]]
name = "polkadot-availability-bitfield-distribution"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"polkadot-node-network-protocol",
@@ -6952,10 +7325,11 @@
[[package]]
name = "polkadot-availability-distribution"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"derive_more",
+ "fatality",
"futures 0.3.21",
"lru 0.7.3",
"parity-scale-codec",
@@ -6974,9 +7348,10 @@
[[package]]
name = "polkadot-availability-recovery"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
+ "fatality",
"futures 0.3.21",
"lru 0.7.3",
"parity-scale-codec",
@@ -6994,8 +7369,8 @@
[[package]]
name = "polkadot-cli"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"clap",
"frame-benchmarking-cli",
@@ -7017,8 +7392,8 @@
[[package]]
name = "polkadot-client"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"beefy-primitives",
"frame-benchmarking",
@@ -7047,11 +7422,11 @@
[[package]]
name = "polkadot-collator-protocol"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"always-assert",
- "derive_more",
+ "fatality",
"futures 0.3.21",
"futures-timer",
"polkadot-node-network-protocol",
@@ -7068,8 +7443,8 @@
[[package]]
name = "polkadot-core-primitives"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"parity-scale-codec",
"parity-util-mem",
@@ -7081,10 +7456,11 @@
[[package]]
name = "polkadot-dispute-distribution"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"derive_more",
+ "fatality",
"futures 0.3.21",
"lru 0.7.3",
"parity-scale-codec",
@@ -7103,8 +7479,8 @@
[[package]]
name = "polkadot-erasure-coding"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"parity-scale-codec",
"polkadot-node-primitives",
@@ -7117,8 +7493,8 @@
[[package]]
name = "polkadot-gossip-support"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"futures-timer",
@@ -7137,13 +7513,13 @@
[[package]]
name = "polkadot-network-bridge"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"async-trait",
"futures 0.3.21",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -7156,8 +7532,8 @@
[[package]]
name = "polkadot-node-collation-generation"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"parity-scale-codec",
@@ -7174,8 +7550,8 @@
[[package]]
name = "polkadot-node-core-approval-voting"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bitvec",
"derive_more",
@@ -7202,8 +7578,8 @@
[[package]]
name = "polkadot-node-core-av-store"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bitvec",
"futures 0.3.21",
@@ -7222,8 +7598,8 @@
[[package]]
name = "polkadot-node-core-backing"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bitvec",
"futures 0.3.21",
@@ -7240,8 +7616,8 @@
[[package]]
name = "polkadot-node-core-bitfield-signing"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"polkadot-node-subsystem",
@@ -7255,8 +7631,8 @@
[[package]]
name = "polkadot-node-core-candidate-validation"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"async-trait",
"futures 0.3.21",
@@ -7273,8 +7649,8 @@
[[package]]
name = "polkadot-node-core-chain-api"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"polkadot-node-subsystem",
@@ -7288,8 +7664,8 @@
[[package]]
name = "polkadot-node-core-chain-selection"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"futures-timer",
@@ -7305,9 +7681,10 @@
[[package]]
name = "polkadot-node-core-dispute-coordinator"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
+ "fatality",
"futures 0.3.21",
"kvdb",
"lru 0.7.3",
@@ -7323,8 +7700,8 @@
[[package]]
name = "polkadot-node-core-parachains-inherent"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"async-trait",
"futures 0.3.21",
@@ -7340,8 +7717,8 @@
[[package]]
name = "polkadot-node-core-provisioner"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bitvec",
"futures 0.3.21",
@@ -7357,8 +7734,8 @@
[[package]]
name = "polkadot-node-core-pvf"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"always-assert",
"assert_matches",
@@ -7387,8 +7764,8 @@
[[package]]
name = "polkadot-node-core-pvf-checker"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"polkadot-node-primitives",
@@ -7403,8 +7780,8 @@
[[package]]
name = "polkadot-node-core-runtime-api"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"memory-lru",
@@ -7421,15 +7798,15 @@
[[package]]
name = "polkadot-node-jaeger"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"async-std",
"lazy_static",
"log",
"mick-jaeger",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"polkadot-node-primitives",
"polkadot-primitives",
"sc-network",
@@ -7439,8 +7816,8 @@
[[package]]
name = "polkadot-node-metrics"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bs58",
"futures 0.3.21",
@@ -7458,11 +7835,11 @@
[[package]]
name = "polkadot-node-network-protocol"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"async-trait",
- "derive_more",
+ "fatality",
"futures 0.3.21",
"parity-scale-codec",
"polkadot-node-jaeger",
@@ -7470,14 +7847,14 @@
"polkadot-primitives",
"sc-authority-discovery",
"sc-network",
- "strum",
+ "strum 0.24.0",
"thiserror",
]
[[package]]
name = "polkadot-node-primitives"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bounded-vec",
"futures 0.3.21",
@@ -7498,8 +7875,8 @@
[[package]]
name = "polkadot-node-subsystem"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"polkadot-node-jaeger",
"polkadot-node-subsystem-types",
@@ -7508,8 +7885,8 @@
[[package]]
name = "polkadot-node-subsystem-types"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"derive_more",
"futures 0.3.21",
@@ -7527,16 +7904,21 @@
[[package]]
name = "polkadot-node-subsystem-util"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"async-trait",
"derive_more",
+ "fatality",
"futures 0.3.21",
"itertools",
+ "kvdb",
"lru 0.7.3",
"metered-channel",
+ "parity-db",
"parity-scale-codec",
+ "parity-util-mem",
+ "parking_lot 0.11.2",
"pin-project 1.0.10",
"polkadot-node-jaeger",
"polkadot-node-metrics",
@@ -7555,14 +7937,14 @@
[[package]]
name = "polkadot-overseer"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"futures 0.3.21",
"futures-timer",
"lru 0.7.3",
"parity-util-mem",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"polkadot-node-metrics",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -7576,8 +7958,8 @@
[[package]]
name = "polkadot-overseer-gen"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"async-trait",
"futures 0.3.21",
@@ -7593,9 +7975,10 @@
[[package]]
name = "polkadot-overseer-gen-proc-macro"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
+ "expander 0.0.5",
"proc-macro-crate 1.1.3",
"proc-macro2",
"quote",
@@ -7604,8 +7987,8 @@
[[package]]
name = "polkadot-parachain"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"derive_more",
"frame-support",
@@ -7621,8 +8004,8 @@
[[package]]
name = "polkadot-performance-test"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"env_logger",
"kusama-runtime",
@@ -7636,8 +8019,8 @@
[[package]]
name = "polkadot-primitives"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bitvec",
"frame-system",
@@ -7666,8 +8049,8 @@
[[package]]
name = "polkadot-rpc"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"beefy-gadget",
"beefy-gadget-rpc",
@@ -7697,8 +8080,8 @@
[[package]]
name = "polkadot-runtime"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -7781,8 +8164,8 @@
[[package]]
name = "polkadot-runtime-common"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -7828,8 +8211,8 @@
[[package]]
name = "polkadot-runtime-constants"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -7840,8 +8223,8 @@
[[package]]
name = "polkadot-runtime-metrics"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bs58",
"parity-scale-codec",
@@ -7852,8 +8235,8 @@
[[package]]
name = "polkadot-runtime-parachains"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"bitflags",
"bitvec",
@@ -7894,8 +8277,8 @@
[[package]]
name = "polkadot-service"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"async-trait",
"beefy-gadget",
@@ -7912,6 +8295,7 @@
"pallet-mmr-primitives",
"pallet-staking",
"pallet-transaction-payment-rpc-runtime-api",
+ "parity-db",
"polkadot-approval-distribution",
"polkadot-availability-bitfield-distribution",
"polkadot-availability-distribution",
@@ -7994,11 +8378,11 @@
[[package]]
name = "polkadot-statement-distribution"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"arrayvec 0.5.2",
- "derive_more",
+ "fatality",
"futures 0.3.21",
"indexmap",
"parity-scale-codec",
@@ -8015,8 +8399,8 @@
[[package]]
name = "polkadot-statement-table"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"parity-scale-codec",
"polkadot-primitives",
@@ -8025,8 +8409,8 @@
[[package]]
name = "polkadot-test-runtime"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -8087,8 +8471,8 @@
[[package]]
name = "polkadot-test-service"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-benchmarking",
"frame-system",
@@ -8158,7 +8542,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "048aeb476be11a4b6ca432ca569e375810de9294ae78f4774e78ea98a9246ede"
dependencies = [
- "cpufeatures 0.2.1",
+ "cpufeatures 0.2.2",
"opaque-debug 0.3.0",
"universal-hash",
]
@@ -8170,7 +8554,7 @@
checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1"
dependencies = [
"cfg-if 1.0.0",
- "cpufeatures 0.2.1",
+ "cpufeatures 0.2.2",
"opaque-debug 0.3.0",
"universal-hash",
]
@@ -8180,24 +8564,12 @@
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
-
-[[package]]
-name = "primitive-types"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06345ee39fbccfb06ab45f3a1a5798d9dafa04cb8921a76d227040003a234b0e"
-dependencies = [
- "fixed-hash",
- "impl-codec",
- "impl-rlp",
- "uint",
-]
[[package]]
name = "primitive-types"
-version = "0.10.1"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373"
+checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a"
dependencies = [
"fixed-hash",
"impl-codec",
@@ -8337,7 +8709,7 @@
[[package]]
name = "quartz-runtime"
-version = "0.1.0"
+version = "0.9.18"
dependencies = [
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
@@ -8348,15 +8720,13 @@
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"derivative",
+ "fp-evm-mapping",
"fp-rpc",
"fp-self-contained",
- "frame-benchmarking",
"frame-executive",
"frame-support",
"frame-system",
- "frame-system-benchmarking",
"frame-system-rpc-runtime-api",
- "hex-literal",
"orml-vesting",
"pallet-aura",
"pallet-balances",
@@ -8404,7 +8774,6 @@
"substrate-wasm-builder",
"unique-runtime-common",
"up-data-structs",
- "up-evm-mapping",
"up-rpc",
"xcm",
"xcm-builder",
@@ -8436,18 +8805,18 @@
[[package]]
name = "quote"
-version = "1.0.15"
+version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
+checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58"
dependencies = [
"proc-macro2",
]
[[package]]
name = "radium"
-version = "0.6.2"
+version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb"
+checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"
[[package]]
name = "rand"
@@ -8509,7 +8878,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [
- "getrandom 0.2.5",
+ "getrandom 0.2.6",
]
[[package]]
@@ -8573,27 +8942,22 @@
[[package]]
name = "redox_syscall"
-version = "0.1.57"
+version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
-
-[[package]]
-name = "redox_syscall"
-version = "0.2.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c"
+checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42"
dependencies = [
"bitflags",
]
[[package]]
name = "redox_users"
-version = "0.4.0"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
+checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [
- "getrandom 0.2.5",
- "redox_syscall 0.2.11",
+ "getrandom 0.2.6",
+ "redox_syscall",
+ "thiserror",
]
[[package]]
@@ -8642,9 +9006,9 @@
[[package]]
name = "regex"
-version = "1.5.4"
+version = "1.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
+checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
dependencies = [
"aho-corasick",
"memchr",
@@ -8681,7 +9045,7 @@
[[package]]
name = "remote-externalities"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"env_logger",
"jsonrpsee 0.8.0",
@@ -8758,9 +9122,9 @@
[[package]]
name = "rocksdb"
-version = "0.17.0"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a62eca5cacf2c8261128631bed9f045598d40bfbe4b29f5163f0f802f8f44a7"
+checksum = "620f4129485ff1a7128d184bc687470c21c7951b64779ebc9cfdad3dcd920290"
dependencies = [
"libc",
"librocksdb-sys",
@@ -8768,8 +9132,8 @@
[[package]]
name = "rococo-runtime"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"beefy-primitives",
"bp-messages",
@@ -8843,8 +9207,8 @@
[[package]]
name = "rococo-runtime-constants"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -8905,7 +9269,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [
- "semver 1.0.6",
+ "semver 1.0.7",
]
[[package]]
@@ -9033,7 +9397,7 @@
[[package]]
name = "sc-allocator"
version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"log",
"sp-core",
@@ -9044,7 +9408,7 @@
[[package]]
name = "sc-authority-discovery"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"futures 0.3.21",
@@ -9071,7 +9435,7 @@
[[package]]
name = "sc-basic-authorship"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"futures-timer",
@@ -9094,7 +9458,7 @@
[[package]]
name = "sc-block-builder"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"sc-client-api",
@@ -9110,7 +9474,7 @@
[[package]]
name = "sc-chain-spec"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"impl-trait-for-tuples",
"memmap2 0.5.3",
@@ -9127,7 +9491,7 @@
[[package]]
name = "sc-chain-spec-derive"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
@@ -9138,7 +9502,7 @@
[[package]]
name = "sc-cli"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"chrono",
"clap",
@@ -9176,14 +9540,14 @@
[[package]]
name = "sc-client-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"fnv",
"futures 0.3.21",
"hash-db",
"log",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-executor",
"sc-transaction-pool-api",
"sc-utils",
@@ -9204,7 +9568,7 @@
[[package]]
name = "sc-client-db"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"hash-db",
"kvdb",
@@ -9214,7 +9578,7 @@
"log",
"parity-db",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-client-api",
"sc-state-db",
"sp-arithmetic",
@@ -9229,14 +9593,14 @@
[[package]]
name = "sc-consensus"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"futures 0.3.21",
"futures-timer",
"libp2p",
"log",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-client-api",
"sc-utils",
"serde",
@@ -9253,7 +9617,7 @@
[[package]]
name = "sc-consensus-aura"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"futures 0.3.21",
@@ -9282,7 +9646,7 @@
[[package]]
name = "sc-consensus-babe"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"fork-tree",
@@ -9293,7 +9657,7 @@
"num-rational 0.2.4",
"num-traits",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"rand 0.7.3",
"retain_mut",
"sc-client-api",
@@ -9325,7 +9689,7 @@
[[package]]
name = "sc-consensus-babe-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"jsonrpc-core",
@@ -9349,6 +9713,55 @@
[[package]]
name = "sc-consensus-epochs"
version = "0.10.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
+dependencies = [
+ "fork-tree",
+ "parity-scale-codec",
+ "sc-client-api",
+ "sc-consensus",
+ "sp-blockchain",
+ "sp-runtime",
+]
+
+[[package]]
+name = "sc-consensus-manual-seal"
+version = "0.10.0-dev"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
+dependencies = [
+ "assert_matches",
+ "async-trait",
+ "futures 0.3.21",
+ "jsonrpc-core",
+ "jsonrpc-core-client",
+ "jsonrpc-derive",
+ "log",
+ "parity-scale-codec",
+ "sc-client-api",
+ "sc-consensus",
+ "sc-consensus-aura",
+ "sc-consensus-babe",
+ "sc-consensus-epochs",
+ "sc-transaction-pool",
+ "sc-transaction-pool-api",
+ "serde",
+ "sp-api",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-consensus-aura",
+ "sp-consensus-babe",
+ "sp-consensus-slots",
+ "sp-core",
+ "sp-inherents",
+ "sp-keystore",
+ "sp-runtime",
+ "sp-timestamp",
+ "substrate-prometheus-endpoint",
+ "thiserror",
+]
+
+[[package]]
+name = "sc-consensus-epochs"
+version = "0.10.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
dependencies = [
"fork-tree",
@@ -9398,7 +9811,7 @@
[[package]]
name = "sc-consensus-slots"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"futures 0.3.21",
@@ -9423,7 +9836,7 @@
[[package]]
name = "sc-consensus-uncles"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"sc-client-api",
"sp-authorship",
@@ -9434,14 +9847,12 @@
[[package]]
name = "sc-executor"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"lazy_static",
- "libsecp256k1 0.7.0",
- "log",
"lru 0.6.6",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-executor-common",
"sc-executor-wasmi",
"sc-executor-wasmtime",
@@ -9456,13 +9867,14 @@
"sp-trie",
"sp-version",
"sp-wasm-interface",
+ "tracing",
"wasmi",
]
[[package]]
name = "sc-executor-common"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"environmental",
"parity-scale-codec",
@@ -9479,7 +9891,7 @@
[[package]]
name = "sc-executor-wasmi"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"log",
"parity-scale-codec",
@@ -9495,7 +9907,7 @@
[[package]]
name = "sc-executor-wasmtime"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"cfg-if 1.0.0",
"libc",
@@ -9513,17 +9925,19 @@
[[package]]
name = "sc-finality-grandpa"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
+ "ahash",
"async-trait",
"dyn-clone",
"finality-grandpa",
"fork-tree",
"futures 0.3.21",
"futures-timer",
+ "hex",
"log",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"rand 0.8.5",
"sc-block-builder",
"sc-chain-spec",
@@ -9551,7 +9965,7 @@
[[package]]
name = "sc-finality-grandpa-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"finality-grandpa",
"futures 0.3.21",
@@ -9575,7 +9989,7 @@
[[package]]
name = "sc-informant"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"ansi_term",
"futures 0.3.21",
@@ -9592,11 +10006,11 @@
[[package]]
name = "sc-keystore"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"hex",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"serde_json",
"sp-application-crypto",
"sp-core",
@@ -9607,9 +10021,8 @@
[[package]]
name = "sc-network"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
- "async-std",
"async-trait",
"asynchronous-codec 0.5.0",
"bitflags",
@@ -9628,7 +10041,7 @@
"log",
"lru 0.7.3",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"pin-project 1.0.10",
"prost",
"prost-build",
@@ -9657,8 +10070,9 @@
[[package]]
name = "sc-network-gossip"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
+ "ahash",
"futures 0.3.21",
"futures-timer",
"libp2p",
@@ -9673,7 +10087,7 @@
[[package]]
name = "sc-offchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"bytes 1.1.0",
"fnv",
@@ -9681,11 +10095,11 @@
"futures-timer",
"hex",
"hyper",
- "hyper-rustls",
+ "hyper-rustls 0.22.1",
"num_cpus",
"once_cell",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"rand 0.7.3",
"sc-client-api",
"sc-network",
@@ -9701,7 +10115,7 @@
[[package]]
name = "sc-peerset"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"libp2p",
@@ -9714,7 +10128,7 @@
[[package]]
name = "sc-proposer-metrics"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"log",
"substrate-prometheus-endpoint",
@@ -9723,7 +10137,7 @@
[[package]]
name = "sc-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"hash-db",
@@ -9731,7 +10145,7 @@
"jsonrpc-pubsub",
"log",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-block-builder",
"sc-chain-spec",
"sc-client-api",
@@ -9754,7 +10168,7 @@
[[package]]
name = "sc-rpc-api"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"jsonrpc-core",
@@ -9763,7 +10177,7 @@
"jsonrpc-pubsub",
"log",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-chain-spec",
"sc-transaction-pool-api",
"serde",
@@ -9779,7 +10193,7 @@
[[package]]
name = "sc-rpc-server"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"jsonrpc-core",
@@ -9796,7 +10210,7 @@
[[package]]
name = "sc-service"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"directories",
@@ -9809,7 +10223,7 @@
"log",
"parity-scale-codec",
"parity-util-mem",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"pin-project 1.0.10",
"rand 0.7.3",
"sc-block-builder",
@@ -9860,13 +10274,13 @@
[[package]]
name = "sc-state-db"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"log",
"parity-scale-codec",
"parity-util-mem",
"parity-util-mem-derive",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sc-client-api",
"sp-core",
]
@@ -9874,7 +10288,7 @@
[[package]]
name = "sc-sync-state-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
@@ -9885,7 +10299,6 @@
"sc-consensus-babe",
"sc-consensus-epochs",
"sc-finality-grandpa",
- "sc-rpc-api",
"serde",
"serde_json",
"sp-blockchain",
@@ -9896,13 +10309,13 @@
[[package]]
name = "sc-telemetry"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"chrono",
"futures 0.3.21",
"libp2p",
"log",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"pin-project 1.0.10",
"rand 0.7.3",
"serde",
@@ -9914,7 +10327,7 @@
[[package]]
name = "sc-tracing"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"ansi_term",
"atty",
@@ -9923,7 +10336,7 @@
"libc",
"log",
"once_cell",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"regex",
"rustc-hash",
"sc-client-api",
@@ -9945,7 +10358,7 @@
[[package]]
name = "sc-tracing-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
@@ -9956,7 +10369,7 @@
[[package]]
name = "sc-transaction-pool"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"futures-timer",
@@ -9964,7 +10377,7 @@
"log",
"parity-scale-codec",
"parity-util-mem",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"retain_mut",
"sc-client-api",
"sc-transaction-pool-api",
@@ -9983,7 +10396,7 @@
[[package]]
name = "sc-transaction-pool-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"log",
@@ -9996,20 +10409,21 @@
[[package]]
name = "sc-utils"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"futures-timer",
"lazy_static",
- "parking_lot 0.11.2",
+ "log",
+ "parking_lot 0.12.0",
"prometheus",
]
[[package]]
name = "scale-info"
-version = "1.0.0"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f"
+checksum = "0563970d79bcbf3c537ce3ad36d859b30d36fc5b190efd227f1f7a84d7cf0d42"
dependencies = [
"bitvec",
"cfg-if 1.0.0",
@@ -10021,9 +10435,9 @@
[[package]]
name = "scale-info-derive"
-version = "1.0.0"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd"
+checksum = "b7805950c36512db9e3251c970bb7ac425f326716941862205d612ab3b5e46e2"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
@@ -10092,6 +10506,37 @@
]
[[package]]
+name = "sec1"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1"
+dependencies = [
+ "der",
+ "generic-array 0.14.5",
+ "pkcs8",
+ "subtle 2.4.1",
+ "zeroize",
+]
+
+[[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"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "957da2573cde917463ece3570eab4a0b3f19de6f1646cde62e6fd3868f566036"
+dependencies = [
+ "cc",
+]
+
+[[package]]
name = "secrecy"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -10152,9 +10597,9 @@
[[package]]
name = "semver"
-version = "1.0.6"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d"
+checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4"
dependencies = [
"serde",
]
@@ -10206,6 +10651,15 @@
]
[[package]]
+name = "serde_nanos"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e44969a61f5d316be20a42ff97816efb3b407a924d06824c3d8a49fa8450de0e"
+dependencies = [
+ "serde",
+]
+
+[[package]]
name = "sha-1"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -10225,7 +10679,7 @@
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
- "cpufeatures 0.2.1",
+ "cpufeatures 0.2.2",
"digest 0.9.0",
"opaque-debug 0.3.0",
]
@@ -10250,7 +10704,7 @@
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
- "cpufeatures 0.2.1",
+ "cpufeatures 0.2.2",
"digest 0.9.0",
"opaque-debug 0.3.0",
]
@@ -10262,7 +10716,7 @@
checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676"
dependencies = [
"cfg-if 1.0.0",
- "cpufeatures 0.2.1",
+ "cpufeatures 0.2.2",
"digest 0.10.3",
]
@@ -10292,6 +10746,16 @@
]
[[package]]
+name = "sha3"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "881bf8156c87b6301fc5ca6b27f11eeb2761224c7081e69b409d5a1951a70c86"
+dependencies = [
+ "digest 0.10.3",
+ "keccak",
+]
+
+[[package]]
name = "sharded-slab"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -10327,9 +10791,12 @@
[[package]]
name = "signature"
-version = "1.5.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4"
+checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788"
+dependencies = [
+ "rand_core 0.6.3",
+]
[[package]]
name = "simba"
@@ -10351,8 +10818,8 @@
[[package]]
name = "slot-range-helper"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"enumn",
"parity-scale-codec",
@@ -10389,7 +10856,7 @@
checksum = "6142f7c25e94f6fd25a32c3348ec230df9109b463f59c8c7acc4bd34936babb7"
dependencies = [
"aes-gcm",
- "blake2",
+ "blake2 0.9.2",
"chacha20poly1305",
"rand 0.8.5",
"rand_core 0.6.3",
@@ -10440,7 +10907,7 @@
[[package]]
name = "sp-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"hash-db",
"log",
@@ -10457,9 +10924,9 @@
[[package]]
name = "sp-api-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
- "blake2-rfc",
+ "blake2 0.10.4",
"proc-macro-crate 1.1.3",
"proc-macro2",
"quote",
@@ -10468,8 +10935,8 @@
[[package]]
name = "sp-application-crypto"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10481,8 +10948,8 @@
[[package]]
name = "sp-arithmetic"
-version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "5.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"integer-sqrt",
"num-traits",
@@ -10497,7 +10964,7 @@
[[package]]
name = "sp-authority-discovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10510,7 +10977,7 @@
[[package]]
name = "sp-authorship"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"parity-scale-codec",
@@ -10522,7 +10989,7 @@
[[package]]
name = "sp-block-builder"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -10534,13 +11001,13 @@
[[package]]
name = "sp-blockchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"log",
"lru 0.7.3",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"sp-api",
"sp-consensus",
"sp-database",
@@ -10552,7 +11019,7 @@
[[package]]
name = "sp-consensus"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"futures 0.3.21",
@@ -10571,7 +11038,7 @@
[[package]]
name = "sp-consensus-aura"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"parity-scale-codec",
@@ -10589,7 +11056,7 @@
[[package]]
name = "sp-consensus-babe"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"merlin",
@@ -10612,19 +11079,21 @@
[[package]]
name = "sp-consensus-slots"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"scale-info",
"serde",
"sp-arithmetic",
"sp-runtime",
+ "sp-std",
+ "sp-timestamp",
]
[[package]]
name = "sp-consensus-vrf"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"schnorrkel",
@@ -10635,8 +11104,8 @@
[[package]]
name = "sp-core"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"base58",
"bitflags",
@@ -10656,15 +11125,15 @@
"num-traits",
"parity-scale-codec",
"parity-util-mem",
- "parking_lot 0.11.2",
- "primitive-types 0.10.1",
+ "parking_lot 0.12.0",
+ "primitive-types",
"rand 0.7.3",
"regex",
"scale-info",
"schnorrkel",
+ "secp256k1",
"secrecy",
"serde",
- "sha2 0.10.2",
"sp-core-hashing",
"sp-debug-derive",
"sp-externalities",
@@ -10675,8 +11144,6 @@
"substrate-bip39",
"thiserror",
"tiny-bip39",
- "tiny-keccak",
- "twox-hash",
"wasmi",
"zeroize",
]
@@ -10684,20 +11151,21 @@
[[package]]
name = "sp-core-hashing"
version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
- "blake2-rfc",
+ "blake2 0.10.4",
"byteorder",
+ "digest 0.10.3",
"sha2 0.10.2",
+ "sha3 0.10.1",
"sp-std",
- "tiny-keccak",
"twox-hash",
]
[[package]]
name = "sp-core-hashing-proc-macro"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "5.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"proc-macro2",
"quote",
@@ -10708,16 +11176,16 @@
[[package]]
name = "sp-database"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"kvdb",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
]
[[package]]
name = "sp-debug-derive"
version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"proc-macro2",
"quote",
@@ -10726,8 +11194,8 @@
[[package]]
name = "sp-externalities"
-version = "0.11.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"environmental",
"parity-scale-codec",
@@ -10738,7 +11206,7 @@
[[package]]
name = "sp-finality-grandpa"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"finality-grandpa",
"log",
@@ -10756,7 +11224,7 @@
[[package]]
name = "sp-inherents"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"impl-trait-for-tuples",
@@ -10769,15 +11237,16 @@
[[package]]
name = "sp-io"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"hash-db",
"libsecp256k1 0.7.0",
"log",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
+ "secp256k1",
"sp-core",
"sp-externalities",
"sp-keystore",
@@ -10793,25 +11262,25 @@
[[package]]
name = "sp-keyring"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"lazy_static",
"sp-core",
"sp-runtime",
- "strum",
+ "strum 0.23.0",
]
[[package]]
name = "sp-keystore"
-version = "0.11.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"futures 0.3.21",
"merlin",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"schnorrkel",
"serde",
"sp-core",
@@ -10822,7 +11291,7 @@
[[package]]
name = "sp-maybe-compressed-blob"
version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"thiserror",
"zstd",
@@ -10831,7 +11300,7 @@
[[package]]
name = "sp-npos-elections"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10846,7 +11315,7 @@
[[package]]
name = "sp-npos-elections-solution-type"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
@@ -10857,7 +11326,7 @@
[[package]]
name = "sp-offchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"sp-api",
"sp-core",
@@ -10867,7 +11336,7 @@
[[package]]
name = "sp-panic-handler"
version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"backtrace",
"lazy_static",
@@ -10876,8 +11345,8 @@
[[package]]
name = "sp-rpc"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"rustc-hash",
"serde",
@@ -10886,8 +11355,8 @@
[[package]]
name = "sp-runtime"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"either",
"hash256-std-hasher",
@@ -10908,12 +11377,12 @@
[[package]]
name = "sp-runtime-interface"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
- "primitive-types 0.10.1",
+ "primitive-types",
"sp-externalities",
"sp-runtime-interface-proc-macro",
"sp-std",
@@ -10925,8 +11394,8 @@
[[package]]
name = "sp-runtime-interface-proc-macro"
-version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "5.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"Inflector",
"proc-macro-crate 1.1.3",
@@ -10938,7 +11407,7 @@
[[package]]
name = "sp-serializer"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"serde",
"serde_json",
@@ -10947,7 +11416,7 @@
[[package]]
name = "sp-session"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10961,7 +11430,7 @@
[[package]]
name = "sp-staking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -10971,14 +11440,14 @@
[[package]]
name = "sp-state-machine"
-version = "0.11.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "0.12.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"hash-db",
"log",
"num-traits",
"parity-scale-codec",
- "parking_lot 0.11.2",
+ "parking_lot 0.12.0",
"rand 0.7.3",
"smallvec",
"sp-core",
@@ -10995,12 +11464,12 @@
[[package]]
name = "sp-std"
version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
[[package]]
name = "sp-storage"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -11013,7 +11482,7 @@
[[package]]
name = "sp-tasks"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"log",
"sp-core",
@@ -11026,7 +11495,7 @@
[[package]]
name = "sp-timestamp"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"futures-timer",
@@ -11041,8 +11510,8 @@
[[package]]
name = "sp-tracing"
-version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "5.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"sp-std",
@@ -11054,7 +11523,7 @@
[[package]]
name = "sp-transaction-pool"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"sp-api",
"sp-runtime",
@@ -11063,7 +11532,7 @@
[[package]]
name = "sp-transaction-storage-proof"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"log",
@@ -11078,8 +11547,8 @@
[[package]]
name = "sp-trie"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"hash-db",
"memory-db",
@@ -11087,14 +11556,15 @@
"scale-info",
"sp-core",
"sp-std",
+ "thiserror",
"trie-db",
"trie-root",
]
[[package]]
name = "sp-version"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "5.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -11111,7 +11581,7 @@
[[package]]
name = "sp-version-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"parity-scale-codec",
"proc-macro2",
@@ -11121,8 +11591,8 @@
[[package]]
name = "sp-wasm-interface"
-version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+version = "6.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"impl-trait-for-tuples",
"log",
@@ -11139,12 +11609,23 @@
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
[[package]]
+name = "spki"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27"
+dependencies = [
+ "base64ct",
+ "der",
+]
+
+[[package]]
name = "ss58-registry"
-version = "1.15.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f9799e6d412271cb2414597581128b03f3285f260ea49f5363d07df6a332b3e"
+checksum = "7b84a70894df7a73666e0694f44b41a9571625e9546fb58a0818a565d2c7e084"
dependencies = [
"Inflector",
+ "num-format",
"proc-macro2",
"quote",
"serde",
@@ -11214,10 +11695,19 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cae14b91c7d11c9a851d3fbc80a963198998c2a64eec840477fa92d8ce9b70bb"
dependencies = [
- "strum_macros",
+ "strum_macros 0.23.1",
]
[[package]]
+name = "strum"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8"
+dependencies = [
+ "strum_macros 0.24.0",
+]
+
+[[package]]
name = "strum_macros"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11231,6 +11721,19 @@
]
[[package]]
+name = "strum_macros"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef"
+dependencies = [
+ "heck 0.4.0",
+ "proc-macro2",
+ "quote",
+ "rustversion",
+ "syn",
+]
+
+[[package]]
name = "substrate-bip39"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11246,7 +11749,7 @@
[[package]]
name = "substrate-build-script-utils"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"platforms",
]
@@ -11254,7 +11757,7 @@
[[package]]
name = "substrate-frame-rpc-system"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"frame-system-rpc-runtime-api",
"futures 0.3.21",
@@ -11276,9 +11779,8 @@
[[package]]
name = "substrate-prometheus-endpoint"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
- "async-std",
"futures-util",
"hyper",
"log",
@@ -11290,7 +11792,7 @@
[[package]]
name = "substrate-test-client"
version = "2.0.1"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"async-trait",
"futures 0.3.21",
@@ -11316,7 +11818,7 @@
[[package]]
name = "substrate-test-utils"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"futures 0.3.21",
"substrate-test-utils-derive",
@@ -11326,7 +11828,7 @@
[[package]]
name = "substrate-test-utils-derive"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
@@ -11337,13 +11839,13 @@
[[package]]
name = "substrate-wasm-builder"
version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"ansi_term",
"build-helper",
"cargo_metadata",
"sp-maybe-compressed-blob",
- "strum",
+ "strum 0.23.0",
"tempfile",
"toml",
"walkdir",
@@ -11364,9 +11866,9 @@
[[package]]
name = "syn"
-version = "1.0.86"
+version = "1.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
+checksum = "704df27628939572cd88d33f171cd6f896f4eaca85252c6e0a72d8d8287ee86f"
dependencies = [
"proc-macro2",
"quote",
@@ -11406,7 +11908,7 @@
"cfg-if 1.0.0",
"fastrand",
"libc",
- "redox_syscall 0.2.11",
+ "redox_syscall",
"remove_dir_all",
"winapi 0.3.9",
]
@@ -11422,8 +11924,8 @@
[[package]]
name = "test-runtime-constants"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -11490,6 +11992,17 @@
]
[[package]]
+name = "tikv-jemalloc-sys"
+version = "0.4.3+5.2.1-patched.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1792ccb507d955b46af42c123ea8863668fae24d03721e40cad6a41773dbb49"
+dependencies = [
+ "cc",
+ "fs_extra",
+ "libc",
+]
+
+[[package]]
name = "time"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11564,9 +12077,10 @@
"bytes 1.1.0",
"libc",
"memchr",
- "mio 0.8.0",
+ "mio 0.8.2",
"num_cpus",
"once_cell",
+ "parking_lot 0.12.0",
"pin-project-lite 0.2.8",
"signal-hook-registry",
"socket2 0.4.4",
@@ -11609,9 +12123,9 @@
[[package]]
name = "tokio-rustls"
-version = "0.23.2"
+version = "0.23.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b"
+checksum = "4151fda0cf2798550ad0b34bcfc9b9dcc2a9d2471c895c68f3a8818e54f2389e"
dependencies = [
"rustls 0.20.4",
"tokio 1.17.0",
@@ -11645,6 +12159,20 @@
]
[[package]]
+name = "tokio-util"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
+dependencies = [
+ "bytes 1.1.0",
+ "futures-core",
+ "futures-sink",
+ "pin-project-lite 0.2.8",
+ "tokio 1.17.0",
+ "tracing",
+]
+
+[[package]]
name = "toml"
version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11661,9 +12189,9 @@
[[package]]
name = "tracing"
-version = "0.1.31"
+version = "0.1.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6c650a8ef0cd2dd93736f033d21cbd1224c5a967aa0c258d00fcf7dafef9b9f"
+checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f"
dependencies = [
"cfg-if 1.0.0",
"pin-project-lite 0.2.8",
@@ -11673,9 +12201,9 @@
[[package]]
name = "tracing-attributes"
-version = "0.1.19"
+version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716"
+checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b"
dependencies = [
"proc-macro2",
"quote",
@@ -11684,9 +12212,9 @@
[[package]]
name = "tracing-core"
-version = "0.1.22"
+version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23"
+checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c"
dependencies = [
"lazy_static",
"valuable",
@@ -11830,7 +12358,7 @@
[[package]]
name = "try-runtime-cli"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.17#22d40c761a985482f93bbbea5ba4199bdba74f8e"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.18#fc3fd073d3a0acf9933c3994b660ebd7b5833f65"
dependencies = [
"clap",
"jsonrpsee 0.4.1",
@@ -11865,6 +12393,7 @@
checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0"
dependencies = [
"cfg-if 1.0.0",
+ "digest 0.10.3",
"rand 0.8.5",
"static_assertions",
]
@@ -11883,6 +12412,7 @@
"jsonrpc-core-client",
"jsonrpc-derive",
"pallet-common",
+ "pallet-evm",
"parity-scale-codec",
"sp-api",
"sp-blockchain",
@@ -11949,7 +12479,7 @@
[[package]]
name = "unique-node"
-version = "0.9.17"
+version = "0.9.18"
dependencies = [
"clap",
"cumulus-client-cli",
@@ -11960,8 +12490,9 @@
"cumulus-client-service",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
+ "cumulus-relay-chain-inprocess-interface",
"cumulus-relay-chain-interface",
- "cumulus-relay-chain-local",
+ "cumulus-relay-chain-rpc-interface",
"fc-consensus",
"fc-db",
"fc-mapping-sync",
@@ -12080,7 +12611,7 @@
[[package]]
name = "unique-runtime"
-version = "0.9.17"
+version = "0.9.18"
dependencies = [
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
@@ -12091,6 +12622,7 @@
"cumulus-primitives-timestamp",
"cumulus-primitives-utility",
"derivative",
+ "fp-evm-mapping",
"fp-rpc",
"fp-self-contained",
"frame-benchmarking",
@@ -12147,7 +12679,6 @@
"substrate-wasm-builder",
"unique-runtime-common",
"up-data-structs",
- "up-evm-mapping",
"up-rpc",
"xcm",
"xcm-builder",
@@ -12156,12 +12687,13 @@
[[package]]
name = "unique-runtime-common"
-version = "0.1.0"
+version = "0.9.18"
dependencies = [
"fp-rpc",
"frame-support",
"frame-system",
"pallet-common",
+ "pallet-evm",
"parity-scale-codec",
"scale-info",
"sp-consensus-aura",
@@ -12228,14 +12760,6 @@
"sp-core",
"sp-runtime",
"sp-std",
-]
-
-[[package]]
-name = "up-evm-mapping"
-version = "0.1.0"
-dependencies = [
- "frame-support",
- "sp-core",
]
[[package]]
@@ -12243,6 +12767,7 @@
version = "0.1.0"
dependencies = [
"pallet-common",
+ "pallet-evm",
"parity-scale-codec",
"sp-api",
"sp-core",
@@ -12254,7 +12779,7 @@
[[package]]
name = "up-sponsorship"
version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.17#28f311f8de67155865d362f6ded1d0d5229f3202"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.18#7bc842b35a53f762ee6ee89e5f5bef84a284c9f4"
dependencies = [
"impl-trait-for-tuples",
]
@@ -12356,6 +12881,12 @@
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
+name = "wasi"
+version = "0.11.0+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
+
+[[package]]
name = "wasm-bindgen"
version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -12698,8 +13229,8 @@
[[package]]
name = "westend-runtime"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"beefy-primitives",
"bitvec",
@@ -12784,8 +13315,8 @@
[[package]]
name = "westend-runtime-constants"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -12796,9 +13327,9 @@
[[package]]
name = "which"
-version = "4.2.4"
+version = "4.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
+checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae"
dependencies = [
"either",
"lazy_static",
@@ -12856,9 +13387,9 @@
[[package]]
name = "windows-sys"
-version = "0.32.0"
+version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6"
+checksum = "5acdd78cb4ba54c0045ac14f62d8f94a03d10047904ae2a40afa1e99d8f70825"
dependencies = [
"windows_aarch64_msvc",
"windows_i686_gnu",
@@ -12869,33 +13400,33 @@
[[package]]
name = "windows_aarch64_msvc"
-version = "0.32.0"
+version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5"
+checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d"
[[package]]
name = "windows_i686_gnu"
-version = "0.32.0"
+version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615"
+checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed"
[[package]]
name = "windows_i686_msvc"
-version = "0.32.0"
+version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172"
+checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956"
[[package]]
name = "windows_x86_64_gnu"
-version = "0.32.0"
+version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc"
+checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4"
[[package]]
name = "windows_x86_64_msvc"
-version = "0.32.0"
+version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316"
+checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9"
[[package]]
name = "winreg"
@@ -12918,9 +13449,12 @@
[[package]]
name = "wyz"
-version = "0.2.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214"
+checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e"
+dependencies = [
+ "tap",
+]
[[package]]
name = "x25519-dalek"
@@ -12935,8 +13469,8 @@
[[package]]
name = "xcm"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"derivative",
"impl-trait-for-tuples",
@@ -12948,8 +13482,8 @@
[[package]]
name = "xcm-builder"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-support",
"frame-system",
@@ -12968,8 +13502,8 @@
[[package]]
name = "xcm-executor"
-version = "0.9.17"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+version = "0.9.18"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -12987,7 +13521,7 @@
[[package]]
name = "xcm-procedural"
version = "0.1.0"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.18#9ed0c98204d25eaad8a6b40248daee8e6a40d111"
dependencies = [
"Inflector",
"proc-macro2",
@@ -13011,15 +13545,15 @@
[[package]]
name = "yansi"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71"
+checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
[[package]]
name = "zeroize"
-version = "1.5.3"
+version = "1.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608"
+checksum = "7eb5728b8afd3f280a869ce1d4c554ffaed35f45c231fc41bfbd0381bef50317"
dependencies = [
"zeroize_derive",
]
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -5,8 +5,11 @@
'pallets/*',
'client/*',
'primitives/*',
- 'runtime/*',
'crates/*',
]
+exclude = [
+ "runtime/unique",
+ "runtime/quartz"
+]
[profile.release]
panic = 'unwind'
Dockerfile-parachaindiffbeforeafterboth--- a/Dockerfile-parachain
+++ b/Dockerfile-parachain
@@ -1,10 +1,10 @@
# ===== Rust builder =====
-FROM phusion/baseimage:focal-1.0.0 as rust-builder
+FROM phusion/baseimage:focal-1.1.0 as rust-builder
LABEL maintainer="Unique.Network"
ARG RUST_TOOLCHAIN=nightly-2021-11-11
#ARG RUST_C=1.58.0-nightly
-ARG POLKA_VERSION=release-v0.9.17
+ARG POLKA_VERSION=release-v0.9.18
ARG UNIQUE_BRANCH=develop
#ARG USER=***
@@ -77,7 +77,7 @@
# ===== RUN ======
-FROM phusion/baseimage:focal-1.0.0
+FROM phusion/baseimage:focal-1.1.0
ARG PROFILE=release
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -63,12 +63,7 @@
5. Build:
```bash
-cargo build
-```
-
-optionally, build in release:
-```bash
-cargo build --release
+cargo build --features=unique-runtime,quartz-runtime --release
```
## Building as Parachain locally
@@ -86,7 +81,7 @@
```
git clone https://github.com/paritytech/polkadot.git
cd polkadot
-git checkout release-v0.9.17
+git checkout release-v0.9.18
cargo build --release
```
client/rpc/Cargo.tomldiffbeforeafterboth--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -8,13 +8,14 @@
pallet-common = { default-features = false, path = '../../pallets/common' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
up-rpc = { path = "../../primitives/rpc" }
-codec = { package = "parity-scale-codec", version = "2.0.0" }
+codec = { package = "parity-scale-codec", version = "3.1.2" }
jsonrpc-core = "18.0.0"
jsonrpc-core-client = "18.0.0"
jsonrpc-derive = "18.0.0"
-sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.17" }
-sp-blockchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.17" }
-sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.17" }
-sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.17" }
-sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.17" }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }
+sp-blockchain = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }
+sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }
+sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }
+sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -207,7 +207,7 @@
AccountId: Decode,
C: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
C::Api: UniqueRuntimeApi<Block, CrossAccountId, AccountId>,
- CrossAccountId: pallet_common::account::CrossAccountId<AccountId>,
+ CrossAccountId: pallet_evm::account::CrossAccountId<AccountId>,
{
pass_method!(account_tokens(collection: CollectionId, account: CrossAccountId) -> Vec<TokenId>);
pass_method!(token_exists(collection: CollectionId, token: TokenId) -> bool);
crates/evm-coder/Cargo.tomldiffbeforeafterboth--- a/crates/evm-coder/Cargo.toml
+++ b/crates/evm-coder/Cargo.toml
@@ -6,10 +6,10 @@
[dependencies]
evm-coder-macros = { path = "../evm-coder-macros" }
-primitive-types = { version = "0.10.1", default-features = false }
+primitive-types = { version = "0.11.1", default-features = false }
hex-literal = "0.3.3"
-ethereum = { version = "0.11.1", default-features = false }
-evm-core = { default-features = false, git = "https://github.com/uniquenetwork/evm.git", branch = "unique-polkadot-v0.9.16" }
+ethereum = { version = "0.12.0", default-features = false }
+evm-core = { default-features = false, git = "https://github.com/uniquenetwork/evm.git", branch = "unique-polkadot-v0.9.18" }
impl-trait-for-tuples = "0.2.1"
[dev-dependencies]
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -3,7 +3,7 @@
[build-dependencies.substrate-build-script-utils]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
################################################################################
# Substrate Dependecies
@@ -12,154 +12,154 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[dependencies.frame-benchmarking]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-benchmarking-cli]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-transaction-payment-rpc]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.substrate-prometheus-endpoint]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-basic-authorship]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-chain-spec]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-cli]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-client-api]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-consensus]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-executor]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-finality-grandpa]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-keystore]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-rpc]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-rpc-api]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-service]
features = ['wasmtime']
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-telemetry]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-tracing]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-block-builder]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-api]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-blockchain]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-consensus]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-consensus-aura]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-core]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-finality-grandpa]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-inherents]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-keystore]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-offchain]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-runtime]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-session]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-timestamp]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-transaction-pool]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-trie]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.substrate-frame-rpc-system]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sc-network]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.serde]
features = ['derive']
@@ -170,72 +170,76 @@
[dependencies.sc-consensus-manual-seal]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
################################################################################
# Cumulus dependencies
[dependencies.cumulus-client-consensus-aura]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-client-consensus-common]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-client-collator]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-client-cli]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-client-network]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-primitives-core]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-primitives-parachain-inherent]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-client-service]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-relay-chain-interface]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
-[dependencies.cumulus-relay-chain-local]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+[dependencies.cumulus-relay-chain-inprocess-interface]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
+
+[dependencies.cumulus-relay-chain-rpc-interface]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
################################################################################
# Polkadot dependencies
[dependencies.polkadot-primitives]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
[dependencies.polkadot-service]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
[dependencies.polkadot-cli]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
[dependencies.polkadot-test-service]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
[dependencies.polkadot-parachain]
git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
################################################################################
@@ -265,7 +269,7 @@
[dependencies.pallet-transaction-payment-rpc-runtime-api]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
################################################################################
# Package
@@ -279,7 +283,7 @@
license = 'GPLv3'
name = 'unique-node'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.17'
+version = '0.9.18'
[[bin]]
name = 'unique-collator'
@@ -296,19 +300,20 @@
clap = "3.1.2"
jsonrpc-core = '18.0.0'
jsonrpc-pubsub = "18.0.0"
+tokio = { version = "1.17.0", features = ["time"] }
-fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
+fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fc-consensus = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fc-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fc-db = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-rpc = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
unique-rpc = { default-features = false, path = "../rpc" }
[features]
-default = ["unique-runtime", "quartz-runtime"]
+default = []
runtime-benchmarks = [
'unique-runtime/runtime-benchmarks',
'polkadot-service/runtime-benchmarks',
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-use cumulus_primitives_core::ParaId;
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use sp_core::{sr25519, Pair, Public};
@@ -26,6 +25,15 @@
use unique_runtime_common::types::*;
+#[cfg(feature = "unique-runtime")]
+use unique_runtime as default_runtime;
+
+#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
+use quartz_runtime as default_runtime;
+
+#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
+use opal_runtime as default_runtime;
+
/// The `ChainSpec` parameterized for the unique runtime.
#[cfg(feature = "unique-runtime")]
pub type UniqueChainSpec = sc_service::GenericChainSpec<unique_runtime::GenesisConfig, Extensions>;
@@ -37,9 +45,22 @@
/// The `ChainSpec` parameterized for the opal runtime.
pub type OpalChainSpec = sc_service::GenericChainSpec<opal_runtime::GenesisConfig, Extensions>;
+#[cfg(feature = "unique-runtime")]
+pub type DefaultChainSpec = UniqueChainSpec;
+
+#[cfg(all(not(feature = "unique-runtime"), feature = "quartz-runtime"))]
+pub type DefaultChainSpec = QuartzChainSpec;
+
+#[cfg(all(not(feature = "unique-runtime"), not(feature = "quartz-runtime")))]
+pub type DefaultChainSpec = OpalChainSpec;
+
pub enum RuntimeId {
+ #[cfg(feature = "unique-runtime")]
Unique,
+
+ #[cfg(feature = "quartz-runtime")]
Quartz,
+
Opal,
Unknown(String),
}
@@ -51,12 +72,12 @@
impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {
fn runtime_id(&self) -> RuntimeId {
#[cfg(feature = "unique-runtime")]
- if self.id().starts_with("unique") {
+ if self.id().starts_with("unique") || self.id().starts_with("unq") {
return RuntimeId::Unique;
}
#[cfg(feature = "quartz-runtime")]
- if self.id().starts_with("quartz") {
+ if self.id().starts_with("quartz") || self.id().starts_with("qtz") {
return RuntimeId::Quartz;
}
@@ -121,20 +142,66 @@
AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()
}
+macro_rules! testnet_genesis {
+ (
+ $runtime:path,
+ $root_key:expr,
+ $initial_authorities:expr,
+ $endowed_accounts:expr,
+ $id:expr
+ ) => {{
+ use $runtime::*;
+
+ GenesisConfig {
+ system: SystemConfig {
+ code: WASM_BINARY
+ .expect("WASM binary was not build, please build it!")
+ .to_vec(),
+ },
+ balances: BalancesConfig {
+ balances: $endowed_accounts
+ .iter()
+ .cloned()
+ // 1e13 UNQ
+ .map(|k| (k, 1 << 100))
+ .collect(),
+ },
+ treasury: Default::default(),
+ sudo: SudoConfig {
+ key: Some($root_key),
+ },
+ vesting: VestingConfig { vesting: vec![] },
+ parachain_info: ParachainInfoConfig {
+ parachain_id: $id.into(),
+ },
+ parachain_system: Default::default(),
+ aura: AuraConfig {
+ authorities: $initial_authorities,
+ },
+ aura_ext: Default::default(),
+ evm: EVMConfig {
+ accounts: BTreeMap::new(),
+ },
+ ethereum: EthereumConfig {},
+ }
+ }};
+}
+
pub fn development_config() -> OpalChainSpec {
let mut properties = Map::new();
- properties.insert("tokenSymbol".into(), "OPL".into());
- properties.insert("tokenDecimals".into(), 15.into());
- properties.insert("ss58Format".into(), 42.into());
+ properties.insert("tokenSymbol".into(), opal_runtime::TOKEN_SYMBOL.into());
+ properties.insert("tokenDecimals".into(), 18.into());
+ properties.insert("ss58Format".into(), opal_runtime::SS58Prefix::get().into());
OpalChainSpec::from_genesis(
// Name
- "Development",
+ "OPAL by UNIQUE",
// ID
- "dev",
+ "opal_dev",
ChainType::Local,
move || {
- testnet_genesis(
+ testnet_genesis!(
+ opal_runtime,
// Sudo account
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
@@ -145,8 +212,18 @@
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
+ get_account_id_from_seed::<sr25519::Public>("Charlie"),
+ get_account_id_from_seed::<sr25519::Public>("Dave"),
+ get_account_id_from_seed::<sr25519::Public>("Eve"),
+ get_account_id_from_seed::<sr25519::Public>("Ferdie"),
+ get_account_id_from_seed::<sr25519::Public>("Alice//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Bob//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Dave//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
+ get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
],
- 1000.into(),
+ 1000
)
},
// Bootnodes
@@ -166,15 +243,33 @@
)
}
-pub fn local_testnet_rococo_config() -> OpalChainSpec {
- OpalChainSpec::from_genesis(
+pub fn local_testnet_rococo_config() -> DefaultChainSpec {
+ let mut properties = Map::new();
+ properties.insert("tokenSymbol".into(), default_runtime::TOKEN_SYMBOL.into());
+ properties.insert("tokenDecimals".into(), 18.into());
+ properties.insert(
+ "ss58Format".into(),
+ default_runtime::SS58Prefix::get().into(),
+ );
+
+ DefaultChainSpec::from_genesis(
// Name
- "Local Testnet",
+ format!(
+ "{}{}",
+ default_runtime::RUNTIME_NAME.to_uppercase(),
+ if cfg!(feature = "unique-runtime") {
+ ""
+ } else {
+ " by UNIQUE"
+ }
+ )
+ .as_str(),
// ID
- "local_testnet",
+ format!("{}_local", default_runtime::RUNTIME_NAME).as_str(),
ChainType::Local,
move || {
- testnet_genesis(
+ testnet_genesis!(
+ default_runtime,
// Sudo account
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
@@ -196,7 +291,7 @@
get_account_id_from_seed::<sr25519::Public>("Eve//stash"),
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
],
- 1000.into(),
+ 1000
)
},
// Bootnodes
@@ -207,51 +302,11 @@
None,
None,
// Properties
- None,
+ Some(properties),
// Extensions
Extensions {
relay_chain: "rococo-local".into(),
para_id: 1000,
},
)
-}
-
-fn testnet_genesis(
- root_key: AccountId,
- initial_authorities: Vec<AuraId>,
- endowed_accounts: Vec<AccountId>,
- id: ParaId,
-) -> opal_runtime::GenesisConfig {
- use opal_runtime::*;
-
- GenesisConfig {
- system: SystemConfig {
- code: WASM_BINARY
- .expect("WASM binary was not build, please build it!")
- .to_vec(),
- },
- balances: BalancesConfig {
- balances: endowed_accounts
- .iter()
- .cloned()
- // 1e13 UNQ
- .map(|k| (k, 1 << 100))
- .collect(),
- },
- treasury: Default::default(),
- sudo: SudoConfig {
- key: Some(root_key),
- },
- vesting: VestingConfig { vesting: vec![] },
- parachain_info: ParachainInfoConfig { parachain_id: id },
- parachain_system: Default::default(),
- aura: AuraConfig {
- authorities: initial_authorities,
- },
- aura_ext: Default::default(),
- evm: EVMConfig {
- accounts: BTreeMap::new(),
- },
- ethereum: EthereumConfig {},
- }
}
node/cli/src/cli.rsdiffbeforeafterboth--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -15,9 +15,11 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
use crate::chain_spec;
-use std::path::PathBuf;
+use std::{path::PathBuf, env};
use clap::Parser;
+const NODE_NAME_ENV: &str = "UNIQUE_NODE_NAME";
+
/// Sub-commands supported by the collator.
#[derive(Debug, Parser)]
pub enum Subcommand {
@@ -102,11 +104,38 @@
#[structopt(flatten)]
pub run: cumulus_client_cli::RunCmd,
+ /// When running the node in the `--dev` mode and
+ /// there is no transaction in the transaction pool,
+ /// an empty block will be sealed automatically
+ /// after the `--idle-autoseal-interval` milliseconds.
+ ///
+ /// The default interval is 500 milliseconds
+ #[structopt(default_value = "500", long)]
+ pub idle_autoseal_interval: u64,
+
/// Relaychain arguments
#[structopt(raw = true)]
pub relaychain_args: Vec<String>,
}
+impl Cli {
+ pub fn node_name() -> String {
+ match env::var(NODE_NAME_ENV).ok() {
+ Some(name) => name,
+ None => {
+ if cfg!(feature = "unique-runtime") {
+ "Unique"
+ } else if cfg!(feature = "quartz-runtime") {
+ "Quartz"
+ } else {
+ "Opal"
+ }
+ }
+ .into(),
+ }
+ }
+}
+
#[derive(Debug)]
pub struct RelayChainCli {
/// The actual relay chain cli object.
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -60,7 +60,7 @@
};
use sp_core::hexdisplay::HexDisplay;
use sp_runtime::traits::Block as BlockT;
-use std::{io::Write, net::SocketAddr};
+use std::{io::Write, net::SocketAddr, time::Duration};
use unique_runtime_common::types::Block;
@@ -99,7 +99,7 @@
impl SubstrateCli for Cli {
// TODO use args
fn impl_name() -> String {
- "Unique Node".into()
+ format!("{} Node", Self::node_name())
}
fn impl_version() -> String {
@@ -108,10 +108,11 @@
// TODO use args
fn description() -> String {
format!(
- "Unique Node\n\nThe command-line arguments provided first will be \
+ "{} Node\n\nThe command-line arguments provided first will be \
passed to the parachain node, while the arguments provided after -- will be passed \
to the relaychain node.\n\n\
{} [parachain-args] -- [relaychain-args]",
+ Self::node_name(),
Self::executable_name()
)
}
@@ -150,7 +151,7 @@
impl SubstrateCli for RelayChainCli {
// TODO use args
fn impl_name() -> String {
- "Unique Node".into()
+ format!("{} Node", Cli::node_name())
}
fn impl_version() -> String {
@@ -158,11 +159,13 @@
}
// TODO use args
fn description() -> String {
- "Unique Node\n\nThe command-line arguments provided first will be \
- passed to the parachain node, while the arguments provided after -- will be passed \
- to the relaychain node.\n\n\
- parachain-collator [parachain-args] -- [relaychain-args]"
- .into()
+ format!(
+ "{} Node\n\nThe command-line arguments provided first will be \
+ passed to the parachain node, while the arguments provided after -- will be passed \
+ to the relaychain node.\n\n\
+ parachain-collator [parachain-args] -- [relaychain-args]",
+ Cli::node_name()
+ )
}
fn author() -> String {
@@ -389,6 +392,7 @@
}
None => {
let runner = cli.create_runner(&cli.run.normalize())?;
+ let collator_options = cli.run.collator_options();
runner.run_node_until_exit(|config| async move {
let extensions = chain_spec::Extensions::try_get(&*config.chain_spec);
@@ -401,8 +405,10 @@
if is_dev_service {
info!("Running Dev service");
+ let autoseal_interval = Duration::from_millis(cli.idle_autoseal_interval);
+
return start_node_using_chain_runtime! {
- start_dev_node(config).map_err(Into::into)
+ start_dev_node(config, autoseal_interval).map_err(Into::into)
};
};
@@ -452,7 +458,7 @@
);
start_node_using_chain_runtime! {
- start_node(config, polkadot_config, para_id)
+ start_node(config, polkadot_config, collator_options, para_id)
.await
.map(|r| r.0)
.map_err(Into::into)
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -21,8 +21,14 @@
use std::sync::Mutex;
use std::collections::BTreeMap;
use std::time::Duration;
+use std::pin::Pin;
use fc_rpc_core::types::FeeHistoryCache;
-use futures::StreamExt;
+use futures::{
+ Stream, StreamExt,
+ stream::select,
+ task::{Context, Poll},
+};
+use tokio::time::Interval;
use unique_rpc::overrides_handle;
@@ -34,10 +40,12 @@
use cumulus_client_service::{
prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
};
+use cumulus_client_cli::CollatorOptions;
use cumulus_client_network::BlockAnnounceValidator;
use cumulus_primitives_core::ParaId;
-use cumulus_relay_chain_interface::RelayChainInterface;
-use cumulus_relay_chain_local::build_relay_chain_interface;
+use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain;
+use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult};
+use cumulus_relay_chain_rpc_interface::RelayChainRPCInterface;
// Substrate Imports
use sc_client_api::ExecutorProvider;
@@ -46,21 +54,29 @@
use sc_network::NetworkService;
use sc_service::{BasePath, Configuration, PartialComponents, Role, TaskManager};
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
-use sp_consensus::SlotData;
use sp_keystore::SyncCryptoStorePtr;
use sp_runtime::traits::BlakeTwo256;
use substrate_prometheus_endpoint::Registry;
use sc_client_api::BlockchainEvents;
+use polkadot_service::CollatorPair;
+
// Frontier Imports
use fc_rpc_core::types::FilterPool;
use fc_mapping_sync::{MappingSyncWorker, SyncStrategy};
use unique_runtime_common::types::{AuraId, RuntimeInstance, AccountId, Balance, Index, Hash, Block};
-/// Native executor instance.
+/// Unique native executor instance.
+#[cfg(feature = "unique-runtime")]
pub struct UniqueRuntimeExecutor;
+
+#[cfg(feature = "quartz-runtime")]
+/// Quartz native executor instance.
+
pub struct QuartzRuntimeExecutor;
+
+/// Opal native executor instance.
pub struct OpalRuntimeExecutor;
#[cfg(feature = "unique-runtime")]
@@ -101,6 +117,27 @@
}
}
+pub struct AutosealInterval {
+ interval: Interval,
+}
+
+impl AutosealInterval {
+ pub fn new(config: &Configuration, interval: Duration) -> Self {
+ let _tokio_runtime = config.tokio_handle.enter();
+ let interval = tokio::time::interval(interval);
+
+ Self { interval }
+ }
+}
+
+impl Stream for AutosealInterval {
+ type Item = tokio::time::Instant;
+
+ fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
+ self.interval.poll_tick(cx).map(Some)
+ }
+}
+
pub fn open_frontier_backend(config: &Configuration) -> Result<Arc<fc_db::Backend<Block>>, String> {
let config_dir = config
.base_path
@@ -257,6 +294,30 @@
Ok(params)
}
+async fn build_relay_chain_interface(
+ polkadot_config: Configuration,
+ parachain_config: &Configuration,
+ telemetry_worker_handle: Option<TelemetryWorkerHandle>,
+ task_manager: &mut TaskManager,
+ collator_options: CollatorOptions,
+) -> RelayChainResult<(
+ Arc<(dyn RelayChainInterface + 'static)>,
+ Option<CollatorPair>,
+)> {
+ match collator_options.relay_chain_rpc_url {
+ Some(relay_chain_url) => Ok((
+ Arc::new(RelayChainRPCInterface::new(relay_chain_url).await?) as Arc<_>,
+ None,
+ )),
+ None => build_inprocess_relay_chain(
+ polkadot_config,
+ parachain_config,
+ telemetry_worker_handle,
+ task_manager,
+ ),
+ }
+}
+
/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.
///
/// This is the actual implementation that is abstract over the executor and the runtime api.
@@ -264,6 +325,7 @@
async fn start_node_impl<Runtime, RuntimeApi, ExecutorDispatch, BIQ, BIC>(
parachain_config: Configuration,
polkadot_config: Configuration,
+ collator_options: CollatorOptions,
id: ParaId,
build_import_queue: BIQ,
build_consensus: BIC,
@@ -325,12 +387,18 @@
let backend = params.backend.clone();
let mut task_manager = params.task_manager;
- let (relay_chain_interface, collator_key) =
- build_relay_chain_interface(polkadot_config, telemetry_worker_handle, &mut task_manager)
- .map_err(|e| match e {
- polkadot_service::Error::Sub(x) => x,
- s => format!("{}", s).into(),
- })?;
+ let (relay_chain_interface, collator_key) = build_relay_chain_interface(
+ polkadot_config,
+ ¶chain_config,
+ telemetry_worker_handle,
+ &mut task_manager,
+ collator_options.clone(),
+ )
+ .await
+ .map_err(|e| match e {
+ RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x,
+ s => s.to_string().into(),
+ })?;
let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id);
@@ -455,7 +523,7 @@
spawner,
parachain_consensus,
import_queue,
- collator_key,
+ collator_key: collator_key.expect("Command line arguments do not allow this. qed"),
relay_chain_interface,
relay_chain_slot_duration,
};
@@ -470,6 +538,7 @@
import_queue,
relay_chain_interface,
relay_chain_slot_duration,
+ collator_options,
};
start_full_node(params)?;
@@ -518,9 +587,9 @@
let time = sp_timestamp::InherentDataProvider::from_system_time();
let slot =
- sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
+ sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*time,
- slot_duration.slot_duration(),
+ slot_duration,
);
Ok((time, slot))
@@ -537,6 +606,7 @@
pub async fn start_node<Runtime, RuntimeApi, ExecutorDispatch>(
parachain_config: Configuration,
polkadot_config: Configuration,
+ collator_options: CollatorOptions,
id: ParaId,
) -> sc_service::error::Result<(TaskManager, Arc<FullClient<RuntimeApi, ExecutorDispatch>>)>
where
@@ -564,6 +634,7 @@
start_node_impl::<Runtime, RuntimeApi, ExecutorDispatch, _, _>(
parachain_config,
polkadot_config,
+ collator_options,
id,
parachain_build_import_queue,
|client,
@@ -609,9 +680,9 @@
let time = sp_timestamp::InherentDataProvider::from_system_time();
let slot =
- sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
+ sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*time,
- slot_duration.slot_duration(),
+ slot_duration,
);
let parachain_inherent = parachain_inherent.ok_or_else(|| {
@@ -628,7 +699,7 @@
sync_oracle,
keystore,
force_authoring,
- slot_duration: *slot_duration,
+ slot_duration,
// We got around 500ms for proposing
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
telemetry,
@@ -668,6 +739,7 @@
/// the parachain inherent
pub fn start_dev_node<Runtime, RuntimeApi, ExecutorDispatch>(
config: Configuration,
+ autoseal_interval: Duration,
) -> sc_service::error::Result<TaskManager>
where
Runtime: RuntimeInstance + Send + Sync + 'static,
@@ -691,7 +763,6 @@
+ sp_consensus_aura::AuraApi<Block, AuraId>,
ExecutorDispatch: NativeExecutionDispatch + 'static,
{
- use futures::Stream;
use sc_consensus_manual_seal::{run_manual_seal, EngineCommand, ManualSealParams};
use fc_consensus::FrontierBlockImport;
use sc_client_api::HeaderBackend;
@@ -755,20 +826,32 @@
telemetry.as_ref().map(|x| x.handle()),
);
- let commands_stream: Box<dyn Stream<Item = EngineCommand<Hash>> + Send + Sync + Unpin> =
- Box::new(
- // This bit cribbed from the implementation of instant seal.
- transaction_pool
- .pool()
- .validated_pool()
- .import_notification_stream()
- .map(|_| EngineCommand::SealNewBlock {
- create_empty: true, // was false in Moonbeam
- finalize: false,
- parent_hash: None,
- sender: None,
- }),
- );
+ let transactions_commands_stream: Box<
+ dyn Stream<Item = EngineCommand<Hash>> + Send + Sync + Unpin,
+ > = Box::new(
+ transaction_pool
+ .pool()
+ .validated_pool()
+ .import_notification_stream()
+ .map(|_| EngineCommand::SealNewBlock {
+ create_empty: true,
+ finalize: false,
+ parent_hash: None,
+ sender: None,
+ }),
+ );
+
+ let autoseal_interval = Box::pin(AutosealInterval::new(&config, autoseal_interval));
+ let idle_commands_stream: Box<
+ dyn Stream<Item = EngineCommand<Hash>> + Send + Sync + Unpin,
+ > = Box::new(autoseal_interval.map(|_| EngineCommand::SealNewBlock {
+ create_empty: true,
+ finalize: false,
+ parent_hash: None,
+ sender: None,
+ }));
+
+ let commands_stream = select(transactions_commands_stream, idle_commands_stream);
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;
let client_set_aside_for_cidp = client.clone();
@@ -809,9 +892,9 @@
};
let slot =
- sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(
+ sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*time,
- slot_duration.slot_duration(),
+ slot_duration,
);
Ok((time, slot, mocked_parachain))
node/rpc/Cargo.tomldiffbeforeafterboth--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -13,40 +13,40 @@
futures = { version = "0.3.17", features = ["compat"] }
jsonrpc-core = "18.0.0"
jsonrpc-pubsub = "18.0.0"
-# pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-consensus-epochs = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-finality-grandpa-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+# pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-consensus-epochs = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-finality-grandpa = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-finality-grandpa-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-network = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
tokio = { version = "0.2.25", features = ["macros", "sync"] }
-pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
pallet-common = { default-features = false, path = "../../pallets/common" }
unique-runtime-common = { default-features = false, path = "../../runtime/common" }
pallets/common/Cargo.tomldiffbeforeafterboth--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -8,21 +8,21 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.0.0'
+version = '3.1.2'
[dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-up-evm-mapping = { default-features = false, path = '../../primitives/evm-mapping' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
serde = { version = "1.0.130", default-features = false }
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
@@ -33,7 +33,7 @@
"frame-system/std",
"sp-runtime/std",
"sp-std/std",
- "up-evm-mapping/std",
+ "fp-evm-mapping/std",
"up-data-structs/std",
"pallet-evm/std",
]
pallets/common/src/account.rsdiffbeforeafterboth--- a/pallets/common/src/account.rs
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-use crate::Config;
-use codec::{Encode, EncodeLike, Decode, MaxEncodedLen};
-use sp_core::H160;
-use scale_info::{Type, TypeInfo};
-use core::cmp::Ordering;
-use serde::{Serialize, Deserialize};
-use pallet_evm::AddressMapping;
-use sp_std::vec::Vec;
-use sp_std::clone::Clone;
-pub use up_evm_mapping::EvmBackwardsAddressMapping;
-
-pub trait CrossAccountId<AccountId>:
- Encode + EncodeLike + Decode + TypeInfo + MaxEncodedLen + Clone + PartialEq + Ord + core::fmt::Debug
-// +
-// Serialize + Deserialize<'static>
-{
- fn as_sub(&self) -> &AccountId;
- fn as_eth(&self) -> &H160;
-
- fn from_sub(account: AccountId) -> Self;
- fn from_eth(account: H160) -> Self;
-
- fn conv_eq(&self, other: &Self) -> bool;
-}
-
-#[derive(Encode, Decode, Serialize, Deserialize, TypeInfo, MaxEncodedLen)]
-#[serde(rename_all = "camelCase")]
-enum BasicCrossAccountIdRepr<AccountId> {
- Substrate(AccountId),
- Ethereum(H160),
-}
-
-#[derive(PartialEq, Eq)]
-pub struct BasicCrossAccountId<T: Config> {
- /// If true - then ethereum is canonical encoding
- from_ethereum: bool,
- substrate: T::AccountId,
- ethereum: H160,
-}
-
-impl<T: Config> MaxEncodedLen for BasicCrossAccountId<T> {
- fn max_encoded_len() -> usize {
- <BasicCrossAccountIdRepr<T::AccountId>>::max_encoded_len()
- }
-}
-
-impl<T: Config> TypeInfo for BasicCrossAccountId<T> {
- type Identity = Self;
-
- fn type_info() -> Type {
- <BasicCrossAccountIdRepr<T::AccountId>>::type_info()
- }
-}
-
-impl<T: Config> core::fmt::Debug for BasicCrossAccountId<T> {
- fn fmt(&self, fmt: &mut core::fmt::Formatter) -> core::fmt::Result {
- if self.from_ethereum {
- fmt.debug_tuple("CrossAccountId::Ethereum")
- .field(&self.ethereum)
- .finish()
- } else {
- fmt.debug_tuple("CrossAccountId::Substrate")
- .field(&self.substrate)
- .finish()
- }
- }
-}
-
-impl<T: Config> PartialOrd for BasicCrossAccountId<T> {
- fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
- Some(self.substrate.cmp(&other.substrate))
- }
-}
-
-impl<T: Config> Ord for BasicCrossAccountId<T> {
- fn cmp(&self, other: &Self) -> Ordering {
- self.partial_cmp(other)
- .expect("substrate account is total ordered")
- }
-}
-
-impl<T: Config> Clone for BasicCrossAccountId<T> {
- fn clone(&self) -> Self {
- Self {
- from_ethereum: self.from_ethereum,
- substrate: self.substrate.clone(),
- ethereum: self.ethereum,
- }
- }
-}
-impl<T: Config> Encode for BasicCrossAccountId<T> {
- fn encode(&self) -> Vec<u8> {
- BasicCrossAccountIdRepr::from(self.clone()).encode()
- }
-}
-impl<T: Config> EncodeLike for BasicCrossAccountId<T> {}
-impl<T: Config> Decode for BasicCrossAccountId<T> {
- fn decode<I>(input: &mut I) -> Result<Self, codec::Error>
- where
- I: codec::Input,
- {
- Ok(BasicCrossAccountIdRepr::decode(input)?.into())
- }
-}
-impl<T> Serialize for BasicCrossAccountId<T>
-where
- T: Config,
- T::AccountId: Serialize,
-{
- fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
- where
- S: serde::Serializer,
- {
- let repr = BasicCrossAccountIdRepr::from(self.clone());
- (&repr).serialize(serializer)
- }
-}
-impl<'de, T> Deserialize<'de> for BasicCrossAccountId<T>
-where
- T: Config,
- T::AccountId: Deserialize<'de>,
-{
- fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
- where
- D: serde::Deserializer<'de>,
- {
- Ok(BasicCrossAccountIdRepr::deserialize(deserializer)?.into())
- }
-}
-impl<T: Config> CrossAccountId<T::AccountId> for BasicCrossAccountId<T> {
- fn as_sub(&self) -> &T::AccountId {
- &self.substrate
- }
- fn as_eth(&self) -> &H160 {
- &self.ethereum
- }
- fn from_sub(substrate: T::AccountId) -> Self {
- Self {
- ethereum: T::EvmBackwardsAddressMapping::from_account_id(substrate.clone()),
- substrate,
- from_ethereum: false,
- }
- }
- fn from_eth(ethereum: H160) -> Self {
- Self {
- ethereum,
- substrate: T::EvmAddressMapping::into_account_id(ethereum),
- from_ethereum: true,
- }
- }
- fn conv_eq(&self, other: &Self) -> bool {
- if self.from_ethereum == other.from_ethereum {
- self.substrate == other.substrate && self.ethereum == other.ethereum
- } else if self.from_ethereum {
- // ethereum is canonical encoding, but we need to compare derived address
- self.substrate == other.substrate
- } else {
- self.ethereum == other.ethereum
- }
- }
-}
-impl<T: Config> From<BasicCrossAccountIdRepr<T::AccountId>> for BasicCrossAccountId<T> {
- fn from(repr: BasicCrossAccountIdRepr<T::AccountId>) -> Self {
- match repr {
- BasicCrossAccountIdRepr::Substrate(s) => Self::from_sub(s),
- BasicCrossAccountIdRepr::Ethereum(e) => Self::from_eth(e),
- }
- }
-}
-impl<T: Config> From<BasicCrossAccountId<T>> for BasicCrossAccountIdRepr<T::AccountId> {
- fn from(v: BasicCrossAccountId<T>) -> Self {
- if v.from_ethereum {
- BasicCrossAccountIdRepr::Ethereum(*v.as_eth())
- } else {
- BasicCrossAccountIdRepr::Substrate(v.as_sub().clone())
- }
- }
-}
pallets/common/src/lib.rsdiffbeforeafterboth--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -19,7 +19,7 @@
use core::ops::{Deref, DerefMut};
use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
use sp_std::vec::Vec;
-use account::CrossAccountId;
+use pallet_evm::account::CrossAccountId;
use frame_support::{
dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo},
ensure, fail,
@@ -38,7 +38,6 @@
pub use pallet::*;
use sp_core::H160;
use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};
-pub mod account;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
pub mod erc;
@@ -163,19 +162,16 @@
pub mod pallet {
use super::*;
use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key};
- use account::CrossAccountId;
+ use pallet_evm::account;
use frame_support::traits::Currency;
use up_data_structs::TokenId;
use scale_info::TypeInfo;
#[pallet::config]
- pub trait Config: frame_system::Config + pallet_evm_coder_substrate::Config + TypeInfo {
+ pub trait Config:
+ frame_system::Config + pallet_evm_coder_substrate::Config + TypeInfo + account::Config
+ {
type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;
-
- type CrossAccountId: CrossAccountId<Self::AccountId>;
-
- type EvmAddressMapping: pallet_evm::AddressMapping<Self::AccountId>;
- type EvmBackwardsAddressMapping: up_evm_mapping::EvmBackwardsAddressMapping<Self::AccountId>;
type Currency: Currency<Self::AccountId>;
pallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -5,24 +5,24 @@
edition = "2021"
[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-ethereum = { version = "0.11.1", default-features = false }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+ethereum = { version = "0.12.0", default-features = false }
evm-coder = { default-features = false, path = "../../crates/evm-coder" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[features]
default = ["std"]
pallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -5,25 +5,26 @@
edition = "2021"
[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.17' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }
log = "0.4.14"
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[features]
default = ["std"]
pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -17,14 +17,17 @@
use core::marker::PhantomData;
use evm_coder::{abi::AbiWriter, execution::Result, generate_stubgen, solidity_interface, types::*};
use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
-use pallet_evm::{ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure};
+use pallet_evm::{
+ ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure,
+ account::CrossAccountId,
+};
use sp_core::H160;
use crate::{
AllowlistEnabled, Config, Owner, Pallet, SponsorBasket, SponsoringRateLimit, SponsoringModeT,
};
use frame_support::traits::Get;
use up_sponsorship::SponsorshipHandler;
-use sp_std::{convert::TryInto, vec::Vec};
+use sp_std::vec::Vec;
struct ContractHelpers<T: Config>(SubstrateRecorder<T>);
impl<T: Config> WithRecorder<T> for ContractHelpers<T> {
@@ -177,18 +180,21 @@
}
pub struct HelpersContractSponsoring<T: Config>(PhantomData<*const T>);
-impl<T: Config> SponsorshipHandler<H160, (H160, Vec<u8>)> for HelpersContractSponsoring<T> {
- fn get_sponsor(who: &H160, call: &(H160, Vec<u8>)) -> Option<H160> {
+impl<T: Config> SponsorshipHandler<T::CrossAccountId, (H160, Vec<u8>)>
+ for HelpersContractSponsoring<T>
+{
+ fn get_sponsor(who: &T::CrossAccountId, call: &(H160, Vec<u8>)) -> Option<T::CrossAccountId> {
let mode = <Pallet<T>>::sponsoring_mode(call.0);
if mode == SponsoringModeT::Disabled {
return None;
}
- if mode == SponsoringModeT::Allowlisted && !<Pallet<T>>::allowed(call.0, *who) {
+
+ if mode == SponsoringModeT::Allowlisted && !<Pallet<T>>::allowed(call.0, *who.as_eth()) {
return None;
}
let block_number = <frame_system::Pallet<T>>::block_number() as T::BlockNumber;
- if let Some(last_tx_block) = <SponsorBasket<T>>::get(&call.0, who) {
+ if let Some(last_tx_block) = <SponsorBasket<T>>::get(&call.0, who.as_eth()) {
let limit = <SponsoringRateLimit<T>>::get(&call.0);
let timeout = last_tx_block + limit;
@@ -197,9 +203,10 @@
}
}
- <SponsorBasket<T>>::insert(&call.0, who, block_number);
+ <SponsorBasket<T>>::insert(&call.0, who.as_eth(), block_number);
- Some(call.0)
+ let sponsor = T::CrossAccountId::from_eth(call.0);
+ Some(sponsor)
}
}
pallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -30,7 +30,9 @@
use sp_core::H160;
#[pallet::config]
- pub trait Config: frame_system::Config + pallet_evm_coder_substrate::Config {
+ pub trait Config:
+ frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::account::Config
+ {
type ContractAddress: Get<H160>;
type DefaultSponsoringRateLimit: Get<Self::BlockNumber>;
}
pallets/evm-migration/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -5,24 +5,24 @@
edition = "2021"
[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[features]
default = ["std", "runtime-benchmarks"]
pallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -5,26 +5,26 @@
edition = "2021"
[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.17' }
-up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[features]
default = ["std"]
@@ -39,5 +39,5 @@
"pallet-ethereum/std",
"fp-evm/std",
"up-sponsorship/std",
- "up-evm-mapping/std",
+ "fp-evm-mapping/std",
]
pallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-transaction-payment/src/lib.rs
+++ b/pallets/evm-transaction-payment/src/lib.rs
@@ -20,12 +20,10 @@
use fp_evm::WithdrawReason;
use frame_support::traits::{Currency, IsSubType};
pub use pallet::*;
-use pallet_evm::{EVMCurrencyAdapter, EnsureAddressOrigin};
+use pallet_evm::{EVMCurrencyAdapter, EnsureAddressOrigin, account::CrossAccountId};
use sp_core::{H160, U256};
use sp_runtime::TransactionOutcome;
use up_sponsorship::SponsorshipHandler;
-use up_evm_mapping::EvmBackwardsAddressMapping;
-use pallet_evm::AddressMapping;
#[frame_support::pallet]
pub mod pallet {
@@ -35,11 +33,9 @@
use sp_std::vec::Vec;
#[pallet::config]
- pub trait Config: frame_system::Config {
- type EvmSponsorshipHandler: SponsorshipHandler<H160, (H160, Vec<u8>)>;
+ pub trait Config: frame_system::Config + pallet_evm::account::Config {
+ type EvmSponsorshipHandler: SponsorshipHandler<Self::CrossAccountId, (H160, Vec<u8>)>;
type Currency: Currency<Self::AccountId>;
- type EvmBackwardsAddressMapping: EvmBackwardsAddressMapping<Self::AccountId>;
- type EvmAddressMapping: AddressMapping<Self::AccountId>;
}
#[pallet::pallet]
@@ -60,14 +56,15 @@
}
pub struct TransactionValidityHack<T: Config>(PhantomData<*const T>);
-impl<T: Config> fp_evm::TransactionValidityHack for TransactionValidityHack<T> {
- fn who_pays_fee(origin: H160, reason: &WithdrawReason) -> Option<H160> {
+impl<T: Config> fp_evm::TransactionValidityHack<T::CrossAccountId> for TransactionValidityHack<T> {
+ fn who_pays_fee(origin: H160, reason: &WithdrawReason) -> Option<T::CrossAccountId> {
match reason {
WithdrawReason::Call { target, input } => {
// This method is only used for checking, we shouldn't touch storage in it
frame_support::storage::with_transaction(|| {
+ let origin_sub = T::CrossAccountId::from_eth(origin);
TransactionOutcome::Rollback(T::EvmSponsorshipHandler::get_sponsor(
- &origin,
+ &origin_sub,
&(*target, input.clone()),
))
})
@@ -85,33 +82,36 @@
type LiquidityInfo = Option<ChargeEvmLiquidityInfo<T>>;
fn withdraw_fee(
- who: &H160,
+ who: &T::CrossAccountId,
reason: WithdrawReason,
fee: U256,
) -> core::result::Result<Self::LiquidityInfo, pallet_evm::Error<T>> {
- let mut who_pays_fee = *who;
- if let WithdrawReason::Call { target, input } = &reason {
- who_pays_fee = T::EvmSponsorshipHandler::get_sponsor(who, &(*target, input.clone()))
- .unwrap_or(who_pays_fee);
- }
+ let who_pays_fee = if let WithdrawReason::Call { target, input } = &reason {
+ T::EvmSponsorshipHandler::get_sponsor(who, &(*target, input.clone()))
+ .unwrap_or(who.clone())
+ } else {
+ who.clone()
+ };
+
let negative_imbalance = EVMCurrencyAdapter::<<T as Config>::Currency, ()>::withdraw_fee(
&who_pays_fee,
reason,
fee,
)?;
+
Ok(negative_imbalance.map(|i| ChargeEvmLiquidityInfo {
- who: who_pays_fee,
+ who: who_pays_fee.as_eth().clone(),
negative_imbalance: i,
}))
}
fn correct_and_deposit_fee(
- who: &H160,
+ who: &T::CrossAccountId,
corrected_fee: U256,
already_withdrawn: Self::LiquidityInfo,
) {
<EVMCurrencyAdapter<<T as Config>::Currency, ()> as pallet_evm::OnChargeEVMTransaction<T>>::correct_and_deposit_fee(
- &already_withdrawn.as_ref().map(|e| e.who).unwrap_or(*who),
+ &already_withdrawn.as_ref().map(|e| T::CrossAccountId::from_eth(e.who)).unwrap_or(who.clone()),
corrected_fee,
already_withdrawn.map(|e| e.negative_imbalance),
)
@@ -142,7 +142,7 @@
<frame_system::RawOrigin<T::AccountId>>::Signed(who.clone()).into(),
)
.ok()?;
- let who = T::EvmBackwardsAddressMapping::from_account_id(who.clone());
+ let who = T::CrossAccountId::from_sub(who.clone());
// Effects from EvmSponsorshipHandler are applied in OnChargeEvmTransaction by pallet_evm::runner
// TODO: Should we implement simulation mode (test, but do not apply effects) in `up-sponsorship`?
let sponsor = frame_support::storage::with_transaction(|| {
@@ -151,8 +151,7 @@
&(*target, input.clone()),
))
})?;
- let sponsor = T::EvmAddressMapping::into_account_id(sponsor);
- Some(sponsor)
+ Some(sponsor.as_sub().clone())
}
_ => None,
}
pallets/fungible/Cargo.tomldiffbeforeafterboth--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -8,21 +8,22 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.0.0'
+version = '3.1.2'
[dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
pallet-common = { default-features = false, path = '../common' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }
-ethereum = { version = "0.11.1", default-features = false }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-scale-info = { version = "1.0.0", default-features = false, features = [
+ethereum = { version = "0.12.0", default-features = false }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
@@ -39,5 +40,6 @@
"ethereum/std",
"pallet-evm-coder-substrate/std",
'frame-benchmarking/std',
+ "pallet-evm/std"
]
runtime-benchmarks = ['frame-benchmarking', 'pallet-common/runtime-benchmarks']
pallets/fungible/src/erc.rsdiffbeforeafterboth--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -21,7 +21,7 @@
use pallet_common::erc::{CommonEvmHandler, PrecompileResult};
use sp_core::{H160, U256};
use sp_std::vec::Vec;
-use pallet_common::account::CrossAccountId;
+use pallet_evm::account::CrossAccountId;
use pallet_evm_coder_substrate::{call, dispatch_to_evm};
use crate::{
pallets/fungible/src/lib.rsdiffbeforeafterboth--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -19,9 +19,8 @@
use core::ops::Deref;
use frame_support::{ensure};
use up_data_structs::{AccessMode, CollectionId, TokenId, CreateCollectionData};
-use pallet_common::{
- Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,
-};
+use pallet_common::{Error as CommonError, Event as CommonEvent, Pallet as PalletCommon};
+use pallet_evm::account::CrossAccountId;
use pallet_evm_coder_substrate::WithRecorder;
use sp_core::H160;
use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};
@@ -36,7 +35,7 @@
pub mod erc;
pub mod weights;
-pub type CreateItemData<T> = (<T as pallet_common::Config>::CrossAccountId, u128);
+pub type CreateItemData<T> = (<T as pallet_evm::account::Config>::CrossAccountId, u128);
pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
#[frame_support::pallet]
pallets/inflation/Cargo.tomldiffbeforeafterboth--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -37,43 +37,43 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[dependencies.frame-benchmarking]
default-features = false
optional = true
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.serde]
default-features = false
@@ -83,17 +83,19 @@
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
+scale-info = { version = "2.0.1", default-features = false, features = [
+ "derive",
+] }
pallets/nonfungible/Cargo.tomldiffbeforeafterboth--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -8,21 +8,22 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.0.0'
+version = '3.1.2'
[dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
pallet-common = { default-features = false, path = '../common' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../evm-coder-substrate' }
-ethereum = { version = "0.11.1", default-features = false }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-scale-info = { version = "1.0.0", default-features = false, features = [
+ethereum = { version = "0.12.0", default-features = false }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
@@ -39,6 +40,7 @@
"ethereum/std",
"pallet-evm-coder-substrate/std",
'frame-benchmarking/std',
+ "pallet-evm/std"
]
runtime-benchmarks = [
'frame-benchmarking',
pallets/nonfungible/src/erc.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -25,9 +25,9 @@
use sp_core::{H160, U256};
use sp_std::{vec::Vec, vec};
use pallet_common::{
- account::CrossAccountId,
erc::{CommonEvmHandler, PrecompileResult},
};
+use pallet_evm::account::CrossAccountId;
use pallet_evm_coder_substrate::call;
use crate::{
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -21,9 +21,8 @@
use up_data_structs::{
AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,
};
-use pallet_common::{
- Error as CommonError, Pallet as PalletCommon, Event as CommonEvent, account::CrossAccountId,
-};
+use pallet_common::{Error as CommonError, Pallet as PalletCommon, Event as CommonEvent};
+use pallet_evm::account::CrossAccountId;
use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
use sp_core::H160;
use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};
@@ -40,7 +39,7 @@
pub mod erc;
pub mod weights;
-pub type CreateItemData<T> = CreateNftExData<<T as pallet_common::Config>::CrossAccountId>;
+pub type CreateItemData<T> = CreateNftExData<<T as pallet_evm::account::Config>::CrossAccountId>;
pub(crate) type SelfWeightOf<T> = <T as Config>::WeightInfo;
#[derive(Encode, Decode, TypeInfo, MaxEncodedLen)]
pallets/refungible/Cargo.tomldiffbeforeafterboth--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -8,18 +8,19 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.0.0'
+version = '3.1.2'
[dependencies]
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
pallet-common = { default-features = false, path = '../common' }
up-data-structs = { default-features = false, path = '../../primitives/data-structs' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-scale-info = { version = "1.0.0", default-features = false, features = [
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
@@ -33,6 +34,7 @@
"up-data-structs/std",
"pallet-common/std",
'frame-benchmarking/std',
+ "pallet-evm/std",
]
runtime-benchmarks = [
'frame-benchmarking',
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -21,9 +21,8 @@
AccessMode, CollectionId, CustomDataLimit, MAX_REFUNGIBLE_PIECES, TokenId,
CreateCollectionData, CreateRefungibleExData,
};
-use pallet_common::{
- Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, account::CrossAccountId,
-};
+use pallet_common::{Error as CommonError, Event as CommonEvent, Pallet as PalletCommon};
+use pallet_evm::account::CrossAccountId;
use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};
use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap};
use core::ops::Deref;
pallets/scheduler/Cargo.tomldiffbeforeafterboth--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -11,21 +11,23 @@
[dependencies]
serde = { version = "1.0.130", default-features = false }
-codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false }
-scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false }
+scale-info = { version = "2.0.1", default-features = false, features = [
+ "derive",
+] }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.17' }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }
log = { version = "0.4.14", default-features = false }
[dev-dependencies]
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-substrate-test-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+substrate-test-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
[features]
default = ["std"]
pallets/unique/Cargo.tomldiffbeforeafterboth--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -34,7 +34,7 @@
'fp-evm/std',
'up-data-structs/std',
'up-sponsorship/std',
- 'up-evm-mapping/std',
+ 'fp-evm-mapping/std',
'sp-std/std',
'sp-api/std',
'sp-runtime/std',
@@ -55,48 +55,48 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[dependencies.frame-benchmarking]
default-features = false
optional = true
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.serde]
default-features = false
@@ -106,17 +106,17 @@
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
################################################################################
@@ -124,24 +124,24 @@
[dependencies]
up-data-structs = { default-features = false, path = "../../primitives/data-structs" }
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
-ethereum = { version = "0.11.1", default-features = false }
+ethereum = { version = "0.12.0", default-features = false }
rlp = { default-features = false, version = "0.5.0" }
-sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.17" }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.18" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.17' }
-up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18' }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
evm-coder = { default-features = false, path = "../../crates/evm-coder" }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
-primitive-types = { version = "0.10.1", default-features = false, features = [
+primitive-types = { version = "0.11.1", default-features = false, features = [
"serde_no_std",
] }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
hex-literal = "0.3.3"
pallet-common = { default-features = false, path = "../common" }
pallets/unique/src/eth/sponsoring.rsdiffbeforeafterboth--- a/pallets/unique/src/eth/sponsoring.rs
+++ b/pallets/unique/src/eth/sponsoring.rs
@@ -24,24 +24,24 @@
use up_sponsorship::SponsorshipHandler;
use core::marker::PhantomData;
use core::convert::TryInto;
-use up_data_structs::TokenId;
-use up_evm_mapping::EvmBackwardsAddressMapping;
-use pallet_common::account::CrossAccountId;
+use pallet_evm::account::CrossAccountId;
-use pallet_nonfungible::erc::{UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721Call};
+use pallet_nonfungible::erc::{
+ UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721MintableCall, ERC721Call,
+};
use pallet_fungible::erc::{UniqueFungibleCall, ERC20Call};
+use up_data_structs::{TokenId, CreateItemData, CreateNftData};
pub struct UniqueEthSponsorshipHandler<T: Config>(PhantomData<*const T>);
-impl<T: Config> SponsorshipHandler<H160, (H160, Vec<u8>)> for UniqueEthSponsorshipHandler<T> {
- fn get_sponsor(who: &H160, call: &(H160, Vec<u8>)) -> Option<H160> {
+impl<T: Config> SponsorshipHandler<T::CrossAccountId, (H160, Vec<u8>)>
+ for UniqueEthSponsorshipHandler<T>
+{
+ fn get_sponsor(who: &T::CrossAccountId, call: &(H160, Vec<u8>)) -> Option<T::CrossAccountId> {
let collection_id = map_eth_to_id(&call.0)?;
let collection = <CollectionHandle<T>>::new(collection_id)?;
let sponsor = collection.sponsorship.sponsor()?.clone();
- let sponsor =
- <T as pallet_common::Config>::EvmBackwardsAddressMapping::from_account_id(sponsor);
- let who = T::CrossAccountId::from_eth(*who);
let (method_id, mut reader) = AbiReader::new_call(&call.1).ok()?;
- match &collection.mode {
+ Some(T::CrossAccountId::from_sub(match &collection.mode {
crate::CollectionMode::NFT => {
let call = <UniqueNFTCall<T>>::parse(method_id, &mut reader).ok()??;
match call {
@@ -51,6 +51,18 @@
let token_id: TokenId = token_id.try_into().ok()?;
withdraw_transfer::<T>(&collection, &who, &token_id).map(|()| sponsor)
}
+ UniqueNFTCall::ERC721Mintable(
+ ERC721MintableCall::Mint { token_id, .. }
+ | ERC721MintableCall::MintWithTokenUri { token_id, .. },
+ ) => {
+ let _token_id: TokenId = token_id.try_into().ok()?;
+ withdraw_create_item::<T>(
+ &collection,
+ &who,
+ &CreateItemData::NFT(CreateNftData::default()),
+ )
+ .map(|()| sponsor)
+ }
UniqueNFTCall::ERC721(ERC721Call::TransferFrom { token_id, from, .. }) => {
let token_id: TokenId = token_id.try_into().ok()?;
let from = T::CrossAccountId::from_eth(from);
@@ -69,7 +81,7 @@
#[allow(clippy::single_match)]
match call {
UniqueFungibleCall::ERC20(ERC20Call::Transfer { .. }) => {
- withdraw_transfer::<T>(&collection, &who, &TokenId::default())
+ withdraw_transfer::<T>(&collection, who, &TokenId::default())
.map(|()| sponsor)
}
UniqueFungibleCall::ERC20(ERC20Call::TransferFrom { from, .. }) => {
@@ -85,6 +97,6 @@
}
}
_ => None,
- }
+ }?))
}
}
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -53,10 +53,8 @@
CollectionMode, TokenId, SchemaVersion, SponsorshipState, MetaUpdatePermission,
CreateCollectionData, CustomDataLimit, CreateItemExData,
};
-use pallet_common::{
- account::CrossAccountId, CollectionHandle, Pallet as PalletCommon, Error as CommonError,
- CommonWeightInfo,
-};
+use pallet_common::{CollectionHandle, Pallet as PalletCommon, Error as CommonError, CommonWeightInfo};
+use pallet_evm::account::CrossAccountId;
use pallet_refungible::{Pallet as PalletRefungible, RefungibleHandle};
use pallet_fungible::{Pallet as PalletFungible, FungibleHandle};
use pallet_nonfungible::{Pallet as PalletNonfungible, NonfungibleHandle};
@@ -116,7 +114,7 @@
pub enum Event<T>
where
<T as frame_system::Config>::AccountId,
- <T as pallet_common::Config>::CrossAccountId,
+ <T as pallet_evm::account::Config>::CrossAccountId,
{
/// Collection sponsor was removed
///
pallets/unique/src/mock.rsdiffbeforeafterboth--- a/pallets/unique/src/mock.rs
+++ b/pallets/unique/src/mock.rs
@@ -25,8 +25,8 @@
};
use pallet_transaction_payment::{CurrencyAdapter};
use frame_system as system;
-use pallet_evm::{AddressMapping, runner::stack::MaybeMirroredLog};
-use pallet_common::account::{EvmBackwardsAddressMapping, CrossAccountId};
+use pallet_evm::{AddressMapping, runner::stack::MaybeMirroredLog, account::CrossAccountId};
+use fp_evm_mapping::EvmBackwardsAddressMapping;
use codec::{Encode, Decode, MaxEncodedLen};
use scale_info::TypeInfo;
use up_data_structs::ConstU32;
@@ -191,15 +191,17 @@
impl pallet_common::Config for Test {
type Event = ();
- type EvmBackwardsAddressMapping = TestEvmBackwardsAddressMapping;
- type EvmAddressMapping = TestEvmAddressMapping;
- type CrossAccountId = TestCrossAccountId;
-
type Currency = Balances;
type CollectionCreationPrice = CollectionCreationPrice;
type TreasuryAccountId = TreasuryAccountId;
}
+impl pallet_evm::account::Config for Test {
+ type CrossAccountId = TestCrossAccountId;
+ type EvmAddressMapping = TestEvmAddressMapping;
+ type EvmBackwardsAddressMapping = TestEvmBackwardsAddressMapping;
+}
+
impl pallet_fungible::Config for Test {
type WeightInfo = ();
}
pallets/unique/src/sponsorship.rsdiffbeforeafterboth--- a/pallets/unique/src/sponsorship.rs
+++ b/pallets/unique/src/sponsorship.rs
@@ -30,7 +30,7 @@
NFT_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, TokenId,
};
use pallet_common::{CollectionHandle};
-use pallet_common::account::CrossAccountId;
+use pallet_evm::account::CrossAccountId;
pub fn withdraw_transfer<T: Config>(
collection: &CollectionHandle<T>,
@@ -103,7 +103,7 @@
pub fn withdraw_create_item<T: Config>(
collection: &CollectionHandle<T>,
- who: &T::AccountId,
+ who: &T::CrossAccountId,
_properties: &CreateItemData,
) -> Option<()> {
if _properties.data_size() as u32 > collection.limits.sponsored_data_size() {
@@ -120,14 +120,14 @@
CreateItemData::ReFungible(_) => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,
});
- if let Some(last_tx_block) = <CreateItemBasket<T>>::get((collection.id, &who)) {
+ if let Some(last_tx_block) = <CreateItemBasket<T>>::get((collection.id, who.as_sub())) {
let timeout = last_tx_block + limit.into();
if block_number < timeout {
return None;
}
}
- CreateItemBasket::<T>::insert((collection.id, who.clone()), block_number);
+ CreateItemBasket::<T>::insert((collection.id, who.as_sub()), block_number);
Some(())
}
@@ -246,7 +246,12 @@
..
} => {
let (sponsor, collection) = load(*collection_id)?;
- withdraw_create_item::<T>(&collection, who, data).map(|()| sponsor)
+ withdraw_create_item::<T>(
+ &collection,
+ &T::CrossAccountId::from_sub(who.clone()),
+ data,
+ )
+ .map(|()| sponsor)
}
Call::transfer {
collection_id,
pallets/unique/src/tests.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617// Tests to be written here18use super::*;19use crate::mock::*;20use crate::{AccessMode, CollectionMode};21use up_data_structs::{22 COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,23 CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,24 TokenId, MAX_TOKEN_OWNERSHIP,25};26use frame_support::{assert_noop, assert_ok, assert_err};27use sp_std::convert::TryInto;28use pallet_balances;2930fn add_balance(user: u64, value: u64) {31 const DONOR_USER: u64 = 999;32 assert_ok!(<pallet_balances::Pallet<Test>>::set_balance(33 Origin::root(),34 DONOR_USER,35 value,36 037 ));38 assert_ok!(<pallet_balances::Pallet<Test>>::force_transfer(39 Origin::root(),40 DONOR_USER,41 user,42 value43 ));44}4546fn default_nft_data() -> CreateNftData {47 CreateNftData {48 const_data: vec![1, 2, 3].try_into().unwrap(),49 variable_data: vec![3, 2, 1].try_into().unwrap(),50 }51}5253fn default_fungible_data() -> CreateFungibleData {54 CreateFungibleData { value: 5 }55}5657fn default_re_fungible_data() -> CreateReFungibleData {58 CreateReFungibleData {59 const_data: vec![1, 2, 3].try_into().unwrap(),60 variable_data: vec![3, 2, 1].try_into().unwrap(),61 pieces: 1023,62 }63}6465fn create_test_collection_for_owner(66 mode: &CollectionMode,67 owner: u64,68 id: CollectionId,69) -> CollectionId {70 add_balance(owner, CollectionCreationPrice::get() as u64 + 1);7172 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();73 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();74 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();7576 let data: CreateCollectionData<u64> = CreateCollectionData {77 name: col_name1.try_into().unwrap(),78 description: col_desc1.try_into().unwrap(),79 token_prefix: token_prefix1.try_into().unwrap(),80 mode: mode.clone(),81 ..Default::default()82 };8384 let origin1 = Origin::signed(owner);85 assert_ok!(TemplateModule::create_collection_ex(origin1, data));8687 let saved_col_name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();88 let saved_description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();89 let saved_prefix: Vec<u8> = b"token_prefix1\0".to_vec();90 assert_eq!(91 <pallet_common::CollectionById<Test>>::get(id)92 .unwrap()93 .owner,94 owner95 );96 assert_eq!(97 <pallet_common::CollectionById<Test>>::get(id).unwrap().name,98 saved_col_name99 );100 assert_eq!(101 <pallet_common::CollectionById<Test>>::get(id).unwrap().mode,102 *mode103 );104 assert_eq!(105 <pallet_common::CollectionById<Test>>::get(id)106 .unwrap()107 .description,108 saved_description109 );110 assert_eq!(111 <pallet_common::CollectionById<Test>>::get(id)112 .unwrap()113 .token_prefix,114 saved_prefix115 );116 id117}118119fn create_test_collection(mode: &CollectionMode, id: CollectionId) -> CollectionId {120 create_test_collection_for_owner(&mode, 1, id)121}122123fn create_test_item(collection_id: CollectionId, data: &CreateItemData) {124 let origin1 = Origin::signed(1);125 assert_ok!(TemplateModule::create_item(126 origin1,127 collection_id,128 account(1),129 data.clone()130 ));131}132133fn account(sub: u64) -> TestCrossAccountId {134 TestCrossAccountId::from_sub(sub)135}136137// Use cases tests region138// #region139140#[test]141fn set_version_schema() {142 new_test_ext().execute_with(|| {143 let origin1 = Origin::signed(1);144 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));145146 assert_ok!(TemplateModule::set_schema_version(147 origin1,148 collection_id,149 SchemaVersion::Unique150 ));151 assert_eq!(152 <pallet_common::CollectionById<Test>>::get(collection_id)153 .unwrap()154 .schema_version,155 SchemaVersion::Unique156 );157 });158}159160#[test]161fn check_not_sufficient_founds() {162 new_test_ext().execute_with(|| {163 let acc: u64 = 1;164 <pallet_balances::Pallet<Test>>::set_balance(Origin::root(), acc, 0, 0).unwrap();165166 let name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();167 let description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();168 let token_prefix: Vec<u8> = b"token_prefix1\0".to_vec();169170 let data: CreateCollectionData<<Test as system::Config>::AccountId> =171 CreateCollectionData {172 name: name.try_into().unwrap(),173 description: description.try_into().unwrap(),174 token_prefix: token_prefix.try_into().unwrap(),175 mode: CollectionMode::NFT,176 ..Default::default()177 };178179 let result = TemplateModule::create_collection_ex(Origin::signed(acc), data);180 assert_err!(result, <CommonError<Test>>::NotSufficientFounds);181 });182}183184#[test]185fn create_fungible_collection_fails_with_large_decimal_numbers() {186 new_test_ext().execute_with(|| {187 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();188 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();189 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();190191 let data: CreateCollectionData<u64> = CreateCollectionData {192 name: col_name1.try_into().unwrap(),193 description: col_desc1.try_into().unwrap(),194 token_prefix: token_prefix1.try_into().unwrap(),195 mode: CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1),196 ..Default::default()197 };198199 let origin1 = Origin::signed(1);200 assert_noop!(201 TemplateModule::create_collection_ex(origin1, data),202 Error::<Test>::CollectionDecimalPointLimitExceeded203 );204 });205}206207#[test]208fn create_nft_item() {209 new_test_ext().execute_with(|| {210 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));211212 let data = default_nft_data();213 create_test_item(collection_id, &data.clone().into());214215 let item = <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1)).unwrap();216 assert_eq!(item.const_data, data.const_data.into_inner());217 assert_eq!(item.variable_data, data.variable_data.into_inner());218 });219}220221// Use cases tests region222// #region223#[test]224fn create_nft_multiple_items() {225 new_test_ext().execute_with(|| {226 create_test_collection(&CollectionMode::NFT, CollectionId(1));227228 let origin1 = Origin::signed(1);229230 let items_data = vec![default_nft_data(), default_nft_data(), default_nft_data()];231232 assert_ok!(TemplateModule::create_multiple_items(233 origin1,234 CollectionId(1),235 account(1),236 items_data237 .clone()238 .into_iter()239 .map(|d| { d.into() })240 .collect()241 ));242 for (index, data) in items_data.into_iter().enumerate() {243 let item = <pallet_nonfungible::TokenData<Test>>::get((244 CollectionId(1),245 TokenId((index + 1) as u32),246 ))247 .unwrap();248 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());249 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());250 }251 });252}253254#[test]255fn create_refungible_item() {256 new_test_ext().execute_with(|| {257 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));258259 let data = default_re_fungible_data();260 create_test_item(collection_id, &data.clone().into());261 let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));262 let balance =263 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1)));264 assert_eq!(item.const_data, data.const_data.into_inner());265 assert_eq!(item.variable_data, data.variable_data.into_inner());266 assert_eq!(balance, 1023);267 });268}269270#[test]271fn create_multiple_refungible_items() {272 new_test_ext().execute_with(|| {273 create_test_collection(&CollectionMode::ReFungible, CollectionId(1));274275 let origin1 = Origin::signed(1);276277 let items_data = vec![278 default_re_fungible_data(),279 default_re_fungible_data(),280 default_re_fungible_data(),281 ];282283 assert_ok!(TemplateModule::create_multiple_items(284 origin1,285 CollectionId(1),286 account(1),287 items_data288 .clone()289 .into_iter()290 .map(|d| { d.into() })291 .collect()292 ));293 for (index, data) in items_data.into_iter().enumerate() {294 let item = <pallet_refungible::TokenData<Test>>::get((295 CollectionId(1),296 TokenId((index + 1) as u32),297 ));298 let balance =299 <pallet_refungible::Balance<Test>>::get((CollectionId(1), TokenId(1), account(1)));300 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());301 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());302 assert_eq!(balance, 1023);303 }304 });305}306307#[test]308fn create_fungible_item() {309 new_test_ext().execute_with(|| {310 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));311312 let data = default_fungible_data();313 create_test_item(collection_id, &data.into());314315 assert_eq!(316 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),317 5318 );319 });320}321322//#[test]323// fn create_multiple_fungible_items() {324// new_test_ext().execute_with(|| {325// default_limits();326327// create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));328329// let origin1 = Origin::signed(1);330331// let items_data = vec![default_fungible_data(), default_fungible_data(), default_fungible_data()];332333// assert_ok!(TemplateModule::create_multiple_items(334// origin1.clone(),335// 1,336// 1,337// items_data.clone().into_iter().map(|d| { d.into() }).collect()338// ));339340// for (index, _) in items_data.iter().enumerate() {341// assert_eq!(TemplateModule::fungible_item_id(1, (index + 1) as TokenId).value, 5);342// }343// assert_eq!(TemplateModule::balance_count(1, 1), 3000);344// assert_eq!(TemplateModule::address_tokens(1, 1), [1, 2, 3]);345// });346// }347348#[test]349fn transfer_fungible_item() {350 new_test_ext().execute_with(|| {351 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));352353 let origin1 = Origin::signed(1);354 let origin2 = Origin::signed(2);355356 let data = default_fungible_data();357 create_test_item(collection_id, &data.into());358359 assert_eq!(360 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),361 5362 );363364 // change owner scenario365 assert_ok!(TemplateModule::transfer(366 origin1,367 account(2),368 CollectionId(1),369 TokenId(0),370 5371 ));372 assert_eq!(373 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),374 0375 );376377 // split item scenario378 assert_ok!(TemplateModule::transfer(379 origin2.clone(),380 account(3),381 CollectionId(1),382 TokenId(0),383 3384 ));385386 // split item and new owner has account scenario387 assert_ok!(TemplateModule::transfer(388 origin2,389 account(3),390 CollectionId(1),391 TokenId(0),392 1393 ));394 assert_eq!(395 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(2))),396 1397 );398 assert_eq!(399 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(3))),400 4401 );402 });403}404405#[test]406fn transfer_refungible_item() {407 new_test_ext().execute_with(|| {408 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));409410 // Create RFT 1 in 1023 pieces for account 1411 let data = default_re_fungible_data();412 create_test_item(collection_id, &data.clone().into());413 let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));414 assert_eq!(item.const_data, data.const_data.into_inner());415 assert_eq!(item.variable_data, data.variable_data.into_inner());416 assert_eq!(417 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),418 1419 );420 assert_eq!(421 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),422 1023423 );424 assert_eq!(425 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),426 true427 );428429 // Account 1 transfers all 1023 pieces of RFT 1 to account 2430 let origin1 = Origin::signed(1);431 let origin2 = Origin::signed(2);432 assert_ok!(TemplateModule::transfer(433 origin1,434 account(2),435 CollectionId(1),436 TokenId(1),437 1023438 ));439 assert_eq!(440 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),441 1023442 );443 assert_eq!(444 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),445 0446 );447 assert_eq!(448 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),449 1450 );451 assert_eq!(452 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),453 false454 );455 assert_eq!(456 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),457 true458 );459460 // Account 2 transfers 500 pieces of RFT 1 to account 3461 assert_ok!(TemplateModule::transfer(462 origin2.clone(),463 account(3),464 CollectionId(1),465 TokenId(1),466 500467 ));468 assert_eq!(469 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),470 523471 );472 assert_eq!(473 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),474 500475 );476 assert_eq!(477 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),478 1479 );480 assert_eq!(481 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),482 1483 );484 assert_eq!(485 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),486 true487 );488 assert_eq!(489 <pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),490 true491 );492493 // Account 2 transfers 200 more pieces of RFT 1 to account 3 with pre-existing balance494 assert_ok!(TemplateModule::transfer(495 origin2,496 account(3),497 CollectionId(1),498 TokenId(1),499 200500 ));501 assert_eq!(502 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),503 323504 );505 assert_eq!(506 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),507 700508 );509 assert_eq!(510 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),511 1512 );513 assert_eq!(514 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),515 1516 );517 assert_eq!(518 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),519 true520 );521 assert_eq!(522 <pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),523 true524 );525 });526}527528#[test]529fn transfer_nft_item() {530 new_test_ext().execute_with(|| {531 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));532533 let data = default_nft_data();534 create_test_item(collection_id, &data.into());535 assert_eq!(536 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),537 1538 );539 assert_eq!(540 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),541 true542 );543544 let origin1 = Origin::signed(1);545 // default scenario546 assert_ok!(TemplateModule::transfer(547 origin1,548 account(2),549 CollectionId(1),550 TokenId(1),551 1552 ));553 assert_eq!(554 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),555 0556 );557 assert_eq!(558 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),559 1560 );561 assert_eq!(562 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),563 false564 );565 assert_eq!(566 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),567 true568 );569 });570}571572#[test]573fn transfer_nft_item_wrong_value() {574 new_test_ext().execute_with(|| {575 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));576577 let data = default_nft_data();578 create_test_item(collection_id, &data.into());579 assert_eq!(580 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),581 1582 );583 assert_eq!(584 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),585 true586 );587588 let origin1 = Origin::signed(1);589590 assert_noop!(591 TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 2)592 .map_err(|e| e.error),593 <pallet_nonfungible::Error::<Test>>::NonfungibleItemsHaveNoAmount594 );595 });596}597598#[test]599fn transfer_nft_item_zero_value() {600 new_test_ext().execute_with(|| {601 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));602603 let data = default_nft_data();604 create_test_item(collection_id, &data.into());605 assert_eq!(606 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),607 1608 );609 assert_eq!(610 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),611 true612 );613614 let origin1 = Origin::signed(1);615616 // Transferring 0 amount works on NFT...617 assert_ok!(TemplateModule::transfer(618 origin1,619 account(2),620 CollectionId(1),621 TokenId(1),622 0623 ));624 // ... and results in no transfer625 assert_eq!(626 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),627 1628 );629 assert_eq!(630 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),631 true632 );633 });634}635636#[test]637fn nft_approve_and_transfer_from() {638 new_test_ext().execute_with(|| {639 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));640641 let data = default_nft_data();642 create_test_item(collection_id, &data.into());643644 let origin1 = Origin::signed(1);645 let origin2 = Origin::signed(2);646647 assert_eq!(648 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),649 1650 );651 assert_eq!(652 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),653 true654 );655656 // neg transfer_from657 assert_noop!(658 TemplateModule::transfer_from(659 origin2.clone(),660 account(1),661 account(2),662 CollectionId(1),663 TokenId(1),664 1665 )666 .map_err(|e| e.error),667 CommonError::<Test>::ApprovedValueTooLow668 );669670 // do approve671 assert_ok!(TemplateModule::approve(672 origin1,673 account(2),674 CollectionId(1),675 TokenId(1),676 1677 ));678 assert_eq!(679 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),680 account(2)681 );682683 assert_ok!(TemplateModule::transfer_from(684 origin2,685 account(1),686 account(3),687 CollectionId(1),688 TokenId(1),689 1690 ));691 assert!(692 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()693 );694 });695}696697#[test]698fn nft_approve_and_transfer_from_allow_list() {699 new_test_ext().execute_with(|| {700 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));701702 let origin1 = Origin::signed(1);703 let origin2 = Origin::signed(2);704705 // Create NFT 1 for account 1706 let data = default_nft_data();707 create_test_item(collection_id, &data.clone().into());708 assert_eq!(709 &<pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))710 .unwrap()711 .const_data,712 &data.const_data.into_inner()713 );714 assert_eq!(715 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),716 1717 );718 assert_eq!(719 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),720 true721 );722723 // Allow allow-list users to mint and add accounts 1, 2, and 3 to allow-list724 assert_ok!(TemplateModule::set_mint_permission(725 origin1.clone(),726 CollectionId(1),727 true728 ));729 assert_ok!(TemplateModule::set_public_access_mode(730 origin1.clone(),731 CollectionId(1),732 AccessMode::AllowList733 ));734 assert_ok!(TemplateModule::add_to_allow_list(735 origin1.clone(),736 CollectionId(1),737 account(1)738 ));739 assert_ok!(TemplateModule::add_to_allow_list(740 origin1.clone(),741 CollectionId(1),742 account(2)743 ));744 assert_ok!(TemplateModule::add_to_allow_list(745 origin1.clone(),746 CollectionId(1),747 account(3)748 ));749750 // Account 1 approves account 2 for NFT 1751 assert_ok!(TemplateModule::approve(752 origin1.clone(),753 account(2),754 CollectionId(1),755 TokenId(1),756 1757 ));758 assert_eq!(759 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),760 account(2)761 );762763 // Account 2 transfers NFT 1 from account 1 to account 3764 assert_ok!(TemplateModule::transfer_from(765 origin2,766 account(1),767 account(3),768 CollectionId(1),769 TokenId(1),770 1771 ));772 assert!(773 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()774 );775 });776}777778#[test]779fn refungible_approve_and_transfer_from() {780 new_test_ext().execute_with(|| {781 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));782783 let origin1 = Origin::signed(1);784 let origin2 = Origin::signed(2);785786 // Create RFT 1 in 1023 pieces for account 1787 let data = default_re_fungible_data();788 create_test_item(collection_id, &data.into());789790 assert_eq!(791 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),792 1793 );794 assert_eq!(795 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),796 1023797 );798 assert_eq!(799 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),800 true801 );802803 // Allow public minting, enable allow-list and add accounts 1, 2, 3 to allow-list804 assert_ok!(TemplateModule::set_mint_permission(805 origin1.clone(),806 CollectionId(1),807 true808 ));809 assert_ok!(TemplateModule::set_public_access_mode(810 origin1.clone(),811 CollectionId(1),812 AccessMode::AllowList813 ));814 assert_ok!(TemplateModule::add_to_allow_list(815 origin1.clone(),816 CollectionId(1),817 account(1)818 ));819 assert_ok!(TemplateModule::add_to_allow_list(820 origin1.clone(),821 CollectionId(1),822 account(2)823 ));824 assert_ok!(TemplateModule::add_to_allow_list(825 origin1.clone(),826 CollectionId(1),827 account(3)828 ));829830 // Account 1 approves account 2 for 1023 pieces of RFT 1831 assert_ok!(TemplateModule::approve(832 origin1,833 account(2),834 CollectionId(1),835 TokenId(1),836 1023837 ));838 assert_eq!(839 <pallet_refungible::Allowance<Test>>::get((840 CollectionId(1),841 TokenId(1),842 account(1),843 account(2)844 )),845 1023846 );847848 // Account 2 transfers 100 pieces of RFT 1 from account 1 to account 3849 assert_ok!(TemplateModule::transfer_from(850 origin2,851 account(1),852 account(3),853 CollectionId(1),854 TokenId(1),855 100856 ));857 assert_eq!(858 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),859 1860 );861 assert_eq!(862 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),863 1864 );865 assert_eq!(866 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),867 923868 );869 assert_eq!(870 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),871 100872 );873 assert_eq!(874 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),875 true876 );877 assert_eq!(878 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),879 true880 );881 assert_eq!(882 <pallet_refungible::Allowance<Test>>::get((883 CollectionId(1),884 TokenId(1),885 account(1),886 account(2)887 )),888 923889 );890 });891}892893#[test]894fn fungible_approve_and_transfer_from() {895 new_test_ext().execute_with(|| {896 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));897898 let data = default_fungible_data();899 create_test_item(collection_id, &data.into());900901 let origin1 = Origin::signed(1);902 let origin2 = Origin::signed(2);903904 assert_ok!(TemplateModule::set_mint_permission(905 origin1.clone(),906 CollectionId(1),907 true908 ));909 assert_ok!(TemplateModule::set_public_access_mode(910 origin1.clone(),911 CollectionId(1),912 AccessMode::AllowList913 ));914 assert_ok!(TemplateModule::add_to_allow_list(915 origin1.clone(),916 CollectionId(1),917 account(1)918 ));919 assert_ok!(TemplateModule::add_to_allow_list(920 origin1.clone(),921 CollectionId(1),922 account(2)923 ));924 assert_ok!(TemplateModule::add_to_allow_list(925 origin1.clone(),926 CollectionId(1),927 account(3)928 ));929930 // do approve931 assert_ok!(TemplateModule::approve(932 origin1.clone(),933 account(2),934 CollectionId(1),935 TokenId(0),936 5937 ));938 assert_eq!(939 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),940 5941 );942 assert_ok!(TemplateModule::approve(943 origin1,944 account(3),945 CollectionId(1),946 TokenId(0),947 5948 ));949 assert_eq!(950 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),951 5952 );953 assert_eq!(954 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(3))),955 5956 );957958 assert_ok!(TemplateModule::transfer_from(959 origin2.clone(),960 account(1),961 account(3),962 CollectionId(1),963 TokenId(0),964 4965 ));966967 assert_eq!(968 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),969 1970 );971972 assert_noop!(973 TemplateModule::transfer_from(974 origin2,975 account(1),976 account(3),977 CollectionId(1),978 TokenId(0),979 4980 )981 .map_err(|e| e.error),982 CommonError::<Test>::ApprovedValueTooLow983 );984 });985}986987#[test]988fn change_collection_owner() {989 new_test_ext().execute_with(|| {990 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));991992 let origin1 = Origin::signed(1);993 assert_ok!(TemplateModule::change_collection_owner(994 origin1,995 collection_id,996 2997 ));998 assert_eq!(999 <pallet_common::CollectionById<Test>>::get(collection_id)1000 .unwrap()1001 .owner,1002 21003 );1004 });1005}10061007#[test]1008fn destroy_collection() {1009 new_test_ext().execute_with(|| {1010 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10111012 let origin1 = Origin::signed(1);1013 assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));1014 });1015}10161017#[test]1018fn burn_nft_item() {1019 new_test_ext().execute_with(|| {1020 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10211022 let origin1 = Origin::signed(1);10231024 let data = default_nft_data();1025 create_test_item(collection_id, &data.into());10261027 // check balance (collection with id = 1, user id = 1)1028 assert_eq!(1029 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1030 11031 );10321033 // burn item1034 assert_ok!(TemplateModule::burn_item(1035 origin1.clone(),1036 collection_id,1037 TokenId(1),1038 11039 ));1040 assert_eq!(1041 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1042 01043 );1044 });1045}10461047#[test]1048fn burn_same_nft_item_twice() {1049 new_test_ext().execute_with(|| {1050 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10511052 let origin1 = Origin::signed(1);10531054 let data = default_nft_data();1055 create_test_item(collection_id, &data.into());10561057 // check balance (collection with id = 1, user id = 1)1058 assert_eq!(1059 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1060 11061 );10621063 // burn item1064 assert_ok!(TemplateModule::burn_item(1065 origin1.clone(),1066 collection_id,1067 TokenId(1),1068 11069 ));10701071 // burn item again1072 assert_noop!(1073 TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1).map_err(|e| e.error),1074 CommonError::<Test>::TokenNotFound1075 );10761077 assert_eq!(1078 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1079 01080 );1081 });1082}10831084#[test]1085fn burn_fungible_item() {1086 new_test_ext().execute_with(|| {1087 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));10881089 let origin1 = Origin::signed(1);1090 assert_ok!(TemplateModule::add_collection_admin(1091 origin1.clone(),1092 collection_id,1093 account(2)1094 ));10951096 let data = default_fungible_data();1097 create_test_item(collection_id, &data.into());10981099 // check balance (collection with id = 1, user id = 1)1100 assert_eq!(1101 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1102 51103 );11041105 // burn item1106 assert_ok!(TemplateModule::burn_item(1107 origin1.clone(),1108 CollectionId(1),1109 TokenId(0),1110 51111 ));1112 assert_noop!(1113 TemplateModule::burn_item(origin1, CollectionId(1), TokenId(0), 5).map_err(|e| e.error),1114 CommonError::<Test>::TokenValueTooLow1115 );11161117 assert_eq!(1118 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1119 01120 );1121 });1122}11231124#[test]1125fn burn_fungible_item_with_token_id() {1126 new_test_ext().execute_with(|| {1127 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));11281129 let origin1 = Origin::signed(1);1130 assert_ok!(TemplateModule::add_collection_admin(1131 origin1.clone(),1132 collection_id,1133 account(2)1134 ));11351136 let data = default_fungible_data();1137 create_test_item(collection_id, &data.into());11381139 // check balance (collection with id = 1, user id = 1)1140 assert_eq!(1141 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1142 51143 );11441145 // Try to burn item using Token ID1146 assert_noop!(1147 TemplateModule::burn_item(origin1, CollectionId(1), TokenId(1), 5).map_err(|e| e.error),1148 <pallet_fungible::Error::<Test>>::FungibleItemsHaveNoId1149 );1150 });1151}1152#[test]1153fn burn_refungible_item() {1154 new_test_ext().execute_with(|| {1155 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));1156 let origin1 = Origin::signed(1);11571158 assert_ok!(TemplateModule::set_mint_permission(1159 origin1.clone(),1160 collection_id,1161 true1162 ));1163 assert_ok!(TemplateModule::set_public_access_mode(1164 origin1.clone(),1165 collection_id,1166 AccessMode::AllowList1167 ));1168 assert_ok!(TemplateModule::add_to_allow_list(1169 origin1.clone(),1170 collection_id,1171 account(1)1172 ));11731174 assert_ok!(TemplateModule::add_collection_admin(1175 origin1.clone(),1176 collection_id,1177 account(2)1178 ));11791180 let data = default_re_fungible_data();1181 create_test_item(collection_id, &data.into());11821183 // check balance (collection with id = 1, user id = 2)1184 assert_eq!(1185 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),1186 11187 );1188 assert_eq!(1189 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1190 10231191 );11921193 // burn item1194 assert_ok!(TemplateModule::burn_item(1195 origin1.clone(),1196 collection_id,1197 TokenId(1),1198 10231199 ));1200 assert_noop!(1201 TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1023)1202 .map_err(|e| e.error),1203 CommonError::<Test>::TokenValueTooLow1204 );12051206 assert_eq!(1207 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1208 01209 );1210 });1211}12121213#[test]1214fn add_collection_admin() {1215 new_test_ext().execute_with(|| {1216 let collection1_id =1217 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1218 let origin1 = Origin::signed(1);12191220 // Add collection admins1221 assert_ok!(TemplateModule::add_collection_admin(1222 origin1.clone(),1223 collection1_id,1224 account(2)1225 ));1226 assert_ok!(TemplateModule::add_collection_admin(1227 origin1,1228 collection1_id,1229 account(3)1230 ));12311232 // Owner is not an admin by default1233 assert_eq!(1234 <pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(1))),1235 false1236 );1237 assert!(<pallet_common::IsAdmin<Test>>::get((1238 CollectionId(1),1239 account(2)1240 )));1241 assert!(<pallet_common::IsAdmin<Test>>::get((1242 CollectionId(1),1243 account(3)1244 )));1245 });1246}12471248#[test]1249fn remove_collection_admin() {1250 new_test_ext().execute_with(|| {1251 let collection1_id =1252 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1253 let origin1 = Origin::signed(1);1254 let origin2 = Origin::signed(2);12551256 // Add collection admins 2 and 31257 assert_ok!(TemplateModule::add_collection_admin(1258 origin1.clone(),1259 collection1_id,1260 account(2)1261 ));1262 assert_ok!(TemplateModule::add_collection_admin(1263 origin1,1264 collection1_id,1265 account(3)1266 ));12671268 assert!(<pallet_common::IsAdmin<Test>>::get((1269 CollectionId(1),1270 account(2)1271 )));1272 assert!(<pallet_common::IsAdmin<Test>>::get((1273 CollectionId(1),1274 account(3)1275 )));12761277 // remove admin 31278 assert_ok!(TemplateModule::remove_collection_admin(1279 origin2,1280 CollectionId(1),1281 account(3)1282 ));12831284 // 2 is still admin, 3 is not an admin anymore1285 assert!(<pallet_common::IsAdmin<Test>>::get((1286 CollectionId(1),1287 account(2)1288 )));1289 assert_eq!(1290 <pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(3))),1291 false1292 );1293 });1294}12951296#[test]1297fn balance_of() {1298 new_test_ext().execute_with(|| {1299 let nft_collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1300 let fungible_collection_id =1301 create_test_collection(&CollectionMode::Fungible(3), CollectionId(2));1302 let re_fungible_collection_id =1303 create_test_collection(&CollectionMode::ReFungible, CollectionId(3));13041305 // check balance before1306 assert_eq!(1307 <pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1308 01309 );1310 assert_eq!(1311 <pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1312 01313 );1314 assert_eq!(1315 <pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1316 01317 );13181319 let nft_data = default_nft_data();1320 create_test_item(nft_collection_id, &nft_data.into());13211322 let fungible_data = default_fungible_data();1323 create_test_item(fungible_collection_id, &fungible_data.into());13241325 let re_fungible_data = default_re_fungible_data();1326 create_test_item(re_fungible_collection_id, &re_fungible_data.into());13271328 // check balance (collection with id = 1, user id = 1)1329 assert_eq!(1330 <pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1331 11332 );1333 assert_eq!(1334 <pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1335 51336 );1337 assert_eq!(1338 <pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1339 11340 );13411342 assert_eq!(1343 <pallet_nonfungible::Owned<Test>>::get((nft_collection_id, account(1), TokenId(1))),1344 true1345 );1346 assert_eq!(1347 <pallet_refungible::Owned<Test>>::get((1348 re_fungible_collection_id,1349 account(1),1350 TokenId(1)1351 )),1352 true1353 );1354 });1355}13561357#[test]1358fn approve() {1359 new_test_ext().execute_with(|| {1360 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));13611362 let data = default_nft_data();1363 create_test_item(collection_id, &data.into());13641365 let origin1 = Origin::signed(1);13661367 // approve1368 assert_ok!(TemplateModule::approve(1369 origin1,1370 account(2),1371 CollectionId(1),1372 TokenId(1),1373 11374 ));1375 assert_eq!(1376 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1377 account(2)1378 );1379 });1380}13811382#[test]1383fn transfer_from() {1384 new_test_ext().execute_with(|| {1385 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1386 let origin1 = Origin::signed(1);1387 let origin2 = Origin::signed(2);13881389 let data = default_nft_data();1390 create_test_item(collection_id, &data.into());13911392 // approve1393 assert_ok!(TemplateModule::approve(1394 origin1.clone(),1395 account(2),1396 CollectionId(1),1397 TokenId(1),1398 11399 ));1400 assert_eq!(1401 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1402 account(2)1403 );14041405 assert_ok!(TemplateModule::set_mint_permission(1406 origin1.clone(),1407 CollectionId(1),1408 true1409 ));1410 assert_ok!(TemplateModule::set_public_access_mode(1411 origin1.clone(),1412 CollectionId(1),1413 AccessMode::AllowList1414 ));1415 assert_ok!(TemplateModule::add_to_allow_list(1416 origin1.clone(),1417 CollectionId(1),1418 account(1)1419 ));1420 assert_ok!(TemplateModule::add_to_allow_list(1421 origin1.clone(),1422 CollectionId(1),1423 account(2)1424 ));1425 assert_ok!(TemplateModule::add_to_allow_list(1426 origin1,1427 CollectionId(1),1428 account(3)1429 ));14301431 assert_ok!(TemplateModule::transfer_from(1432 origin2,1433 account(1),1434 account(2),1435 CollectionId(1),1436 TokenId(1),1437 11438 ));14391440 // after transfer1441 assert_eq!(1442 <pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(1))),1443 01444 );1445 assert_eq!(1446 <pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(2))),1447 11448 );1449 });1450}14511452// #endregion14531454// Coverage tests region1455// #region14561457#[test]1458fn owner_can_add_address_to_allow_list() {1459 new_test_ext().execute_with(|| {1460 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14611462 let origin1 = Origin::signed(1);1463 assert_ok!(TemplateModule::add_to_allow_list(1464 origin1,1465 collection_id,1466 account(2)1467 ));1468 assert!(<pallet_common::Allowlist<Test>>::get((1469 collection_id,1470 account(2)1471 )));1472 });1473}14741475#[test]1476fn admin_can_add_address_to_allow_list() {1477 new_test_ext().execute_with(|| {1478 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1479 let origin1 = Origin::signed(1);1480 let origin2 = Origin::signed(2);14811482 assert_ok!(TemplateModule::add_collection_admin(1483 origin1,1484 collection_id,1485 account(2)1486 ));1487 assert_ok!(TemplateModule::add_to_allow_list(1488 origin2,1489 collection_id,1490 account(3)1491 ));1492 assert!(<pallet_common::Allowlist<Test>>::get((1493 collection_id,1494 account(3)1495 )));1496 });1497}14981499#[test]1500fn nonprivileged_user_cannot_add_address_to_allow_list() {1501 new_test_ext().execute_with(|| {1502 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15031504 let origin2 = Origin::signed(2);1505 assert_noop!(1506 TemplateModule::add_to_allow_list(origin2, collection_id, account(3)),1507 CommonError::<Test>::NoPermission1508 );1509 });1510}15111512#[test]1513fn nobody_can_add_address_to_allow_list_of_nonexisting_collection() {1514 new_test_ext().execute_with(|| {1515 let origin1 = Origin::signed(1);15161517 assert_noop!(1518 TemplateModule::add_to_allow_list(origin1, CollectionId(1), account(2)),1519 CommonError::<Test>::CollectionNotFound1520 );1521 });1522}15231524#[test]1525fn nobody_can_add_address_to_allow_list_of_deleted_collection() {1526 new_test_ext().execute_with(|| {1527 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15281529 let origin1 = Origin::signed(1);1530 assert_ok!(TemplateModule::destroy_collection(1531 origin1.clone(),1532 collection_id1533 ));1534 assert_noop!(1535 TemplateModule::add_to_allow_list(origin1, collection_id, account(2)),1536 CommonError::<Test>::CollectionNotFound1537 );1538 });1539}15401541// If address is already added to allow list, nothing happens1542#[test]1543fn address_is_already_added_to_allow_list() {1544 new_test_ext().execute_with(|| {1545 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1546 let origin1 = Origin::signed(1);15471548 assert_ok!(TemplateModule::add_to_allow_list(1549 origin1.clone(),1550 collection_id,1551 account(2)1552 ));1553 assert_ok!(TemplateModule::add_to_allow_list(1554 origin1,1555 collection_id,1556 account(2)1557 ));1558 assert!(<pallet_common::Allowlist<Test>>::get((1559 collection_id,1560 account(2)1561 )));1562 });1563}15641565#[test]1566fn owner_can_remove_address_from_allow_list() {1567 new_test_ext().execute_with(|| {1568 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15691570 let origin1 = Origin::signed(1);1571 assert_ok!(TemplateModule::add_to_allow_list(1572 origin1.clone(),1573 collection_id,1574 account(2)1575 ));1576 assert_ok!(TemplateModule::remove_from_allow_list(1577 origin1,1578 collection_id,1579 account(2)1580 ));1581 assert_eq!(1582 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1583 false1584 );1585 });1586}15871588#[test]1589fn admin_can_remove_address_from_allow_list() {1590 new_test_ext().execute_with(|| {1591 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1592 let origin1 = Origin::signed(1);1593 let origin2 = Origin::signed(2);15941595 // Owner adds admin1596 assert_ok!(TemplateModule::add_collection_admin(1597 origin1.clone(),1598 collection_id,1599 account(2)1600 ));16011602 // Owner adds address 3 to allow list1603 assert_ok!(TemplateModule::add_to_allow_list(1604 origin1,1605 collection_id,1606 account(3)1607 ));16081609 // Admin removes address 3 from allow list1610 assert_ok!(TemplateModule::remove_from_allow_list(1611 origin2,1612 collection_id,1613 account(3)1614 ));1615 assert_eq!(1616 <pallet_common::Allowlist<Test>>::get((collection_id, account(3))),1617 false1618 );1619 });1620}16211622#[test]1623fn nonprivileged_user_cannot_remove_address_from_allow_list() {1624 new_test_ext().execute_with(|| {1625 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1626 let origin1 = Origin::signed(1);1627 let origin2 = Origin::signed(2);16281629 assert_ok!(TemplateModule::add_to_allow_list(1630 origin1,1631 collection_id,1632 account(2)1633 ));1634 assert_noop!(1635 TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1636 CommonError::<Test>::NoPermission1637 );1638 assert!(<pallet_common::Allowlist<Test>>::get((1639 collection_id,1640 account(2)1641 )));1642 });1643}16441645#[test]1646fn nobody_can_remove_address_from_allow_list_of_nonexisting_collection() {1647 new_test_ext().execute_with(|| {1648 let origin1 = Origin::signed(1);16491650 assert_noop!(1651 TemplateModule::remove_from_allow_list(origin1, CollectionId(1), account(2)),1652 CommonError::<Test>::CollectionNotFound1653 );1654 });1655}16561657#[test]1658fn nobody_can_remove_address_from_allow_list_of_deleted_collection() {1659 new_test_ext().execute_with(|| {1660 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1661 let origin1 = Origin::signed(1);1662 let origin2 = Origin::signed(2);16631664 // Add account 2 to allow list1665 assert_ok!(TemplateModule::add_to_allow_list(1666 origin1.clone(),1667 collection_id,1668 account(2)1669 ));16701671 // Account 2 is in collection allow-list1672 assert!(<pallet_common::Allowlist<Test>>::get((1673 collection_id,1674 account(2)1675 )));16761677 // Destroy collection1678 assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));16791680 // Attempt to remove account 2 from collection allow-list => error1681 assert_noop!(1682 TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1683 CommonError::<Test>::CollectionNotFound1684 );16851686 // Account 2 is not found in collection allow-list anyway1687 assert_eq!(1688 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1689 false1690 );1691 });1692}16931694// If address is already removed from allow list, nothing happens1695#[test]1696fn address_is_already_removed_from_allow_list() {1697 new_test_ext().execute_with(|| {1698 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1699 let origin1 = Origin::signed(1);17001701 assert_ok!(TemplateModule::add_to_allow_list(1702 origin1.clone(),1703 collection_id,1704 account(2)1705 ));1706 assert_ok!(TemplateModule::remove_from_allow_list(1707 origin1.clone(),1708 collection_id,1709 account(2)1710 ));1711 assert_eq!(1712 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1713 false1714 );1715 assert_ok!(TemplateModule::remove_from_allow_list(1716 origin1,1717 collection_id,1718 account(2)1719 ));1720 assert_eq!(1721 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1722 false1723 );1724 });1725}17261727// If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom (2 tests)1728#[test]1729fn allow_list_test_1() {1730 new_test_ext().execute_with(|| {1731 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));17321733 let origin1 = Origin::signed(1);17341735 let data = default_nft_data();1736 create_test_item(collection_id, &data.into());17371738 assert_ok!(TemplateModule::set_public_access_mode(1739 origin1.clone(),1740 collection_id,1741 AccessMode::AllowList1742 ));1743 assert_ok!(TemplateModule::add_to_allow_list(1744 origin1.clone(),1745 collection_id,1746 account(2)1747 ));17481749 assert_noop!(1750 TemplateModule::transfer(origin1, account(3), CollectionId(1), TokenId(1), 1)1751 .map_err(|e| e.error),1752 CommonError::<Test>::AddressNotInAllowlist1753 );1754 });1755}17561757#[test]1758fn allow_list_test_2() {1759 new_test_ext().execute_with(|| {1760 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1761 let origin1 = Origin::signed(1);17621763 let data = default_nft_data();1764 create_test_item(collection_id, &data.into());17651766 assert_ok!(TemplateModule::set_public_access_mode(1767 origin1.clone(),1768 collection_id,1769 AccessMode::AllowList1770 ));1771 assert_ok!(TemplateModule::add_to_allow_list(1772 origin1.clone(),1773 collection_id,1774 account(1)1775 ));1776 assert_ok!(TemplateModule::add_to_allow_list(1777 origin1.clone(),1778 collection_id,1779 account(2)1780 ));17811782 // do approve1783 assert_ok!(TemplateModule::approve(1784 origin1.clone(),1785 account(1),1786 collection_id,1787 TokenId(1),1788 11789 ));1790 assert_eq!(1791 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1792 account(1)1793 );17941795 assert_ok!(TemplateModule::remove_from_allow_list(1796 origin1.clone(),1797 collection_id,1798 account(1)1799 ));18001801 assert_noop!(1802 TemplateModule::transfer_from(1803 origin1,1804 account(1),1805 account(3),1806 CollectionId(1),1807 TokenId(1),1808 11809 )1810 .map_err(|e| e.error),1811 CommonError::<Test>::AddressNotInAllowlist1812 );1813 });1814}18151816// If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom (2 tests)1817#[test]1818fn allow_list_test_3() {1819 new_test_ext().execute_with(|| {1820 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18211822 let origin1 = Origin::signed(1);18231824 let data = default_nft_data();1825 create_test_item(collection_id, &data.into());18261827 assert_ok!(TemplateModule::set_public_access_mode(1828 origin1.clone(),1829 collection_id,1830 AccessMode::AllowList1831 ));1832 assert_ok!(TemplateModule::add_to_allow_list(1833 origin1.clone(),1834 collection_id,1835 account(1)1836 ));18371838 assert_noop!(1839 TemplateModule::transfer(origin1, account(3), collection_id, TokenId(1), 1)1840 .map_err(|e| e.error),1841 CommonError::<Test>::AddressNotInAllowlist1842 );1843 });1844}18451846#[test]1847fn allow_list_test_4() {1848 new_test_ext().execute_with(|| {1849 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18501851 let origin1 = Origin::signed(1);18521853 let data = default_nft_data();1854 create_test_item(collection_id, &data.into());18551856 assert_ok!(TemplateModule::set_public_access_mode(1857 origin1.clone(),1858 collection_id,1859 AccessMode::AllowList1860 ));1861 assert_ok!(TemplateModule::add_to_allow_list(1862 origin1.clone(),1863 collection_id,1864 account(1)1865 ));1866 assert_ok!(TemplateModule::add_to_allow_list(1867 origin1.clone(),1868 collection_id,1869 account(2)1870 ));18711872 // do approve1873 assert_ok!(TemplateModule::approve(1874 origin1.clone(),1875 account(1),1876 collection_id,1877 TokenId(1),1878 11879 ));1880 assert_eq!(1881 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1882 account(1)1883 );18841885 assert_ok!(TemplateModule::remove_from_allow_list(1886 origin1.clone(),1887 collection_id,1888 account(2)1889 ));18901891 assert_noop!(1892 TemplateModule::transfer_from(1893 origin1,1894 account(1),1895 account(3),1896 collection_id,1897 TokenId(1),1898 11899 )1900 .map_err(|e| e.error),1901 CommonError::<Test>::AddressNotInAllowlist1902 );1903 });1904}19051906// If Public Access mode is set to AllowList, tokens can’t be destroyed by a non-allowlisted address (even if it owned them before enabling AllowList mode)1907#[test]1908fn allow_list_test_5() {1909 new_test_ext().execute_with(|| {1910 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19111912 let origin1 = Origin::signed(1);19131914 let data = default_nft_data();1915 create_test_item(collection_id, &data.into());19161917 assert_ok!(TemplateModule::set_public_access_mode(1918 origin1.clone(),1919 collection_id,1920 AccessMode::AllowList1921 ));1922 assert_noop!(1923 TemplateModule::burn_item(origin1.clone(), CollectionId(1), TokenId(1), 1)1924 .map_err(|e| e.error),1925 CommonError::<Test>::AddressNotInAllowlist1926 );1927 });1928}19291930// If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method).1931#[test]1932fn allow_list_test_6() {1933 new_test_ext().execute_with(|| {1934 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19351936 let origin1 = Origin::signed(1);19371938 let data = default_nft_data();1939 create_test_item(collection_id, &data.into());19401941 assert_ok!(TemplateModule::set_public_access_mode(1942 origin1.clone(),1943 collection_id,1944 AccessMode::AllowList1945 ));19461947 // do approve1948 assert_noop!(1949 TemplateModule::approve(origin1, account(1), CollectionId(1), TokenId(1), 1)1950 .map_err(|e| e.error),1951 CommonError::<Test>::AddressNotInAllowlist1952 );1953 });1954}19551956// If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests) and1957// tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests)1958#[test]1959fn allow_list_test_7() {1960 new_test_ext().execute_with(|| {1961 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19621963 let data = default_nft_data();1964 create_test_item(collection_id, &data.into());19651966 let origin1 = Origin::signed(1);19671968 assert_ok!(TemplateModule::set_public_access_mode(1969 origin1.clone(),1970 collection_id,1971 AccessMode::AllowList1972 ));1973 assert_ok!(TemplateModule::add_to_allow_list(1974 origin1.clone(),1975 collection_id,1976 account(1)1977 ));1978 assert_ok!(TemplateModule::add_to_allow_list(1979 origin1.clone(),1980 collection_id,1981 account(2)1982 ));19831984 assert_ok!(TemplateModule::transfer(1985 origin1,1986 account(2),1987 CollectionId(1),1988 TokenId(1),1989 11990 ));1991 });1992}19931994#[test]1995fn allow_list_test_8() {1996 new_test_ext().execute_with(|| {1997 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19981999 // Create NFT for account 12000 let data = default_nft_data();2001 create_test_item(collection_id, &data.into());20022003 let origin1 = Origin::signed(1);20042005 // Toggle Allow List mode and add accounts 1 and 22006 assert_ok!(TemplateModule::set_public_access_mode(2007 origin1.clone(),2008 collection_id,2009 AccessMode::AllowList2010 ));2011 assert_ok!(TemplateModule::add_to_allow_list(2012 origin1.clone(),2013 collection_id,2014 account(1)2015 ));2016 assert_ok!(TemplateModule::add_to_allow_list(2017 origin1.clone(),2018 collection_id,2019 account(2)2020 ));20212022 // Sself-approve account 1 for NFT 12023 assert_ok!(TemplateModule::approve(2024 origin1.clone(),2025 account(1),2026 CollectionId(1),2027 TokenId(1),2028 12029 ));2030 assert_eq!(2031 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),2032 account(1)2033 );20342035 // Transfer from 1 to 22036 assert_ok!(TemplateModule::transfer_from(2037 origin1,2038 account(1),2039 account(2),2040 CollectionId(1),2041 TokenId(1),2042 12043 ));2044 });2045}20462047// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner.2048#[test]2049fn allow_list_test_9() {2050 new_test_ext().execute_with(|| {2051 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2052 let origin1 = Origin::signed(1);20532054 assert_ok!(TemplateModule::set_public_access_mode(2055 origin1.clone(),2056 collection_id,2057 AccessMode::AllowList2058 ));2059 assert_ok!(TemplateModule::set_mint_permission(2060 origin1,2061 collection_id,2062 false2063 ));20642065 let data = default_nft_data();2066 create_test_item(collection_id, &data.into());2067 });2068}20692070// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin.2071#[test]2072fn allow_list_test_10() {2073 new_test_ext().execute_with(|| {2074 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20752076 let origin1 = Origin::signed(1);2077 let origin2 = Origin::signed(2);20782079 assert_ok!(TemplateModule::set_public_access_mode(2080 origin1.clone(),2081 collection_id,2082 AccessMode::AllowList2083 ));2084 assert_ok!(TemplateModule::set_mint_permission(2085 origin1.clone(),2086 collection_id,2087 false2088 ));20892090 assert_ok!(TemplateModule::add_collection_admin(2091 origin1,2092 collection_id,2093 account(2)2094 ));20952096 assert_ok!(TemplateModule::create_item(2097 origin2,2098 collection_id,2099 account(2),2100 default_nft_data().into()2101 ));2102 });2103}21042105// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and allow listed address.2106#[test]2107fn allow_list_test_11() {2108 new_test_ext().execute_with(|| {2109 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21102111 let origin1 = Origin::signed(1);2112 let origin2 = Origin::signed(2);21132114 assert_ok!(TemplateModule::set_public_access_mode(2115 origin1.clone(),2116 collection_id,2117 AccessMode::AllowList2118 ));2119 assert_ok!(TemplateModule::set_mint_permission(2120 origin1.clone(),2121 collection_id,2122 false2123 ));2124 assert_ok!(TemplateModule::add_to_allow_list(2125 origin1,2126 collection_id,2127 account(2)2128 ));21292130 assert_noop!(2131 TemplateModule::create_item(2132 origin2,2133 CollectionId(1),2134 account(2),2135 default_nft_data().into()2136 )2137 .map_err(|e| e.error),2138 CommonError::<Test>::PublicMintingNotAllowed2139 );2140 });2141}21422143// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-allow listed address.2144#[test]2145fn allow_list_test_12() {2146 new_test_ext().execute_with(|| {2147 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21482149 let origin1 = Origin::signed(1);2150 let origin2 = Origin::signed(2);21512152 assert_ok!(TemplateModule::set_public_access_mode(2153 origin1.clone(),2154 collection_id,2155 AccessMode::AllowList2156 ));2157 assert_ok!(TemplateModule::set_mint_permission(2158 origin1,2159 collection_id,2160 false2161 ));21622163 assert_noop!(2164 TemplateModule::create_item(2165 origin2,2166 CollectionId(1),2167 account(2),2168 default_nft_data().into()2169 )2170 .map_err(|e| e.error),2171 CommonError::<Test>::PublicMintingNotAllowed2172 );2173 });2174}21752176// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner.2177#[test]2178fn allow_list_test_13() {2179 new_test_ext().execute_with(|| {2180 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21812182 let origin1 = Origin::signed(1);21832184 assert_ok!(TemplateModule::set_public_access_mode(2185 origin1.clone(),2186 collection_id,2187 AccessMode::AllowList2188 ));2189 assert_ok!(TemplateModule::set_mint_permission(2190 origin1,2191 collection_id,2192 true2193 ));21942195 let data = default_nft_data();2196 create_test_item(collection_id, &data.into());2197 });2198}21992200// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin.2201#[test]2202fn allow_list_test_14() {2203 new_test_ext().execute_with(|| {2204 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22052206 let origin1 = Origin::signed(1);2207 let origin2 = Origin::signed(2);22082209 assert_ok!(TemplateModule::set_public_access_mode(2210 origin1.clone(),2211 collection_id,2212 AccessMode::AllowList2213 ));2214 assert_ok!(TemplateModule::set_mint_permission(2215 origin1.clone(),2216 collection_id,2217 true2218 ));22192220 assert_ok!(TemplateModule::add_collection_admin(2221 origin1,2222 collection_id,2223 account(2)2224 ));22252226 assert_ok!(TemplateModule::create_item(2227 origin2,2228 collection_id,2229 account(2),2230 default_nft_data().into()2231 ));2232 });2233}22342235// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-allow listed address.2236#[test]2237fn allow_list_test_15() {2238 new_test_ext().execute_with(|| {2239 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22402241 let origin1 = Origin::signed(1);2242 let origin2 = Origin::signed(2);22432244 assert_ok!(TemplateModule::set_public_access_mode(2245 origin1.clone(),2246 collection_id,2247 AccessMode::AllowList2248 ));2249 assert_ok!(TemplateModule::set_mint_permission(2250 origin1,2251 collection_id,2252 true2253 ));22542255 assert_noop!(2256 TemplateModule::create_item(2257 origin2,2258 collection_id,2259 account(2),2260 default_nft_data().into()2261 )2262 .map_err(|e| e.error),2263 CommonError::<Test>::AddressNotInAllowlist2264 );2265 });2266}22672268// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by non-privileged and allow listed address.2269#[test]2270fn allow_list_test_16() {2271 new_test_ext().execute_with(|| {2272 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22732274 let origin1 = Origin::signed(1);2275 let origin2 = Origin::signed(2);22762277 assert_ok!(TemplateModule::set_public_access_mode(2278 origin1.clone(),2279 collection_id,2280 AccessMode::AllowList2281 ));2282 assert_ok!(TemplateModule::set_mint_permission(2283 origin1.clone(),2284 collection_id,2285 true2286 ));2287 assert_ok!(TemplateModule::add_to_allow_list(2288 origin1,2289 collection_id,2290 account(2)2291 ));22922293 assert_ok!(TemplateModule::create_item(2294 origin2,2295 collection_id,2296 account(2),2297 default_nft_data().into()2298 ));2299 });2300}23012302// Total number of collections. Positive test2303#[test]2304fn total_number_collections_bound() {2305 new_test_ext().execute_with(|| {2306 create_test_collection(&CollectionMode::NFT, CollectionId(1));2307 });2308}23092310#[test]2311fn create_max_collections() {2312 new_test_ext().execute_with(|| {2313 for i in 1..COLLECTION_NUMBER_LIMIT {2314 create_test_collection(&CollectionMode::NFT, CollectionId(i));2315 }2316 });2317}23182319// Total number of collections. Negative test2320#[test]2321fn total_number_collections_bound_neg() {2322 new_test_ext().execute_with(|| {2323 let origin1 = Origin::signed(1);23242325 for i in 1..=COLLECTION_NUMBER_LIMIT {2326 create_test_collection(&CollectionMode::NFT, CollectionId(i));2327 }23282329 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();2330 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();2331 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();23322333 let data: CreateCollectionData<u64> = CreateCollectionData {2334 name: col_name1.try_into().unwrap(),2335 description: col_desc1.try_into().unwrap(),2336 token_prefix: token_prefix1.try_into().unwrap(),2337 mode: CollectionMode::NFT,2338 ..Default::default()2339 };23402341 // 11-th collection in chain. Expects error2342 assert_noop!(2343 TemplateModule::create_collection_ex(origin1, data),2344 CommonError::<Test>::TotalCollectionsLimitExceeded2345 );2346 });2347}23482349// Owned tokens by a single address. Positive test2350#[test]2351fn owned_tokens_bound() {2352 new_test_ext().execute_with(|| {2353 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23542355 let data = default_nft_data();2356 create_test_item(collection_id, &data.clone().into());2357 create_test_item(collection_id, &data.into());2358 });2359}23602361// Owned tokens by a single address. Negotive test2362#[test]2363fn owned_tokens_bound_neg() {2364 new_test_ext().execute_with(|| {2365 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23662367 let origin1 = Origin::signed(1);23682369 for _ in 1..=MAX_TOKEN_OWNERSHIP {2370 let data = default_nft_data();2371 create_test_item(collection_id, &data.clone().into());2372 }23732374 let data = default_nft_data();2375 assert_noop!(2376 TemplateModule::create_item(origin1, CollectionId(1), account(1), data.into())2377 .map_err(|e| e.error),2378 CommonError::<Test>::AccountTokenLimitExceeded2379 );2380 });2381}23822383// Number of collection admins. Positive test2384#[test]2385fn collection_admins_bound() {2386 new_test_ext().execute_with(|| {2387 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23882389 let origin1 = Origin::signed(1);23902391 assert_ok!(TemplateModule::add_collection_admin(2392 origin1.clone(),2393 collection_id,2394 account(2)2395 ));2396 assert_ok!(TemplateModule::add_collection_admin(2397 origin1,2398 collection_id,2399 account(3)2400 ));2401 });2402}24032404// Number of collection admins. Negotive test2405#[test]2406fn collection_admins_bound_neg() {2407 new_test_ext().execute_with(|| {2408 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24092410 let origin1 = Origin::signed(1);24112412 for i in 0..COLLECTION_ADMINS_LIMIT {2413 assert_ok!(TemplateModule::add_collection_admin(2414 origin1.clone(),2415 collection_id,2416 account((2 + i).into())2417 ));2418 }2419 assert_noop!(2420 TemplateModule::add_collection_admin(2421 origin1,2422 collection_id,2423 account((3 + COLLECTION_ADMINS_LIMIT).into())2424 ),2425 CommonError::<Test>::CollectionAdminCountExceeded2426 );2427 });2428}2429// #endregion24302431#[test]2432fn set_const_on_chain_schema() {2433 new_test_ext().execute_with(|| {2434 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24352436 let origin1 = Origin::signed(1);2437 assert_ok!(TemplateModule::set_const_on_chain_schema(2438 origin1,2439 collection_id,2440 b"test const on chain schema".to_vec().try_into().unwrap()2441 ));24422443 assert_eq!(2444 <pallet_common::CollectionById<Test>>::get(collection_id)2445 .unwrap()2446 .const_on_chain_schema,2447 b"test const on chain schema".to_vec()2448 );2449 assert_eq!(2450 <pallet_common::CollectionById<Test>>::get(collection_id)2451 .unwrap()2452 .variable_on_chain_schema,2453 b"".to_vec()2454 );2455 });2456}24572458#[test]2459fn set_variable_on_chain_schema() {2460 new_test_ext().execute_with(|| {2461 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24622463 let origin1 = Origin::signed(1);2464 assert_ok!(TemplateModule::set_variable_on_chain_schema(2465 origin1,2466 collection_id,2467 b"test variable on chain schema"2468 .to_vec()2469 .try_into()2470 .unwrap()2471 ));24722473 assert_eq!(2474 <pallet_common::CollectionById<Test>>::get(collection_id)2475 .unwrap()2476 .const_on_chain_schema,2477 b"".to_vec()2478 );2479 assert_eq!(2480 <pallet_common::CollectionById<Test>>::get(collection_id)2481 .unwrap()2482 .variable_on_chain_schema,2483 b"test variable on chain schema".to_vec()2484 );2485 });2486}24872488#[test]2489fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {2490 new_test_ext().execute_with(|| {2491 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24922493 let origin1 = Origin::signed(1);24942495 let data = default_nft_data();2496 create_test_item(CollectionId(1), &data.into());24972498 let variable_data = b"test data".to_vec();2499 assert_ok!(TemplateModule::set_variable_meta_data(2500 origin1,2501 collection_id,2502 TokenId(1),2503 variable_data.clone().try_into().unwrap()2504 ));25052506 assert_eq!(2507 <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2508 .unwrap()2509 .variable_data,2510 variable_data2511 );2512 });2513}25142515#[test]2516fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {2517 new_test_ext().execute_with(|| {2518 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));25192520 let origin1 = Origin::signed(1);25212522 let data = default_re_fungible_data();2523 create_test_item(collection_id, &data.into());25242525 let variable_data = b"test data".to_vec();2526 assert_ok!(TemplateModule::set_variable_meta_data(2527 origin1,2528 collection_id,2529 TokenId(1),2530 variable_data.clone().try_into().unwrap()2531 ));25322533 assert_eq!(2534 <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1))).variable_data,2535 variable_data2536 );2537 });2538}25392540#[test]2541fn set_variable_meta_data_on_fungible_token_fails() {2542 new_test_ext().execute_with(|| {2543 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));25442545 let origin1 = Origin::signed(1);25462547 let data = default_fungible_data();2548 create_test_item(collection_id, &data.into());25492550 let variable_data = b"test data".to_vec();2551 assert_noop!(2552 TemplateModule::set_variable_meta_data(2553 origin1,2554 collection_id,2555 TokenId(0),2556 variable_data.try_into().unwrap()2557 )2558 .map_err(|e| e.error),2559 <pallet_fungible::Error<Test>>::FungibleItemsDontHaveData2560 );2561 });2562}25632564#[test]2565fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {2566 new_test_ext().execute_with(|| {2567 //default_limits();25682569 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));25702571 let origin1 = Origin::signed(1);25722573 let data = default_nft_data();2574 create_test_item(collection_id, &data.into());25752576 assert_ok!(TemplateModule::set_meta_update_permission_flag(2577 origin1.clone(),2578 collection_id,2579 MetaUpdatePermission::ItemOwner,2580 ));25812582 let variable_data = b"ten chars.".to_vec();2583 assert_ok!(TemplateModule::set_variable_meta_data(2584 origin1,2585 collection_id,2586 TokenId(1),2587 variable_data.clone().try_into().unwrap()2588 ));25892590 assert_eq!(2591 <pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))2592 .unwrap()2593 .variable_data,2594 variable_data2595 );2596 });2597}25982599#[test]2600fn collection_transfer_flag_works() {2601 new_test_ext().execute_with(|| {2602 let origin1 = Origin::signed(1);26032604 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2605 assert_ok!(TemplateModule::set_transfers_enabled_flag(2606 origin1,2607 collection_id,2608 true2609 ));26102611 let data = default_nft_data();2612 create_test_item(collection_id, &data.into());2613 assert_eq!(2614 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2615 12616 );2617 assert_eq!(2618 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2619 true2620 );26212622 let origin1 = Origin::signed(1);26232624 // default scenario2625 assert_ok!(TemplateModule::transfer(2626 origin1,2627 account(2),2628 collection_id,2629 TokenId(1),2630 12631 ));2632 assert_eq!(2633 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2634 false2635 );2636 assert_eq!(2637 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2638 true2639 );2640 assert_eq!(2641 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2642 02643 );2644 assert_eq!(2645 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2646 12647 );2648 });2649}26502651#[test]2652fn set_variable_meta_data_on_nft_with_admin_flag() {2653 new_test_ext().execute_with(|| {2654 // default_limits();26552656 let collection_id =2657 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));26582659 let origin1 = Origin::signed(1);2660 let origin2 = Origin::signed(2);26612662 assert_ok!(TemplateModule::set_mint_permission(2663 origin2.clone(),2664 collection_id,2665 true2666 ));2667 assert_ok!(TemplateModule::add_to_allow_list(2668 origin2.clone(),2669 collection_id,2670 account(1)2671 ));26722673 assert_ok!(TemplateModule::add_collection_admin(2674 origin2.clone(),2675 collection_id,2676 account(1)2677 ));26782679 let data = default_nft_data();2680 create_test_item(collection_id, &data.into());26812682 assert_ok!(TemplateModule::set_meta_update_permission_flag(2683 origin2.clone(),2684 collection_id,2685 MetaUpdatePermission::Admin,2686 ));26872688 let variable_data = b"test.".to_vec();2689 assert_ok!(TemplateModule::set_variable_meta_data(2690 origin1,2691 collection_id,2692 TokenId(1),2693 variable_data.clone().try_into().unwrap()2694 ));26952696 assert_eq!(2697 <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2698 .unwrap()2699 .variable_data,2700 variable_data2701 );2702 });2703}27042705#[test]2706fn set_variable_meta_data_on_nft_with_admin_flag_neg() {2707 new_test_ext().execute_with(|| {2708 // default_limits();27092710 let collection_id =2711 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27122713 let origin1 = Origin::signed(1);2714 let origin2 = Origin::signed(2);27152716 assert_ok!(TemplateModule::set_mint_permission(2717 origin2.clone(),2718 collection_id,2719 true2720 ));2721 assert_ok!(TemplateModule::add_to_allow_list(2722 origin2.clone(),2723 collection_id,2724 account(1)2725 ));27262727 let data = default_nft_data();2728 create_test_item(collection_id, &data.into());27292730 assert_ok!(TemplateModule::set_meta_update_permission_flag(2731 origin2.clone(),2732 collection_id,2733 MetaUpdatePermission::Admin,2734 ));27352736 let variable_data = b"test.".to_vec();2737 assert_noop!(2738 TemplateModule::set_variable_meta_data(2739 origin1,2740 collection_id,2741 TokenId(1),2742 variable_data.try_into().unwrap()2743 )2744 .map_err(|e| e.error),2745 CommonError::<Test>::NoPermission2746 );2747 });2748}27492750#[test]2751fn set_variable_meta_flag_after_freeze() {2752 new_test_ext().execute_with(|| {2753 // default_limits();27542755 let collection_id =2756 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27572758 let origin2 = Origin::signed(2);27592760 assert_ok!(TemplateModule::set_meta_update_permission_flag(2761 origin2.clone(),2762 collection_id,2763 MetaUpdatePermission::None,2764 ));2765 assert_noop!(2766 TemplateModule::set_meta_update_permission_flag(2767 origin2.clone(),2768 collection_id,2769 MetaUpdatePermission::Admin2770 ),2771 CommonError::<Test>::MetadataFlagFrozen2772 );2773 });2774}27752776#[test]2777fn set_variable_meta_data_on_nft_with_none_flag_neg() {2778 new_test_ext().execute_with(|| {2779 // default_limits();27802781 let collection_id =2782 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));2783 let origin1 = Origin::signed(1);27842785 let data = default_nft_data();2786 create_test_item(collection_id, &data.into());27872788 assert_ok!(TemplateModule::set_meta_update_permission_flag(2789 origin1.clone(),2790 collection_id,2791 MetaUpdatePermission::None,2792 ));27932794 let variable_data = b"test.".to_vec();2795 assert_noop!(2796 TemplateModule::set_variable_meta_data(2797 origin1.clone(),2798 collection_id,2799 TokenId(1),2800 variable_data.try_into().unwrap()2801 )2802 .map_err(|e| e.error),2803 CommonError::<Test>::NoPermission2804 );2805 });2806}28072808#[test]2809fn collection_transfer_flag_works_neg() {2810 new_test_ext().execute_with(|| {2811 let origin1 = Origin::signed(1);28122813 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2814 assert_ok!(TemplateModule::set_transfers_enabled_flag(2815 origin1,2816 collection_id,2817 false2818 ));28192820 let data = default_nft_data();2821 create_test_item(collection_id, &data.into());2822 assert_eq!(2823 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2824 12825 );2826 assert_eq!(2827 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2828 true2829 );28302831 let origin1 = Origin::signed(1);28322833 // default scenario2834 assert_noop!(2835 TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 1)2836 .map_err(|e| e.error),2837 CommonError::<Test>::TransferNotAllowed2838 );2839 assert_eq!(2840 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2841 12842 );2843 assert_eq!(2844 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2845 02846 );2847 assert_eq!(2848 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2849 true2850 );2851 assert_eq!(2852 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2853 false2854 );2855 });2856}1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617// Tests to be written here18use super::*;19use crate::mock::*;20use crate::{AccessMode, CollectionMode};21use sp_runtime::AccountId32;22use up_data_structs::{23 COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,24 CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,25 TokenId, MAX_TOKEN_OWNERSHIP,26};27use frame_support::{assert_noop, assert_ok, assert_err};28use sp_std::convert::TryInto;29use pallet_balances;3031fn add_balance(user: u64, value: u64) {32 const DONOR_USER: u64 = 999;33 assert_ok!(<pallet_balances::Pallet<Test>>::set_balance(34 Origin::root(),35 DONOR_USER,36 value,37 038 ));39 assert_ok!(<pallet_balances::Pallet<Test>>::force_transfer(40 Origin::root(),41 DONOR_USER,42 user,43 value44 ));45}4647fn default_nft_data() -> CreateNftData {48 CreateNftData {49 const_data: vec![1, 2, 3].try_into().unwrap(),50 variable_data: vec![3, 2, 1].try_into().unwrap(),51 }52}5354fn default_fungible_data() -> CreateFungibleData {55 CreateFungibleData { value: 5 }56}5758fn default_re_fungible_data() -> CreateReFungibleData {59 CreateReFungibleData {60 const_data: vec![1, 2, 3].try_into().unwrap(),61 variable_data: vec![3, 2, 1].try_into().unwrap(),62 pieces: 1023,63 }64}6566fn create_test_collection_for_owner(67 mode: &CollectionMode,68 owner: u64,69 id: CollectionId,70) -> CollectionId {71 add_balance(owner, CollectionCreationPrice::get() as u64 + 1);7273 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();74 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();75 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();7677 let data: CreateCollectionData<u64> = CreateCollectionData {78 name: col_name1.try_into().unwrap(),79 description: col_desc1.try_into().unwrap(),80 token_prefix: token_prefix1.try_into().unwrap(),81 mode: mode.clone(),82 ..Default::default()83 };8485 let origin1 = Origin::signed(owner);86 assert_ok!(TemplateModule::create_collection_ex(origin1, data));8788 let saved_col_name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();89 let saved_description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();90 let saved_prefix: Vec<u8> = b"token_prefix1\0".to_vec();91 assert_eq!(92 <pallet_common::CollectionById<Test>>::get(id)93 .unwrap()94 .owner,95 owner96 );97 assert_eq!(98 <pallet_common::CollectionById<Test>>::get(id).unwrap().name,99 saved_col_name100 );101 assert_eq!(102 <pallet_common::CollectionById<Test>>::get(id).unwrap().mode,103 *mode104 );105 assert_eq!(106 <pallet_common::CollectionById<Test>>::get(id)107 .unwrap()108 .description,109 saved_description110 );111 assert_eq!(112 <pallet_common::CollectionById<Test>>::get(id)113 .unwrap()114 .token_prefix,115 saved_prefix116 );117 id118}119120fn create_test_collection(mode: &CollectionMode, id: CollectionId) -> CollectionId {121 create_test_collection_for_owner(&mode, 1, id)122}123124fn create_test_item(collection_id: CollectionId, data: &CreateItemData) {125 let origin1 = Origin::signed(1);126 assert_ok!(TemplateModule::create_item(127 origin1,128 collection_id,129 account(1),130 data.clone()131 ));132}133134fn account(sub: u64) -> TestCrossAccountId {135 TestCrossAccountId::from_sub(sub)136}137138// Use cases tests region139// #region140141#[test]142fn set_version_schema() {143 new_test_ext().execute_with(|| {144 let origin1 = Origin::signed(1);145 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));146147 assert_ok!(TemplateModule::set_schema_version(148 origin1,149 collection_id,150 SchemaVersion::Unique151 ));152 assert_eq!(153 <pallet_common::CollectionById<Test>>::get(collection_id)154 .unwrap()155 .schema_version,156 SchemaVersion::Unique157 );158 });159}160161#[test]162fn check_not_sufficient_founds() {163 new_test_ext().execute_with(|| {164 let acc: u64 = 1;165 <pallet_balances::Pallet<Test>>::set_balance(Origin::root(), acc, 0, 0).unwrap();166167 let name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();168 let description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();169 let token_prefix: Vec<u8> = b"token_prefix1\0".to_vec();170171 let data: CreateCollectionData<<Test as system::Config>::AccountId> =172 CreateCollectionData {173 name: name.try_into().unwrap(),174 description: description.try_into().unwrap(),175 token_prefix: token_prefix.try_into().unwrap(),176 mode: CollectionMode::NFT,177 ..Default::default()178 };179180 let result = TemplateModule::create_collection_ex(Origin::signed(acc), data);181 assert_err!(result, <CommonError<Test>>::NotSufficientFounds);182 });183}184185#[test]186fn create_fungible_collection_fails_with_large_decimal_numbers() {187 new_test_ext().execute_with(|| {188 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();189 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();190 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();191192 let data: CreateCollectionData<u64> = CreateCollectionData {193 name: col_name1.try_into().unwrap(),194 description: col_desc1.try_into().unwrap(),195 token_prefix: token_prefix1.try_into().unwrap(),196 mode: CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1),197 ..Default::default()198 };199200 let origin1 = Origin::signed(1);201 assert_noop!(202 TemplateModule::create_collection_ex(origin1, data),203 Error::<Test>::CollectionDecimalPointLimitExceeded204 );205 });206}207208#[test]209fn create_nft_item() {210 new_test_ext().execute_with(|| {211 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));212213 let data = default_nft_data();214 create_test_item(collection_id, &data.clone().into());215216 let item = <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1)).unwrap();217 assert_eq!(item.const_data, data.const_data.into_inner());218 assert_eq!(item.variable_data, data.variable_data.into_inner());219 });220}221222// Use cases tests region223// #region224#[test]225fn create_nft_multiple_items() {226 new_test_ext().execute_with(|| {227 create_test_collection(&CollectionMode::NFT, CollectionId(1));228229 let origin1 = Origin::signed(1);230231 let items_data = vec![default_nft_data(), default_nft_data(), default_nft_data()];232233 assert_ok!(TemplateModule::create_multiple_items(234 origin1,235 CollectionId(1),236 account(1),237 items_data238 .clone()239 .into_iter()240 .map(|d| { d.into() })241 .collect()242 ));243 for (index, data) in items_data.into_iter().enumerate() {244 let item = <pallet_nonfungible::TokenData<Test>>::get((245 CollectionId(1),246 TokenId((index + 1) as u32),247 ))248 .unwrap();249 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());250 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());251 }252 });253}254255#[test]256fn create_refungible_item() {257 new_test_ext().execute_with(|| {258 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));259260 let data = default_re_fungible_data();261 create_test_item(collection_id, &data.clone().into());262 let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));263 let balance =264 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1)));265 assert_eq!(item.const_data, data.const_data.into_inner());266 assert_eq!(item.variable_data, data.variable_data.into_inner());267 assert_eq!(balance, 1023);268 });269}270271#[test]272fn create_multiple_refungible_items() {273 new_test_ext().execute_with(|| {274 create_test_collection(&CollectionMode::ReFungible, CollectionId(1));275276 let origin1 = Origin::signed(1);277278 let items_data = vec![279 default_re_fungible_data(),280 default_re_fungible_data(),281 default_re_fungible_data(),282 ];283284 assert_ok!(TemplateModule::create_multiple_items(285 origin1,286 CollectionId(1),287 account(1),288 items_data289 .clone()290 .into_iter()291 .map(|d| { d.into() })292 .collect()293 ));294 for (index, data) in items_data.into_iter().enumerate() {295 let item = <pallet_refungible::TokenData<Test>>::get((296 CollectionId(1),297 TokenId((index + 1) as u32),298 ));299 let balance =300 <pallet_refungible::Balance<Test>>::get((CollectionId(1), TokenId(1), account(1)));301 assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());302 assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());303 assert_eq!(balance, 1023);304 }305 });306}307308#[test]309fn create_fungible_item() {310 new_test_ext().execute_with(|| {311 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));312313 let data = default_fungible_data();314 create_test_item(collection_id, &data.into());315316 assert_eq!(317 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),318 5319 );320 });321}322323//#[test]324// fn create_multiple_fungible_items() {325// new_test_ext().execute_with(|| {326// default_limits();327328// create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));329330// let origin1 = Origin::signed(1);331332// let items_data = vec![default_fungible_data(), default_fungible_data(), default_fungible_data()];333334// assert_ok!(TemplateModule::create_multiple_items(335// origin1.clone(),336// 1,337// 1,338// items_data.clone().into_iter().map(|d| { d.into() }).collect()339// ));340341// for (index, _) in items_data.iter().enumerate() {342// assert_eq!(TemplateModule::fungible_item_id(1, (index + 1) as TokenId).value, 5);343// }344// assert_eq!(TemplateModule::balance_count(1, 1), 3000);345// assert_eq!(TemplateModule::address_tokens(1, 1), [1, 2, 3]);346// });347// }348349#[test]350fn transfer_fungible_item() {351 new_test_ext().execute_with(|| {352 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));353354 let origin1 = Origin::signed(1);355 let origin2 = Origin::signed(2);356357 let data = default_fungible_data();358 create_test_item(collection_id, &data.into());359360 assert_eq!(361 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),362 5363 );364365 // change owner scenario366 assert_ok!(TemplateModule::transfer(367 origin1,368 account(2),369 CollectionId(1),370 TokenId(0),371 5372 ));373 assert_eq!(374 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),375 0376 );377378 // split item scenario379 assert_ok!(TemplateModule::transfer(380 origin2.clone(),381 account(3),382 CollectionId(1),383 TokenId(0),384 3385 ));386387 // split item and new owner has account scenario388 assert_ok!(TemplateModule::transfer(389 origin2,390 account(3),391 CollectionId(1),392 TokenId(0),393 1394 ));395 assert_eq!(396 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(2))),397 1398 );399 assert_eq!(400 <pallet_fungible::Balance<Test>>::get((CollectionId(1), account(3))),401 4402 );403 });404}405406#[test]407fn transfer_refungible_item() {408 new_test_ext().execute_with(|| {409 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));410411 // Create RFT 1 in 1023 pieces for account 1412 let data = default_re_fungible_data();413 create_test_item(collection_id, &data.clone().into());414 let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));415 assert_eq!(item.const_data, data.const_data.into_inner());416 assert_eq!(item.variable_data, data.variable_data.into_inner());417 assert_eq!(418 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),419 1420 );421 assert_eq!(422 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),423 1023424 );425 assert_eq!(426 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),427 true428 );429430 // Account 1 transfers all 1023 pieces of RFT 1 to account 2431 let origin1 = Origin::signed(1);432 let origin2 = Origin::signed(2);433 assert_ok!(TemplateModule::transfer(434 origin1,435 account(2),436 CollectionId(1),437 TokenId(1),438 1023439 ));440 assert_eq!(441 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),442 1023443 );444 assert_eq!(445 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),446 0447 );448 assert_eq!(449 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),450 1451 );452 assert_eq!(453 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),454 false455 );456 assert_eq!(457 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),458 true459 );460461 // Account 2 transfers 500 pieces of RFT 1 to account 3462 assert_ok!(TemplateModule::transfer(463 origin2.clone(),464 account(3),465 CollectionId(1),466 TokenId(1),467 500468 ));469 assert_eq!(470 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),471 523472 );473 assert_eq!(474 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),475 500476 );477 assert_eq!(478 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),479 1480 );481 assert_eq!(482 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),483 1484 );485 assert_eq!(486 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),487 true488 );489 assert_eq!(490 <pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),491 true492 );493494 // Account 2 transfers 200 more pieces of RFT 1 to account 3 with pre-existing balance495 assert_ok!(TemplateModule::transfer(496 origin2,497 account(3),498 CollectionId(1),499 TokenId(1),500 200501 ));502 assert_eq!(503 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),504 323505 );506 assert_eq!(507 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),508 700509 );510 assert_eq!(511 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),512 1513 );514 assert_eq!(515 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),516 1517 );518 assert_eq!(519 <pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),520 true521 );522 assert_eq!(523 <pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),524 true525 );526 });527}528529#[test]530fn transfer_nft_item() {531 new_test_ext().execute_with(|| {532 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));533534 let data = default_nft_data();535 create_test_item(collection_id, &data.into());536 assert_eq!(537 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),538 1539 );540 assert_eq!(541 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),542 true543 );544545 let origin1 = Origin::signed(1);546 // default scenario547 assert_ok!(TemplateModule::transfer(548 origin1,549 account(2),550 CollectionId(1),551 TokenId(1),552 1553 ));554 assert_eq!(555 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),556 0557 );558 assert_eq!(559 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),560 1561 );562 assert_eq!(563 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),564 false565 );566 assert_eq!(567 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),568 true569 );570 });571}572573#[test]574fn transfer_nft_item_wrong_value() {575 new_test_ext().execute_with(|| {576 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));577578 let data = default_nft_data();579 create_test_item(collection_id, &data.into());580 assert_eq!(581 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),582 1583 );584 assert_eq!(585 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),586 true587 );588589 let origin1 = Origin::signed(1);590591 assert_noop!(592 TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 2)593 .map_err(|e| e.error),594 <pallet_nonfungible::Error::<Test>>::NonfungibleItemsHaveNoAmount595 );596 });597}598599#[test]600fn transfer_nft_item_zero_value() {601 new_test_ext().execute_with(|| {602 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));603604 let data = default_nft_data();605 create_test_item(collection_id, &data.into());606 assert_eq!(607 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),608 1609 );610 assert_eq!(611 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),612 true613 );614615 let origin1 = Origin::signed(1);616617 // Transferring 0 amount works on NFT...618 assert_ok!(TemplateModule::transfer(619 origin1,620 account(2),621 CollectionId(1),622 TokenId(1),623 0624 ));625 // ... and results in no transfer626 assert_eq!(627 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),628 1629 );630 assert_eq!(631 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),632 true633 );634 });635}636637#[test]638fn nft_approve_and_transfer_from() {639 new_test_ext().execute_with(|| {640 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));641642 let data = default_nft_data();643 create_test_item(collection_id, &data.into());644645 let origin1 = Origin::signed(1);646 let origin2 = Origin::signed(2);647648 assert_eq!(649 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),650 1651 );652 assert_eq!(653 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),654 true655 );656657 // neg transfer_from658 assert_noop!(659 TemplateModule::transfer_from(660 origin2.clone(),661 account(1),662 account(2),663 CollectionId(1),664 TokenId(1),665 1666 )667 .map_err(|e| e.error),668 CommonError::<Test>::ApprovedValueTooLow669 );670671 // do approve672 assert_ok!(TemplateModule::approve(673 origin1,674 account(2),675 CollectionId(1),676 TokenId(1),677 1678 ));679 assert_eq!(680 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),681 account(2)682 );683684 assert_ok!(TemplateModule::transfer_from(685 origin2,686 account(1),687 account(3),688 CollectionId(1),689 TokenId(1),690 1691 ));692 assert!(693 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()694 );695 });696}697698#[test]699fn nft_approve_and_transfer_from_allow_list() {700 new_test_ext().execute_with(|| {701 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));702703 let origin1 = Origin::signed(1);704 let origin2 = Origin::signed(2);705706 // Create NFT 1 for account 1707 let data = default_nft_data();708 create_test_item(collection_id, &data.clone().into());709 assert_eq!(710 &<pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))711 .unwrap()712 .const_data,713 &data.const_data.into_inner()714 );715 assert_eq!(716 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),717 1718 );719 assert_eq!(720 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),721 true722 );723724 // Allow allow-list users to mint and add accounts 1, 2, and 3 to allow-list725 assert_ok!(TemplateModule::set_mint_permission(726 origin1.clone(),727 CollectionId(1),728 true729 ));730 assert_ok!(TemplateModule::set_public_access_mode(731 origin1.clone(),732 CollectionId(1),733 AccessMode::AllowList734 ));735 assert_ok!(TemplateModule::add_to_allow_list(736 origin1.clone(),737 CollectionId(1),738 account(1)739 ));740 assert_ok!(TemplateModule::add_to_allow_list(741 origin1.clone(),742 CollectionId(1),743 account(2)744 ));745 assert_ok!(TemplateModule::add_to_allow_list(746 origin1.clone(),747 CollectionId(1),748 account(3)749 ));750751 // Account 1 approves account 2 for NFT 1752 assert_ok!(TemplateModule::approve(753 origin1.clone(),754 account(2),755 CollectionId(1),756 TokenId(1),757 1758 ));759 assert_eq!(760 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),761 account(2)762 );763764 // Account 2 transfers NFT 1 from account 1 to account 3765 assert_ok!(TemplateModule::transfer_from(766 origin2,767 account(1),768 account(3),769 CollectionId(1),770 TokenId(1),771 1772 ));773 assert!(774 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()775 );776 });777}778779#[test]780fn refungible_approve_and_transfer_from() {781 new_test_ext().execute_with(|| {782 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));783784 let origin1 = Origin::signed(1);785 let origin2 = Origin::signed(2);786787 // Create RFT 1 in 1023 pieces for account 1788 let data = default_re_fungible_data();789 create_test_item(collection_id, &data.into());790791 assert_eq!(792 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),793 1794 );795 assert_eq!(796 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),797 1023798 );799 assert_eq!(800 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),801 true802 );803804 // Allow public minting, enable allow-list and add accounts 1, 2, 3 to allow-list805 assert_ok!(TemplateModule::set_mint_permission(806 origin1.clone(),807 CollectionId(1),808 true809 ));810 assert_ok!(TemplateModule::set_public_access_mode(811 origin1.clone(),812 CollectionId(1),813 AccessMode::AllowList814 ));815 assert_ok!(TemplateModule::add_to_allow_list(816 origin1.clone(),817 CollectionId(1),818 account(1)819 ));820 assert_ok!(TemplateModule::add_to_allow_list(821 origin1.clone(),822 CollectionId(1),823 account(2)824 ));825 assert_ok!(TemplateModule::add_to_allow_list(826 origin1.clone(),827 CollectionId(1),828 account(3)829 ));830831 // Account 1 approves account 2 for 1023 pieces of RFT 1832 assert_ok!(TemplateModule::approve(833 origin1,834 account(2),835 CollectionId(1),836 TokenId(1),837 1023838 ));839 assert_eq!(840 <pallet_refungible::Allowance<Test>>::get((841 CollectionId(1),842 TokenId(1),843 account(1),844 account(2)845 )),846 1023847 );848849 // Account 2 transfers 100 pieces of RFT 1 from account 1 to account 3850 assert_ok!(TemplateModule::transfer_from(851 origin2,852 account(1),853 account(3),854 CollectionId(1),855 TokenId(1),856 100857 ));858 assert_eq!(859 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),860 1861 );862 assert_eq!(863 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),864 1865 );866 assert_eq!(867 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),868 923869 );870 assert_eq!(871 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),872 100873 );874 assert_eq!(875 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),876 true877 );878 assert_eq!(879 <pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),880 true881 );882 assert_eq!(883 <pallet_refungible::Allowance<Test>>::get((884 CollectionId(1),885 TokenId(1),886 account(1),887 account(2)888 )),889 923890 );891 });892}893894#[test]895fn fungible_approve_and_transfer_from() {896 new_test_ext().execute_with(|| {897 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));898899 let data = default_fungible_data();900 create_test_item(collection_id, &data.into());901902 let origin1 = Origin::signed(1);903 let origin2 = Origin::signed(2);904905 assert_ok!(TemplateModule::set_mint_permission(906 origin1.clone(),907 CollectionId(1),908 true909 ));910 assert_ok!(TemplateModule::set_public_access_mode(911 origin1.clone(),912 CollectionId(1),913 AccessMode::AllowList914 ));915 assert_ok!(TemplateModule::add_to_allow_list(916 origin1.clone(),917 CollectionId(1),918 account(1)919 ));920 assert_ok!(TemplateModule::add_to_allow_list(921 origin1.clone(),922 CollectionId(1),923 account(2)924 ));925 assert_ok!(TemplateModule::add_to_allow_list(926 origin1.clone(),927 CollectionId(1),928 account(3)929 ));930931 // do approve932 assert_ok!(TemplateModule::approve(933 origin1.clone(),934 account(2),935 CollectionId(1),936 TokenId(0),937 5938 ));939 assert_eq!(940 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),941 5942 );943 assert_ok!(TemplateModule::approve(944 origin1,945 account(3),946 CollectionId(1),947 TokenId(0),948 5949 ));950 assert_eq!(951 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),952 5953 );954 assert_eq!(955 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(3))),956 5957 );958959 assert_ok!(TemplateModule::transfer_from(960 origin2.clone(),961 account(1),962 account(3),963 CollectionId(1),964 TokenId(0),965 4966 ));967968 assert_eq!(969 <pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),970 1971 );972973 assert_noop!(974 TemplateModule::transfer_from(975 origin2,976 account(1),977 account(3),978 CollectionId(1),979 TokenId(0),980 4981 )982 .map_err(|e| e.error),983 CommonError::<Test>::ApprovedValueTooLow984 );985 });986}987988#[test]989fn change_collection_owner() {990 new_test_ext().execute_with(|| {991 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));992993 let origin1 = Origin::signed(1);994 assert_ok!(TemplateModule::change_collection_owner(995 origin1,996 collection_id,997 2998 ));999 assert_eq!(1000 <pallet_common::CollectionById<Test>>::get(collection_id)1001 .unwrap()1002 .owner,1003 21004 );1005 });1006}10071008#[test]1009fn destroy_collection() {1010 new_test_ext().execute_with(|| {1011 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10121013 let origin1 = Origin::signed(1);1014 assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));1015 });1016}10171018#[test]1019fn burn_nft_item() {1020 new_test_ext().execute_with(|| {1021 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10221023 let origin1 = Origin::signed(1);10241025 let data = default_nft_data();1026 create_test_item(collection_id, &data.into());10271028 // check balance (collection with id = 1, user id = 1)1029 assert_eq!(1030 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1031 11032 );10331034 // burn item1035 assert_ok!(TemplateModule::burn_item(1036 origin1.clone(),1037 collection_id,1038 TokenId(1),1039 11040 ));1041 assert_eq!(1042 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1043 01044 );1045 });1046}10471048#[test]1049fn burn_same_nft_item_twice() {1050 new_test_ext().execute_with(|| {1051 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10521053 let origin1 = Origin::signed(1);10541055 let data = default_nft_data();1056 create_test_item(collection_id, &data.into());10571058 // check balance (collection with id = 1, user id = 1)1059 assert_eq!(1060 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1061 11062 );10631064 // burn item1065 assert_ok!(TemplateModule::burn_item(1066 origin1.clone(),1067 collection_id,1068 TokenId(1),1069 11070 ));10711072 // burn item again1073 assert_noop!(1074 TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1).map_err(|e| e.error),1075 CommonError::<Test>::TokenNotFound1076 );10771078 assert_eq!(1079 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1080 01081 );1082 });1083}10841085#[test]1086fn burn_fungible_item() {1087 new_test_ext().execute_with(|| {1088 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));10891090 let origin1 = Origin::signed(1);1091 assert_ok!(TemplateModule::add_collection_admin(1092 origin1.clone(),1093 collection_id,1094 account(2)1095 ));10961097 let data = default_fungible_data();1098 create_test_item(collection_id, &data.into());10991100 // check balance (collection with id = 1, user id = 1)1101 assert_eq!(1102 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1103 51104 );11051106 // burn item1107 assert_ok!(TemplateModule::burn_item(1108 origin1.clone(),1109 CollectionId(1),1110 TokenId(0),1111 51112 ));1113 assert_noop!(1114 TemplateModule::burn_item(origin1, CollectionId(1), TokenId(0), 5).map_err(|e| e.error),1115 CommonError::<Test>::TokenValueTooLow1116 );11171118 assert_eq!(1119 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1120 01121 );1122 });1123}11241125#[test]1126fn burn_fungible_item_with_token_id() {1127 new_test_ext().execute_with(|| {1128 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));11291130 let origin1 = Origin::signed(1);1131 assert_ok!(TemplateModule::add_collection_admin(1132 origin1.clone(),1133 collection_id,1134 account(2)1135 ));11361137 let data = default_fungible_data();1138 create_test_item(collection_id, &data.into());11391140 // check balance (collection with id = 1, user id = 1)1141 assert_eq!(1142 <pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1143 51144 );11451146 // Try to burn item using Token ID1147 assert_noop!(1148 TemplateModule::burn_item(origin1, CollectionId(1), TokenId(1), 5).map_err(|e| e.error),1149 <pallet_fungible::Error::<Test>>::FungibleItemsHaveNoId1150 );1151 });1152}1153#[test]1154fn burn_refungible_item() {1155 new_test_ext().execute_with(|| {1156 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));1157 let origin1 = Origin::signed(1);11581159 assert_ok!(TemplateModule::set_mint_permission(1160 origin1.clone(),1161 collection_id,1162 true1163 ));1164 assert_ok!(TemplateModule::set_public_access_mode(1165 origin1.clone(),1166 collection_id,1167 AccessMode::AllowList1168 ));1169 assert_ok!(TemplateModule::add_to_allow_list(1170 origin1.clone(),1171 collection_id,1172 account(1)1173 ));11741175 assert_ok!(TemplateModule::add_collection_admin(1176 origin1.clone(),1177 collection_id,1178 account(2)1179 ));11801181 let data = default_re_fungible_data();1182 create_test_item(collection_id, &data.into());11831184 // check balance (collection with id = 1, user id = 2)1185 assert_eq!(1186 <pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),1187 11188 );1189 assert_eq!(1190 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1191 10231192 );11931194 // burn item1195 assert_ok!(TemplateModule::burn_item(1196 origin1.clone(),1197 collection_id,1198 TokenId(1),1199 10231200 ));1201 assert_noop!(1202 TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1023)1203 .map_err(|e| e.error),1204 CommonError::<Test>::TokenValueTooLow1205 );12061207 assert_eq!(1208 <pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1209 01210 );1211 });1212}12131214#[test]1215fn add_collection_admin() {1216 new_test_ext().execute_with(|| {1217 let collection1_id =1218 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1219 let origin1 = Origin::signed(1);12201221 // Add collection admins1222 assert_ok!(TemplateModule::add_collection_admin(1223 origin1.clone(),1224 collection1_id,1225 account(2)1226 ));1227 assert_ok!(TemplateModule::add_collection_admin(1228 origin1,1229 collection1_id,1230 account(3)1231 ));12321233 // Owner is not an admin by default1234 assert_eq!(1235 <pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(1))),1236 false1237 );1238 assert!(<pallet_common::IsAdmin<Test>>::get((1239 CollectionId(1),1240 account(2)1241 )));1242 assert!(<pallet_common::IsAdmin<Test>>::get((1243 CollectionId(1),1244 account(3)1245 )));1246 });1247}12481249#[test]1250fn remove_collection_admin() {1251 new_test_ext().execute_with(|| {1252 let collection1_id =1253 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1254 let origin1 = Origin::signed(1);1255 let origin2 = Origin::signed(2);12561257 // Add collection admins 2 and 31258 assert_ok!(TemplateModule::add_collection_admin(1259 origin1.clone(),1260 collection1_id,1261 account(2)1262 ));1263 assert_ok!(TemplateModule::add_collection_admin(1264 origin1,1265 collection1_id,1266 account(3)1267 ));12681269 assert!(<pallet_common::IsAdmin<Test>>::get((1270 CollectionId(1),1271 account(2)1272 )));1273 assert!(<pallet_common::IsAdmin<Test>>::get((1274 CollectionId(1),1275 account(3)1276 )));12771278 // remove admin 31279 assert_ok!(TemplateModule::remove_collection_admin(1280 origin2,1281 CollectionId(1),1282 account(3)1283 ));12841285 // 2 is still admin, 3 is not an admin anymore1286 assert!(<pallet_common::IsAdmin<Test>>::get((1287 CollectionId(1),1288 account(2)1289 )));1290 assert_eq!(1291 <pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(3))),1292 false1293 );1294 });1295}12961297#[test]1298fn balance_of() {1299 new_test_ext().execute_with(|| {1300 let nft_collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1301 let fungible_collection_id =1302 create_test_collection(&CollectionMode::Fungible(3), CollectionId(2));1303 let re_fungible_collection_id =1304 create_test_collection(&CollectionMode::ReFungible, CollectionId(3));13051306 // check balance before1307 assert_eq!(1308 <pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1309 01310 );1311 assert_eq!(1312 <pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1313 01314 );1315 assert_eq!(1316 <pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1317 01318 );13191320 let nft_data = default_nft_data();1321 create_test_item(nft_collection_id, &nft_data.into());13221323 let fungible_data = default_fungible_data();1324 create_test_item(fungible_collection_id, &fungible_data.into());13251326 let re_fungible_data = default_re_fungible_data();1327 create_test_item(re_fungible_collection_id, &re_fungible_data.into());13281329 // check balance (collection with id = 1, user id = 1)1330 assert_eq!(1331 <pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1332 11333 );1334 assert_eq!(1335 <pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1336 51337 );1338 assert_eq!(1339 <pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1340 11341 );13421343 assert_eq!(1344 <pallet_nonfungible::Owned<Test>>::get((nft_collection_id, account(1), TokenId(1))),1345 true1346 );1347 assert_eq!(1348 <pallet_refungible::Owned<Test>>::get((1349 re_fungible_collection_id,1350 account(1),1351 TokenId(1)1352 )),1353 true1354 );1355 });1356}13571358#[test]1359fn approve() {1360 new_test_ext().execute_with(|| {1361 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));13621363 let data = default_nft_data();1364 create_test_item(collection_id, &data.into());13651366 let origin1 = Origin::signed(1);13671368 // approve1369 assert_ok!(TemplateModule::approve(1370 origin1,1371 account(2),1372 CollectionId(1),1373 TokenId(1),1374 11375 ));1376 assert_eq!(1377 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1378 account(2)1379 );1380 });1381}13821383#[test]1384fn transfer_from() {1385 new_test_ext().execute_with(|| {1386 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1387 let origin1 = Origin::signed(1);1388 let origin2 = Origin::signed(2);13891390 let data = default_nft_data();1391 create_test_item(collection_id, &data.into());13921393 // approve1394 assert_ok!(TemplateModule::approve(1395 origin1.clone(),1396 account(2),1397 CollectionId(1),1398 TokenId(1),1399 11400 ));1401 assert_eq!(1402 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1403 account(2)1404 );14051406 assert_ok!(TemplateModule::set_mint_permission(1407 origin1.clone(),1408 CollectionId(1),1409 true1410 ));1411 assert_ok!(TemplateModule::set_public_access_mode(1412 origin1.clone(),1413 CollectionId(1),1414 AccessMode::AllowList1415 ));1416 assert_ok!(TemplateModule::add_to_allow_list(1417 origin1.clone(),1418 CollectionId(1),1419 account(1)1420 ));1421 assert_ok!(TemplateModule::add_to_allow_list(1422 origin1.clone(),1423 CollectionId(1),1424 account(2)1425 ));1426 assert_ok!(TemplateModule::add_to_allow_list(1427 origin1,1428 CollectionId(1),1429 account(3)1430 ));14311432 assert_ok!(TemplateModule::transfer_from(1433 origin2,1434 account(1),1435 account(2),1436 CollectionId(1),1437 TokenId(1),1438 11439 ));14401441 // after transfer1442 assert_eq!(1443 <pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(1))),1444 01445 );1446 assert_eq!(1447 <pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(2))),1448 11449 );1450 });1451}14521453// #endregion14541455// Coverage tests region1456// #region14571458#[test]1459fn owner_can_add_address_to_allow_list() {1460 new_test_ext().execute_with(|| {1461 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14621463 let origin1 = Origin::signed(1);1464 assert_ok!(TemplateModule::add_to_allow_list(1465 origin1,1466 collection_id,1467 account(2)1468 ));1469 assert!(<pallet_common::Allowlist<Test>>::get((1470 collection_id,1471 account(2)1472 )));1473 });1474}14751476#[test]1477fn admin_can_add_address_to_allow_list() {1478 new_test_ext().execute_with(|| {1479 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1480 let origin1 = Origin::signed(1);1481 let origin2 = Origin::signed(2);14821483 assert_ok!(TemplateModule::add_collection_admin(1484 origin1,1485 collection_id,1486 account(2)1487 ));1488 assert_ok!(TemplateModule::add_to_allow_list(1489 origin2,1490 collection_id,1491 account(3)1492 ));1493 assert!(<pallet_common::Allowlist<Test>>::get((1494 collection_id,1495 account(3)1496 )));1497 });1498}14991500#[test]1501fn nonprivileged_user_cannot_add_address_to_allow_list() {1502 new_test_ext().execute_with(|| {1503 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15041505 let origin2 = Origin::signed(2);1506 assert_noop!(1507 TemplateModule::add_to_allow_list(origin2, collection_id, account(3)),1508 CommonError::<Test>::NoPermission1509 );1510 });1511}15121513#[test]1514fn nobody_can_add_address_to_allow_list_of_nonexisting_collection() {1515 new_test_ext().execute_with(|| {1516 let origin1 = Origin::signed(1);15171518 assert_noop!(1519 TemplateModule::add_to_allow_list(origin1, CollectionId(1), account(2)),1520 CommonError::<Test>::CollectionNotFound1521 );1522 });1523}15241525#[test]1526fn nobody_can_add_address_to_allow_list_of_deleted_collection() {1527 new_test_ext().execute_with(|| {1528 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15291530 let origin1 = Origin::signed(1);1531 assert_ok!(TemplateModule::destroy_collection(1532 origin1.clone(),1533 collection_id1534 ));1535 assert_noop!(1536 TemplateModule::add_to_allow_list(origin1, collection_id, account(2)),1537 CommonError::<Test>::CollectionNotFound1538 );1539 });1540}15411542// If address is already added to allow list, nothing happens1543#[test]1544fn address_is_already_added_to_allow_list() {1545 new_test_ext().execute_with(|| {1546 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1547 let origin1 = Origin::signed(1);15481549 assert_ok!(TemplateModule::add_to_allow_list(1550 origin1.clone(),1551 collection_id,1552 account(2)1553 ));1554 assert_ok!(TemplateModule::add_to_allow_list(1555 origin1,1556 collection_id,1557 account(2)1558 ));1559 assert!(<pallet_common::Allowlist<Test>>::get((1560 collection_id,1561 account(2)1562 )));1563 });1564}15651566#[test]1567fn owner_can_remove_address_from_allow_list() {1568 new_test_ext().execute_with(|| {1569 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15701571 let origin1 = Origin::signed(1);1572 assert_ok!(TemplateModule::add_to_allow_list(1573 origin1.clone(),1574 collection_id,1575 account(2)1576 ));1577 assert_ok!(TemplateModule::remove_from_allow_list(1578 origin1,1579 collection_id,1580 account(2)1581 ));1582 assert_eq!(1583 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1584 false1585 );1586 });1587}15881589#[test]1590fn admin_can_remove_address_from_allow_list() {1591 new_test_ext().execute_with(|| {1592 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1593 let origin1 = Origin::signed(1);1594 let origin2 = Origin::signed(2);15951596 // Owner adds admin1597 assert_ok!(TemplateModule::add_collection_admin(1598 origin1.clone(),1599 collection_id,1600 account(2)1601 ));16021603 // Owner adds address 3 to allow list1604 assert_ok!(TemplateModule::add_to_allow_list(1605 origin1,1606 collection_id,1607 account(3)1608 ));16091610 // Admin removes address 3 from allow list1611 assert_ok!(TemplateModule::remove_from_allow_list(1612 origin2,1613 collection_id,1614 account(3)1615 ));1616 assert_eq!(1617 <pallet_common::Allowlist<Test>>::get((collection_id, account(3))),1618 false1619 );1620 });1621}16221623#[test]1624fn nonprivileged_user_cannot_remove_address_from_allow_list() {1625 new_test_ext().execute_with(|| {1626 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1627 let origin1 = Origin::signed(1);1628 let origin2 = Origin::signed(2);16291630 assert_ok!(TemplateModule::add_to_allow_list(1631 origin1,1632 collection_id,1633 account(2)1634 ));1635 assert_noop!(1636 TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1637 CommonError::<Test>::NoPermission1638 );1639 assert!(<pallet_common::Allowlist<Test>>::get((1640 collection_id,1641 account(2)1642 )));1643 });1644}16451646#[test]1647fn nobody_can_remove_address_from_allow_list_of_nonexisting_collection() {1648 new_test_ext().execute_with(|| {1649 let origin1 = Origin::signed(1);16501651 assert_noop!(1652 TemplateModule::remove_from_allow_list(origin1, CollectionId(1), account(2)),1653 CommonError::<Test>::CollectionNotFound1654 );1655 });1656}16571658#[test]1659fn nobody_can_remove_address_from_allow_list_of_deleted_collection() {1660 new_test_ext().execute_with(|| {1661 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1662 let origin1 = Origin::signed(1);1663 let origin2 = Origin::signed(2);16641665 // Add account 2 to allow list1666 assert_ok!(TemplateModule::add_to_allow_list(1667 origin1.clone(),1668 collection_id,1669 account(2)1670 ));16711672 // Account 2 is in collection allow-list1673 assert!(<pallet_common::Allowlist<Test>>::get((1674 collection_id,1675 account(2)1676 )));16771678 // Destroy collection1679 assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));16801681 // Attempt to remove account 2 from collection allow-list => error1682 assert_noop!(1683 TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1684 CommonError::<Test>::CollectionNotFound1685 );16861687 // Account 2 is not found in collection allow-list anyway1688 assert_eq!(1689 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1690 false1691 );1692 });1693}16941695// If address is already removed from allow list, nothing happens1696#[test]1697fn address_is_already_removed_from_allow_list() {1698 new_test_ext().execute_with(|| {1699 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1700 let origin1 = Origin::signed(1);17011702 assert_ok!(TemplateModule::add_to_allow_list(1703 origin1.clone(),1704 collection_id,1705 account(2)1706 ));1707 assert_ok!(TemplateModule::remove_from_allow_list(1708 origin1.clone(),1709 collection_id,1710 account(2)1711 ));1712 assert_eq!(1713 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1714 false1715 );1716 assert_ok!(TemplateModule::remove_from_allow_list(1717 origin1,1718 collection_id,1719 account(2)1720 ));1721 assert_eq!(1722 <pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1723 false1724 );1725 });1726}17271728// If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom (2 tests)1729#[test]1730fn allow_list_test_1() {1731 new_test_ext().execute_with(|| {1732 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));17331734 let origin1 = Origin::signed(1);17351736 let data = default_nft_data();1737 create_test_item(collection_id, &data.into());17381739 assert_ok!(TemplateModule::set_public_access_mode(1740 origin1.clone(),1741 collection_id,1742 AccessMode::AllowList1743 ));1744 assert_ok!(TemplateModule::add_to_allow_list(1745 origin1.clone(),1746 collection_id,1747 account(2)1748 ));17491750 assert_noop!(1751 TemplateModule::transfer(origin1, account(3), CollectionId(1), TokenId(1), 1)1752 .map_err(|e| e.error),1753 CommonError::<Test>::AddressNotInAllowlist1754 );1755 });1756}17571758#[test]1759fn allow_list_test_2() {1760 new_test_ext().execute_with(|| {1761 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1762 let origin1 = Origin::signed(1);17631764 let data = default_nft_data();1765 create_test_item(collection_id, &data.into());17661767 assert_ok!(TemplateModule::set_public_access_mode(1768 origin1.clone(),1769 collection_id,1770 AccessMode::AllowList1771 ));1772 assert_ok!(TemplateModule::add_to_allow_list(1773 origin1.clone(),1774 collection_id,1775 account(1)1776 ));1777 assert_ok!(TemplateModule::add_to_allow_list(1778 origin1.clone(),1779 collection_id,1780 account(2)1781 ));17821783 // do approve1784 assert_ok!(TemplateModule::approve(1785 origin1.clone(),1786 account(1),1787 collection_id,1788 TokenId(1),1789 11790 ));1791 assert_eq!(1792 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1793 account(1)1794 );17951796 assert_ok!(TemplateModule::remove_from_allow_list(1797 origin1.clone(),1798 collection_id,1799 account(1)1800 ));18011802 assert_noop!(1803 TemplateModule::transfer_from(1804 origin1,1805 account(1),1806 account(3),1807 CollectionId(1),1808 TokenId(1),1809 11810 )1811 .map_err(|e| e.error),1812 CommonError::<Test>::AddressNotInAllowlist1813 );1814 });1815}18161817// If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom (2 tests)1818#[test]1819fn allow_list_test_3() {1820 new_test_ext().execute_with(|| {1821 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18221823 let origin1 = Origin::signed(1);18241825 let data = default_nft_data();1826 create_test_item(collection_id, &data.into());18271828 assert_ok!(TemplateModule::set_public_access_mode(1829 origin1.clone(),1830 collection_id,1831 AccessMode::AllowList1832 ));1833 assert_ok!(TemplateModule::add_to_allow_list(1834 origin1.clone(),1835 collection_id,1836 account(1)1837 ));18381839 assert_noop!(1840 TemplateModule::transfer(origin1, account(3), collection_id, TokenId(1), 1)1841 .map_err(|e| e.error),1842 CommonError::<Test>::AddressNotInAllowlist1843 );1844 });1845}18461847#[test]1848fn allow_list_test_4() {1849 new_test_ext().execute_with(|| {1850 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18511852 let origin1 = Origin::signed(1);18531854 let data = default_nft_data();1855 create_test_item(collection_id, &data.into());18561857 assert_ok!(TemplateModule::set_public_access_mode(1858 origin1.clone(),1859 collection_id,1860 AccessMode::AllowList1861 ));1862 assert_ok!(TemplateModule::add_to_allow_list(1863 origin1.clone(),1864 collection_id,1865 account(1)1866 ));1867 assert_ok!(TemplateModule::add_to_allow_list(1868 origin1.clone(),1869 collection_id,1870 account(2)1871 ));18721873 // do approve1874 assert_ok!(TemplateModule::approve(1875 origin1.clone(),1876 account(1),1877 collection_id,1878 TokenId(1),1879 11880 ));1881 assert_eq!(1882 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1883 account(1)1884 );18851886 assert_ok!(TemplateModule::remove_from_allow_list(1887 origin1.clone(),1888 collection_id,1889 account(2)1890 ));18911892 assert_noop!(1893 TemplateModule::transfer_from(1894 origin1,1895 account(1),1896 account(3),1897 collection_id,1898 TokenId(1),1899 11900 )1901 .map_err(|e| e.error),1902 CommonError::<Test>::AddressNotInAllowlist1903 );1904 });1905}19061907// If Public Access mode is set to AllowList, tokens can’t be destroyed by a non-allowlisted address (even if it owned them before enabling AllowList mode)1908#[test]1909fn allow_list_test_5() {1910 new_test_ext().execute_with(|| {1911 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19121913 let origin1 = Origin::signed(1);19141915 let data = default_nft_data();1916 create_test_item(collection_id, &data.into());19171918 assert_ok!(TemplateModule::set_public_access_mode(1919 origin1.clone(),1920 collection_id,1921 AccessMode::AllowList1922 ));1923 assert_noop!(1924 TemplateModule::burn_item(origin1.clone(), CollectionId(1), TokenId(1), 1)1925 .map_err(|e| e.error),1926 CommonError::<Test>::AddressNotInAllowlist1927 );1928 });1929}19301931// If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method).1932#[test]1933fn allow_list_test_6() {1934 new_test_ext().execute_with(|| {1935 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19361937 let origin1 = Origin::signed(1);19381939 let data = default_nft_data();1940 create_test_item(collection_id, &data.into());19411942 assert_ok!(TemplateModule::set_public_access_mode(1943 origin1.clone(),1944 collection_id,1945 AccessMode::AllowList1946 ));19471948 // do approve1949 assert_noop!(1950 TemplateModule::approve(origin1, account(1), CollectionId(1), TokenId(1), 1)1951 .map_err(|e| e.error),1952 CommonError::<Test>::AddressNotInAllowlist1953 );1954 });1955}19561957// If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests) and1958// tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests)1959#[test]1960fn allow_list_test_7() {1961 new_test_ext().execute_with(|| {1962 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19631964 let data = default_nft_data();1965 create_test_item(collection_id, &data.into());19661967 let origin1 = Origin::signed(1);19681969 assert_ok!(TemplateModule::set_public_access_mode(1970 origin1.clone(),1971 collection_id,1972 AccessMode::AllowList1973 ));1974 assert_ok!(TemplateModule::add_to_allow_list(1975 origin1.clone(),1976 collection_id,1977 account(1)1978 ));1979 assert_ok!(TemplateModule::add_to_allow_list(1980 origin1.clone(),1981 collection_id,1982 account(2)1983 ));19841985 assert_ok!(TemplateModule::transfer(1986 origin1,1987 account(2),1988 CollectionId(1),1989 TokenId(1),1990 11991 ));1992 });1993}19941995#[test]1996fn allow_list_test_8() {1997 new_test_ext().execute_with(|| {1998 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19992000 // Create NFT for account 12001 let data = default_nft_data();2002 create_test_item(collection_id, &data.into());20032004 let origin1 = Origin::signed(1);20052006 // Toggle Allow List mode and add accounts 1 and 22007 assert_ok!(TemplateModule::set_public_access_mode(2008 origin1.clone(),2009 collection_id,2010 AccessMode::AllowList2011 ));2012 assert_ok!(TemplateModule::add_to_allow_list(2013 origin1.clone(),2014 collection_id,2015 account(1)2016 ));2017 assert_ok!(TemplateModule::add_to_allow_list(2018 origin1.clone(),2019 collection_id,2020 account(2)2021 ));20222023 // Sself-approve account 1 for NFT 12024 assert_ok!(TemplateModule::approve(2025 origin1.clone(),2026 account(1),2027 CollectionId(1),2028 TokenId(1),2029 12030 ));2031 assert_eq!(2032 <pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),2033 account(1)2034 );20352036 // Transfer from 1 to 22037 assert_ok!(TemplateModule::transfer_from(2038 origin1,2039 account(1),2040 account(2),2041 CollectionId(1),2042 TokenId(1),2043 12044 ));2045 });2046}20472048// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner.2049#[test]2050fn allow_list_test_9() {2051 new_test_ext().execute_with(|| {2052 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2053 let origin1 = Origin::signed(1);20542055 assert_ok!(TemplateModule::set_public_access_mode(2056 origin1.clone(),2057 collection_id,2058 AccessMode::AllowList2059 ));2060 assert_ok!(TemplateModule::set_mint_permission(2061 origin1,2062 collection_id,2063 false2064 ));20652066 let data = default_nft_data();2067 create_test_item(collection_id, &data.into());2068 });2069}20702071// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin.2072#[test]2073fn allow_list_test_10() {2074 new_test_ext().execute_with(|| {2075 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20762077 let origin1 = Origin::signed(1);2078 let origin2 = Origin::signed(2);20792080 assert_ok!(TemplateModule::set_public_access_mode(2081 origin1.clone(),2082 collection_id,2083 AccessMode::AllowList2084 ));2085 assert_ok!(TemplateModule::set_mint_permission(2086 origin1.clone(),2087 collection_id,2088 false2089 ));20902091 assert_ok!(TemplateModule::add_collection_admin(2092 origin1,2093 collection_id,2094 account(2)2095 ));20962097 assert_ok!(TemplateModule::create_item(2098 origin2,2099 collection_id,2100 account(2),2101 default_nft_data().into()2102 ));2103 });2104}21052106// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and allow listed address.2107#[test]2108fn allow_list_test_11() {2109 new_test_ext().execute_with(|| {2110 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21112112 let origin1 = Origin::signed(1);2113 let origin2 = Origin::signed(2);21142115 assert_ok!(TemplateModule::set_public_access_mode(2116 origin1.clone(),2117 collection_id,2118 AccessMode::AllowList2119 ));2120 assert_ok!(TemplateModule::set_mint_permission(2121 origin1.clone(),2122 collection_id,2123 false2124 ));2125 assert_ok!(TemplateModule::add_to_allow_list(2126 origin1,2127 collection_id,2128 account(2)2129 ));21302131 assert_noop!(2132 TemplateModule::create_item(2133 origin2,2134 CollectionId(1),2135 account(2),2136 default_nft_data().into()2137 )2138 .map_err(|e| e.error),2139 CommonError::<Test>::PublicMintingNotAllowed2140 );2141 });2142}21432144// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-allow listed address.2145#[test]2146fn allow_list_test_12() {2147 new_test_ext().execute_with(|| {2148 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21492150 let origin1 = Origin::signed(1);2151 let origin2 = Origin::signed(2);21522153 assert_ok!(TemplateModule::set_public_access_mode(2154 origin1.clone(),2155 collection_id,2156 AccessMode::AllowList2157 ));2158 assert_ok!(TemplateModule::set_mint_permission(2159 origin1,2160 collection_id,2161 false2162 ));21632164 assert_noop!(2165 TemplateModule::create_item(2166 origin2,2167 CollectionId(1),2168 account(2),2169 default_nft_data().into()2170 )2171 .map_err(|e| e.error),2172 CommonError::<Test>::PublicMintingNotAllowed2173 );2174 });2175}21762177// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner.2178#[test]2179fn allow_list_test_13() {2180 new_test_ext().execute_with(|| {2181 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21822183 let origin1 = Origin::signed(1);21842185 assert_ok!(TemplateModule::set_public_access_mode(2186 origin1.clone(),2187 collection_id,2188 AccessMode::AllowList2189 ));2190 assert_ok!(TemplateModule::set_mint_permission(2191 origin1,2192 collection_id,2193 true2194 ));21952196 let data = default_nft_data();2197 create_test_item(collection_id, &data.into());2198 });2199}22002201// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin.2202#[test]2203fn allow_list_test_14() {2204 new_test_ext().execute_with(|| {2205 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22062207 let origin1 = Origin::signed(1);2208 let origin2 = Origin::signed(2);22092210 assert_ok!(TemplateModule::set_public_access_mode(2211 origin1.clone(),2212 collection_id,2213 AccessMode::AllowList2214 ));2215 assert_ok!(TemplateModule::set_mint_permission(2216 origin1.clone(),2217 collection_id,2218 true2219 ));22202221 assert_ok!(TemplateModule::add_collection_admin(2222 origin1,2223 collection_id,2224 account(2)2225 ));22262227 assert_ok!(TemplateModule::create_item(2228 origin2,2229 collection_id,2230 account(2),2231 default_nft_data().into()2232 ));2233 });2234}22352236// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-allow listed address.2237#[test]2238fn allow_list_test_15() {2239 new_test_ext().execute_with(|| {2240 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22412242 let origin1 = Origin::signed(1);2243 let origin2 = Origin::signed(2);22442245 assert_ok!(TemplateModule::set_public_access_mode(2246 origin1.clone(),2247 collection_id,2248 AccessMode::AllowList2249 ));2250 assert_ok!(TemplateModule::set_mint_permission(2251 origin1,2252 collection_id,2253 true2254 ));22552256 assert_noop!(2257 TemplateModule::create_item(2258 origin2,2259 collection_id,2260 account(2),2261 default_nft_data().into()2262 )2263 .map_err(|e| e.error),2264 CommonError::<Test>::AddressNotInAllowlist2265 );2266 });2267}22682269// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by non-privileged and allow listed address.2270#[test]2271fn allow_list_test_16() {2272 new_test_ext().execute_with(|| {2273 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22742275 let origin1 = Origin::signed(1);2276 let origin2 = Origin::signed(2);22772278 assert_ok!(TemplateModule::set_public_access_mode(2279 origin1.clone(),2280 collection_id,2281 AccessMode::AllowList2282 ));2283 assert_ok!(TemplateModule::set_mint_permission(2284 origin1.clone(),2285 collection_id,2286 true2287 ));2288 assert_ok!(TemplateModule::add_to_allow_list(2289 origin1,2290 collection_id,2291 account(2)2292 ));22932294 assert_ok!(TemplateModule::create_item(2295 origin2,2296 collection_id,2297 account(2),2298 default_nft_data().into()2299 ));2300 });2301}23022303// Total number of collections. Positive test2304#[test]2305fn total_number_collections_bound() {2306 new_test_ext().execute_with(|| {2307 create_test_collection(&CollectionMode::NFT, CollectionId(1));2308 });2309}23102311#[test]2312fn create_max_collections() {2313 new_test_ext().execute_with(|| {2314 for i in 1..COLLECTION_NUMBER_LIMIT {2315 create_test_collection(&CollectionMode::NFT, CollectionId(i));2316 }2317 });2318}23192320// Total number of collections. Negative test2321#[test]2322fn total_number_collections_bound_neg() {2323 new_test_ext().execute_with(|| {2324 let origin1 = Origin::signed(1);23252326 for i in 1..=COLLECTION_NUMBER_LIMIT {2327 create_test_collection(&CollectionMode::NFT, CollectionId(i));2328 }23292330 let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();2331 let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();2332 let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();23332334 let data: CreateCollectionData<u64> = CreateCollectionData {2335 name: col_name1.try_into().unwrap(),2336 description: col_desc1.try_into().unwrap(),2337 token_prefix: token_prefix1.try_into().unwrap(),2338 mode: CollectionMode::NFT,2339 ..Default::default()2340 };23412342 // 11-th collection in chain. Expects error2343 assert_noop!(2344 TemplateModule::create_collection_ex(origin1, data),2345 CommonError::<Test>::TotalCollectionsLimitExceeded2346 );2347 });2348}23492350// Owned tokens by a single address. Positive test2351#[test]2352fn owned_tokens_bound() {2353 new_test_ext().execute_with(|| {2354 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23552356 let data = default_nft_data();2357 create_test_item(collection_id, &data.clone().into());2358 create_test_item(collection_id, &data.into());2359 });2360}23612362// Owned tokens by a single address. Negotive test2363#[test]2364fn owned_tokens_bound_neg() {2365 new_test_ext().execute_with(|| {2366 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23672368 let origin1 = Origin::signed(1);23692370 for _ in 1..=MAX_TOKEN_OWNERSHIP {2371 let data = default_nft_data();2372 create_test_item(collection_id, &data.clone().into());2373 }23742375 let data = default_nft_data();2376 assert_noop!(2377 TemplateModule::create_item(origin1, CollectionId(1), account(1), data.into())2378 .map_err(|e| e.error),2379 CommonError::<Test>::AccountTokenLimitExceeded2380 );2381 });2382}23832384// Number of collection admins. Positive test2385#[test]2386fn collection_admins_bound() {2387 new_test_ext().execute_with(|| {2388 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23892390 let origin1 = Origin::signed(1);23912392 assert_ok!(TemplateModule::add_collection_admin(2393 origin1.clone(),2394 collection_id,2395 account(2)2396 ));2397 assert_ok!(TemplateModule::add_collection_admin(2398 origin1,2399 collection_id,2400 account(3)2401 ));2402 });2403}24042405// Number of collection admins. Negotive test2406#[test]2407fn collection_admins_bound_neg() {2408 new_test_ext().execute_with(|| {2409 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24102411 let origin1 = Origin::signed(1);24122413 for i in 0..COLLECTION_ADMINS_LIMIT {2414 assert_ok!(TemplateModule::add_collection_admin(2415 origin1.clone(),2416 collection_id,2417 account((2 + i).into())2418 ));2419 }2420 assert_noop!(2421 TemplateModule::add_collection_admin(2422 origin1,2423 collection_id,2424 account((3 + COLLECTION_ADMINS_LIMIT).into())2425 ),2426 CommonError::<Test>::CollectionAdminCountExceeded2427 );2428 });2429}2430// #endregion24312432#[test]2433fn set_const_on_chain_schema() {2434 new_test_ext().execute_with(|| {2435 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24362437 let origin1 = Origin::signed(1);2438 assert_ok!(TemplateModule::set_const_on_chain_schema(2439 origin1,2440 collection_id,2441 b"test const on chain schema".to_vec().try_into().unwrap()2442 ));24432444 assert_eq!(2445 <pallet_common::CollectionById<Test>>::get(collection_id)2446 .unwrap()2447 .const_on_chain_schema,2448 b"test const on chain schema".to_vec()2449 );2450 assert_eq!(2451 <pallet_common::CollectionById<Test>>::get(collection_id)2452 .unwrap()2453 .variable_on_chain_schema,2454 b"".to_vec()2455 );2456 });2457}24582459#[test]2460fn set_variable_on_chain_schema() {2461 new_test_ext().execute_with(|| {2462 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24632464 let origin1 = Origin::signed(1);2465 assert_ok!(TemplateModule::set_variable_on_chain_schema(2466 origin1,2467 collection_id,2468 b"test variable on chain schema"2469 .to_vec()2470 .try_into()2471 .unwrap()2472 ));24732474 assert_eq!(2475 <pallet_common::CollectionById<Test>>::get(collection_id)2476 .unwrap()2477 .const_on_chain_schema,2478 b"".to_vec()2479 );2480 assert_eq!(2481 <pallet_common::CollectionById<Test>>::get(collection_id)2482 .unwrap()2483 .variable_on_chain_schema,2484 b"test variable on chain schema".to_vec()2485 );2486 });2487}24882489#[test]2490fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {2491 new_test_ext().execute_with(|| {2492 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24932494 let origin1 = Origin::signed(1);24952496 let data = default_nft_data();2497 create_test_item(CollectionId(1), &data.into());24982499 let variable_data = b"test data".to_vec();2500 assert_ok!(TemplateModule::set_variable_meta_data(2501 origin1,2502 collection_id,2503 TokenId(1),2504 variable_data.clone().try_into().unwrap()2505 ));25062507 assert_eq!(2508 <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2509 .unwrap()2510 .variable_data,2511 variable_data2512 );2513 });2514}25152516#[test]2517fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {2518 new_test_ext().execute_with(|| {2519 let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));25202521 let origin1 = Origin::signed(1);25222523 let data = default_re_fungible_data();2524 create_test_item(collection_id, &data.into());25252526 let variable_data = b"test data".to_vec();2527 assert_ok!(TemplateModule::set_variable_meta_data(2528 origin1,2529 collection_id,2530 TokenId(1),2531 variable_data.clone().try_into().unwrap()2532 ));25332534 assert_eq!(2535 <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1))).variable_data,2536 variable_data2537 );2538 });2539}25402541#[test]2542fn set_variable_meta_data_on_fungible_token_fails() {2543 new_test_ext().execute_with(|| {2544 let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));25452546 let origin1 = Origin::signed(1);25472548 let data = default_fungible_data();2549 create_test_item(collection_id, &data.into());25502551 let variable_data = b"test data".to_vec();2552 assert_noop!(2553 TemplateModule::set_variable_meta_data(2554 origin1,2555 collection_id,2556 TokenId(0),2557 variable_data.try_into().unwrap()2558 )2559 .map_err(|e| e.error),2560 <pallet_fungible::Error<Test>>::FungibleItemsDontHaveData2561 );2562 });2563}25642565#[test]2566fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {2567 new_test_ext().execute_with(|| {2568 //default_limits();25692570 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));25712572 let origin1 = Origin::signed(1);25732574 let data = default_nft_data();2575 create_test_item(collection_id, &data.into());25762577 assert_ok!(TemplateModule::set_meta_update_permission_flag(2578 origin1.clone(),2579 collection_id,2580 MetaUpdatePermission::ItemOwner,2581 ));25822583 let variable_data = b"ten chars.".to_vec();2584 assert_ok!(TemplateModule::set_variable_meta_data(2585 origin1,2586 collection_id,2587 TokenId(1),2588 variable_data.clone().try_into().unwrap()2589 ));25902591 assert_eq!(2592 <pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))2593 .unwrap()2594 .variable_data,2595 variable_data2596 );2597 });2598}25992600#[test]2601fn collection_transfer_flag_works() {2602 new_test_ext().execute_with(|| {2603 let origin1 = Origin::signed(1);26042605 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2606 assert_ok!(TemplateModule::set_transfers_enabled_flag(2607 origin1,2608 collection_id,2609 true2610 ));26112612 let data = default_nft_data();2613 create_test_item(collection_id, &data.into());2614 assert_eq!(2615 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2616 12617 );2618 assert_eq!(2619 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2620 true2621 );26222623 let origin1 = Origin::signed(1);26242625 // default scenario2626 assert_ok!(TemplateModule::transfer(2627 origin1,2628 account(2),2629 collection_id,2630 TokenId(1),2631 12632 ));2633 assert_eq!(2634 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2635 false2636 );2637 assert_eq!(2638 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2639 true2640 );2641 assert_eq!(2642 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2643 02644 );2645 assert_eq!(2646 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2647 12648 );2649 });2650}26512652#[test]2653fn set_variable_meta_data_on_nft_with_admin_flag() {2654 new_test_ext().execute_with(|| {2655 // default_limits();26562657 let collection_id =2658 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));26592660 let origin1 = Origin::signed(1);2661 let origin2 = Origin::signed(2);26622663 assert_ok!(TemplateModule::set_mint_permission(2664 origin2.clone(),2665 collection_id,2666 true2667 ));2668 assert_ok!(TemplateModule::add_to_allow_list(2669 origin2.clone(),2670 collection_id,2671 account(1)2672 ));26732674 assert_ok!(TemplateModule::add_collection_admin(2675 origin2.clone(),2676 collection_id,2677 account(1)2678 ));26792680 let data = default_nft_data();2681 create_test_item(collection_id, &data.into());26822683 assert_ok!(TemplateModule::set_meta_update_permission_flag(2684 origin2.clone(),2685 collection_id,2686 MetaUpdatePermission::Admin,2687 ));26882689 let variable_data = b"test.".to_vec();2690 assert_ok!(TemplateModule::set_variable_meta_data(2691 origin1,2692 collection_id,2693 TokenId(1),2694 variable_data.clone().try_into().unwrap()2695 ));26962697 assert_eq!(2698 <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2699 .unwrap()2700 .variable_data,2701 variable_data2702 );2703 });2704}27052706#[test]2707fn set_variable_meta_data_on_nft_with_admin_flag_neg() {2708 new_test_ext().execute_with(|| {2709 // default_limits();27102711 let collection_id =2712 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27132714 let origin1 = Origin::signed(1);2715 let origin2 = Origin::signed(2);27162717 assert_ok!(TemplateModule::set_mint_permission(2718 origin2.clone(),2719 collection_id,2720 true2721 ));2722 assert_ok!(TemplateModule::add_to_allow_list(2723 origin2.clone(),2724 collection_id,2725 account(1)2726 ));27272728 let data = default_nft_data();2729 create_test_item(collection_id, &data.into());27302731 assert_ok!(TemplateModule::set_meta_update_permission_flag(2732 origin2.clone(),2733 collection_id,2734 MetaUpdatePermission::Admin,2735 ));27362737 let variable_data = b"test.".to_vec();2738 assert_noop!(2739 TemplateModule::set_variable_meta_data(2740 origin1,2741 collection_id,2742 TokenId(1),2743 variable_data.try_into().unwrap()2744 )2745 .map_err(|e| e.error),2746 CommonError::<Test>::NoPermission2747 );2748 });2749}27502751#[test]2752fn set_variable_meta_flag_after_freeze() {2753 new_test_ext().execute_with(|| {2754 // default_limits();27552756 let collection_id =2757 create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27582759 let origin2 = Origin::signed(2);27602761 assert_ok!(TemplateModule::set_meta_update_permission_flag(2762 origin2.clone(),2763 collection_id,2764 MetaUpdatePermission::None,2765 ));2766 assert_noop!(2767 TemplateModule::set_meta_update_permission_flag(2768 origin2.clone(),2769 collection_id,2770 MetaUpdatePermission::Admin2771 ),2772 CommonError::<Test>::MetadataFlagFrozen2773 );2774 });2775}27762777#[test]2778fn set_variable_meta_data_on_nft_with_none_flag_neg() {2779 new_test_ext().execute_with(|| {2780 // default_limits();27812782 let collection_id =2783 create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));2784 let origin1 = Origin::signed(1);27852786 let data = default_nft_data();2787 create_test_item(collection_id, &data.into());27882789 assert_ok!(TemplateModule::set_meta_update_permission_flag(2790 origin1.clone(),2791 collection_id,2792 MetaUpdatePermission::None,2793 ));27942795 let variable_data = b"test.".to_vec();2796 assert_noop!(2797 TemplateModule::set_variable_meta_data(2798 origin1.clone(),2799 collection_id,2800 TokenId(1),2801 variable_data.try_into().unwrap()2802 )2803 .map_err(|e| e.error),2804 CommonError::<Test>::NoPermission2805 );2806 });2807}28082809#[test]2810fn collection_transfer_flag_works_neg() {2811 new_test_ext().execute_with(|| {2812 let origin1 = Origin::signed(1);28132814 let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2815 assert_ok!(TemplateModule::set_transfers_enabled_flag(2816 origin1,2817 collection_id,2818 false2819 ));28202821 let data = default_nft_data();2822 create_test_item(collection_id, &data.into());2823 assert_eq!(2824 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2825 12826 );2827 assert_eq!(2828 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2829 true2830 );28312832 let origin1 = Origin::signed(1);28332834 // default scenario2835 assert_noop!(2836 TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 1)2837 .map_err(|e| e.error),2838 CommonError::<Test>::TransferNotAllowed2839 );2840 assert_eq!(2841 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2842 12843 );2844 assert_eq!(2845 <pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2846 02847 );2848 assert_eq!(2849 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2850 true2851 );2852 assert_eq!(2853 <pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2854 false2855 );2856 });2857}28582859#[test]2860fn collection_sponsoring() {2861 new_test_ext().execute_with(|| {2862 // default_limits();2863 let user1 = 1_u64;2864 let user2 = 777_u64;2865 let origin1 = Origin::signed(user1);2866 let origin2 = Origin::signed(user2);2867 let account2 = account(user2);28682869 let collection_id =2870 create_test_collection_for_owner(&CollectionMode::NFT, user1, CollectionId(1));2871 assert_ok!(TemplateModule::set_collection_sponsor(2872 origin1.clone(),2873 collection_id,2874 user12875 ));2876 assert_ok!(TemplateModule::confirm_sponsorship(2877 origin1.clone(),2878 collection_id2879 ));28802881 // Expect error while have no permissions2882 assert!(TemplateModule::create_item(2883 origin2.clone(),2884 collection_id,2885 account2.clone(),2886 default_nft_data().into()2887 )2888 .is_err());28892890 assert_ok!(TemplateModule::set_public_access_mode(2891 origin1.clone(),2892 collection_id,2893 AccessMode::AllowList2894 ));2895 assert_ok!(TemplateModule::add_to_allow_list(2896 origin1.clone(),2897 collection_id,2898 account2.clone()2899 ));2900 assert_ok!(TemplateModule::set_mint_permission(2901 origin1.clone(),2902 collection_id,2903 true2904 ));29052906 assert_ok!(TemplateModule::create_item(2907 origin2,2908 collection_id,2909 account2,2910 default_nft_data().into()2911 ));2912 });2913}primitives/data-structs/Cargo.tomldiffbeforeafterboth--- a/primitives/data-structs/Cargo.toml
+++ b/primitives/data-structs/Cargo.toml
@@ -9,18 +9,20 @@
version = '0.1.0'
[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
-codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
+ "derive",
+] }
+codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false, features = [
'derive',
] }
serde = { version = "1.0.130", features = [
'derive',
], default-features = false, optional = true }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
derivative = "2.2.0"
[features]
primitives/evm-mapping/Cargo.tomldiffbeforeafterboth--- a/primitives/evm-mapping/Cargo.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-[package]
-name = "up-evm-mapping"
-version = "0.1.0"
-license = "GPLv3"
-edition = "2021"
-
-[dependencies]
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-
-[features]
-default = ["std"]
-std = ["sp-core/std", "frame-support/std"]
primitives/evm-mapping/src/lib.rsdiffbeforeafterboth--- a/primitives/evm-mapping/src/lib.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
-// This file is part of Unique Network.
-
-// Unique Network is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// Unique Network is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
-
-#![cfg_attr(not(feature = "std"), no_std)]
-
-use frame_support::sp_runtime::AccountId32;
-use sp_core::H160;
-
-/// Transforms substrate addresses to ethereum (Reverse of `EvmAddressMapping`)
-/// pallet_evm doesn't have this, as it only checks if eth address
-/// is owned by substrate via `EnsureAddressOrigin` trait
-///
-/// This trait implementations shouldn't conflict with used `EnsureAddressOrigin`
-pub trait EvmBackwardsAddressMapping<AccountId> {
- fn from_account_id(account_id: AccountId) -> H160;
-}
-
-/// Should have same mapping as EnsureAddressTruncated
-pub struct MapBackwardsAddressTruncated;
-impl EvmBackwardsAddressMapping<AccountId32> for MapBackwardsAddressTruncated {
- fn from_account_id(account_id: AccountId32) -> H160 {
- let mut out = [0; 20];
- out.copy_from_slice(&(account_id.as_ref() as &[u8])[0..20]);
- H160(out)
- }
-}
primitives/rpc/Cargo.tomldiffbeforeafterboth--- a/primitives/rpc/Cargo.toml
+++ b/primitives/rpc/Cargo.toml
@@ -7,13 +7,14 @@
[dependencies]
pallet-common = { default-features = false, path = '../../pallets/common' }
up-data-structs = { default-features = false, path = '../data-structs' }
-codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [
+codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false, features = [
"derive",
] }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-api = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.17' }
+sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-api = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.18' }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
[features]
default = ["std"]
primitives/rpc/src/lib.rsdiffbeforeafterboth--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -28,7 +28,7 @@
#[api_version(2)]
pub trait UniqueApi<CrossAccountId, AccountId> where
AccountId: Decode,
- CrossAccountId: pallet_common::account::CrossAccountId<AccountId>,
+ CrossAccountId: pallet_evm::account::CrossAccountId<AccountId>,
{
#[changed_in(2)]
fn token_owner(collection: CollectionId, token: TokenId) -> Result<CrossAccountId>;
runtime/common/Cargo.tomldiffbeforeafterboth--- a/runtime/common/Cargo.toml
+++ b/runtime/common/Cargo.toml
@@ -6,7 +6,7 @@
license = 'All Rights Reserved'
name = 'unique-runtime-common'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.1.0'
+version = '0.9.18'
[features]
default = ['std']
@@ -23,39 +23,39 @@
runtime-benchmarks = [
'sp-runtime/runtime-benchmarks',
'frame-support/runtime-benchmarks',
- 'frame-system/runtime-benchmarks'
+ 'frame-system/runtime-benchmarks',
]
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.codec]
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[dependencies.scale-info]
default-features = false
features = ["derive"]
-version = "1.0.0"
+version = "2.0.1"
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-common]
default-features = false
@@ -64,9 +64,12 @@
[dependencies.sp-consensus-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.fp-rpc]
default-features = false
git = "https://github.com/uniquenetwork/frontier.git"
-branch = "unique-polkadot-v0.9.17"
+branch = "unique-polkadot-v0.9.18-2"
+
+[dependencies]
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
\ No newline at end of file
runtime/common/src/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/src/runtime_apis.rs
+++ b/runtime/common/src/runtime_apis.rs
@@ -185,7 +185,7 @@
};
<Runtime as pallet_evm::Config>::Runner::call(
- from,
+ CrossAccountId::from_eth(from),
to,
data,
value,
@@ -219,7 +219,7 @@
};
<Runtime as pallet_evm::Config>::Runner::create(
- from,
+ CrossAccountId::from_eth(from),
data,
value,
gas_limit.low_u64(),
runtime/common/src/types.rsdiffbeforeafterboth--- a/runtime/common/src/types.rs
+++ b/runtime/common/src/types.rs
@@ -42,7 +42,7 @@
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub trait RuntimeInstance {
- type CrossAccountId: pallet_common::account::CrossAccountId<sp_runtime::AccountId32>
+ type CrossAccountId: pallet_evm::account::CrossAccountId<sp_runtime::AccountId32>
+ Send
+ Sync
+ 'static;
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -10,7 +10,7 @@
license = 'GPLv3'
name = 'opal-runtime'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.1.0'
+version = '0.9.18'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
@@ -72,7 +72,7 @@
'pallet-base-fee/std',
'fp-rpc/std',
'up-rpc/std',
- 'up-evm-mapping/std',
+ 'fp-evm-mapping/std',
'fp-self-contained/std',
'parachain-info/std',
'serde',
@@ -113,39 +113,39 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[dependencies.frame-benchmarking]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-executive]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system-benchmarking]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system-rpc-runtime-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.hex-literal]
optional = true
@@ -160,131 +160,131 @@
[dependencies.pallet-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
# Contracts specific packages
# [dependencies.pallet-contracts]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
# [dependencies.pallet-contracts-primitives]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
# [dependencies.pallet-contracts-rpc-runtime-api]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
[dependencies.pallet-randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-sudo]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-transaction-payment-rpc-runtime-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-treasury]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
# [dependencies.pallet-vesting]
# default-features = false
# git = 'https://github.com/paritytech/substrate.git'
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
[dependencies.sp-arithmetic]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-block-builder]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-consensus-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-inherents]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-offchain]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-session]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-transaction-pool]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-version]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.smallvec]
version = '1.6.1'
@@ -294,47 +294,47 @@
[dependencies.parachain-info]
default-features = false
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-pallet-aura-ext]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-parachain-system]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-core]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-xcm]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-dmp-queue]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-xcmp-queue]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-utility]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-timestamp]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
################################################################################
@@ -342,32 +342,32 @@
[dependencies.polkadot-parachain]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm-builder]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm-executor]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.pallet-xcm]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.orml-vesting]
git = 'https://github.com/UniqueNetwork/open-runtime-module-library'
-branch = 'unique-polkadot-v0.9.17'
+branch = 'unique-polkadot-v0.9.18'
version = "0.4.1-dev"
default-features = false
@@ -376,13 +376,13 @@
[dependencies]
unique-runtime-common = { path = "../common", default-features = false }
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
derivative = "2.2.0"
pallet-unique = { path = '../../pallets/unique', default-features = false }
up-rpc = { path = "../../primitives/rpc", default-features = false }
-up-evm-mapping = { path = "../../primitives/evm-mapping", default-features = false }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
pallet-inflation = { path = '../../pallets/inflation', default-features = false }
up-data-structs = { path = '../../primitives/data-structs', default-features = false }
pallet-common = { default-features = false, path = "../../pallets/common" }
@@ -391,20 +391,20 @@
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
pallet-unq-scheduler = { path = '../../pallets/scheduler', default-features = false }
# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
-pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.17', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
+pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }
pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }
pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
################################################################################
# Build Dependencies
[build-dependencies.substrate-wasm-builder]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -48,7 +48,9 @@
};
// A few exports that help ease life for downstream crates.
pub use pallet_balances::Call as BalancesCall;
-pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};
+pub use pallet_evm::{
+ EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _,
+};
pub use frame_support::{
construct_runtime, match_type,
dispatch::DispatchResult,
@@ -114,13 +116,13 @@
use unique_runtime_common::{impl_common_runtime_apis, types::*, constants::*};
-pub const RUNTIME_NAME: &str = "Opal";
+pub const RUNTIME_NAME: &str = "opal";
+pub const TOKEN_SYMBOL: &str = "OPL";
-type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;
+type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
impl RuntimeInstance for Runtime {
type CrossAccountId = self::CrossAccountId;
-
type TransactionConverter = self::TransactionConverter;
fn get_transaction_converter() -> TransactionConverter {
@@ -128,6 +130,22 @@
}
}
+/// The type for looking up accounts. We don't expect more than 4 billion of them, but you
+/// never know...
+pub type AccountIndex = u32;
+
+/// Balance of an account.
+pub type Balance = u128;
+
+/// Index of a transaction in the chain.
+pub type Index = u32;
+
+/// A hash of some data used by the chain.
+pub type Hash = sp_core::H256;
+
+/// Digest item type.
+pub type DigestItem = generic::DigestItem;
+
/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
/// the specifics of the runtime. They can then be made to be agnostic over specific formats
/// of data like extrinsics, allowing for them to continue syncing the network through upgrades
@@ -151,7 +169,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 917004,
+ spec_version: 918001,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
@@ -257,6 +275,12 @@
}
}
+impl pallet_evm::account::Config for Runtime {
+ type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;
+ type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;
+ type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
+}
+
impl pallet_evm::Config for Runtime {
type BlockGasLimit = BlockGasLimit;
type FeeCalculator = FixedFee;
@@ -815,6 +839,7 @@
}
impl cumulus_pallet_xcmp_queue::Config for Runtime {
+ type WeightInfo = ();
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
@@ -843,10 +868,6 @@
impl pallet_common::Config for Runtime {
type Event = Event;
- type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
- type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
- type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;
-
type Currency = Balances;
type CollectionCreationPrice = CollectionCreationPrice;
type TreasuryAccountId = TreasuryAccountId;
@@ -910,8 +931,6 @@
impl pallet_evm_transaction_payment::Config for Runtime {
type EvmSponsorshipHandler = EvmSponsorshipHandler;
type Currency = Balances;
- type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
- type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
}
impl pallet_charge_transaction::Config for Runtime {
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -10,7 +10,7 @@
license = 'GPLv3'
name = 'quartz-runtime'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.1.0'
+version = '0.9.18'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
@@ -72,7 +72,7 @@
'pallet-base-fee/std',
'fp-rpc/std',
'up-rpc/std',
- 'up-evm-mapping/std',
+ 'fp-evm-mapping/std',
'fp-self-contained/std',
'parachain-info/std',
'serde',
@@ -113,39 +113,39 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[dependencies.frame-benchmarking]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-executive]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system-benchmarking]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system-rpc-runtime-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.hex-literal]
optional = true
@@ -160,131 +160,131 @@
[dependencies.pallet-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
# Contracts specific packages
# [dependencies.pallet-contracts]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
# [dependencies.pallet-contracts-primitives]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
# [dependencies.pallet-contracts-rpc-runtime-api]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
[dependencies.pallet-randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-sudo]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-transaction-payment-rpc-runtime-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-treasury]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
# [dependencies.pallet-vesting]
# default-features = false
# git = 'https://github.com/paritytech/substrate.git'
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
[dependencies.sp-arithmetic]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-block-builder]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-consensus-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-inherents]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-offchain]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-session]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-transaction-pool]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-version]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.smallvec]
version = '1.6.1'
@@ -294,47 +294,47 @@
[dependencies.parachain-info]
default-features = false
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-pallet-aura-ext]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-parachain-system]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-core]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-xcm]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-dmp-queue]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-xcmp-queue]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-utility]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-timestamp]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
################################################################################
@@ -342,32 +342,32 @@
[dependencies.polkadot-parachain]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm-builder]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm-executor]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.pallet-xcm]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.orml-vesting]
git = 'https://github.com/UniqueNetwork/open-runtime-module-library'
-branch = 'unique-polkadot-v0.9.17'
+branch = 'unique-polkadot-v0.9.18'
version = "0.4.1-dev"
default-features = false
@@ -376,13 +376,13 @@
[dependencies]
unique-runtime-common = { path = "../common", default-features = false }
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
derivative = "2.2.0"
pallet-unique = { path = '../../pallets/unique', default-features = false }
up-rpc = { path = "../../primitives/rpc", default-features = false }
-up-evm-mapping = { path = "../../primitives/evm-mapping", default-features = false }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
pallet-inflation = { path = '../../pallets/inflation', default-features = false }
up-data-structs = { path = '../../primitives/data-structs', default-features = false }
pallet-common = { default-features = false, path = "../../pallets/common" }
@@ -391,20 +391,20 @@
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
pallet-unq-scheduler = { path = '../../pallets/scheduler', default-features = false }
# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
-pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.17', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
+pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }
pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }
pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
################################################################################
# Build Dependencies
[build-dependencies.substrate-wasm-builder]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -48,7 +48,9 @@
};
// A few exports that help ease life for downstream crates.
pub use pallet_balances::Call as BalancesCall;
-pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};
+pub use pallet_evm::{
+ EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _,
+};
pub use frame_support::{
construct_runtime, match_type,
dispatch::DispatchResult,
@@ -114,9 +116,10 @@
use unique_runtime_common::{impl_common_runtime_apis, types::*, constants::*};
-pub const RUNTIME_NAME: &str = "Quartz";
+pub const RUNTIME_NAME: &str = "quartz";
+pub const TOKEN_SYMBOL: &str = "QTZ";
-type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;
+type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
impl RuntimeInstance for Runtime {
type CrossAccountId = self::CrossAccountId;
@@ -151,7 +154,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 917004,
+ spec_version: 918001,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
@@ -815,6 +818,7 @@
}
impl cumulus_pallet_xcmp_queue::Config for Runtime {
+ type WeightInfo = ();
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
@@ -843,15 +847,18 @@
impl pallet_common::Config for Runtime {
type Event = Event;
- type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
- type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
- type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;
type Currency = Balances;
type CollectionCreationPrice = CollectionCreationPrice;
type TreasuryAccountId = TreasuryAccountId;
}
+impl pallet_evm::account::Config for Runtime {
+ type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;
+ type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
+ type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
+}
+
impl pallet_fungible::Config for Runtime {
type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;
}
@@ -910,8 +917,6 @@
impl pallet_evm_transaction_payment::Config for Runtime {
type EvmSponsorshipHandler = EvmSponsorshipHandler;
type Currency = Balances;
- type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
- type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
}
impl pallet_charge_transaction::Config for Runtime {
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -10,7 +10,7 @@
license = 'GPLv3'
name = 'unique-runtime'
repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.17'
+version = '0.9.18'
[package.metadata.docs.rs]
targets = ['x86_64-unknown-linux-gnu']
@@ -72,7 +72,7 @@
'pallet-base-fee/std',
'fp-rpc/std',
'up-rpc/std',
- 'up-evm-mapping/std',
+ 'fp-evm-mapping/std',
'fp-self-contained/std',
'parachain-info/std',
'serde',
@@ -113,39 +113,39 @@
default-features = false
features = ['derive']
package = 'parity-scale-codec'
-version = '2.3.0'
+version = '3.1.2'
[dependencies.frame-benchmarking]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-executive]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-support]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system-benchmarking]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
optional = true
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.frame-system-rpc-runtime-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.hex-literal]
optional = true
@@ -160,131 +160,131 @@
[dependencies.pallet-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-balances]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
# Contracts specific packages
# [dependencies.pallet-contracts]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
# [dependencies.pallet-contracts-primitives]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
# [dependencies.pallet-contracts-rpc-runtime-api]
# git = 'https://github.com/paritytech/substrate.git'
# default-features = false
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
# version = '4.0.0-dev'
[dependencies.pallet-randomness-collective-flip]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-sudo]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-timestamp]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-transaction-payment]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-transaction-payment-rpc-runtime-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.pallet-treasury]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
# [dependencies.pallet-vesting]
# default-features = false
# git = 'https://github.com/paritytech/substrate.git'
-# branch = 'polkadot-v0.9.17'
+# branch = 'polkadot-v0.9.18'
[dependencies.sp-arithmetic]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-api]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-block-builder]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-core]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-consensus-aura]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-inherents]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-io]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-offchain]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-runtime]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-session]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-std]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-transaction-pool]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.sp-version]
default-features = false
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
[dependencies.smallvec]
version = '1.6.1'
@@ -294,47 +294,47 @@
[dependencies.parachain-info]
default-features = false
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
[dependencies.cumulus-pallet-aura-ext]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-parachain-system]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-core]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-xcm]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-dmp-queue]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-pallet-xcmp-queue]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-utility]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
[dependencies.cumulus-primitives-timestamp]
-git = 'https://github.com/uniqueNetwork/cumulus.git'
-branch = 'polkadot-v0.9.17'
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.18'
default-features = false
################################################################################
@@ -342,32 +342,32 @@
[dependencies.polkadot-parachain]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm-builder]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.xcm-executor]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.pallet-xcm]
git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.17'
+branch = 'release-v0.9.18'
default-features = false
[dependencies.orml-vesting]
git = 'https://github.com/UniqueNetwork/open-runtime-module-library'
-branch = 'unique-polkadot-v0.9.17'
+branch = 'unique-polkadot-v0.9.18'
version = "0.4.1-dev"
default-features = false
@@ -376,13 +376,12 @@
[dependencies]
unique-runtime-common = { path = "../common", default-features = false }
-scale-info = { version = "1.0.0", default-features = false, features = [
+scale-info = { version = "2.0.1", default-features = false, features = [
"derive",
] }
derivative = "2.2.0"
pallet-unique = { path = '../../pallets/unique', default-features = false }
up-rpc = { path = "../../primitives/rpc", default-features = false }
-up-evm-mapping = { path = "../../primitives/evm-mapping", default-features = false }
pallet-inflation = { path = '../../pallets/inflation', default-features = false }
up-data-structs = { path = '../../primitives/data-structs', default-features = false }
pallet-common = { default-features = false, path = "../../pallets/common" }
@@ -391,20 +390,21 @@
pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }
pallet-unq-scheduler = { path = '../../pallets/scheduler', default-features = false }
# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
-pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.17', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
+pallet-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", branch = 'polkadot-v0.9.18', package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }
pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }
pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.17" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.18-2" }
################################################################################
# Build Dependencies
[build-dependencies.substrate-wasm-builder]
git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.17'
+branch = 'polkadot-v0.9.18'
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -48,7 +48,9 @@
};
// A few exports that help ease life for downstream crates.
pub use pallet_balances::Call as BalancesCall;
-pub use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping, Runner};
+pub use pallet_evm::{
+ EnsureAddressTruncated, HashedAddressMapping, Runner, account::CrossAccountId as _,
+};
pub use frame_support::{
construct_runtime, match_type,
dispatch::DispatchResult,
@@ -113,9 +115,10 @@
use unique_runtime_common::{impl_common_runtime_apis, types::*, constants::*};
-pub const RUNTIME_NAME: &str = "Unique";
+pub const RUNTIME_NAME: &str = "unique";
+pub const TOKEN_SYMBOL: &str = "UNQ";
-type CrossAccountId = pallet_common::account::BasicCrossAccountId<Runtime>;
+type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
impl RuntimeInstance for Runtime {
type CrossAccountId = self::CrossAccountId;
@@ -150,7 +153,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 917004,
+ spec_version: 918001,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
@@ -814,6 +817,7 @@
}
impl cumulus_pallet_xcmp_queue::Config for Runtime {
+ type WeightInfo = ();
type Event = Event;
type XcmExecutor = XcmExecutor<XcmConfig>;
type ChannelInfo = ParachainSystem;
@@ -842,15 +846,17 @@
impl pallet_common::Config for Runtime {
type Event = Event;
- type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
- type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
- type CrossAccountId = pallet_common::account::BasicCrossAccountId<Self>;
-
type Currency = Balances;
type CollectionCreationPrice = CollectionCreationPrice;
type TreasuryAccountId = TreasuryAccountId;
}
+impl pallet_evm::account::Config for Runtime {
+ type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Self>;
+ type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
+ type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
+}
+
impl pallet_fungible::Config for Runtime {
type WeightInfo = pallet_fungible::weights::SubstrateWeight<Self>;
}
@@ -909,8 +915,6 @@
impl pallet_evm_transaction_payment::Config for Runtime {
type EvmSponsorshipHandler = EvmSponsorshipHandler;
type Currency = Balances;
- type EvmAddressMapping = HashedAddressMapping<Self::Hashing>;
- type EvmBackwardsAddressMapping = up_evm_mapping::MapBackwardsAddressTruncated;
}
impl pallet_charge_transaction::Config for Runtime {
tests/README.mddiffbeforeafterboth--- a/tests/README.md
+++ b/tests/README.md
@@ -5,7 +5,7 @@
1. Checkout polkadot in sibling folder with this project
```bash
git clone https://github.com/paritytech/polkadot.git && cd polkadot
-git checkout release-v0.9.17
+git checkout release-v0.9.18
```
2. Build with nightly-2021-11-11
@@ -20,7 +20,7 @@
git clone https://github.com/paritytech/polkadot-launch && cd polkadot-launch
```
-5. Run launch-test-env.sh from the root of this project
+5. Run launch-testnet.sh from the root of this project
## How to run tests
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -95,5 +95,8 @@
"contract",
"artifacts"
]
+ },
+ "resolutions": {
+ "simple-get": "^4.0.1"
}
}
tests/src/eth/base.test.tsdiffbeforeafterboth--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -34,7 +34,8 @@
const userB = createEthAccount(web3);
const cost = await recordEthFee(api, userA, () => web3.eth.sendTransaction({from: userA, to: userB, value: '1000000', ...GAS_ARGS}));
- expect(cost - await ethBalanceViaSub(api, userB) < BigInt(0.2 * Number(UNIQUE))).to.be.true;
+ const balanceB = await ethBalanceViaSub(api, userB);
+ expect(cost - balanceB < BigInt(0.2 * Number(UNIQUE))).to.be.true;
});
itWeb3('NFT transfer is close to 0.15 UNQ', async ({web3, api}) => {
tests/src/eth/collectionSponsoring.test.tsdiffbeforeafterboth--- /dev/null
+++ b/tests/src/eth/collectionSponsoring.test.ts
@@ -0,0 +1,43 @@
+import privateKey from '../substrate/privateKey';
+import {addToAllowListExpectSuccess, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, enablePublicMintingExpectSuccess, setCollectionSponsorExpectSuccess} from '../util/helpers';
+import {itWeb3, transferBalanceToEth, subToEth, createEthAccount, collectionIdToAddress, GAS_ARGS, normalizeEvents} from './util/helpers';
+import nonFungibleAbi from './nonFungibleAbi.json';
+import {expect} from 'chai';
+
+describe('evm collection sponsoring', () => {
+ itWeb3('sponsors mint transactions', async ({api, web3}) => {
+ const alice = privateKey('//Alice');
+
+ const collection = await createCollectionExpectSuccess();
+ await setCollectionSponsorExpectSuccess(collection, alice.address);
+ await confirmSponsorshipExpectSuccess(collection);
+
+ // Wouldn't be needed after CORE-300
+ await transferBalanceToEth(api, alice, subToEth(alice.address));
+
+ const minter = createEthAccount(web3);
+ expect(await web3.eth.getBalance(minter)).to.equal('0');
+
+ const address = collectionIdToAddress(collection);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, collectionIdToAddress(collection), {from: minter, ...GAS_ARGS});
+
+ await enablePublicMintingExpectSuccess(alice, collection);
+ await addToAllowListExpectSuccess(alice, collection, {Ethereum: minter});
+
+ const nextTokenId = await contract.methods.nextTokenId().call();
+ expect(nextTokenId).to.equal('1');
+ const result = await contract.methods.mint(minter, nextTokenId).send();
+ const events = normalizeEvents(result.events);
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: '0x0000000000000000000000000000000000000000',
+ to: minter,
+ tokenId: nextTokenId,
+ },
+ },
+ ]);
+ });
+});
tests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -24,7 +24,24 @@
itWeb3,
SponsoringMode,
createEthAccount,
+ collectionIdToAddress,
+ GAS_ARGS,
+ normalizeEvents,
+ subToEth,
+ executeEthTxOnSub,
} from './util/helpers';
+import {
+ addCollectionAdminExpectSuccess,
+ createCollectionExpectSuccess,
+ getCreateCollectionResult,
+ transferBalanceTo,
+} from '../util/helpers';
+import nonFungibleAbi from './nonFungibleAbi.json';
+import {
+ submitTransactionAsync,
+} from '../substrate/substrate-api';
+import getBalance from '../substrate/get-balance';
+import {alicesPublicKey} from '../accounts';
describe('Sponsoring EVM contracts', () => {
itWeb3('Sponsoring can be set by the address that has deployed the contract', async ({api, web3}) => {
@@ -199,4 +216,115 @@
const helpers = contractHelpers(web3, owner);
expect(await helpers.methods.getSponsoringRateLimit(flipper.options.address).call()).to.be.equals('7200');
});
+
+ itWeb3('Sponsoring evm address from substrate collection', async ({api, web3}) => {
+ const owner = privateKey('//Alice');
+ const userEth = createEthAccount(web3);
+ const collectionId = await createCollectionExpectSuccess();
+
+ {
+ const tx = api.tx.unique.setCollectionSponsor(collectionId, owner.address);
+ const events = await submitTransactionAsync(owner, tx);
+ const result = getCreateCollectionResult(events);
+ expect(result.success).to.be.true;
+ }
+ {
+ const tx = api.tx.unique.confirmSponsorship(collectionId);
+ const events = await submitTransactionAsync(owner, tx);
+ const result = getCreateCollectionResult(events);
+ expect(result.success).to.be.true;
+ }
+
+ const address = collectionIdToAddress(collectionId);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: userEth, ...GAS_ARGS});
+
+ { // This part should fail, because user not in access list and user have no money
+ const nextTokenId = await contract.methods.nextTokenId().call();
+ expect(nextTokenId).to.be.equal('1');
+ await expect(contract.methods.mintWithTokenURI(
+ userEth,
+ nextTokenId,
+ 'Test URI',
+ ).call({from: userEth})).to.be.rejectedWith(/PublicMintingNotAllowed/);
+ }
+
+ {
+ const tx = api.tx.unique.setPublicAccessMode(collectionId, 'AllowList');
+ const events = await submitTransactionAsync(owner, tx);
+ const result = getCreateCollectionResult(events);
+ expect(result.success).to.be.true;
+ }
+ {
+ const tx = api.tx.unique.addToAllowList(collectionId, {Ethereum: userEth});
+ const events = await submitTransactionAsync(owner, tx);
+ const result = getCreateCollectionResult(events);
+ expect(result.success).to.be.true;
+ }
+ {
+ const tx = api.tx.unique.setMintPermission(collectionId, true);
+ const events = await submitTransactionAsync(owner, tx);
+ const result = getCreateCollectionResult(events);
+ expect(result.success).to.be.true;
+ }
+
+ const [alicesBalanceBefore] = await getBalance(api, [alicesPublicKey]);
+
+ {
+ const nextTokenId = await contract.methods.nextTokenId().call();
+ expect(nextTokenId).to.be.equal('1');
+ const result = await contract.methods.mintWithTokenURI(
+ userEth,
+ nextTokenId,
+ 'Test URI',
+ ).send({from: userEth});
+ const events = normalizeEvents(result.events);
+
+ expect(events).to.be.deep.equal([
+ {
+ address,
+ event: 'Transfer',
+ args: {
+ from: '0x0000000000000000000000000000000000000000',
+ to: userEth,
+ tokenId: nextTokenId,
+ },
+ },
+ ]);
+
+ expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
+ }
+
+ const [alicesBalanceAfter] = await getBalance(api, [alicesPublicKey]);
+ expect(alicesBalanceAfter < alicesBalanceBefore).to.be.true;
+ });
+
+
+ itWeb3('Check that transaction via EVM spend money from substrate address', async ({api, web3}) => {
+ const owner = privateKey('//Alice');
+ const user = privateKey(`//User/${Date.now()}`);
+ const userEth = subToEth(user.address);
+ const collectionId = await createCollectionExpectSuccess();
+ await addCollectionAdminExpectSuccess(owner, collectionId, {Ethereum: userEth});
+ await transferBalanceTo(api, owner, user.address);
+
+ const address = collectionIdToAddress(collectionId);
+ const contract = new web3.eth.Contract(nonFungibleAbi as any, address, {from: userEth, ...GAS_ARGS});
+
+ const [userBalanceBefore] = await getBalance(api, [user.address]);
+
+ {
+ const nextTokenId = await contract.methods.nextTokenId().call();
+ expect(nextTokenId).to.be.equal('1');
+ await executeEthTxOnSub(web3, api, user, contract, m => m.mintWithTokenURI(
+ userEth,
+ nextTokenId,
+ 'Test URI',
+ ));
+
+ expect(await contract.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI');
+ }
+
+ const [userBalanceAfter] = await getBalance(api, [user.address]);
+ expect(userBalanceAfter < userBalanceBefore).to.be.true;
+ });
});
tests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth--- a/tests/src/eth/marketplace/marketplace.test.ts
+++ b/tests/src/eth/marketplace/marketplace.test.ts
@@ -15,13 +15,24 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
import {readFile} from 'fs/promises';
-import {getBalanceSingle, transferBalanceExpectSuccess} from '../../substrate/get-balance';
+import {getBalanceSingle} from '../../substrate/get-balance';
import privateKey from '../../substrate/privateKey';
-import {addToAllowListExpectSuccess, confirmSponsorshipExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, createItemExpectSuccess, getTokenOwner, setCollectionLimitsExpectSuccess, setCollectionSponsorExpectSuccess, transferExpectSuccess, transferFromExpectSuccess} from '../../util/helpers';
+import {
+ addToAllowListExpectSuccess,
+ confirmSponsorshipExpectSuccess,
+ createCollectionExpectSuccess,
+ createItemExpectSuccess,
+ getTokenOwner,
+ setCollectionLimitsExpectSuccess,
+ setCollectionSponsorExpectSuccess,
+ transferExpectSuccess,
+ transferFromExpectSuccess,
+ transferBalanceTo,
+} from '../../util/helpers';
import {collectionIdToAddress, contractHelpers, createEthAccountWithBalance, executeEthTxOnSub, GAS_ARGS, itWeb3, SponsoringMode, subToEth, subToEthLowercase, transferBalanceToEth} from '../util/helpers';
import {evmToAddress} from '@polkadot/util-crypto';
import nonFungibleAbi from '../nonFungibleAbi.json';
-import fungibleAbi from '../fungibleAbi.json';
+
import {expect} from 'chai';
const PRICE = 2000n;
@@ -87,32 +98,39 @@
expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Substrate: alice.address});
});
- // selling for custom tokens excluded from release
- itWeb3.skip('With custom ERC20', async ({api, web3}) => {
+
+ itWeb3('With escrow', async ({api, web3}) => {
const alice = privateKey('//Alice');
const matcherOwner = await createEthAccountWithBalance(api, web3);
+ const escrow = await createEthAccountWithBalance(api, web3);
const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {
from: matcherOwner,
...GAS_ARGS,
});
- const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner});
+ const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner, gas: 10000000});
+ await matcher.methods.setEscrow(escrow).send({from: matcherOwner});
+ const helpers = contractHelpers(web3, matcherOwner);
+ await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner});
+ await helpers.methods.setSponsoringRateLimit(matcher.options.address, 1).send({from: matcherOwner});
+ await transferBalanceToEth(api, alice, matcher.options.address);
const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
+ await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorApproveTimeout: 1});
const evmCollection = new web3.eth.Contract(nonFungibleAbi as any, collectionIdToAddress(collectionId), {from: matcherOwner});
+ await setCollectionSponsorExpectSuccess(collectionId, alice.address);
+ await transferBalanceToEth(api, alice, subToEth(alice.address));
+ await confirmSponsorshipExpectSuccess(collectionId);
- const fungibleId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
- const evmFungible = new web3.eth.Contract(fungibleAbi as any, collectionIdToAddress(fungibleId), {from: matcherOwner, ...GAS_ARGS});
- await createFungibleItemExpectSuccess(alice, fungibleId, {Value: PRICE}, {Ethereum: subToEth(alice.address)});
+ await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner});
+ await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address)));
- const seller = privateKey('//Bob');
+ const seller = privateKey(`//Seller/${Date.now()}`);
+ await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner});
const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);
// To transfer item to matcher it first needs to be transfered to EVM account of bob
await transferExpectSuccess(collectionId, tokenId, seller, {Ethereum: subToEth(seller.address)});
- // Fees will be paid from EVM account, so we should have some balance here
- await transferBalanceExpectSuccess(api, seller, evmToAddress(subToEth(seller.address)), 10n ** 18n);
- await transferBalanceExpectSuccess(api, alice, evmToAddress(subToEth(alice.address)), 10n ** 18n);
// Token is owned by seller initially
expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: subToEthLowercase(seller.address)});
@@ -120,66 +138,55 @@
// Ask
{
await executeEthTxOnSub(web3, api, seller, evmCollection, m => m.approve(matcher.options.address, tokenId));
- await executeEthTxOnSub(web3, api, seller, matcher, m => m.addAsk(PRICE, evmFungible.options.address, evmCollection.options.address, tokenId, 1));
+ await executeEthTxOnSub(web3, api, seller, matcher, m => m.addAsk(PRICE, '0x0000000000000000000000000000000000000001', evmCollection.options.address, tokenId));
}
// Token is transferred to matcher
expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: matcher.options.address.toLowerCase()});
+ // Give buyer KSM
+ await matcher.methods.depositKSM(PRICE, subToEth(alice.address)).send({from: escrow});
+
// Buy
{
- const sellerBalanceBeforePurchase = BigInt(await evmFungible.methods.balanceOf(subToEth(seller.address)).call());
- const buyerBalanceBeforePurchase = BigInt(await evmFungible.methods.balanceOf(subToEth(alice.address)).call());
+ expect(await matcher.methods.balanceKSM(subToEth(seller.address)).call()).to.be.equal('0');
+ expect(await matcher.methods.balanceKSM(subToEth(alice.address)).call()).to.be.equal(PRICE.toString());
- await executeEthTxOnSub(web3, api, alice, evmFungible, m => m.approve(matcher.options.address, PRICE));
- // There is two functions named 'buy', so we should provide full signature
- await executeEthTxOnSub(web3, api, alice, matcher, m =>
- m['buy(address,uint256,address,uint256)'](evmCollection.options.address, tokenId, evmFungible.options.address, PRICE));
+ await executeEthTxOnSub(web3, api, alice, matcher, m => m.buyKSM(evmCollection.options.address, tokenId, subToEth(alice.address), subToEth(alice.address)));
- // Approved price is removed from buyer balance, and added to seller
- expect(BigInt(await evmFungible.methods.balanceOf(subToEth(seller.address)).call()) - sellerBalanceBeforePurchase === PRICE);
- expect(buyerBalanceBeforePurchase - BigInt(await evmFungible.methods.balanceOf(subToEth(alice.address)).call()) === PRICE);
+ // Price is removed from buyer balance, and added to seller
+ expect(await matcher.methods.balanceKSM(subToEth(alice.address)).call()).to.be.equal('0');
+ expect(await matcher.methods.balanceKSM(subToEth(seller.address)).call()).to.be.equal(PRICE.toString());
}
// Token is transferred to evm account of alice
expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: subToEthLowercase(alice.address)});
-
// Transfer token to substrate side of alice
await transferFromExpectSuccess(collectionId, tokenId, alice, {Ethereum: subToEth(alice.address)}, {Substrate: alice.address});
- // Token is transferred to substrate account of alice
+ // Token is transferred to substrate account of alice, seller received funds
expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Substrate: alice.address});
});
- itWeb3('With escrow', async ({api, web3}) => {
+
+ itWeb3('Sell tokens from substrate user via EVM contract', async ({api, web3}) => {
const alice = privateKey('//Alice');
const matcherOwner = await createEthAccountWithBalance(api, web3);
- const escrow = await createEthAccountWithBalance(api, web3);
const matcherContract = new web3.eth.Contract(JSON.parse((await readFile(`${__dirname}/MarketPlace.abi`)).toString()), undefined, {
from: matcherOwner,
...GAS_ARGS,
});
- const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments: [matcherOwner]}).send({from: matcherOwner, gas: 10000000});
- await matcher.methods.setEscrow(escrow).send({from: matcherOwner});
- const helpers = contractHelpers(web3, matcherOwner);
- await helpers.methods.setSponsoringMode(matcher.options.address, SponsoringMode.Allowlisted).send({from: matcherOwner});
- await helpers.methods.setSponsoringRateLimit(matcher.options.address, 1).send({from: matcherOwner});
+ const matcher = await matcherContract.deploy({data: (await readFile(`${__dirname}/MarketPlace.bin`)).toString(), arguments:[matcherOwner]}).send({from: matcherOwner});
await transferBalanceToEth(api, alice, matcher.options.address);
const collectionId = await createCollectionExpectSuccess({mode: {type: 'NFT'}});
await setCollectionLimitsExpectSuccess(alice, collectionId, {sponsorApproveTimeout: 1});
const evmCollection = new web3.eth.Contract(nonFungibleAbi as any, collectionIdToAddress(collectionId), {from: matcherOwner});
- await setCollectionSponsorExpectSuccess(collectionId, alice.address);
- await transferBalanceToEth(api, alice, subToEth(alice.address));
- await confirmSponsorshipExpectSuccess(collectionId);
-
- await helpers.methods.toggleAllowed(matcher.options.address, subToEth(alice.address), true).send({from: matcherOwner});
- await addToAllowListExpectSuccess(alice, collectionId, evmToAddress(subToEth(alice.address)));
const seller = privateKey(`//Seller/${Date.now()}`);
- await helpers.methods.toggleAllowed(matcher.options.address, subToEth(seller.address), true).send({from: matcherOwner});
-
+ await transferBalanceTo(api, alice, seller.address);
+
const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT', seller.address);
// To transfer item to matcher it first needs to be transfered to EVM account of bob
@@ -197,19 +204,11 @@
// Token is transferred to matcher
expect(await getTokenOwner(api, collectionId, tokenId)).to.be.deep.equal({Ethereum: matcher.options.address.toLowerCase()});
- // Give buyer KSM
- await matcher.methods.depositKSM(PRICE, subToEth(alice.address)).send({from: escrow});
-
// Buy
{
- expect(await matcher.methods.balanceKSM(subToEth(seller.address)).call()).to.be.equal('0');
- expect(await matcher.methods.balanceKSM(subToEth(alice.address)).call()).to.be.equal(PRICE.toString());
-
- await executeEthTxOnSub(web3, api, alice, matcher, m => m.buyKSM(evmCollection.options.address, tokenId, subToEth(alice.address), subToEth(alice.address)));
-
- // Price is removed from buyer balance, and added to seller
- expect(await matcher.methods.balanceKSM(subToEth(alice.address)).call()).to.be.equal('0');
- expect(await matcher.methods.balanceKSM(subToEth(seller.address)).call()).to.be.equal(PRICE.toString());
+ const sellerBalanceBeforePurchase = await getBalanceSingle(api, seller.address);
+ await executeEthTxOnSub(web3, api, alice, matcher, m => m.buy(evmCollection.options.address, tokenId), {value: PRICE});
+ expect(await getBalanceSingle(api, seller.address) - sellerBalanceBeforePurchase === PRICE);
}
// Token is transferred to evm account of alice
tests/src/eth/util/helpers.tsdiffbeforeafterboth--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -29,6 +29,7 @@
import privateKey from '../../substrate/privateKey';
import contractHelpersAbi from './contractHelpersAbi.json';
import getBalance from '../../substrate/get-balance';
+import waitNewBlocks from '../../substrate/wait-new-blocks';
export const GAS_ARGS = {gas: 2500000};
@@ -241,6 +242,12 @@
return collector;
}
+/**
+ * pallet evm_contract_helpers
+ * @param web3
+ * @param caller - eth address
+ * @returns
+ */
export function contractHelpers(web3: Web3, caller: string) {
return new web3.eth.Contract(contractHelpersAbi as any, '0x842899ECF380553E8a4de75bF534cdf6fBF64049', {from: caller, ...GAS_ARGS});
}
@@ -287,6 +294,8 @@
await call();
+ // In dev mode, the transaction might not finish processing in time
+ await waitNewBlocks(api, 1);
const after = await ethBalanceViaSub(api, user);
// Can't use .to.be.less, because chai doesn't supports bigint
tests/src/interfaces/augment-api-events.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-events.ts
+++ b/tests/src/interfaces/augment-api-events.ts
@@ -4,7 +4,7 @@
import type { ApiTypes } from '@polkadot/api-base/types';
import type { Null, Option, Result, U256, U8aFixed, u128, u32, u64, u8 } from '@polkadot/types-codec';
import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
-import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, OrmlVestingVestingSchedule, PalletCommonAccountBasicCrossAccountIdRepr, SpRuntimeDispatchError, UpDataStructsAccessMode, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
+import type { EthereumLog, EvmCoreErrorExitReason, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, SpRuntimeDispatchError, UpDataStructsAccessMode, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/events' {
export interface AugmentedEvents<ApiType extends ApiTypes> {
@@ -68,7 +68,7 @@
*
* * amount
**/
- Approved: AugmentedEvent<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ Approved: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
/**
* New collection was created
*
@@ -102,7 +102,7 @@
*
* * amount: Always 1 for NFT
**/
- ItemCreated: AugmentedEvent<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ ItemCreated: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
/**
* Collection item was burned.
*
@@ -116,7 +116,7 @@
*
* * amount: Always 1 for NFT
**/
- ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ ItemDestroyed: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
/**
* Item was transferred
*
@@ -130,7 +130,7 @@
*
* * amount: Always 1 for NFT
**/
- Transfer: AugmentedEvent<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ Transfer: AugmentedEvent<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
/**
* Generic event
**/
@@ -483,7 +483,7 @@
*
* * user: Address.
**/
- AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ AllowListAddressAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Address was remove from allow list
*
@@ -493,7 +493,7 @@
*
* * user: Address.
**/
- AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ AllowListAddressRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Collection admin was added
*
@@ -503,7 +503,7 @@
*
* * admin: Admin address.
**/
- CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ CollectionAdminAdded: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Collection admin was removed
*
@@ -513,7 +513,7 @@
*
* * admin: Admin address.
**/
- CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ CollectionAdminRemoved: AugmentedEvent<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Collection limits was set
*
tests/src/interfaces/augment-api-query.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-query.ts
+++ b/tests/src/interfaces/augment-api-query.ts
@@ -5,7 +5,7 @@
import type { BTreeMap, Bytes, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H160, H256 } from '@polkadot/types/interfaces/runtime';
-import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeDigest, UpDataStructsCollection, UpDataStructsCollectionStats } from '@polkadot/types/lookup';
+import type { CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueQueueConfigData, EthereumBlock, EthereumReceiptReceiptV3, EthereumTransactionTransactionV2, FpRpcTransactionStatus, FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmContractHelpersSponsoringModeT, PalletNonfungibleItemData, PalletRefungibleItemData, PalletTransactionPaymentReleases, PalletTreasuryProposal, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpRuntimeDigest, UpDataStructsCollection, UpDataStructsCollectionStats } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';
declare module '@polkadot/api-base/types/storage' {
@@ -73,7 +73,7 @@
/**
* Allowlisted collection users
**/
- allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ allowlist: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Collection info
**/
@@ -87,7 +87,7 @@
/**
* List of collection admins
**/
- isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ isAdmin: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Generic query
**/
@@ -173,8 +173,8 @@
[key: string]: QueryableStorageEntry<ApiType>;
};
fungible: {
- allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]>;
- balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
totalSupply: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
@@ -208,12 +208,12 @@
[key: string]: QueryableStorageEntry<ApiType>;
};
nonfungible: {
- accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
- allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletCommonAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
+ accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletEvmAccountBasicCrossAccountIdRepr>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
* Used to enumerate tokens owned by account
**/
- owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]>;
+ owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;
tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNonfungibleItemData>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
@@ -371,13 +371,13 @@
[key: string]: QueryableStorageEntry<ApiType>;
};
refungible: {
- accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
- allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr]>;
- balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ accountBalance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u32>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ allowance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg4: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr]>;
+ balance: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array, arg3: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => Observable<u128>, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]> & QueryableStorageEntry<ApiType, [u32, u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Used to enumerate tokens owned by account
**/
- owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32]>;
+ owned: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, arg3: u32 | AnyNumber | Uint8Array) => Observable<bool>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]> & QueryableStorageEntry<ApiType, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32]>;
tokenData: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<PalletRefungibleItemData>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
tokensBurnt: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
tokensMinted: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-rpc.ts
+++ b/tests/src/interfaces/augment-api-rpc.ts
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
-import type { PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionStats } from './unique';
+import type { PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCollection, UpDataStructsCollectionStats, UpDataStructsCollectionStats } from './unique';
import type { AugmentedRpc } from '@polkadot/rpc-core/types';
import type { Metadata, StorageKey } from '@polkadot/types';
import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u128, u32, u64 } from '@polkadot/types-codec';
@@ -562,31 +562,31 @@
/**
* Get amount of different user tokens
**/
- accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;
+ accountBalance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u32>>;
/**
* Get tokens owned by account
**/
- accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;
+ accountTokens: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<u32>>>;
/**
* Get admin list
**/
- adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;
+ adminlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;
/**
* Get allowed amount
**/
- allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
+ allowance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, sender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
/**
* Check if user is allowed to use collection
**/
- allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;
+ allowed: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<bool>>;
/**
* Get allowlist
**/
- allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletCommonAccountBasicCrossAccountIdRepr>>>;
+ allowlist: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<PalletEvmAccountBasicCrossAccountIdRepr>>>;
/**
* Get amount of specific account token
**/
- balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
+ balance: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, account: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
/**
* Get collection by specified id
**/
@@ -618,7 +618,7 @@
/**
* Get token owner
**/
- tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<PalletCommonAccountBasicCrossAccountIdRepr>>;
+ tokenOwner: AugmentedRpc<(collection: u32 | AnyNumber | Uint8Array, tokenId: u32 | AnyNumber | Uint8Array, at?: Hash | string | Uint8Array) => Observable<PalletEvmAccountBasicCrossAccountIdRepr>>;
/**
* Get token variable metadata
**/
tests/src/interfaces/augment-api-tx.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-api-tx.ts
+++ b/tests/src/interfaces/augment-api-tx.ts
@@ -5,7 +5,7 @@
import type { Bytes, Compact, Option, U256, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H160, H256, MultiAddress, Perbill } from '@polkadot/types/interfaces/runtime';
-import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
+import type { CumulusPrimitivesParachainInherentParachainInherentData, EthereumTransactionTransactionV2, OrmlVestingVestingSchedule, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsAccessMode, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCreateCollectionData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/submittable' {
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
@@ -551,7 +551,7 @@
*
* * new_admin_id: Address of new admin to add.
**/
- addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ addCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newAdminId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Add an address to allow list.
*
@@ -566,7 +566,7 @@
*
* * address.
**/
- addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ addToAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Set, change, or remove approved address to transfer the ownership of the NFT.
*
@@ -584,7 +584,7 @@
*
* * item_id: ID of the item.
**/
- approve: AugmentedSubmittable<(spender: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
+ approve: AugmentedSubmittable<(spender: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
/**
* Destroys a concrete instance of NFT on behalf of the owner
* See also: [`approve`]
@@ -603,7 +603,7 @@
*
* * from: owner of item
**/
- burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, u32, u128]>;
+ burnFrom: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, u32, u128]>;
/**
* Destroys a concrete instance of NFT.
*
@@ -688,7 +688,7 @@
*
* * data: Token data to store on chain.
**/
- createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>;
+ createItem: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, data: UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, UpDataStructsCreateItemData]>;
/**
* This method creates multiple items in a collection created with CreateCollection method.
*
@@ -709,7 +709,7 @@
*
* * owner: Address, initial owner of the NFT.
**/
- createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec<UpDataStructsCreateItemData> | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr, Vec<UpDataStructsCreateItemData>]>;
+ createMultipleItems: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, owner: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, itemsData: Vec<UpDataStructsCreateItemData> | (UpDataStructsCreateItemData | { NFT: any } | { Fungible: any } | { ReFungible: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr, Vec<UpDataStructsCreateItemData>]>;
createMultipleItemsEx: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, data: UpDataStructsCreateItemExData | { NFT: any } | { Fungible: any } | { RefungibleMultipleItems: any } | { RefungibleMultipleOwners: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCreateItemExData]>;
/**
* **DANGEROUS**: Destroys collection and all NFTs within this collection. Users irrecoverably lose their assets and may lose real money.
@@ -737,7 +737,7 @@
*
* * account_id: Address of admin to remove.
**/
- removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ removeCollectionAdmin: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, accountId: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
/**
* Switch back to pay-per-own-transaction model.
*
@@ -764,7 +764,7 @@
*
* * address.
**/
- removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ removeFromAllowList: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, address: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
setCollectionLimits: AugmentedSubmittable<(collectionId: u32 | AnyNumber | Uint8Array, newLimit: UpDataStructsCollectionLimits | { accountTokenOwnershipLimit?: any; sponsoredDataSize?: any; sponsoredDataRateLimit?: any; tokenLimit?: any; sponsorTransferTimeout?: any; sponsorApproveTimeout?: any; ownerCanTransfer?: any; ownerCanDestroy?: any; transfersEnabled?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, UpDataStructsCollectionLimits]>;
/**
* # Permissions
@@ -938,7 +938,7 @@
* * Fungible Mode: Must specify transferred amount
* * Re-Fungible Mode: Must specify transferred portion (between 0 and 1)
**/
- transfer: AugmentedSubmittable<(recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
+ transfer: AugmentedSubmittable<(recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
/**
* Change ownership of a NFT on behalf of the owner. See Approve method for additional information. After this method executes, the approval is removed so that the approved address will not be able to transfer this NFT again from this owner.
*
@@ -960,7 +960,7 @@
*
* * value: Amount to transfer.
**/
- transferFrom: AugmentedSubmittable<(from: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletCommonAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
+ transferFrom: AugmentedSubmittable<(from: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, recipient: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, collectionId: u32 | AnyNumber | Uint8Array, itemId: u32 | AnyNumber | Uint8Array, value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u32, u32, u128]>;
/**
* Generic tx
**/
tests/src/interfaces/augment-types.tsdiffbeforeafterboth--- a/tests/src/interfaces/augment-types.ts
+++ b/tests/src/interfaces/augment-types.ts
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
-import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1AbridgedHrmpChannel, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique';
+import type { CumulusPalletDmpQueueCall, CumulusPalletDmpQueueConfigData, CumulusPalletDmpQueueError, CumulusPalletDmpQueueEvent, CumulusPalletDmpQueuePageIndexData, CumulusPalletParachainSystemCall, CumulusPalletParachainSystemError, CumulusPalletParachainSystemEvent, CumulusPalletParachainSystemRelayStateSnapshotMessagingStateSnapshot, CumulusPalletXcmCall, CumulusPalletXcmError, CumulusPalletXcmEvent, CumulusPalletXcmpQueueCall, CumulusPalletXcmpQueueError, CumulusPalletXcmpQueueEvent, CumulusPalletXcmpQueueInboundChannelDetails, CumulusPalletXcmpQueueInboundState, CumulusPalletXcmpQueueOutboundChannelDetails, CumulusPalletXcmpQueueOutboundState, CumulusPalletXcmpQueueQueueConfigData, CumulusPrimitivesParachainInherentParachainInherentData, EthbloomBloom, EthereumBlock, EthereumHeader, EthereumLog, EthereumReceiptEip658ReceiptData, EthereumReceiptReceiptV3, EthereumTransactionAccessListItem, EthereumTransactionEip1559Transaction, EthereumTransactionEip2930Transaction, EthereumTransactionLegacyTransaction, EthereumTransactionTransactionAction, EthereumTransactionTransactionSignature, EthereumTransactionTransactionV2, EthereumTypesHashH64, EvmCoreErrorExitError, EvmCoreErrorExitFatal, EvmCoreErrorExitReason, EvmCoreErrorExitRevert, EvmCoreErrorExitSucceed, FpRpcTransactionStatus, FrameSupportPalletId, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchClass, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPays, FrameSupportWeightsPerDispatchClassU32, FrameSupportWeightsPerDispatchClassU64, FrameSupportWeightsPerDispatchClassWeightsPerClass, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemAccountInfo, FrameSystemCall, FrameSystemError, FrameSystemEvent, FrameSystemEventRecord, FrameSystemExtensionsCheckGenesis, FrameSystemExtensionsCheckNonce, FrameSystemExtensionsCheckSpecVersion, FrameSystemExtensionsCheckWeight, FrameSystemLastRuntimeUpgradeInfo, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, FrameSystemLimitsWeightsPerClass, FrameSystemPhase, OpalRuntimeRuntime, OrmlVestingModuleCall, OrmlVestingModuleError, OrmlVestingModuleEvent, OrmlVestingVestingSchedule, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesCall, PalletBalancesError, PalletBalancesEvent, PalletBalancesReasons, PalletBalancesReleases, PalletBalancesReserveData, PalletCommonError, PalletCommonEvent, PalletEthereumCall, PalletEthereumError, PalletEthereumEvent, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmCall, PalletEvmCoderSubstrateError, PalletEvmContractHelpersError, PalletEvmContractHelpersSponsoringModeT, PalletEvmError, PalletEvmEvent, PalletEvmMigrationCall, PalletEvmMigrationError, PalletFungibleError, PalletInflationCall, PalletNonfungibleError, PalletNonfungibleItemData, PalletRefungibleError, PalletRefungibleItemData, PalletSudoCall, PalletSudoError, PalletSudoEvent, PalletTemplateTransactionPaymentCall, PalletTemplateTransactionPaymentChargeTransactionPayment, PalletTimestampCall, PalletTransactionPaymentReleases, PalletTreasuryCall, PalletTreasuryError, PalletTreasuryEvent, PalletTreasuryProposal, PalletUniqueCall, PalletUniqueError, PalletUniqueRawEvent, PalletXcmCall, PalletXcmError, PalletXcmEvent, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotCorePrimitivesOutboundHrmpMessage, PolkadotParachainPrimitivesXcmpMessageFormat, PolkadotPrimitivesV1AbridgedHostConfiguration, PolkadotPrimitivesV1AbridgedHrmpChannel, PolkadotPrimitivesV1PersistedValidationData, PolkadotPrimitivesV1UpgradeRestriction, SpCoreEcdsaSignature, SpCoreEd25519Signature, SpCoreSr25519Signature, SpRuntimeArithmeticError, SpRuntimeDigest, SpRuntimeDigestDigestItem, SpRuntimeDispatchError, SpRuntimeModuleError, SpRuntimeMultiSignature, SpRuntimeTokenError, SpTrieStorageProof, SpVersionRuntimeVersion, UpDataStructsAccessMode, UpDataStructsCollection, UpDataStructsCollectionLimits, UpDataStructsCollectionMode, UpDataStructsCollectionStats, UpDataStructsCreateCollectionData, UpDataStructsCreateFungibleData, UpDataStructsCreateItemData, UpDataStructsCreateItemExData, UpDataStructsCreateNftData, UpDataStructsCreateNftExData, UpDataStructsCreateReFungibleData, UpDataStructsCreateRefungibleExData, UpDataStructsMetaUpdatePermission, UpDataStructsSchemaVersion, UpDataStructsSponsoringRateLimit, UpDataStructsSponsorshipState, XcmDoubleEncoded, XcmV0Junction, XcmV0JunctionBodyId, XcmV0JunctionBodyPart, XcmV0JunctionNetworkId, XcmV0MultiAsset, XcmV0MultiLocation, XcmV0Order, XcmV0OriginKind, XcmV0Response, XcmV0Xcm, XcmV1Junction, XcmV1MultiAsset, XcmV1MultiLocation, XcmV1MultiassetAssetId, XcmV1MultiassetAssetInstance, XcmV1MultiassetFungibility, XcmV1MultiassetMultiAssetFilter, XcmV1MultiassetMultiAssets, XcmV1MultiassetWildFungibility, XcmV1MultiassetWildMultiAsset, XcmV1MultilocationJunctions, XcmV1Order, XcmV1Response, XcmV1Xcm, XcmV2Instruction, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2WeightLimit, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from './unique';
import type { Data, StorageKey } from '@polkadot/types';
import type { BitVec, Bool, Bytes, I128, I16, I256, I32, I64, I8, Json, Null, Raw, Text, Type, U128, U16, U256, U32, U64, U8, USize, bool, i128, i16, i256, i32, i64, i8, u128, u16, u256, u32, u64, u8, usize } from '@polkadot/types-codec';
import type { AssetApproval, AssetApprovalKey, AssetBalance, AssetDestroyWitness, AssetDetails, AssetMetadata, TAssetBalance, TAssetDepositBalance } from '@polkadot/types/interfaces/assets';
@@ -752,7 +752,6 @@
PalletBalancesReserveData: PalletBalancesReserveData;
PalletCallMetadataLatest: PalletCallMetadataLatest;
PalletCallMetadataV14: PalletCallMetadataV14;
- PalletCommonAccountBasicCrossAccountIdRepr: PalletCommonAccountBasicCrossAccountIdRepr;
PalletCommonError: PalletCommonError;
PalletCommonEvent: PalletCommonEvent;
PalletConstantMetadataLatest: PalletConstantMetadataLatest;
@@ -764,6 +763,7 @@
PalletEthereumEvent: PalletEthereumEvent;
PalletEventMetadataLatest: PalletEventMetadataLatest;
PalletEventMetadataV14: PalletEventMetadataV14;
+ PalletEvmAccountBasicCrossAccountIdRepr: PalletEvmAccountBasicCrossAccountIdRepr;
PalletEvmCall: PalletEvmCall;
PalletEvmCoderSubstrateError: PalletEvmCoderSubstrateError;
PalletEvmContractHelpersError: PalletEvmContractHelpersError;
tests/src/interfaces/lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/lookup.ts
+++ b/tests/src/interfaces/lookup.ts
@@ -1254,11 +1254,11 @@
},
add_to_allow_list: {
collectionId: 'u32',
- address: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ address: 'PalletEvmAccountBasicCrossAccountIdRepr',
},
remove_from_allow_list: {
collectionId: 'u32',
- address: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ address: 'PalletEvmAccountBasicCrossAccountIdRepr',
},
set_public_access_mode: {
collectionId: 'u32',
@@ -1274,11 +1274,11 @@
},
add_collection_admin: {
collectionId: 'u32',
- newAdminId: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ newAdminId: 'PalletEvmAccountBasicCrossAccountIdRepr',
},
remove_collection_admin: {
collectionId: 'u32',
- accountId: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ accountId: 'PalletEvmAccountBasicCrossAccountIdRepr',
},
set_collection_sponsor: {
collectionId: 'u32',
@@ -1292,12 +1292,12 @@
},
create_item: {
collectionId: 'u32',
- owner: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ owner: 'PalletEvmAccountBasicCrossAccountIdRepr',
data: 'UpDataStructsCreateItemData',
},
create_multiple_items: {
collectionId: 'u32',
- owner: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ owner: 'PalletEvmAccountBasicCrossAccountIdRepr',
itemsData: 'Vec<UpDataStructsCreateItemData>',
},
create_multiple_items_ex: {
@@ -1315,25 +1315,25 @@
},
burn_from: {
collectionId: 'u32',
- from: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ from: 'PalletEvmAccountBasicCrossAccountIdRepr',
itemId: 'u32',
value: 'u128',
},
transfer: {
- recipient: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',
collectionId: 'u32',
itemId: 'u32',
value: 'u128',
},
approve: {
- spender: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ spender: 'PalletEvmAccountBasicCrossAccountIdRepr',
collectionId: 'u32',
itemId: 'u32',
amount: 'u128',
},
transfer_from: {
- from: 'PalletCommonAccountBasicCrossAccountIdRepr',
- recipient: 'PalletCommonAccountBasicCrossAccountIdRepr',
+ from: 'PalletEvmAccountBasicCrossAccountIdRepr',
+ recipient: 'PalletEvmAccountBasicCrossAccountIdRepr',
collectionId: 'u32',
itemId: 'u32',
value: 'u128',
@@ -1438,9 +1438,9 @@
_enum: ['ItemOwner', 'Admin', 'None']
},
/**
- * Lookup172: pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>
+ * Lookup172: pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>
**/
- PalletCommonAccountBasicCrossAccountIdRepr: {
+ PalletEvmAccountBasicCrossAccountIdRepr: {
_enum: {
Substrate: 'AccountId32',
Ethereum: 'H160'
@@ -1478,31 +1478,31 @@
pieces: 'u128'
},
/**
- * Lookup180: up_data_structs::CreateItemExData<pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup180: up_data_structs::CreateItemExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsCreateItemExData: {
_enum: {
NFT: 'Vec<UpDataStructsCreateNftExData>',
- Fungible: 'BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>',
+ Fungible: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>',
RefungibleMultipleItems: 'Vec<UpDataStructsCreateRefungibleExData>',
RefungibleMultipleOwners: 'UpDataStructsCreateRefungibleExData'
}
},
/**
- * Lookup182: up_data_structs::CreateNftExData<pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup182: up_data_structs::CreateNftExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsCreateNftExData: {
constData: 'Bytes',
variableData: 'Bytes',
- owner: 'PalletCommonAccountBasicCrossAccountIdRepr'
+ owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
},
/**
- * Lookup189: up_data_structs::CreateRefungibleExData<pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup189: up_data_structs::CreateRefungibleExData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
UpDataStructsCreateRefungibleExData: {
constData: 'Bytes',
variableData: 'Bytes',
- users: 'BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>'
+ users: 'BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>'
},
/**
* Lookup192: pallet_template_transaction_payment::Call<T>
@@ -1902,19 +1902,19 @@
}
},
/**
- * Lookup238: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup238: pallet_unique::RawEvent<sp_core::crypto::AccountId32, pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
PalletUniqueRawEvent: {
_enum: {
CollectionSponsorRemoved: 'u32',
- CollectionAdminAdded: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)',
+ CollectionAdminAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',
CollectionOwnedChanged: '(u32,AccountId32)',
CollectionSponsorSet: '(u32,AccountId32)',
ConstOnChainSchemaSet: 'u32',
SponsorshipConfirmed: '(u32,AccountId32)',
- CollectionAdminRemoved: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)',
- AllowListAddressRemoved: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)',
- AllowListAddressAdded: '(u32,PalletCommonAccountBasicCrossAccountIdRepr)',
+ CollectionAdminRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',
+ AllowListAddressRemoved: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',
+ AllowListAddressAdded: '(u32,PalletEvmAccountBasicCrossAccountIdRepr)',
CollectionLimitSet: 'u32',
MintPermissionSet: 'u32',
OffchainSchemaSet: 'u32',
@@ -1930,10 +1930,10 @@
_enum: {
CollectionCreated: '(u32,u8,AccountId32)',
CollectionDestroyed: 'u32',
- ItemCreated: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,u128)',
- ItemDestroyed: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,u128)',
- Transfer: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,PalletCommonAccountBasicCrossAccountIdRepr,u128)',
- Approved: '(u32,u32,PalletCommonAccountBasicCrossAccountIdRepr,PalletCommonAccountBasicCrossAccountIdRepr,u128)'
+ ItemCreated: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',
+ ItemDestroyed: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,u128)',
+ Transfer: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)',
+ Approved: '(u32,u32,PalletEvmAccountBasicCrossAccountIdRepr,PalletEvmAccountBasicCrossAccountIdRepr,u128)'
}
},
/**
@@ -2262,12 +2262,12 @@
_enum: ['NotRefungibleDataUsedToMintFungibleCollectionToken', 'WrongRefungiblePieces']
},
/**
- * Lookup305: pallet_nonfungible::ItemData<pallet_common::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
+ * Lookup305: pallet_nonfungible::ItemData<pallet_evm::account::BasicCrossAccountIdRepr<sp_core::crypto::AccountId32>>
**/
PalletNonfungibleItemData: {
constData: 'Bytes',
variableData: 'Bytes',
- owner: 'PalletCommonAccountBasicCrossAccountIdRepr'
+ owner: 'PalletEvmAccountBasicCrossAccountIdRepr'
},
/**
* Lookup306: pallet_nonfungible::pallet::Error<T>
tests/src/interfaces/types-lookup.tsdiffbeforeafterboth--- a/tests/src/interfaces/types-lookup.ts
+++ b/tests/src/interfaces/types-lookup.ts
@@ -1364,12 +1364,12 @@
readonly isAddToAllowList: boolean;
readonly asAddToAllowList: {
readonly collectionId: u32;
- readonly address: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly address: PalletEvmAccountBasicCrossAccountIdRepr;
} & Struct;
readonly isRemoveFromAllowList: boolean;
readonly asRemoveFromAllowList: {
readonly collectionId: u32;
- readonly address: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly address: PalletEvmAccountBasicCrossAccountIdRepr;
} & Struct;
readonly isSetPublicAccessMode: boolean;
readonly asSetPublicAccessMode: {
@@ -1389,12 +1389,12 @@
readonly isAddCollectionAdmin: boolean;
readonly asAddCollectionAdmin: {
readonly collectionId: u32;
- readonly newAdminId: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;
} & Struct;
readonly isRemoveCollectionAdmin: boolean;
readonly asRemoveCollectionAdmin: {
readonly collectionId: u32;
- readonly accountId: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr;
} & Struct;
readonly isSetCollectionSponsor: boolean;
readonly asSetCollectionSponsor: {
@@ -1412,13 +1412,13 @@
readonly isCreateItem: boolean;
readonly asCreateItem: {
readonly collectionId: u32;
- readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
readonly data: UpDataStructsCreateItemData;
} & Struct;
readonly isCreateMultipleItems: boolean;
readonly asCreateMultipleItems: {
readonly collectionId: u32;
- readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
readonly itemsData: Vec<UpDataStructsCreateItemData>;
} & Struct;
readonly isCreateMultipleItemsEx: boolean;
@@ -1440,28 +1440,28 @@
readonly isBurnFrom: boolean;
readonly asBurnFrom: {
readonly collectionId: u32;
- readonly from: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly from: PalletEvmAccountBasicCrossAccountIdRepr;
readonly itemId: u32;
readonly value: u128;
} & Struct;
readonly isTransfer: boolean;
readonly asTransfer: {
- readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;
readonly collectionId: u32;
readonly itemId: u32;
readonly value: u128;
} & Struct;
readonly isApprove: boolean;
readonly asApprove: {
- readonly spender: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly spender: PalletEvmAccountBasicCrossAccountIdRepr;
readonly collectionId: u32;
readonly itemId: u32;
readonly amount: u128;
} & Struct;
readonly isTransferFrom: boolean;
readonly asTransferFrom: {
- readonly from: PalletCommonAccountBasicCrossAccountIdRepr;
- readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly from: PalletEvmAccountBasicCrossAccountIdRepr;
+ readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;
readonly collectionId: u32;
readonly itemId: u32;
readonly value: u128;
@@ -1573,8 +1573,8 @@
readonly type: 'ItemOwner' | 'Admin' | 'None';
}
- /** @name PalletCommonAccountBasicCrossAccountIdRepr (172) */
- export interface PalletCommonAccountBasicCrossAccountIdRepr extends Enum {
+ /** @name PalletEvmAccountBasicCrossAccountIdRepr (172) */
+ export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {
readonly isSubstrate: boolean;
readonly asSubstrate: AccountId32;
readonly isEthereum: boolean;
@@ -1616,7 +1616,7 @@
readonly isNft: boolean;
readonly asNft: Vec<UpDataStructsCreateNftExData>;
readonly isFungible: boolean;
- readonly asFungible: BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>;
+ readonly asFungible: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
readonly isRefungibleMultipleItems: boolean;
readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExData>;
readonly isRefungibleMultipleOwners: boolean;
@@ -1628,14 +1628,14 @@
export interface UpDataStructsCreateNftExData extends Struct {
readonly constData: Bytes;
readonly variableData: Bytes;
- readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
/** @name UpDataStructsCreateRefungibleExData (189) */
export interface UpDataStructsCreateRefungibleExData extends Struct {
readonly constData: Bytes;
readonly variableData: Bytes;
- readonly users: BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>;
+ readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
}
/** @name PalletTemplateTransactionPaymentCall (192) */
@@ -2068,7 +2068,7 @@
readonly isCollectionSponsorRemoved: boolean;
readonly asCollectionSponsorRemoved: u32;
readonly isCollectionAdminAdded: boolean;
- readonly asCollectionAdminAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
readonly isCollectionOwnedChanged: boolean;
readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>;
readonly isCollectionSponsorSet: boolean;
@@ -2078,11 +2078,11 @@
readonly isSponsorshipConfirmed: boolean;
readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;
readonly isCollectionAdminRemoved: boolean;
- readonly asCollectionAdminRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
readonly isAllowListAddressRemoved: boolean;
- readonly asAllowListAddressRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
readonly isAllowListAddressAdded: boolean;
- readonly asAllowListAddressAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
readonly isCollectionLimitSet: boolean;
readonly asCollectionLimitSet: u32;
readonly isMintPermissionSet: boolean;
@@ -2105,13 +2105,13 @@
readonly isCollectionDestroyed: boolean;
readonly asCollectionDestroyed: u32;
readonly isItemCreated: boolean;
- readonly asItemCreated: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
readonly isItemDestroyed: boolean;
- readonly asItemDestroyed: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
readonly isTransfer: boolean;
- readonly asTransfer: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
readonly isApproved: boolean;
- readonly asApproved: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved';
}
@@ -2491,7 +2491,7 @@
export interface PalletNonfungibleItemData extends Struct {
readonly constData: Bytes;
readonly variableData: Bytes;
- readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
/** @name PalletNonfungibleError (306) */
tests/src/interfaces/unique/definitions.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -22,7 +22,7 @@
isOptional?: true;
};
-const CROSS_ACCOUNT_ID_TYPE = 'PalletCommonAccountBasicCrossAccountIdRepr';
+const CROSS_ACCOUNT_ID_TYPE = 'PalletEvmAccountBasicCrossAccountIdRepr';
const collectionParam = {name: 'collection', type: 'u32'};
const tokenParam = {name: 'tokenId', type: 'u32'};
@@ -38,8 +38,8 @@
export default {
types,
rpc: {
- adminlist: fun('Get admin list', [collectionParam], 'Vec<PalletCommonAccountBasicCrossAccountIdRepr>'),
- allowlist: fun('Get allowlist', [collectionParam], 'Vec<PalletCommonAccountBasicCrossAccountIdRepr>'),
+ adminlist: fun('Get admin list', [collectionParam], 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>'),
+ allowlist: fun('Get allowlist', [collectionParam], 'Vec<PalletEvmAccountBasicCrossAccountIdRepr>'),
accountTokens: fun('Get tokens owned by account', [collectionParam, crossAccountParam()], 'Vec<u32>'),
collectionTokens: fun('Get tokens contained in collection', [collectionParam], 'Vec<u32>'),
tests/src/interfaces/unique/types.tsdiffbeforeafterboth--- a/tests/src/interfaces/unique/types.ts
+++ b/tests/src/interfaces/unique/types.ts
@@ -861,15 +861,6 @@
readonly amount: u128;
}
-/** @name PalletCommonAccountBasicCrossAccountIdRepr */
-export interface PalletCommonAccountBasicCrossAccountIdRepr extends Enum {
- readonly isSubstrate: boolean;
- readonly asSubstrate: AccountId32;
- readonly isEthereum: boolean;
- readonly asEthereum: H160;
- readonly type: 'Substrate' | 'Ethereum';
-}
-
/** @name PalletCommonError */
export interface PalletCommonError extends Enum {
readonly isCollectionNotFound: boolean;
@@ -906,13 +897,13 @@
readonly isCollectionDestroyed: boolean;
readonly asCollectionDestroyed: u32;
readonly isItemCreated: boolean;
- readonly asItemCreated: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ readonly asItemCreated: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
readonly isItemDestroyed: boolean;
- readonly asItemDestroyed: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ readonly asItemDestroyed: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
readonly isTransfer: boolean;
- readonly asTransfer: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ readonly asTransfer: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
readonly isApproved: boolean;
- readonly asApproved: ITuple<[u32, u32, PalletCommonAccountBasicCrossAccountIdRepr, PalletCommonAccountBasicCrossAccountIdRepr, u128]>;
+ readonly asApproved: ITuple<[u32, u32, PalletEvmAccountBasicCrossAccountIdRepr, PalletEvmAccountBasicCrossAccountIdRepr, u128]>;
readonly type: 'CollectionCreated' | 'CollectionDestroyed' | 'ItemCreated' | 'ItemDestroyed' | 'Transfer' | 'Approved';
}
@@ -939,6 +930,15 @@
readonly type: 'Executed';
}
+/** @name PalletEvmAccountBasicCrossAccountIdRepr */
+export interface PalletEvmAccountBasicCrossAccountIdRepr extends Enum {
+ readonly isSubstrate: boolean;
+ readonly asSubstrate: AccountId32;
+ readonly isEthereum: boolean;
+ readonly asEthereum: H160;
+ readonly type: 'Substrate' | 'Ethereum';
+}
+
/** @name PalletEvmCall */
export interface PalletEvmCall extends Enum {
readonly isWithdraw: boolean;
@@ -1089,7 +1089,7 @@
export interface PalletNonfungibleItemData extends Struct {
readonly constData: Bytes;
readonly variableData: Bytes;
- readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
/** @name PalletRefungibleError */
@@ -1263,12 +1263,12 @@
readonly isAddToAllowList: boolean;
readonly asAddToAllowList: {
readonly collectionId: u32;
- readonly address: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly address: PalletEvmAccountBasicCrossAccountIdRepr;
} & Struct;
readonly isRemoveFromAllowList: boolean;
readonly asRemoveFromAllowList: {
readonly collectionId: u32;
- readonly address: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly address: PalletEvmAccountBasicCrossAccountIdRepr;
} & Struct;
readonly isSetPublicAccessMode: boolean;
readonly asSetPublicAccessMode: {
@@ -1288,12 +1288,12 @@
readonly isAddCollectionAdmin: boolean;
readonly asAddCollectionAdmin: {
readonly collectionId: u32;
- readonly newAdminId: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly newAdminId: PalletEvmAccountBasicCrossAccountIdRepr;
} & Struct;
readonly isRemoveCollectionAdmin: boolean;
readonly asRemoveCollectionAdmin: {
readonly collectionId: u32;
- readonly accountId: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly accountId: PalletEvmAccountBasicCrossAccountIdRepr;
} & Struct;
readonly isSetCollectionSponsor: boolean;
readonly asSetCollectionSponsor: {
@@ -1311,13 +1311,13 @@
readonly isCreateItem: boolean;
readonly asCreateItem: {
readonly collectionId: u32;
- readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
readonly data: UpDataStructsCreateItemData;
} & Struct;
readonly isCreateMultipleItems: boolean;
readonly asCreateMultipleItems: {
readonly collectionId: u32;
- readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
readonly itemsData: Vec<UpDataStructsCreateItemData>;
} & Struct;
readonly isCreateMultipleItemsEx: boolean;
@@ -1339,28 +1339,28 @@
readonly isBurnFrom: boolean;
readonly asBurnFrom: {
readonly collectionId: u32;
- readonly from: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly from: PalletEvmAccountBasicCrossAccountIdRepr;
readonly itemId: u32;
readonly value: u128;
} & Struct;
readonly isTransfer: boolean;
readonly asTransfer: {
- readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;
readonly collectionId: u32;
readonly itemId: u32;
readonly value: u128;
} & Struct;
readonly isApprove: boolean;
readonly asApprove: {
- readonly spender: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly spender: PalletEvmAccountBasicCrossAccountIdRepr;
readonly collectionId: u32;
readonly itemId: u32;
readonly amount: u128;
} & Struct;
readonly isTransferFrom: boolean;
readonly asTransferFrom: {
- readonly from: PalletCommonAccountBasicCrossAccountIdRepr;
- readonly recipient: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly from: PalletEvmAccountBasicCrossAccountIdRepr;
+ readonly recipient: PalletEvmAccountBasicCrossAccountIdRepr;
readonly collectionId: u32;
readonly itemId: u32;
readonly value: u128;
@@ -1417,7 +1417,7 @@
readonly isCollectionSponsorRemoved: boolean;
readonly asCollectionSponsorRemoved: u32;
readonly isCollectionAdminAdded: boolean;
- readonly asCollectionAdminAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ readonly asCollectionAdminAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
readonly isCollectionOwnedChanged: boolean;
readonly asCollectionOwnedChanged: ITuple<[u32, AccountId32]>;
readonly isCollectionSponsorSet: boolean;
@@ -1427,11 +1427,11 @@
readonly isSponsorshipConfirmed: boolean;
readonly asSponsorshipConfirmed: ITuple<[u32, AccountId32]>;
readonly isCollectionAdminRemoved: boolean;
- readonly asCollectionAdminRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ readonly asCollectionAdminRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
readonly isAllowListAddressRemoved: boolean;
- readonly asAllowListAddressRemoved: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ readonly asAllowListAddressRemoved: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
readonly isAllowListAddressAdded: boolean;
- readonly asAllowListAddressAdded: ITuple<[u32, PalletCommonAccountBasicCrossAccountIdRepr]>;
+ readonly asAllowListAddressAdded: ITuple<[u32, PalletEvmAccountBasicCrossAccountIdRepr]>;
readonly isCollectionLimitSet: boolean;
readonly asCollectionLimitSet: u32;
readonly isMintPermissionSet: boolean;
@@ -1817,7 +1817,7 @@
readonly isNft: boolean;
readonly asNft: Vec<UpDataStructsCreateNftExData>;
readonly isFungible: boolean;
- readonly asFungible: BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr,u128>;
+ readonly asFungible: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr,u128>;
readonly isRefungibleMultipleItems: boolean;
readonly asRefungibleMultipleItems: Vec<UpDataStructsCreateRefungibleExData>;
readonly isRefungibleMultipleOwners: boolean;
@@ -1835,7 +1835,7 @@
export interface UpDataStructsCreateNftExData extends Struct {
readonly constData: Bytes;
readonly variableData: Bytes;
- readonly owner: PalletCommonAccountBasicCrossAccountIdRepr;
+ readonly owner: PalletEvmAccountBasicCrossAccountIdRepr;
}
/** @name UpDataStructsCreateReFungibleData */
@@ -1849,7 +1849,7 @@
export interface UpDataStructsCreateRefungibleExData extends Struct {
readonly constData: Bytes;
readonly variableData: Bytes;
- readonly users: BTreeMap<PalletCommonAccountBasicCrossAccountIdRepr, u128>;
+ readonly users: BTreeMap<PalletEvmAccountBasicCrossAccountIdRepr, u128>;
}
/** @name UpDataStructsMetaUpdatePermission */
tests/src/util/helpers.tsdiffbeforeafterboth--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -37,6 +37,7 @@
} | {
Ethereum: string,
};
+
export function normalizeAccountId(input: string | AccountId | CrossAccountId | IKeyringPair): CrossAccountId {
if (typeof input === 'string') {
if (input.length === 48 || input.length === 47) {
@@ -343,15 +344,12 @@
// Run the CreateCollection transaction
const alicePrivateKey = privateKey('//Alice');
const tx = api.tx.unique.createCollectionEx({name: strToUTF16(name), description: strToUTF16(description), tokenPrefix: strToUTF16(tokenPrefix), mode: modeprm as any});
- const events = await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;
- const result = getCreateCollectionResult(events);
+ await expect(submitTransactionExpectFailAsync(alicePrivateKey, tx)).to.be.rejected;
// Get number of collections after the transaction
const collectionCountAfter = await getCreatedCollectionCount(api);
// What to expect
- // tslint:disable-next-line:no-unused-expression
- expect(result.success).to.be.false;
expect(collectionCountAfter).to.be.equal(collectionCountBefore, 'Error: Collection with incorrect data created.');
});
}
@@ -763,6 +761,7 @@
type = 'NFT',
) {
await usingApi(async (api: ApiPromise) => {
+ const from = normalizeAccountId(accountFrom);
const to = normalizeAccountId(accountTo);
let balanceBefore = 0n;
if (type === 'Fungible') {
@@ -778,7 +777,11 @@
}
if (type === 'Fungible') {
const balanceAfter = await getBalance(api, collectionId, to, tokenId);
- expect(balanceAfter - balanceBefore).to.be.equal(BigInt(value));
+ if (JSON.stringify(to) !== JSON.stringify(from)) {
+ expect(balanceAfter - balanceBefore).to.be.equal(BigInt(value));
+ } else {
+ expect(balanceAfter).to.be.equal(balanceBefore);
+ }
}
if (type === 'ReFungible') {
expect(await getBalance(api, collectionId, to, tokenId)).to.be.equal(BigInt(value));
@@ -833,6 +836,13 @@
return balance;
}
+export async function transferBalanceTo(api: ApiPromise, source: IKeyringPair, target: string, amount = 1000n * UNIQUE) {
+ const tx = api.tx.balances.transfer(target, amount);
+ const events = await submitTransactionAsync(source, tx);
+ const result = getGenericResult(events);
+ expect(result.success).to.be.true;
+}
+
export async function
scheduleTransferExpectSuccess(
collectionId: number,
@@ -877,6 +887,7 @@
type = 'NFT',
) {
await usingApi(async (api: ApiPromise) => {
+ const from = normalizeAccountId(sender);
const to = normalizeAccountId(recipient);
let balanceBefore = 0n;
@@ -898,7 +909,11 @@
}
if (type === 'Fungible') {
const balanceAfter = await getBalance(api, collectionId, to, tokenId);
- expect(balanceAfter - balanceBefore).to.be.equal(BigInt(value));
+ if (JSON.stringify(to) !== JSON.stringify(from)) {
+ expect(balanceAfter - balanceBefore).to.be.equal(BigInt(value));
+ } else {
+ expect(balanceAfter).to.be.equal(balanceBefore);
+ }
}
if (type === 'ReFungible') {
expect(await getBalance(api, collectionId, to, tokenId) >= value).to.be.true;
tests/yarn.lockdiffbeforeafterboth--- a/tests/yarn.lock
+++ b/tests/yarn.lock
@@ -8299,16 +8299,7 @@
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f"
integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==
-simple-get@^2.7.0:
- version "2.8.2"
- resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019"
- integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==
- dependencies:
- decompress-response "^3.3.0"
- once "^1.3.1"
- simple-concat "^1.0.0"
-
-simple-get@^4.0.0:
+simple-get@^2.7.0, simple-get@^4.0.0, simple-get@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543"
integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==