From 6fb759d0245c951b651d4ef4ecc6e16fae02018e Mon Sep 17 00:00:00 2001 From: Max Andreev Date: Thu, 22 Dec 2022 15:53:14 +0000 Subject: [PATCH] Merge branch 'develop' into tests/eth-helpers --- --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ - "gimli", + "gimli 0.26.2", +] + +[[package]] +name = "addr2line" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +dependencies = [ + "gimli 0.27.0", ] [[package]] @@ -108,9 +117,9 @@ [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] name = "app-promotion-rpc" @@ -142,19 +151,16 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] +name = "array-bytes" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f72e9d6fac4bc80778ea470b20197b88d28c292bb7d60c3fb099280003cd19" + +[[package]] name = "arrayref" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" -dependencies = [ - "nodrop", -] [[package]] name = "arrayvec" @@ -289,7 +295,6 @@ "async-global-executor", "async-io", "async-lock", - "async-process", "crossbeam-utils", "futures-channel", "futures-core", @@ -304,21 +309,6 @@ "pin-utils", "slab", "wasm-bindgen-futures", -] - -[[package]] -name = "async-std-resolver" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba50e24d9ee0a8950d3d03fc6d0dd10aa14b5de3b101949b4e160f7fee7c723" -dependencies = [ - "async-std", - "async-trait", - "futures-io", - "futures-util", - "pin-utils", - "socket2", - "trust-dns-resolver", ] [[package]] @@ -329,9 +319,9 @@ [[package]] name = "async-trait" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6e93155431f3931513b243d371981bb2770112b370c82745a1d19d2f99364" +checksum = "677d1d8ab452a3936018a687b20e6f7cf5363d713b732b8884001317b0e48aa3" dependencies = [ "proc-macro2", "quote", @@ -387,31 +377,17 @@ 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.8", - "instant", - "pin-project-lite 0.2.9", - "rand 0.8.5", - "tokio", -] - -[[package]] name = "backtrace" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ - "addr2line", + "addr2line 0.19.0", "cc", "cfg-if", "libc", - "miniz_oxide 0.5.4", - "object", + "miniz_oxide", + "object 0.30.0", "rustc-demangle", ] @@ -457,11 +433,10 @@ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "async-trait", - "beefy-primitives", "fnv", "futures 0.3.25", "futures-timer", @@ -480,6 +455,7 @@ "sp-api", "sp-application-crypto", "sp-arithmetic", + "sp-beefy", "sp-blockchain", "sp-consensus", "sp-core", @@ -494,10 +470,9 @@ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "beefy-gadget", - "beefy-primitives", "futures 0.3.25", "jsonrpsee", "log", @@ -506,6 +481,7 @@ "sc-rpc", "sc-utils", "serde", + "sp-beefy", "sp-core", "sp-runtime", "thiserror", @@ -514,28 +490,11 @@ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "beefy-primitives", "sp-api", - "sp-runtime", -] - -[[package]] -name = "beefy-primitives" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" -dependencies = [ - "parity-scale-codec 3.2.1", - "scale-info", - "serde", - "sp-api", - "sp-application-crypto", - "sp-core", - "sp-io", - "sp-mmr-primitives", + "sp-beefy", "sp-runtime", - "sp-std", ] [[package]] @@ -598,24 +557,14 @@ [[package]] name = "blake2" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12e5fd123190ce1c2e559308a94c9bacad77907d4c6005d9e58fe1a0689e55e" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ "digest 0.10.6", ] [[package]] -name = "blake2-rfc" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -dependencies = [ - "arrayvec 0.4.12", - "constant_time_eq 0.1.5", -] - -[[package]] name = "blake2b_simd" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -826,16 +775,16 @@ dependencies = [ "camino", "cargo-platform", - "semver 1.0.14", + "semver 1.0.16", "serde", "serde_json", ] [[package]] name = "cc" -version = "1.0.77" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" dependencies = [ "jobserver", ] @@ -905,7 +854,7 @@ "js-sys", "num-integer", "num-traits", - "time 0.1.45", + "time", "wasm-bindgen", "winapi", ] @@ -954,9 +903,9 @@ [[package]] name = "clap" -version = "4.0.29" +version = "4.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d63b9e9c07271b9957ad22c173bae2a4d9a81127680962039296abcd2f8251d" +checksum = "656ad1e55e23d287773f7d8192c300dc715c3eeded93b3da651d11c42cfd74d2" dependencies = [ "bitflags", "clap_derive", @@ -1103,6 +1052,16 @@ ] [[package]] +name = "cpu-time" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" +dependencies = [ + "libc", + "winapi", +] + +[[package]] name = "cpufeatures" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1133,7 +1092,7 @@ "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.26.2", "log", "regalloc2", "smallvec", @@ -1341,7 +1300,7 @@ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "clap", "parity-scale-codec 3.2.1", @@ -1356,7 +1315,7 @@ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1379,7 +1338,7 @@ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -1408,12 +1367,15 @@ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "async-trait", + "cumulus-client-pov-recovery", + "cumulus-primitives-core", "cumulus-relay-chain-interface", "dyn-clone", "futures 0.3.25", + "log", "parity-scale-codec 3.2.1", "polkadot-primitives", "sc-client-api", @@ -1428,7 +1390,7 @@ [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1451,7 +1413,7 @@ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-primitives-core", "cumulus-relay-chain-interface", @@ -1474,19 +1436,24 @@ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", "cumulus-client-consensus-common", "cumulus-client-pov-recovery", "cumulus-primitives-core", + "cumulus-relay-chain-inprocess-interface", "cumulus-relay-chain-interface", + "cumulus-relay-chain-minimal-node", + "futures 0.3.25", "parking_lot 0.12.1", "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-service", + "sc-sysinfo", + "sc-telemetry", "sp-api", "sp-blockchain", "sp-consensus", @@ -1497,7 +1464,7 @@ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "frame-support", "frame-system", @@ -1513,7 +1480,7 @@ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1530,7 +1497,7 @@ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1558,7 +1525,7 @@ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1569,7 +1536,7 @@ [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1585,7 +1552,7 @@ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1603,7 +1570,7 @@ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "parity-scale-codec 3.2.1", "polkadot-core-primitives", @@ -1618,7 +1585,7 @@ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1641,7 +1608,7 @@ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-primitives-core", "futures 0.3.25", @@ -1654,7 +1621,7 @@ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1670,7 +1637,7 @@ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1695,7 +1662,7 @@ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1709,24 +1676,23 @@ "sp-blockchain", "sp-state-machine", "thiserror", + "tokio", ] [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ - "array-bytes", + "array-bytes 6.0.0", "async-trait", "cumulus-primitives-core", "cumulus-relay-chain-interface", "cumulus-relay-chain-rpc-interface", "futures 0.3.25", "lru", - "polkadot-availability-distribution", "polkadot-core-primitives", "polkadot-network-bridge", - "polkadot-node-core-av-store", "polkadot-node-network-protocol", "polkadot-node-subsystem-util", "polkadot-overseer", @@ -1738,8 +1704,6 @@ "sc-keystore", "sc-network", "sc-network-common", - "sc-network-light", - "sc-network-sync", "sc-service", "sc-telemetry", "sc-tracing", @@ -1758,24 +1722,25 @@ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "async-trait", - "backoff", "cumulus-primitives-core", "cumulus-relay-chain-interface", "futures 0.3.25", "futures-timer", "jsonrpsee", + "lru", "parity-scale-codec 3.2.1", "polkadot-service", "sc-client-api", "sc-rpc-api", + "serde", + "serde_json", "sp-api", "sp-authority-discovery", "sp-consensus-babe", "sp-core", - "sp-runtime", "sp-state-machine", "sp-storage", "tokio", @@ -1786,7 +1751,7 @@ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-primitives-core", "parity-scale-codec 3.2.1", @@ -1824,22 +1789,23 @@ [[package]] name = "curve25519-dalek" -version = "4.0.0-pre.1" +version = "4.0.0-pre.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4033478fbf70d6acf2655ac70da91ee65852d69daf7a67bf7a2f518fb47aafcf" +checksum = "67bc65846be335cb20f4e52d49a437b773a2c1fdb42b19fc84e79e6f6771536f" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.4", + "cfg-if", + "fiat-crypto", + "packed_simd_2", + "platforms 3.0.2", "subtle", "zeroize", ] [[package]] name = "cxx" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf07d07d6531bfcdbe9b8b739b104610c6508dcc4d63b410585faf338241daf" +checksum = "5add3fc1717409d029b20c5b6903fc0c0b02fa6741d820054f4a2efa5e5816fd" dependencies = [ "cc", "cxxbridge-flags", @@ -1849,9 +1815,9 @@ [[package]] name = "cxx-build" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2eb5b96ecdc99f72657332953d4d9c50135af1bac34277801cc3937906ebd39" +checksum = "b4c87959ba14bc6fbc61df77c3fcfe180fc32b93538c4f1031dd802ccb5f2ff0" dependencies = [ "cc", "codespan-reporting", @@ -1864,15 +1830,15 @@ [[package]] name = "cxxbridge-flags" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac040a39517fd1674e0f32177648334b0f4074625b5588a64519804ba0553b12" +checksum = "69a3e162fde4e594ed2b07d0f83c6c67b745e7f28ce58c6df5e6b6bef99dfb59" [[package]] name = "cxxbridge-macro" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1362b0ddcfc4eb0a1f57b68bd77dd99f0e826958a96abd0ae9bd092e114ffed6" +checksum = "3e7e2adeb6a0d4a282e581096b06e1791532b7d576dcde5ccd9382acf55db8e6" dependencies = [ "proc-macro2", "quote", @@ -1907,9 +1873,9 @@ [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", "zeroize", @@ -2039,9 +2005,9 @@ [[package]] name = "dtoa" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a6eee2d5d0d113f015688310da018bd1d864d86bd567c8fca9c266889e1bfa" +checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313" [[package]] name = "dyn-clonable" @@ -2066,9 +2032,9 @@ [[package]] name = "dyn-clone" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" +checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60" [[package]] name = "ecdsa" @@ -2184,9 +2150,9 @@ [[package]] name = "enumn" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038b1afa59052df211f9efd58f8b1d84c242935ede1c3dbaed26b018a9e06ae2" +checksum = "e88bcb3a067a6555d577aba299e75eff9942da276e6506fc6274327daa026132" dependencies = [ "proc-macro2", "quote", @@ -2336,7 +2302,7 @@ [[package]] name = "evm" version = "0.35.0" -source = "git+https://github.com/uniquenetwork/evm?branch=unique-polkadot-v0.9.33#a68cd3ea5ee2eb310e3452e660a8e9e56a474d2a" +source = "git+https://github.com/uniquenetwork/evm?branch=unique-polkadot-v0.9.36#a68cd3ea5ee2eb310e3452e660a8e9e56a474d2a" dependencies = [ "auto_impl", "environmental", @@ -2387,7 +2353,7 @@ [[package]] name = "evm-core" version = "0.35.0" -source = "git+https://github.com/uniquenetwork/evm?branch=unique-polkadot-v0.9.33#a68cd3ea5ee2eb310e3452e660a8e9e56a474d2a" +source = "git+https://github.com/uniquenetwork/evm?branch=unique-polkadot-v0.9.36#a68cd3ea5ee2eb310e3452e660a8e9e56a474d2a" dependencies = [ "parity-scale-codec 3.2.1", "primitive-types 0.12.1", @@ -2398,7 +2364,7 @@ [[package]] name = "evm-gasometer" version = "0.35.0" -source = "git+https://github.com/uniquenetwork/evm?branch=unique-polkadot-v0.9.33#a68cd3ea5ee2eb310e3452e660a8e9e56a474d2a" +source = "git+https://github.com/uniquenetwork/evm?branch=unique-polkadot-v0.9.36#a68cd3ea5ee2eb310e3452e660a8e9e56a474d2a" dependencies = [ "environmental", "evm-core", @@ -2409,7 +2375,7 @@ [[package]] name = "evm-runtime" version = "0.35.0" -source = "git+https://github.com/uniquenetwork/evm?branch=unique-polkadot-v0.9.33#a68cd3ea5ee2eb310e3452e660a8e9e56a474d2a" +source = "git+https://github.com/uniquenetwork/evm?branch=unique-polkadot-v0.9.36#a68cd3ea5ee2eb310e3452e660a8e9e56a474d2a" dependencies = [ "auto_impl", "environmental", @@ -2501,7 +2467,7 @@ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "async-trait", "fc-db", @@ -2520,15 +2486,16 @@ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "fp-storage", "kvdb-rocksdb", "log", - "parity-db 0.3.17", + "parity-db", "parity-scale-codec 3.2.1", "parking_lot 0.12.1", "sc-client-db", + "smallvec", "sp-blockchain", "sp-core", "sp-database", @@ -2538,7 +2505,7 @@ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "fc-db", "fp-consensus", @@ -2555,7 +2522,7 @@ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "ethereum 0.14.0", "ethereum-types 0.14.1", @@ -2598,7 +2565,7 @@ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "ethereum 0.14.0", "ethereum-types 0.14.1", @@ -2629,6 +2596,12 @@ ] [[package]] +name = "fiat-crypto" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90" + +[[package]] name = "file-per-thread-logger" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2640,9 +2613,9 @@ [[package]] name = "filetime" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" +checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ "cfg-if", "libc", @@ -2703,24 +2676,23 @@ dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide 0.6.2", + "miniz_oxide", ] [[package]] name = "flexi_logger" -version = "0.22.6" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c76a80dd14a27fc3d8bc696502132cb52b3f227256fd8601166c3a35e45f409" +checksum = "ade8e86c48285f138a4d6ca15a2912e39bd6c74d62db42da4f1985f651a0b057" dependencies = [ - "ansi_term", "atty", + "chrono", "glob", "lazy_static", "log", + "nu-ansi-term", "regex", - "rustversion", "thiserror", - "time 0.3.9", ] [[package]] @@ -2741,7 +2713,7 @@ [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", ] @@ -2758,7 +2730,7 @@ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "ethereum 0.14.0", "parity-scale-codec 3.2.1", @@ -2770,7 +2742,7 @@ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "ethereum 0.14.0", "ethereum-types 0.14.1", @@ -2785,7 +2757,7 @@ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "evm", "frame-support", @@ -2799,7 +2771,7 @@ [[package]] name = "fp-evm-mapping" version = "0.1.0" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "frame-support", "sp-core", @@ -2808,7 +2780,7 @@ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "ethereum 0.14.0", "ethereum-types 0.14.1", @@ -2825,12 +2797,11 @@ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "ethereum 0.14.0", "frame-support", "parity-scale-codec 3.2.1", - "parity-util-mem", "scale-info", "serde", "sp-runtime", @@ -2839,7 +2810,7 @@ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "parity-scale-codec 3.2.1", "serde", @@ -2854,7 +2825,7 @@ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -2877,10 +2848,10 @@ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", - "array-bytes", + "array-bytes 4.2.0", "chrono", "clap", "comfy-table", @@ -2929,7 +2900,7 @@ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2940,7 +2911,7 @@ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2948,6 +2919,7 @@ "parity-scale-codec 3.2.1", "scale-info", "sp-arithmetic", + "sp-core", "sp-npos-elections", "sp-runtime", "sp-std", @@ -2956,7 +2928,7 @@ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -2983,9 +2955,28 @@ ] [[package]] +name = "frame-remote-externalities" +version = "0.10.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +dependencies = [ + "env_logger", + "futures 0.3.25", + "log", + "parity-scale-codec 3.2.1", + "serde", + "serde_json", + "sp-core", + "sp-io", + "sp-runtime", + "sp-version", + "substrate-rpc-client", + "tokio", +] + +[[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bitflags", "frame-metadata", @@ -3017,7 +3008,7 @@ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", "cfg-expr", @@ -3031,7 +3022,7 @@ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3043,7 +3034,7 @@ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -3053,7 +3044,7 @@ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "log", @@ -3071,7 +3062,7 @@ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -3086,7 +3077,7 @@ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "sp-api", @@ -3095,7 +3086,7 @@ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "parity-scale-codec 3.2.1", @@ -3351,6 +3342,12 @@ ] [[package]] +name = "gimli" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" + +[[package]] name = "glob" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3413,9 +3410,9 @@ [[package]] name = "handlebars" -version = "4.3.5" +version = "4.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e4ab33f1213cdc25b5fa45c76881240cfe79284cf2b395e8b9e312a30a2fd" +checksum = "035ef95d03713f2c347a72547b7cd38cbc9af7cd51e6099fb62d586d4a6dee3a" dependencies = [ "log", "pest", @@ -3559,6 +3556,12 @@ ] [[package]] +name = "http-range-header" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" + +[[package]] name = "httparse" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3602,9 +3605,9 @@ [[package]] name = "hyper-rustls" -version = "0.23.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59df7c4e19c950e6e0e868dcc0a300b09a9b88e9ec55bd879ca819087a77355d" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http", "hyper", @@ -3797,15 +3800,15 @@ [[package]] name = "ipnet" -version = "2.5.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745" +checksum = "11b0d96e660696543b251e58030cf9787df56da39dab19ad60eae7353040917e" [[package]] name = "is-terminal" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927609f78c2913a6f6ac3c27a4fe87f43e2a35367c0c4b0f8265e8f49a104330" +checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" dependencies = [ "hermit-abi 0.2.6", "io-lifetimes 1.0.3", @@ -3824,9 +3827,9 @@ [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "jobserver" @@ -3848,24 +3851,23 @@ [[package]] name = "jsonrpsee" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd0d559d5e679b1ab2f869b486a11182923863b1b3ee8b421763cdd707b783a" +checksum = "7d291e3a5818a2384645fd9756362e6d89cf0541b0b916fa7702ea4a9833608e" dependencies = [ "jsonrpsee-core", - "jsonrpsee-http-server", "jsonrpsee-proc-macros", + "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", - "jsonrpsee-ws-server", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8752740ecd374bcbf8b69f3e80b0327942df76f793f8d4e60d3355650c31fb74" +checksum = "965de52763f2004bc91ac5bcec504192440f0b568a5d621c59d9dbd6f886c3fb" dependencies = [ "futures-util", "http", @@ -3884,9 +3886,9 @@ [[package]] name = "jsonrpsee-core" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3dc3e9cf2ba50b7b1d7d76a667619f82846caa39e8e8daa8a4962d74acaddca" +checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" dependencies = [ "anyhow", "arrayvec 0.7.2", @@ -3897,10 +3899,8 @@ "futures-timer", "futures-util", "globset", - "http", "hyper", "jsonrpsee-types", - "lazy_static", "parking_lot 0.12.1", "rand 0.8.5", "rustc-hash", @@ -3910,45 +3910,48 @@ "thiserror", "tokio", "tracing", - "tracing-futures", - "unicase", ] [[package]] -name = "jsonrpsee-http-server" -version = "0.15.1" +name = "jsonrpsee-proc-macros" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03802f0373a38c2420c70b5144742d800b509e2937edc4afb116434f07120117" +checksum = "baa6da1e4199c10d7b1d0a6e5e8bd8e55f351163b6f4b3cbb044672a69bd4c1c" dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "jsonrpsee-server" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fb69dad85df79527c019659a992498d03f8495390496da2f07e6c24c2b356fc" +dependencies = [ "futures-channel", "futures-util", + "http", "hyper", "jsonrpsee-core", "jsonrpsee-types", "serde", "serde_json", + "soketto", "tokio", + "tokio-stream", + "tokio-util", + "tower", "tracing", - "tracing-futures", ] [[package]] -name = "jsonrpsee-proc-macros" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd67957d4280217247588ac86614ead007b301ca2fa9f19c19f880a536f029e3" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] name = "jsonrpsee-types" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e290bba767401b646812f608c099b922d8142603c9e73a50fb192d3ac86f4a0d" +checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" dependencies = [ "anyhow", "beef", @@ -3960,34 +3963,14 @@ [[package]] name = "jsonrpsee-ws-client" -version = "0.15.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee5feddd5188e62ac08fcf0e56478138e581509d4730f3f7be9b57dd402a4ff" +checksum = "0b83daeecfc6517cfe210df24e570fb06213533dfb990318fae781f4c7119dd9" dependencies = [ "http", "jsonrpsee-client-transport", - "jsonrpsee-core", - "jsonrpsee-types", -] - -[[package]] -name = "jsonrpsee-ws-server" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d488ba74fb369e5ab68926feb75a483458b88e768d44319f37e4ecad283c7325" -dependencies = [ - "futures-channel", - "futures-util", - "http", "jsonrpsee-core", "jsonrpsee-types", - "serde_json", - "soketto", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-futures", ] [[package]] @@ -4013,10 +3996,9 @@ [[package]] name = "kusama-runtime" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ - "beefy-primitives", "bitvec 1.0.1", "frame-benchmarking", "frame-election-provider-support", @@ -4043,13 +4025,13 @@ "pallet-election-provider-support-benchmarking", "pallet-elections-phragmen", "pallet-fast-unstake", - "pallet-gilt", "pallet-grandpa", "pallet-identity", "pallet-im-online", "pallet-indices", "pallet-membership", "pallet-multisig", + "pallet-nis", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", "pallet-nomination-pools-runtime-api", @@ -4087,6 +4069,7 @@ "sp-api", "sp-arithmetic", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -4110,8 +4093,8 @@ [[package]] name = "kusama-runtime-constants" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-support", "polkadot-primitives", @@ -4133,35 +4116,31 @@ [[package]] name = "kvdb" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585089ceadba0197ffe9af6740ab350b325e3c1f5fccfbc3522e0250c750409b" +checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9" dependencies = [ - "parity-util-mem", "smallvec", ] [[package]] name = "kvdb-memorydb" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d109c87bfb7759edd2a49b2649c1afe25af785d930ad6a38479b4dc70dd873" +checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2" dependencies = [ "kvdb", - "parity-util-mem", "parking_lot 0.12.1", ] [[package]] name = "kvdb-rocksdb" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c076cc2cdbac89b9910c853a36c957d3862a779f31c2661174222cefb49ee597" +checksum = "2182b8219fee6bd83aacaab7344e840179ae079d5216aa4e249b4d704646a844" dependencies = [ "kvdb", - "log", "num_cpus", - "parity-util-mem", "parking_lot 0.12.1", "regex", "rocksdb", @@ -4182,9 +4161,9 @@ [[package]] name = "libc" -version = "0.2.138" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libloading" @@ -4198,6 +4177,12 @@ [[package]] name = "libm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" + +[[package]] +name = "libm" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" @@ -4275,7 +4260,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2322c9fb40d99101def6a01612ee30500c89abbbecb6297b3cd252903a4c1720" dependencies = [ - "async-std-resolver", "futures 0.3.25", "libp2p-core", "log", @@ -4339,7 +4323,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "761704e727f7d68d58d7bc2231eafae5fc1b9814de24290f126df09d4bd37a15" dependencies = [ - "async-io", "data-encoding", "dns-parser", "futures 0.3.25", @@ -4350,6 +4333,7 @@ "rand 0.8.5", "smallvec", "socket2", + "tokio", "void", ] @@ -4478,7 +4462,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9839d96761491c6d3e238e70554b856956fca0ab60feb9de2cd08eed4473fa92" dependencies = [ - "async-io", "futures 0.3.25", "futures-timer", "if-watch", @@ -4486,6 +4469,7 @@ "libp2p-core", "log", "socket2", + "tokio", ] [[package]] @@ -4611,9 +4595,9 @@ [[package]] name = "link-cplusplus" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" dependencies = [ "cc", ] @@ -4651,9 +4635,9 @@ [[package]] name = "linux-raw-sys" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "lock_api" @@ -4806,22 +4790,12 @@ [[package]] name = "memory-db" -version = "0.30.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac11bb793c28fa095b7554466f53b3a60a2cd002afdac01bcf135cbd73a269" +checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" dependencies = [ "hash-db", "hashbrown", - "parity-util-mem", -] - -[[package]] -name = "memory-lru" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95ae042940bad7e312857b929ee3d11b8f799a80cb7b9c7ec5125516906395" -dependencies = [ - "lru", ] [[package]] @@ -4861,15 +4835,6 @@ [[package]] name = "miniz_oxide" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" -dependencies = [ - "adler", -] - -[[package]] -name = "miniz_oxide" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" @@ -4890,6 +4855,42 @@ ] [[package]] +name = "mmr-gadget" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +dependencies = [ + "futures 0.3.25", + "log", + "parity-scale-codec 3.2.1", + "sc-client-api", + "sc-offchain", + "sp-api", + "sp-beefy", + "sp-blockchain", + "sp-consensus", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", +] + +[[package]] +name = "mmr-rpc" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +dependencies = [ + "anyhow", + "jsonrpsee", + "parity-scale-codec 3.2.1", + "serde", + "sp-api", + "sp-blockchain", + "sp-core", + "sp-mmr-primitives", + "sp-runtime", +] + +[[package]] name = "mockall" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5116,12 +5117,6 @@ "cfg-if", "libc", ] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "nohash-hasher" @@ -5146,6 +5141,16 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] name = "num-bigint" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -5204,16 +5209,16 @@ checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", - "libm", + "libm 0.2.6", ] [[package]] name = "num_cpus" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi 0.2.6", "libc", ] @@ -5239,23 +5244,23 @@ ] [[package]] -name = "num_threads" -version = "0.1.6" +name = "object" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ - "libc", + "crc32fast", + "hashbrown", + "indexmap", + "memchr", ] [[package]] name = "object" -version = "0.29.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "239da7f290cfa979f43f85a8efeee9a8a76d0827c356d37f9d3d7254d6b537fb" dependencies = [ - "crc32fast", - "hashbrown", - "indexmap", "memchr", ] @@ -5267,7 +5272,7 @@ [[package]] name = "opal-runtime" -version = "0.9.33" +version = "0.9.36" dependencies = [ "app-promotion-rpc", "cumulus-pallet-aura-ext", @@ -5426,7 +5431,7 @@ [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.33#0256c9e9365cebd297e8b0c9f639d068c24b5af0" +source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=feature/polkadot-v0.9.36#3f70b9adb6c0599db7b8688abb49d0d459634b68" dependencies = [ "frame-support", "frame-system", @@ -5441,7 +5446,7 @@ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.33#0256c9e9365cebd297e8b0c9f639d068c24b5af0" +source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=feature/polkadot-v0.9.36#3f70b9adb6c0599db7b8688abb49d0d459634b68" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -5459,7 +5464,7 @@ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.33#0256c9e9365cebd297e8b0c9f639d068c24b5af0" +source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=feature/polkadot-v0.9.36#3f70b9adb6c0599db7b8688abb49d0d459634b68" dependencies = [ "frame-support", "parity-scale-codec 3.2.1", @@ -5473,7 +5478,7 @@ [[package]] name = "orml-vesting" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.33#0256c9e9365cebd297e8b0c9f639d068c24b5af0" +source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=feature/polkadot-v0.9.36#3f70b9adb6c0599db7b8688abb49d0d459634b68" dependencies = [ "frame-support", "frame-system", @@ -5488,7 +5493,7 @@ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.33#0256c9e9365cebd297e8b0c9f639d068c24b5af0" +source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=feature/polkadot-v0.9.36#3f70b9adb6c0599db7b8688abb49d0d459634b68" dependencies = [ "frame-support", "orml-traits", @@ -5502,7 +5507,7 @@ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.33#0256c9e9365cebd297e8b0c9f639d068c24b5af0" +source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=feature/polkadot-v0.9.36#3f70b9adb6c0599db7b8688abb49d0d459634b68" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -5527,9 +5532,25 @@ checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] -name = "pallet-app-promotion" +name = "overload" version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "packed_simd_2" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282" dependencies = [ + "cfg-if", + "libm 0.1.4", +] + +[[package]] +name = "pallet-app-promotion" +version = "0.1.2" +dependencies = [ "frame-benchmarking", "frame-support", "frame-system", @@ -5555,7 +5576,7 @@ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5571,7 +5592,7 @@ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5587,7 +5608,7 @@ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5602,7 +5623,7 @@ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5626,7 +5647,7 @@ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5646,7 +5667,7 @@ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5661,7 +5682,7 @@ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "fp-evm", "frame-support", @@ -5676,15 +5697,15 @@ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "beefy-primitives", "frame-support", "frame-system", "pallet-session", "parity-scale-codec 3.2.1", "scale-info", "serde", + "sp-beefy", "sp-runtime", "sp-std", ] @@ -5692,11 +5713,10 @@ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "beefy-merkle-tree", - "beefy-primitives", "frame-support", "frame-system", "log", @@ -5706,6 +5726,7 @@ "parity-scale-codec 3.2.1", "scale-info", "serde", + "sp-beefy", "sp-core", "sp-io", "sp-runtime", @@ -5715,7 +5736,7 @@ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5733,7 +5754,7 @@ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5752,7 +5773,7 @@ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5807,7 +5828,7 @@ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5824,7 +5845,7 @@ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5842,7 +5863,7 @@ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5866,7 +5887,7 @@ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5879,7 +5900,7 @@ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5897,7 +5918,7 @@ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "ethereum 0.14.0", "ethereum-types 0.14.1", @@ -5925,7 +5946,7 @@ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "environmental", "evm", @@ -6011,7 +6032,7 @@ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.33#c37ced433a29baad45899d6ab364fe437f97570e" +source = "git+https://github.com/uniquenetwork/frontier?branch=unique-polkadot-v0.9.36#db60b911813df1d82e60e0de7f3dfa290e60d2f0" dependencies = [ "fp-evm", "ripemd", @@ -6040,7 +6061,7 @@ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6102,27 +6123,12 @@ "sp-runtime", "sp-std", "up-data-structs", -] - -[[package]] -name = "pallet-gilt" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" -dependencies = [ - "frame-benchmarking", - "frame-support", - "frame-system", - "parity-scale-codec 3.2.1", - "scale-info", - "sp-arithmetic", - "sp-runtime", - "sp-std", ] [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6145,7 +6151,7 @@ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6161,7 +6167,7 @@ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6181,7 +6187,7 @@ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6229,7 +6235,7 @@ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6246,9 +6252,8 @@ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "ckb-merkle-mountain-range", "frame-benchmarking", "frame-support", "frame-system", @@ -6262,33 +6267,33 @@ ] [[package]] -name = "pallet-mmr-rpc" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +name = "pallet-multisig" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "anyhow", - "jsonrpsee", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", "parity-scale-codec 3.2.1", - "serde", - "sp-api", - "sp-blockchain", - "sp-core", - "sp-mmr-primitives", + "scale-info", + "sp-io", "sp-runtime", + "sp-std", ] [[package]] -name = "pallet-multisig" +name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "log", "parity-scale-codec 3.2.1", "scale-info", - "sp-io", + "sp-arithmetic", + "sp-core", "sp-runtime", "sp-std", ] @@ -6296,7 +6301,7 @@ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -6313,7 +6318,7 @@ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6333,7 +6338,7 @@ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "sp-api", @@ -6365,7 +6370,7 @@ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -6382,7 +6387,7 @@ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6405,7 +6410,7 @@ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6422,7 +6427,7 @@ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6437,7 +6442,7 @@ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -6451,7 +6456,7 @@ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6469,7 +6474,7 @@ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6484,12 +6489,13 @@ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "assert_matches", "frame-benchmarking", "frame-support", "frame-system", + "log", "parity-scale-codec 3.2.1", "scale-info", "serde", @@ -6566,7 +6572,7 @@ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6577,12 +6583,13 @@ "sp-io", "sp-runtime", "sp-std", + "sp-weights", ] [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -6603,7 +6610,7 @@ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6619,7 +6626,7 @@ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -6633,7 +6640,7 @@ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6656,7 +6663,7 @@ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6667,7 +6674,7 @@ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "sp-arithmetic", @@ -6676,7 +6683,7 @@ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6708,7 +6715,7 @@ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -6722,7 +6729,7 @@ [[package]] name = "pallet-template-transaction-payment" version = "3.0.0" -source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.33#994d4a8dc6cc630b73d19f97315272a8795317e7" +source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.36#55943b982e9b0b80465885f31f76db3dba91dac4" dependencies = [ "frame-benchmarking", "frame-support", @@ -6754,7 +6761,7 @@ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6772,7 +6779,7 @@ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6791,7 +6798,7 @@ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -6807,7 +6814,7 @@ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6823,7 +6830,7 @@ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "pallet-transaction-payment", "parity-scale-codec 3.2.1", @@ -6835,7 +6842,7 @@ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6894,7 +6901,7 @@ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6910,7 +6917,7 @@ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6925,7 +6932,7 @@ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6939,8 +6946,8 @@ [[package]] name = "pallet-xcm" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-support", "frame-system", @@ -6957,8 +6964,8 @@ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -6975,32 +6982,13 @@ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.33#27721d794ee63aae42317a7eeda21595dd3200d9" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.36#a4e825c9500acab6cc3deccffea7b01350f12ed1" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec 3.2.1", "scale-info", -] - -[[package]] -name = "parity-db" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fdb726a43661fa54b43e7114e6b88b2289cae388eb3ad766d9d1754d83fce" -dependencies = [ - "blake2-rfc", - "crc32fast", - "fs2", - "hex", - "libc", - "log", - "lz4", - "memmap2", - "parking_lot 0.12.1", - "rand 0.8.5", - "snap", ] [[package]] @@ -7082,35 +7070,6 @@ checksum = "aa9777aa91b8ad9dd5aaa04a9b6bcb02c7f1deb952fca5a66034d5e63afc5c6f" [[package]] -name = "parity-util-mem" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d32c34f4f5ca7f9196001c0aba5a1f9a5a12382c8944b8b0f90233282d1e8f8" -dependencies = [ - "cfg-if", - "ethereum-types 0.14.1", - "hashbrown", - "impl-trait-for-tuples", - "lru", - "parity-util-mem-derive", - "parking_lot 0.12.1", - "primitive-types 0.12.1", - "smallvec", - "winapi", -] - -[[package]] -name = "parity-util-mem-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f557c32c6d268a07c921471619c0295f5efad3a0e76d4f97a05c091a51d110b2" -dependencies = [ - "proc-macro2", - "syn", - "synstructure", -] - -[[package]] name = "parity-wasm" version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -7130,7 +7089,7 @@ dependencies = [ "instant", "lock_api", - "parking_lot_core 0.8.5", + "parking_lot_core 0.8.6", ] [[package]] @@ -7145,9 +7104,9 @@ [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" dependencies = [ "cfg-if", "instant", @@ -7172,9 +7131,9 @@ [[package]] name = "paste" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" +checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" [[package]] name = "pbkdf2" @@ -7321,9 +7280,15 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] +name = "platforms" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" + +[[package]] name = "polkadot-approval-distribution" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", "polkadot-node-network-protocol", @@ -7337,8 +7302,8 @@ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", "polkadot-node-network-protocol", @@ -7351,8 +7316,8 @@ [[package]] name = "polkadot-availability-distribution" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "derive_more", "fatality", @@ -7374,8 +7339,8 @@ [[package]] name = "polkadot-availability-recovery" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "fatality", "futures 0.3.25", @@ -7395,8 +7360,8 @@ [[package]] name = "polkadot-cli" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "clap", "frame-benchmarking-cli", @@ -7408,12 +7373,13 @@ "polkadot-performance-test", "polkadot-service", "sc-cli", + "sc-executor", "sc-service", "sc-sysinfo", "sc-tracing", "sp-core", + "sp-io", "sp-keyring", - "sp-trie", "substrate-build-script-utils", "thiserror", "try-runtime-cli", @@ -7421,14 +7387,15 @@ [[package]] name = "polkadot-client" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ - "beefy-primitives", + "async-trait", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", "frame-system-rpc-runtime-api", + "futures 0.3.25", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "polkadot-core-primitives", @@ -7442,6 +7409,7 @@ "sc-service", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -7461,8 +7429,8 @@ [[package]] name = "polkadot-collator-protocol" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "always-assert", "bitvec 1.0.1", @@ -7483,11 +7451,10 @@ [[package]] name = "polkadot-core-primitives" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "parity-scale-codec 3.2.1", - "parity-util-mem", "scale-info", "sp-core", "sp-runtime", @@ -7496,8 +7463,8 @@ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "derive_more", "fatality", @@ -7521,8 +7488,8 @@ [[package]] name = "polkadot-erasure-coding" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "parity-scale-codec 3.2.1", "polkadot-node-primitives", @@ -7535,8 +7502,8 @@ [[package]] name = "polkadot-gossip-support" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", "futures-timer", @@ -7555,8 +7522,8 @@ [[package]] name = "polkadot-network-bridge" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "always-assert", "async-trait", @@ -7579,8 +7546,8 @@ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", "parity-scale-codec 3.2.1", @@ -7597,8 +7564,8 @@ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bitvec 1.0.1", "derive_more", @@ -7626,8 +7593,8 @@ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bitvec 1.0.1", "futures 0.3.25", @@ -7646,8 +7613,8 @@ [[package]] name = "polkadot-node-core-backing" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bitvec 1.0.1", "fatality", @@ -7665,8 +7632,8 @@ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", "polkadot-node-subsystem", @@ -7680,8 +7647,8 @@ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "async-trait", "futures 0.3.25", @@ -7699,8 +7666,8 @@ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", "polkadot-node-subsystem", @@ -7714,8 +7681,8 @@ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", "futures-timer", @@ -7731,8 +7698,8 @@ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "fatality", "futures 0.3.25", @@ -7750,13 +7717,14 @@ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "async-trait", "futures 0.3.25", "futures-timer", "polkadot-node-subsystem", + "polkadot-overseer", "polkadot-primitives", "sp-blockchain", "sp-inherents", @@ -7767,8 +7735,8 @@ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bitvec 1.0.1", "fatality", @@ -7785,13 +7753,14 @@ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "always-assert", "assert_matches", "async-process", "async-std", + "cpu-time", "futures 0.3.25", "futures-timer", "parity-scale-codec 3.2.1", @@ -7817,8 +7786,8 @@ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", "polkadot-node-primitives", @@ -7833,12 +7802,11 @@ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "futures 0.3.25", - "memory-lru", - "parity-util-mem", + "lru", "polkadot-node-subsystem", "polkadot-node-subsystem-types", "polkadot-node-subsystem-util", @@ -7849,10 +7817,9 @@ [[package]] name = "polkadot-node-jaeger" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ - "async-std", "lazy_static", "log", "mick-jaeger", @@ -7863,12 +7830,13 @@ "sc-network", "sp-core", "thiserror", + "tokio", ] [[package]] name = "polkadot-node-metrics" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bs58", "futures 0.3.25", @@ -7886,8 +7854,8 @@ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "async-trait", "derive_more", @@ -7909,8 +7877,8 @@ [[package]] name = "polkadot-node-primitives" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bounded-vec", "futures 0.3.25", @@ -7931,8 +7899,8 @@ [[package]] name = "polkadot-node-subsystem" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -7941,8 +7909,8 @@ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "async-trait", "derive_more", @@ -7964,8 +7932,8 @@ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "async-trait", "derive_more", @@ -7974,9 +7942,8 @@ "itertools", "kvdb", "lru", - "parity-db 0.4.2", + "parity-db", "parity-scale-codec 3.2.1", - "parity-util-mem", "parking_lot 0.11.2", "pin-project", "polkadot-node-jaeger", @@ -7997,15 +7964,14 @@ [[package]] name = "polkadot-overseer" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "async-trait", "futures 0.3.25", "futures-timer", "lru", "orchestra", - "parity-util-mem", "parking_lot 0.12.1", "polkadot-node-metrics", "polkadot-node-network-protocol", @@ -8015,18 +7981,18 @@ "sc-client-api", "sp-api", "sp-core", + "tikv-jemalloc-ctl", "tracing-gum", ] [[package]] name = "polkadot-parachain" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "derive_more", "frame-support", "parity-scale-codec 3.2.1", - "parity-util-mem", "polkadot-core-primitives", "scale-info", "serde", @@ -8037,8 +8003,8 @@ [[package]] name = "polkadot-performance-test" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "env_logger", "kusama-runtime", @@ -8052,13 +8018,12 @@ [[package]] name = "polkadot-primitives" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bitvec 1.0.1", "hex-literal", "parity-scale-codec 3.2.1", - "parity-util-mem", "polkadot-core-primitives", "polkadot-parachain", "scale-info", @@ -8079,13 +8044,13 @@ [[package]] name = "polkadot-rpc" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "beefy-gadget", "beefy-gadget-rpc", "jsonrpsee", - "pallet-mmr-rpc", + "mmr-rpc", "pallet-transaction-payment-rpc", "polkadot-primitives", "sc-chain-spec", @@ -8111,10 +8076,9 @@ [[package]] name = "polkadot-runtime" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ - "beefy-primitives", "bitvec 1.0.1", "frame-benchmarking", "frame-election-provider-support", @@ -8177,6 +8141,7 @@ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -8200,10 +8165,9 @@ [[package]] name = "polkadot-runtime-common" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ - "beefy-primitives", "bitvec 1.0.1", "frame-benchmarking", "frame-election-provider-support", @@ -8234,6 +8198,7 @@ "serde_derive", "slot-range-helper", "sp-api", + "sp-beefy", "sp-core", "sp-inherents", "sp-io", @@ -8248,8 +8213,8 @@ [[package]] name = "polkadot-runtime-constants" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-support", "polkadot-primitives", @@ -8262,8 +8227,8 @@ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bs58", "parity-scale-codec 3.2.1", @@ -8274,8 +8239,8 @@ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "bitflags", "bitvec 1.0.1", @@ -8317,12 +8282,11 @@ [[package]] name = "polkadot-service" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "async-trait", "beefy-gadget", - "beefy-primitives", "frame-support", "frame-system-rpc-runtime-api", "futures 0.3.25", @@ -8331,11 +8295,12 @@ "kvdb", "kvdb-rocksdb", "lru", + "mmr-gadget", "pallet-babe", "pallet-im-online", "pallet-staking", "pallet-transaction-payment-rpc-runtime-api", - "parity-db 0.4.2", + "parity-db", "polkadot-approval-distribution", "polkadot-availability-bitfield-distribution", "polkadot-availability-distribution", @@ -8396,6 +8361,7 @@ "serde_json", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-blockchain", "sp-consensus", @@ -8405,6 +8371,7 @@ "sp-inherents", "sp-io", "sp-keystore", + "sp-mmr-primitives", "sp-offchain", "sp-runtime", "sp-session", @@ -8421,8 +8388,8 @@ [[package]] name = "polkadot-statement-distribution" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "arrayvec 0.5.2", "fatality", @@ -8442,8 +8409,8 @@ [[package]] name = "polkadot-statement-table" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "parity-scale-codec 3.2.1", "polkadot-primitives", @@ -8452,10 +8419,9 @@ [[package]] name = "polkadot-test-runtime" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ - "beefy-primitives", "bitvec 1.0.1", "frame-election-provider-support", "frame-executive", @@ -8491,6 +8457,7 @@ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -8513,8 +8480,8 @@ [[package]] name = "polkadot-test-service" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-benchmarking", "frame-system", @@ -8567,9 +8534,9 @@ [[package]] name = "polling" -version = "2.5.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "166ca89eb77fd403230b9c156612965a81e094ec6ec3aa13663d4c8b113fa748" +checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" dependencies = [ "autocfg", "cfg-if", @@ -8651,9 +8618,9 @@ [[package]] name = "prettyplease" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c142c0e46b57171fe0c528bee8c5b7569e80f0c17e377cd0e30ea57dbc11bb51" +checksum = "2c8992a85d8e93a28bdf76137db888d3874e3b230dee5ed8bebac4c9f7617773" dependencies = [ "proc-macro2", "syn", @@ -8739,9 +8706,9 @@ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" dependencies = [ "unicode-ident", ] @@ -8785,9 +8752,9 @@ [[package]] name = "prost" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b18e655c21ff5ac2084a5ad0611e827b3f92badf79f4910b5a5c58f4d87ff0" +checksum = "c01db6702aa05baa3f57dec92b8eeeeb4cb19e894e73996b32a4093289e54592" dependencies = [ "bytes", "prost-derive", @@ -8795,9 +8762,9 @@ [[package]] name = "prost-build" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e330bf1316db56b12c2bcfa399e8edddd4821965ea25ddb2c134b610b1c1c604" +checksum = "cb5320c680de74ba083512704acb90fe00f28f79207286a848e730c45dd73ed6" dependencies = [ "bytes", "heck", @@ -8830,9 +8797,9 @@ [[package]] name = "prost-derive" -version = "0.11.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164ae68b6587001ca506d3bf7f1000bfa248d0e1217b618108fba4ec1d0cc306" +checksum = "c8842bad1a5419bca14eac663ba798f6bc19c413c2fdceb5f3ba3b0932d96720" dependencies = [ "anyhow", "itertools", @@ -8843,9 +8810,9 @@ [[package]] name = "prost-types" -version = "0.11.2" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747761bc3dc48f9a34553bf65605cf6cb6288ba219f3450b4275dbd81539551a" +checksum = "017f79637768cde62820bc2d4fe0e45daaa027755c323ad077767c6c5f173091" dependencies = [ "bytes", "prost", @@ -8862,7 +8829,7 @@ [[package]] name = "quartz-runtime" -version = "0.9.33" +version = "0.9.36" dependencies = [ "app-promotion-rpc", "cumulus-pallet-aura-ext", @@ -8976,9 +8943,9 @@ [[package]] name = "quote" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -9103,11 +9070,10 @@ [[package]] name = "rayon" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "crossbeam-deque", "either", "rayon-core", ] @@ -9159,18 +9125,18 @@ [[package]] name = "ref-cast" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b15debb4f9d60d767cd8ca9ef7abb2452922f3214671ff052defc7f3502c44" +checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfa8511e9e94fd3de6585a3d3cd00e01ed556dc9814829280af0e8dc72a8f36" +checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" dependencies = [ "proc-macro2", "quote", @@ -9216,23 +9182,6 @@ checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] -name = "remote-externalities" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" -dependencies = [ - "env_logger", - "log", - "parity-scale-codec 3.2.1", - "serde", - "serde_json", - "sp-core", - "sp-io", - "sp-runtime", - "sp-version", - "substrate-rpc-client", -] - -[[package]] name = "remove_dir_all" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -9342,11 +9291,10 @@ [[package]] name = "rococo-runtime" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "beefy-merkle-tree", - "beefy-primitives", "frame-benchmarking", "frame-executive", "frame-support", @@ -9366,7 +9314,6 @@ "pallet-collective", "pallet-democracy", "pallet-elections-phragmen", - "pallet-gilt", "pallet-grandpa", "pallet-identity", "pallet-im-online", @@ -9374,6 +9321,7 @@ "pallet-membership", "pallet-mmr", "pallet-multisig", + "pallet-nis", "pallet-offences", "pallet-preimage", "pallet-proxy", @@ -9405,6 +9353,7 @@ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -9427,8 +9376,8 @@ [[package]] name = "rococo-runtime-constants" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-support", "polkadot-primitives", @@ -9508,7 +9457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.14", + "semver 1.0.16", ] [[package]] @@ -9535,7 +9484,7 @@ "errno", "io-lifetimes 1.0.3", "libc", - "linux-raw-sys 0.1.3", + "linux-raw-sys 0.1.4", "windows-sys 0.42.0", ] @@ -9574,9 +9523,9 @@ [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "rw-stream-sink" @@ -9591,9 +9540,9 @@ [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "safe-mix" @@ -9616,7 +9565,7 @@ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "sp-core", @@ -9627,7 +9576,7 @@ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures 0.3.25", @@ -9654,7 +9603,7 @@ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "futures-timer", @@ -9677,7 +9626,7 @@ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "sc-client-api", @@ -9693,7 +9642,7 @@ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "memmap2", @@ -9710,7 +9659,7 @@ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9721,9 +9670,9 @@ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "chrono", "clap", "fdlimit", @@ -9761,7 +9710,7 @@ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "fnv", "futures 0.3.25", @@ -9789,7 +9738,7 @@ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "kvdb", @@ -9797,7 +9746,7 @@ "kvdb-rocksdb", "linked-hash-map", "log", - "parity-db 0.4.2", + "parity-db", "parity-scale-codec 3.2.1", "parking_lot 0.12.1", "sc-client-api", @@ -9814,13 +9763,14 @@ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures 0.3.25", "futures-timer", "libp2p", "log", + "mockall", "parking_lot 0.12.1", "sc-client-api", "sc-utils", @@ -9838,7 +9788,7 @@ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures 0.3.25", @@ -9867,7 +9817,7 @@ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "fork-tree", @@ -9908,7 +9858,7 @@ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "jsonrpsee", @@ -9930,7 +9880,7 @@ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "fork-tree", "parity-scale-codec 3.2.1", @@ -9943,7 +9893,7 @@ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "assert_matches", "async-trait", @@ -9977,7 +9927,7 @@ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures 0.3.25", @@ -10001,9 +9951,8 @@ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "lazy_static", "lru", "parity-scale-codec 3.2.1", "parking_lot 0.12.1", @@ -10012,7 +9961,6 @@ "sc-executor-wasmtime", "sp-api", "sp-core", - "sp-core-hashing-proc-macro", "sp-externalities", "sp-io", "sp-panic-handler", @@ -10027,13 +9975,10 @@ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "environmental", - "parity-scale-codec 3.2.1", "sc-allocator", "sp-maybe-compressed-blob", - "sp-sandbox", "sp-wasm-interface", "thiserror", "wasm-instrument", @@ -10043,14 +9988,12 @@ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", - "parity-scale-codec 3.2.1", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmi", ] @@ -10058,19 +10001,16 @@ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "cfg-if", "libc", "log", "once_cell", - "parity-scale-codec 3.2.1", - "parity-wasm", "rustix 0.35.13", "sc-allocator", "sc-executor-common", "sp-runtime-interface", - "sp-sandbox", "sp-wasm-interface", "wasmtime", ] @@ -10078,10 +10018,10 @@ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", - "array-bytes", + "array-bytes 4.2.0", "async-trait", "dyn-clone", "finality-grandpa", @@ -10119,7 +10059,7 @@ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "finality-grandpa", "futures 0.3.25", @@ -10140,13 +10080,12 @@ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term", "futures 0.3.25", "futures-timer", "log", - "parity-util-mem", "sc-client-api", "sc-network-common", "sc-transaction-pool-api", @@ -10157,9 +10096,9 @@ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "async-trait", "parking_lot 0.12.1", "serde_json", @@ -10172,9 +10111,9 @@ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "async-trait", "asynchronous-codec", "bitflags", @@ -10219,7 +10158,7 @@ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "cid", "futures 0.3.25", @@ -10239,7 +10178,7 @@ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "bitflags", @@ -10265,7 +10204,7 @@ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", "futures 0.3.25", @@ -10283,9 +10222,9 @@ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "futures 0.3.25", "libp2p", "log", @@ -10304,9 +10243,10 @@ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", + "async-trait", "fork-tree", "futures 0.3.25", "libp2p", @@ -10328,15 +10268,16 @@ "sp-core", "sp-finality-grandpa", "sp-runtime", + "substrate-prometheus-endpoint", "thiserror", ] [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "futures 0.3.25", "hex", "libp2p", @@ -10353,9 +10294,9 @@ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "bytes", "fnv", "futures 0.3.25", @@ -10383,7 +10324,7 @@ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "libp2p", @@ -10396,7 +10337,7 @@ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10405,7 +10346,7 @@ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "hash-db", @@ -10435,7 +10376,7 @@ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "jsonrpsee", @@ -10458,20 +10399,23 @@ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", + "http", "jsonrpsee", "log", "serde_json", "substrate-prometheus-endpoint", "tokio", + "tower", + "tower-http", ] [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "hex", @@ -10490,7 +10434,7 @@ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "directories", @@ -10501,7 +10445,6 @@ "jsonrpsee", "log", "parity-scale-codec 3.2.1", - "parity-util-mem", "parking_lot 0.12.1", "pin-project", "rand 0.7.3", @@ -10561,12 +10504,10 @@ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "parity-scale-codec 3.2.1", - "parity-util-mem", - "parity-util-mem-derive", "parking_lot 0.12.1", "sc-client-api", "sp-core", @@ -10575,7 +10516,7 @@ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "parity-scale-codec 3.2.1", @@ -10594,7 +10535,7 @@ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "libc", @@ -10613,7 +10554,7 @@ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "chrono", "futures 0.3.25", @@ -10631,7 +10572,7 @@ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term", "atty", @@ -10662,7 +10603,7 @@ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10673,7 +10614,7 @@ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures 0.3.25", @@ -10681,7 +10622,6 @@ "linked-hash-map", "log", "parity-scale-codec 3.2.1", - "parity-util-mem", "parking_lot 0.12.1", "sc-client-api", "sc-transaction-pool-api", @@ -10700,7 +10640,7 @@ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures 0.3.25", @@ -10714,7 +10654,7 @@ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "futures-timer", @@ -10726,9 +10666,9 @@ [[package]] name = "scale-info" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d8a765117b237ef233705cc2cc4c6a27fccd46eea6ef0c8c6dae5f3ef407f8" +checksum = "001cf62ece89779fd16105b5f515ad0e5cedcd5440d3dd806bb067978e7c3608" dependencies = [ "bitvec 1.0.1", "cfg-if", @@ -10740,9 +10680,9 @@ [[package]] name = "scale-info-derive" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdcd47b380d8c4541044e341dcd9475f55ba37ddc50c908d945fc036a8642496" +checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10786,9 +10726,9 @@ [[package]] name = "scratch" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" [[package]] name = "sct" @@ -10816,9 +10756,9 @@ [[package]] name = "secp256k1" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff55dc09d460954e9ef2fa8a7ced735a964be9981fd50e870b2b3b0705e14964" +checksum = "d9512ffd81e3a3503ed401f79c33168b9148c75038956039166cd750eaa037c3" dependencies = [ "secp256k1-sys", ] @@ -10884,9 +10824,9 @@ [[package]] name = "semver" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" dependencies = [ "serde", ] @@ -10899,18 +10839,18 @@ [[package]] name = "serde" -version = "1.0.149" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256b9932320c590e707b94576e3cc1f7c9024d0ee6612dfbcf1cb106cbe8e055" +checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.149" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eae9b04cbffdfd550eb462ed33bc6a1b68c935127d008b27444d08380f94e4" +checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" dependencies = [ "proc-macro2", "quote", @@ -10919,9 +10859,9 @@ [[package]] name = "serde_json" -version = "1.0.89" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020ff22c755c2ed3f8cf162dbb41a7268d934702f3ed3631656ea597e08fc3db" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ "itoa", "ryu", @@ -11119,8 +11059,8 @@ [[package]] name = "slot-range-helper" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "enumn", "parity-scale-codec 3.2.1", @@ -11159,7 +11099,7 @@ "aes-gcm", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-pre.1", + "curve25519-dalek 4.0.0-pre.5", "rand_core 0.6.4", "ring", "rustc_version 0.4.0", @@ -11187,6 +11127,7 @@ "bytes", "flate2", "futures 0.3.25", + "http", "httparse", "log", "rand 0.8.5", @@ -11196,7 +11137,7 @@ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "log", @@ -11214,7 +11155,7 @@ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "blake2", "proc-macro-crate", @@ -11225,8 +11166,8 @@ [[package]] name = "sp-application-crypto" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "scale-info", @@ -11238,8 +11179,8 @@ [[package]] name = "sp-arithmetic" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "integer-sqrt", "num-traits", @@ -11254,7 +11195,7 @@ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "scale-info", @@ -11267,7 +11208,7 @@ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "parity-scale-codec 3.2.1", @@ -11277,9 +11218,26 @@ ] [[package]] +name = "sp-beefy" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +dependencies = [ + "parity-scale-codec 3.2.1", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-mmr-primitives", + "sp-runtime", + "sp-std", +] + +[[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "sp-api", @@ -11291,7 +11249,7 @@ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "log", @@ -11309,7 +11267,7 @@ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures 0.3.25", @@ -11328,7 +11286,7 @@ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "parity-scale-codec 3.2.1", @@ -11346,7 +11304,7 @@ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "merlin", @@ -11369,7 +11327,7 @@ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "scale-info", @@ -11383,7 +11341,7 @@ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "scale-info", @@ -11395,10 +11353,10 @@ [[package]] name = "sp-core" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "base58", "bitflags", "blake2", @@ -11440,8 +11398,8 @@ [[package]] name = "sp-core-hashing" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "blake2", "byteorder", @@ -11455,7 +11413,7 @@ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -11466,7 +11424,7 @@ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11474,8 +11432,8 @@ [[package]] name = "sp-debug-derive" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -11484,8 +11442,8 @@ [[package]] name = "sp-externalities" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "environmental", "parity-scale-codec 3.2.1", @@ -11496,7 +11454,7 @@ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "finality-grandpa", "log", @@ -11514,7 +11472,7 @@ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11527,10 +11485,11 @@ [[package]] name = "sp-io" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bytes", + "ed25519-dalek", "futures 0.3.25", "hash-db", "libsecp256k1", @@ -11553,8 +11512,8 @@ [[package]] name = "sp-keyring" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "lazy_static", "sp-core", @@ -11564,8 +11523,8 @@ [[package]] name = "sp-keystore" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures 0.3.25", @@ -11582,7 +11541,7 @@ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "thiserror", "zstd", @@ -11591,8 +11550,9 @@ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ + "ckb-merkle-mountain-range", "log", "parity-scale-codec 3.2.1", "scale-info", @@ -11608,7 +11568,7 @@ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "scale-info", @@ -11622,7 +11582,7 @@ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sp-api", "sp-core", @@ -11631,8 +11591,8 @@ [[package]] name = "sp-panic-handler" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "backtrace", "lazy_static", @@ -11642,7 +11602,7 @@ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "rustc-hash", "serde", @@ -11651,15 +11611,14 @@ [[package]] name = "sp-runtime" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "either", "hash256-std-hasher", "impl-trait-for-tuples", "log", "parity-scale-codec 3.2.1", - "parity-util-mem", "paste", "rand 0.7.3", "scale-info", @@ -11674,8 +11633,8 @@ [[package]] name = "sp-runtime-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11692,34 +11651,20 @@ [[package]] name = "sp-runtime-interface-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", "syn", -] - -[[package]] -name = "sp-sandbox" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" -dependencies = [ - "log", - "parity-scale-codec 3.2.1", - "sp-core", - "sp-io", - "sp-std", - "sp-wasm-interface", - "wasmi", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "scale-info", @@ -11733,18 +11678,19 @@ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "scale-info", + "sp-core", "sp-runtime", "sp-std", ] [[package]] name = "sp-state-machine" -version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "0.13.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "log", @@ -11765,13 +11711,13 @@ [[package]] name = "sp-std" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "5.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" [[package]] name = "sp-storage" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-serde", "parity-scale-codec 3.2.1", @@ -11784,7 +11730,7 @@ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures-timer", @@ -11799,8 +11745,8 @@ [[package]] name = "sp-tracing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "6.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "sp-std", @@ -11812,7 +11758,7 @@ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sp-api", "sp-runtime", @@ -11821,7 +11767,7 @@ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "log", @@ -11836,8 +11782,8 @@ [[package]] name = "sp-trie" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", "hash-db", @@ -11860,7 +11806,7 @@ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-serde", "parity-scale-codec 3.2.1", @@ -11877,7 +11823,7 @@ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec 3.2.1", "proc-macro2", @@ -11887,8 +11833,8 @@ [[package]] name = "sp-wasm-interface" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +version = "7.0.0" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "log", @@ -11901,7 +11847,7 @@ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec 3.2.1", @@ -11932,9 +11878,9 @@ [[package]] name = "ss58-registry" -version = "1.35.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0813c10b9dbdc842c2305f949f724c64866e4ef4d09c9151e96f6a2106773c" +checksum = "23d92659e7d18d82b803824a9ba5a6022cff101c3491d027c1c1d8d30e749284" dependencies = [ "Inflector", "num-format", @@ -11979,7 +11925,7 @@ "cfg_aliases", "libc", "parking_lot 0.11.2", - "parking_lot_core 0.8.5", + "parking_lot_core 0.8.6", "static_init_macro 1.0.2", "winapi", ] @@ -12075,15 +12021,15 @@ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "platforms", + "platforms 2.0.0", ] [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-system-rpc-runtime-api", "futures 0.3.25", @@ -12104,7 +12050,7 @@ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures-util", "hyper", @@ -12117,7 +12063,7 @@ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "jsonrpsee", @@ -12130,7 +12076,7 @@ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "log", @@ -12151,9 +12097,9 @@ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ - "array-bytes", + "array-bytes 4.2.0", "async-trait", "futures 0.3.25", "parity-scale-codec 3.2.1", @@ -12177,7 +12123,7 @@ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures 0.3.25", "substrate-test-utils-derive", @@ -12187,7 +12133,7 @@ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12198,7 +12144,7 @@ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term", "build-helper", @@ -12220,9 +12166,9 @@ [[package]] name = "syn" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", @@ -12315,8 +12261,8 @@ [[package]] name = "test-runtime-constants" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-support", "polkadot-primitives", @@ -12359,18 +12305,18 @@ [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", @@ -12415,6 +12361,17 @@ ] [[package]] +name = "tikv-jemalloc-ctl" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e37706572f4b151dff7a0146e040804e9c26fe3a3118591112f05cf12a4216c1" +dependencies = [ + "libc", + "paste", + "tikv-jemalloc-sys", +] + +[[package]] name = "tikv-jemalloc-sys" version = "0.5.2+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -12434,25 +12391,7 @@ "libc", "wasi 0.10.0+wasi-snapshot-preview1", "winapi", -] - -[[package]] -name = "time" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" -dependencies = [ - "itoa", - "libc", - "num_threads", - "time-macros", ] - -[[package]] -name = "time-macros" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" [[package]] name = "tiny-bip39" @@ -12567,14 +12506,49 @@ [[package]] name = "toml" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" dependencies = [ "serde", ] [[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite 0.2.9", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] name = "tower-service" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -12587,6 +12561,7 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", + "log", "pin-project-lite 0.2.9", "tracing-attributes", "tracing-core", @@ -12625,8 +12600,8 @@ [[package]] name = "tracing-gum" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -12636,8 +12611,8 @@ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "expander 0.0.6", "proc-macro-crate", @@ -12742,6 +12717,7 @@ "smallvec", "thiserror", "tinyvec", + "tokio", "tracing", "url", ] @@ -12761,6 +12737,7 @@ "resolv-conf", "smallvec", "thiserror", + "tokio", "tracing", "trust-dns-proto", ] @@ -12774,22 +12751,26 @@ [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.33#2dff067e9f7f6f3cc4dbfdaaa97753eccc407689" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "clap", + "frame-remote-externalities", "frame-try-runtime", + "hex", "log", "parity-scale-codec 3.2.1", - "remote-externalities", "sc-chain-spec", "sc-cli", "sc-executor", "sc-service", "serde", + "sp-api", "sp-core", + "sp-debug-derive", "sp-externalities", "sp-io", "sp-keystore", + "sp-rpc", "sp-runtime", "sp-state-machine", "sp-version", @@ -12800,9 +12781,9 @@ [[package]] name = "trybuild" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db29f438342820400f2d9acfec0d363e987a38b2950bdb50a7069ed17b2148ee" +checksum = "ed01de3de062db82c0920b5cabe804f88d599a3f217932292597c678c903754d" dependencies = [ "glob", "once_cell", @@ -12815,9 +12796,9 @@ [[package]] name = "tt-call" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e66dcbec4290c69dd03c57e76c2469ea5c7ce109c6dd4351c13055cf71ea055" +checksum = "f4f195fd851901624eee5a58c4bb2b4f06399148fcd0ed336e6f1cb60a9881df" [[package]] name = "twox-hash" @@ -12876,15 +12857,6 @@ ] [[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] name = "unicode-bidi" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -12892,9 +12864,9 @@ [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" @@ -12925,7 +12897,7 @@ [[package]] name = "unique-node" -version = "0.9.33" +version = "0.9.36" dependencies = [ "app-promotion-rpc", "clap", @@ -13064,7 +13036,7 @@ [[package]] name = "unique-runtime" -version = "0.9.33" +version = "0.9.36" dependencies = [ "app-promotion-rpc", "cumulus-pallet-aura-ext", @@ -13189,7 +13161,7 @@ [[package]] name = "up-common" -version = "0.9.33" +version = "0.9.36" dependencies = [ "cumulus-primitives-core", "fp-rpc", @@ -13237,7 +13209,7 @@ [[package]] name = "up-sponsorship" version = "0.1.0" -source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.33#994d4a8dc6cc630b73d19f97315272a8795317e7" +source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.36#55943b982e9b0b80465885f31f76db3dba91dac4" dependencies = [ "impl-trait-for-tuples", ] @@ -13490,7 +13462,7 @@ checksum = "57d20cb3c59b788653d99541c646c561c9dd26506f25c0cebfe810659c54c6d7" dependencies = [ "downcast-rs", - "libm", + "libm 0.2.6", "memory_units", "num-rational", "num-traits", @@ -13517,7 +13489,7 @@ "indexmap", "libc", "log", - "object", + "object 0.29.0", "once_cell", "paste", "psm", @@ -13574,9 +13546,9 @@ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli", + "gimli 0.26.2", "log", - "object", + "object 0.29.0", "target-lexicon", "thiserror", "wasmparser", @@ -13591,10 +13563,10 @@ dependencies = [ "anyhow", "cranelift-entity", - "gimli", + "gimli 0.26.2", "indexmap", "log", - "object", + "object 0.29.0", "serde", "target-lexicon", "thiserror", @@ -13608,14 +13580,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" dependencies = [ - "addr2line", + "addr2line 0.17.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli", + "gimli 0.26.2", "log", - "object", + "object 0.29.0", "rustc-demangle", "rustix 0.35.13", "serde", @@ -13633,7 +13605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" dependencies = [ - "object", + "object 0.29.0", "once_cell", "rustix 0.35.13", ] @@ -13697,9 +13669,9 @@ [[package]] name = "webpki-roots" -version = "0.22.5" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368bfe657969fb01238bb756d351dcade285e0f6fcbd36dcb23359a5169975be" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki", ] @@ -13715,10 +13687,9 @@ [[package]] name = "westend-runtime" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ - "beefy-primitives", "bitvec 1.0.1", "frame-benchmarking", "frame-election-provider-support", @@ -13782,6 +13753,7 @@ "smallvec", "sp-api", "sp-authority-discovery", + "sp-beefy", "sp-block-builder", "sp-consensus-babe", "sp-core", @@ -13805,8 +13777,8 @@ [[package]] name = "westend-runtime-constants" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-support", "polkadot-primitives", @@ -14045,8 +14017,8 @@ [[package]] name = "xcm" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "derivative", "impl-trait-for-tuples", @@ -14059,8 +14031,8 @@ [[package]] name = "xcm-builder" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-support", "frame-system", @@ -14079,8 +14051,8 @@ [[package]] name = "xcm-executor" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "frame-benchmarking", "frame-support", @@ -14097,8 +14069,8 @@ [[package]] name = "xcm-procedural" -version = "0.9.33" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.33#c7d6c21242fc654f6f069e12c00951484dff334d" +version = "0.9.36" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.36#dc25abc712e42b9b51d87ad1168e453a42b5f0bc" dependencies = [ "Inflector", "proc-macro2", --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [workspace] resolver = "2" members = [ @@ -14,26 +12,27 @@ 'runtime/tests', ] default-members = ['node/*', 'runtime/opal'] +package.version = "0.9.36" [profile.release] panic = 'unwind' [workspace.dependencies.orml-vesting] git = "https://github.com/uniquenetwork/open-runtime-module-library" -branch = "polkadot-v0.9.33" +branch = "feature/polkadot-v0.9.36" default-features = false [workspace.dependencies.orml-xtokens] git = "https://github.com/uniquenetwork/open-runtime-module-library" -branch = "polkadot-v0.9.33" +branch = "feature/polkadot-v0.9.36" default-features = false [workspace.dependencies.orml-tokens] git = "https://github.com/uniquenetwork/open-runtime-module-library" -branch = "polkadot-v0.9.33" +branch = "feature/polkadot-v0.9.36" default-features = false [workspace.dependencies.orml-traits] git = "https://github.com/uniquenetwork/open-runtime-module-library" -branch = "polkadot-v0.9.33" +branch = "feature/polkadot-v0.9.36" default-features = false --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ ``` git clone https://github.com/paritytech/polkadot.git cd polkadot -git checkout release-v0.9.33 +git checkout release-v0.9.36 cargo build --release ``` --- a/client/rpc/Cargo.toml +++ b/client/rpc/Cargo.toml @@ -8,15 +8,15 @@ pallet-common = { default-features = false, path = '../../pallets/common' } up-data-structs = { default-features = false, path = '../../primitives/data-structs' } up-rpc = { path = "../../primitives/rpc" } -app-promotion-rpc = { path = "../../primitives/app_promotion_rpc"} +app-promotion-rpc = { path = "../../primitives/app_promotion_rpc" } rmrk-rpc = { path = "../../primitives/rmrk-rpc" } codec = { package = "parity-scale-codec", version = "3.1.2" } -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } anyhow = "1.0.57" -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-blockchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-blockchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-rpc = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } --- a/crates/evm-coder/Cargo.toml +++ b/crates/evm-coder/Cargo.toml @@ -12,14 +12,14 @@ primitive-types = { version = "0.12.1", default-features = false } # Evm doesn't have reexports for log and others ethereum = { version = "0.14.0", default-features = false } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } # Error types for execution -evm-core = { default-features = false, git = "https://github.com/uniquenetwork/evm", branch = "unique-polkadot-v0.9.33" } +evm-core = { default-features = false, git = "https://github.com/uniquenetwork/evm", branch = "unique-polkadot-v0.9.36" } # We have tuple-heavy code in solidity.rs impl-trait-for-tuples = "0.2.2" -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } [dev-dependencies] # We want to assert some large binary blobs equality in tests --- 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" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" ################################################################################ # Substrate Dependecies @@ -16,158 +16,155 @@ [dependencies.frame-benchmarking] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-benchmarking-cli] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.try-runtime-cli] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-transaction-payment-rpc] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.substrate-prometheus-endpoint] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-basic-authorship] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-chain-spec] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-cli] -features = ['wasmtime'] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-client-api] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-consensus] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-consensus-aura] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-executor] -features = ['wasmtime'] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-finality-grandpa] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-keystore] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-rpc] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-rpc-api] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-service] -features = ['wasmtime'] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-telemetry] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-transaction-pool] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-tracing] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-sysinfo] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-block-builder] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-api] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-blockchain] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-consensus] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-consensus-aura] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-core] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-finality-grandpa] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-inherents] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-keystore] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-offchain] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-runtime] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-session] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-timestamp] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-transaction-pool] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-trie] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.substrate-frame-rpc-system] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sc-network] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.serde] features = ['derive'] @@ -178,76 +175,76 @@ [dependencies.sc-consensus-manual-seal] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" ################################################################################ # Cumulus dependencies [dependencies.cumulus-client-consensus-aura] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-client-consensus-common] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-client-collator] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-client-cli] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-client-network] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-primitives-core] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-primitives-parachain-inherent] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-client-service] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-relay-chain-interface] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-relay-chain-inprocess-interface] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-relay-chain-minimal-node] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" ################################################################################ # Polkadot dependencies [dependencies.polkadot-primitives] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" [dependencies.polkadot-service] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" [dependencies.polkadot-cli] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" [dependencies.polkadot-test-service] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" [dependencies.polkadot-parachain] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" ################################################################################ @@ -277,7 +274,7 @@ [dependencies.pallet-transaction-payment-rpc-runtime-api] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" ################################################################################ # Package @@ -291,7 +288,7 @@ license = 'GPLv3' name = 'unique-node' repository = 'https://github.com/UniqueNetwork/unique-chain' -version = "0.9.33" +version.workspace = true [[bin]] name = 'unique-collator' @@ -303,19 +300,19 @@ [dependencies] futures = '0.3.17' log = '0.4.16' -flexi_logger = "0.22.5" +flexi_logger = "0.24.2" parking_lot = '0.12.1' clap = "4.0.9" -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } tokio = { version = "1.19.2", features = ["time"] } -fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fc-consensus = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fc-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fc-db = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fc-consensus = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fc-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fc-db = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } unique-rpc = { default-features = false, path = "../rpc" } app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false } @@ -337,7 +334,4 @@ 'opal-runtime?/try-runtime', 'try-runtime-cli/try-runtime', ] -sapphire-runtime = [ - 'opal-runtime', - 'opal-runtime/become-sapphire', -] +sapphire-runtime = ['opal-runtime', 'opal-runtime/become-sapphire'] --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -472,10 +472,9 @@ let autoseal_interval = Duration::from_millis(cli.idle_autoseal_interval); let mut config = config; - if config.state_pruning == None { - config.state_pruning = Some(sc_service::PruningMode::ArchiveAll); - } + config.state_pruning = Some(sc_service::PruningMode::ArchiveAll); + return start_node_using_chain_runtime! { start_dev_node(config, autoseal_interval).map_err(Into::into) }; --- a/node/cli/src/service.rs +++ b/node/cli/src/service.rs @@ -58,6 +58,7 @@ use sp_runtime::traits::BlakeTwo256; use substrate_prometheus_endpoint::Registry; use sc_client_api::BlockchainEvents; +use sc_consensus::ImportQueue; use polkadot_service::CollatorPair; @@ -191,7 +192,7 @@ type FullBackend = sc_service::TFullBackend; type FullSelectChain = sc_consensus::LongestChain; type ParachainBlockImport = - TParachainBlockImport>>; + TParachainBlockImport>, FullBackend>; /// Starts a `ServiceBuilder` for a full service. /// @@ -228,6 +229,7 @@ ExecutorDispatch: NativeExecutionDispatch + 'static, BIQ: FnOnce( Arc>, + Arc, &Configuration, Option, &TaskManager, @@ -298,6 +300,7 @@ let import_queue = build_import_queue( client.clone(), + backend.clone(), config, telemetry.as_ref().map(|telemetry| telemetry.handle()), &task_manager, @@ -335,17 +338,21 @@ Arc<(dyn RelayChainInterface + 'static)>, Option, )> { - match collator_options.relay_chain_rpc_url { - Some(relay_chain_url) => { - build_minimal_relay_chain_node(polkadot_config, task_manager, relay_chain_url).await - } - None => build_inprocess_relay_chain( + if collator_options.relay_chain_rpc_urls.is_empty() { + build_inprocess_relay_chain( polkadot_config, parachain_config, telemetry_worker_handle, task_manager, hwbench, - ), + ) + } else { + build_minimal_relay_chain_node( + polkadot_config, + task_manager, + collator_options.relay_chain_rpc_urls, + ) + .await } } @@ -397,6 +404,7 @@ ExecutorDispatch: NativeExecutionDispatch + 'static, BIQ: FnOnce( Arc>, + Arc, &Configuration, Option, &TaskManager, @@ -406,6 +414,7 @@ >, BIC: FnOnce( Arc>, + Arc, Option<&Registry>, Option, &TaskManager, @@ -447,7 +456,7 @@ let validator = parachain_config.role.is_authority(); let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); - let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue); + let import_queue_service = params.import_queue.service(); let (network, system_rpc_tx, tx_handler_controller, start_network) = sc_service::build_network(sc_service::BuildNetworkParams { @@ -455,7 +464,7 @@ client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), - import_queue: import_queue.clone(), + import_queue: params.import_queue, block_announce_validator_builder: Some(Box::new(|_| { Box::new(block_announce_validator) })), @@ -560,6 +569,7 @@ if validator { let parachain_consensus = build_consensus( client.clone(), + backend.clone(), prometheus_registry.as_ref(), telemetry.as_ref().map(|t| t.handle()), &task_manager, @@ -580,7 +590,7 @@ task_manager: &mut task_manager, spawner, parachain_consensus, - import_queue, + import_queue: import_queue_service, collator_key: collator_key.expect("Command line arguments do not allow this. qed"), relay_chain_interface, relay_chain_slot_duration, @@ -593,7 +603,7 @@ announce_block, task_manager: &mut task_manager, para_id: id, - import_queue, + import_queue: import_queue_service, relay_chain_interface, relay_chain_slot_duration, }; @@ -609,6 +619,7 @@ /// Build the import queue for the the parachain runtime. pub fn parachain_build_import_queue( client: Arc>, + backend: Arc, config: &Configuration, telemetry: Option, task_manager: &TaskManager, @@ -629,7 +640,7 @@ { let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?; - let block_import = ParachainBlockImport::new(client.clone()); + let block_import = ParachainBlockImport::new(client.clone(), backend.clone()); cumulus_client_consensus_aura::import_queue::< sp_consensus_aura::sr25519::AuthorityPair, @@ -708,6 +719,7 @@ id, parachain_build_import_queue, |client, + backend, prometheus_registry, telemetry, task_manager, @@ -726,7 +738,7 @@ telemetry.clone(), ); - let block_import = ParachainBlockImport::new(client.clone()); + let block_import = ParachainBlockImport::new(client.clone(), backend.clone()); Ok(AuraConsensus::build::< sp_consensus_aura::sr25519::AuthorityPair, @@ -785,6 +797,7 @@ fn dev_build_import_queue( client: Arc>, + _: Arc, config: &Configuration, _: Option, task_manager: &TaskManager, --- a/node/rpc/Cargo.toml +++ b/node/rpc/Cargo.toml @@ -11,42 +11,42 @@ [dependencies] futures = { version = "0.3.17", features = ["compat"] } -jsonrpsee = { version = "0.15.1", features = ["server", "macros"] } +jsonrpsee = { version = "0.16.2", features = ["server", "macros"] } # pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'master' } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-storage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } tokio = { version = "1.19.2", features = ["macros", "sync"] } -pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fc-db = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fc-mapping-sync = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } pallet-common = { default-features = false, path = "../../pallets/common" } up-common = { path = "../../primitives/common" } --- a/pallets/app-promotion/CHANGELOG.md +++ b/pallets/app-promotion/CHANGELOG.md @@ -4,6 +4,13 @@ +## [0.1.2] - 2022-12-20 + +### Fixed + +- The behaviour of the `payoutStakers` extrinsic + in which only one stake is calculated for the last processed staker. + ## [0.1.1] - 2022-12-13 ### Added --- a/pallets/app-promotion/Cargo.toml +++ b/pallets/app-promotion/Cargo.toml @@ -9,7 +9,7 @@ license = 'GPLv3' name = 'pallet-app-promotion' repository = 'https://github.com/UniqueNetwork/unique-chain' -version = '0.1.1' +version = '0.1.2' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] @@ -50,17 +50,17 @@ codec = { default-features = false, features = [ 'derive', ], package = 'parity-scale-codec', version = '3.1.2' } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } serde = { default-features = false, features = ['derive'], version = '1.0.130' } ################################################################################ --- a/pallets/app-promotion/src/lib.rs +++ b/pallets/app-promotion/src/lib.rs @@ -301,6 +301,7 @@ /// # Arguments /// /// * `admin`: account of the new admin. + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::set_admin_address())] pub fn set_admin_address(origin: OriginFor, admin: T::CrossAccountId) -> DispatchResult { ensure_root(origin)?; @@ -319,6 +320,7 @@ /// # Arguments /// /// * `amount`: in native tokens. + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::stake())] pub fn stake(staker: OriginFor, amount: BalanceOf) -> DispatchResult { let staker_id = ensure_signed(staker)?; @@ -393,6 +395,7 @@ /// Moves the sum of all stakes to the `reserved` state. /// After the end of `PendingInterval` this sum becomes completely /// free for further use. + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::unstake())] pub fn unstake(staker: OriginFor) -> DispatchResultWithPostInfo { let staker_id = ensure_signed(staker)?; @@ -454,6 +457,7 @@ /// # Arguments /// /// * `collection_id`: ID of the collection that will be sponsored by `pallet_id` + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::sponsor_collection())] pub fn sponsor_collection( admin: OriginFor, @@ -479,6 +483,7 @@ /// # Arguments /// /// * `collection_id`: ID of the collection that is sponsored by `pallet_id` + #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::stop_sponsoring_collection())] pub fn stop_sponsoring_collection( admin: OriginFor, @@ -508,6 +513,7 @@ /// # Arguments /// /// * `contract_id`: the contract address that will be sponsored by `pallet_id` + #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::sponsor_contract())] pub fn sponsor_contract(admin: OriginFor, contract_id: H160) -> DispatchResult { let admin_id = ensure_signed(admin)?; @@ -534,6 +540,7 @@ /// # Arguments /// /// * `contract_id`: the contract address that is sponsored by `pallet_id` + #[pallet::call_index(6)] #[pallet::weight(::WeightInfo::stop_sponsoring_contract())] pub fn stop_sponsoring_contract(admin: OriginFor, contract_id: H160) -> DispatchResult { let admin_id = ensure_signed(admin)?; @@ -564,6 +571,7 @@ /// # Arguments /// /// * `stakers_number`: the number of stakers for which recalculation will be performed + #[pallet::call_index(7)] #[pallet::weight(::WeightInfo::payout_stakers(stakers_number.unwrap_or(DEFAULT_NUMBER_PAYOUTS) as u32))] pub fn payout_stakers(admin: OriginFor, stakers_number: Option) -> DispatchResult { let admin_id = ensure_signed(admin)?; @@ -600,6 +608,8 @@ { // Address handled in the last payout loop iteration (below) let last_id = RefCell::new(None); + // Block number (as a part of the key) for which calculation was performed in the last payout loop iteration + let mut last_staked_calculated_block = Default::default(); // Reward balance for the address in the iteration let income_acc = RefCell::new(BalanceOf::::default()); // Staked balance for the address in the iteration (before stake is recalculated) @@ -658,9 +668,22 @@ // or just start handling the very first address. In the latter case last_id will be None and // flush_stake will do nothing if last_id.borrow().as_ref() != Some(¤t_id) { - flush_stake()?; - *last_id.borrow_mut() = Some(current_id.clone()); - stakers_number -= 1; + if stakers_number > 0 { + flush_stake()?; + *last_id.borrow_mut() = Some(current_id.clone()); + stakers_number -= 1; + } + // Break out if we reached the address limit + else { + if let Some(staker) = &*last_id.borrow() { + // Save the last calculated record to pick up in the next extrinsic call + PreviousCalculatedRecord::::set(Some(( + staker.clone(), + last_staked_calculated_block, + ))); + } + break; + }; }; // Increase accumulated reward for current address and update current staking record, i.e. (address, staked_block) -> amount @@ -677,15 +700,7 @@ &mut *income_acc.borrow_mut(), ); } - - // Break out if we reached the address limit - if stakers_number == 0 { - if storage_iterator.next().is_some() { - // Save the last calculated record to pick up in the next extrinsic call - PreviousCalculatedRecord::::set(Some((current_id, staked_block))); - } - break; - } + last_staked_calculated_block = staked_block; } flush_stake()?; } --- a/pallets/common/Cargo.toml +++ b/pallets/common/Cargo.toml @@ -11,18 +11,18 @@ version = '3.1.2' [dependencies] -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } 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' } ethereum = { version = "0.14.0", default-features = false } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } serde = { version = "1.0.130", default-features = false } scale-info = { version = "2.0.1", default-features = false, features = [ --- a/pallets/configuration/Cargo.toml +++ b/pallets/configuration/Cargo.toml @@ -10,15 +10,15 @@ scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } smallvec = "1.6.1" -xcm = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" } +xcm = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36" } [features] default = ["std"] --- a/pallets/configuration/src/lib.rs +++ b/pallets/configuration/src/lib.rs @@ -88,6 +88,7 @@ #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(T::DbWeight::get().writes(1))] pub fn set_weight_to_fee_coefficient_override( origin: OriginFor, @@ -102,6 +103,7 @@ Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(T::DbWeight::get().writes(1))] pub fn set_min_gas_price_override( origin: OriginFor, @@ -116,6 +118,7 @@ Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(T::DbWeight::get().writes(1))] pub fn set_xcm_allowed_locations( origin: OriginFor, @@ -126,6 +129,7 @@ Ok(()) } + #[pallet::call_index(3)] #[pallet::weight(T::DbWeight::get().writes(1))] pub fn set_app_promotion_configuration_override( origin: OriginFor, --- a/pallets/evm-coder-substrate/Cargo.toml +++ b/pallets/evm-coder-substrate/Cargo.toml @@ -8,15 +8,15 @@ scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } ethereum = { version = "0.14.0", default-features = false } evm-coder = { default-features = false, path = "../../crates/evm-coder" } -pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } up-data-structs = { default-features = false, path = "../../primitives/data-structs" } [dependencies.codec] --- a/pallets/evm-coder-substrate/src/lib.rs +++ b/pallets/evm-coder-substrate/src/lib.rs @@ -73,6 +73,7 @@ #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(0)] pub fn empty_call(origin: OriginFor) -> DispatchResult { let _sender = ensure_signed(origin)?; --- a/pallets/evm-contract-helpers/Cargo.toml +++ b/pallets/evm-contract-helpers/Cargo.toml @@ -12,16 +12,16 @@ ethereum = { version = "0.14.0", default-features = false } # Substrate -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } # Unique -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.36" } # Locals evm-coder = { default-features = false, path = '../../crates/evm-coder' } --- a/pallets/evm-migration/Cargo.toml +++ b/pallets/evm-migration/Cargo.toml @@ -9,15 +9,15 @@ "derive", ] } ethereum = { version = "0.14.0", default-features = false } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } [dependencies.codec] default-features = false --- a/pallets/evm-migration/src/lib.rs +++ b/pallets/evm-migration/src/lib.rs @@ -73,6 +73,7 @@ impl Pallet { /// Start contract migration, inserts contract stub at target address, /// and marks account as pending, allowing to insert storage + #[pallet::call_index(0)] #[pallet::weight(>::begin())] pub fn begin(origin: OriginFor, address: H160) -> DispatchResult { ensure_root(origin)?; @@ -87,6 +88,7 @@ /// Insert items into contract storage, this method can be called /// multiple times + #[pallet::call_index(1)] #[pallet::weight(>::set_data(data.len() as u32))] pub fn set_data( origin: OriginFor, @@ -108,6 +110,7 @@ /// Finish contract migration, allows it to be called. /// It is not possible to alter contract storage via [`Self::set_data`] /// after this call. + #[pallet::call_index(2)] #[pallet::weight(>::finish(code.len() as u32))] pub fn finish(origin: OriginFor, address: H160, code: Vec) -> DispatchResult { ensure_root(origin)?; @@ -122,6 +125,7 @@ } /// Create ethereum events attached to the fake transaction + #[pallet::call_index(3)] #[pallet::weight(>::insert_eth_logs(logs.len() as u32))] pub fn insert_eth_logs(origin: OriginFor, logs: Vec) -> DispatchResult { ensure_root(origin)?; @@ -133,6 +137,7 @@ } /// Create substrate events + #[pallet::call_index(4)] #[pallet::weight(>::insert_events(events.len() as u32))] pub fn insert_events(origin: OriginFor, events: Vec>) -> DispatchResult { ensure_root(origin)?; --- a/pallets/evm-transaction-payment/Cargo.toml +++ b/pallets/evm-transaction-payment/Cargo.toml @@ -8,17 +8,17 @@ scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.33" } -fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.36" } +fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } [dependencies.codec] default-features = false --- a/pallets/foreign-assets/Cargo.toml +++ b/pallets/foreign-assets/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["workspace-inheritance"] - [package] name = "pallet-foreign-assets" version = "0.1.0" @@ -13,27 +11,27 @@ "derive", ] } codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36", default-features = false } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36", default-features = false } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36", default-features = false } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36", default-features = false } up-data-structs = { default-features = false, path = '../../primitives/data-structs' } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36", default-features = false } pallet-common = { default-features = false, path = '../common' } pallet-fungible = { default-features = false, path = '../fungible' } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.36", default-features = false } orml-tokens.workspace = true -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [dev-dependencies] serde_json = "1.0.68" hex = { version = "0.4" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] --- a/pallets/foreign-assets/src/impl_fungibles.rs +++ b/pallets/foreign-assets/src/impl_fungibles.rs @@ -258,6 +258,13 @@ }, } } + + fn asset_exists(asset: AssetIds) -> bool { + match asset { + AssetIds::NativeAssetId(_) => true, + AssetIds::ForeignAssetId(fid) => >::contains_key(fid), + } + } } impl fungibles::Mutate<::AccountId> for Pallet --- a/pallets/foreign-assets/src/lib.rs +++ b/pallets/foreign-assets/src/lib.rs @@ -283,6 +283,7 @@ #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::register_foreign_asset())] pub fn register_foreign_asset( origin: OriginFor, @@ -323,6 +324,7 @@ Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::update_foreign_asset())] pub fn update_foreign_asset( origin: OriginFor, --- a/pallets/fungible/Cargo.toml +++ b/pallets/fungible/Cargo.toml @@ -11,19 +11,19 @@ version = '3.1.2' [dependencies] -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } pallet-common = { default-features = false, path = '../common' } pallet-structure = { default-features = false, path = '../structure' } 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.14.0", default-features = false } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } --- a/pallets/inflation/Cargo.toml +++ b/pallets/inflation/Cargo.toml @@ -44,37 +44,37 @@ default-features = false optional = true git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-support] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-balances] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-timestamp] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-randomness-collective-flip] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-std] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.serde] default-features = false @@ -84,17 +84,17 @@ [dependencies.sp-runtime] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-core] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-io] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies] scale-info = { version = "2.0.1", default-features = false, features = [ --- a/pallets/inflation/src/lib.rs +++ b/pallets/inflation/src/lib.rs @@ -163,6 +163,7 @@ /// # Arguments /// /// * inflation_start_relay_block: The relay chain block at which inflation should start + #[pallet::call_index(0)] #[pallet::weight(0)] pub fn start_inflation( origin: OriginFor, --- a/pallets/maintenance/Cargo.toml +++ b/pallets/maintenance/Cargo.toml @@ -10,12 +10,16 @@ readme = "README.md" [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ + "derive", +] } +scale-info = { version = "2.1.1", default-features = false, features = [ + "derive", +] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] --- a/pallets/maintenance/src/lib.rs +++ b/pallets/maintenance/src/lib.rs @@ -55,6 +55,7 @@ #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::enable())] pub fn enable(origin: OriginFor) -> DispatchResult { ensure_root(origin)?; @@ -66,6 +67,7 @@ Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::disable())] pub fn disable(origin: OriginFor) -> DispatchResult { ensure_root(origin)?; --- a/pallets/nonfungible/Cargo.toml +++ b/pallets/nonfungible/Cargo.toml @@ -11,19 +11,19 @@ version = '3.1.2' [dependencies] -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } pallet-common = { default-features = false, path = '../common' } pallet-structure = { default-features = false, path = '../structure' } 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.14.0", default-features = false } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } --- a/pallets/proxy-rmrk-core/Cargo.toml +++ b/pallets/proxy-rmrk-core/Cargo.toml @@ -11,17 +11,17 @@ version = '3.1.2' [dependencies] -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } pallet-common = { default-features = false, path = '../common' } pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" } pallet-structure = { default-features = false, path = "../../pallets/structure" } up-data-structs = { default-features = false, path = '../../primitives/data-structs' } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } rmrk-traits = { default-features = false, path = "../../primitives/rmrk-traits" } scale-info = { version = "2.0.1", default-features = false, features = [ "derive", --- a/pallets/proxy-rmrk-core/src/lib.rs +++ b/pallets/proxy-rmrk-core/src/lib.rs @@ -357,6 +357,7 @@ /// - `max`: Optional maximum number of tokens. /// - `symbol`: UTF-8 string with token prefix, by which to represent the token in wallets and UIs. /// Analogous to Unique's [`token_prefix`](up_data_structs::Collection). Cannot be changed. + #[pallet::call_index(0)] #[pallet::weight(>::create_collection())] pub fn create_collection( origin: OriginFor, @@ -430,6 +431,7 @@ /// # Arguments: /// - `origin`: sender of the transaction /// - `collection_id`: RMRK ID of the collection to destroy. + #[pallet::call_index(1)] #[pallet::weight(>::destroy_collection())] pub fn destroy_collection( origin: OriginFor, @@ -464,6 +466,7 @@ /// - `origin`: sender of the transaction /// - `collection_id`: RMRK collection ID to change the issuer of. /// - `new_issuer`: Collection's new issuer. + #[pallet::call_index(2)] #[pallet::weight(>::change_collection_issuer())] pub fn change_collection_issuer( origin: OriginFor, @@ -501,6 +504,7 @@ /// # Arguments: /// - `origin`: sender of the transaction /// - `collection_id`: RMRK ID of the collection to lock. + #[pallet::call_index(3)] #[pallet::weight(>::lock_collection())] pub fn lock_collection( origin: OriginFor, @@ -545,6 +549,7 @@ /// - `metadata`: Arbitrary data about an NFT, e.g. IPFS hash. Cannot be changed. /// - `transferable`: Can this NFT be transferred? Cannot be changed. /// - `resources`: Resource data to be added to the NFT immediately after minting. + #[pallet::call_index(4)] #[pallet::weight(>::mint_nft(resources.as_ref().map(|r| r.len() as u32).unwrap_or(0)))] pub fn mint_nft( origin: OriginFor, @@ -628,6 +633,7 @@ /// - `max_burns`: Maximum number of tokens to burn, assuming nesting. The transaction /// is reverted if there are more tokens to burn in the nesting tree than this number. /// This is primarily a mechanism of transaction weight control. + #[pallet::call_index(5)] #[pallet::weight(>::burn_nft(*max_burns))] pub fn burn_nft( origin: OriginFor, @@ -675,6 +681,7 @@ /// - `rmrk_collection_id`: RMRK ID of the collection of the NFT to be transferred. /// - `rmrk_nft_id`: ID of the NFT to be transferred. /// - `new_owner`: New owner of the nft which can be either an account or a NFT. + #[pallet::call_index(6)] #[pallet::weight(>::send())] pub fn send( origin: OriginFor, @@ -800,6 +807,7 @@ /// - `rmrk_nft_id`: ID of the NFT to be accepted. /// - `new_owner`: Either the sender's account ID or a sender-owned NFT, /// whichever the accepted NFT was sent to. + #[pallet::call_index(7)] #[pallet::weight(>::accept_nft())] pub fn accept_nft( origin: OriginFor, @@ -890,6 +898,7 @@ /// - `origin`: sender of the transaction /// - `rmrk_collection_id`: RMRK ID of the NFT to be rejected. /// - `rmrk_nft_id`: ID of the NFT to be rejected. + #[pallet::call_index(8)] #[pallet::weight(>::reject_nft())] pub fn reject_nft( origin: OriginFor, @@ -957,6 +966,7 @@ /// - `rmrk_nft_id`: ID of the NFT with a pending resource to be accepted. /// - `resource_id`: ID of the newly created pending resource. /// accept the addition of a new resource to an existing NFT + #[pallet::call_index(9)] #[pallet::weight(>::accept_resource())] pub fn accept_resource( origin: OriginFor, @@ -1011,6 +1021,7 @@ /// - `rmrk_collection_id`: RMRK collection ID of the NFT. /// - `rmrk_nft_id`: ID of the NFT with a resource to be removed. /// - `resource_id`: ID of the removal-pending resource. + #[pallet::call_index(10)] #[pallet::weight(>::accept_resource_removal())] pub fn accept_resource_removal( origin: OriginFor, @@ -1092,6 +1103,7 @@ /// - `maybe_nft_id`: Optional ID of the NFT. If left empty, then the property is set for the collection. /// - `key`: Key of the custom property to be referenced by. /// - `value`: Value of the custom property to be stored. + #[pallet::call_index(11)] #[pallet::weight(>::set_property())] pub fn set_property( origin: OriginFor, @@ -1165,6 +1177,7 @@ /// - `rmrk_collection_id`: RMRK collection ID of the NFT. /// - `rmrk_nft_id`: ID of the NFT to rearrange resource priorities for. /// - `priorities`: Ordered vector of resource IDs. + #[pallet::call_index(12)] #[pallet::weight(>::set_priority())] pub fn set_priority( origin: OriginFor, @@ -1216,6 +1229,7 @@ /// - `rmrk_collection_id`: RMRK collection ID of the NFT. /// - `nft_id`: ID of the NFT to assign a resource to. /// - `resource`: Data of the resource to be created. + #[pallet::call_index(13)] #[pallet::weight(>::add_basic_resource())] pub fn add_basic_resource( origin: OriginFor, @@ -1258,6 +1272,7 @@ /// - `rmrk_collection_id`: RMRK collection ID of the NFT. /// - `nft_id`: ID of the NFT to assign a resource to. /// - `resource`: Data of the resource to be created. + #[pallet::call_index(14)] #[pallet::weight(>::add_composable_resource())] pub fn add_composable_resource( origin: OriginFor, @@ -1320,6 +1335,7 @@ /// - `rmrk_collection_id`: RMRK collection ID of the NFT. /// - `nft_id`: ID of the NFT to assign a resource to. /// - `resource`: Data of the resource to be created. + #[pallet::call_index(15)] #[pallet::weight(>::add_slot_resource())] pub fn add_slot_resource( origin: OriginFor, @@ -1361,6 +1377,7 @@ /// - `rmrk_collection_id`: RMRK ID of a collection to which the NFT making use of the resource belongs to. /// - `nft_id`: ID of the NFT with a resource to be removed. /// - `resource_id`: ID of the resource to be removed. + #[pallet::call_index(16)] #[pallet::weight(>::remove_resource())] pub fn remove_resource( origin: OriginFor, --- a/pallets/proxy-rmrk-equip/Cargo.toml +++ b/pallets/proxy-rmrk-equip/Cargo.toml @@ -11,16 +11,16 @@ version = '3.1.2' [dependencies] -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } pallet-common = { default-features = false, path = '../common' } pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" } up-data-structs = { default-features = false, path = '../../primitives/data-structs' } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } rmrk-traits = { default-features = false, path = "../../primitives/rmrk-traits" } scale-info = { version = "2.0.1", default-features = false, features = [ "derive", --- a/pallets/proxy-rmrk-equip/src/lib.rs +++ b/pallets/proxy-rmrk-equip/src/lib.rs @@ -231,6 +231,7 @@ /// - `symbol`: Arbitrary client-chosen symbol. /// - `parts`: Array of Fixed and Slot Parts composing the Base, /// confined in length by [`RmrkPartsLimit`](up_data_structs::RmrkPartsLimit). + #[pallet::call_index(0)] #[pallet::weight(>::create_base(parts.len() as u32))] pub fn create_base( origin: OriginFor, @@ -309,6 +310,7 @@ /// - `key`: Arbitrary BoundedString, defined by client. /// - `value`: Arbitrary BoundedString, defined by client. /// - `inherit`: Optional bool. + #[pallet::call_index(1)] #[pallet::weight(>::theme_add(theme.properties.len() as u32))] pub fn theme_add( origin: OriginFor, @@ -370,6 +372,7 @@ /// - `base_id`: Base containing the Slot Part to be updated. /// - `slot_id`: Slot Part whose Equippable List is being updated . /// - `equippables`: List of equippables that will override the current Equippables list. + #[pallet::call_index(2)] #[pallet::weight(>::equippable())] pub fn equippable( origin: OriginFor, --- a/pallets/refungible/Cargo.toml +++ b/pallets/refungible/Cargo.toml @@ -11,17 +11,17 @@ version = '3.1.2' [dependencies] -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } evm-coder = { default-features = false, path = '../../crates/evm-coder' } pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' } pallet-common = { default-features = false, path = '../common' } pallet-structure = { default-features = false, path = '../structure' } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } struct-versioning = { path = "../../crates/struct-versioning" } up-data-structs = { default-features = false, path = '../../primitives/data-structs' } --- a/pallets/scheduler-v2/Cargo.toml +++ b/pallets/scheduler-v2/Cargo.toml @@ -10,21 +10,25 @@ readme = "README.md" [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ + "derive", +] } log = { version = "0.4.17", default-features = false } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { version = "4.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +scale-info = { version = "2.1.1", default-features = false, features = [ + "derive", +] } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [dev-dependencies] -pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { version = "6.0.0", default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] --- a/pallets/scheduler-v2/src/lib.rs +++ b/pallets/scheduler-v2/src/lib.rs @@ -639,6 +639,7 @@ /// /// Only `T::ScheduleOrigin` is allowed to schedule a task. /// Only `T::PrioritySetOrigin` is allowed to set the task's priority. + #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::schedule(T::MaxScheduledPerBlock::get()))] pub fn schedule( origin: OriginFor, @@ -667,6 +668,7 @@ /// Cancel an anonymously scheduled task. /// /// The `T::OriginPrivilegeCmp` decides whether the given origin is allowed to cancel the task or not. + #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::cancel(T::MaxScheduledPerBlock::get()))] pub fn cancel(origin: OriginFor, when: T::BlockNumber, index: u32) -> DispatchResult { T::ScheduleOrigin::ensure_origin(origin.clone())?; @@ -679,6 +681,7 @@ /// /// Only `T::ScheduleOrigin` is allowed to schedule a task. /// Only `T::PrioritySetOrigin` is allowed to set the task's priority. + #[pallet::call_index(2)] #[pallet::weight(::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get()))] pub fn schedule_named( origin: OriginFor, @@ -709,6 +712,7 @@ /// Cancel a named scheduled task. /// /// The `T::OriginPrivilegeCmp` decides whether the given origin is allowed to cancel the task or not. + #[pallet::call_index(3)] #[pallet::weight(::WeightInfo::cancel_named(T::MaxScheduledPerBlock::get()))] pub fn cancel_named(origin: OriginFor, id: TaskName) -> DispatchResult { T::ScheduleOrigin::ensure_origin(origin.clone())?; @@ -722,6 +726,7 @@ /// # /// Same as [`schedule`]. /// # + #[pallet::call_index(4)] #[pallet::weight(::WeightInfo::schedule(T::MaxScheduledPerBlock::get()))] pub fn schedule_after( origin: OriginFor, @@ -755,6 +760,7 @@ /// # /// Same as [`schedule_named`](Self::schedule_named). /// # + #[pallet::call_index(5)] #[pallet::weight(::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get()))] pub fn schedule_named_after( origin: OriginFor, @@ -785,6 +791,7 @@ /// Change a named task's priority. /// /// Only the `T::PrioritySetOrigin` is allowed to change the task's priority. + #[pallet::call_index(6)] #[pallet::weight(::WeightInfo::change_named_priority(T::MaxScheduledPerBlock::get()))] pub fn change_named_priority( origin: OriginFor, --- a/pallets/scheduler-v2/src/mock.rs +++ b/pallets/scheduler-v2/src/mock.rs @@ -87,6 +87,7 @@ where ::RuntimeOrigin: OriginTrait, { + #[pallet::call_index(0)] #[pallet::weight(*weight)] pub fn log(origin: OriginFor, i: u32, weight: Weight) -> DispatchResult { Self::deposit_event(Event::Logged(i, weight)); @@ -96,6 +97,7 @@ Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(*weight)] pub fn log_without_filter(origin: OriginFor, i: u32, weight: Weight) -> DispatchResult { Self::deposit_event(Event::Logged(i, weight)); --- a/pallets/structure/Cargo.toml +++ b/pallets/structure/Cargo.toml @@ -4,10 +4,10 @@ edition = "2021" [dependencies] -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } pallet-common = { path = "../common", default-features = false } parity-scale-codec = { version = "3.1.2", default-features = false, features = [ "derive", @@ -16,7 +16,7 @@ "derive", ] } up-data-structs = { path = "../../primitives/data-structs", default-features = false } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } [features] default = ["std"] --- a/pallets/unique/Cargo.toml +++ b/pallets/unique/Cargo.toml @@ -61,37 +61,37 @@ default-features = false optional = true git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-support] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-std] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-runtime] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-core] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-io] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" ################################################################################ # Local Dependencies @@ -100,7 +100,7 @@ scale-info = { version = "2.0.1", default-features = false, features = [ "derive", ] } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } pallet-common = { default-features = false, path = "../common" } evm-coder = { default-features = false, path = '../../crates/evm-coder' } pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' } --- a/primitives/app_promotion_rpc/Cargo.toml +++ b/primitives/app_promotion_rpc/Cargo.toml @@ -10,11 +10,11 @@ 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", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } [features] default = ["std"] --- a/primitives/common/Cargo.toml +++ b/primitives/common/Cargo.toml @@ -6,7 +6,7 @@ license = 'All Rights Reserved' name = 'up-common' repository = 'https://github.com/UniqueNetwork/unique-chain' -version = "0.9.33" +version.workspace = true [features] default = ['std'] @@ -24,39 +24,39 @@ [dependencies.sp-std] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-support] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-runtime] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-core] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-consensus-aura] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.fp-rpc] default-features = false git = "https://github.com/uniquenetwork/frontier" -branch = "unique-polkadot-v0.9.33" +branch = "unique-polkadot-v0.9.36" [dependencies.cumulus-primitives-core] default-features = false git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-evm] default-features = false git = "https://github.com/uniquenetwork/frontier" -branch = "unique-polkadot-v0.9.33" +branch = "unique-polkadot-v0.9.36" --- a/primitives/common/src/constants.rs +++ b/primitives/common/src/constants.rs @@ -17,7 +17,7 @@ use sp_runtime::Perbill; use frame_support::{ parameter_types, - weights::{Weight, constants::WEIGHT_PER_SECOND}, + weights::{Weight, constants::WEIGHT_REF_TIME_PER_SECOND}, }; use cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE; use crate::types::{BlockNumber, Balance}; @@ -55,9 +55,9 @@ /// by Operational extrinsics. pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 2 seconds of compute with a 6 second average block time. -pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND - .saturating_div(2) - .set_proof_size(MAX_POV_SIZE as u64); +pub const MAXIMUM_BLOCK_WEIGHT: Weight = + Weight::from_ref_time(WEIGHT_REF_TIME_PER_SECOND.saturating_div(2)) + .set_proof_size(MAX_POV_SIZE as u64); parameter_types! { pub const TransactionByteFee: Balance = 501 * MICROUNIQUE / 2; --- a/primitives/data-structs/Cargo.toml +++ b/primitives/data-structs/Cargo.toml @@ -10,40 +10,40 @@ [dependencies] scale-info = { version = "2.0.1", default-features = false, features = [ - "derive", + "derive", ] } codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false, features = [ - 'derive', + 'derive', ] } serde = { version = "1.0.130", features = [ - 'derive', + 'derive', ], default-features = false, optional = true } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } derivative = { version = "2.2.0", features = ["use_core"] } struct-versioning = { path = "../../crates/struct-versioning" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } rmrk-traits = { default-features = false, path = "../rmrk-traits" } bondrewd = { version = "0.1.14", features = [ - "derive", + "derive", ], default-features = false } [features] default = ["std"] std = [ - "serde1", - "serde/std", - "codec/std", - "frame-system/std", - "frame-support/std", - "sp-runtime/std", - "sp-core/std", - "sp-std/std", - "pallet-evm/std", - "rmrk-traits/std", + "serde1", + "serde/std", + "codec/std", + "frame-system/std", + "frame-support/std", + "sp-runtime/std", + "sp-core/std", + "sp-std/std", + "pallet-evm/std", + "rmrk-traits/std", ] serde1 = ["serde/alloc"] limit-testing = [] --- a/primitives/rmrk-rpc/Cargo.toml +++ b/primitives/rmrk-rpc/Cargo.toml @@ -8,10 +8,10 @@ codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive", ] } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } serde = { version = "1.0.130", default-features = false, features = ["derive"] } rmrk-traits = { default-features = false, path = "../rmrk-traits" } --- a/primitives/rpc/Cargo.toml +++ b/primitives/rpc/Cargo.toml @@ -10,11 +10,11 @@ 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", branch = "polkadot-v0.9.33" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } [features] default = ["std"] --- a/runtime/common/config/ethereum.rs +++ b/runtime/common/config/ethereum.rs @@ -1,6 +1,6 @@ use sp_core::{U256, H160}; use frame_support::{ - weights::{Weight, constants::WEIGHT_PER_SECOND}, + weights::{Weight, constants::WEIGHT_REF_TIME_PER_SECOND}, traits::{FindAuthor}, parameter_types, ConsensusEngineId, }; @@ -23,9 +23,9 @@ // (contract, which only writes a lot of data), // approximating on top of our real store write weight parameter_types! { - pub const WritesPerSecond: u64 = WEIGHT_PER_SECOND.ref_time() / ::DbWeight::get().write; + pub const WritesPerSecond: u64 = WEIGHT_REF_TIME_PER_SECOND / ::DbWeight::get().write; pub const GasPerSecond: u64 = WritesPerSecond::get() * 20000; - pub const WeightTimePerGas: u64 = WEIGHT_PER_SECOND.ref_time() / GasPerSecond::get(); + pub const WeightTimePerGas: u64 = WEIGHT_REF_TIME_PER_SECOND / GasPerSecond::get(); pub const WeightPerGas: Weight = Weight::from_ref_time(WeightTimePerGas::get()); } --- a/runtime/common/runtime_apis.rs +++ b/runtime/common/runtime_apis.rs @@ -574,6 +574,8 @@ fn elasticity() -> Option { None } + + fn gas_limit_multiplier_support() {} } impl fp_rpc::ConvertTransactionRuntimeApi for Runtime { --- a/runtime/opal/Cargo.toml +++ b/runtime/opal/Cargo.toml @@ -1,8 +1,6 @@ ################################################################################ # Package -cargo-features = ["workspace-inheritance"] - [package] authors = ['Unique Network '] build = 'build.rs' @@ -12,7 +10,7 @@ license = 'GPLv3' name = 'opal-runtime' repository = 'https://github.com/UniqueNetwork/unique-chain' -version = "0.9.33" +version.workspace = true [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] @@ -205,39 +203,39 @@ default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-try-runtime] default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-executive] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-support] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system-benchmarking] default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system-rpc-runtime-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.hex-literal] optional = true @@ -252,12 +250,12 @@ [dependencies.pallet-aura] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-balances] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" # Contracts specific packages # [dependencies.pallet-contracts] @@ -281,97 +279,97 @@ [dependencies.pallet-randomness-collective-flip] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-sudo] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-timestamp] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-transaction-payment] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-transaction-payment-rpc-runtime-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-treasury] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-arithmetic] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-block-builder] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-core] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-consensus-aura] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-inherents] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-io] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-offchain] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-runtime] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-session] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-std] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-transaction-pool] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-version] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.smallvec] version = '1.6.1' @@ -382,46 +380,46 @@ [dependencies.parachain-info] default-features = false git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-pallet-aura-ext] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-parachain-system] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-core] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-xcm] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-dmp-queue] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-xcmp-queue] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-utility] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-timestamp] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false ################################################################################ @@ -429,27 +427,27 @@ [dependencies.polkadot-parachain] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm-builder] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm-executor] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.pallet-xcm] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false ################################################################################ @@ -471,8 +469,8 @@ up-rpc = { path = "../../primitives/rpc", default-features = false } app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false } rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false } -fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } pallet-inflation = { path = '../../pallets/inflation', default-features = false } pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false } up-data-structs = { path = '../../primitives/data-structs', default-features = false } @@ -484,20 +482,20 @@ pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" } pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" } pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" } -pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.33", 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.36", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" } pallet-unique-scheduler-v2 = { path = '../../pallets/scheduler-v2', default-features = false } 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", branch = "unique-polkadot-v0.9.33" } -pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } evm-coder = { default-features = false, path = '../../crates/evm-coder' } -up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.33' } +up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.36' } pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" } pallet-maintenance = { default-features = false, path = "../../pallets/maintenance" } precompile-utils-macro = { path = "../common/ethereum/precompiles/utils/macro" } @@ -524,4 +522,4 @@ [build-dependencies.substrate-wasm-builder] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" --- a/runtime/opal/src/lib.rs +++ b/runtime/opal/src/lib.rs @@ -59,10 +59,10 @@ spec_name: create_runtime_str!(RUNTIME_NAME), impl_name: create_runtime_str!(RUNTIME_NAME), authoring_version: 1, - spec_version: 933032, + spec_version: 336040, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 2, + transaction_version: 3, state_version: 0, }; --- a/runtime/quartz/Cargo.toml +++ b/runtime/quartz/Cargo.toml @@ -1,8 +1,6 @@ ################################################################################ # Package -cargo-features = ["workspace-inheritance"] - [package] authors = ['Unique Network '] build = 'build.rs' @@ -12,7 +10,7 @@ license = 'GPLv3' name = 'quartz-runtime' repository = 'https://github.com/UniqueNetwork/unique-chain' -version = '0.9.33' +version.workspace = true [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] @@ -190,39 +188,39 @@ default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-try-runtime] default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-executive] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-support] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system-benchmarking] default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system-rpc-runtime-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.hex-literal] optional = true @@ -237,12 +235,12 @@ [dependencies.pallet-aura] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-balances] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" # Contracts specific packages # [dependencies.pallet-contracts] @@ -266,97 +264,97 @@ [dependencies.pallet-randomness-collective-flip] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-sudo] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-timestamp] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-transaction-payment] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-transaction-payment-rpc-runtime-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-treasury] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-arithmetic] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-block-builder] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-core] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-consensus-aura] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-inherents] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-io] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-offchain] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-runtime] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-session] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-std] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-transaction-pool] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-version] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.smallvec] version = '1.6.1' @@ -367,46 +365,46 @@ [dependencies.parachain-info] default-features = false git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-pallet-aura-ext] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-parachain-system] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-core] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-xcm] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-dmp-queue] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-xcmp-queue] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-utility] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-timestamp] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false ################################################################################ @@ -414,27 +412,27 @@ [dependencies.polkadot-parachain] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm-builder] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm-executor] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.pallet-xcm] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false ################################################################################ @@ -463,8 +461,8 @@ pallet-unique = { path = '../../pallets/unique', default-features = false } up-rpc = { path = "../../primitives/rpc", default-features = false } app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false } -fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } pallet-inflation = { path = '../../pallets/inflation', default-features = false } pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false } up-data-structs = { path = '../../primitives/data-structs', default-features = false } @@ -477,19 +475,19 @@ pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" } pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" } # 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.33", 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.36", 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", branch = "unique-polkadot-v0.9.33" } -pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } evm-coder = { default-features = false, path = '../../crates/evm-coder' } -up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.33' } +up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.36' } pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" } pallet-maintenance = { default-features = false, path = "../../pallets/maintenance" } precompile-utils-macro = { path = "../common/ethereum/precompiles/utils/macro" } @@ -511,4 +509,4 @@ [build-dependencies.substrate-wasm-builder] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" --- a/runtime/quartz/src/lib.rs +++ b/runtime/quartz/src/lib.rs @@ -52,10 +52,10 @@ spec_name: create_runtime_str!(RUNTIME_NAME), impl_name: create_runtime_str!(RUNTIME_NAME), authoring_version: 1, - spec_version: 933032, + spec_version: 336040, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 2, + transaction_version: 3, state_version: 0, }; --- a/runtime/tests/Cargo.toml +++ b/runtime/tests/Cargo.toml @@ -11,22 +11,22 @@ [dependencies] up-data-structs = { default-features = false, path = '../../primitives/data-structs' } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } -fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } pallet-common = { path = '../../pallets/common' } pallet-structure = { path = '../../pallets/structure' } @@ -43,4 +43,4 @@ scale-info = "*" evm-coder = { default-features = false, path = '../../crates/evm-coder' } -up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.33" } +up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.36" } --- a/runtime/unique/Cargo.toml +++ b/runtime/unique/Cargo.toml @@ -1,8 +1,6 @@ ################################################################################ # Package -cargo-features = ["workspace-inheritance"] - [package] authors = ['Unique Network '] build = 'build.rs' @@ -12,7 +10,7 @@ license = 'GPLv3' name = 'unique-runtime' repository = 'https://github.com/UniqueNetwork/unique-chain' -version = '0.9.33' +version.workspace = true [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] @@ -191,39 +189,39 @@ default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-try-runtime] default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-executive] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-support] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system-benchmarking] default-features = false git = "https://github.com/paritytech/substrate" optional = true -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.frame-system-rpc-runtime-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.hex-literal] optional = true @@ -238,12 +236,12 @@ [dependencies.pallet-aura] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-balances] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" # Contracts specific packages # [dependencies.pallet-contracts] @@ -267,97 +265,97 @@ [dependencies.pallet-randomness-collective-flip] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-sudo] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-timestamp] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-transaction-payment] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-transaction-payment-rpc-runtime-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.pallet-treasury] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-arithmetic] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-api] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-block-builder] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-core] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-consensus-aura] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-inherents] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-io] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-offchain] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-runtime] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-session] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-std] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-transaction-pool] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.sp-version] default-features = false git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.smallvec] version = '1.6.1' @@ -368,46 +366,46 @@ [dependencies.parachain-info] default-features = false git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" [dependencies.cumulus-pallet-aura-ext] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-parachain-system] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-core] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-xcm] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-dmp-queue] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-pallet-xcmp-queue] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-utility] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false [dependencies.cumulus-primitives-timestamp] git = "https://github.com/paritytech/cumulus" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" default-features = false ################################################################################ @@ -415,27 +413,27 @@ [dependencies.polkadot-parachain] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm-builder] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.xcm-executor] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false [dependencies.pallet-xcm] git = "https://github.com/paritytech/polkadot" -branch = "release-v0.9.33" +branch = "release-v0.9.36" default-features = false ################################################################################ @@ -469,21 +467,21 @@ pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" } pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" } # 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.33", 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.36", 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", branch = "unique-polkadot-v0.9.33" } -pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } -pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.33" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } +pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.36" } evm-coder = { default-features = false, path = '../../crates/evm-coder' } -up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.33' } +up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.36' } pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" } pallet-maintenance = { default-features = false, path = "../../pallets/maintenance" } precompile-utils-macro = { path = "../common/ethereum/precompiles/utils/macro" } @@ -505,4 +503,4 @@ [build-dependencies.substrate-wasm-builder] git = "https://github.com/paritytech/substrate" -branch = "polkadot-v0.9.33" +branch = "polkadot-v0.9.36" --- a/runtime/unique/src/lib.rs +++ b/runtime/unique/src/lib.rs @@ -52,10 +52,10 @@ spec_name: create_runtime_str!(RUNTIME_NAME), impl_name: create_runtime_str!(RUNTIME_NAME), authoring_version: 1, - spec_version: 933032, + spec_version: 336040, impl_version: 0, apis: RUNTIME_API_VERSIONS, - transaction_version: 2, + transaction_version: 3, state_version: 0, }; --- a/test-pallets/utils/Cargo.toml +++ b/test-pallets/utils/Cargo.toml @@ -6,13 +6,17 @@ publish = false [dependencies] -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } -scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [ + "derive", +] } +scale-info = { version = "2.1.1", default-features = false, features = [ + "derive", +] } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } # pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false } pallet-unique-scheduler-v2 = { path = '../../pallets/scheduler-v2', default-features = false } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.36" } [features] default = ["std"] @@ -24,4 +28,7 @@ "pallet-unique-scheduler-v2/std", "sp-std/std", ] -try-runtime = ["frame-support/try-runtime", "pallet-unique-scheduler-v2/try-runtime"] +try-runtime = [ + "frame-support/try-runtime", + "pallet-unique-scheduler-v2/try-runtime", +] --- a/test-pallets/utils/src/lib.rs +++ b/test-pallets/utils/src/lib.rs @@ -75,6 +75,7 @@ #[pallet::call] impl Pallet { + #[pallet::call_index(0)] #[pallet::weight(10_000)] pub fn enable(origin: OriginFor) -> DispatchResult { ensure_root(origin)?; @@ -83,6 +84,7 @@ Ok(()) } + #[pallet::call_index(1)] #[pallet::weight(10_000)] pub fn set_test_value(origin: OriginFor, value: u32) -> DispatchResult { Self::ensure_origin_and_enabled(origin)?; @@ -94,6 +96,7 @@ Ok(()) } + #[pallet::call_index(2)] #[pallet::weight(10_000)] pub fn set_test_value_and_rollback(origin: OriginFor, value: u32) -> DispatchResult { Self::set_test_value(origin, value)?; @@ -103,6 +106,7 @@ Err(>::TriggerRollback.into()) } + #[pallet::call_index(3)] #[pallet::weight(10_000)] pub fn inc_test_value(origin: OriginFor) -> DispatchResult { Self::set_test_value(origin, >::get() + 1) @@ -124,12 +128,14 @@ // Ok(()) // } + #[pallet::call_index(4)] #[pallet::weight(100_000_000)] pub fn just_take_fee(origin: OriginFor) -> DispatchResult { Self::ensure_origin_and_enabled(origin)?; Ok(()) } + #[pallet::call_index(5)] #[pallet::weight(10_000)] pub fn batch_all( origin: OriginFor, --- a/tests/.eslintrc.json +++ b/tests/.eslintrc.json @@ -10,7 +10,8 @@ "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 11, - "sourceType": "module" + "sourceType": "module", + "project": "**/tsconfig.json" }, "plugins": [ "@typescript-eslint", @@ -24,6 +25,7 @@ "SwitchCase": 1 } ], + "no-trailing-spaces": "warn", "function-call-argument-newline": [ "error", "consistent" --- a/tests/package.json +++ b/tests/package.json @@ -124,6 +124,6 @@ "csv-writer": "^1.6.0", "find-process": "^1.4.7", "solc": "0.8.17", - "web3": "^1.8.0" + "web3": "^1.8.1" } } --- a/tests/src/app-promotion.test.ts +++ b/tests/src/app-promotion.test.ts @@ -45,113 +45,113 @@ }); }); - describe('stake extrinsic', () => { + describe('stake extrinsic', () => { itSub('should "lock" staking balance, add it to "staked" map, and increase "totalStaked" amount', async ({helper}) => { const [staker, recepient] = [accounts.pop()!, accounts.pop()!]; const totalStakedBefore = await helper.staking.getTotalStaked(); - + // Minimum stake amount is 100: await expect(helper.staking.stake(staker, 100n * nominal - 1n)).to.be.rejected; await helper.staking.stake(staker, 100n * nominal); - + // Staker balance is: miscFrozen: 100, feeFrozen: 100, reserved: 0n... // ...so he can not transfer 900 expect(await helper.balance.getSubstrateFull(staker.address)).to.contain({miscFrozen: 100n * nominal, feeFrozen: 100n * nominal, reserved: 0n}); expect(await helper.balance.getLocked(staker.address)).to.deep.eq([{id: 'appstake', amount: 100n * nominal, reasons: 'All'}]); await expect(helper.balance.transferToSubstrate(staker, recepient.address, 900n * nominal)).to.be.rejectedWith('balances.LiquidityRestrictions'); - + expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.be.equal(100n * nominal); expect(await helper.balance.getSubstrate(staker.address) / nominal).to.be.equal(999n); - // it is potentially flaky test. Promotion can credited some tokens. Maybe we need to use closeTo? - expect(await helper.staking.getTotalStaked()).to.be.equal(totalStakedBefore + 100n * nominal); // total tokens amount staked in app-promotion increased - - + // it is potentially flaky test. Promotion can credited some tokens. Maybe we need to use closeTo? + expect(await helper.staking.getTotalStaked()).to.be.equal(totalStakedBefore + 100n * nominal); // total tokens amount staked in app-promotion increased + + await helper.staking.stake(staker, 200n * nominal); expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.be.equal(300n * nominal); const totalStakedPerBlock = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); expect(totalStakedPerBlock[0].amount).to.equal(100n * nominal); expect(totalStakedPerBlock[1].amount).to.equal(200n * nominal); }); - + itSub('should allow to create maximum 10 stakes for account', async ({helper}) => { const [staker] = await helper.arrange.createAccounts([2000n], donor); for (let i = 0; i < 10; i++) { await helper.staking.stake(staker, 100n * nominal); } - + // can have 10 stakes expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.be.equal(1000n * nominal); expect(await helper.staking.getTotalStakedPerBlock({Substrate: staker.address})).to.have.length(10); - + await expect(helper.staking.stake(staker, 100n * nominal)).to.be.rejectedWith('appPromotion.NoPermission'); - + // After unstake can stake again await helper.staking.unstake(staker); await helper.staking.stake(staker, 100n * nominal); expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.equal(100n * nominal); }); - + itSub('should reject transaction if stake amount is more than total free balance minus frozen', async ({helper}) => { const staker = accounts.pop()!; - + // Can't stake full balance because Alice needs to pay some fee await expect(helper.staking.stake(staker, 1000n * nominal)).to.be.rejected; await helper.staking.stake(staker, 500n * nominal); - + // Can't stake 500 tkn because Alice has Less than 500 transferable; - await expect(helper.staking.stake(staker, 500n * nominal)).to.be.rejectedWith('balances.LiquidityRestrictions'); + await expect(helper.staking.stake(staker, 500n * nominal)).to.be.rejectedWith('balances.LiquidityRestrictions'); expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.be.equal(500n * nominal); }); - + itSub('for different accounts in one block is possible', async ({helper}) => { const crowd = [accounts.pop()!, accounts.pop()!, accounts.pop()!, accounts.pop()!]; - + const crowdStartsToStake = crowd.map(user => helper.staking.stake(user, 100n * nominal)); await expect(Promise.all(crowdStartsToStake)).to.be.fulfilled; - + const crowdStakes = await Promise.all(crowd.map(address => helper.staking.getTotalStaked({Substrate: address.address}))); expect(crowdStakes).to.deep.equal([100n * nominal, 100n * nominal, 100n * nominal, 100n * nominal]); }); }); - - describe('unstake extrinsic', () => { + + describe('unstake extrinsic', () => { itSub('should change balance state from "frozen" to "reserved", add it to "pendingUnstake" map, and subtract it from totalStaked', async ({helper}) => { const [staker, recepient] = [accounts.pop()!, accounts.pop()!]; const totalStakedBefore = await helper.staking.getTotalStaked(); await helper.staking.stake(staker, 900n * nominal); await helper.staking.unstake(staker); - + // Right after unstake balance is reserved - // Staker can not transfer + // Staker can not transfer expect(await helper.balance.getSubstrateFull(staker.address)).to.deep.contain({reserved: 900n * nominal, miscFrozen: 0n, feeFrozen: 0n}); await expect(helper.balance.transferToSubstrate(staker, recepient.address, 100n * nominal)).to.be.rejectedWith('balances.InsufficientBalance'); expect(await helper.staking.getPendingUnstake({Substrate: staker.address})).to.be.equal(900n * nominal); expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.be.equal(0n); expect(await helper.staking.getTotalStaked()).to.be.equal(totalStakedBefore); }); - + itSub('should unlock balance after unlocking period ends and remove it from "pendingUnstake"', async ({helper}) => { const staker = accounts.pop()!; await helper.staking.stake(staker, 100n * nominal); await helper.staking.unstake(staker); const [pendingUnstake] = await helper.staking.getPendingUnstakePerBlock({Substrate: staker.address}); - + // Wait for unstaking period. Balance now free ~1000; reserved, frozen, miscFrozeb: 0n await helper.wait.forParachainBlockNumber(pendingUnstake.block); expect(await helper.balance.getSubstrateFull(staker.address)).to.deep.contain({reserved: 0n, miscFrozen: 0n, feeFrozen: 0n}); expect(await helper.balance.getSubstrate(staker.address) / nominal).to.be.equal(999n); - + // staker can transfer: await helper.balance.transferToSubstrate(staker, donor.address, 998n * nominal); expect(await helper.balance.getSubstrate(staker.address) / nominal).to.be.equal(1n); }); - + itSub('should successfully unstake multiple stakes', async ({helper}) => { const staker = accounts.pop()!; await helper.staking.stake(staker, 100n * nominal); await helper.staking.stake(staker, 200n * nominal); await helper.staking.stake(staker, 300n * nominal); - + // staked: [100, 200, 300]; unstaked: 0 let totalPendingUnstake = await helper.staking.getPendingUnstake({Substrate: staker.address}); let pendingUnstake = await helper.staking.getPendingUnstakePerBlock({Substrate: staker.address}); @@ -161,7 +161,7 @@ expect(stakes[0].amount).to.equal(100n * nominal); expect(stakes[1].amount).to.equal(200n * nominal); expect(stakes[2].amount).to.equal(300n * nominal); - + // Can unstake multiple stakes await helper.staking.unstake(staker); pendingUnstake = await helper.staking.getPendingUnstakePerBlock({Substrate: staker.address}); @@ -170,58 +170,58 @@ expect(totalPendingUnstake).to.be.equal(600n * nominal); expect(stakes).to.be.deep.equal([]); expect(pendingUnstake[0].amount).to.equal(600n * nominal); - + expect (await helper.balance.getSubstrateFull(staker.address)).to.deep.contain({reserved: 600n * nominal, feeFrozen: 0n, miscFrozen: 0n}); await helper.wait.forParachainBlockNumber(pendingUnstake[0].block); expect (await helper.balance.getSubstrateFull(staker.address)).to.deep.contain({reserved: 0n, feeFrozen: 0n, miscFrozen: 0n}); expect (await helper.balance.getSubstrate(staker.address) / nominal).to.be.equal(999n); }); - + itSub('should not have any effects if no active stakes', async ({helper}) => { const staker = accounts.pop()!; - + // unstake has no effect if no stakes at all await helper.staking.unstake(staker); expect(await helper.staking.getPendingUnstake({Substrate: staker.address})).to.be.equal(0n); expect(await helper.balance.getSubstrate(staker.address) / nominal).to.be.equal(999n); // TODO bigint closeTo helper - + // TODO stake() unstake() waitUnstaked() unstake(); - + // can't unstake if there are only pendingUnstakes await helper.staking.stake(staker, 100n * nominal); await helper.staking.unstake(staker); await helper.staking.unstake(staker); - + expect(await helper.staking.getPendingUnstake({Substrate: staker.address})).to.be.equal(100n * nominal); expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.be.equal(0n); }); - + itSub('should keep different unlocking block for each unlocking stake', async ({helper}) => { const staker = accounts.pop()!; await helper.staking.stake(staker, 100n * nominal); await helper.staking.unstake(staker); await helper.staking.stake(staker, 120n * nominal); await helper.staking.unstake(staker); - + const unstakingPerBlock = await helper.staking.getPendingUnstakePerBlock({Substrate: staker.address}); expect(unstakingPerBlock).has.length(2); expect(unstakingPerBlock[0].amount).to.equal(100n * nominal); expect(unstakingPerBlock[1].amount).to.equal(120n * nominal); }); - + itSub('should be possible for different accounts in one block', async ({helper}) => { const stakers = [accounts.pop()!, accounts.pop()!, accounts.pop()!]; - + await Promise.all(stakers.map(staker => helper.staking.stake(staker, 100n * nominal))); await Promise.all(stakers.map(staker => helper.staking.unstake(staker))); - + await Promise.all(stakers.map(async (staker) => { expect(await helper.staking.getPendingUnstake({Substrate: staker.address})).to.be.equal(100n * nominal); expect(await helper.staking.getTotalStaked({Substrate: staker.address})).to.be.equal(0n); })); }); }); - + describe('collection sponsoring', () => { itSub('should actually sponsor transactions', async ({helper}) => { const api = helper.getApi(); @@ -230,345 +230,345 @@ const token = await collection.mintToken(collectionOwner, {Substrate: tokenSender.address}); await helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collection.collectionId)); const palletBalanceBefore = await helper.balance.getSubstrate(palletAddress); - + await token.transfer(tokenSender, {Substrate: receiver.address}); expect (await token.getOwner()).to.be.deep.equal({Substrate: receiver.address}); const palletBalanceAfter = await helper.balance.getSubstrate(palletAddress); - + // senders balance the same, transaction has sponsored expect (await helper.balance.getSubstrate(tokenSender.address)).to.be.equal(1000n * nominal); expect (palletBalanceBefore > palletBalanceAfter).to.be.true; }); - + itSub('can not be set by non admin', async ({helper}) => { const api = helper.getApi(); const [collectionOwner, nonAdmin] = [accounts.pop()!, accounts.pop()!]; - + const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion'}); - + await expect(helper.signTransaction(nonAdmin, api.tx.appPromotion.sponsorCollection(collection.collectionId))).to.be.rejected; expect((await collection.getData())?.raw.sponsorship).to.equal('Disabled'); }); - + itSub('should set pallet address as confirmed admin', async ({helper}) => { const api = helper.getApi(); const [collectionOwner, oldSponsor] = [accounts.pop()!, accounts.pop()!]; - + // Can set sponsoring for collection without sponsor const collectionWithoutSponsor = await helper.nft.mintCollection(collectionOwner, {name: 'No-sponsor', description: 'New Collection', tokenPrefix: 'Promotion'}); await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collectionWithoutSponsor.collectionId))).to.be.fulfilled; expect((await collectionWithoutSponsor.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: palletAddress}); - + // Can set sponsoring for collection with unconfirmed sponsor const collectionWithUnconfirmedSponsor = await helper.nft.mintCollection(collectionOwner, {name: 'Unconfirmed', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: oldSponsor.address}); expect((await collectionWithUnconfirmedSponsor.getData())?.raw.sponsorship).to.be.deep.equal({Unconfirmed: oldSponsor.address}); await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collectionWithUnconfirmedSponsor.collectionId))).to.be.fulfilled; expect((await collectionWithUnconfirmedSponsor.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: palletAddress}); - + // Can set sponsoring for collection with confirmed sponsor const collectionWithConfirmedSponsor = await helper.nft.mintCollection(collectionOwner, {name: 'Confirmed', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: oldSponsor.address}); await collectionWithConfirmedSponsor.confirmSponsorship(oldSponsor); await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collectionWithConfirmedSponsor.collectionId))).to.be.fulfilled; expect((await collectionWithConfirmedSponsor.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: palletAddress}); }); - - itSub('can be overwritten by collection owner', async ({helper}) => { + + itSub('can be overwritten by collection owner', async ({helper}) => { const api = helper.getApi(); const [collectionOwner, newSponsor] = [accounts.pop()!, accounts.pop()!]; const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion'}); const collectionId = collection.collectionId; - + await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collectionId))).to.be.fulfilled; - + // Collection limits still can be changed by the owner expect(await collection.setLimits(collectionOwner, {sponsorTransferTimeout: 0})).to.be.true; expect((await collection.getData())?.raw.limits.sponsorTransferTimeout).to.be.equal(0); expect((await collection.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: palletAddress}); - + // Collection sponsor can be changed too expect((await collection.setSponsor(collectionOwner, newSponsor.address))).to.be.true; expect((await collection.getData())?.raw.sponsorship).to.be.deep.equal({Unconfirmed: newSponsor.address}); }); - + itSub('should not overwrite collection limits set by the owner earlier', async ({helper}) => { const api = helper.getApi(); const limits = {ownerCanDestroy: true, ownerCanTransfer: true, sponsorTransferTimeout: 0}; const collectionWithLimits = await helper.nft.mintCollection(accounts.pop()!, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion', limits}); - + await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collectionWithLimits.collectionId))).to.be.fulfilled; expect((await collectionWithLimits.getData())?.raw.limits).to.be.deep.contain(limits); }); - + itSub('should reject transaction if collection doesn\'t exist', async ({helper}) => { const api = helper.getApi(); const collectionOwner = accounts.pop()!; - + // collection has never existed await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(999999999))).to.be.rejected; // collection has been burned const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion'}); await collection.burn(collectionOwner); - + await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collection.collectionId))).to.be.rejected; }); }); - + describe('stopSponsoringCollection', () => { itSub('can not be called by non-admin', async ({helper}) => { const api = helper.getApi(); const [collectionOwner, nonAdmin] = [accounts.pop()!, accounts.pop()!]; const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion'}); - + await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collection.collectionId))).to.be.fulfilled; - + await expect(helper.signTransaction(nonAdmin, api.tx.appPromotion.stopSponsoringCollection(collection.collectionId))).to.be.rejected; expect((await collection.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: palletAddress}); }); - + itSub('should set sponsoring as disabled', async ({helper}) => { const api = helper.getApi(); const [collectionOwner, recepient] = [accounts.pop()!, accounts.pop()!]; const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion', limits: {sponsorTransferTimeout: 0}}); const token = await collection.mintToken(collectionOwner, {Substrate: collectionOwner.address}); - + await helper.signTransaction(palletAdmin, api.tx.appPromotion.sponsorCollection(collection.collectionId)); await helper.signTransaction(palletAdmin, api.tx.appPromotion.stopSponsoringCollection(collection.collectionId)); - + expect((await collection.getData())?.raw.sponsorship).to.be.equal('Disabled'); - + // Transactions are not sponsored anymore: const ownerBalanceBefore = await helper.balance.getSubstrate(collectionOwner.address); await token.transfer(collectionOwner, {Substrate: recepient.address}); const ownerBalanceAfter = await helper.balance.getSubstrate(collectionOwner.address); expect(ownerBalanceAfter < ownerBalanceBefore).to.be.equal(true); }); - + itSub('should not affect collection which is not sponsored by pallete', async ({helper}) => { const api = helper.getApi(); const collectionOwner = accounts.pop()!; const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion', pendingSponsor: collectionOwner.address}); await collection.confirmSponsorship(collectionOwner); - + await expect(helper.signTransaction(palletAdmin, api.tx.appPromotion.stopSponsoringCollection(collection.collectionId))).to.be.rejected; - + expect((await collection.getData())?.raw.sponsorship).to.be.deep.equal({Confirmed: collectionOwner.address}); }); - - itSub('should reject transaction if collection does not exist', async ({helper}) => { + + itSub('should reject transaction if collection does not exist', async ({helper}) => { const collectionOwner = accounts.pop()!; const collection = await helper.nft.mintCollection(collectionOwner, {name: 'New', description: 'New Collection', tokenPrefix: 'Promotion'}); - + await collection.burn(collectionOwner); await expect(helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.stopSponsoringCollection', [collection.collectionId], true)).to.be.rejectedWith('common.CollectionNotFound'); await expect(helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.stopSponsoringCollection', [999_999_999], true)).to.be.rejectedWith('common.CollectionNotFound'); }); }); - + describe('contract sponsoring', () => { itEth('should set palletes address as a sponsor', async ({helper}) => { const contractOwner = (await helper.eth.createAccountWithBalance(donor, 1000n)).toLowerCase(); const flipper = await helper.eth.deployFlipper(contractOwner); // await deployFlipper(web3, contractOwner); - const contractHelper = helper.ethNativeContract.contractHelpers(contractOwner); - + const contractHelper = await helper.ethNativeContract.contractHelpers(contractOwner); + await helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.sponsorContract', [flipper.options.address]); - - expect(await contractHelper.methods.hasSponsor(flipper.options.address).call()).to.be.true; - expect((await helper.callRpc('api.query.evmContractHelpers.owner', [flipper.options.address])).toJSON()).to.be.equal(contractOwner); + + expect(await contractHelper.methods.hasSponsor(flipper.options.address).call()).to.be.true; + expect((await helper.callRpc('api.query.evmContractHelpers.owner', [flipper.options.address])).toJSON()).to.be.equal(contractOwner); expect((await helper.callRpc('api.query.evmContractHelpers.sponsoring', [flipper.options.address])).toJSON()).to.deep.equal({ confirmed: { substrate: palletAddress, }, }); }); - + itEth('should overwrite sponsoring mode and existed sponsor', async ({helper}) => { const contractOwner = (await helper.eth.createAccountWithBalance(donor, 1000n)).toLowerCase(); const flipper = await helper.eth.deployFlipper(contractOwner); // await deployFlipper(web3, contractOwner); - const contractHelper = helper.ethNativeContract.contractHelpers(contractOwner); - + const contractHelper = await helper.ethNativeContract.contractHelpers(contractOwner); + await expect(contractHelper.methods.selfSponsoredEnable(flipper.options.address).send()).to.be.fulfilled; - + // Contract is self sponsored expect((await helper.callRpc('api.query.evmContractHelpers.sponsoring', [flipper.options.address])).toJSON()).to.be.deep.equal({ confirmed: { ethereum: flipper.options.address.toLowerCase(), }, }); - + // set promotion sponsoring await helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.sponsorContract', [flipper.options.address], true); - + // new sponsor is pallet address - expect(await contractHelper.methods.hasSponsor(flipper.options.address).call()).to.be.true; - expect((await helper.callRpc('api.query.evmContractHelpers.owner', [flipper.options.address])).toJSON()).to.be.equal(contractOwner); + expect(await contractHelper.methods.hasSponsor(flipper.options.address).call()).to.be.true; + expect((await helper.callRpc('api.query.evmContractHelpers.owner', [flipper.options.address])).toJSON()).to.be.equal(contractOwner); expect((await helper.callRpc('api.query.evmContractHelpers.sponsoring', [flipper.options.address])).toJSON()).to.deep.equal({ confirmed: { substrate: palletAddress, }, }); }); - + itEth('can be overwritten by contract owner', async ({helper}) => { const contractOwner = (await helper.eth.createAccountWithBalance(donor, 1000n)).toLowerCase(); const flipper = await helper.eth.deployFlipper(contractOwner); // await deployFlipper(web3, contractOwner); - const contractHelper = helper.ethNativeContract.contractHelpers(contractOwner); - + const contractHelper = await helper.ethNativeContract.contractHelpers(contractOwner); + // contract sponsored by pallet await helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.sponsorContract', [flipper.options.address], true); - + // owner sets self sponsoring await expect(contractHelper.methods.selfSponsoredEnable(flipper.options.address).send()).to.be.not.rejected; - - expect(await contractHelper.methods.hasSponsor(flipper.options.address).call()).to.be.true; - expect((await helper.callRpc('api.query.evmContractHelpers.owner', [flipper.options.address])).toJSON()).to.be.equal(contractOwner); + + expect(await contractHelper.methods.hasSponsor(flipper.options.address).call()).to.be.true; + expect((await helper.callRpc('api.query.evmContractHelpers.owner', [flipper.options.address])).toJSON()).to.be.equal(contractOwner); expect((await helper.callRpc('api.query.evmContractHelpers.sponsoring', [flipper.options.address])).toJSON()).to.deep.equal({ confirmed: { ethereum: flipper.options.address.toLowerCase(), }, }); }); - + itEth('can not be set by non admin', async ({helper}) => { const nonAdmin = accounts.pop()!; const contractOwner = (await helper.eth.createAccountWithBalance(donor, 1000n)).toLowerCase(); const flipper = await helper.eth.deployFlipper(contractOwner); // await deployFlipper(web3, contractOwner); - const contractHelper = helper.ethNativeContract.contractHelpers(contractOwner); - + const contractHelper = await helper.ethNativeContract.contractHelpers(contractOwner); + await expect(contractHelper.methods.selfSponsoredEnable(flipper.options.address).send()).to.be.fulfilled; - + // nonAdmin calls sponsorContract await expect(helper.executeExtrinsic(nonAdmin, 'api.tx.appPromotion.sponsorContract', [flipper.options.address], true)).to.be.rejectedWith('appPromotion.NoPermission'); - - // contract still self-sponsored + + // contract still self-sponsored expect((await helper.callRpc('api.query.evmContractHelpers.sponsoring', [flipper.options.address])).toJSON()).to.deep.equal({ confirmed: { ethereum: flipper.options.address.toLowerCase(), }, }); }); - + itEth('should actually sponsor transactions', async ({helper}) => { // Contract caller const caller = await helper.eth.createAccountWithBalance(donor, 1000n); const palletBalanceBefore = await helper.balance.getSubstrate(palletAddress); - + // Deploy flipper const contractOwner = (await helper.eth.createAccountWithBalance(donor, 1000n)).toLowerCase(); const flipper = await helper.eth.deployFlipper(contractOwner); // await deployFlipper(web3, contractOwner); - const contractHelper = helper.ethNativeContract.contractHelpers(contractOwner); - + const contractHelper = await helper.ethNativeContract.contractHelpers(contractOwner); + // Owner sets to sponsor every tx await contractHelper.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: contractOwner}); await contractHelper.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Generous).send({from: contractOwner}); await helper.eth.transferBalanceFromSubstrate(donor, flipper.options.address, 1000n); // transferBalanceToEth(api, alice, flipper.options.address, 1000n); - + // Set promotion to the Flipper await helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.sponsorContract', [flipper.options.address], true); - + // Caller calls Flipper await flipper.methods.flip().send({from: caller}); expect(await flipper.methods.getValue().call()).to.be.true; - + // The contracts and caller balances have not changed const callerBalance = await helper.balance.getEthereum(caller); const contractBalanceAfter = await helper.balance.getEthereum(flipper.options.address); expect(callerBalance).to.be.equal(1000n * nominal); expect(1000n * nominal === contractBalanceAfter).to.be.true; - + // The pallet balance has decreased const palletBalanceAfter = await helper.balance.getSubstrate(palletAddress); expect(palletBalanceAfter < palletBalanceBefore).to.be.true; }); }); - - describe('stopSponsoringContract', () => { + + describe('stopSponsoringContract', () => { itEth('should remove pallet address from contract sponsors', async ({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor, 1000n); const contractOwner = (await helper.eth.createAccountWithBalance(donor, 1000n)).toLowerCase(); const flipper = await helper.eth.deployFlipper(contractOwner); await helper.eth.transferBalanceFromSubstrate(donor, flipper.options.address); - const contractHelper = helper.ethNativeContract.contractHelpers(contractOwner); - + const contractHelper = await helper.ethNativeContract.contractHelpers(contractOwner); + await contractHelper.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Generous).send({from: contractOwner}); await helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.sponsorContract', [flipper.options.address], true); await helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.stopSponsoringContract', [flipper.options.address], true); - - expect(await contractHelper.methods.hasSponsor(flipper.options.address).call()).to.be.false; - expect((await helper.callRpc('api.query.evmContractHelpers.owner', [flipper.options.address])).toJSON()).to.be.equal(contractOwner); + + expect(await contractHelper.methods.hasSponsor(flipper.options.address).call()).to.be.false; + expect((await helper.callRpc('api.query.evmContractHelpers.owner', [flipper.options.address])).toJSON()).to.be.equal(contractOwner); expect((await helper.callRpc('api.query.evmContractHelpers.sponsoring', [flipper.options.address])).toJSON()).to.deep.equal({ disabled: null, }); - + await flipper.methods.flip().send({from: caller}); expect(await flipper.methods.getValue().call()).to.be.true; - + const callerBalance = await helper.balance.getEthereum(caller); const contractBalanceAfter = await helper.balance.getEthereum(flipper.options.address); - + // caller payed for call expect(1000n * nominal > callerBalance).to.be.true; expect(contractBalanceAfter).to.be.equal(100n * nominal); }); - + itEth('can not be called by non-admin', async ({helper}) => { const nonAdmin = accounts.pop()!; const contractOwner = (await helper.eth.createAccountWithBalance(donor, 1000n)).toLowerCase(); const flipper = await helper.eth.deployFlipper(contractOwner); - + await helper.executeExtrinsic(palletAdmin, 'api.tx.appPromotion.sponsorContract', [flipper.options.address]); await expect(helper.executeExtrinsic(nonAdmin, 'api.tx.appPromotion.stopSponsoringContract', [flipper.options.address])) .to.be.rejectedWith(/appPromotion\.NoPermission/); }); - + itEth('should not affect a contract which is not sponsored by pallete', async ({helper}) => { const nonAdmin = accounts.pop()!; const contractOwner = (await helper.eth.createAccountWithBalance(donor, 1000n)).toLowerCase(); const flipper = await helper.eth.deployFlipper(contractOwner); - const contractHelper = helper.ethNativeContract.contractHelpers(contractOwner); + const contractHelper = await helper.ethNativeContract.contractHelpers(contractOwner); await expect(contractHelper.methods.selfSponsoredEnable(flipper.options.address).send()).to.be.fulfilled; - + await expect(helper.executeExtrinsic(nonAdmin, 'api.tx.appPromotion.stopSponsoringContract', [flipper.options.address], true)).to.be.rejectedWith('appPromotion.NoPermission'); }); }); - + describe('payoutStakers', () => { itSub('can not be called by non admin', async ({helper}) => { const nonAdmin = accounts.pop()!; await expect(helper.admin.payoutStakers(nonAdmin, 100)).to.be.rejectedWith('appPromotion.NoPermission'); }); - + itSub('should increase total staked', async ({helper}) => { const staker = accounts.pop()!; const totalStakedBefore = await helper.staking.getTotalStaked(); await helper.staking.stake(staker, 100n * nominal); - + // Wait for rewards and pay const [stakedInBlock] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stakedInBlock.block)); const totalPayout = (await helper.admin.payoutStakers(palletAdmin, 100)).reduce((prev, payout) => prev + payout.payout, 0n); - + const totalStakedAfter = await helper.staking.getTotalStaked(); expect(totalStakedAfter).to.equal(totalStakedBefore + (100n * nominal) + totalPayout); // staker can unstake await helper.staking.unstake(staker); expect(await helper.staking.getTotalStaked()).to.be.equal(totalStakedAfter - calculateIncome(100n * nominal)); }); - - itSub('should credit 0.05% for staking period', async ({helper}) => { + + itSub('should credit 0.05% for staking period', async ({helper}) => { const staker = accounts.pop()!; - + await waitPromotionPeriodDoesntEnd(helper); - + await helper.staking.stake(staker, 100n * nominal); await helper.staking.stake(staker, 200n * nominal); - + // wait rewards are available: const [_stake1, stake2] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stake2.block)); - + const payoutToStaker = (await helper.admin.payoutStakers(palletAdmin, 100)).find((payout) => payout.staker === staker.address)?.payout; expect(payoutToStaker + 300n * nominal).to.equal(calculateIncome(300n * nominal)); - + const totalStakedPerBlock = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); const income1 = calculateIncome(100n * nominal); const income2 = calculateIncome(200n * nominal); @@ -579,25 +579,25 @@ expect(stakerBalance).to.contain({miscFrozen: income1 + income2, feeFrozen: income1 + income2, reserved: 0n}); expect(stakerBalance.free / nominal).to.eq(999n); }); - + itSub('shoud be paid for more than one period if payments was missed', async ({helper}) => { const staker = accounts.pop()!; - + await helper.staking.stake(staker, 100n * nominal); // wait for two rewards are available: let [stake] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stake.block) + LOCKING_PERIOD); - + await helper.admin.payoutStakers(palletAdmin, 100); [stake] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); const frozenBalanceShouldBe = calculateIncome(100n * nominal, 2); expect(stake.amount).to.be.equal(frozenBalanceShouldBe); - + const stakerFullBalance = await helper.balance.getSubstrateFull(staker.address); - + expect(stakerFullBalance).to.contain({reserved: 0n, feeFrozen: frozenBalanceShouldBe, miscFrozen: frozenBalanceShouldBe}); }); - + itSub('should not be credited for unstaked (reserved) balance', async ({helper}) => { // staker unstakes before rewards has been payed const staker = accounts.pop()!; @@ -605,37 +605,37 @@ const [stake] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stake.block) + LOCKING_PERIOD); await helper.staking.unstake(staker); - + // so he did not receive any rewards const totalBalanceBefore = await helper.balance.getSubstrate(staker.address); await helper.admin.payoutStakers(palletAdmin, 100); const totalBalanceAfter = await helper.balance.getSubstrate(staker.address); - + expect(totalBalanceBefore).to.be.equal(totalBalanceAfter); }); - + itSub('should bring compound interest', async ({helper}) => { const staker = accounts.pop()!; - + await helper.staking.stake(staker, 100n * nominal); - + let [stake] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stake.block)); - + await helper.admin.payoutStakers(palletAdmin, 100); [stake] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); expect(stake.amount).to.equal(calculateIncome(100n * nominal)); - + await helper.wait.forRelayBlockNumber(rewardAvailableInBlock(stake.block) + LOCKING_PERIOD); await helper.admin.payoutStakers(palletAdmin, 100); [stake] = await helper.staking.getTotalStakedPerBlock({Substrate: staker.address}); expect(stake.amount).to.equal(calculateIncome(100n * nominal, 2)); }); - + itSub.skip('can be paid 1000 rewards in a time', async ({helper}) => { // all other stakes should be unstaked const oneHundredStakers = await helper.arrange.createCrowd(100, 1050n, donor); - + // stakers stakes 10 times each for (let i = 0; i < 10; i++) { await Promise.all(oneHundredStakers.map(staker => helper.staking.stake(staker, 100n * nominal))); @@ -643,20 +643,20 @@ await helper.wait.newBlocks(40); await helper.admin.payoutStakers(palletAdmin, 100); }); - + itSub.skip('can handle 40.000 rewards', async ({helper}) => { const crowdStakes = async () => { // each account in the crowd stakes 2 times const crowd = await helper.arrange.createCrowd(500, 300n, donor); await Promise.all(crowd.map(account => helper.staking.stake(account, 100n * nominal))); await Promise.all(crowd.map(account => helper.staking.stake(account, 100n * nominal))); - // + // }; - + for (let i = 0; i < 40; i++) { await crowdStakes(); } - + // TODO pay rewards for some period }); }); @@ -667,7 +667,7 @@ const ACCURACY = 1_000_000_000n; // 5n / 10_000n = 0.05% p/day const income = base + base * (ACCURACY * (calcPeriod * 5n) / (10_000n * DAY)) / ACCURACY ; - + if (iter > 1) { return calculateIncome(income, iter - 1, calcPeriod); } else return income; --- a/tests/src/benchmarks/mintFee/benchmark.ts +++ b/tests/src/benchmarks/mintFee/benchmark.ts @@ -210,7 +210,7 @@ ); const collectionEthAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionContract = helper.ethNativeContract.collection( + const collectionContract = await helper.ethNativeContract.collection( collectionEthAddress, 'nft', ); @@ -290,7 +290,7 @@ ethSigner, proxyContract.options.address, async (collection) => { - const evmContract = helper.ethNativeContract.collection( + const evmContract = await helper.ethNativeContract.collection( helper.ethAddress.fromCollectionId(collection.collectionId), 'nft', ); @@ -330,7 +330,7 @@ ethSigner, proxyContract.options.address, async (collection) => { - const evmContract = helper.ethNativeContract.collection( + const evmContract = await helper.ethNativeContract.collection( helper.ethAddress.fromCollectionId(collection.collectionId), 'nft', ); --- a/tests/src/calibrate.ts +++ b/tests/src/calibrate.ts @@ -246,7 +246,7 @@ const token = await collection.mintToken(alice, {Ethereum: caller}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', caller); + const contract = await helper.ethNativeContract.collection(address, 'nft', caller); const cost = await helper.eth.calculateFee({Ethereum: caller}, () => contract.methods.transfer(receiver, token.tokenId).send({from: caller, gas: helper.eth.DEFAULT_GAS})); @@ -266,7 +266,7 @@ const token = await collection.mintToken(alice, {Ethereum: caller}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', caller); + const contract = await helper.ethNativeContract.collection(address, 'nft', caller); const transferPrice = new Fract(await helper.eth.calculateFee({Ethereum: caller}, () => contract.methods.transfer(receiver, token.tokenId).send({from: caller, gasPrice: gasPriceStr, gas: helper.eth.DEFAULT_GAS}))); @@ -287,7 +287,7 @@ const token = await collection.mintToken(alice, {Ethereum: caller}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', caller); + const contract = await helper.ethNativeContract.collection(address, 'nft', caller); const cost = await helper.eth.calculateFee({Ethereum: caller}, () => contract.methods.transfer(receiver, token.tokenId).send({from: caller, gas: helper.eth.DEFAULT_GAS})); --- a/tests/src/eth/allowlist.test.ts +++ b/tests/src/eth/allowlist.test.ts @@ -30,7 +30,7 @@ itEth('Contract allowlist can be toggled', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const flipper = await helper.eth.deployFlipper(owner); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); // Any user is allowed by default expect(await helpers.methods.allowlistEnabled(flipper.options.address).call()).to.be.false; @@ -48,7 +48,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const caller = await helper.eth.createAccountWithBalance(donor); const flipper = await helper.eth.deployFlipper(owner); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); // User can flip with allowlist disabled await flipper.methods.flip().send({from: caller}); @@ -80,9 +80,9 @@ const owner = await helper.eth.createAccountWithBalance(donor); const user = helper.eth.createAccount(); const crossUser = helper.ethCrossAccount.fromAddress(user); - + const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); expect(await collectionEvm.methods.allowlistedCross(crossUser).call({from: owner})).to.be.false; await collectionEvm.methods.addToCollectionAllowList(user).send({from: owner}); @@ -97,19 +97,19 @@ {mode: 'nft' as const, requiredPallets: []}, {mode: 'rft' as const, requiredPallets: [Pallets.ReFungible]}, {mode: 'ft' as const, requiredPallets: []}, - ].map(testCase => + ].map(testCase => itEth.ifWithPallets(`Collection allowlist can be added and removed by [cross] address for ${testCase.mode}`, testCase.requiredPallets, async ({helper}) => { const owner = (await helper.eth.createAccountWithBalance(donor)).toLowerCase(); const [userSub] = await helper.arrange.createAccounts([10n], donor); const userEth = await helper.eth.createAccountWithBalance(donor); const mintParams = testCase.mode === 'ft' ? [userEth, 100] : [userEth]; - + const {collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); const userCrossSub = helper.ethCrossAccount.fromKeyringPair(userSub); const userCrossEth = helper.ethCrossAccount.fromAddress(userEth); const ownerCrossEth = helper.ethCrossAccount.fromAddress(owner); - + // Can addToCollectionAllowListCross: expect(await helper.collection.allowed(collectionId, {Substrate: userSub.address})).to.be.false; await collectionEvm.methods.addToCollectionAllowListCross(userCrossSub).send({from: owner}); @@ -121,11 +121,11 @@ expect(await helper.collection.allowed(collectionId, {Ethereum: userEth})).to.be.true; expect(await collectionEvm.methods.allowlistedCross(userCrossSub).call({from: owner})).to.be.true; expect(await collectionEvm.methods.allowlistedCross(userCrossEth).call({from: owner})).to.be.true; - + await collectionEvm.methods.mint(...mintParams).send({from: owner}); // token #1 await collectionEvm.methods.mint(...mintParams).send({from: owner}); // token #2 await collectionEvm.methods.setCollectionAccess(SponsoringMode.Allowlisted).send({from: owner}); - + // allowlisted account can transfer and transferCross from eth: await collectionEvm.methods.transfer(owner, 1).send({from: userEth}); await collectionEvm.methods.transferCross(userCrossSub, 2).send({from: userEth}); @@ -142,7 +142,7 @@ testCase.mode === 'ft' ? await helper.ft.transfer(userSub, collectionId, {Ethereum: userEth}, 2n) : await helper.collection.transferToken(userSub, collectionId, 2, {Ethereum: userEth}); - + // can removeFromCollectionAllowListCross: await collectionEvm.methods.removeFromCollectionAllowListCross(userCrossSub).send({from: owner}); await collectionEvm.methods.removeFromCollectionAllowListCross(userCrossEth).send({from: owner}); @@ -150,7 +150,7 @@ expect(await helper.collection.allowed(collectionId, {Ethereum: userEth})).to.be.false; expect(await collectionEvm.methods.allowlistedCross(userCrossSub).call({from: owner})).to.be.false; expect(await collectionEvm.methods.allowlistedCross(userCrossEth).call({from: owner})).to.be.false; - + // cannot transfer anymore await collectionEvm.methods.mint(...mintParams).send({from: owner}); await expect(collectionEvm.methods.transfer(owner, 2).send({from: userEth})).to.be.rejectedWith(/Transaction has been reverted/); @@ -165,7 +165,7 @@ {mode: 'nft' as const, cross: false, requiredPallets: []}, {mode: 'rft' as const, cross: false, requiredPallets: [Pallets.ReFungible]}, {mode: 'ft' as const, cross: false, requiredPallets: []}, - ].map(testCase => + ].map(testCase => itEth.ifWithPallets(`Non-owner cannot add or remove from collection allowlist ${testCase.cross ? 'cross ' : ''}${testCase.mode}`, testCase.requiredPallets, async ({helper}) => { // Select methods: const addToAllowList = testCase.cross ? 'addToCollectionAllowListCross' : 'addToCollectionAllowList'; @@ -179,11 +179,11 @@ const userCrossEth = helper.ethCrossAccount.fromAddress(userEth); const {collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner, !testCase.cross); - + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner, !testCase.cross); + expect(await helper.collection.allowed(collectionId, {Substrate: userSub.address})).to.be.false; expect(await helper.collection.allowed(collectionId, {Ethereum: userEth})).to.be.false; - + // 1. notOwner cannot add to allow list: // 1.1 plain ethereum or cross address: await expect(collectionEvm.methods[addToAllowList](testCase.cross ? userCrossEth : userEth).call({from: notOwner})).to.be.rejectedWith('NoPermission'); @@ -200,7 +200,7 @@ expect(await helper.collection.allowed(collectionId, {Substrate: userSub.address})).to.be.true; } expect(await helper.collection.allowed(collectionId, {Ethereum: userEth})).to.be.true; - + // 3. notOwner cannot remove from allow list: // 3.1 plain ethereum or cross address: await expect(collectionEvm.methods[removeFromAllowList](testCase.cross ? userCrossEth : userEth).call({from: notOwner})).to.be.rejectedWith('NoPermission'); --- a/tests/src/eth/base.test.ts +++ b/tests/src/eth/base.test.ts @@ -57,7 +57,7 @@ const {tokenId} = await collection.mintToken(alice, {Ethereum: caller}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', caller); + const contract = await helper.ethNativeContract.collection(address, 'nft', caller); const cost = await helper.eth.calculateFee({Ethereum: caller}, () => contract.methods.transfer(receiver, tokenId).send(caller)); @@ -79,8 +79,8 @@ const BASE_URI = 'base/'; async function checkInterface(helper: EthUniqueHelper, interfaceId: string, simpleResult: boolean, compatibleResult: boolean) { - const simple = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(simpleNftCollectionId), 'nft', minter); - const compatible = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(erc721MetadataCompatibleNftCollectionId), 'nft', minter); + const simple = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(simpleNftCollectionId), 'nft', minter); + const compatible = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(erc721MetadataCompatibleNftCollectionId), 'nft', minter); expect(await simple.methods.supportsInterface(interfaceId).call()).to.equal(simpleResult, `empty (not ERC721Metadata compatible) NFT collection returns not ${simpleResult}`); expect(await compatible.methods.supportsInterface(interfaceId).call()).to.equal(compatibleResult, `ERC721Metadata compatible NFT collection returns not ${compatibleResult}`); --- a/tests/src/eth/collectionAdmin.test.ts +++ b/tests/src/eth/collectionAdmin.test.ts @@ -50,32 +50,30 @@ const owner = await helper.eth.createAccountWithBalance(donor); const adminSub = await privateKey('//admin2'); const adminEth = helper.eth.createAccount().toLowerCase(); - + const adminDeprecated = helper.eth.createAccount().toLowerCase(); const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub); const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth); - + const {collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner, true); // Check isOwnerOrAdminCross returns false: expect(await collectionEvm.methods.isOwnerOrAdminCross(adminCrossSub).call()).to.be.false; expect(await collectionEvm.methods.isOwnerOrAdminCross(adminCrossEth).call()).to.be.false; expect(await collectionEvm.methods.isOwnerOrAdminCross(helper.ethCrossAccount.fromAddress(adminDeprecated)).call()).to.be.false; - expect(await collectionEvm.methods.collectionAdmins().call()).to.be.like([]); - - // Soft-deprecated: can addCollectionAdmin + // Soft-deprecated: can addCollectionAdmin await collectionEvm.methods.addCollectionAdmin(adminDeprecated).send(); // Can addCollectionAdminCross for substrate and ethereum address await collectionEvm.methods.addCollectionAdminCross(adminCrossSub).send(); await collectionEvm.methods.addCollectionAdminCross(adminCrossEth).send(); - + // 1. Expect api.rpc.unique.adminlist returns admins: const adminListRpc = await helper.collection.getAdmins(collectionId); expect(adminListRpc).to.has.length(3); expect(adminListRpc).to.be.deep.contain.members([{Substrate: adminSub.address}, {Ethereum: adminEth}, {Ethereum: adminDeprecated}]); - + // 2. Expect methods.collectionAdmins == api.rpc.unique.adminlist let adminListEth = await collectionEvm.methods.collectionAdmins().call(); adminListEth = adminListEth.map((element: IEthCrossAccountId) => { @@ -98,12 +96,12 @@ const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth); const [adminSub] = await helper.arrange.createAccounts([100n], donor); const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); - + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + // cannot mint while not admin await expect(collectionEvm.methods.mint(owner).send({from: adminEth})).to.be.rejected; await expect(helper.nft.mintToken(adminSub, {collectionId, owner: {Ethereum: owner}})).to.be.rejectedWith(/common.PublicMintingNotAllowed/); - + // admin (sub and eth) can mint token: await collectionEvm.methods.addCollectionAdminCross(adminCrossEth).send(); await collectionEvm.methods.addCollectionAdminCross(adminCrossSub).send(); @@ -118,7 +116,7 @@ const [admin] = await helper.arrange.createAccounts([100n, 100n], donor); const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const adminCross = { eth: helper.address.substrateToEth(admin.address), @@ -134,8 +132,8 @@ const adminDeprecated = helper.eth.createAccount(); const admin1Cross = helper.ethCrossAccount.fromKeyringPair(await privateKey('admin')); const admin2Cross = helper.ethCrossAccount.fromAddress(helper.address.substrateToEth((await privateKey('admin3')).address)); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); - + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + // Soft-deprecated: expect(await collectionEvm.methods.isOwnerOrAdmin(adminDeprecated).call()).to.be.false; expect(await collectionEvm.methods.isOwnerOrAdminCross(admin1Cross).call()).to.be.false; @@ -158,7 +156,7 @@ const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); const admin = await helper.eth.createAccountWithBalance(donor); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); await collectionEvm.methods.addCollectionAdmin(admin).send(); const user = helper.eth.createAccount(); @@ -177,7 +175,7 @@ const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); const notAdmin = await helper.eth.createAccountWithBalance(donor); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); const user = helper.eth.createAccount(); await expect(collectionEvm.methods.addCollectionAdmin(user).call({from: notAdmin})) @@ -193,7 +191,7 @@ const [admin, notAdmin] = await helper.arrange.createAccounts([10n, 10n], donor); const adminCross = helper.ethCrossAccount.fromKeyringPair(admin); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); await collectionEvm.methods.addCollectionAdminCross(adminCross).send(); const notAdminCross = helper.ethCrossAccount.fromKeyringPair(notAdmin); @@ -202,7 +200,7 @@ const adminList = await helper.callRpc('api.rpc.unique.adminlist', [collectionId]); expect(adminList.length).to.be.eq(1); - + const admin0Cross = helper.ethCrossAccount.fromKeyringPair(adminList[0]); expect(admin0Cross.eth.toLocaleLowerCase()) .to.be.eq(adminCross.eth.toLocaleLowerCase()); @@ -213,7 +211,7 @@ const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); const notAdmin0 = await helper.eth.createAccountWithBalance(donor); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const [notAdmin1] = await helper.arrange.createAccounts([10n], donor); const notAdmin1Cross = helper.ethCrossAccount.fromKeyringPair(notAdmin1); await expect(collectionEvm.methods.addCollectionAdminCross(notAdmin1Cross).call({from: notAdmin0})) @@ -239,7 +237,7 @@ const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); const newAdmin = helper.eth.createAccount(); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); await collectionEvm.methods.addCollectionAdmin(newAdmin).send(); { @@ -263,7 +261,7 @@ const adminCrossSub = helper.ethCrossAccount.fromKeyringPair(adminSub); const adminCrossEth = helper.ethCrossAccount.fromAddress(adminEth); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); await collectionEvm.methods.addCollectionAdminCross(adminCrossSub).send(); await collectionEvm.methods.addCollectionAdminCross(adminCrossEth).send(); @@ -288,7 +286,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); const admin0 = await helper.eth.createAccountWithBalance(donor); await collectionEvm.methods.addCollectionAdmin(admin0).send(); @@ -311,7 +309,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); const admin = await helper.eth.createAccountWithBalance(donor); await collectionEvm.methods.addCollectionAdmin(admin).send(); @@ -333,9 +331,9 @@ const [admin1] = await helper.arrange.createAccounts([10n], donor); const admin1Cross = helper.ethCrossAccount.fromKeyringPair(admin1); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); await collectionEvm.methods.addCollectionAdminCross(admin1Cross).send(); - + const [admin2] = await helper.arrange.createAccounts([10n], donor); const admin2Cross = helper.ethCrossAccount.fromKeyringPair(admin2); await collectionEvm.methods.addCollectionAdminCross(admin2Cross).send(); @@ -356,7 +354,7 @@ const [adminSub] = await helper.arrange.createAccounts([10n], donor); const adminSubCross = helper.ethCrossAccount.fromKeyringPair(adminSub); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); await collectionEvm.methods.addCollectionAdminCross(adminSubCross).send(); const notAdminEth = await helper.eth.createAccountWithBalance(donor); @@ -384,7 +382,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const newOwner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); await collectionEvm.methods.changeCollectionOwner(newOwner).send(); @@ -396,7 +394,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const newOwner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); const cost = await recordEthFee(helper, owner, () => collectionEvm.methods.changeCollectionOwner(newOwner).send()); expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))); expect(cost > 0); @@ -406,7 +404,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const newOwner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); await expect(collectionEvm.methods.changeCollectionOwner(newOwner).send({from: newOwner})).to.be.rejected; expect(await collectionEvm.methods.isOwnerOrAdmin(newOwner).call()).to.be.false; @@ -430,7 +428,7 @@ const ownerCrossSub = helper.ethCrossAccount.fromKeyringPair(ownerSub); const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); expect(await collectionEvm.methods.isOwnerOrAdminCross(ownerCrossSub).call()).to.be.false; @@ -439,7 +437,7 @@ expect(await collectionEvm.methods.isOwnerOrAdminCross(ownerCrossEth).call()).to.be.true; expect(await helper.collection.getData(collectionId)) .to.have.property('normalizedOwner').that.is.eq(helper.address.ethToSubstrate(ownerEth)); - + // Can set Substrate owner: await collectionEvm.methods.changeCollectionOwnerCross(ownerCrossSub).send({from: ownerEth}); expect(await collectionEvm.methods.isOwnerOrAdminCross(ownerCrossSub).call()).to.be.true; @@ -451,7 +449,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const [newOwner] = await helper.arrange.createAccounts([10n], donor); const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const cost = await recordEthFee(helper, owner, () => collectionEvm.methods.setOwnerSubstrate(newOwner.addressRaw).send()); expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))); @@ -464,7 +462,7 @@ const [newOwner] = await helper.arrange.createAccounts([10n], donor); const newOwnerCross = helper.ethCrossAccount.fromKeyringPair(newOwner); const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); await expect(collectionEvm.methods.changeCollectionOwnerCross(newOwnerCross).send({from: otherReceiver})).to.be.rejected; expect(await collectionEvm.methods.isOwnerOrAdminCross(newOwnerCross).call()).to.be.false; --- a/tests/src/eth/collectionHelperAddress.test.ts +++ b/tests/src/eth/collectionHelperAddress.test.ts @@ -31,42 +31,42 @@ itEth('NFT', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - + const {collectionAddress: nftCollectionAddress} = await helper.eth.createNFTCollection(owner, 'Sponsor', 'absolutely anything', 'ROC'); - const nftCollection = helper.ethNativeContract.collection(nftCollectionAddress, 'nft', owner); - + const nftCollection = await helper.ethNativeContract.collection(nftCollectionAddress, 'nft', owner); + expect((await nftCollection.methods.collectionHelperAddress().call()) .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS); }); - + itEth.ifWithPallets('RFT ', [Pallets.ReFungible], async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress: rftCollectionAddress} = await helper.eth.createRFTCollection(owner, 'Sponsor', 'absolutely anything', 'ROC'); - const rftCollection = helper.ethNativeContract.collection(rftCollectionAddress, 'rft', owner); + const rftCollection = await helper.ethNativeContract.collection(rftCollectionAddress, 'rft', owner); expect((await rftCollection.methods.collectionHelperAddress().call()) .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS); }); - + itEth('FT', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Sponsor', 18, 'absolutely anything', 'ROC'); - const collection = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); - + const collection = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + expect((await collection.methods.collectionHelperAddress().call()) .toString().toLowerCase()).to.be.equal(EVM_COLLECTION_HELPERS_ADDRESS); }); - + itEth('[collectionHelpers] convert collectionId into address', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const collectionId = 7; const collectionAddress = helper.ethAddress.fromCollectionId(collectionId); - const helperContract = helper.ethNativeContract.collectionHelpers(owner); - + const helperContract = await helper.ethNativeContract.collectionHelpers(owner); + expect(await helperContract.methods.collectionAddress(collectionId).call()).to.be.equal(collectionAddress); expect(parseInt(await helperContract.methods.collectionId(collectionAddress).call())).to.be.equal(collectionId); }); - + }); --- a/tests/src/eth/collectionLimits.test.ts +++ b/tests/src/eth/collectionLimits.test.ts @@ -32,7 +32,7 @@ ownerCanDestroy: 0, transfersEnabled: 0, }; - + const expectedLimits = { accountTokenOwnershipLimit: 1000, sponsoredDataSize: 1024, @@ -44,8 +44,8 @@ ownerCanDestroy: false, transfersEnabled: false, }; - - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, testCase.case, owner); + + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.case, owner); await collectionEvm.methods.setCollectionLimit(CollectionLimits.AccountTokenOwnership, true, limits.accountTokenOwnershipLimit).send(); await collectionEvm.methods.setCollectionLimit(CollectionLimits.SponsoredDataSize, true, limits.sponsoredDataSize).send(); await collectionEvm.methods.setCollectionLimit(CollectionLimits.SponsoredDataRateLimit, true, limits.sponsoredDataRateLimit).send(); @@ -55,7 +55,7 @@ await collectionEvm.methods.setCollectionLimit(CollectionLimits.OwnerCanTransfer, true, limits.ownerCanTransfer).send(); await collectionEvm.methods.setCollectionLimit(CollectionLimits.OwnerCanDestroy, true, limits.ownerCanDestroy).send(); await collectionEvm.methods.setCollectionLimit(CollectionLimits.TransferEnabled, true, limits.transfersEnabled).send(); - + // Check limits from sub: const data = (await helper.rft.getData(collectionId))!; expect(data.raw.limits).to.deep.eq(expectedLimits); @@ -97,13 +97,13 @@ const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createCollection(testCase.case, owner, 'Limits', 'absolutely anything', 'ISNI', 18); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, testCase.case, owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.case, owner); // Cannot set non-existing limit await expect(collectionEvm.methods .setCollectionLimit(9, true, 1) - .call()).to.be.rejectedWith('Returned error: VM Exception while processing transaction: revert Value not convertible into enum "CollectionLimits"'); - + .call()).to.be.rejectedWith('Returned error: VM Exception while processing transaction: revert Value not convertible into enum "CollectionLimits"'); + // Cannot disable limits await expect(collectionEvm.methods .setCollectionLimit(CollectionLimits.AccountTokenOwnership, false, 200) @@ -112,7 +112,7 @@ await expect(collectionEvm.methods .setCollectionLimit(CollectionLimits.AccountTokenOwnership, true, invalidLimits.accountTokenOwnershipLimit) .call()).to.be.rejectedWith(`can't convert value to u32 "${invalidLimits.accountTokenOwnershipLimit}"`); - + await expect(collectionEvm.methods .setCollectionLimit(CollectionLimits.TransferEnabled, true, 3) .call()).to.be.rejectedWith(`can't convert value to boolean "${invalidLimits.transfersEnabled}"`); @@ -131,7 +131,7 @@ const nonOwner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createCollection(testCase.case, owner, 'Limits', 'absolutely anything', 'FLO', 18); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, testCase.case, owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, testCase.case, owner); await expect(collectionEvm.methods .setCollectionLimit(CollectionLimits.AccountTokenOwnership, true, 1000) .call({from: nonOwner})) --- a/tests/src/eth/collectionProperties.test.ts +++ b/tests/src/eth/collectionProperties.test.ts @@ -32,20 +32,20 @@ // Soft-deprecated: setCollectionProperty [ - {method: 'setCollectionProperties', mode: 'nft' as const, methodParams: [[{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}]], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]}, - {method: 'setCollectionProperties', mode: 'rft' as const, methodParams: [[{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}]], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]}, - {method: 'setCollectionProperties', mode: 'ft' as const, methodParams: [[{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}]], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]}, + {method: 'setCollectionProperties', mode: 'nft' as const, methodParams: [[{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}]], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]}, + {method: 'setCollectionProperties', mode: 'rft' as const, methodParams: [[{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}]], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]}, + {method: 'setCollectionProperties', mode: 'ft' as const, methodParams: [[{key: 'testKey1', value: Buffer.from('testValue1')}, {key: 'testKey2', value: Buffer.from('testValue2')}]], expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}]}, {method: 'setCollectionProperty', mode: 'nft' as const, methodParams: ['testKey', Buffer.from('testValue')], expectedProps: [{key: 'testKey', value: 'testValue'}]}, - ].map(testCase => + ].map(testCase => itEth.ifWithPallets(`Collection properties can be set: ${testCase.method}() for ${testCase.mode}`, testCase.mode === 'rft' ? [Pallets.ReFungible] : [], async({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); const collection = await helper[testCase.mode].mintCollection(alice, {name: 'name', description: 'test', tokenPrefix: 'test', properties: []}); await collection.addAdmin(alice, {Ethereum: caller}); - + const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(address, 'nft', caller, testCase.method === 'setCollectionProperty'); + const collectionEvm = await helper.ethNativeContract.collection(address, 'nft', caller, testCase.method === 'setCollectionProperty'); - // collectionProperties returns an empty array if no properties: + // collectionProperties returns an empty array if no properties: expect(await collectionEvm.methods.collectionProperties([]).call()).to.be.like([]); expect(await collectionEvm.methods.collectionProperties(['NonExistingKey']).call()).to.be.like([]); @@ -54,7 +54,7 @@ const raw = (await collection.getData())?.raw; expect(raw.properties).to.deep.equal(testCase.expectedProps); - // collectionProperties returns properties: + // collectionProperties returns properties: expect(await collectionEvm.methods.collectionProperties([]).call()).to.be.like(testCase.expectedProps.map(prop => helper.ethProperty.property(prop.key, prop.value))); })); @@ -64,7 +64,7 @@ await collection.addAdmin(alice, {Ethereum: caller}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', caller); + const contract = await helper.ethNativeContract.collection(address, 'nft', caller); await expect(contract.methods.setCollectionProperties([{key: '', value: Buffer.from('val1')}]).send({from: caller})).to.be.rejected; await expect(contract.methods.setCollectionProperties([{key: 'déjà vu', value: Buffer.from('hmm...')}]).send({from: caller})).to.be.rejected; @@ -80,8 +80,8 @@ {method: 'deleteCollectionProperties', mode: 'nft' as const, methodParams: [['testKey1', 'testKey2']], expectedProps: [{key: 'testKey3', value: 'testValue3'}]}, {method: 'deleteCollectionProperties', mode: 'rft' as const, methodParams: [['testKey1', 'testKey2']], expectedProps: [{key: 'testKey3', value: 'testValue3'}]}, {method: 'deleteCollectionProperties', mode: 'ft' as const, methodParams: [['testKey1', 'testKey2']], expectedProps: [{key: 'testKey3', value: 'testValue3'}]}, - {method: 'deleteCollectionProperty', mode: 'nft' as const, methodParams: ['testKey1'], expectedProps: [{key: 'testKey2', value: 'testValue2'}, {key: 'testKey3', value: 'testValue3'}]}, - ].map(testCase => + {method: 'deleteCollectionProperty', mode: 'nft' as const, methodParams: ['testKey1'], expectedProps: [{key: 'testKey2', value: 'testValue2'}, {key: 'testKey3', value: 'testValue3'}]}, + ].map(testCase => itEth.ifWithPallets(`Collection properties can be deleted: ${testCase.method}() for ${testCase.mode}`, testCase.mode === 'rft' ? [Pallets.ReFungible] : [], async({helper}) => { const properties = [ {key: 'testKey1', value: 'testValue1'}, @@ -89,16 +89,16 @@ {key: 'testKey3', value: 'testValue3'}]; const caller = await helper.eth.createAccountWithBalance(donor); const collection = await helper[testCase.mode].mintCollection(alice, {name: 'name', description: 'test', tokenPrefix: 'test', properties}); - + await collection.addAdmin(alice, {Ethereum: caller}); - + const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', caller, testCase.method === 'deleteCollectionProperty'); - + const contract = await helper.ethNativeContract.collection(address, 'nft', caller, testCase.method === 'deleteCollectionProperty'); + await contract.methods[testCase.method](...testCase.methodParams).send({from: caller}); - + const raw = (await collection.getData())?.raw; - + expect(raw.properties.length).to.equal(testCase.expectedProps.length); expect(raw.properties).to.deep.equal(testCase.expectedProps); })); @@ -106,7 +106,7 @@ [ {method: 'deleteCollectionProperties', methodParams: [['testKey2']]}, {method: 'deleteCollectionProperty', methodParams: ['testKey2']}, - ].map(testCase => + ].map(testCase => itEth(`cannot ${testCase.method}() of non-owned collections`, async ({helper}) => { const properties = [ {key: 'testKey1', value: 'testValue1'}, @@ -116,7 +116,7 @@ const collection = await helper.nft.mintCollection(alice, {name: 'name', description: 'test', tokenPrefix: 'test', properties}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(address, 'nft', caller, testCase.method === 'deleteCollectionProperty'); + const collectionEvm = await helper.ethNativeContract.collection(address, 'nft', caller, testCase.method === 'deleteCollectionProperty'); await expect(collectionEvm.methods[testCase.method](...testCase.methodParams).send({from: caller})).to.be.rejected; expect(await collection.getProperties()).to.deep.eq(properties); @@ -127,7 +127,7 @@ const collection = await helper.nft.mintCollection(alice, {name: 'name', description: 'test', tokenPrefix: 'test', properties: [{key: 'testKey', value: 'testValue'}]}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', caller); + const contract = await helper.ethNativeContract.collection(address, 'nft', caller); const value = await contract.methods.collectionProperty('testKey').call(); expect(value).to.equal(helper.getWeb3().utils.toHex('testValue')); @@ -146,75 +146,75 @@ [ {case: 'nft' as const}, {case: 'rft' as const, requiredPallets: [Pallets.ReFungible]}, - ].map(testCase => + ].map(testCase => itEth.ifWithPallets(`ERC721Metadata property can be set for ${testCase.case} collection`, testCase.requiredPallets || [], async ({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); const bruh = await helper.eth.createAccountWithBalance(donor); - + const BASE_URI = 'base/'; const SUFFIX = 'suffix1'; const URI = 'uri1'; - - const collectionHelpers = helper.ethNativeContract.collectionHelpers(caller); + + const collectionHelpers = await helper.ethNativeContract.collectionHelpers(caller); const creatorMethod = testCase.case === 'rft' ? 'createRFTCollection' : 'createNFTCollection'; - + const {collectionId, collectionAddress} = await helper.eth[creatorMethod](caller, 'n', 'd', 'p'); const bruhCross = helper.ethCrossAccount.fromAddress(bruh); - - const contract = helper.ethNativeContract.collectionById(collectionId, testCase.case, caller); + + const contract = await helper.ethNativeContract.collectionById(collectionId, testCase.case, caller); await contract.methods.addCollectionAdminCross(bruhCross).send(); // to check that admin will work too - + const collection1 = helper.nft.getCollectionObject(collectionId); const data1 = await collection1.getData(); expect(data1?.raw.flags.erc721metadata).to.be.false; expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.false; - + await collectionHelpers.methods.makeCollectionERC721MetadataCompatible(collectionAddress, BASE_URI) .send({from: bruh}); - + expect(await contract.methods.supportsInterface('0x5b5e139f').call()).to.be.true; - + const collection2 = helper.nft.getCollectionObject(collectionId); const data2 = await collection2.getData(); expect(data2?.raw.flags.erc721metadata).to.be.true; - + const propertyPermissions = data2?.raw.tokenPropertyPermissions; expect(propertyPermissions?.length).to.equal(2); - + expect(propertyPermissions.find((tpp: ITokenPropertyPermission) => { return tpp.key === 'URI' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner; })).to.be.not.null; - + expect(propertyPermissions.find((tpp: ITokenPropertyPermission) => { return tpp.key === 'URISuffix' && tpp.permission.mutable && tpp.permission.collectionAdmin && !tpp.permission.tokenOwner; })).to.be.not.null; - + expect(data2?.raw.properties?.find((property: IProperty) => { return property.key === 'baseURI' && property.value === BASE_URI; })).to.be.not.null; - + const token1Result = await contract.methods.mint(bruh).send(); const tokenId1 = token1Result.events.Transfer.returnValues.tokenId; - + expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI); - + await contract.methods.setProperties(tokenId1, [{key: 'URISuffix', value: Buffer.from(SUFFIX)}]).send(); expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI + SUFFIX); - + await contract.methods.setProperties(tokenId1, [{key: 'URI', value: Buffer.from(URI)}]).send(); expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(URI); - + await contract.methods.deleteProperties(tokenId1, ['URI']).send(); expect(await contract.methods.tokenURI(tokenId1).call()).to.equal(BASE_URI + SUFFIX); - + const token2Result = await contract.methods.mintWithTokenURI(bruh, URI).send(); const tokenId2 = token2Result.events.Transfer.returnValues.tokenId; - + expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(URI); - + await contract.methods.deleteProperties(tokenId2, ['URI']).send(); expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(BASE_URI); - + await contract.methods.setProperties(tokenId2, [{key: 'URISuffix', value: Buffer.from(SUFFIX)}]).send(); expect(await contract.methods.tokenURI(tokenId2).call()).to.equal(BASE_URI + SUFFIX); })); --- a/tests/src/eth/collectionSponsoring.test.ts +++ b/tests/src/eth/collectionSponsoring.test.ts @@ -30,7 +30,7 @@ nominal = helper.balance.getOneTokenNominal(); }); }); - + // TODO: move to substrate tests itEth('sponsors mint transactions', async ({helper}) => { const collection = await helper.nft.mintCollection(alice, {tokenPrefix: 'spnr', permissions: {mintMode: true}}); @@ -41,7 +41,7 @@ expect(await helper.balance.getEthereum(minter)).to.equal(0n); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', minter); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', minter); await collection.addToAllowList(alice, {Ethereum: minter}); @@ -85,28 +85,28 @@ [ 'setCollectionSponsorCross', 'setCollectionSponsor', // Soft-deprecated - ].map(testCase => + ].map(testCase => itEth(`[${testCase}] can remove collection sponsor`, async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const collectionHelpers = helper.ethNativeContract.collectionHelpers(owner); - + const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner); + let result = await collectionHelpers.methods.createNFTCollection('Sponsor collection', '1', '1').send({value: Number(2n * nominal)}); const collectionIdAddress = helper.ethAddress.normalizeAddress(result.events.CollectionCreated.returnValues.collectionId); const sponsor = await helper.eth.createAccountWithBalance(donor); const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor); - const collectionEvm = helper.ethNativeContract.collection(collectionIdAddress, 'nft', owner, testCase === 'setCollectionSponsor'); - + const collectionEvm = await helper.ethNativeContract.collection(collectionIdAddress, 'nft', owner, testCase === 'setCollectionSponsor'); + expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false; result = await collectionEvm.methods[testCase](testCase === 'setCollectionSponsor' ? sponsor : sponsorCross).send({from: owner}); expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.true; - + await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor}); let sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner}); expect(helper.address.restoreCrossAccountFromBigInt(BigInt(sponsorTuple.sub))).to.be.eq(helper.address.ethToSubstrate(sponsor)); expect(await collectionEvm.methods.hasCollectionPendingSponsor().call({from: owner})).to.be.false; - + await collectionEvm.methods.removeCollectionSponsor().send({from: owner}); - + sponsorTuple = await collectionEvm.methods.collectionSponsor().call({from: owner}); expect(sponsorTuple.eth).to.be.eq('0x0000000000000000000000000000000000000000'); })); @@ -114,35 +114,35 @@ [ 'setCollectionSponsorCross', 'setCollectionSponsor', // Soft-deprecated - ].map(testCase => + ].map(testCase => itEth(`[${testCase}] Can sponsor from evm address via access list`, async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const sponsorEth = await helper.eth.createAccountWithBalance(donor); const sponsorCrossEth = helper.ethCrossAccount.fromAddress(sponsorEth); - + const {collectionId, collectionAddress} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner, 'Sponsor collection', '1', '1', ''); - + const collectionSub = helper.nft.getCollectionObject(collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, testCase === 'setCollectionSponsor'); - + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, testCase === 'setCollectionSponsor'); + // Set collection sponsor: await collectionEvm.methods[testCase](testCase === 'setCollectionSponsor' ? sponsorEth : sponsorCrossEth).send({from: owner}); let sponsorship = (await collectionSub.getData())!.raw.sponsorship; expect(sponsorship.Unconfirmed).to.be.eq(helper.address.ethToSubstrate(sponsorEth, true)); // Account cannot confirm sponsorship if it is not set as a sponsor await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail'); - + // Sponsor can confirm sponsorship: await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsorEth}); sponsorship = (await collectionSub.getData())!.raw.sponsorship; expect(sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsorEth, true)); - + // Create user with no balance: const user = helper.eth.createAccount(); const userCross = helper.ethCrossAccount.fromAddress(user); const nextTokenId = await collectionEvm.methods.nextTokenId().call(); expect(nextTokenId).to.be.equal('1'); - + // Set collection permissions: const oldPermissions = (await collectionSub.getData())!.raw.permissions; // (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman(); expect(oldPermissions.mintMode).to.be.false; @@ -151,11 +151,11 @@ await collectionEvm.methods.setCollectionAccess(1 /*'AllowList'*/).send({from: owner}); await collectionEvm.methods.addToCollectionAllowListCross(userCross).send({from: owner}); await collectionEvm.methods.setCollectionMintMode(true).send({from: owner}); - + const newPermissions = (await collectionSub.getData())!.raw.permissions; // (await getDetailedCollectionInfo(api, collectionId))!.permissions.toHuman(); expect(newPermissions.mintMode).to.be.true; expect(newPermissions.access).to.be.equal('AllowList'); - + const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner)); const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsorEth)); @@ -164,7 +164,7 @@ const result = await collectionEvm.methods.mintWithTokenURI(user, 'Test URI').send({from: user}); const event = helper.eth.normalizeEvents(result.events) .find(event => event.event === 'Transfer'); - + expect(event).to.be.deep.equal({ address: collectionAddress, event: 'Transfer', @@ -174,11 +174,11 @@ tokenId: '1', }, }); - + const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner)); const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsorEth)); const userBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(user)); - + expect(await collectionEvm.methods.tokenURI(nextTokenId).call()).to.be.equal('Test URI'); expect(ownerBalanceBefore).to.be.eq(ownerBalanceAfter); expect(userBalanceAfter).to.be.eq(0n); @@ -245,40 +245,40 @@ [ 'setCollectionSponsorCross', 'setCollectionSponsor', // Soft-deprecated - ].map(testCase => + ].map(testCase => itEth(`[${testCase}] Check that transaction via EVM spend money from sponsor address`, async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor); - + const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner,'Sponsor collection', '1', '1', ''); const collectionSub = helper.nft.getCollectionObject(collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, testCase === 'setCollectionSponsor'); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, testCase === 'setCollectionSponsor'); // Set collection sponsor: await collectionEvm.methods[testCase](testCase === 'setCollectionSponsor' ? sponsor : sponsorCross).send(); let collectionData = (await collectionSub.getData())!; expect(collectionData.raw.sponsorship.Unconfirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true)); await expect(collectionEvm.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail'); - + await collectionEvm.methods.confirmCollectionSponsorship().send({from: sponsor}); collectionData = (await collectionSub.getData())!; expect(collectionData.raw.sponsorship.Confirmed).to.be.eq(helper.address.ethToSubstrate(sponsor, true)); - + const user = helper.eth.createAccount(); const userCross = helper.ethCrossAccount.fromAddress(user); await collectionEvm.methods.addCollectionAdminCross(userCross).send(); - + const ownerBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner)); const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor)); - + const mintingResult = await collectionEvm.methods.mintWithTokenURI(user, 'Test URI').send({from: user}); const tokenId = mintingResult.events.Transfer.returnValues.tokenId; - + const event = helper.eth.normalizeEvents(mintingResult.events) .find(event => event.event === 'Transfer'); const address = helper.ethAddress.fromCollectionId(collectionId); - + expect(event).to.be.deep.equal({ address, event: 'Transfer', @@ -289,7 +289,7 @@ }, }); expect(await collectionEvm.methods.tokenURI(tokenId).call({from: user})).to.be.equal('Test URI'); - + const ownerBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(owner)); expect(ownerBalanceAfter).to.be.eq(ownerBalanceBefore); const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor)); @@ -305,7 +305,7 @@ const {collectionAddress, collectionId} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner,'Sponsor collection', '1', '1', ''); const collectionSub = helper.nft.getCollectionObject(collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); // Set and confirm sponsor: await collectionEvm.methods.setCollectionSponsorCross(sponsorCrossEth).send({from: owner}); --- a/tests/src/eth/contractSponsoring.test.ts +++ b/tests/src/eth/contractSponsoring.test.ts @@ -34,7 +34,7 @@ itEth('Self sponsoring can be set by the address that deployed the contract', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const flipper = await helper.eth.deployFlipper(owner); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); // 1. owner can set selfSponsoring: expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false; @@ -71,7 +71,7 @@ itEth('Self sponsoring cannot be set by the address that did not deployed the contract', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const notOwner = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false; @@ -81,7 +81,7 @@ itEth('Sponsoring can be set by the address that has deployed the contract', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false; @@ -92,18 +92,18 @@ itEth('Sponsoring cannot be set by the address that did not deployed the contract', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const notOwner = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false; await expect(helpers.methods.setSponsoringMode(notOwner, SponsoringMode.Allowlisted).call({from: notOwner})).to.be.rejectedWith('NoPermission'); expect(await helpers.methods.sponsoringEnabled(flipper.options.address).call()).to.be.false; }); - + itEth('Sponsor can be set by the address that deployed the contract', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); // 1. owner can set a sponsor: @@ -124,12 +124,12 @@ }, ]); }); - + itEth('Sponsor cannot be set by the address that did not deployed the contract', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); const notOwner = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.hasPendingSponsor(flipper.options.address).call()).to.be.false; @@ -140,7 +140,7 @@ itEth('Sponsorship can be confirmed by the address that pending as sponsor', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false; @@ -173,7 +173,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); const notSponsor = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false; @@ -185,7 +185,7 @@ itEth('Sponsorship can not be confirmed by the address that not set as sponsor', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const notSponsor = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false; @@ -196,7 +196,7 @@ itEth('Sponsor can be removed by the address that deployed the contract', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false; @@ -229,14 +229,14 @@ const owner = await helper.eth.createAccountWithBalance(donor); const notOwner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.false; await helpers.methods.setSponsor(flipper.options.address, sponsor).send(); await helpers.methods.confirmSponsorship(flipper.options.address).send({from: sponsor}); expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.true; - + await expect(helpers.methods.removeSponsor(flipper.options.address).call({from: notOwner})).to.be.rejectedWith('NoPermission'); await expect(helpers.methods.removeSponsor(flipper.options.address).send({from: notOwner})).to.be.rejected; expect(await helpers.methods.hasSponsor(flipper.options.address).call()).to.be.true; @@ -246,7 +246,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); const caller = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); await helpers.methods.setSponsor(flipper.options.address, sponsor).send(); @@ -271,7 +271,7 @@ itEth('In generous mode, non-allowlisted user transaction will be self sponsored', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const caller = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); await helpers.methods.selfSponsoredEnable(flipper.options.address).send(); @@ -303,24 +303,24 @@ const sponsor = await helper.eth.createAccountWithBalance(donor); const caller = helper.eth.createAccount(); await helper.eth.transferBalanceFromSubstrate(donor, caller, testCase.balance); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); - + await helpers.methods.toggleAllowlist(flipper.options.address, true).send({from: owner}); await helpers.methods.toggleAllowed(flipper.options.address, caller, true).send({from: owner}); - + await helpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Allowlisted).send({from: owner}); await helpers.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: owner}); - + await helpers.methods.setSponsor(flipper.options.address, sponsor).send(); await helpers.methods.confirmSponsorship(flipper.options.address).send({from: sponsor}); - + const sponsorBalanceBefore = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor)); expect(sponsorBalanceBefore > 0n).to.be.true; - + await flipper.methods.flip().send({from: caller}); expect(await flipper.methods.getValue().call()).to.be.true; - + // Balance should be taken from flipper instead of caller const sponsorBalanceAfter = await helper.balance.getSubstrate(helper.address.ethToSubstrate(sponsor)); expect(sponsorBalanceAfter < sponsorBalanceBefore).to.be.true; @@ -333,7 +333,7 @@ itEth('Non-allow-listed address can call a contract. Sponsor balance should not decrease', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const caller = helper.eth.createAccount(); - const contractHelpers = helper.ethNativeContract.contractHelpers(owner); + const contractHelpers = await helper.ethNativeContract.contractHelpers(owner); // Deploy flipper and send some tokens: const flipper = await helper.eth.deployFlipper(owner); @@ -348,7 +348,7 @@ await contractHelpers.methods.setSponsoringMode(flipper.options.address, SponsoringMode.Allowlisted).send({from: owner}); await contractHelpers.methods.setSponsoringRateLimit(flipper.options.address, 0).send({from: owner}); - // 1. Caller has no UNQ and is not in allow list. So he cannot flip: + // 1. Caller has no UNQ and is not in allow list. So he cannot flip: await expect(flipper.methods.flip().send({from: caller})).to.be.rejectedWith(/Returned error: insufficient funds for gas \* price \+ value/); expect(await flipper.methods.getValue().call()).to.be.false; @@ -361,9 +361,9 @@ const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); const caller = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); - + const originalCallerBalance = await helper.balance.getEthereum(caller); await helpers.methods.toggleAllowlist(flipper.options.address, true).send({from: owner}); await helpers.methods.toggleAllowed(flipper.options.address, caller, true).send({from: owner}); @@ -393,7 +393,7 @@ // TODO: Find a way to calculate default rate limit itEth('Default rate limit equal 7200', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.sponsoringRateLimit(flipper.options.address).call()).to.be.equal('7200'); @@ -412,7 +412,7 @@ ` // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; - + contract TestContract { event Result(bool); @@ -432,7 +432,7 @@ } return testContract; } - + async function deployTestContract(helper: EthUniqueHelper, owner: string) { const compiled = await compileTestContract(helper); return await helper.ethContract.deployByAbi(owner, compiled.abi, compiled.object); @@ -447,7 +447,7 @@ itEth('Default fee limit', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); expect(await helpers.methods.sponsoringFeeLimit(flipper.options.address).call()).to.be.equal('115792089237316195423570985008687907853269984665640564039457584007913129639935'); @@ -455,7 +455,7 @@ itEth('Set fee limit', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); await helpers.methods.setSponsoringFeeLimit(flipper.options.address, 100).send(); @@ -465,7 +465,7 @@ itEth('Negative test - set fee limit by non-owner', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const stranger = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const flipper = await helper.eth.deployFlipper(owner); await expect(helpers.methods.setSponsoringFeeLimit(flipper.options.address, 100).send({from: stranger})).to.be.rejected; @@ -475,13 +475,13 @@ const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); const user = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const testContract = await deployTestContract(helper, owner); - + await helpers.methods.setSponsoringMode(testContract.options.address, SponsoringMode.Generous).send({from: owner}); await helpers.methods.setSponsoringRateLimit(testContract.options.address, 0).send({from: owner}); - + await helpers.methods.setSponsor(testContract.options.address, sponsor).send(); await helpers.methods.confirmSponsorship(testContract.options.address).send({from: sponsor}); @@ -500,13 +500,13 @@ itEth('Negative test - check that evm.call transactions exceeding fee limit are not executed', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); const testContract = await deployTestContract(helper, owner); - + await helpers.methods.setSponsoringMode(testContract.options.address, SponsoringMode.Generous).send({from: owner}); await helpers.methods.setSponsoringRateLimit(testContract.options.address, 0).send({from: owner}); - + await helpers.methods.setSponsor(testContract.options.address, sponsor).send(); await helpers.methods.confirmSponsorship(testContract.options.address).send({from: sponsor}); @@ -525,7 +525,7 @@ ); // expect((await api.query.system.account(alice.address)).data.free.toBigInt()).to.be.equal(originalAliceBalance); expect(await helper.balance.getSubstrate(alice.address)).to.be.equal(originalAliceBalance); - + await helper.eth.sendEVM( alice, testContract.options.address, --- a/tests/src/eth/createFTCollection.seqtest.ts +++ b/tests/src/eth/createFTCollection.seqtest.ts @@ -32,16 +32,16 @@ itEth('Create collection', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - + const name = 'CollectionEVM'; const description = 'Some description'; const prefix = 'token prefix'; - + // todo:playgrounds this might fail when in async environment. const collectionCountBefore = +(await helper.callRpc('api.rpc.unique.collectionStats')).created; const {collectionId} = await helper.eth.createFungibleCollection(owner, name, DECIMALS, description, prefix); - + const collectionCountAfter = +(await helper.callRpc('api.rpc.unique.collectionStats')).created; const data = (await helper.ft.getData(collectionId))!; @@ -59,16 +59,16 @@ const expectedCollectionId = +(await helper.callRpc('api.rpc.unique.collectionStats')).created + 1; const expectedCollectionAddress = helper.ethAddress.fromCollectionId(expectedCollectionId); - const collectionHelpers = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner); expect(await collectionHelpers.methods .isCollectionExist(expectedCollectionAddress) .call()).to.be.false; - + await helper.eth.createFungibleCollection(owner, 'A', DECIMALS, 'A', 'A'); - + expect(await collectionHelpers.methods .isCollectionExist(expectedCollectionAddress) .call()).to.be.true; --- a/tests/src/eth/createFTCollection.test.ts +++ b/tests/src/eth/createFTCollection.test.ts @@ -31,7 +31,7 @@ donor = await privateKey({filename: __filename}); }); }); - + // TODO move sponsorship tests to another file: // Soft-deprecated itEth('[eth] Set sponsorship', async ({helper}) => { @@ -39,10 +39,10 @@ const sponsor = await helper.eth.createAccountWithBalance(donor); const ss58Format = helper.chain.getChainProperties().ss58Format; const description = 'absolutely anything'; - + const {collectionId, collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Sponsor', DECIMALS, description, 'ENVY'); - const collection = helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true); + const collection = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true); await collection.methods.setCollectionSponsor(sponsor).send(); let data = (await helper.rft.getData(collectionId))!; @@ -50,7 +50,7 @@ await expect(collection.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail'); - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor, true); + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor, true); await sponsorCollection.methods.confirmCollectionSponsorship().send(); data = (await helper.rft.getData(collectionId))!; @@ -63,8 +63,8 @@ const ss58Format = helper.chain.getChainProperties().ss58Format; const description = 'absolutely anything'; const {collectionId, collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Sponsor', DECIMALS, description, 'ENVY'); - - const collection = helper.ethNativeContract.collection(collectionAddress, 'rft', owner); + + const collection = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner); const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor); await collection.methods.setCollectionSponsorCross(sponsorCross).send(); @@ -73,7 +73,7 @@ await expect(collection.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail'); - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor); + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor); await sponsorCollection.methods.confirmCollectionSponsorship().send(); data = (await helper.rft.getData(collectionId))!; @@ -84,12 +84,14 @@ itEth('Collection address exist', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const collectionAddressForNonexistentCollection = '0x17C4E6453CC49AAAAEACA894E6D9683E00112233'; - expect(await helper.ethNativeContract.collectionHelpers(collectionAddressForNonexistentCollection) + const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner); + + expect(await collectionHelpers .methods.isCollectionExist(collectionAddressForNonexistentCollection).call()) .to.be.false; - + const {collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Exister', DECIMALS, 'absolutely anything', 'WIWT'); - expect(await helper.ethNativeContract.collectionHelpers(collectionAddress) + expect(await collectionHelpers .methods.isCollectionExist(collectionAddress).call()) .to.be.true; @@ -98,18 +100,18 @@ const collectionOwner = await collectionEvm.methods.collectionOwner().call(); expect(helper.address.restoreCrossAccountFromBigInt(BigInt(collectionOwner.sub))).to.eq(helper.address.ethToSubstrate(owner)); }); - + itEth('destroyCollection', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress, collectionId} = await helper.eth.createFungibleCollection(owner, 'Exister', DECIMALS, 'absolutely anything', 'WIWT'); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const result = await collectionHelper.methods .destroyCollection(collectionAddress) .send({from: owner}); const events = helper.eth.normalizeEvents(result.events); - + expect(events).to.be.deep.equal([ { address: collectionHelper.options.address, @@ -141,7 +143,7 @@ itEth('(!negative test!) Create collection (bad lengths)', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); { const MAX_NAME_LENGTH = 64; const collectionName = 'A'.repeat(MAX_NAME_LENGTH + 1); @@ -171,10 +173,10 @@ .call({value: Number(2n * nominal)})).to.be.rejectedWith('token_prefix is too long. Max length is ' + MAX_TOKEN_PREFIX_LENGTH); } }); - + itEth('(!negative test!) cannot create collection if value !== 2', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const expects = [0n, 1n, 30n].map(async value => { await expect(collectionHelper.methods .createFTCollection('Peasantry', DECIMALS, 'absolutely anything', 'TWIW') @@ -188,15 +190,15 @@ const owner = await helper.eth.createAccountWithBalance(donor); const peasant = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Transgressed', DECIMALS, 'absolutely anything', 'YVNE'); - const peasantCollection = helper.ethNativeContract.collection(collectionAddress, 'ft', peasant, true); + const peasantCollection = await helper.ethNativeContract.collection(collectionAddress, 'ft', peasant, true); const EXPECTED_ERROR = 'NoPermission'; { const sponsor = await helper.eth.createAccountWithBalance(donor); await expect(peasantCollection.methods .setCollectionSponsor(sponsor) .call()).to.be.rejectedWith(EXPECTED_ERROR); - - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'ft', sponsor, true); + + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'ft', sponsor, true); await expect(sponsorCollection.methods .confirmCollectionSponsorship() .call()).to.be.rejectedWith('ConfirmSponsorshipFail'); @@ -212,7 +214,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const peasant = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createFungibleCollection(owner, 'Transgressed', DECIMALS, 'absolutely anything', 'YVNE'); - const peasantCollection = helper.ethNativeContract.collection(collectionAddress, 'ft', peasant); + const peasantCollection = await helper.ethNativeContract.collection(collectionAddress, 'ft', peasant); const EXPECTED_ERROR = 'NoPermission'; { const sponsor = await helper.eth.createAccountWithBalance(donor); @@ -220,8 +222,8 @@ await expect(peasantCollection.methods .setCollectionSponsorCross(sponsorCross) .call()).to.be.rejectedWith(EXPECTED_ERROR); - - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'ft', sponsor); + + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'ft', sponsor); await expect(sponsorCollection.methods .confirmCollectionSponsorship() .call()).to.be.rejectedWith('ConfirmSponsorshipFail'); @@ -231,5 +233,5 @@ .setCollectionLimit(CollectionLimits.AccountTokenOwnership, true, 1000) .call()).to.be.rejectedWith(EXPECTED_ERROR); } - }); + }); }); --- a/tests/src/eth/createNFTCollection.seqtest.ts +++ b/tests/src/eth/createNFTCollection.seqtest.ts @@ -37,7 +37,7 @@ // todo:playgrounds this might fail when in async environment. const collectionCountBefore = +(await helper.callRpc('api.rpc.unique.collectionStats')).created; const {collectionId, collectionAddress, events} = await helper.eth.createNFTCollection(owner, name, description, prefix); - + expect(events).to.be.deep.equal([ { address: '0x6C4E9fE1AE37a41E93CEE429e8E1881aBdcbb54F', @@ -48,7 +48,7 @@ }, }, ]); - + const collectionCountAfter = +(await helper.callRpc('api.rpc.unique.collectionStats')).created; const collection = helper.nft.getCollectionObject(collectionId); @@ -72,7 +72,7 @@ const expectedCollectionId = +(await helper.callRpc('api.rpc.unique.collectionStats')).created + 1; const expectedCollectionAddress = helper.ethAddress.fromCollectionId(expectedCollectionId); - const collectionHelpers = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner); expect(await collectionHelpers.methods .isCollectionExist(expectedCollectionAddress) --- a/tests/src/eth/createNFTCollection.test.ts +++ b/tests/src/eth/createNFTCollection.test.ts @@ -17,7 +17,7 @@ import {evmToAddress} from '@polkadot/util-crypto'; import {IKeyringPair} from '@polkadot/types/types'; import {expect, itEth, usingEthPlaygrounds} from './util'; -import { CollectionLimits } from './util/playgrounds/types'; +import {CollectionLimits} from './util/playgrounds/types'; describe('Create NFT collection from EVM', () => { @@ -38,8 +38,8 @@ const baseUri = 'BaseURI'; const {collectionId, collectionAddress, events} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner, name, description, prefix, baseUri); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft'); - + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft'); + expect(events).to.be.deep.equal([ { address: '0x6C4E9fE1AE37a41E93CEE429e8E1881aBdcbb54F', @@ -53,14 +53,14 @@ const collection = helper.nft.getCollectionObject(collectionId); const data = (await collection.getData())!; - + expect(data.name).to.be.eq(name); expect(data.description).to.be.eq(description); expect(data.raw.tokenPrefix).to.be.eq(prefix); expect(data.raw.mode).to.be.eq('NFT'); - + expect(await contract.methods.description().call()).to.deep.equal(description); - + const options = await collection.getOptions(); expect(options.tokenPropertyPermissions).to.be.deep.equal([ { @@ -81,7 +81,7 @@ const ss58Format = helper.chain.getChainProperties().ss58Format; const {collectionId, collectionAddress} = await helper.eth.createNFTCollection(owner, 'Sponsor', 'absolutely anything', 'ROC'); - const collection = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collection = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); await collection.methods.setCollectionSponsor(sponsor).send(); let data = (await helper.nft.getData(collectionId))!; @@ -89,7 +89,7 @@ await expect(collection.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail'); - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'nft', sponsor, true); + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'nft', sponsor, true); await sponsorCollection.methods.confirmCollectionSponsorship().send(); data = (await helper.nft.getData(collectionId))!; @@ -103,7 +103,7 @@ const description = 'absolutely anything'; const {collectionId, collectionAddress} = await helper.eth.createNFTCollection(owner, 'Sponsor', description, 'ROC'); - const collection = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor); await collection.methods.setCollectionSponsorCross(sponsorCross).send(); @@ -112,24 +112,26 @@ await expect(collection.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail'); - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'nft', sponsor); + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'nft', sponsor); await sponsorCollection.methods.confirmCollectionSponsorship().send(); data = (await helper.nft.getData(collectionId))!; expect(data.raw.sponsorship.Confirmed).to.be.equal(evmToAddress(sponsor, Number(ss58Format))); - + expect(await sponsorCollection.methods.description().call()).to.deep.equal(description); }); itEth('Collection address exist', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const collectionAddressForNonexistentCollection = '0x17C4E6453CC49AAAAEACA894E6D9683E00112233'; - expect(await helper.ethNativeContract.collectionHelpers(collectionAddressForNonexistentCollection) + const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner); + + expect(await collectionHelpers .methods.isCollectionExist(collectionAddressForNonexistentCollection).call()) .to.be.false; const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'Exister', 'absolutely anything', 'EVC'); - expect(await helper.ethNativeContract.collectionHelpers(collectionAddress) + expect(await collectionHelpers .methods.isCollectionExist(collectionAddress).call()) .to.be.true; @@ -153,7 +155,7 @@ itEth('(!negative test!) Create collection (bad lengths)', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); { const MAX_NAME_LENGTH = 64; const collectionName = 'A'.repeat(MAX_NAME_LENGTH + 1); @@ -187,7 +189,7 @@ itEth('(!negative test!) Create collection (no funds)', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); await expect(collectionHelper.methods .createNFTCollection('Peasantry', 'absolutely anything', 'CVE') .call({value: Number(1n * nominal)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)'); @@ -198,7 +200,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const malfeasant = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'Transgressed', 'absolutely anything', 'COR'); - const malfeasantCollection = helper.ethNativeContract.collection(collectionAddress, 'nft', malfeasant, true); + const malfeasantCollection = await helper.ethNativeContract.collection(collectionAddress, 'nft', malfeasant, true); const EXPECTED_ERROR = 'NoPermission'; { const sponsor = await helper.eth.createAccountWithBalance(donor); @@ -206,7 +208,7 @@ .setCollectionSponsor(sponsor) .call()).to.be.rejectedWith(EXPECTED_ERROR); - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'nft', sponsor, true); + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'nft', sponsor, true); await expect(sponsorCollection.methods .confirmCollectionSponsorship() .call()).to.be.rejectedWith('ConfirmSponsorshipFail'); @@ -222,7 +224,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const malfeasant = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createNFTCollection(owner, 'Transgressed', 'absolutely anything', 'COR'); - const malfeasantCollection = helper.ethNativeContract.collection(collectionAddress, 'nft', malfeasant); + const malfeasantCollection = await helper.ethNativeContract.collection(collectionAddress, 'nft', malfeasant); const EXPECTED_ERROR = 'NoPermission'; { const sponsor = await helper.eth.createAccountWithBalance(donor); @@ -231,7 +233,7 @@ .setCollectionSponsorCross(sponsorCross) .call()).to.be.rejectedWith(EXPECTED_ERROR); - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'nft', sponsor); + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'nft', sponsor); await expect(sponsorCollection.methods .confirmCollectionSponsorship() .call()).to.be.rejectedWith('ConfirmSponsorshipFail'); @@ -246,7 +248,7 @@ itEth('destroyCollection', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'Limits', 'absolutely anything', 'OLF'); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const result = await collectionHelper.methods @@ -254,7 +256,7 @@ .send({from: owner}); const events = helper.eth.normalizeEvents(result.events); - + expect(events).to.be.deep.equal([ { address: collectionHelper.options.address, @@ -270,4 +272,4 @@ .call()).to.be.false; expect(await helper.collection.getData(collectionId)).to.be.null; }); -}); \ No newline at end of file +}); --- a/tests/src/eth/createRFTCollection.test.ts +++ b/tests/src/eth/createRFTCollection.test.ts @@ -33,11 +33,11 @@ itEth('Create collection', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - + const name = 'CollectionEVM'; const description = 'Some description'; const prefix = 'token prefix'; - + const {collectionId} = await helper.eth.createRFTCollection(owner, name, description, prefix); const data = (await helper.rft.getData(collectionId))!; const collection = helper.rft.getCollectionObject(collectionId); @@ -52,8 +52,8 @@ expect(options.tokenPropertyPermissions).to.be.empty; }); - + itEth('Create collection with properties & get description', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); @@ -63,11 +63,11 @@ const baseUri = 'BaseURI'; const {collectionId, collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, name, description, prefix, baseUri); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft'); const collection = helper.rft.getCollectionObject(collectionId); const data = (await collection.getData())!; - + expect(data.name).to.be.eq(name); expect(data.description).to.be.eq(description); expect(data.raw.tokenPrefix).to.be.eq(prefix); @@ -87,7 +87,7 @@ }, ]); }); - + // Soft-deprecated itEth('[eth] Set sponsorship', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); @@ -95,7 +95,7 @@ const ss58Format = helper.chain.getChainProperties().ss58Format; const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(owner, 'Sponsor', 'absolutely anything', 'ENVY'); - const collection = helper.ethNativeContract.collection(collectionAddress, 'rft', owner, true); + const collection = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner, true); await collection.methods.setCollectionSponsor(sponsor).send(); let data = (await helper.rft.getData(collectionId))!; @@ -103,7 +103,7 @@ await expect(collection.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail'); - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor, true); + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor, true); await sponsorCollection.methods.confirmCollectionSponsorship().send(); data = (await helper.rft.getData(collectionId))!; @@ -116,7 +116,7 @@ const ss58Format = helper.chain.getChainProperties().ss58Format; const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(owner, 'Sponsor', 'absolutely anything', 'ENVY'); - const collection = helper.ethNativeContract.collection(collectionAddress, 'rft', owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner); const sponsorCross = helper.ethCrossAccount.fromAddress(sponsor); await collection.methods.setCollectionSponsorCross(sponsorCross).send(); @@ -125,7 +125,7 @@ await expect(collection.methods.confirmCollectionSponsorship().call()).to.be.rejectedWith('ConfirmSponsorshipFail'); - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor); + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor); await sponsorCollection.methods.confirmCollectionSponsorship().send(); data = (await helper.rft.getData(collectionId))!; @@ -135,12 +135,14 @@ itEth('Collection address exist', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const collectionAddressForNonexistentCollection = '0x17C4E6453CC49AAAAEACA894E6D9683E00112233'; - expect(await helper.ethNativeContract.collectionHelpers(collectionAddressForNonexistentCollection) + const collectionHelpers = await helper.ethNativeContract.collectionHelpers(owner); + + expect(await collectionHelpers .methods.isCollectionExist(collectionAddressForNonexistentCollection).call()) .to.be.false; - + const {collectionAddress} = await helper.eth.createRFTCollection(owner, 'Exister', 'absolutely anything', 'WIWT'); - expect(await helper.ethNativeContract.collectionHelpers(collectionAddress) + expect(await collectionHelpers .methods.isCollectionExist(collectionAddress).call()) .to.be.true; @@ -165,7 +167,7 @@ itEth('(!negative test!) Create collection (bad lengths)', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); { const MAX_NAME_LENGTH = 64; const collectionName = 'A'.repeat(MAX_NAME_LENGTH + 1); @@ -195,10 +197,10 @@ .call({value: Number(2n * nominal)})).to.be.rejectedWith('token_prefix is too long. Max length is ' + MAX_TOKEN_PREFIX_LENGTH); } }); - + itEth('(!negative test!) Create collection (no funds)', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); await expect(collectionHelper.methods .createRFTCollection('Peasantry', 'absolutely anything', 'TWIW') .call({value: Number(1n * nominal)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)'); @@ -209,15 +211,15 @@ const owner = await helper.eth.createAccountWithBalance(donor); const peasant = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createRFTCollection(owner, 'Transgressed', 'absolutely anything', 'YVNE'); - const peasantCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', peasant, true); + const peasantCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', peasant, true); const EXPECTED_ERROR = 'NoPermission'; { const sponsor = await helper.eth.createAccountWithBalance(donor); await expect(peasantCollection.methods .setCollectionSponsor(sponsor) .call()).to.be.rejectedWith(EXPECTED_ERROR); - - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor, true); + + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor, true); await expect(sponsorCollection.methods .confirmCollectionSponsorship() .call()).to.be.rejectedWith('ConfirmSponsorshipFail'); @@ -233,7 +235,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const peasant = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createRFTCollection(owner, 'Transgressed', 'absolutely anything', 'YVNE'); - const peasantCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', peasant); + const peasantCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', peasant); const EXPECTED_ERROR = 'NoPermission'; { const sponsor = await helper.eth.createAccountWithBalance(donor); @@ -241,8 +243,8 @@ await expect(peasantCollection.methods .setCollectionSponsorCross(sponsorCross) .call()).to.be.rejectedWith(EXPECTED_ERROR); - - const sponsorCollection = helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor); + + const sponsorCollection = await helper.ethNativeContract.collection(collectionAddress, 'rft', sponsor); await expect(sponsorCollection.methods .confirmCollectionSponsorship() .call()).to.be.rejectedWith('ConfirmSponsorshipFail'); @@ -253,16 +255,16 @@ .call()).to.be.rejectedWith(EXPECTED_ERROR); } }); - + itEth('destroyCollection', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress, collectionId} = await helper.eth.createRFTCollection(owner, 'Limits', 'absolutely anything', 'OLF'); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); - + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); + await expect(collectionHelper.methods .destroyCollection(collectionAddress) .send({from: owner})).to.be.fulfilled; - + expect(await collectionHelper.methods .isCollectionExist(collectionAddress) .call()).to.be.false; --- a/tests/src/eth/crossTransfer.test.ts +++ b/tests/src/eth/crossTransfer.test.ts @@ -30,8 +30,8 @@ [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor); }); }); - - itEth('The private key X create a substrate address. Alice sends a token to the corresponding EVM address, and X can send it to Bob in the substrate', async ({helper}) => { + + itEth('The private key X create a substrate address. Alice sends a token to the corresponding EVM address, and X can send it to Bob in the substrate', async ({helper}) => { const bobCA = CrossAccountId.fromKeyring(bob); const charlieCA = CrossAccountId.fromKeyring(charlie); @@ -52,7 +52,7 @@ await collection.setLimits(alice, {ownerCanTransfer: true}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'ft', aliceProxy); + const contract = await helper.ethNativeContract.collection(address, 'ft', aliceProxy); await collection.mint(alice, 200n, {Ethereum: aliceProxy}); await contract.methods.transfer(bobProxy, 50).send({from: aliceProxy}); @@ -73,10 +73,10 @@ [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor); }); }); - + itEth('The private key X create a substrate address. Alice sends a token to the corresponding EVM address, and X can send it to Bob in the substrate', async ({helper}) => { const charlieEth = CrossAccountId.fromKeyring(charlie, 'Ethereum'); - + const collection = await helper.nft.mintCollection(alice); await collection.setLimits(alice, {ownerCanTransfer: true}); const token = await collection.mintToken(alice); @@ -93,7 +93,7 @@ await collection.setLimits(alice, {ownerCanTransfer: true}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', aliceProxy); + const contract = await helper.ethNativeContract.collection(address, 'nft', aliceProxy); const token = await collection.mintToken(alice); await token.transfer(alice, {Ethereum: aliceProxy}); --- a/tests/src/eth/destroyCollection.test.ts +++ b/tests/src/eth/destroyCollection.test.ts @@ -32,29 +32,29 @@ }); }); - testCases.map((testCase) => + testCases.map((testCase) => itEth.ifWithPallets(`Cannot burn non-owned or non-existing collection ${testCase.case}`, testCase.requiredPallets, async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const signer = await helper.eth.createAccountWithBalance(donor); - + const unexistedCollection = helper.ethAddress.fromCollectionId(1000000); - - const collectionHelpers = helper.ethNativeContract.collectionHelpers(signer); + + const collectionHelpers = await helper.ethNativeContract.collectionHelpers(signer); const {collectionAddress} = await helper.eth.createCollection(testCase.case, owner, ...testCase.params as [string, string, string, number?]); // cannot burn collec await expect(collectionHelpers.methods .destroyCollection(collectionAddress) .send({from: signer})).to.be.rejected; - + await expect(collectionHelpers.methods .destroyCollection(unexistedCollection) .send({from: signer})).to.be.rejected; - + expect(await collectionHelpers.methods .isCollectionExist(unexistedCollection) .call()).to.be.false; - + expect(await collectionHelpers.methods .isCollectionExist(collectionAddress) .call()).to.be.true; --- a/tests/src/eth/ethFeesAreCorrect.test.ts +++ b/tests/src/eth/ethFeesAreCorrect.test.ts @@ -32,7 +32,7 @@ itEth('web3 fees are the same as evm.call fees', async ({helper}) => { const collection = await helper.nft.mintCollection(minter, {}); - + const owner = await helper.eth.createAccountWithBalance(donor); const receiver = await helper.eth.createAccountWithBalance(donor); const aliceEth = helper.address.substrateToEth(alice.address); @@ -41,7 +41,7 @@ const {tokenId: tokenB} = await collection.mintToken(minter, {Ethereum: aliceEth}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const balanceBeforeWeb3Transfer = await helper.balance.getEthereum(owner); await contract.methods.transfer(receiver, tokenA).send({from: owner}); @@ -50,7 +50,7 @@ const encodedCall = contract.methods.transfer(receiver, tokenB) .encodeABI(); - + const balanceBeforeEvmCall = await helper.balance.getSubstrate(alice.address); await helper.eth.sendEVM( alice, --- a/tests/src/eth/events.test.ts +++ b/tests/src/eth/events.test.ts @@ -22,7 +22,7 @@ import {CollectionLimits, EthTokenPermissions, NormalizedEvent} from './util/playgrounds/types'; let donor: IKeyringPair; - + before(async function () { await usingEthPlaygrounds(async (_helper, privateKey) => { donor = await privateKey({filename: __filename}); @@ -53,7 +53,7 @@ clearEvents(ethEvents, subEvents); } { - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const result = await collectionHelper.methods.destroyCollection(collectionAddress).send({from:owner}); await helper.wait.newBlocks(1); expect(result.events).to.containSubset({ @@ -71,9 +71,9 @@ async function testCollectionPropertySetAndDeleted(helper: EthUniqueHelper, mode: TCollectionMode) { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); - + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); + const ethEvents: any = []; collectionHelper.events.allEvents((_: any, event: any) => { ethEvents.push(event); @@ -112,8 +112,8 @@ async function testPropertyPermissionSet(helper: EthUniqueHelper, mode: TCollectionMode) { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const ethEvents: any = []; collectionHelper.events.allEvents((_: any, event: any) => { ethEvents.push(event); @@ -121,8 +121,8 @@ const {unsubscribe, collectedEvents: subEvents} = await helper.subscribeEvents([{section: 'common', names: ['PropertyPermissionSet']}]); await collection.methods.setTokenPropertyPermissions([ ['A', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, true]], ], ]).send({from: owner}); @@ -143,8 +143,8 @@ const owner = await helper.eth.createAccountWithBalance(donor); const user = helper.ethCrossAccount.createAccount(); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const ethEvents: any[] = []; collectionHelper.events.allEvents((_: any, event: any) => { ethEvents.push(event); @@ -185,8 +185,8 @@ const owner = await helper.eth.createAccountWithBalance(donor); const user = helper.ethCrossAccount.createAccount(); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const ethEvents: any = []; collectionHelper.events.allEvents((_: any, event: any) => { ethEvents.push(event); @@ -225,8 +225,8 @@ async function testCollectionLimitSet(helper: EthUniqueHelper, mode: TCollectionMode) { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const ethEvents: any = []; collectionHelper.events.allEvents((_: any, event: any) => { ethEvents.push(event); @@ -252,8 +252,8 @@ const owner = await helper.eth.createAccountWithBalance(donor); const newOwner = helper.ethCrossAccount.createAccount(); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const ethEvents: any = []; collectionHelper.events.allEvents((_: any, event: any) => { ethEvents.push(event); @@ -278,8 +278,8 @@ async function testCollectionPermissionSet(helper: EthUniqueHelper, mode: TCollectionMode) { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const ethEvents: any = []; collectionHelper.events.allEvents((_: any, event: any) => { ethEvents.push(event); @@ -319,8 +319,8 @@ const owner = await helper.eth.createAccountWithBalance(donor); const sponsor = await helper.ethCrossAccount.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const ethEvents: any = []; collectionHelper.events.allEvents((_: any, event: any) => { ethEvents.push(event); @@ -373,14 +373,14 @@ async function testTokenPropertySetAndDeleted(helper: EthUniqueHelper, mode: TCollectionMode) { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createCollection(mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, mode, owner); - const collectionHelper = helper.ethNativeContract.collectionHelpers(owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, mode, owner); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(owner); const result = await collection.methods.mint(owner).send({from: owner}); const tokenId = result.events.Transfer.returnValues.tokenId; await collection.methods.setTokenPropertyPermissions([ ['A', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, true]], ], ]).send({from: owner}); @@ -431,23 +431,23 @@ itEth('CollectionChanged event for CollectionPropertySet and CollectionPropertyDeleted', async ({helper}) => { await testCollectionPropertySetAndDeleted(helper, mode); }); - + itEth('CollectionChanged event for AllowListAddressAdded, AllowListAddressRemoved', async ({helper}) => { await testAllowListAddressAddedAndRemoved(helper, mode); }); - + itEth('CollectionChanged event for CollectionAdminAdded, CollectionAdminRemoved', async ({helper}) => { await testCollectionAdminAddedAndRemoved(helper, mode); }); - + itEth('CollectionChanged event for CollectionLimitSet', async ({helper}) => { await testCollectionLimitSet(helper, mode); }); - + itEth('CollectionChanged event for CollectionOwnerChanged', async ({helper}) => { await testCollectionOwnerChanged(helper, mode); }); - + itEth('CollectionChanged event for CollectionPermissionSet', async ({helper}) => { await testCollectionPermissionSet(helper, mode); }); @@ -467,27 +467,27 @@ itEth('CollectionChanged event for CollectionPropertySet and CollectionPropertyDeleted', async ({helper}) => { await testCollectionPropertySetAndDeleted(helper, mode); }); - + itEth('CollectionChanged event for PropertyPermissionSet', async ({helper}) => { await testPropertyPermissionSet(helper, mode); }); - + itEth('CollectionChanged event for AllowListAddressAdded, AllowListAddressRemoved', async ({helper}) => { await testAllowListAddressAddedAndRemoved(helper, mode); }); - + itEth('CollectionChanged event for CollectionAdminAdded, CollectionAdminRemoved', async ({helper}) => { await testCollectionAdminAddedAndRemoved(helper, mode); }); - + itEth('CollectionChanged event for CollectionLimitSet', async ({helper}) => { await testCollectionLimitSet(helper, mode); }); - + itEth('CollectionChanged event for CollectionOwnerChanged', async ({helper}) => { await testCollectionOwnerChanged(helper, mode); }); - + itEth('CollectionChanged event for CollectionPermissionSet', async ({helper}) => { await testCollectionPermissionSet(helper, mode); }); @@ -495,7 +495,7 @@ itEth('CollectionChanged event for CollectionSponsorSet, SponsorshipConfirmed, CollectionSponsorRemoved', async ({helper}) => { await testCollectionSponsorSetAndConfirmedAndThenRemoved(helper, mode); }); - + itEth('CollectionChanged event for TokenPropertySet, TokenPropertyDeleted', async ({helper}) => { await testTokenPropertySetAndDeleted(helper, mode); }); @@ -518,27 +518,27 @@ itEth('CollectionChanged event for CollectionPropertySet and CollectionPropertyDeleted', async ({helper}) => { await testCollectionPropertySetAndDeleted(helper, mode); }); - + itEth('CollectionChanged event for PropertyPermissionSet', async ({helper}) => { await testPropertyPermissionSet(helper, mode); }); - + itEth('CollectionChanged event for AllowListAddressAdded, AllowListAddressRemoved', async ({helper}) => { await testAllowListAddressAddedAndRemoved(helper, mode); }); - + itEth('CollectionChanged event for CollectionAdminAdded, CollectionAdminRemoved', async ({helper}) => { await testCollectionAdminAddedAndRemoved(helper, mode); }); - + itEth('CollectionChanged event for CollectionLimitSet', async ({helper}) => { await testCollectionLimitSet(helper, mode); }); - + itEth('CollectionChanged event for CollectionOwnerChanged', async ({helper}) => { await testCollectionOwnerChanged(helper, mode); }); - + itEth('CollectionChanged event for CollectionPermissionSet', async ({helper}) => { await testCollectionPermissionSet(helper, mode); }); @@ -546,7 +546,7 @@ itEth('CollectionChanged event for CollectionSponsorSet, SponsorshipConfirmed, CollectionSponsorRemoved', async ({helper}) => { await testCollectionSponsorSetAndConfirmedAndThenRemoved(helper, mode); }); - + itEth('CollectionChanged event for TokenPropertySet, TokenPropertyDeleted', async ({helper}) => { await testTokenPropertySetAndDeleted(helper, mode); }); --- a/tests/src/eth/fractionalizer/fractionalizer.test.ts +++ b/tests/src/eth/fractionalizer/fractionalizer.test.ts @@ -63,7 +63,7 @@ nftCollectionAddress: string, nftTokenId: number, rftTokenAddress: string }> => { const nftCollection = await helper.eth.createNFTCollection(owner, 'nft', 'NFT collection', 'NFT'); - const nftContract = helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); const mintResult = await nftContract.methods.mint(owner).send({from: owner}); const nftTokenId = mintResult.events.Transfer.returnValues.tokenId; @@ -93,7 +93,7 @@ const owner = await helper.eth.createAccountWithBalance(donor, 10n); const fractionalizer = await deployContract(helper, owner); const rftCollection = await helper.eth.createRFTCollection(owner, 'rft', 'RFT collection', 'RFT'); - const rftContract = helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); + const rftContract = await helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); const fractionalizerAddressCross = helper.ethCrossAccount.fromAddress(fractionalizer.options.address); await rftContract.methods.addCollectionAdminCross(fractionalizerAddressCross).send({from: owner}); @@ -148,7 +148,7 @@ const owner = await helper.eth.createAccountWithBalance(donor, 20n); const nftCollection = await helper.eth.createNFTCollection(owner, 'nft', 'NFT collection', 'NFT'); - const nftContract = helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); const mintResult = await nftContract.methods.mint(owner).send({from: owner}); const nftTokenId = mintResult.events.Transfer.returnValues.tokenId; @@ -168,7 +168,7 @@ }); const rftTokenAddress = result.events.Fractionalized.returnValues._rftToken; - const rftTokenContract = helper.ethNativeContract.rftToken(rftTokenAddress); + const rftTokenContract = await helper.ethNativeContract.rftToken(rftTokenAddress); expect(await rftTokenContract.methods.balanceOf(owner).call()).to.equal('100'); }); @@ -181,7 +181,7 @@ const {collectionId, tokenId} = helper.ethAddress.extractTokenId(rftTokenAddress); const refungibleAddress = helper.ethAddress.fromCollectionId(collectionId); expect(rftCollectionAddress).to.be.equal(refungibleAddress); - const refungibleTokenContract = helper.ethNativeContract.rftToken(rftTokenAddress, owner); + const refungibleTokenContract = await helper.ethNativeContract.rftToken(rftTokenAddress, owner); await refungibleTokenContract.methods.approve(fractionalizer.options.address, 100).send({from: owner}); const result = await fractionalizer.methods.rft2nft(refungibleAddress, tokenId).send({from: owner}); expect(result.events).to.be.like({ @@ -204,7 +204,7 @@ const {collectionId, tokenId} = helper.ethAddress.extractTokenId(rftTokenAddress); const refungibleAddress = helper.ethAddress.fromCollectionId(collectionId); expect(rftCollectionAddress).to.be.equal(refungibleAddress); - const refungibleTokenContract = helper.ethNativeContract.rftToken(rftTokenAddress, owner); + const refungibleTokenContract = await helper.ethNativeContract.rftToken(rftTokenAddress, owner); await refungibleTokenContract.methods.approve(fractionalizer.options.address, 100).send({from: owner}); const rft2nft = await fractionalizer.methods.rft2nftMapping(rftTokenAddress).call(); @@ -233,7 +233,7 @@ itEth('call setRFTCollection twice', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor, 20n); const rftCollection = await helper.eth.createRFTCollection(owner, 'rft', 'RFT collection', 'RFT'); - const refungibleContract = helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); + const refungibleContract = await helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); const fractionalizer = await deployContract(helper, owner); const fractionalizerAddressCross = helper.ethCrossAccount.fromAddress(fractionalizer.options.address); @@ -247,7 +247,7 @@ itEth('call setRFTCollection with NFT collection', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor, 20n); const nftCollection = await helper.eth.createNFTCollection(owner, 'nft', 'NFT collection', 'NFT'); - const nftContract = helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); const fractionalizer = await deployContract(helper, owner); const fractionalizerAddressCross = helper.ethCrossAccount.fromAddress(fractionalizer.options.address); @@ -282,7 +282,7 @@ const owner = await helper.eth.createAccountWithBalance(donor, 20n); const nftCollection = await helper.eth.createNFTCollection(owner, 'nft', 'NFT collection', 'NFT'); - const nftContract = helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); const mintResult = await nftContract.methods.mint(owner).send({from: owner}); const nftTokenId = mintResult.events.Transfer.returnValues.tokenId; @@ -297,7 +297,7 @@ const nftOwner = await helper.eth.createAccountWithBalance(donor, 10n); const nftCollection = await helper.eth.createNFTCollection(owner, 'nft', 'NFT collection', 'NFT'); - const nftContract = helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); const mintResult = await nftContract.methods.mint(owner).send({from: owner}); const nftTokenId = mintResult.events.Transfer.returnValues.tokenId; await nftContract.methods.transfer(nftOwner, 1).send({from: owner}); @@ -314,7 +314,7 @@ const owner = await helper.eth.createAccountWithBalance(donor, 20n); const nftCollection = await helper.eth.createNFTCollection(owner, 'nft', 'NFT collection', 'NFT'); - const nftContract = helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); const mintResult = await nftContract.methods.mint(owner).send({from: owner}); const nftTokenId = mintResult.events.Transfer.returnValues.tokenId; @@ -329,7 +329,7 @@ const owner = await helper.eth.createAccountWithBalance(donor, 20n); const nftCollection = await helper.eth.createNFTCollection(owner, 'nft', 'NFT collection', 'NFT'); - const nftContract = helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); const mintResult = await nftContract.methods.mint(owner).send({from: owner}); const nftTokenId = mintResult.events.Transfer.returnValues.tokenId; @@ -345,7 +345,7 @@ const fractionalizer = await deployContract(helper, owner); const rftCollection = await helper.eth.createRFTCollection(owner, 'rft', 'RFT collection', 'RFT'); - const refungibleContract = helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); + const refungibleContract = await helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); const mintResult = await refungibleContract.methods.mint(owner).send({from: owner}); const rftTokenId = mintResult.events.Transfer.returnValues.tokenId; @@ -358,7 +358,7 @@ const {contract: fractionalizer} = await initContract(helper, owner); const rftCollection = await helper.eth.createRFTCollection(owner, 'rft', 'RFT collection', 'RFT'); - const refungibleContract = helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); + const refungibleContract = await helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); const mintResult = await refungibleContract.methods.mint(owner).send({from: owner}); const rftTokenId = mintResult.events.Transfer.returnValues.tokenId; @@ -369,7 +369,7 @@ itEth('call rft2nft for RFT token that was not minted by fractionalizer contract', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor, 20n); const rftCollection = await helper.eth.createRFTCollection(owner, 'rft', 'RFT collection', 'RFT'); - const refungibleContract = helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); + const refungibleContract = await helper.ethNativeContract.collection(rftCollection.collectionAddress, 'rft', owner); const fractionalizer = await deployContract(helper, owner); @@ -392,7 +392,7 @@ const {rftTokenAddress} = await mintRFTToken(helper, owner, fractionalizer, 100n); const {tokenId} = helper.ethAddress.extractTokenId(rftTokenAddress); - const refungibleTokenContract = helper.ethNativeContract.rftToken(rftTokenAddress, owner); + const refungibleTokenContract = await helper.ethNativeContract.rftToken(rftTokenAddress, owner); await refungibleTokenContract.methods.transfer(receiver, 50).send({from: owner}); await refungibleTokenContract.methods.approve(fractionalizer.options.address, 50).send({from: receiver}); await expect(fractionalizer.methods.rft2nft(rftCollectionAddress, tokenId).call({from: receiver})) @@ -419,7 +419,7 @@ const {contract: fractionalizer} = await initContract(helper, owner); await fractionalizer.methods.setNftCollectionIsAllowed(nftCollectionAddress, true).send({from: owner}); - const nftContract = helper.ethNativeContract.collection(nftCollectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollectionAddress, 'nft', owner); await nftContract.methods.approve(fractionalizer.options.address, nftToken.tokenId).send({from: owner}); await expect(fractionalizer.methods.nft2rft(nftCollectionAddress, nftToken.tokenId, 100).call()) .to.be.rejectedWith(/TransferNotAllowed$/g); @@ -437,7 +437,7 @@ await helper.executeExtrinsic(donor, 'api.tx.unique.setTransfersEnabledFlag', [rftCollection.collectionId, false], true); const nftCollection = await helper.eth.createNFTCollection(owner, 'nft', 'NFT collection', 'NFT'); - const nftContract = helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); + const nftContract = await helper.ethNativeContract.collection(nftCollection.collectionAddress, 'nft', owner); const mintResult = await nftContract.methods.mint(owner).send({from: owner}); const nftTokenId = mintResult.events.Transfer.returnValues.tokenId; --- a/tests/src/eth/fungible.test.ts +++ b/tests/src/eth/fungible.test.ts @@ -33,7 +33,7 @@ const collection = await helper.ft.mintCollection(alice); await collection.mint(alice, 200n); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'ft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'ft', caller); const totalSupply = await contract.methods.totalSupply().call(); expect(totalSupply).to.equal('200'); }); @@ -43,7 +43,7 @@ const collection = await helper.ft.mintCollection(alice); await collection.mint(alice, 200n, {Ethereum: caller}); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'ft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'ft', caller); const balance = await contract.methods.balanceOf(caller).call(); expect(balance).to.equal('200'); }); @@ -68,17 +68,17 @@ await collection.addAdmin(alice, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); const result = await contract.methods.mint(receiver, 100).send(); - + const event = result.events.Transfer; expect(event.address).to.equal(collectionAddress); expect(event.returnValues.from).to.equal('0x0000000000000000000000000000000000000000'); expect(event.returnValues.to).to.equal(receiver); expect(event.returnValues.value).to.equal('100'); }); - + [ 'substrate' as const, 'ethereum' as const, @@ -93,13 +93,13 @@ const ethOwner = await helper.eth.createAccountWithBalance(donor); const collection = await helper.ft.mintCollection(alice); await collection.addAdmin(alice, {Ethereum: ethOwner}); - + const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', ethOwner); - + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', ethOwner); + // 2. Mint tokens: const result = await collectionEvm.methods.mintCross(testCase === 'ethereum' ? receiverCrossEth : receiverCrossSub, 100).send(); - + const event = result.events.Transfer; expect(event.address).to.equal(collectionAddress); expect(event.returnValues.from).to.equal('0x0000000000000000000000000000000000000000'); @@ -123,7 +123,7 @@ await collection.addAdmin(alice, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); const result = await contract.methods.mintBulk(Array.from({length: bulkSize}, (_, i) => ( [receivers[i], (i + 1) * 10] @@ -146,11 +146,11 @@ await collection.addAdmin(alice, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner, true); await contract.methods.mint(receiver, 100).send(); const result = await contract.methods.burnFrom(receiver, 49).send({from: receiver}); - + const event = result.events.Transfer; expect(event.address).to.equal(collectionAddress); expect(event.returnValues.from).to.equal(receiver); @@ -168,7 +168,7 @@ await collection.mint(alice, 200n, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); { const result = await contract.methods.approve(spender, 100).send({from: owner}); @@ -192,13 +192,13 @@ const spenderSub = (await helper.arrange.createAccounts([1n], donor))[0]; const spenderCrossEth = helper.ethCrossAccount.fromAddress(spender); const spenderCrossSub = helper.ethCrossAccount.fromKeyringPair(spenderSub); - + const collection = await helper.ft.mintCollection(alice); await collection.mint(alice, 200n, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); { const result = await contract.methods.approveCross(spenderCrossEth, 100).send({from: owner}); @@ -213,8 +213,8 @@ const allowance = await contract.methods.allowance(owner, spender).call(); expect(+allowance).to.equal(100); } - - + + { const result = await contract.methods.approveCross(spenderCrossSub, 100).send({from: owner}); const event = result.events.Approval; @@ -228,7 +228,7 @@ const allowance = await collection.getApprovedTokens({Ethereum: owner}, {Substrate: spenderSub.address}); expect(allowance).to.equal(100n); } - + { //TO-DO expect with future allowanceCross(owner, spenderCrossEth).call() } @@ -242,7 +242,7 @@ await collection.mint(alice, 100n, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); await expect(collectionEvm.methods.approveCross(nonOwnerCross, 20).call({from: nonOwner})).to.be.rejectedWith('CantApproveMoreThanOwned'); }); @@ -257,10 +257,10 @@ await collection.approveTokens(owner, {Ethereum: sender}, 100n); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'ft'); + const contract = await helper.ethNativeContract.collection(address, 'ft'); const fromBalanceBefore = await collection.getBalance({Substrate: owner.address}); - + const ownerCross = helper.ethCrossAccount.fromKeyringPair(owner); const result = await contract.methods.burnFromCross(ownerCross, 49).send({from: sender}); const events = result.events; @@ -298,13 +298,13 @@ await collection.mint(alice, 200n, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); await contract.methods.approve(spender, 100).send(); { const result = await contract.methods.transferFrom(owner, receiver, 49).send({from: spender}); - + let event = result.events.Transfer; expect(event.address).to.be.equal(collectionAddress); expect(event.returnValues.from).to.be.equal(owner); @@ -338,7 +338,7 @@ await collection.mint(alice, 200n, {Ethereum: sender}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', sender); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', sender); { // Can transferCross to ethereum address: @@ -356,7 +356,7 @@ const receiverBalance = await collectionEvm.methods.balanceOf(receiverEth).call(); expect(+receiverBalance).to.equal(50); } - + { // Can transferCross to substrate address: const result = await collectionEvm.methods.transferCross(receiverCrossSub, 50).send({from: sender}); @@ -385,7 +385,7 @@ const collection = await helper.ft.mintCollection(alice); await collection.mint(alice, BALANCE, {Ethereum: sender}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'ft', sender); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'ft', sender); // 1. Cannot transfer more than have const receiver = testCase === 'transfer' ? receiverEth : receiverCrossEth; @@ -393,8 +393,8 @@ // 2. Zero transfer allowed (EIP-20): await collectionEvm.methods[testCase](receiver, 0n).send({from: sender}); })); - - + + itEth('Can perform transfer()', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const receiver = await helper.eth.createAccountWithBalance(donor); @@ -402,11 +402,11 @@ await collection.mint(alice, 200n, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); { const result = await contract.methods.transfer(receiver, 50).send({from: owner}); - + const event = result.events.Transfer; expect(event.address).to.be.equal(collectionAddress); expect(event.returnValues.from).to.be.equal(owner); @@ -436,14 +436,14 @@ await collection.approveTokens(owner, {Ethereum: sender}, 100n); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'ft'); + const contract = await helper.ethNativeContract.collection(address, 'ft'); const from = helper.ethCrossAccount.fromKeyringPair(owner); const to = helper.ethCrossAccount.fromAddress(receiver); const fromBalanceBefore = await collection.getBalance({Substrate: owner.address}); const toBalanceBefore = await collection.getBalance({Ethereum: receiver}); - + const result = await contract.methods.transferFromCross(from, to, 51).send({from: sender}); expect(result.events).to.be.like({ @@ -483,7 +483,7 @@ [alice] = await helper.arrange.createAccounts([20n], donor); }); }); - + itEth('approve() call fee is less than 0.2UNQ', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const spender = helper.eth.createAccount(); @@ -491,7 +491,7 @@ await collection.mint(alice, 200n, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); const cost = await helper.eth.recordCallFee(owner, () => contract.methods.approve(spender, 100).send({from: owner})); expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))); @@ -504,7 +504,7 @@ await collection.mint(alice, 200n, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); await contract.methods.approve(spender, 100).send({from: owner}); @@ -519,7 +519,7 @@ await collection.mint(alice, 200n, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft', owner); const cost = await helper.eth.recordCallFee(owner, () => contract.methods.transfer(receiver, 100).send({from: owner})); expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))); @@ -544,13 +544,13 @@ await collection.mint(alice, 200n); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft'); const events: any = []; contract.events.allEvents((_: any, event: any) => { events.push(event); }); - + await collection.approveTokens(alice, {Ethereum: receiver}, 100n); if (events.length == 0) await helper.wait.newBlocks(1); const event = events[0]; @@ -570,7 +570,7 @@ await collection.approveTokens(alice, {Substrate: bob.address}, 100n); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft'); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -601,13 +601,13 @@ await collection.mint(alice, 200n); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'ft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'ft'); const events: any = []; contract.events.allEvents((_: any, event: any) => { events.push(event); }); - + await collection.transfer(alice, {Ethereum:receiver}, 51n); if (events.length == 0) await helper.wait.newBlocks(1); const event = events[0]; @@ -630,11 +630,11 @@ await collection.approveTokens(owner, {Ethereum: sender}, 100n); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'ft'); + const contract = await helper.ethNativeContract.collection(address, 'ft'); const from = helper.ethCrossAccount.fromKeyringPair(owner); const to = helper.ethCrossAccount.fromAddress(receiver); - + const result = await contract.methods.transferFromCross(from, to, 51).send({from: sender}); expect(result.events).to.be.like({ --- a/tests/src/eth/helpersSmoke.test.ts +++ b/tests/src/eth/helpersSmoke.test.ts @@ -25,13 +25,13 @@ donor = await privateKey({filename: __filename}); }); }); - + itEth('Contract owner is recorded', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const flipper = await helper.eth.deployFlipper(owner); - expect(await helper.ethNativeContract.contractHelpers(owner).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner); + expect(await (await helper.ethNativeContract.contractHelpers(owner)).methods.contractOwner(flipper.options.address).call()).to.be.equal(owner); }); itEth('Flipper is working', async ({helper}) => { --- a/tests/src/eth/marketplace/marketplace.test.ts +++ b/tests/src/eth/marketplace/marketplace.test.ts @@ -30,7 +30,7 @@ before(async () => { await usingEthPlaygrounds(async (_helper, privateKey) => { donor = await privateKey({filename: __filename}); - }); + }); }); beforeEach(async () => { @@ -50,17 +50,17 @@ const matcher = await helper.ethContract.deployByCode(matcherOwner, 'MarketPlace', (await readFile(`${__dirname}/MarketPlace.sol`)).toString(), [{solPath: 'api/UniqueNFT.sol', fsPath: `${__dirname}/../api/UniqueNFT.sol`}], helper.eth.DEFAULT_GAS * 2); const sponsor = await helper.eth.createAccountWithBalance(donor); - const helpers = helper.ethNativeContract.contractHelpers(matcherOwner); + const helpers = await helper.ethNativeContract.contractHelpers(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 helpers.methods.setSponsor(matcher.options.address, sponsor).send({from: matcherOwner}); await helpers.methods.confirmSponsorship(matcher.options.address).send({from: sponsor}); const collection = await helper.nft.mintCollection(alice, {limits: {sponsorApproveTimeout: 1}, pendingSponsor: alice.address}); await collection.confirmSponsorship(alice); await collection.addToAllowList(alice, {Substrate: aliceDoubleMirror}); - const evmCollection = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); + const evmCollection = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); await helper.eth.transferBalanceFromSubstrate(donor, aliceMirror); await helpers.methods.toggleAllowed(matcher.options.address, aliceMirror, true).send({from: matcherOwner}); @@ -104,17 +104,17 @@ const sponsor = await helper.eth.createAccountWithBalance(donor); const escrow = await helper.eth.createAccountWithBalance(donor); await matcher.methods.setEscrow(escrow, true).send({from: matcherOwner}); - const helpers = helper.ethNativeContract.contractHelpers(matcherOwner); + const helpers = await helper.ethNativeContract.contractHelpers(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 helpers.methods.setSponsor(matcher.options.address, sponsor).send({from: matcherOwner}); await helpers.methods.confirmSponsorship(matcher.options.address).send({from: sponsor}); const collection = await helper.nft.mintCollection(alice, {limits: {sponsorApproveTimeout: 1}, pendingSponsor: alice.address}); await collection.confirmSponsorship(alice); await collection.addToAllowList(alice, {Substrate: aliceDoubleMirror}); - const evmCollection = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); + const evmCollection = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); await helper.eth.transferBalanceFromSubstrate(donor, aliceMirror); @@ -168,10 +168,10 @@ await helper.eth.transferBalanceFromSubstrate(donor, matcher.options.address); const collection = await helper.nft.mintCollection(alice, {limits: {sponsorApproveTimeout: 1}}); - const evmCollection = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); + const evmCollection = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); await helper.balance.transferToSubstrate(donor, seller.address, 100_000_000_000_000_000_000n); - + const token = await collection.mintToken(alice, {Ethereum: sellerMirror}); // Token is owned by seller initially --- a/tests/src/eth/migration.seqtest.ts +++ b/tests/src/eth/migration.seqtest.ts @@ -165,7 +165,7 @@ const collection = await helper.nft.mintCollection(superuser); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); const caller = await helper.eth.createAccountWithBalance(superuser); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', caller); const events: any = []; contract.events.allEvents((_: any, event: any) => { --- a/tests/src/eth/nesting/nest.test.ts +++ b/tests/src/eth/nesting/nest.test.ts @@ -9,7 +9,7 @@ ): Promise<{ collectionId: number, collectionAddress: string, contract: Contract }> => { const {collectionAddress, collectionId} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); await contract.methods.setCollectionNesting(true).send({from: owner}); return {collectionId, collectionAddress, contract}; @@ -51,13 +51,13 @@ await contract.methods.transferFrom(targetNftTokenAddress, owner, secondTokenId).send({from: owner}); expect(await contract.methods.ownerOf(secondTokenId).call()).to.be.equal(owner); }); - + itEth('NFT: collectionNestingRestrictedCollectionIds() & collectionNestingPermissions', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const {collectionId: unnestedCollsectionId, collectionAddress: unnsetedCollectionAddress} = await helper.eth.createNFTCollection(owner, 'A', 'B', 'C'); - const unnestedContract = helper.ethNativeContract.collection(unnsetedCollectionAddress, 'nft', owner); + const unnestedContract = await helper.ethNativeContract.collection(unnsetedCollectionAddress, 'nft', owner); expect(await unnestedContract.methods.collectionNestingRestrictedCollectionIds().call({from: owner})).to.be.like([false, []]); - + const {contract} = await createNestingCollection(helper, owner); expect(await contract.methods.collectionNestingRestrictedCollectionIds().call({from: owner})).to.be.like([true, []]); await contract.methods.setCollectionNesting(true, [unnsetedCollectionAddress]).send({from: owner}); @@ -66,7 +66,7 @@ await contract.methods.setCollectionNesting(false).send({from: owner}); expect(await contract.methods.collectionNestingPermissions().call({from: owner})).to.be.like([['1', false], ['0', false]]); }); - + itEth('NFT: allows an Owner to nest/unnest their token (Restricted nesting)', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); --- a/tests/src/eth/nonFungible.test.ts +++ b/tests/src/eth/nonFungible.test.ts @@ -37,7 +37,7 @@ const caller = await helper.eth.createAccountWithBalance(donor); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); const totalSupply = await contract.methods.totalSupply().call(); expect(totalSupply).to.equal('1'); @@ -51,7 +51,7 @@ await collection.mintToken(alice, {Ethereum: caller}); await collection.mintToken(alice, {Ethereum: caller}); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); const balance = await contract.methods.balanceOf(caller).call(); expect(balance).to.equal('3'); @@ -63,7 +63,7 @@ const token = await collection.mintToken(alice, {Ethereum: caller}); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); const owner = await contract.methods.ownerOf(token.tokenId).call(); @@ -74,7 +74,7 @@ const collection = await helper.nft.mintCollection(alice, {name: 'test', tokenPrefix: 'TEST'}); const caller = helper.eth.createAccount(); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); expect(await contract.methods.name().call()).to.equal('test'); expect(await contract.methods.symbol().call()).to.equal('TEST'); @@ -95,7 +95,7 @@ const receiver = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner, 'Mint collection', 'a', 'b', baseUri); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const result = await contract.methods.mint(receiver).send(); const tokenId = result.events.Transfer.returnValues.tokenId; @@ -155,7 +155,7 @@ const receiver = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner, 'Mint collection', '6', '6', ''); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const result = await contract.methods.mintWithTokenURI(receiver, 'Test URI').send(); const tokenId = result.events.Transfer.returnValues.tokenId; @@ -173,7 +173,7 @@ // const tokenUri = await contract.methods.tokenURI(nextTokenId).call(); // expect(tokenUri).to.be.equal(`https://offchain-service.local/token-info/${nextTokenId}`); }); - + // TODO combine all minting tests in one place [ 'substrate' as const, @@ -205,9 +205,9 @@ tokenPropertyPermissions: permissions, }); await collection.addAdmin(minter, {Ethereum: collectionAdmin}); - + const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', collectionAdmin, true); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', collectionAdmin, true); let expectedTokenId = await contract.methods.nextTokenId().call(); let result = await contract.methods.mintCross(testCase === 'ethereum' ? receiverCrossEth : receiverCrossSub, []).send(); let tokenId = result.events.Transfer.returnValues.tokenId; @@ -218,7 +218,7 @@ expect(event.returnValues.from).to.be.equal('0x0000000000000000000000000000000000000000'); expect(event.returnValues.to).to.be.equal(testCase === 'ethereum' ? receiverEth : helper.address.substrateToEth(bob.address)); expect(await contract.methods.properties(tokenId, []).call()).to.be.like([]); - + expectedTokenId = await contract.methods.nextTokenId().call(); result = await contract.methods.mintCross(testCase === 'ethereum' ? receiverCrossEth : receiverCrossSub, properties).send(); event = result.events.Transfer; @@ -226,14 +226,14 @@ expect(event.returnValues.from).to.be.equal('0x0000000000000000000000000000000000000000'); expect(event.returnValues.to).to.be.equal(testCase === 'ethereum' ? receiverEth : helper.address.substrateToEth(bob.address)); expect(await contract.methods.properties(tokenId, []).call()).to.be.like([]); - + tokenId = result.events.Transfer.returnValues.tokenId; - + expect(tokenId).to.be.equal(expectedTokenId); expect(await contract.methods.properties(tokenId, []).call()).to.be.like(properties .map(p => { return helper.ethProperty.property(p.key, p.value.toString()); })); - + expect(await helper.nft.getTokenOwner(collection.collectionId, tokenId)) .to.deep.eq(testCase === 'ethereum' ? {Ethereum: receiverEth.toLowerCase()} : {Substrate: receiverSub.address}); }); @@ -245,12 +245,12 @@ const collection = await helper.nft.mintCollection(minter); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft'); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft'); await expect(collectionEvm.methods.mintCross(nonOwnerCross, []).call({from: nonOwner})) .to.be.rejectedWith('PublicMintingNotAllowed'); }); - + //TODO: CORE-302 add eth methods itEth.skip('Can perform mintBulk()', async ({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); @@ -260,7 +260,7 @@ await collection.addAdmin(minter, {Ethereum: caller}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', caller); { const bulkSize = 3; const nextTokenId = await contract.methods.nextTokenId().call(); @@ -292,7 +292,7 @@ const {tokenId} = await collection.mintToken(minter, {Ethereum: caller}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', caller); { const result = await contract.methods.burn(tokenId).send({from: caller}); @@ -313,7 +313,7 @@ const {tokenId} = await collection.mintToken(minter, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); { const result = await contract.methods.approve(spender, tokenId).send({from: owner}); @@ -333,7 +333,7 @@ const collection = await helper.nft.mintCollection(minter, {}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const approvedBefore = await contract.methods.isApprovedForAll(owner, operator).call(); expect(approvedBefore).to.be.equal(false); @@ -382,7 +382,7 @@ const token = await collection.mintToken(minter, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft'); + const contract = await helper.ethNativeContract.collection(address, 'nft'); { await contract.methods.setApprovalForAll(operator, true).send({from: owner}); @@ -403,7 +403,7 @@ expect(await helper.nft.doesTokenExist(collection.collectionId, token.tokenId)).to.be.false; }); - + itEth('Can perform transfer with ApprovalForAll', async ({helper}) => { const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'}); @@ -414,7 +414,7 @@ const token = await collection.mintToken(minter, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft'); + const contract = await helper.ethNativeContract.collection(address, 'nft'); { await contract.methods.setApprovalForAll(operator, true).send({from: owner}); @@ -450,7 +450,7 @@ const token2 = await collection.mintToken(minter, {Ethereum: ownerEth}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft'); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft'); // Approve tokens from substrate and ethereum: await token1.approve(ownerSub, {Ethereum: burnerEth}); @@ -464,7 +464,7 @@ // Check events for burnFromCross (substrate and ethereum): [ - [events1, token1, helper.address.substrateToEth(ownerSub.address)], + [events1, token1, helper.address.substrateToEth(ownerSub.address)], [events2, token2, ownerEth], ].map(burnData => { expect(burnData[0]).to.be.like({ @@ -497,7 +497,7 @@ const token1 = await collection.mintToken(minter, {Ethereum: owner}); const token2 = await collection.mintToken(minter, {Ethereum: owner}); - const collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); + const collectionEvm = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); // Can approveCross substrate and ethereum address: const resultSub = await collectionEvm.methods.approveCross(recieverCrossSub, token1.tokenId).send({from: owner}); @@ -536,7 +536,7 @@ const nonOwnerCross = helper.ethCrossAccount.fromAddress(nonOwner); const owner = await helper.eth.createAccountWithBalance(donor); const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'}); - const collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); + const collectionEvm = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); const token = await collection.mintToken(minter, {Ethereum: owner}); await expect(collectionEvm.methods.approveCross(nonOwnerCross, token.tokenId).call({from: nonOwner})).to.be.rejectedWith('CantApproveMoreThanOwned'); @@ -551,7 +551,7 @@ const collection = await helper.nft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'}); const token1 = await collection.mintToken(minter, {Ethereum: owner}); const token2 = await collection.mintToken(minter, {Ethereum: owner}); - const collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); + const collectionEvm = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(collection.collectionId), 'nft'); // Can approve and reaffirm approved address: await collectionEvm.methods.approveCross(receiver1Cross, token1.tokenId).send({from: owner}); @@ -579,7 +579,7 @@ const {tokenId} = await collection.mintToken(minter, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); await contract.methods.approve(spender, tokenId).send({from: owner}); @@ -613,7 +613,7 @@ const token = await collection.mintToken(minter, {Substrate: owner.address}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft'); + const contract = await helper.ethNativeContract.collection(address, 'nft'); await token.approve(owner, {Ethereum: spender}); @@ -644,7 +644,7 @@ const {tokenId} = await collection.mintToken(minter, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); { const result = await contract.methods.transfer(receiver, tokenId).send({from: owner}); @@ -666,18 +666,18 @@ expect(+balance).to.equal(1); } }); - + itEth('Can perform transferCross()', async ({helper}) => { const collection = await helper.nft.mintCollection(minter, {}); const owner = await helper.eth.createAccountWithBalance(donor); const receiverEth = await helper.eth.createAccountWithBalance(donor); const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth); const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(minter); - + const {tokenId} = await collection.mintToken(minter, {Ethereum: owner}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); { // Can transferCross to ethereum address: @@ -688,7 +688,7 @@ expect(event.returnValues.from).to.be.equal(owner); expect(event.returnValues.to).to.be.equal(receiverEth); expect(event.returnValues.tokenId).to.be.equal(`${tokenId}`); - + // owner has balance = 0: const ownerBalance = await collectionEvm.methods.balanceOf(owner).call(); expect(+ownerBalance).to.equal(0); @@ -697,7 +697,7 @@ expect(+receiverBalance).to.equal(1); expect(await helper.nft.getTokenOwner(collection.collectionId, tokenId)).to.deep.eq({Ethereum: receiverEth.toLowerCase()}); } - + { // Can transferCross to substrate address: const substrateResult = await collectionEvm.methods.transferCross(receiverCrossSub, tokenId).send({from: receiverEth}); @@ -707,7 +707,7 @@ expect(event.returnValues.from).to.be.equal(receiverEth); expect(event.returnValues.to).to.be.equal(helper.address.substrateToEth(minter.address)); expect(event.returnValues.tokenId).to.be.equal(`${tokenId}`); - + // owner has balance = 0: const ownerBalance = await collectionEvm.methods.balanceOf(receiverEth).call(); expect(+ownerBalance).to.equal(0); @@ -725,7 +725,7 @@ const collection = await helper.nft.mintCollection(minter, {}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', sender); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', sender); await collection.mintToken(minter, {Ethereum: sender}); const nonSendersToken = await collection.mintToken(minter, {Ethereum: tokenOwner}); @@ -758,7 +758,7 @@ const collection = await helper.nft.mintCollection(alice, {}); const {tokenId} = await collection.mintToken(alice, {Ethereum: owner}); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', owner); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', owner); const cost = await helper.eth.recordCallFee(owner, () => contract.methods.approve(spender, tokenId).send({from: owner})); expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))); @@ -771,7 +771,7 @@ const collection = await helper.nft.mintCollection(alice, {}); const {tokenId} = await collection.mintToken(alice, {Ethereum: owner}); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', owner); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', owner); await contract.methods.approve(spender, tokenId).send({from: owner}); @@ -790,7 +790,7 @@ const token = await collection.mintToken(collectionMinter, {Substrate: owner.address}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft'); + const contract = await helper.ethNativeContract.collection(address, 'nft'); await token.approve(owner, {Ethereum: spender}); @@ -820,7 +820,7 @@ const collection = await helper.nft.mintCollection(alice, {}); const {tokenId} = await collection.mintToken(alice, {Ethereum: owner}); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', owner); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', owner); const cost = await helper.eth.recordCallFee(owner, () => contract.methods.transfer(receiver, tokenId).send({from: owner})); expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))); @@ -841,7 +841,7 @@ itEth('Events emitted for mint()', async ({helper}) => { const collection = await helper.nft.mintCollection(alice, {}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft'); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -864,7 +864,7 @@ const token = await collection.mintToken(alice); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft'); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -889,7 +889,7 @@ const token = await collection.mintToken(alice); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft'); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -916,7 +916,7 @@ await token.approve(alice, {Substrate: bob.address}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft'); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -941,7 +941,7 @@ const token = await collection.mintToken(alice); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft'); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft'); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -991,7 +991,7 @@ }, ); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); const name = await contract.methods.name().call(); expect(name).to.equal('oh River'); }); @@ -1016,7 +1016,7 @@ }, ); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller); const symbol = await contract.methods.symbol().call(); expect(symbol).to.equal('CHANGE'); }); @@ -1043,7 +1043,7 @@ const token = await collection.mintToken(minter, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft'); + const contract = await helper.ethNativeContract.collection(address, 'nft'); const ownerCross = helper.ethCrossAccount.fromAddress(owner); await expect(contract.methods.burnFromCross(ownerCross, token.tokenId).send({from: spender})).to.be.rejected; @@ -1064,7 +1064,7 @@ const token = await collection.mintToken(minter, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft'); + const contract = await helper.ethNativeContract.collection(address, 'nft'); const ownerCross = helper.ethCrossAccount.fromAddress(owner); const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver); @@ -1073,7 +1073,7 @@ await contract.methods.setApprovalForAll(spender, true).send({from: owner}); await contract.methods.setApprovalForAll(spender, false).send({from: owner}); - + await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected; }); }); --- a/tests/src/eth/payable.test.ts +++ b/tests/src/eth/payable.test.ts @@ -175,7 +175,7 @@ const SMALL_FEE = 1n * helper.balance.getOneTokenNominal(); const BIG_FEE = 3n * helper.balance.getOneTokenNominal(); const caller = await helper.eth.createAccountWithBalance(donor); - const collectionHelper = helper.ethNativeContract.collectionHelpers(caller); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(caller); await expect(collectionHelper.methods.createNFTCollection('A', 'B', 'C').call({value: Number(SMALL_FEE)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)'); await expect(collectionHelper.methods.createNFTCollection('A', 'B', 'C').call({value: Number(BIG_FEE)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)'); @@ -185,7 +185,7 @@ const SMALL_FEE = 1n * helper.balance.getOneTokenNominal(); const BIG_FEE = 3n * helper.balance.getOneTokenNominal(); const caller = await helper.eth.createAccountWithBalance(donor); - const collectionHelper = helper.ethNativeContract.collectionHelpers(caller); + const collectionHelper = await helper.ethNativeContract.collectionHelpers(caller); await expect(collectionHelper.methods.createRFTCollection('A', 'B', 'C').call({value: Number(SMALL_FEE)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)'); await expect(collectionHelper.methods.createRFTCollection('A', 'B', 'C').call({value: Number(BIG_FEE)})).to.be.rejectedWith('Sent amount not equals to collection creation price (2000000000000000000)'); --- a/tests/src/eth/proxy/fungibleProxy.test.ts +++ b/tests/src/eth/proxy/fungibleProxy.test.ts @@ -48,7 +48,7 @@ await collection.mint(alice, 200n, {Substrate: alice.address}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'ft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'ft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const totalSupply = await contract.methods.totalSupply().call(); @@ -62,7 +62,7 @@ await collection.mint(alice, 200n, {Ethereum: caller}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'ft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'ft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const balance = await contract.methods.balanceOf(caller).call(); @@ -87,7 +87,7 @@ const spender = helper.eth.createAccount(); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'ft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'ft', caller); const contract = await proxyWrap(helper, evmCollection, donor); await collection.mint(alice, 200n, {Ethereum: contract.options.address}); @@ -123,7 +123,7 @@ const receiver = helper.eth.createAccount(); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'ft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'ft', caller); const contract = await proxyWrap(helper, evmCollection, donor); await evmCollection.methods.approve(contract.options.address, 100).send({from: owner}); @@ -170,7 +170,7 @@ const receiver = await helper.eth.createAccountWithBalance(donor); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'ft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'ft', caller); const contract = await proxyWrap(helper, evmCollection, donor); await collection.mint(alice, 200n, {Ethereum: contract.options.address}); --- a/tests/src/eth/proxy/nonFungibleProxy.test.ts +++ b/tests/src/eth/proxy/nonFungibleProxy.test.ts @@ -48,7 +48,7 @@ await collection.mintToken(alice, {Substrate: alice.address}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'nft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'nft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const totalSupply = await contract.methods.totalSupply().call(); @@ -66,7 +66,7 @@ ]); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'nft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'nft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const balance = await contract.methods.balanceOf(caller).call(); @@ -80,7 +80,7 @@ const {tokenId} = await collection.mintToken(alice, {Ethereum: caller}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'nft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'nft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const owner = await contract.methods.ownerOf(tokenId).call(); @@ -106,8 +106,8 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); - const collectionEvmOwned = helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', caller, true); + const collectionEvmOwned = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner, true); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', caller, true); const contract = await proxyWrap(helper, collectionEvm, donor); await collectionEvmOwned.methods.addCollectionAdmin(contract.options.address).send(); @@ -141,8 +141,8 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); - const collectionEvmOwned = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'nft', caller); + const collectionEvmOwned = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'nft', caller); const contract = await proxyWrap(helper, collectionEvm, donor); const contractAddressCross = helper.ethCrossAccount.fromAddress(contract.options.address); await collectionEvmOwned.methods.addCollectionAdminCross(contractAddressCross).send(); @@ -179,7 +179,7 @@ const receiver = helper.eth.createAccount(); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'nft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'nft', caller); const contract = await proxyWrap(helper, evmCollection, donor); await collection.addAdmin(donor, {Ethereum: contract.options.address}); @@ -237,7 +237,7 @@ const caller = await helper.eth.createAccountWithBalance(donor); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'nft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'nft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const {tokenId} = await collection.mintToken(alice, {Ethereum: contract.options.address}); await collection.addAdmin(alice, {Ethereum: contract.options.address}); @@ -266,7 +266,7 @@ const spender = helper.eth.createAccount(); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'nft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'nft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const {tokenId} = await collection.mintToken(alice, {Ethereum: contract.options.address}); @@ -296,7 +296,7 @@ const receiver = helper.eth.createAccount(); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'nft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'nft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const {tokenId} = await collection.mintToken(alice, {Ethereum: owner}); @@ -335,7 +335,7 @@ const receiver = helper.eth.createAccount(); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const evmCollection = helper.ethNativeContract.collection(address, 'nft', caller); + const evmCollection = await helper.ethNativeContract.collection(address, 'nft', caller); const contract = await proxyWrap(helper, evmCollection, donor); const {tokenId} = await collection.mintToken(alice, {Ethereum: contract.options.address}); --- a/tests/src/eth/reFungible.test.ts +++ b/tests/src/eth/reFungible.test.ts @@ -33,7 +33,7 @@ itEth('totalSupply', async ({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'TotalSupply', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); await contract.methods.mint(caller).send(); @@ -44,7 +44,7 @@ itEth('balanceOf', async ({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'BalanceOf', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); await contract.methods.mint(caller).send(); await contract.methods.mint(caller).send(); @@ -57,7 +57,7 @@ itEth('ownerOf', async ({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'OwnerOf', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; @@ -70,11 +70,11 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'OwnerOf-AfterBurn', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; - const tokenContract = helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller); + const tokenContract = await helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller); await tokenContract.methods.repartition(2).send(); await tokenContract.methods.transfer(receiver, 1).send(); @@ -89,11 +89,11 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'Partial-OwnerOf', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; - const tokenContract = helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller); + const tokenContract = await helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller); await tokenContract.methods.repartition(2).send(); await tokenContract.methods.transfer(receiver, 1).send(); @@ -122,7 +122,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, 'Minty', '6', '6', ''); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner); const result = await contract.methods.mintWithTokenURI(receiver, 'Test URI').send(); @@ -136,7 +136,7 @@ expect(await contract.methods.crossOwnerOf(tokenId).call()).to.be.like([receiver, '0']); expect(await contract.methods.tokenURI(tokenId).call()).to.be.equal('Test URI'); }); - + [ 'substrate' as const, 'ethereum' as const, @@ -155,16 +155,16 @@ collectionAdmin: true, mutable: false}}; }); - - + + const collection = await helper.rft.mintCollection(minter, { tokenPrefix: 'ethp', tokenPropertyPermissions: permissions, }); await collection.addAdmin(minter, {Ethereum: collectionAdmin}); - + const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', collectionAdmin, true); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', collectionAdmin, true); let expectedTokenId = await contract.methods.nextTokenId().call(); let result = await contract.methods.mintCross(testCase === 'ethereum' ? receiverCrossEth : receiverCrossSub, []).send(); let tokenId = result.events.Transfer.returnValues.tokenId; @@ -175,7 +175,7 @@ expect(event.returnValues.from).to.be.equal('0x0000000000000000000000000000000000000000'); expect(event.returnValues.to).to.be.equal(testCase === 'ethereum' ? receiverEth : helper.address.substrateToEth(bob.address)); expect(await contract.methods.properties(tokenId, []).call()).to.be.like([]); - + expectedTokenId = await contract.methods.nextTokenId().call(); result = await contract.methods.mintCross(testCase === 'ethereum' ? receiverCrossEth : receiverCrossSub, properties).send(); event = result.events.Transfer; @@ -183,11 +183,11 @@ expect(event.returnValues.from).to.be.equal('0x0000000000000000000000000000000000000000'); expect(event.returnValues.to).to.be.equal(testCase === 'ethereum' ? receiverEth : helper.address.substrateToEth(bob.address)); expect(await contract.methods.properties(tokenId, []).call()).to.be.like([]); - + tokenId = result.events.Transfer.returnValues.tokenId; expect(tokenId).to.be.equal(expectedTokenId); - + expect(await contract.methods.properties(tokenId, []).call()).to.be.like(properties .map(p => { return helper.ethProperty.property(p.key, p.value.toString()); })); @@ -200,7 +200,7 @@ const owner = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, 'MintBulky', '6', '6', ''); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner); { const nextTokenId = await contract.methods.nextTokenId().call(); @@ -236,7 +236,7 @@ const collection = await helper.rft.mintCollection(minter, {}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner); const approvedBefore = await contract.methods.isApprovedForAll(owner, operator).call(); expect(approvedBefore).to.be.equal(false); @@ -285,7 +285,7 @@ const token = await collection.mintToken(minter, 100n, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'rft'); + const contract = await helper.ethNativeContract.collection(address, 'rft'); { await contract.methods.setApprovalForAll(operator, true).send({from: owner}); @@ -314,9 +314,9 @@ const token = await collection.mintToken(minter, 100n, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'rft'); + const contract = await helper.ethNativeContract.collection(address, 'rft'); - const rftToken = helper.ethNativeContract.rftTokenById(token.collectionId, token.tokenId, owner); + const rftToken = await helper.ethNativeContract.rftTokenById(token.collectionId, token.tokenId, owner); { await rftToken.methods.approve(operator, 15n).send({from: owner}); @@ -326,7 +326,7 @@ expect(allowance).to.be.equal('5'); } }); - + itEth('Can perform transfer with ApprovalForAll', async ({helper}) => { const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'}); @@ -337,7 +337,7 @@ const token = await collection.mintToken(minter, 100n, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'rft'); + const contract = await helper.ethNativeContract.collection(address, 'rft'); { await contract.methods.setApprovalForAll(operator, true).send({from: owner}); @@ -362,7 +362,7 @@ itEth('Can perform burn()', async ({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'Burny', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; @@ -380,14 +380,14 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'TransferFromy', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; const tokenAddress = helper.ethAddress.fromTokenId(collectionId, tokenId); - const tokenContract = helper.ethNativeContract.rftToken(tokenAddress, caller); + const tokenContract = await helper.ethNativeContract.rftToken(tokenAddress, caller); await tokenContract.methods.repartition(15).send(); { @@ -432,10 +432,10 @@ const token = await collection.mintToken(minter, 100n, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'rft', spender, true); + const contract = await helper.ethNativeContract.collection(address, 'rft', spender, true); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, token.tokenId); - const tokenContract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const tokenContract = await helper.ethNativeContract.rftToken(tokenAddress, owner); await tokenContract.methods.repartition(15).send(); await tokenContract.methods.approve(spender, 15).send(); @@ -458,14 +458,14 @@ itEth('Can perform burnFromCross()', async ({helper}) => { const collection = await helper.rft.mintCollection(minter, {name: 'A', description: 'B', tokenPrefix: 'C'}); - + const owner = bob; const spender = await helper.eth.createAccountWithBalance(donor, 100n); const token = await collection.mintToken(minter, 100n, {Substrate: owner.address}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'rft'); + const contract = await helper.ethNativeContract.collection(address, 'rft'); await token.repartition(owner, 15n); await token.approve(owner, {Ethereum: spender}, 15n); @@ -498,7 +498,7 @@ const token = await collection.mintToken(minter, 100n, {Substrate: owner.address}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'rft'); + const contract = await helper.ethNativeContract.collection(address, 'rft'); await token.repartition(owner, 15n); await token.approve(owner, {Ethereum: spender}, 15n); @@ -526,7 +526,7 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'Transferry', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; @@ -551,7 +551,7 @@ expect(+balance).to.equal(1); } }); - + itEth('Can perform transferCross()', async ({helper}) => { const sender = await helper.eth.createAccountWithBalance(donor); const receiverEth = await helper.eth.createAccountWithBalance(donor); @@ -560,7 +560,7 @@ const collection = await helper.rft.mintCollection(minter, {}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', sender); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'rft', sender); const token = await collection.mintToken(minter, 50n, {Ethereum: sender}); @@ -582,7 +582,7 @@ expect(+receiverBalance).to.equal(1); expect(await token.getBalance({Ethereum: receiverEth})).to.eq(50n); } - + { // Can transferCross to substrate address: const substrateResult = await collectionEvm.methods.transferCross(receiverCrossSub, token.tokenId).send({from: receiverEth}); @@ -611,7 +611,7 @@ const collection = await helper.rft.mintCollection(minter, {}); const collectionAddress = helper.ethAddress.fromCollectionId(collection.collectionId); - const collectionEvm = helper.ethNativeContract.collection(collectionAddress, 'rft', sender); + const collectionEvm = await helper.ethNativeContract.collection(collectionAddress, 'rft', sender); await collection.mintToken(minter, 50n, {Ethereum: sender}); const nonSendersToken = await collection.mintToken(minter, 50n, {Ethereum: tokenOwner}); @@ -627,12 +627,12 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'Transferry-Partial-to-Full', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; - const tokenContract = helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller); + const tokenContract = await helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller); await tokenContract.methods.repartition(2).send(); await tokenContract.methods.transfer(receiver, 1).send(); @@ -656,12 +656,12 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'Transferry-Full-to-Partial', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; - const tokenContract = helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller); + const tokenContract = await helper.ethNativeContract.rftTokenById(collectionId, tokenId, caller); await tokenContract.methods.repartition(2).send(); @@ -696,7 +696,7 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'Feeful-Transfer-From', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; @@ -710,7 +710,7 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createRFTCollection(caller, 'Feeful-Transfer', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; @@ -754,7 +754,7 @@ }, ); - const contract = helper.ethNativeContract.collectionById(collection.collectionId, 'rft', caller); + const contract = await helper.ethNativeContract.collectionById(collection.collectionId, 'rft', caller); const name = await contract.methods.name().call(); expect(name).to.equal('Leviathan'); }); @@ -779,7 +779,7 @@ }, ); - const contract = helper.ethNativeContract.collectionById(collectionId, 'rft', caller); + const contract = await helper.ethNativeContract.collectionById(collectionId, 'rft', caller); const symbol = await contract.methods.symbol().call(); expect(symbol).to.equal('12'); }); @@ -793,7 +793,7 @@ before(async function() { await usingEthPlaygrounds(async (helper, privateKey) => { requirePalletsOrSkip(this, helper, [Pallets.ReFungible]); - + donor = await privateKey({filename: __filename}); [minter, alice] = await helper.arrange.createAccounts([100n, 100n], donor); }); @@ -808,7 +808,7 @@ const token = await collection.mintToken(minter, 100n, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'rft'); + const contract = await helper.ethNativeContract.collection(address, 'rft'); const ownerCross = helper.ethCrossAccount.fromAddress(owner); @@ -830,16 +830,16 @@ const token = await collection.mintToken(minter, 100n, {Ethereum: owner}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'rft'); + const contract = await helper.ethNativeContract.collection(address, 'rft'); const ownerCross = helper.ethCrossAccount.fromAddress(owner); const recieverCross = helper.ethCrossAccount.fromKeyringPair(receiver); - + await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected; await contract.methods.setApprovalForAll(spender, true).send({from: owner}); await contract.methods.setApprovalForAll(spender, false).send({from: owner}); - + await expect(contract.methods.transferFromCross(ownerCross, recieverCross, token.tokenId).send({from: spender})).to.be.rejected; }); }); --- a/tests/src/eth/reFungibleToken.test.ts +++ b/tests/src/eth/reFungibleToken.test.ts @@ -38,7 +38,7 @@ const collection = await helper.rft.mintCollection(alice, {tokenPrefix: 'MUON'}); const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: caller}); - const contract = helper.ethNativeContract.rftTokenById(collection.collectionId, tokenId, caller); + const contract = await helper.ethNativeContract.rftTokenById(collection.collectionId, tokenId, caller); const totalSupply = await contract.methods.totalSupply().call(); expect(totalSupply).to.equal('200'); }); @@ -48,7 +48,7 @@ const collection = await helper.rft.mintCollection(alice, {tokenPrefix: 'MUON'}); const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: caller}); - const contract = helper.ethNativeContract.rftTokenById(collection.collectionId, tokenId, caller); + const contract = await helper.ethNativeContract.rftTokenById(collection.collectionId, tokenId, caller); const balance = await contract.methods.balanceOf(caller).call(); expect(balance).to.equal('200'); }); @@ -58,7 +58,7 @@ const collection = await helper.rft.mintCollection(alice, {tokenPrefix: 'MUON'}); const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: caller}); - const contract = helper.ethNativeContract.rftTokenById(collection.collectionId, tokenId, caller); + const contract = await helper.ethNativeContract.rftTokenById(collection.collectionId, tokenId, caller); const decimals = await contract.methods.decimals().call(); expect(decimals).to.equal('0'); }); @@ -81,7 +81,7 @@ const receiver = helper.eth.createAccount(); const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleRFTCollection(owner, 'Mint collection', 'a', 'b', baseUri); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner); const result = await contract.methods.mint(receiver).send(); @@ -143,7 +143,7 @@ const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); { const result = await contract.methods.approve(spender, 100).send({from: owner}); @@ -159,20 +159,20 @@ expect(+allowance).to.equal(100); } }); - + itEth('Can perform approveCross()', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const spender = helper.eth.createAccount(); const spenderSub = (await helper.arrange.createAccounts([1n], donor))[0]; const spenderCrossEth = helper.ethCrossAccount.fromAddress(spender); const spenderCrossSub = helper.ethCrossAccount.fromKeyringPair(spenderSub); - + const collection = await helper.rft.mintCollection(alice); const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); { const result = await contract.methods.approveCross(spenderCrossEth, 100).send({from: owner}); @@ -187,8 +187,8 @@ const allowance = await contract.methods.allowance(owner, spender).call(); expect(+allowance).to.equal(100); } - - + + { const result = await contract.methods.approveCross(spenderCrossSub, 100).send({from: owner}); const event = result.events.Approval; @@ -202,7 +202,7 @@ const allowance = await collection.getTokenApprovedPieces(tokenId, {Ethereum: owner}, {Substrate: spenderSub.address}); expect(allowance).to.equal(100n); } - + { //TO-DO expect with future allowanceCross(owner, spenderCrossEth).call() } @@ -216,7 +216,7 @@ const token = await collection.mintToken(alice, 100n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, token.tokenId); - const tokenEvm = helper.ethNativeContract.rftToken(tokenAddress, owner); + const tokenEvm = await helper.ethNativeContract.rftToken(tokenAddress, owner); await expect(tokenEvm.methods.approveCross(nonOwnerCross, 20).call({from: nonOwner})).to.be.rejectedWith('CantApproveMoreThanOwned'); }); @@ -224,7 +224,7 @@ [ 'transferFrom', 'transferFromCross', - ].map(testCase => + ].map(testCase => itEth(`Can perform ${testCase}`, async ({helper}) => { const isCross = testCase === 'transferFromCross'; const owner = await helper.eth.createAccountWithBalance(donor); @@ -234,21 +234,21 @@ const receiverCrossEth = helper.ethCrossAccount.fromAddress(receiverEth); const [receiverSub] = await helper.arrange.createAccounts([1n], donor); const receiverCrossSub = helper.ethCrossAccount.fromKeyringPair(receiverSub); - + const collection = await helper.rft.mintCollection(alice); const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); await contract.methods.approve(spender, 100).send({from: owner}); - + // 1. Can transfer from // 1.1 Plain ethereum or cross address: { const result = await contract.methods[testCase]( isCross ? ownerCross : owner, - isCross ? receiverCrossEth : receiverEth, + isCross ? receiverCrossEth : receiverEth, 49, ).send({from: spender}); @@ -272,7 +272,7 @@ expect(+receiverBalance).to.equal(49); expect(+ownerBalance).to.equal(151); } - + // 1.2 Cross substrate address: if (testCase === 'transferFromCross') { const result = await contract.methods.transferFromCross(ownerCross, receiverCrossSub, 51).send({from: spender}); @@ -300,7 +300,7 @@ [ 'transfer', 'transferCross', - ].map(testCase => + ].map(testCase => itEth(`Can perform ${testCase}()`, async ({helper}) => { const isCross = testCase === 'transferCross'; const owner = await helper.eth.createAccountWithBalance(donor); @@ -312,7 +312,7 @@ const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); // 1. Can transfer to plain ethereum or cross-ethereum account: { @@ -329,8 +329,8 @@ expect(+ownerBalance).to.equal(150); expect(+receiverBalance).to.equal(50); } - - // 2. Can transfer to cross-substrate account: + + // 2. Can transfer to cross-substrate account: if(isCross) { const result = await contract.methods.transferCross(receiverCrossSub, 50).send({from: owner}); // Check events: @@ -350,7 +350,7 @@ [ 'transfer', 'transferCross', - ].map(testCase => + ].map(testCase => itEth(`Cannot ${testCase}() non-owned token`, async ({helper}) => { const isCross = testCase === 'transferCross'; const owner = await helper.eth.createAccountWithBalance(donor); @@ -361,14 +361,14 @@ const rftOwner = await collection.mintToken(alice, 10n, {Ethereum: owner}); const rftReceiver = await collection.mintToken(alice, 10n, {Ethereum: receiverEth}); const tokenIdNonExist = 9999999; - + const tokenAddress1 = helper.ethAddress.fromTokenId(collection.collectionId, rftOwner.tokenId); const tokenAddress2 = helper.ethAddress.fromTokenId(collection.collectionId, rftReceiver.tokenId); const tokenAddressNonExist = helper.ethAddress.fromTokenId(collection.collectionId, tokenIdNonExist); - const tokenEvmOwner = helper.ethNativeContract.rftToken(tokenAddress1, owner); - const tokenEvmReceiver = helper.ethNativeContract.rftToken(tokenAddress2, owner); - const tokenEvmNonExist = helper.ethNativeContract.rftToken(tokenAddressNonExist, owner); - + const tokenEvmOwner = await helper.ethNativeContract.rftToken(tokenAddress1, owner); + const tokenEvmReceiver = await helper.ethNativeContract.rftToken(tokenAddress2, owner); + const tokenEvmNonExist = await helper.ethNativeContract.rftToken(tokenAddressNonExist, owner); + // 1. Can transfer zero amount (EIP-20): await tokenEvmOwner.methods[testCase](isCross ? receiverCrossEth : receiverEth, 0).send({from: owner}); // 2. Cannot transfer non-owned token: @@ -397,7 +397,7 @@ const {tokenId} = await collection.mintToken(alice, 100n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); await contract.methods.repartition(200).send({from: owner}); expect(+await contract.methods.balanceOf(owner).call()).to.be.equal(200); @@ -422,7 +422,7 @@ const {tokenId} = await collection.mintToken(alice, 100n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); const result = await contract.methods.repartition(200).send(); @@ -439,7 +439,7 @@ const {tokenId} = await collection.mintToken(alice, 100n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); const result = await contract.methods.repartition(50).send(); const event = result.events.Transfer; @@ -453,12 +453,12 @@ const caller = await helper.eth.createAccountWithBalance(donor); const receiver = await helper.eth.createAccountWithBalance(donor); const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(caller, 'Devastation', '6', '6'); - const contract = helper.ethNativeContract.collection(collectionAddress, 'rft', caller); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'rft', caller); const result = await contract.methods.mint(caller).send(); const tokenId = result.events.Transfer.returnValues.tokenId; const tokenAddress = helper.ethAddress.fromTokenId(collectionId, tokenId); - const tokenContract = helper.ethNativeContract.rftToken(tokenAddress, caller); + const tokenContract = await helper.ethNativeContract.rftToken(tokenAddress, caller); await tokenContract.methods.repartition(2).send(); await tokenContract.methods.transfer(receiver, 1).send(); @@ -476,26 +476,26 @@ expect(event.returnValues.to).to.be.equal(receiver); expect(event.returnValues.tokenId).to.be.equal(tokenId); }); - + itEth('Can perform burnFromCross()', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const ownerSub = (await helper.arrange.createAccounts([10n], donor))[0]; const ownerCross = helper.ethCrossAccount.fromAddress(owner); const spender = await helper.eth.createAccountWithBalance(donor); - + const spenderCrossEth = helper.ethCrossAccount.fromAddress(spender); const ownerSubCross = helper.ethCrossAccount.fromKeyringPair(ownerSub); const collection = await helper.rft.mintCollection(alice); const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: owner}); - + const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); { await contract.methods.approveCross(spenderCrossEth, 100).send({from: owner}); - + await expect(contract.methods.burnFromCross(ownerCross, 50).send({from: spender})).to.be.fulfilled; await expect(contract.methods.burnFromCross(ownerCross, 100).send({from: spender})).to.be.rejected; expect(await contract.methods.balanceOf(owner).call({from: owner})).to.be.equal('150'); @@ -504,8 +504,8 @@ const {tokenId} = await collection.mintToken(alice, 200n, {Substrate: ownerSub.address}); await collection.approveToken(ownerSub, tokenId, {Ethereum: spender}, 100n); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); - + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); + await expect(contract.methods.burnFromCross(ownerSubCross, 50).send({from: spender})).to.be.fulfilled; await expect(contract.methods.burnFromCross(ownerSubCross, 100).send({from: spender})).to.be.rejected; expect(await collection.getTokenBalance(tokenId, {Substrate: ownerSub.address})).to.be.equal(150n); @@ -533,7 +533,7 @@ const {tokenId} = await collection.mintToken(alice, 100n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); const cost = await helper.eth.recordCallFee(owner, () => contract.methods.approve(spender, 100).send({from: owner})); expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))); @@ -546,7 +546,7 @@ const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); await contract.methods.approve(spender, 100).send({from: owner}); @@ -561,7 +561,7 @@ const {tokenId} = await collection.mintToken(alice, 200n, {Ethereum: owner}); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const contract = await helper.ethNativeContract.rftToken(tokenAddress, owner); const cost = await helper.eth.recordCallFee(owner, () => contract.methods.transfer(receiver, 100).send({from: owner})); expect(cost < BigInt(0.2 * Number(helper.balance.getOneTokenNominal()))); @@ -587,7 +587,7 @@ const token = await collection.mintToken(alice, 200n); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, token.tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress); + const contract = await helper.ethNativeContract.rftToken(tokenAddress); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -613,7 +613,7 @@ await token.approve(alice, {Substrate: bob.address}, 100n); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, token.tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress); + const contract = await helper.ethNativeContract.rftToken(tokenAddress); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -644,7 +644,7 @@ const token = await collection.mintToken(alice, 200n); const tokenAddress = helper.ethAddress.fromTokenId(collection.collectionId, token.tokenId); - const contract = helper.ethNativeContract.rftToken(tokenAddress); + const contract = await helper.ethNativeContract.rftToken(tokenAddress); const events: any = []; contract.events.allEvents((_: any, event: any) => { @@ -678,13 +678,13 @@ const owner = await helper.eth.createAccountWithBalance(donor); const {collectionId, collectionAddress} = await helper.eth.createRFTCollection(owner, 'Sands', '', 'GRAIN'); - const collectionContract = helper.ethNativeContract.collection(collectionAddress, 'rft', owner); + const collectionContract = await helper.ethNativeContract.collection(collectionAddress, 'rft', owner); const result = await collectionContract.methods.mint(owner).send(); const tokenId = result.events.Transfer.returnValues.tokenId; const tokenAddress = helper.ethAddress.fromTokenId(collectionId, tokenId); - const tokenContract = helper.ethNativeContract.rftToken(tokenAddress, owner); + const tokenContract = await helper.ethNativeContract.rftToken(tokenAddress, owner); expect(await tokenContract.methods.parentToken().call()).to.be.equal(collectionAddress); expect(await tokenContract.methods.parentTokenId().call()).to.be.equal(tokenId); --- a/tests/src/eth/sponsoring.test.ts +++ b/tests/src/eth/sponsoring.test.ts @@ -37,11 +37,11 @@ const flipper = await helper.eth.deployFlipper(owner); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); await helpers.methods.toggleAllowlist(flipper.options.address, true).send({from: owner}); await helpers.methods.toggleAllowed(flipper.options.address, caller, true).send({from: owner}); - + await helpers.methods.setSponsor(flipper.options.address, sponsor).send({from: owner}); await helpers.methods.confirmSponsorship(flipper.options.address).send({from: sponsor}); @@ -71,7 +71,7 @@ const collector = await helper.eth.deployCollectorContract(owner); - const helpers = helper.ethNativeContract.contractHelpers(owner); + const helpers = await helper.ethNativeContract.contractHelpers(owner); await helpers.methods.toggleAllowlist(collector.options.address, true).send({from: owner}); await helpers.methods.toggleAllowed(collector.options.address, caller, true).send({from: owner}); --- a/tests/src/eth/tokenProperties.test.ts +++ b/tests/src/eth/tokenProperties.test.ts @@ -47,12 +47,12 @@ await collection.methods.setTokenPropertyPermissions([ ['testKey', [ - [EthTokenPermissions.Mutable, mutable], - [EthTokenPermissions.TokenOwner, tokenOwner], + [EthTokenPermissions.Mutable, mutable], + [EthTokenPermissions.TokenOwner, tokenOwner], [EthTokenPermissions.CollectionAdmin, collectionAdmin]], ], ]).send({from: caller.eth}); - + expect(await helper[testCase.mode].getPropertyPermissions(collectionId)).to.be.deep.equal([{ key: 'testKey', permission: {mutable, collectionAdmin, tokenOwner}, @@ -60,8 +60,8 @@ expect(await collection.methods.tokenPropertyPermissions().call({from: caller.eth})).to.be.like([ ['testKey', [ - [EthTokenPermissions.Mutable.toString(), mutable], - [EthTokenPermissions.TokenOwner.toString(), tokenOwner], + [EthTokenPermissions.Mutable.toString(), mutable], + [EthTokenPermissions.TokenOwner.toString(), tokenOwner], [EthTokenPermissions.CollectionAdmin.toString(), collectionAdmin]], ], ]); @@ -74,28 +74,28 @@ ].map(testCase => itEth.ifWithPallets(`[${testCase.mode}] Can set multiple token property permissions as owner`, testCase.requiredPallets, async({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - + const {collectionId, collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); await collection.methods.setTokenPropertyPermissions([ ['testKey_0', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, true]], ], ['testKey_1', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, false], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, false], [EthTokenPermissions.CollectionAdmin, true]], ], ['testKey_2', [ - [EthTokenPermissions.Mutable, false], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, false], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, false]], ], ]).send({from: owner}); - + expect(await helper[testCase.mode].getPropertyPermissions(collectionId)).to.be.deep.equal([ { key: 'testKey_0', @@ -113,18 +113,18 @@ expect(await collection.methods.tokenPropertyPermissions().call({from: owner})).to.be.like([ ['testKey_0', [ - [EthTokenPermissions.Mutable.toString(), true], - [EthTokenPermissions.TokenOwner.toString(), true], + [EthTokenPermissions.Mutable.toString(), true], + [EthTokenPermissions.TokenOwner.toString(), true], [EthTokenPermissions.CollectionAdmin.toString(), true]], ], ['testKey_1', [ - [EthTokenPermissions.Mutable.toString(), true], - [EthTokenPermissions.TokenOwner.toString(), false], + [EthTokenPermissions.Mutable.toString(), true], + [EthTokenPermissions.TokenOwner.toString(), false], [EthTokenPermissions.CollectionAdmin.toString(), true]], ], ['testKey_2', [ - [EthTokenPermissions.Mutable.toString(), false], - [EthTokenPermissions.TokenOwner.toString(), true], + [EthTokenPermissions.Mutable.toString(), false], + [EthTokenPermissions.TokenOwner.toString(), true], [EthTokenPermissions.CollectionAdmin.toString(), false]], ], ]); @@ -137,29 +137,29 @@ itEth.ifWithPallets(`[${testCase.mode}] Can set multiple token property permissions as admin`, testCase.requiredPallets, async({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const caller = await helper.ethCrossAccount.createAccountWithBalance(donor); - + const {collectionId, collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); + const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); await collection.methods.addCollectionAdminCross(caller).send({from: owner}); await collection.methods.setTokenPropertyPermissions([ ['testKey_0', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, true]], ], ['testKey_1', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, false], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, false], [EthTokenPermissions.CollectionAdmin, true]], ], ['testKey_2', [ - [EthTokenPermissions.Mutable, false], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, false], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, false]], ], ]).send({from: caller.eth}); - + expect(await helper[testCase.mode].getPropertyPermissions(collectionId)).to.be.deep.equal([ { key: 'testKey_0', @@ -177,22 +177,22 @@ expect(await collection.methods.tokenPropertyPermissions().call({from: caller.eth})).to.be.like([ ['testKey_0', [ - [EthTokenPermissions.Mutable.toString(), true], - [EthTokenPermissions.TokenOwner.toString(), true], + [EthTokenPermissions.Mutable.toString(), true], + [EthTokenPermissions.TokenOwner.toString(), true], [EthTokenPermissions.CollectionAdmin.toString(), true]], ], ['testKey_1', [ - [EthTokenPermissions.Mutable.toString(), true], - [EthTokenPermissions.TokenOwner.toString(), false], + [EthTokenPermissions.Mutable.toString(), true], + [EthTokenPermissions.TokenOwner.toString(), false], [EthTokenPermissions.CollectionAdmin.toString(), true]], ], ['testKey_2', [ - [EthTokenPermissions.Mutable.toString(), false], - [EthTokenPermissions.TokenOwner.toString(), true], + [EthTokenPermissions.Mutable.toString(), false], + [EthTokenPermissions.TokenOwner.toString(), true], [EthTokenPermissions.CollectionAdmin.toString(), false]], ], ]); - + })); [ @@ -202,11 +202,11 @@ expectedProps: [{key: 'testKey1', value: 'testValue1'}, {key: 'testKey2', value: 'testValue2'}], }, { - method: 'setProperty' /*Soft-deprecated*/, + method: 'setProperty' /*Soft-deprecated*/, methodParams: ['testKey1', Buffer.from('testValue1')], expectedProps: [{key: 'testKey1', value: 'testValue1'}], }, - ].map(testCase => + ].map(testCase => itEth(`[${testCase.method}] Can be set`, async({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); const collection = await helper.nft.mintCollection(alice, { @@ -225,61 +225,61 @@ await collection.addAdmin(alice, {Ethereum: caller}); const token = await collection.mintToken(alice); - - const collectionEvm = helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller, testCase.method === 'setProperty'); - + + const collectionEvm = await helper.ethNativeContract.collectionById(collection.collectionId, 'nft', caller, testCase.method === 'setProperty'); + await collectionEvm.methods[testCase.method](token.tokenId, ...testCase.methodParams).send({from: caller}); - + const properties = await token.getProperties(); expect(properties).to.deep.equal(testCase.expectedProps); })); - + [ {mode: 'nft' as const, requiredPallets: []}, {mode: 'rft' as const, requiredPallets: [Pallets.ReFungible]}, - ].map(testCase => + ].map(testCase => itEth.ifWithPallets(`Can be multiple set/read for ${testCase.mode}`, testCase.requiredPallets, async({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); - + const properties = Array(5).fill(0).map((_, i) => { return {key: `key_${i}`, value: Buffer.from(`value_${i}`)}; }); const permissions: ITokenPropertyPermission[] = properties.map(p => { return {key: p.key, permission: {tokenOwner: true, collectionAdmin: true, mutable: true}}; }); - + const collection = await helper[testCase.mode].mintCollection(alice, { tokenPrefix: 'ethp', tokenPropertyPermissions: permissions, }) as UniqueNFTCollection | UniqueRFTCollection; - + const token = await collection.mintToken(alice); - + const valuesBefore = await token.getProperties(properties.map(p => p.key)); expect(valuesBefore).to.be.deep.equal([]); - - + + await collection.addAdmin(alice, {Ethereum: caller}); - + const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, testCase.mode, caller); - + const contract = await helper.ethNativeContract.collection(address, testCase.mode, caller); + expect(await contract.methods.properties(token.tokenId, []).call()).to.be.deep.equal([]); - + await contract.methods.setProperties(token.tokenId, properties).send({from: caller}); - + const values = await token.getProperties(properties.map(p => p.key)); expect(values).to.be.deep.equal(properties.map(p => { return {key: p.key, value: p.value.toString()}; })); - + expect(await contract.methods.properties(token.tokenId, []).call()).to.be.like(properties .map(p => { return helper.ethProperty.property(p.key, p.value.toString()); })); - + expect(await contract.methods.properties(token.tokenId, [properties[0].key]).call()) .to.be.like([helper.ethProperty.property(properties[0].key, properties[0].value.toString())]); })); - + [ {mode: 'nft' as const, requiredPallets: []}, {mode: 'rft' as const, requiredPallets: [Pallets.ReFungible]}, - ].map(testCase => + ].map(testCase => itEth.ifWithPallets(`Can be deleted for ${testCase.mode}`, testCase.requiredPallets, async({helper}) => { const caller = await helper.eth.createAccountWithBalance(donor); const collection = await helper[testCase.mode].mintCollection(alice, { @@ -298,7 +298,7 @@ }, }], }); - + const token = await collection.mintToken(alice); await token.setProperties(alice, [{key: 'testKey', value: 'testValue'}, {key: 'testKey_1', value: 'testValue_1'}]); expect(await token.getProperties()).to.has.length(2); @@ -306,7 +306,7 @@ await collection.addAdmin(alice, {Ethereum: caller}); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, testCase.mode, caller); + const contract = await helper.ethNativeContract.collection(address, testCase.mode, caller); await contract.methods.deleteProperties(token.tokenId, ['testKey', 'testKey_1']).send({from: caller}); @@ -324,12 +324,12 @@ }, }], }); - + const token = await collection.mintToken(alice); await token.setProperties(alice, [{key: 'testKey', value: 'testValue'}]); const address = helper.ethAddress.fromCollectionId(collection.collectionId); - const contract = helper.ethNativeContract.collection(address, 'nft', caller); + const contract = await helper.ethNativeContract.collection(address, 'nft', caller); const value = await contract.methods.property(token.tokenId, 'testKey').call(); expect(value).to.equal(helper.getWeb3().utils.toHex('testValue')); @@ -371,10 +371,10 @@ collectionAdmin: true, }, }], - }); + }); token = await aliceCollection.mintToken(alice); await token.setProperties(alice, tokenProps); - collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, true); + collectionEvm = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, true); }); }); @@ -384,7 +384,7 @@ ].map(testCase => itEth(`[${testCase.method}] Cannot set properties of non-owned collection`, async ({helper}) => { caller = await helper.eth.createAccountWithBalance(donor); - collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, true); + collectionEvm = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, true); // Caller not an owner and not an admin, so he cannot set properties: await expect(collectionEvm.methods[testCase.method](token.tokenId, ...testCase.methodParams).call({from: caller})).to.be.rejectedWith('NoPermission'); await expect(collectionEvm.methods[testCase.method](token.tokenId, ...testCase.methodParams).send({from: caller})).to.be.rejected; @@ -401,7 +401,7 @@ ].map(testCase => itEth(`[${testCase.method}] Cannot set non-existing properties`, async ({helper}) => { caller = await helper.eth.createAccountWithBalance(donor); - collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, true); + collectionEvm = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, true); await helper.collection.addAdmin(alice, aliceCollection.collectionId, {Ethereum: caller}); await expect(collectionEvm.methods[testCase.method](token.tokenId, ...testCase.methodParams).call({from: caller})).to.be.rejectedWith('NoPermission'); @@ -416,10 +416,10 @@ [ {method: 'deleteProperty', methodParams: ['testKey_2']}, {method: 'deleteProperties', methodParams: [['testKey_2']]}, - ].map(testCase => + ].map(testCase => itEth(`[${testCase.method}] Cannot delete properties of non-owned collection`, async ({helper}) => { caller = await helper.eth.createAccountWithBalance(donor); - collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, testCase.method == 'deleteProperty'); + collectionEvm = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, testCase.method == 'deleteProperty'); // Caller not an owner and not an admin, so he cannot set properties: await expect(collectionEvm.methods[testCase.method](token.tokenId, ...testCase.methodParams).call({from: caller})).to.be.rejectedWith('NoPermission'); await expect(collectionEvm.methods[testCase.method](token.tokenId, ...testCase.methodParams).send({from: caller})).to.be.rejected; @@ -429,14 +429,14 @@ const actualProps = await collectionEvm.methods.properties(token.tokenId, []).call(); expect(actualProps).to.deep.eq(expectedProps); })); - + [ {method: 'deleteProperty', methodParams: ['testKey_3']}, {method: 'deleteProperties', methodParams: [['testKey_3']]}, - ].map(testCase => + ].map(testCase => itEth(`[${testCase.method}] Cannot delete non-existing properties`, async ({helper}) => { caller = await helper.eth.createAccountWithBalance(donor); - collectionEvm = helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, testCase.method == 'deleteProperty'); + collectionEvm = await helper.ethNativeContract.collection(helper.ethAddress.fromCollectionId(aliceCollection.collectionId), 'nft', caller, testCase.method == 'deleteProperty'); await helper.collection.addAdmin(alice, aliceCollection.collectionId, {Ethereum: caller}); // Caller cannot delete non-existing properties: await expect(collectionEvm.methods[testCase.method](token.tokenId, ...testCase.methodParams).call({from: caller})).to.be.rejectedWith('NoPermission'); @@ -454,17 +454,17 @@ itEth.ifWithPallets(`[${testCase.mode}] Cannot set token property permissions as non owner or admin`, testCase.requiredPallets, async({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const caller = await helper.eth.createAccountWithBalance(donor); - + const {collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); - + const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); + await expect(collection.methods.setTokenPropertyPermissions([ ['testKey_0', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, true]], ], - ]).call({from: caller})).to.be.rejectedWith('NoPermission'); + ]).call({from: caller})).to.be.rejectedWith('NoPermission'); })); [ @@ -473,18 +473,18 @@ ].map(testCase => itEth.ifWithPallets(`[${testCase.mode}] Cannot set token property permissions with invalid character`, testCase.requiredPallets, async({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - + const {collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); - + const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); + await expect(collection.methods.setTokenPropertyPermissions([ // "Space" is invalid character ['testKey 0', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, true]], ], - ]).call({from: owner})).to.be.rejectedWith('InvalidCharacterInPropertyKey'); + ]).call({from: owner})).to.be.rejectedWith('InvalidCharacterInPropertyKey'); })); [ @@ -493,25 +493,25 @@ ].map(testCase => itEth.ifWithPallets(`[${testCase.mode}] Can reconfigure token property permissions to stricter ones`, testCase.requiredPallets, async({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - + const {collectionAddress, collectionId} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); - + const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); + // 1. Owner sets strict property-permissions: await collection.methods.setTokenPropertyPermissions([ ['testKey', [ - [EthTokenPermissions.Mutable, true], - [EthTokenPermissions.TokenOwner, true], + [EthTokenPermissions.Mutable, true], + [EthTokenPermissions.TokenOwner, true], [EthTokenPermissions.CollectionAdmin, true]], ], ]).send({from: owner}); - + // 2. Owner can set stricter property-permissions: for(const values of [[true, true, false], [true, false, false], [false, false, false]]) { await collection.methods.setTokenPropertyPermissions([ ['testKey', [ - [EthTokenPermissions.Mutable, values[0]], - [EthTokenPermissions.TokenOwner, values[1]], + [EthTokenPermissions.Mutable, values[0]], + [EthTokenPermissions.TokenOwner, values[1]], [EthTokenPermissions.CollectionAdmin, values[2]]], ], ]).send({from: owner}); @@ -529,15 +529,15 @@ ].map(testCase => itEth.ifWithPallets(`[${testCase.mode}] Cannot reconfigure token property permissions to less strict ones`, testCase.requiredPallets, async({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); - + const {collectionAddress} = await helper.eth.createCollection(testCase.mode, owner, 'A', 'B', 'C'); - const collection = helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); - + const collection = await helper.ethNativeContract.collection(collectionAddress, testCase.mode, owner); + // 1. Owner sets strict property-permissions: await collection.methods.setTokenPropertyPermissions([ ['testKey', [ - [EthTokenPermissions.Mutable, false], - [EthTokenPermissions.TokenOwner, false], + [EthTokenPermissions.Mutable, false], + [EthTokenPermissions.TokenOwner, false], [EthTokenPermissions.CollectionAdmin, false]], ], ]).send({from: owner}); @@ -546,8 +546,8 @@ for(const values of [[true, false, false], [false, true, false], [false, false, true]]) { await expect(collection.methods.setTokenPropertyPermissions([ ['testKey', [ - [EthTokenPermissions.Mutable, values[0]], - [EthTokenPermissions.TokenOwner, values[1]], + [EthTokenPermissions.Mutable, values[0]], + [EthTokenPermissions.TokenOwner, values[1]], [EthTokenPermissions.CollectionAdmin, values[2]]], ], ]).call({from: owner})).to.be.rejectedWith('NoPermission'); --- a/tests/src/eth/util/playgrounds/unique.dev.ts +++ b/tests/src/eth/util/playgrounds/unique.dev.ts @@ -35,12 +35,42 @@ class EthGroupBase { helper: EthUniqueHelper; + gasPrice?: string; constructor(helper: EthUniqueHelper) { this.helper = helper; } + async getGasPrice() { + if (this.gasPrice) + return this.gasPrice; + this.gasPrice = await this.helper.getWeb3().eth.getGasPrice(); + return this.gasPrice; + } } +function unlimitedMoneyHack(_contract: C): C { + const contract = _contract as any; + // Hack: fight against gasPrice override + for (const method in contract.methods) { + const _method = contract.methods[method]; + contract.methods[method] = function (...args: any) { + const encodedCall = _method.call(this, ...args); + const _call = encodedCall.call; + encodedCall.call = function (...args: any) { + if (args.length === 0) { + return _call.call(this, {gasPrice: '0'}); + } + // No support for callback/defaultBlock, they may be placed as first argument + if (typeof args[0] !== 'object') + throw new Error('only options are supported'); + args[0].gasPrice = '0'; + return _call.call(this, ...args); + }; + return encodedCall; + }; + } + return contract; +} class ContractGroup extends EthGroupBase { async findImports(imports?: ContractImports[]){ @@ -81,7 +111,7 @@ && compiled.errors.some(function(err: any) { return err.severity == 'error'; }); - + if (hasErrors) { throw compiled.errors; } @@ -104,25 +134,34 @@ data: object, from: signer, gas: gas ?? this.helper.eth.DEFAULT_GAS, + gasPrice: await this.getGasPrice(), }); - return await contract.deploy({data: object}).send({from: signer}); + return unlimitedMoneyHack(await contract.deploy({data: object}).send({from: signer})); } } class NativeContractGroup extends EthGroupBase { - contractHelpers(caller: string): Contract { + async contractHelpers(caller: string): Promise { const web3 = this.helper.getWeb3(); - return new web3.eth.Contract(contractHelpersAbi as any, this.helper.getApi().consts.evmContractHelpers.contractAddress.toString(), {from: caller, gas: this.helper.eth.DEFAULT_GAS}); + return unlimitedMoneyHack(new web3.eth.Contract(contractHelpersAbi as any, this.helper.getApi().consts.evmContractHelpers.contractAddress.toString(), { + from: caller, + gas: this.helper.eth.DEFAULT_GAS, + gasPrice: await this.getGasPrice(), + })); } - collectionHelpers(caller: string) { + async collectionHelpers(caller: string) { const web3 = this.helper.getWeb3(); - return new web3.eth.Contract(collectionHelpersAbi as any, this.helper.getApi().consts.common.contractAddress.toString(), {from: caller, gas: this.helper.eth.DEFAULT_GAS}); + return unlimitedMoneyHack(new web3.eth.Contract(collectionHelpersAbi as any, this.helper.getApi().consts.common.contractAddress.toString(), { + from: caller, + gas: this.helper.eth.DEFAULT_GAS, + gasPrice: await this.getGasPrice(), + })); } - collection(address: string, mode: TCollectionMode, caller?: string, mergeDeprecated = false): Contract { + async collection(address: string, mode: TCollectionMode, caller?: string, mergeDeprecated = false) { let abi = { 'nft': nonFungibleAbi, 'rft': refungibleAbi, @@ -137,19 +176,27 @@ abi = [...abi,...deprecated]; } const web3 = this.helper.getWeb3(); - return new web3.eth.Contract(abi as any, address, {gas: this.helper.eth.DEFAULT_GAS, ...(caller ? {from: caller} : {})}); + return unlimitedMoneyHack(new web3.eth.Contract(abi as any, address, { + gas: this.helper.eth.DEFAULT_GAS, + gasPrice: await this.getGasPrice(), + ...(caller ? {from: caller} : {}), + })); } - collectionById(collectionId: number, mode: 'nft' | 'rft' | 'ft', caller?: string, mergeDeprecated = false): Contract { + collectionById(collectionId: number, mode: 'nft' | 'rft' | 'ft', caller?: string, mergeDeprecated = false) { return this.collection(this.helper.ethAddress.fromCollectionId(collectionId), mode, caller, mergeDeprecated); } - rftToken(address: string, caller?: string): Contract { + async rftToken(address: string, caller?: string) { const web3 = this.helper.getWeb3(); - return new web3.eth.Contract(refungibleTokenAbi as any, address, {gas: this.helper.eth.DEFAULT_GAS, ...(caller ? {from: caller} : {})}); + return unlimitedMoneyHack(new web3.eth.Contract(refungibleTokenAbi as any, address, { + gas: this.helper.eth.DEFAULT_GAS, + gasPrice: await this.getGasPrice(), + ...(caller ? {from: caller} : {}), + })); } - rftTokenById(collectionId: number, tokenId: number, caller?: string): Contract { + rftTokenById(collectionId: number, tokenId: number, caller?: string) { return this.rftToken(this.helper.ethAddress.fromTokenId(collectionId, tokenId), caller); } } @@ -177,7 +224,7 @@ } async getCollectionCreationFee(signer: string) { - const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer); + const collectionHelper = await this.helper.ethNativeContract.collectionHelpers(signer); return await collectionHelper.methods.collectionCreationFee().call(); } @@ -210,7 +257,7 @@ async createCollection(mode: TCollectionMode, signer: string, name: string, description: string, tokenPrefix: string, decimals = 18): Promise<{ collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> { const collectionCreationPrice = this.helper.balance.getCollectionCreationPrice(); - const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer); + const collectionHelper = await this.helper.ethNativeContract.collectionHelpers(signer); const functionName: string = this.createCollectionMethodName(mode); const functionParams = mode === 'ft' ? [name, decimals, description, tokenPrefix] : [name, description, tokenPrefix]; @@ -228,7 +275,7 @@ } async createERC721MetadataCompatibleNFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> { - const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer); + const collectionHelper = await this.helper.ethNativeContract.collectionHelpers(signer); const {collectionId, collectionAddress, events} = await this.createCollection('nft', signer, name, description, tokenPrefix); @@ -246,7 +293,7 @@ } async createERC721MetadataCompatibleRFTCollection(signer: string, name: string, description: string, tokenPrefix: string, baseUri: string): Promise<{collectionId: number, collectionAddress: string, events: NormalizedEvent[] }> { - const collectionHelper = this.helper.ethNativeContract.collectionHelpers(signer); + const collectionHelper = await this.helper.ethNativeContract.collectionHelpers(signer); const {collectionId, collectionAddress, events} = await this.createCollection('rft', signer, name, description, tokenPrefix); --- a/tests/src/maintenanceMode.seqtest.ts +++ b/tests/src/maintenanceMode.seqtest.ts @@ -128,7 +128,7 @@ // Unable to mint an RFT when the MM is enabled await expect(rftCollection.mintToken(superuser)) .to.be.rejectedWith(/Invalid Transaction: Transaction call is not expected/); - + await helper.getSudo().executeExtrinsic(superuser, 'api.tx.maintenance.disable', []); expect(await maintenanceEnabled(helper.getApi()), 'MM is ON when it should be OFF').to.be.false; @@ -191,7 +191,7 @@ // Schedule a transaction that should occur *during* the maintenance await nftDuringMM.scheduleAfter(blocksToWait, {scheduledId: scheduledIdDuringMM}) .transfer(bob, {Substrate: superuser.address}); - + // Schedule a transaction that should occur *after* the maintenance await nftDuringMM.scheduleAfter(blocksToWait * 2, {scheduledId: scheduledIdBunkerThroughMM}) .transfer(bob, {Substrate: superuser.address}); @@ -214,7 +214,7 @@ // Scheduling works after the maintenance await nftAfterMM.scheduleAfter(blocksToWait, {scheduledId: scheduledIdAfterMM}) .transfer(bob, {Substrate: superuser.address}); - + await helper.wait.newBlocks(blocksToWait + 1); expect(await nftAfterMM.getOwner()).to.be.deep.equal({Substrate: superuser.address}); @@ -225,14 +225,14 @@ itEth('Disallows Ethereum transactions to execute while in maintenance', async ({helper}) => { const owner = await helper.eth.createAccountWithBalance(donor); const receiver = helper.eth.createAccount(); - + const {collectionAddress} = await helper.eth.createERC721MetadataCompatibleNFTCollection(owner, 'A', 'B', 'C', ''); // Set maintenance mode await helper.getSudo().executeExtrinsic(superuser, 'api.tx.maintenance.enable', []); expect(await maintenanceEnabled(helper.getApi()), 'MM is OFF when it should be ON').to.be.true; - const contract = helper.ethNativeContract.collection(collectionAddress, 'nft', owner); + const contract = await helper.ethNativeContract.collection(collectionAddress, 'nft', owner); const tokenId = await contract.methods.nextTokenId().call(); expect(tokenId).to.be.equal('1'); --- a/tests/yarn.lock +++ b/tests/yarn.lock @@ -4811,7 +4811,7 @@ randombytes "^2.1.0" utf8 "3.0.0" -web3@^1.8.0: +web3@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/web3/-/web3-1.8.1.tgz#8ea67215ef5f3a6f6d3381800b527242ea22885a" integrity sha512-tAqFsQhGv340C9OgRJIuoScN7f7wa1tUvsnnDUMt9YE6J4gcm7TV2Uwv+KERnzvV+xgdeuULYpsioRRNKrUvoQ== -- gitstuff