diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f3099bc8..ea0226b1c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,30 @@
All notable changes to this project will be documented in this file.
+## [0.6.0] - 2024-12-18
+
+### 🚀 Features
+
+- Wallet integration (#371)
+- Guide user to call a chain (#316)
+- Guide user to call a contract (#306)
+- Call chain events (#372)
+- Add remark action (#387)
+
+### 🐛 Fixes
+
+- Build spec experience (#331)
+
+### 🚜 Refactor
+
+- Ensure short args consistency (#386)
+
+### ⚙️ Miscellaneous Tasks
+
+- Bump zombienet version to `v0.2.18` (#352)
+- Set msrv (#385)
+- Replace rococo to paseo name (#333)
+
## [0.5.0] - 2024-11-08
### 🚀 Features
diff --git a/Cargo.lock b/Cargo.lock
index bb211c82e..116d8a625 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
+version = 4
[[package]]
name = "Inflector"
@@ -724,7 +724,7 @@ dependencies = [
"parachains-runtimes-test-utils",
"parity-scale-codec",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-parachain-info",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -749,7 +749,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-api",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -938,6 +938,61 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
+[[package]]
+name = "axum"
+version = "0.7.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f"
+dependencies = [
+ "async-trait",
+ "axum-core",
+ "bytes",
+ "futures-util",
+ "http 1.2.0",
+ "http-body 1.0.1",
+ "http-body-util",
+ "hyper 1.5.2",
+ "hyper-util",
+ "itoa",
+ "matchit",
+ "memchr",
+ "mime",
+ "percent-encoding",
+ "pin-project-lite",
+ "rustversion",
+ "serde",
+ "serde_json",
+ "serde_path_to_error",
+ "serde_urlencoded",
+ "sync_wrapper 1.0.2",
+ "tokio",
+ "tower 0.5.2",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
+[[package]]
+name = "axum-core"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199"
+dependencies = [
+ "async-trait",
+ "bytes",
+ "futures-util",
+ "http 1.2.0",
+ "http-body 1.0.1",
+ "http-body-util",
+ "mime",
+ "pin-project-lite",
+ "rustversion",
+ "sync_wrapper 1.0.2",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
[[package]]
name = "backoff"
version = "0.4.0"
@@ -1192,7 +1247,7 @@ dependencies = [
"hex",
"http 1.2.0",
"http-body-util",
- "hyper 1.5.1",
+ "hyper 1.5.2",
"hyper-named-pipe",
"hyper-util",
"hyperlocal",
@@ -1203,7 +1258,7 @@ dependencies = [
"serde_json",
"serde_repr",
"serde_urlencoded",
- "thiserror 2.0.6",
+ "thiserror 2.0.8",
"tokio",
"tokio-util",
"tower-service",
@@ -1271,7 +1326,7 @@ dependencies = [
"serde",
"sp-consensus-grandpa",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -1306,7 +1361,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -1339,7 +1394,7 @@ dependencies = [
"scale-info",
"serde",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -1358,7 +1413,7 @@ dependencies = [
"pallet-utility",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -1379,7 +1434,7 @@ dependencies = [
"serde",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-state-machine 0.43.0",
"sp-std",
"sp-trie 37.0.0",
@@ -1402,7 +1457,7 @@ dependencies = [
"sp-application-crypto 38.0.0",
"sp-consensus-grandpa",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"sp-trie 37.0.0",
]
@@ -1434,7 +1489,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
]
@@ -1451,7 +1506,7 @@ dependencies = [
"scale-info",
"snowbridge-core",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
]
@@ -1493,7 +1548,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-keyring",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-tracing 17.0.1",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -1525,7 +1580,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"sp-trie 37.0.0",
"staging-xcm 14.2.0",
@@ -1552,9 +1607,9 @@ dependencies = [
[[package]]
name = "bstr"
-version = "1.11.0"
+version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22"
+checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8"
dependencies = [
"memchr",
"regex-automata 0.4.9",
@@ -1648,7 +1703,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
dependencies = [
"camino",
"cargo-platform",
- "semver 1.0.23",
+ "semver 1.0.24",
"serde",
"serde_json",
"thiserror 1.0.69",
@@ -1662,10 +1717,10 @@ checksum = "8769706aad5d996120af43197bf46ef6ad0fda35216b4505f926a365a232d924"
dependencies = [
"camino",
"cargo-platform",
- "semver 1.0.23",
+ "semver 1.0.24",
"serde",
"serde_json",
- "thiserror 2.0.6",
+ "thiserror 2.0.8",
]
[[package]]
@@ -1680,9 +1735,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.2.3"
+version = "1.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d"
+checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf"
dependencies = [
"jobserver",
"libc",
@@ -1823,12 +1878,12 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
[[package]]
name = "colored"
-version = "2.1.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8"
+checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
dependencies = [
"lazy_static",
- "windows-sys 0.48.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1858,15 +1913,15 @@ dependencies = [
[[package]]
name = "console"
-version = "0.15.8"
+version = "0.15.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
+checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b"
dependencies = [
"encode_unicode",
- "lazy_static",
"libc",
- "unicode-width 0.1.14",
- "windows-sys 0.52.0",
+ "once_cell",
+ "unicode-width 0.2.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -1948,9 +2003,9 @@ checksum = "cd7e35aee659887cbfb97aaf227ac12cad1a9d7c71e55ff3376839ed4e282d08"
[[package]]
name = "contract-build"
-version = "5.0.1"
+version = "5.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "857769855bf40d230e41baf6575cc44bd5e6869f69f88f45f6791da793f49a0c"
+checksum = "b014fa89030235ecd8bdeb061ec97df326281b484f89ad3e17a79f08759c2f52"
dependencies = [
"anyhow",
"blake2",
@@ -1967,7 +2022,7 @@ dependencies = [
"parity-scale-codec",
"regex",
"rustc_version 0.4.1",
- "semver 1.0.23",
+ "semver 1.0.24",
"serde",
"serde_json",
"strum 0.26.3",
@@ -1989,9 +2044,9 @@ dependencies = [
[[package]]
name = "contract-extrinsics"
-version = "5.0.1"
+version = "5.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e77ad38bef6454f97ca33481e960e9b105cb97f3794656071cbf50229445a89d"
+checksum = "67d0c91349c31caec4d5e3c544b4bc4fcc7c0468dc49ee84a96a24f915464401"
dependencies = [
"anyhow",
"blake2",
@@ -2022,13 +2077,13 @@ dependencies = [
[[package]]
name = "contract-metadata"
-version = "5.0.1"
+version = "5.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "733a6624ea05dd71050641c3cd9baff7a1445032a0082f0e55c800c078716424"
+checksum = "83ae8bcb5f7c5ea033d05fa0bbffa4e762a5b69c0ce96e4188fb15385a01998b"
dependencies = [
"anyhow",
"impl-serde 0.5.0",
- "semver 1.0.23",
+ "semver 1.0.24",
"serde",
"serde_json",
"url",
@@ -2036,9 +2091,9 @@ dependencies = [
[[package]]
name = "contract-transcode"
-version = "5.0.1"
+version = "5.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd9131028be7b8eefdd9151a0a682ed428c1418d5d1ec142c35d2dbe6b9653c6"
+checksum = "baca96dc859fd180eba5f15e468f59dc8c932a6b72f6b76f91b571b6743a9e7d"
dependencies = [
"anyhow",
"base58",
@@ -2058,7 +2113,7 @@ dependencies = [
"serde",
"serde_json",
"strsim 0.11.1",
- "thiserror 2.0.6",
+ "thiserror 2.0.8",
"tracing",
]
@@ -2220,9 +2275,9 @@ dependencies = [
[[package]]
name = "crossbeam-deque"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
+checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
@@ -2239,18 +2294,18 @@ dependencies = [
[[package]]
name = "crossbeam-queue"
-version = "0.3.11"
+version = "0.3.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35"
+checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
-version = "0.8.20"
+version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
+checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crossterm"
@@ -2355,7 +2410,7 @@ dependencies = [
"scale-info",
"sp-application-crypto 38.0.0",
"sp-consensus-aura",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -2372,7 +2427,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
]
@@ -2403,7 +2458,7 @@ dependencies = [
"sp-externalities 0.29.0",
"sp-inherents",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-state-machine 0.43.0",
"sp-std",
"sp-trie 37.0.0",
@@ -2436,7 +2491,7 @@ dependencies = [
"frame-system",
"pallet-session",
"parity-scale-codec",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -2452,7 +2507,7 @@ dependencies = [
"parity-scale-codec",
"polkadot-primitives 16.0.0",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -2467,7 +2522,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
]
@@ -2491,7 +2546,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -2509,7 +2564,7 @@ dependencies = [
"frame-system",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
]
@@ -2524,7 +2579,7 @@ dependencies = [
"polkadot-primitives 15.0.0",
"sp-api",
"sp-consensus-aura",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -2539,7 +2594,7 @@ dependencies = [
"polkadot-primitives 16.0.0",
"scale-info",
"sp-api",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-trie 37.0.0",
"staging-xcm 14.2.0",
]
@@ -2584,7 +2639,7 @@ dependencies = [
"log",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -2610,7 +2665,7 @@ dependencies = [
"pallet-asset-conversion",
"parity-scale-codec",
"polkadot-runtime-common",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -2625,7 +2680,7 @@ dependencies = [
"cumulus-primitives-core",
"parity-scale-codec",
"polkadot-primitives 16.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-state-machine 0.43.0",
"sp-trie 37.0.0",
]
@@ -2672,9 +2727,9 @@ dependencies = [
[[package]]
name = "cxx"
-version = "1.0.133"
+version = "1.0.135"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05e1ec88093d2abd9cf1b09ffd979136b8e922bf31cad966a8fe0d73233112ef"
+checksum = "4d44ff199ff93242c3afe480ab588d544dd08d72e92885e152ffebc670f076ad"
dependencies = [
"cc",
"cxxbridge-cmd",
@@ -2686,9 +2741,9 @@ dependencies = [
[[package]]
name = "cxx-build"
-version = "1.0.133"
+version = "1.0.135"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9afa390d956ee7ccb41aeed7ed7856ab3ffb4fc587e7216be7e0f83e949b4e6c"
+checksum = "66fd8f17ad454fc1e4f4ab83abffcc88a532e90350d3ffddcb73030220fcbd52"
dependencies = [
"cc",
"codespan-reporting",
@@ -2700,9 +2755,9 @@ dependencies = [
[[package]]
name = "cxxbridge-cmd"
-version = "1.0.133"
+version = "1.0.135"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c23bfff654d6227cbc83de8e059d2f8678ede5fc3a6c5a35d5c379983cc61e6"
+checksum = "4717c9c806a9e07fdcb34c84965a414ea40fafe57667187052cf1eb7f5e8a8a9"
dependencies = [
"clap",
"codespan-reporting",
@@ -2713,15 +2768,15 @@ dependencies = [
[[package]]
name = "cxxbridge-flags"
-version = "1.0.133"
+version = "1.0.135"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7c01b36e22051bc6928a78583f1621abaaf7621561c2ada1b00f7878fbe2caa"
+checksum = "2f6515329bf3d98f4073101c7866ff2bec4e635a13acb82e3f3753fff0bf43cb"
[[package]]
name = "cxxbridge-macro"
-version = "1.0.133"
+version = "1.0.135"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6e14013136fac689345d17b9a6df55977251f11d333c0a571e8d963b55e1f95"
+checksum = "fb93e6a7ce8ec985c02bbb758237a31598b340acbbc3c19c5a4fa6adaaac92ab"
dependencies = [
"proc-macro2",
"quote",
@@ -3196,9 +3251,9 @@ dependencies = [
[[package]]
name = "encode_unicode"
-version = "0.3.6"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
+checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
[[package]]
name = "encoding_rs"
@@ -3410,6 +3465,17 @@ dependencies = [
"bytes",
]
+[[package]]
+name = "fastrlp"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4"
+dependencies = [
+ "arrayvec 0.7.6",
+ "auto_impl",
+ "bytes",
+]
+
[[package]]
name = "ff"
version = "0.13.0"
@@ -3560,7 +3626,7 @@ dependencies = [
"sp-application-crypto 38.0.0",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-runtime-interface 28.0.0",
"sp-storage 21.0.0",
"static_assertions",
@@ -3578,7 +3644,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -3621,7 +3687,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-npos-elections",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -3639,7 +3705,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-tracing 17.0.1",
]
@@ -3680,7 +3746,7 @@ dependencies = [
"log",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -3715,7 +3781,7 @@ dependencies = [
"sp-inherents",
"sp-io 38.0.0",
"sp-metadata-ir",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
"sp-state-machine 0.43.0",
"sp-std",
@@ -3784,7 +3850,7 @@ dependencies = [
"serde",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"sp-version",
"sp-weights",
@@ -3802,7 +3868,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -3825,7 +3891,7 @@ dependencies = [
"frame-support",
"parity-scale-codec",
"sp-api",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -4267,11 +4333,11 @@ dependencies = [
[[package]]
name = "home"
-version = "0.5.9"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
+checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
dependencies = [
- "windows-sys 0.52.0",
+ "windows-sys 0.59.0",
]
[[package]]
@@ -4336,6 +4402,12 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f"
+[[package]]
+name = "http-range-header"
+version = "0.4.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c"
+
[[package]]
name = "httparse"
version = "1.9.5"
@@ -4365,9 +4437,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "hyper"
-version = "0.14.31"
+version = "0.14.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85"
+checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7"
dependencies = [
"bytes",
"futures-channel",
@@ -4389,9 +4461,9 @@ dependencies = [
[[package]]
name = "hyper"
-version = "1.5.1"
+version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f"
+checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0"
dependencies = [
"bytes",
"futures-channel",
@@ -4415,7 +4487,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73b7d8abf35697b81a825e386fc151e0d503e8cb5fcb93cc8669c376dfd6f278"
dependencies = [
"hex",
- "hyper 1.5.1",
+ "hyper 1.5.2",
"hyper-util",
"pin-project-lite",
"tokio",
@@ -4431,7 +4503,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590"
dependencies = [
"futures-util",
"http 0.2.12",
- "hyper 0.14.31",
+ "hyper 0.14.32",
"log",
"rustls 0.21.12",
"rustls-native-certs 0.6.3",
@@ -4441,15 +4513,15 @@ dependencies = [
[[package]]
name = "hyper-rustls"
-version = "0.27.3"
+version = "0.27.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333"
+checksum = "f6884a48c6826ec44f524c7456b163cebe9e55a18d7b5e307cb4f100371cc767"
dependencies = [
"futures-util",
"http 1.2.0",
- "hyper 1.5.1",
+ "hyper 1.5.2",
"hyper-util",
- "rustls 0.23.19",
+ "rustls 0.23.20",
"rustls-pki-types",
"tokio",
"tokio-rustls 0.26.1",
@@ -4462,7 +4534,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
dependencies = [
- "hyper 0.14.31",
+ "hyper 0.14.32",
"pin-project-lite",
"tokio",
"tokio-io-timeout",
@@ -4475,7 +4547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
dependencies = [
"bytes",
- "hyper 0.14.31",
+ "hyper 0.14.32",
"native-tls",
"tokio",
"tokio-native-tls",
@@ -4489,7 +4561,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
dependencies = [
"bytes",
"http-body-util",
- "hyper 1.5.1",
+ "hyper 1.5.2",
"hyper-util",
"native-tls",
"tokio",
@@ -4508,7 +4580,7 @@ dependencies = [
"futures-util",
"http 1.2.0",
"http-body 1.0.1",
- "hyper 1.5.1",
+ "hyper 1.5.2",
"pin-project-lite",
"socket2",
"tokio",
@@ -4524,7 +4596,7 @@ checksum = "986c5ce3b994526b3cd75578e62554abd09f0899d6206de48b3e96ab34ccc8c7"
dependencies = [
"hex",
"http-body-util",
- "hyper 1.5.1",
+ "hyper 1.5.2",
"hyper-util",
"pin-project-lite",
"tokio",
@@ -4975,6 +5047,15 @@ version = "2.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708"
+[[package]]
+name = "is-docker"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"
+dependencies = [
+ "once_cell",
+]
+
[[package]]
name = "is-terminal"
version = "0.4.13"
@@ -4986,6 +5067,16 @@ dependencies = [
"windows-sys 0.52.0",
]
+[[package]]
+name = "is-wsl"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"
+dependencies = [
+ "is-docker",
+ "once_cell",
+]
+
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
@@ -5117,7 +5208,7 @@ dependencies = [
"http 1.2.0",
"jsonrpsee-core",
"pin-project",
- "rustls 0.23.19",
+ "rustls 0.23.20",
"rustls-pki-types",
"rustls-platform-verifier",
"soketto",
@@ -5247,7 +5338,7 @@ dependencies = [
"home",
"http 0.2.12",
"http-body 0.4.6",
- "hyper 0.14.31",
+ "hyper 0.14.32",
"hyper-rustls 0.24.2",
"hyper-timeout",
"jsonpath-rust",
@@ -5266,8 +5357,8 @@ dependencies = [
"tokio",
"tokio-tungstenite",
"tokio-util",
- "tower",
- "tower-http",
+ "tower 0.4.13",
+ "tower-http 0.4.4",
"tracing",
]
@@ -5716,6 +5807,12 @@ dependencies = [
"regex-automata 0.1.10",
]
+[[package]]
+name = "matchit"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
+
[[package]]
name = "matrixmultiply"
version = "0.3.9"
@@ -5795,9 +5892,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
-version = "0.8.0"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
+checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394"
dependencies = [
"adler2",
]
@@ -5827,7 +5924,7 @@ dependencies = [
"http 1.2.0",
"http-body 1.0.1",
"http-body-util",
- "hyper 1.5.1",
+ "hyper 1.5.2",
"hyper-util",
"log",
"rand",
@@ -6126,6 +6223,17 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
+[[package]]
+name = "open"
+version = "5.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ecd52f0b8d15c40ce4820aa251ed5de032e5d91fab27f7db2f40d42a8bdf69c"
+dependencies = [
+ "is-wsl",
+ "libc",
+ "pathdiff",
+]
+
[[package]]
name = "openssl"
version = "0.10.68"
@@ -6238,7 +6346,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-crypto-hashing",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6257,7 +6365,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6276,7 +6384,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6291,7 +6399,7 @@ dependencies = [
"pallet-transaction-payment",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6306,7 +6414,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6324,7 +6432,7 @@ dependencies = [
"serde",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6341,7 +6449,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6357,7 +6465,7 @@ dependencies = [
"pallet-assets",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6372,7 +6480,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6389,7 +6497,7 @@ dependencies = [
"scale-info",
"sp-application-crypto 38.0.0",
"sp-consensus-aura",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6405,7 +6513,7 @@ dependencies = [
"scale-info",
"sp-application-crypto 38.0.0",
"sp-authority-discovery",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6419,7 +6527,7 @@ dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6441,7 +6549,7 @@ dependencies = [
"sp-consensus-babe",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-session",
"sp-staking 36.0.0",
]
@@ -6464,7 +6572,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-tracing 17.0.1",
]
@@ -6481,7 +6589,7 @@ dependencies = [
"log",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6499,7 +6607,7 @@ dependencies = [
"scale-info",
"serde",
"sp-consensus-beefy",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-session",
"sp-staking 36.0.0",
]
@@ -6526,7 +6634,7 @@ dependencies = [
"sp-consensus-beefy",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-state-machine 0.43.0",
]
@@ -6545,7 +6653,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6564,7 +6672,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-consensus-grandpa",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -6583,7 +6691,7 @@ dependencies = [
"log",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"sp-trie 37.0.0",
]
@@ -6605,7 +6713,7 @@ dependencies = [
"pallet-bridge-grandpa",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -6630,7 +6738,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-arithmetic",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -6650,7 +6758,7 @@ dependencies = [
"sp-api",
"sp-arithmetic",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6669,7 +6777,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6688,7 +6796,7 @@ dependencies = [
"parity-scale-codec",
"rand",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -6706,7 +6814,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6721,7 +6829,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6749,7 +6857,7 @@ dependencies = [
"sp-api",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -6785,7 +6893,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-keystore 0.40.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-tracing 17.0.1",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -6855,7 +6963,7 @@ dependencies = [
"scale-info",
"serde",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6874,7 +6982,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6889,7 +6997,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -6908,7 +7016,7 @@ dependencies = [
"serde",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6924,7 +7032,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6946,7 +7054,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-npos-elections",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"strum 0.26.3",
]
@@ -6961,7 +7069,7 @@ dependencies = [
"frame-system",
"parity-scale-codec",
"sp-npos-elections",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -6979,7 +7087,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-npos-elections",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -6998,7 +7106,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -7018,7 +7126,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-inherents",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7039,7 +7147,7 @@ dependencies = [
"sp-consensus-grandpa",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-session",
"sp-staking 36.0.0",
]
@@ -7058,7 +7166,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7077,7 +7185,7 @@ dependencies = [
"sp-application-crypto 38.0.0",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -7095,7 +7203,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-keyring",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7109,7 +7217,7 @@ dependencies = [
"parity-scale-codec",
"safe-mix",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7123,7 +7231,7 @@ dependencies = [
"frame-system",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7140,7 +7248,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7159,7 +7267,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
]
@@ -7178,7 +7286,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7198,7 +7306,7 @@ dependencies = [
"sp-arithmetic",
"sp-io 38.0.0",
"sp-mixnet",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7216,7 +7324,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-mmr-primitives",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7232,7 +7340,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7249,7 +7357,7 @@ dependencies = [
"pallet-nfts",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7267,7 +7375,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7294,7 +7402,7 @@ dependencies = [
"scale-info",
"sp-arithmetic",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7310,7 +7418,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7327,7 +7435,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
"sp-tracing 17.0.1",
]
@@ -7348,7 +7456,7 @@ dependencies = [
"pallet-staking",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-runtime-interface 28.0.0",
"sp-staking 36.0.0",
]
@@ -7377,7 +7485,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"serde",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -7401,7 +7509,7 @@ dependencies = [
"pallet-staking",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -7420,7 +7528,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-metadata-ir",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7438,7 +7546,7 @@ dependencies = [
"scale-info",
"serde",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7455,7 +7563,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7470,7 +7578,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7489,7 +7597,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7504,7 +7612,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7522,7 +7630,7 @@ dependencies = [
"serde",
"sp-arithmetic",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7539,7 +7647,7 @@ dependencies = [
"serde",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7567,7 +7675,7 @@ dependencies = [
"sp-api",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -7583,7 +7691,7 @@ dependencies = [
"frame-system",
"parity-wasm",
"polkavm-linker 0.10.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"tempfile",
"toml 0.8.19",
]
@@ -7615,7 +7723,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-keystore 0.40.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-tracing 17.0.1",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -7659,7 +7767,7 @@ dependencies = [
"pallet-staking",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -7675,7 +7783,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7694,7 +7802,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-arithmetic",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7713,7 +7821,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7730,7 +7838,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
]
@@ -7745,7 +7853,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7763,7 +7871,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-session",
"sp-staking 36.0.0",
"sp-state-machine 0.43.0",
@@ -7783,7 +7891,7 @@ dependencies = [
"pallet-staking",
"parity-scale-codec",
"rand",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-session",
]
@@ -7797,7 +7905,7 @@ dependencies = [
"frame-system",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7815,7 +7923,7 @@ dependencies = [
"scale-info",
"sp-arithmetic",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7836,7 +7944,7 @@ dependencies = [
"serde",
"sp-application-crypto 38.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -7875,7 +7983,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7892,7 +8000,7 @@ dependencies = [
"sp-api",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-statement-store",
]
@@ -7909,7 +8017,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7927,7 +8035,7 @@ dependencies = [
"scale-info",
"sp-inherents",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-storage 21.0.0",
"sp-timestamp",
]
@@ -7948,7 +8056,7 @@ dependencies = [
"serde",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7964,7 +8072,7 @@ dependencies = [
"serde",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -7976,7 +8084,7 @@ dependencies = [
"pallet-transaction-payment",
"parity-scale-codec",
"sp-api",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
]
@@ -7996,7 +8104,7 @@ dependencies = [
"serde",
"sp-inherents",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-transaction-storage-proof",
]
@@ -8016,7 +8124,7 @@ dependencies = [
"scale-info",
"serde",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -8034,7 +8142,7 @@ dependencies = [
"pallet-utility",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -8049,7 +8157,7 @@ dependencies = [
"log",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -8065,7 +8173,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -8080,7 +8188,7 @@ dependencies = [
"log",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -8095,7 +8203,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-api",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -8115,7 +8223,7 @@ dependencies = [
"serde",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -8136,7 +8244,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
"staging-xcm-builder",
"staging-xcm-executor",
@@ -8158,7 +8266,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -8179,7 +8287,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -8209,7 +8317,7 @@ dependencies = [
"sp-consensus-aura",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-parachain-info",
"staging-xcm 14.2.0",
"staging-xcm-executor",
@@ -8239,7 +8347,7 @@ dependencies = [
"sp-consensus-aura",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-tracing 17.0.1",
"staging-parachain-info",
"staging-xcm 14.2.0",
@@ -8374,6 +8482,12 @@ version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
+[[package]]
+name = "pathdiff"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
+
[[package]]
name = "pbkdf2"
version = "0.12.2"
@@ -8408,7 +8522,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc"
dependencies = [
"memchr",
- "thiserror 2.0.6",
+ "thiserror 2.0.8",
"ucd-trie",
]
@@ -8524,7 +8638,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -8540,7 +8654,7 @@ dependencies = [
"scale-info",
"serde",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
]
@@ -8567,7 +8681,7 @@ dependencies = [
"sp-inherents",
"sp-io 38.0.0",
"sp-keystore 0.40.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 34.0.0",
]
@@ -8594,7 +8708,7 @@ dependencies = [
"sp-inherents",
"sp-io 38.0.0",
"sp-keystore 0.40.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -8639,7 +8753,7 @@ dependencies = [
"sp-inherents",
"sp-io 38.0.0",
"sp-npos-elections",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-session",
"sp-staking 36.0.0",
"staging-xcm 14.2.0",
@@ -8702,7 +8816,7 @@ dependencies = [
"sp-inherents",
"sp-io 38.0.0",
"sp-keystore 0.40.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-session",
"sp-staking 36.0.0",
"sp-std",
@@ -8917,7 +9031,7 @@ dependencies = [
"sp-mmr-primitives",
"sp-npos-elections",
"sp-offchain",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-runtime-interface 28.0.0",
"sp-session",
"sp-staking 36.0.0",
@@ -8968,7 +9082,7 @@ dependencies = [
"sp-inherents",
"sp-io 38.0.0",
"sp-offchain",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-session",
"sp-storage 21.0.0",
"sp-transaction-pool",
@@ -9247,17 +9361,20 @@ dependencies = [
[[package]]
name = "pop-cli"
-version = "0.5.0"
+version = "0.6.0"
dependencies = [
"anyhow",
"assert_cmd",
+ "axum",
"clap",
"cliclack",
"console",
+ "contract-extrinsics",
"dirs",
"duct",
"env_logger 0.11.5",
"git2",
+ "open",
"os_info",
"pop-common",
"pop-contracts",
@@ -9265,19 +9382,23 @@ dependencies = [
"pop-telemetry",
"predicates",
"reqwest 0.12.9",
+ "serde",
"serde_json",
"sp-core 32.0.0",
"sp-weights",
"strum 0.26.3",
"strum_macros 0.26.4",
+ "subxt",
+ "subxt-signer",
"tempfile",
"tokio",
+ "tower-http 0.6.2",
"url",
]
[[package]]
name = "pop-common"
-version = "0.5.0"
+version = "0.6.0"
dependencies = [
"anyhow",
"cargo_toml",
@@ -9309,7 +9430,7 @@ dependencies = [
[[package]]
name = "pop-contracts"
-version = "0.5.0"
+version = "0.6.0"
dependencies = [
"anyhow",
"contract-build",
@@ -9328,6 +9449,8 @@ dependencies = [
"sp-weights",
"strum 0.26.3",
"strum_macros 0.26.4",
+ "subxt",
+ "subxt-signer",
"tar",
"tempfile",
"thiserror 1.0.69",
@@ -9338,7 +9461,7 @@ dependencies = [
[[package]]
name = "pop-parachains"
-version = "0.5.0"
+version = "0.6.0"
dependencies = [
"anyhow",
"askama",
@@ -9346,7 +9469,6 @@ dependencies = [
"duct",
"flate2",
"glob",
- "hex",
"indexmap 2.7.0",
"mockito",
"pop-common",
@@ -9354,6 +9476,7 @@ dependencies = [
"scale-info",
"scale-value",
"serde_json",
+ "sp-core 32.0.0",
"strum 0.26.3",
"strum_macros 0.26.4",
"subxt",
@@ -9371,7 +9494,7 @@ dependencies = [
[[package]]
name = "pop-telemetry"
-version = "0.5.0"
+version = "0.6.0"
dependencies = [
"dirs",
"env_logger 0.11.5",
@@ -9710,9 +9833,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.5.7"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f"
+checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
dependencies = [
"bitflags 2.6.0",
]
@@ -9840,7 +9963,7 @@ dependencies = [
"h2 0.3.26",
"http 0.2.12",
"http-body 0.4.6",
- "hyper 0.14.31",
+ "hyper 0.14.32",
"hyper-tls 0.5.0",
"ipnet",
"js-sys",
@@ -9881,8 +10004,8 @@ dependencies = [
"http 1.2.0",
"http-body 1.0.1",
"http-body-util",
- "hyper 1.5.1",
- "hyper-rustls 0.27.3",
+ "hyper 1.5.2",
+ "hyper-rustls 0.27.4",
"hyper-tls 0.6.0",
"hyper-util",
"ipnet",
@@ -9990,7 +10113,7 @@ dependencies = [
"polkadot-runtime-common",
"smallvec",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -9998,16 +10121,18 @@ dependencies = [
[[package]]
name = "ruint"
-version = "1.12.3"
+version = "1.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286"
+checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f"
dependencies = [
"alloy-rlp",
"ark-ff 0.3.0",
"ark-ff 0.4.2",
"bytes",
- "fastrlp",
+ "fastrlp 0.3.1",
+ "fastrlp 0.4.0",
"num-bigint",
+ "num-integer",
"num-traits",
"parity-scale-codec",
"primitive-types 0.12.2",
@@ -10090,7 +10215,7 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
dependencies = [
- "semver 1.0.23",
+ "semver 1.0.24",
]
[[package]]
@@ -10134,9 +10259,9 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.23.19"
+version = "0.23.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1"
+checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
dependencies = [
"log",
"once_cell",
@@ -10192,9 +10317,9 @@ dependencies = [
[[package]]
name = "rustls-pki-types"
-version = "1.10.0"
+version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
+checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37"
[[package]]
name = "rustls-platform-verifier"
@@ -10207,7 +10332,7 @@ dependencies = [
"jni",
"log",
"once_cell",
- "rustls 0.23.19",
+ "rustls 0.23.20",
"rustls-native-certs 0.7.3",
"rustls-platform-verifier-android",
"rustls-webpki 0.102.8",
@@ -10805,9 +10930,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.12.1"
+version = "2.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2"
+checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5"
dependencies = [
"core-foundation-sys",
"libc",
@@ -10842,9 +10967,9 @@ dependencies = [
[[package]]
name = "semver"
-version = "1.0.23"
+version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
+checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba"
dependencies = [
"serde",
]
@@ -10936,6 +11061,16 @@ dependencies = [
"serde",
]
+[[package]]
+name = "serde_path_to_error"
+version = "0.1.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6"
+dependencies = [
+ "itoa",
+ "serde",
+]
+
[[package]]
name = "serde_repr"
version = "0.1.19"
@@ -11185,7 +11320,7 @@ dependencies = [
"enumn",
"parity-scale-codec",
"paste",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -11334,7 +11469,7 @@ dependencies = [
"snowbridge-milagro-bls",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"ssz_rs",
"ssz_rs_derive",
@@ -11358,7 +11493,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -11381,7 +11516,7 @@ dependencies = [
"serde",
"serde-big-array",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -11409,7 +11544,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -11446,7 +11581,7 @@ dependencies = [
"snowbridge-pallet-ethereum-client-fixtures",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"static_assertions",
]
@@ -11486,7 +11621,7 @@ dependencies = [
"snowbridge-router-primitives",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-executor",
@@ -11524,7 +11659,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
]
@@ -11543,7 +11678,7 @@ dependencies = [
"snowbridge-core",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-executor",
@@ -11563,7 +11698,7 @@ dependencies = [
"snowbridge-core",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-executor",
@@ -11612,7 +11747,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-io 38.0.0",
"sp-keyring",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-parachain-info",
"staging-xcm 14.2.0",
"staging-xcm-executor",
@@ -11671,7 +11806,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-externalities 0.29.0",
"sp-metadata-ir",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-runtime-interface 28.0.0",
"sp-state-machine 0.43.0",
"sp-trie 37.0.0",
@@ -11747,7 +11882,7 @@ dependencies = [
"scale-info",
"sp-api",
"sp-application-crypto 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -11758,7 +11893,7 @@ checksum = "74738809461e3d4bd707b5b94e0e0c064a623a74a6a8fe5c98514417a02858dd"
dependencies = [
"sp-api",
"sp-inherents",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -11774,7 +11909,7 @@ dependencies = [
"sp-application-crypto 38.0.0",
"sp-consensus-slots",
"sp-inherents",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-timestamp",
]
@@ -11793,7 +11928,7 @@ dependencies = [
"sp-consensus-slots",
"sp-core 34.0.0",
"sp-inherents",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-timestamp",
]
@@ -11814,7 +11949,7 @@ dependencies = [
"sp-io 38.0.0",
"sp-keystore 0.40.0",
"sp-mmr-primitives",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
"strum 0.26.3",
]
@@ -11834,7 +11969,7 @@ dependencies = [
"sp-application-crypto 38.0.0",
"sp-core 34.0.0",
"sp-keystore 0.40.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -11846,7 +11981,7 @@ dependencies = [
"parity-scale-codec",
"sp-api",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -12112,7 +12247,7 @@ dependencies = [
"scale-info",
"serde_json",
"sp-api",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -12125,7 +12260,7 @@ dependencies = [
"impl-trait-for-tuples",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"thiserror 1.0.69",
]
@@ -12190,7 +12325,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c0e20624277f578b27f44ecfbe2ebc2e908488511ee2c900c5281599f700ab3"
dependencies = [
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"strum 0.26.3",
]
@@ -12265,7 +12400,7 @@ dependencies = [
"sp-api",
"sp-core 34.0.0",
"sp-debug-derive",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"thiserror 1.0.69",
]
@@ -12280,7 +12415,7 @@ dependencies = [
"serde",
"sp-arithmetic",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -12291,7 +12426,7 @@ checksum = "2d9de237d72ecffd07f90826eef18360208b16d8de939d54e61591fac0fcbf99"
dependencies = [
"sp-api",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -12332,9 +12467,9 @@ dependencies = [
[[package]]
name = "sp-runtime"
-version = "39.0.2"
+version = "39.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "658f23be7c79a85581029676a73265c107c5469157e3444c8c640fdbaa8bfed0"
+checksum = "ef567865c042b9002dfa44b8fc850fe611038acdf1e382e539495015f60f692f"
dependencies = [
"docify",
"either",
@@ -12442,7 +12577,7 @@ dependencies = [
"sp-api",
"sp-core 34.0.0",
"sp-keystore 0.40.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-staking 36.0.0",
]
@@ -12457,7 +12592,7 @@ dependencies = [
"scale-info",
"serde",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -12471,7 +12606,7 @@ dependencies = [
"scale-info",
"serde",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -12535,7 +12670,7 @@ dependencies = [
"sp-core 34.0.0",
"sp-crypto-hashing",
"sp-externalities 0.29.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-runtime-interface 28.0.0",
"thiserror 1.0.69",
"x25519-dalek",
@@ -12583,7 +12718,7 @@ dependencies = [
"async-trait",
"parity-scale-codec",
"sp-inherents",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"thiserror 1.0.69",
]
@@ -12619,7 +12754,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc4bf251059485a7dd38fe4afeda8792983511cc47f342ff4695e2dcae6b5247"
dependencies = [
"sp-api",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -12633,7 +12768,7 @@ dependencies = [
"scale-info",
"sp-core 34.0.0",
"sp-inherents",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-trie 37.0.0",
]
@@ -12697,7 +12832,7 @@ dependencies = [
"scale-info",
"serde",
"sp-crypto-hashing-proc-macro",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"sp-version-proc-macro",
"thiserror 1.0.69",
@@ -12828,7 +12963,7 @@ dependencies = [
"frame-system",
"parity-scale-codec",
"scale-info",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
]
[[package]]
@@ -12865,7 +13000,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"serde",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
"xcm-procedural 10.1.0",
]
@@ -12887,7 +13022,7 @@ dependencies = [
"scale-info",
"sp-arithmetic",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
"staging-xcm 14.2.0",
"staging-xcm-executor",
@@ -12908,7 +13043,7 @@ dependencies = [
"sp-arithmetic",
"sp-core 34.0.0",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
"staging-xcm 14.2.0",
"tracing",
@@ -13397,7 +13532,7 @@ dependencies = [
"polkadot-core-primitives",
"rococo-runtime-constants",
"smallvec",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"staging-xcm 14.2.0",
"westend-runtime-constants",
]
@@ -13424,11 +13559,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.6"
+version = "2.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47"
+checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a"
dependencies = [
- "thiserror-impl 2.0.6",
+ "thiserror-impl 2.0.8",
]
[[package]]
@@ -13444,9 +13579,9 @@ dependencies = [
[[package]]
name = "thiserror-impl"
-version = "2.0.6"
+version = "2.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312"
+checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943"
dependencies = [
"proc-macro2",
"quote",
@@ -13593,7 +13728,7 @@ version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
dependencies = [
- "rustls 0.23.19",
+ "rustls 0.23.20",
"tokio",
]
@@ -13733,6 +13868,22 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "tower"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
+dependencies = [
+ "futures-core",
+ "futures-util",
+ "pin-project-lite",
+ "sync_wrapper 1.0.2",
+ "tokio",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
[[package]]
name = "tower-http"
version = "0.4.4"
@@ -13746,7 +13897,7 @@ dependencies = [
"futures-util",
"http 0.2.12",
"http-body 0.4.6",
- "http-range-header",
+ "http-range-header 0.3.1",
"mime",
"pin-project-lite",
"tower-layer",
@@ -13754,6 +13905,31 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "tower-http"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697"
+dependencies = [
+ "bitflags 2.6.0",
+ "bytes",
+ "futures-util",
+ "http 1.2.0",
+ "http-body 1.0.1",
+ "http-body-util",
+ "http-range-header 0.4.2",
+ "httpdate",
+ "mime",
+ "mime_guess",
+ "percent-encoding",
+ "pin-project-lite",
+ "tokio",
+ "tokio-util",
+ "tower-layer",
+ "tower-service",
+ "tracing",
+]
+
[[package]]
name = "tower-layer"
version = "0.3.3"
@@ -14399,7 +14575,7 @@ dependencies = [
"bitflags 2.6.0",
"hashbrown 0.14.5",
"indexmap 2.7.0",
- "semver 1.0.23",
+ "semver 1.0.24",
"serde",
]
@@ -14647,7 +14823,7 @@ dependencies = [
"polkadot-runtime-common",
"smallvec",
"sp-core 34.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-weights",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -15092,7 +15268,7 @@ dependencies = [
"polkadot-runtime-parachains",
"scale-info",
"sp-io 38.0.0",
- "sp-runtime 39.0.2",
+ "sp-runtime 39.0.3",
"sp-std",
"staging-xcm 14.2.0",
"staging-xcm-builder",
@@ -15221,9 +15397,9 @@ dependencies = [
[[package]]
name = "zip"
-version = "2.2.1"
+version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352"
+checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45"
dependencies = [
"arbitrary",
"crc32fast",
@@ -15231,14 +15407,14 @@ dependencies = [
"displaydoc",
"indexmap 2.7.0",
"memchr",
- "thiserror 2.0.6",
+ "thiserror 2.0.8",
]
[[package]]
name = "zombienet-configuration"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22860eef7e651d6e0aa7e37fc3bcba3c2c8b7bd1c140d7ea929caacf2b7fc726"
+checksum = "d716b3ff8112d98ced15f53b0c72454f8cde533fe2b68bb04379228961efbd80"
dependencies = [
"anyhow",
"lazy_static",
@@ -15256,9 +15432,9 @@ dependencies = [
[[package]]
name = "zombienet-orchestrator"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b19b1b2fd2db3153155f21cb84cdd8e5d6faefc3043353b8c90661c44f4660da"
+checksum = "4098a7d33b729b59e32c41a87aa4d484bd1b8771a059bbd4edfb4d430b3b2d74"
dependencies = [
"anyhow",
"async-trait",
@@ -15289,9 +15465,9 @@ dependencies = [
[[package]]
name = "zombienet-prom-metrics-parser"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea61ce9c6b2d43be864ad34328d05794079381807f5d77c737a062486966347f"
+checksum = "961e30be45b34f6ebeabf29ee2f47b0cd191ea62e40c064752572207509a6f5c"
dependencies = [
"pest",
"pest_derive",
@@ -15300,9 +15476,9 @@ dependencies = [
[[package]]
name = "zombienet-provider"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c99cc7c143f1145bda2b2f5a945b8040a898a85fc029dba51f220395a7188d9d"
+checksum = "ab0f7f01780b7c99a6c40539d195d979f234305f32808d547438b50829d44262"
dependencies = [
"anyhow",
"async-trait",
@@ -15331,9 +15507,9 @@ dependencies = [
[[package]]
name = "zombienet-sdk"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09e5abdad4ad32c1c06cb8fdc4507db026f65987cb5c46ae4224118cc496097b"
+checksum = "99a3c5f2d657235b3ab7dc384677e63cde21983029e99106766ecd49e9f8d7f3"
dependencies = [
"async-trait",
"futures",
@@ -15349,9 +15525,9 @@ dependencies = [
[[package]]
name = "zombienet-support"
-version = "0.2.18"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e3310631948f8bb4d394c160c4b063889a4e0c6beadd6b95f9b62d1616ab93c"
+checksum = "296f887ea88e07edd771f8e1d0dec5297a58b422f4b884a6292a21ebe03277cb"
dependencies = [
"anyhow",
"async-trait",
diff --git a/Cargo.toml b/Cargo.toml
index 86a7a928d..e5e050cda 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ documentation = "https://learn.onpop.io/"
license = "GPL-3.0"
repository = "https://github.com/r0gue-io/pop-cli"
rust-version = "1.81.0"
-version = "0.5.0"
+version = "0.6.0"
[workspace.dependencies]
anyhow = "1.0"
@@ -50,13 +50,12 @@ subxt = "0.38.0"
ink_env = "5.0.0"
sp-core = "32.0.0"
sp-weights = "31.0.0"
-contract-build = "5.0.0"
-contract-extrinsics = "5.0.0"
-contract-transcode = "5.0.0"
scale-info = { version = "2.11.4", default-features = false, features = ["derive"] }
scale-value = { version = "0.17.0", default-features = false, features = ["from-string", "parser-ss58"] }
+contract-build = "5.0.2"
+contract-extrinsics = "5.0.2"
+contract-transcode = "5.0.2"
heck = "0.5.0"
-hex = { version = "0.4.3", default-features = false }
# parachains
askama = "0.12"
@@ -77,3 +76,8 @@ console = "0.15"
os_info = { version = "3", default-features = false }
strum = "0.26"
strum_macros = "0.26"
+
+# wallet-integration
+axum = "0.7.9"
+open = "5.3.1"
+tower-http = "0.6.2"
diff --git a/crates/pop-cli/Cargo.toml b/crates/pop-cli/Cargo.toml
index c9761b642..707fad1b7 100644
--- a/crates/pop-cli/Cargo.toml
+++ b/crates/pop-cli/Cargo.toml
@@ -18,6 +18,7 @@ duct.workspace = true
env_logger.workspace = true
os_info.workspace = true
reqwest.workspace = true
+serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
tempfile.workspace = true
tokio.workspace = true
@@ -27,31 +28,40 @@ url.workspace = true
clap.workspace = true
cliclack.workspace = true
console.workspace = true
+sp-core.workspace = true
strum.workspace = true
strum_macros.workspace = true
# contracts
-pop-contracts = { path = "../pop-contracts", version = "0.5.0", optional = true }
-sp-core = { workspace = true, optional = true }
+pop-contracts = { path = "../pop-contracts", version = "0.6.0", optional = true }
sp-weights = { workspace = true, optional = true }
# parachains
-pop-parachains = { path = "../pop-parachains", version = "0.5.0", optional = true }
+pop-parachains = { path = "../pop-parachains", version = "0.6.0", optional = true }
dirs = { workspace = true, optional = true }
git2.workspace = true
# telemetry
-pop-telemetry = { path = "../pop-telemetry", version = "0.5.0", optional = true }
+pop-telemetry = { path = "../pop-telemetry", version = "0.6.0", optional = true }
# common
-pop-common = { path = "../pop-common", version = "0.5.0" }
+pop-common = { path = "../pop-common", version = "0.6.0" }
+
+# wallet-integration
+axum.workspace = true
+open.workspace = true
+tower-http = { workspace = true, features = ["fs", "cors"] }
[dev-dependencies]
assert_cmd.workspace = true
+contract-extrinsics.workspace = true
predicates.workspace = true
+subxt.workspace = true
+subxt-signer.workspace = true
+sp-weights.workspace = true
[features]
default = ["contract", "parachain", "telemetry"]
-contract = ["dep:pop-contracts", "dep:sp-core", "dep:sp-weights", "dep:dirs"]
+contract = ["dep:pop-contracts", "dep:sp-weights", "dep:dirs"]
parachain = ["dep:pop-parachains", "dep:dirs"]
telemetry = ["dep:pop-telemetry"]
diff --git a/crates/pop-cli/src/assets/index.html b/crates/pop-cli/src/assets/index.html
new file mode 100644
index 000000000..d1d5a8ef7
--- /dev/null
+++ b/crates/pop-cli/src/assets/index.html
@@ -0,0 +1,1024 @@
+
+
+
+
+
+
+
+ Pop CLI Signing Portal
+
+
+
+
+
+
+
+
+
diff --git a/crates/pop-cli/src/cli.rs b/crates/pop-cli/src/cli.rs
index 6c6bb3bce..f98c934e9 100644
--- a/crates/pop-cli/src/cli.rs
+++ b/crates/pop-cli/src/cli.rs
@@ -150,7 +150,6 @@ impl traits::Confirm for Confirm {
/// A input prompt using cliclack.
struct Input(cliclack::Input);
-
impl traits::Input for Input {
/// Sets the default value for the input.
fn default_input(mut self, value: &str) -> Self {
diff --git a/crates/pop-cli/src/commands/call/chain.rs b/crates/pop-cli/src/commands/call/chain.rs
index 36b4dbd1e..41348826f 100644
--- a/crates/pop-cli/src/commands/call/chain.rs
+++ b/crates/pop-cli/src/commands/call/chain.rs
@@ -2,14 +2,17 @@
use std::path::Path;
-use crate::cli::{self, traits::*};
+use crate::{
+ cli::{self, traits::*},
+ common::wallet::{prompt_to_use_wallet, request_signature},
+};
use anyhow::{anyhow, Result};
use clap::Args;
use pop_parachains::{
construct_extrinsic, construct_sudo_extrinsic, decode_call_data, encode_call_data,
find_dispatchable_by_name, find_pallet_by_name, parse_chain_metadata, set_up_client,
- sign_and_submit_extrinsic, supported_actions, Action, CallData, DynamicPayload, Function,
- OnlineClient, Pallet, Param, SubstrateConfig,
+ sign_and_submit_extrinsic, submit_signed_extrinsic, supported_actions, Action, CallData,
+ DynamicPayload, Function, OnlineClient, Pallet, Param, Payload, SubstrateConfig,
};
use url::Url;
@@ -40,6 +43,15 @@ pub struct CallChainCommand {
/// - with a password "//Alice///SECRET_PASSWORD"
#[arg(short, long)]
suri: Option,
+ /// Use a browser extension wallet to sign the extrinsic.
+ #[arg(
+ name = "use-wallet",
+ short = 'w',
+ long,
+ default_value = "false",
+ conflicts_with = "suri"
+ )]
+ use_wallet: bool,
/// SCALE encoded bytes representing the call data of the extrinsic.
#[arg(name = "call", short, long, conflicts_with_all = ["pallet", "function", "args"])]
call_data: Option,
@@ -95,7 +107,14 @@ impl CallChainCommand {
};
// Sign and submit the extrinsic.
- if let Err(e) = call.submit_extrinsic(&chain.client, &chain.url, xt, &mut cli).await {
+ let result = if self.use_wallet {
+ let call_data = xt.encode_call_data(&chain.client.metadata())?;
+ submit_extrinsic_with_wallet(&chain.client, &chain.url, call_data, &mut cli).await
+ } else {
+ call.submit_extrinsic(&chain.client, &chain.url, xt, &mut cli).await
+ };
+
+ if let Err(e) = result {
display_message(&e.to_string(), false, &mut cli)?;
break;
}
@@ -197,12 +216,8 @@ impl CallChainCommand {
// sudo.
self.configure_sudo(chain, cli)?;
- // Resolve who is signing the extrinsic.
- let suri = match self.suri.as_ref() {
- Some(suri) => suri.clone(),
- None =>
- cli.input("Signer of the extrinsic:").default_input(DEFAULT_URI).interact()?,
- };
+ let (use_wallet, suri) = self.determine_signing_method(cli)?;
+ self.use_wallet = use_wallet;
return Ok(Call {
function: function.clone(),
@@ -210,6 +225,7 @@ impl CallChainCommand {
suri,
skip_confirm: self.skip_confirm,
sudo: self.sudo,
+ use_wallet: self.use_wallet,
});
}
}
@@ -222,11 +238,18 @@ impl CallChainCommand {
call_data: &str,
cli: &mut impl Cli,
) -> Result<()> {
- // Resolve who is signing the extrinsic.
- let suri = match self.suri.as_ref() {
- Some(suri) => suri,
- None => &cli.input("Signer of the extrinsic:").default_input(DEFAULT_URI).interact()?,
- };
+ let (use_wallet, suri) = self.determine_signing_method(cli)?;
+
+ // Perform signing steps with wallet integration and return early.
+ if use_wallet {
+ let call_data_bytes =
+ decode_call_data(call_data).map_err(|err| anyhow!("{}", format!("{err:?}")))?;
+ submit_extrinsic_with_wallet(client, url, call_data_bytes, cli)
+ .await
+ .map_err(|err| anyhow!("{}", format!("{err:?}")))?;
+ display_message("Call complete.", true, cli)?;
+ return Ok(());
+ }
cli.info(format!("Encoded call data: {}", call_data))?;
if !self.skip_confirm &&
!cli.confirm("Do you want to submit the extrinsic?")
@@ -244,7 +267,7 @@ impl CallChainCommand {
spinner.start("Signing and submitting the extrinsic and then waiting for finalization, please be patient...");
let call_data_bytes =
decode_call_data(call_data).map_err(|err| anyhow!("{}", format!("{err:?}")))?;
- let result = sign_and_submit_extrinsic(client, url, CallData::new(call_data_bytes), suri)
+ let result = sign_and_submit_extrinsic(client, url, CallData::new(call_data_bytes), &suri)
.await
.map_err(|err| anyhow!("{}", format!("{err:?}")))?;
@@ -253,6 +276,29 @@ impl CallChainCommand {
Ok(())
}
+ // Resolve who is signing the extrinsic. If a `suri` was provided via the command line,
+ // skip the prompt.
+ fn determine_signing_method(&self, cli: &mut impl Cli) -> Result<(bool, String)> {
+ let mut use_wallet = self.use_wallet;
+ let suri = match self.suri.as_ref() {
+ Some(suri) => suri.clone(),
+ None =>
+ if !self.use_wallet {
+ if prompt_to_use_wallet(cli)? {
+ use_wallet = true;
+ DEFAULT_URI.to_string()
+ } else {
+ cli.input("Signer of the extrinsic:")
+ .default_input(DEFAULT_URI)
+ .interact()?
+ }
+ } else {
+ DEFAULT_URI.to_string()
+ },
+ };
+ Ok((use_wallet, suri))
+ }
+
// Checks if the chain has the Sudo pallet and prompts the user to confirm if they want to
// execute the call via `sudo`.
fn configure_sudo(&mut self, chain: &Chain, cli: &mut impl Cli) -> Result<()> {
@@ -283,6 +329,7 @@ impl CallChainCommand {
self.function = None;
self.args.clear();
self.sudo = false;
+ self.use_wallet = false;
}
// Function to check if all required fields are specified.
@@ -334,6 +381,8 @@ struct Call {
/// - for a dev account "//Alice"
/// - with a password "//Alice///SECRET_PASSWORD"
suri: String,
+ /// Whether to use your browser wallet to sign the extrinsic.
+ use_wallet: bool,
/// Whether to automatically sign and submit the extrinsic without prompting for confirmation.
skip_confirm: bool,
/// Whether to dispatch the function call with `Root` origin.
@@ -411,7 +460,12 @@ impl Call {
.collect();
full_message.push_str(&format!(" --args {}", args.join(" ")));
}
- full_message.push_str(&format!(" --url {} --suri {}", chain.url, self.suri));
+ full_message.push_str(&format!(" --url {}", chain.url));
+ if self.use_wallet {
+ full_message.push_str(" --use-wallet");
+ } else {
+ full_message.push_str(&format!(" --suri {}", self.suri));
+ }
if self.sudo {
full_message.push_str(" --sudo");
}
@@ -419,6 +473,32 @@ impl Call {
}
}
+// Sign and submit an extrinsic using wallet integration.
+async fn submit_extrinsic_with_wallet(
+ client: &OnlineClient,
+ url: &Url,
+ call_data: Vec,
+ cli: &mut impl Cli,
+) -> Result<()> {
+ let maybe_payload = request_signature(call_data, url.to_string()).await?;
+ if let Some(payload) = maybe_payload {
+ cli.success("Signed payload received.")?;
+ let spinner = cliclack::spinner();
+ spinner.start(
+ "Submitting the extrinsic and then waiting for finalization, please be patient...",
+ );
+
+ let result = submit_signed_extrinsic(client.clone(), payload)
+ .await
+ .map_err(|err| anyhow!("{}", format!("{err:?}")))?;
+
+ spinner.stop(format!("Extrinsic submitted with hash: {:?}", result));
+ } else {
+ display_message("No signed payload received.", false, cli)?;
+ }
+ Ok(())
+}
+
// Displays a message to the user, with formatting based on the success status.
fn display_message(message: &str, success: bool, cli: &mut impl Cli) -> Result<()> {
if success {
@@ -589,7 +669,7 @@ fn parse_function_name(name: &str) -> Result {
#[cfg(test)]
mod tests {
use super::*;
- use crate::cli::MockCli;
+ use crate::{cli::MockCli, common::wallet::USE_WALLET_PROMPT};
use tempfile::tempdir;
use url::Url;
@@ -642,7 +722,7 @@ mod tests {
)
.expect_input("The value for `remark` might be too large to enter. You may enter the path to a file instead.", "0x11".into())
.expect_confirm("Would you like to dispatch this function call with `Root` origin?", true)
- .expect_input("Signer of the extrinsic:", "//Bob".into());
+ .expect_confirm(USE_WALLET_PROMPT, true);
let chain = call_config.configure_chain(&mut cli).await?;
assert_eq!(chain.url, Url::parse(POP_NETWORK_TESTNET_URL)?);
@@ -651,9 +731,10 @@ mod tests {
assert_eq!(call_chain.function.pallet, "System");
assert_eq!(call_chain.function.name, "remark");
assert_eq!(call_chain.args, ["0x11".to_string()].to_vec());
- assert_eq!(call_chain.suri, "//Bob");
+ assert_eq!(call_chain.suri, "//Alice"); // Default value
+ assert!(call_chain.use_wallet);
assert!(call_chain.sudo);
- assert_eq!(call_chain.display(&chain), "pop call chain --pallet System --function remark --args \"0x11\" --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Bob --sudo");
+ assert_eq!(call_chain.display(&chain), "pop call chain --pallet System --function remark --args \"0x11\" --url wss://rpc1.paseo.popnetwork.xyz/ --use-wallet --sudo");
cli.verify()
}
@@ -714,6 +795,7 @@ mod tests {
},
args: vec!["0x11".to_string()].to_vec(),
suri: DEFAULT_URI.to_string(),
+ use_wallet: false,
skip_confirm: false,
sudo: false,
};
@@ -753,6 +835,7 @@ mod tests {
function: find_dispatchable_by_name(&pallets, "System", "remark")?.clone(),
args: vec!["0x11".to_string()].to_vec(),
suri: DEFAULT_URI.to_string(),
+ use_wallet: false,
skip_confirm: false,
sudo: false,
};
@@ -776,11 +859,13 @@ mod tests {
args: vec![].to_vec(),
url: Some(Url::parse(POP_NETWORK_TESTNET_URL)?),
suri: None,
+ use_wallet: false,
skip_confirm: false,
call_data: Some("0x00000411".to_string()),
sudo: false,
};
let mut cli = MockCli::new()
+ .expect_confirm(USE_WALLET_PROMPT, false)
.expect_input("Signer of the extrinsic:", "//Bob".into())
.expect_confirm("Do you want to submit the extrinsic?", false)
.expect_outro_cancel("Extrinsic with call data 0x00000411 was not submitted.");
@@ -803,8 +888,9 @@ mod tests {
pallet: None,
function: None,
args: vec![].to_vec(),
- url: Some(Url::parse("wss://polkadot-rpc.publicnode.com")?),
+ url: Some(Url::parse(POLKADOT_NETWORK_URL)?),
suri: Some("//Alice".to_string()),
+ use_wallet: false,
skip_confirm: false,
call_data: Some("0x00000411".to_string()),
sudo: true,
@@ -836,6 +922,7 @@ mod tests {
function: Some("remark".to_string()),
args: vec!["0x11".to_string()].to_vec(),
url: Some(Url::parse(POP_NETWORK_TESTNET_URL)?),
+ use_wallet: true,
suri: Some(DEFAULT_URI.to_string()),
skip_confirm: false,
call_data: None,
@@ -846,6 +933,7 @@ mod tests {
assert_eq!(call_config.function, None);
assert_eq!(call_config.args.len(), 0);
assert!(!call_config.sudo);
+ assert!(!call_config.use_wallet);
Ok(())
}
@@ -857,6 +945,7 @@ mod tests {
args: vec!["0x11".to_string()].to_vec(),
url: Some(Url::parse(POP_NETWORK_TESTNET_URL)?),
suri: Some(DEFAULT_URI.to_string()),
+ use_wallet: false,
skip_confirm: false,
call_data: None,
sudo: false,
@@ -875,6 +964,7 @@ mod tests {
args: vec!["2000".to_string(), "0x1".to_string(), "0x12".to_string()].to_vec(),
url: Some(Url::parse(POP_NETWORK_TESTNET_URL)?),
suri: Some(DEFAULT_URI.to_string()),
+ use_wallet: false,
call_data: None,
skip_confirm: false,
sudo: false,
diff --git a/crates/pop-cli/src/commands/call/contract.rs b/crates/pop-cli/src/commands/call/contract.rs
index e83a871d2..45ba0a094 100644
--- a/crates/pop-cli/src/commands/call/contract.rs
+++ b/crates/pop-cli/src/commands/call/contract.rs
@@ -2,17 +2,22 @@
use crate::{
cli::{self, traits::*},
- common::contracts::has_contract_been_built,
+ common::{
+ contracts::has_contract_been_built,
+ wallet::{prompt_to_use_wallet, request_signature},
+ },
};
use anyhow::{anyhow, Result};
use clap::Args;
use cliclack::spinner;
+use pop_common::{DefaultConfig, Keypair};
use pop_contracts::{
- build_smart_contract, call_smart_contract, dry_run_call, dry_run_gas_estimate_call,
- get_messages, parse_account, set_up_call, CallOpts, Verbosity,
+ build_smart_contract, call_smart_contract, call_smart_contract_from_signed_payload,
+ dry_run_call, dry_run_gas_estimate_call, get_call_payload, get_message, get_messages,
+ parse_account, set_up_call, CallExec, CallOpts, DefaultEnvironment, Verbosity,
};
use sp_weights::Weight;
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
const DEFAULT_URL: &str = "ws://localhost:9944/";
const DEFAULT_URI: &str = "//Alice";
@@ -54,6 +59,15 @@ pub struct CallContractCommand {
/// - with a password "//Alice///SECRET_PASSWORD"
#[arg(short, long, default_value = DEFAULT_URI)]
suri: String,
+ /// Use a browser extension wallet to sign the extrinsic.
+ #[arg(
+ name = "use-wallet",
+ long,
+ short = 'w',
+ default_value = "false",
+ conflicts_with = "suri"
+ )]
+ use_wallet: bool,
/// Submit an extrinsic for on-chain execution.
#[arg(short = 'x', long)]
execute: bool,
@@ -115,14 +129,19 @@ impl CallContractCommand {
full_message.push_str(&format!(" --gas {}", gas_limit));
}
if let Some(proof_size) = self.proof_size {
- full_message.push_str(&format!(" --proof_size {}", proof_size));
+ full_message.push_str(&format!(" --proof-size {}", proof_size));
+ }
+ full_message.push_str(&format!(" --url {}", self.url));
+ if self.use_wallet {
+ full_message.push_str(" --use-wallet");
+ } else {
+ full_message.push_str(&format!(" --suri {}", self.suri));
}
- full_message.push_str(&format!(" --url {} --suri {}", self.url, self.suri));
if self.execute {
full_message.push_str(" --execute");
}
if self.dry_run {
- full_message.push_str(" --dry_run");
+ full_message.push_str(" --dry-run");
}
full_message
}
@@ -165,7 +184,7 @@ impl CallContractCommand {
fn is_contract_build_required(&self) -> bool {
self.path
.as_ref()
- .map(|p| p.is_dir() && !has_contract_been_built(Some(&p)))
+ .map(|p| p.is_dir() && !has_contract_been_built(Some(p)))
.unwrap_or_default()
}
@@ -303,18 +322,22 @@ impl CallContractCommand {
self.proof_size = proof_size_input.parse::().ok(); // If blank or bad input, estimate it.
}
- // Resolve who is calling the contract.
- if self.suri == DEFAULT_URI {
- // Prompt for uri.
- self.suri = cli
- .input("Signer calling the contract:")
- .placeholder("//Alice")
- .default_input("//Alice")
- .interact()?;
- };
+ // Resolve who is calling the contract. If a `suri` was provided via the command line, skip
+ // the prompt.
+ if self.suri == DEFAULT_URI && !self.use_wallet && message.mutates {
+ if prompt_to_use_wallet(cli)? {
+ self.use_wallet = true;
+ } else {
+ self.suri = cli
+ .input("Signer calling the contract:")
+ .placeholder("//Alice")
+ .default_input("//Alice")
+ .interact()?;
+ };
+ }
// Finally prompt for confirmation.
- let is_call_confirmed = if message.mutates && !self.dev_mode {
+ let is_call_confirmed = if message.mutates && !self.dev_mode && !self.use_wallet {
cli.confirm("Do you want to execute the call? (Selecting 'No' will perform a dry run)")
.initial_value(true)
.interact()?
@@ -340,6 +363,14 @@ impl CallContractCommand {
return Err(anyhow!("Please specify the message to call."));
},
};
+ // Disable wallet signing and display warning if the call is read-only.
+ let message_metadata =
+ get_message(self.path.as_deref().unwrap_or_else(|| Path::new("./")), &message)?;
+ if !message_metadata.mutates && self.use_wallet {
+ cli.warning("NOTE: Signing is not required for this read-only call. The '--use-wallet' flag will be ignored.")?;
+ self.use_wallet = false;
+ }
+
let contract = match &self.contract {
Some(contract) => contract.to_string(),
None => {
@@ -366,6 +397,12 @@ impl CallContractCommand {
},
};
+ // Perform signing steps with wallet integration, skipping secure signing for query-only
+ // operations.
+ if self.use_wallet {
+ self.execute_with_wallet(call_exec, cli).await?;
+ return self.finalize_execute_call(cli, prompt_to_repeat_call).await;
+ }
if self.dry_run {
let spinner = spinner();
spinner.start("Doing a dry run to estimate the gas...");
@@ -386,6 +423,7 @@ impl CallContractCommand {
let spinner = spinner();
spinner.start("Calling the contract...");
let call_dry_run_result = dry_run_call(&call_exec).await?;
+ spinner.stop("");
cli.info(format!("Result: {}", call_dry_run_result))?;
cli.warning("Your call has not been executed.")?;
} else {
@@ -414,7 +452,15 @@ impl CallContractCommand {
cli.info(call_result)?;
}
+ self.finalize_execute_call(cli, prompt_to_repeat_call).await
+ }
+ /// Finalize the current call, prompting the user to repeat or conclude the process.
+ async fn finalize_execute_call(
+ &mut self,
+ cli: &mut impl Cli,
+ prompt_to_repeat_call: bool,
+ ) -> Result<()> {
// Prompt for any additional calls.
if !prompt_to_repeat_call {
display_message("Call completed successfully!", true, cli)?;
@@ -435,12 +481,55 @@ impl CallContractCommand {
}
}
+ /// Execute the smart contract call using wallet integration.
+ async fn execute_with_wallet(
+ &self,
+ call_exec: CallExec,
+ cli: &mut impl Cli,
+ ) -> Result<()> {
+ let call_data = self.get_contract_data(&call_exec).map_err(|err| {
+ anyhow!("An error occurred getting the call data: {}", err.to_string())
+ })?;
+
+ let maybe_payload = request_signature(call_data, self.url.to_string()).await?;
+ if let Some(payload) = maybe_payload {
+ cli.success("Signed payload received.")?;
+ let spinner = spinner();
+ spinner.start("Calling the contract...");
+
+ let call_result =
+ call_smart_contract_from_signed_payload(call_exec, payload, &self.url)
+ .await
+ .map_err(|err| anyhow!("{} {}", "ERROR:", format!("{err:?}")))?;
+
+ cli.info(call_result)?;
+ } else {
+ display_message("No signed payload received.", false, cli)?;
+ }
+ Ok(())
+ }
+
+ // Get the call data.
+ fn get_contract_data(
+ &self,
+ call_exec: &CallExec,
+ ) -> anyhow::Result> {
+ let weight_limit = if self.gas_limit.is_some() && self.proof_size.is_some() {
+ Weight::from_parts(self.gas_limit.unwrap(), self.proof_size.unwrap())
+ } else {
+ Weight::zero()
+ };
+ let call_data = get_call_payload(call_exec, weight_limit)?;
+ Ok(call_data)
+ }
+
/// Resets message specific fields to default values for a new call.
fn reset_for_new_call(&mut self) {
self.message = None;
self.value = DEFAULT_PAYABLE_VALUE.to_string();
self.gas_limit = None;
self.proof_size = None;
+ self.use_wallet = false;
}
}
@@ -456,7 +545,7 @@ fn display_message(message: &str, success: bool, cli: &mut impl Cli) -> Result<(
#[cfg(test)]
mod tests {
use super::*;
- use crate::cli::MockCli;
+ use crate::{cli::MockCli, common::wallet::USE_WALLET_PROMPT};
use pop_contracts::{mock_build_process, new_environment};
use std::{env, fs::write};
use url::Url;
@@ -482,6 +571,7 @@ mod tests {
proof_size: None,
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: false,
@@ -517,13 +607,14 @@ mod tests {
proof_size: Some(10),
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: false,
dry_run: true,
execute: false,
dev_mode: false,
};
call_config.configure(&mut cli, false).await?;
assert_eq!(call_config.display(), format!(
- "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message flip --gas 100 --proof_size 10 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --dry_run",
+ "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message flip --gas 100 --proof-size 10 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --dry-run",
temp_dir.path().join("testing").display().to_string(),
));
// Contract deployed on Pop Network testnet, test dry-run
@@ -553,13 +644,14 @@ mod tests {
proof_size: Some(10),
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: false,
dry_run: true,
execute: false,
dev_mode: false,
};
call_config.configure(&mut cli, false).await?;
assert_eq!(call_config.display(), format!(
- "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message flip --gas 100 --proof_size 10 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --dry_run",
+ "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message flip --gas 100 --proof-size 10 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --dry-run",
current_dir.join("pop-contracts/tests/files/testing.contract").display().to_string(),
));
// Contract deployed on Pop Network testnet, test dry-run
@@ -569,7 +661,7 @@ mod tests {
call_config.path = Some(current_dir.join("pop-contracts/tests/files/testing.json"));
call_config.configure(&mut cli, false).await?;
assert_eq!(call_config.display(), format!(
- "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message flip --gas 100 --proof_size 10 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --dry_run",
+ "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message flip --gas 100 --proof-size 10 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --dry-run",
current_dir.join("pop-contracts/tests/files/testing.json").display().to_string(),
));
@@ -577,7 +669,7 @@ mod tests {
call_config.path = Some(current_dir.join("pop-contracts/tests/files/testing.wasm"));
call_config.configure(&mut cli, false).await?;
assert_eq!(call_config.display(), format!(
- "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message flip --gas 100 --proof_size 10 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --dry_run",
+ "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message flip --gas 100 --proof-size 10 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --dry-run",
current_dir.join("pop-contracts/tests/files/testing.wasm").display().to_string(),
));
// Contract deployed on Pop Network testnet, test dry-run
@@ -608,10 +700,6 @@ mod tests {
"Do you want to perform another call using the existing smart contract?",
true,
)
- .expect_confirm(
- "Do you want to perform another call using the existing smart contract?",
- false,
- )
.expect_select(
"Select the message to call:",
Some(false),
@@ -619,12 +707,16 @@ mod tests {
Some(items),
1, // "get" message
)
- .expect_input("Signer calling the contract:", "//Alice".into())
.expect_info(format!(
"pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message get --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice",
temp_dir.path().join("testing").display().to_string(),
))
+ .expect_warning("NOTE: Signing is not required for this read-only call. The '--use-wallet' flag will be ignored.")
.expect_warning("Your call has not been executed.")
+ .expect_confirm(
+ "Do you want to perform another call using the existing smart contract?",
+ false,
+ )
.expect_outro("Contract calling complete.");
// Contract deployed on Pop Network testnet, test get
@@ -638,6 +730,7 @@ mod tests {
proof_size: None,
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: true,
dry_run: false,
execute: false,
dev_mode: false,
@@ -688,7 +781,6 @@ mod tests {
"Provide the on-chain contract address:",
"15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm".into(),
)
- .expect_input("Signer calling the contract:", "//Alice".into())
.expect_info(format!(
"pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message get --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice",
temp_dir.path().join("testing").display().to_string(),
@@ -704,6 +796,7 @@ mod tests {
proof_size: None,
url: Url::parse(DEFAULT_URL)?,
suri: DEFAULT_URI.to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: false,
@@ -750,14 +843,6 @@ mod tests {
];
// The inputs are processed in reverse order.
let mut cli = MockCli::new()
- .expect_confirm("Do you want to execute the call? (Selecting 'No' will perform a dry run)", true)
- .expect_select(
- "Select the message to call:",
- Some(false),
- true,
- Some(items),
- 2, // "specific_flip" message
- )
.expect_input(
"Where is your project or contract artifact located?",
temp_dir.path().join("testing").display().to_string(),
@@ -770,14 +855,21 @@ mod tests {
"Provide the on-chain contract address:",
"15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm".into(),
)
+ .expect_select(
+ "Select the message to call:",
+ Some(false),
+ true,
+ Some(items),
+ 2, // "specific_flip" message
+ )
.expect_input("Enter the value for the parameter: new_value", "true".into()) // Args for specific_flip
.expect_input("Enter the value for the parameter: number", "2".into()) // Args for specific_flip
.expect_input("Value to transfer to the call:", "50".into()) // Only if payable
.expect_input("Enter the gas limit:", "".into()) // Only if call
.expect_input("Enter the proof size limit:", "".into()) // Only if call
- .expect_input("Signer calling the contract:", "//Alice".into())
+ .expect_confirm(USE_WALLET_PROMPT, true)
.expect_info(format!(
- "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message specific_flip --args \"true\", \"2\" --value 50 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --execute",
+ "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message specific_flip --args \"true\", \"2\" --value 50 --url wss://rpc1.paseo.popnetwork.xyz/ --use-wallet --execute",
temp_dir.path().join("testing").display().to_string(),
));
@@ -791,6 +883,7 @@ mod tests {
proof_size: None,
url: Url::parse(DEFAULT_URL)?,
suri: DEFAULT_URI.to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: false,
@@ -809,10 +902,11 @@ mod tests {
assert_eq!(call_config.proof_size, None);
assert_eq!(call_config.url.to_string(), "wss://rpc1.paseo.popnetwork.xyz/");
assert_eq!(call_config.suri, "//Alice");
+ assert!(call_config.use_wallet);
assert!(call_config.execute);
assert!(!call_config.dry_run);
assert_eq!(call_config.display(), format!(
- "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message specific_flip --args \"true\", \"2\" --value 50 --url wss://rpc1.paseo.popnetwork.xyz/ --suri //Alice --execute",
+ "pop call contract --path {} --contract 15XausWjFLBBFLDXUSBRfSfZk25warm4wZRV4ZxhZbfvjrJm --message specific_flip --args \"true\", \"2\" --value 50 --url wss://rpc1.paseo.popnetwork.xyz/ --use-wallet --execute",
temp_dir.path().join("testing").display().to_string(),
));
@@ -877,6 +971,7 @@ mod tests {
proof_size: None,
url: Url::parse(DEFAULT_URL)?,
suri: DEFAULT_URI.to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: true,
@@ -935,6 +1030,7 @@ mod tests {
proof_size: None,
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: false,
@@ -984,6 +1080,7 @@ mod tests {
proof_size: None,
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: false,
@@ -1002,6 +1099,7 @@ mod tests {
proof_size: None,
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: false,
@@ -1025,6 +1123,7 @@ mod tests {
proof_size: None,
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: false,
@@ -1055,6 +1154,7 @@ mod tests {
proof_size: None,
url: Url::parse("wss://rpc1.paseo.popnetwork.xyz")?,
suri: "//Alice".to_string(),
+ use_wallet: false,
dry_run: false,
execute: false,
dev_mode: false,
diff --git a/crates/pop-cli/src/commands/up/contract.rs b/crates/pop-cli/src/commands/up/contract.rs
index 40e158032..fed9c2068 100644
--- a/crates/pop-cli/src/commands/up/contract.rs
+++ b/crates/pop-cli/src/commands/up/contract.rs
@@ -2,23 +2,25 @@
use crate::{
cli::{traits::Cli as _, Cli},
- common::contracts::{check_contracts_node_and_prompt, has_contract_been_built},
+ common::{
+ contracts::{check_contracts_node_and_prompt, has_contract_been_built, terminate_node},
+ wallet::request_signature,
+ },
style::style,
};
use clap::Args;
-use cliclack::{confirm, log, log::error, spinner};
+use cliclack::{confirm, log, log::error, spinner, ProgressBar};
use console::{Emoji, Style};
use pop_contracts::{
build_smart_contract, dry_run_gas_estimate_instantiate, dry_run_upload,
- instantiate_smart_contract, is_chain_alive, parse_hex_bytes, run_contracts_node,
- set_up_deployment, set_up_upload, upload_smart_contract, UpOpts, Verbosity,
+ get_code_hash_from_event, get_contract_code, get_instantiate_payload, get_upload_payload,
+ instantiate_contract_signed, instantiate_smart_contract, is_chain_alive, parse_hex_bytes,
+ run_contracts_node, set_up_deployment, set_up_upload, upload_contract_signed,
+ upload_smart_contract, UpOpts, Verbosity,
};
use sp_core::Bytes;
use sp_weights::Weight;
-use std::{
- path::PathBuf,
- process::{Child, Command},
-};
+use std::path::PathBuf;
use tempfile::NamedTempFile;
use url::Url;
@@ -64,6 +66,15 @@ pub struct UpContractCommand {
/// - with a password "//Alice///SECRET_PASSWORD"
#[clap(short, long, default_value = "//Alice")]
suri: String,
+ /// Use a browser extension wallet to sign the extrinsic.
+ #[clap(
+ name = "use-wallet",
+ long,
+ default_value = "false",
+ short('w'),
+ conflicts_with = "suri"
+ )]
+ use_wallet: bool,
/// Perform a dry-run via RPC to estimate the gas usage. This does not submit a transaction.
#[clap(short = 'D', long)]
dry_run: bool,
@@ -164,10 +175,87 @@ impl UpContractCommand {
None
};
+ // Run steps for signing with wallet integration. Returns early.
+ if self.use_wallet {
+ let (call_data, hash) = match self.get_contract_data().await {
+ Ok(data) => data,
+ Err(e) => {
+ error(format!("An error occurred getting the call data: {e}"))?;
+ terminate_node(process)?;
+ Cli.outro_cancel(FAILED)?;
+ return Ok(());
+ },
+ };
+
+ let maybe_payload = request_signature(call_data, self.url.to_string()).await?;
+ if let Some(payload) = maybe_payload {
+ log::success("Signed payload received.")?;
+ let spinner = spinner();
+ spinner.start("Uploading contract...");
+
+ if self.upload_only {
+ let upload_result = match upload_contract_signed(self.url.as_str(), payload)
+ .await
+ {
+ Err(e) => {
+ spinner
+ .error(format!("An error occurred uploading your contract: {e}"));
+ terminate_node(process)?;
+ Cli.outro_cancel(FAILED)?;
+ return Ok(());
+ },
+ Ok(result) => result,
+ };
+
+ match get_code_hash_from_event(&upload_result, hash) {
+ Ok(r) => {
+ spinner.stop(format!("Contract uploaded: The code hash is {:?}", r));
+ },
+ Err(e) => {
+ spinner
+ .error(format!("An error occurred uploading your contract: {e}"));
+ },
+ };
+ } else {
+ let contract_info =
+ match instantiate_contract_signed(self.url.as_str(), payload).await {
+ Err(e) => {
+ spinner.error(format!(
+ "An error occurred uploading your contract: {e}"
+ ));
+ terminate_node(process)?;
+ Cli.outro_cancel(FAILED)?;
+ return Ok(());
+ },
+ Ok(result) => result,
+ };
+
+ let hash = contract_info.code_hash.map(|code_hash| format!("{:?}", code_hash));
+ display_contract_info(
+ &spinner,
+ contract_info.contract_address.to_string(),
+ hash,
+ );
+ };
+
+ if self.upload_only {
+ log::warning("NOTE: The contract has not been instantiated.")?;
+ }
+ } else {
+ Cli.outro_cancel("Signed payload doesn't exist.")?;
+ terminate_node(process)?;
+ return Ok(());
+ }
+
+ terminate_node(process)?;
+ Cli.outro(COMPLETE)?;
+ return Ok(());
+ }
+
// Check for upload only.
if self.upload_only {
let result = self.upload_contract().await;
- Self::terminate_node(process)?;
+ terminate_node(process)?;
match result {
Ok(_) => {
Cli.outro(COMPLETE)?;
@@ -180,23 +268,11 @@ impl UpContractCommand {
}
// Otherwise instantiate.
- let instantiate_exec = match set_up_deployment(UpOpts {
- path: self.path.clone(),
- constructor: self.constructor.clone(),
- args: self.args.clone(),
- value: self.value.clone(),
- gas_limit: self.gas_limit,
- proof_size: self.proof_size,
- salt: self.salt.clone(),
- url: self.url.clone(),
- suri: self.suri.clone(),
- })
- .await
- {
+ let instantiate_exec = match set_up_deployment(self.clone().into()).await {
Ok(i) => i,
Err(e) => {
error(format!("An error occurred instantiating the contract: {e}"))?;
- Self::terminate_node(process)?;
+ terminate_node(process)?;
Cli.outro_cancel(FAILED)?;
return Ok(());
},
@@ -214,7 +290,7 @@ impl UpContractCommand {
},
Err(e) => {
spinner.error(format!("{e}"));
- Self::terminate_node(process)?;
+ terminate_node(process)?;
Cli.outro_cancel(FAILED)?;
return Ok(());
},
@@ -226,30 +302,13 @@ impl UpContractCommand {
let spinner = spinner();
spinner.start("Uploading and instantiating the contract...");
let contract_info = instantiate_smart_contract(instantiate_exec, weight_limit).await?;
- spinner.stop(format!(
- "Contract deployed and instantiated:\n{}",
- style(format!(
- "{}\n{}",
- style(format!(
- "{} The contract address is {:?}",
- console::Emoji("●", ">"),
- contract_info.address
- ))
- .dim(),
- contract_info
- .code_hash
- .map(|hash| style(format!(
- "{} The contract code hash is {:?}",
- console::Emoji("●", ">"),
- hash
- ))
- .dim()
- .to_string())
- .unwrap_or_default(),
- ))
- .dim()
- ));
- Self::terminate_node(process)?;
+ display_contract_info(
+ &spinner,
+ contract_info.address.to_string(),
+ contract_info.code_hash,
+ );
+
+ terminate_node(process)?;
Cli.outro(COMPLETE)?;
}
@@ -291,27 +350,25 @@ impl UpContractCommand {
Ok(())
}
- /// Handles the optional termination of a local running node.
- fn terminate_node(process: Option<(Child, NamedTempFile)>) -> anyhow::Result<()> {
- // Prompt to close any launched node
- let Some((process, log)) = process else {
- return Ok(());
- };
- if confirm("Would you like to terminate the local node?")
- .initial_value(true)
- .interact()?
- {
- // Stop the process contracts-node
- Command::new("kill")
- .args(["-s", "TERM", &process.id().to_string()])
- .spawn()?
- .wait()?;
+ // get the call data and contract code hash
+ async fn get_contract_data(&self) -> anyhow::Result<(Vec, [u8; 32])> {
+ let contract_code = get_contract_code(self.path.as_ref())?;
+ let hash = contract_code.code_hash();
+ if self.upload_only {
+ let call_data = get_upload_payload(contract_code, self.url.as_str()).await?;
+ Ok((call_data, hash))
} else {
- log.keep()?;
- log::warning(format!("NOTE: The node is running in the background with process ID {}. Please terminate it manually when done.", process.id()))?;
- }
+ let instantiate_exec = set_up_deployment(self.clone().into()).await?;
- Ok(())
+ let weight_limit = if self.gas_limit.is_some() && self.proof_size.is_some() {
+ Weight::from_parts(self.gas_limit.unwrap(), self.proof_size.unwrap())
+ } else {
+ // Frontend will do dry run and update call data.
+ Weight::zero()
+ };
+ let call_data = get_instantiate_payload(instantiate_exec, weight_limit)?;
+ Ok((call_data, hash))
+ }
}
}
@@ -331,14 +388,44 @@ impl From for UpOpts {
}
}
+fn display_contract_info(spinner: &ProgressBar, address: String, code_hash: Option) {
+ spinner.stop(format!(
+ "Contract deployed and instantiated:\n{}",
+ style(format!(
+ "{}\n{}",
+ style(format!("{} The contract address is {:?}", console::Emoji("●", ">"), address))
+ .dim(),
+ code_hash
+ .map(|hash| style(format!(
+ "{} The contract code hash is {:?}",
+ console::Emoji("●", ">"),
+ hash
+ ))
+ .dim()
+ .to_string())
+ .unwrap_or_default(),
+ ))
+ .dim()
+ ));
+}
+
#[cfg(test)]
mod tests {
use super::*;
+ use pop_common::{find_free_port, set_executable_permission};
+ use pop_contracts::{contracts_node_generator, mock_build_process, new_environment};
+ use std::{
+ env,
+ process::{Child, Command},
+ time::Duration,
+ };
+ use subxt::{tx::Payload, SubstrateConfig};
+ use tempfile::TempDir;
+ use tokio::time::sleep;
use url::Url;
- #[test]
- fn conversion_up_contract_command_to_up_opts_works() -> anyhow::Result<()> {
- let command = UpContractCommand {
+ fn default_up_contract_command() -> UpContractCommand {
+ UpContractCommand {
path: None,
constructor: "new".to_string(),
args: vec![],
@@ -346,12 +433,40 @@ mod tests {
gas_limit: None,
proof_size: None,
salt: None,
- url: Url::parse("ws://localhost:9944")?,
+ url: Url::parse("ws://localhost:9944").expect("default url is valid"),
suri: "//Alice".to_string(),
dry_run: false,
upload_only: false,
skip_confirm: false,
- };
+ use_wallet: false,
+ }
+ }
+
+ async fn start_test_environment() -> anyhow::Result<(Child, u16, TempDir)> {
+ let random_port = find_free_port(None);
+ let temp_dir = new_environment("testing")?;
+ let current_dir = env::current_dir().expect("Failed to get current directory");
+ mock_build_process(
+ temp_dir.path().join("testing"),
+ current_dir.join("../pop-contracts/tests/files/testing.contract"),
+ current_dir.join("../pop-contracts/tests/files/testing.json"),
+ )?;
+ let cache = temp_dir.path().join("");
+ let binary = contracts_node_generator(cache.clone(), None).await?;
+ binary.source(false, &(), true).await?;
+ set_executable_permission(binary.path())?;
+ let process = run_contracts_node(binary.path(), None, random_port).await?;
+ Ok((process, random_port, temp_dir))
+ }
+
+ fn stop_test_environment(id: &str) -> anyhow::Result<()> {
+ Command::new("kill").args(["-s", "TERM", id]).spawn()?.wait()?;
+ Ok(())
+ }
+
+ #[test]
+ fn conversion_up_contract_command_to_up_opts_works() -> anyhow::Result<()> {
+ let command = default_up_contract_command();
let opts: UpOpts = command.into();
assert_eq!(
opts,
@@ -369,4 +484,108 @@ mod tests {
);
Ok(())
}
+
+ #[tokio::test]
+ async fn get_upload_and_instantiate_call_data_works() -> anyhow::Result<()> {
+ let (contracts_node_process, port, temp_dir) = start_test_environment().await?;
+ sleep(Duration::from_secs(5)).await;
+
+ get_upload_call_data_works(port, temp_dir.path().join("testing")).await?;
+ get_instantiate_call_data_works(port, temp_dir.path().join("testing")).await?;
+
+ // Stop running contracts-node
+ stop_test_environment(&contracts_node_process.id().to_string())?;
+ Ok(())
+ }
+
+ async fn get_upload_call_data_works(port: u16, temp_dir: PathBuf) -> anyhow::Result<()> {
+ let localhost_url = format!("ws://127.0.0.1:{}", port);
+
+ let up_contract_opts = UpContractCommand {
+ path: Some(temp_dir),
+ constructor: "new".to_string(),
+ args: vec![],
+ value: "0".to_string(),
+ gas_limit: None,
+ proof_size: None,
+ salt: None,
+ url: Url::parse(&localhost_url).expect("given url is valid"),
+ suri: "//Alice".to_string(),
+ dry_run: false,
+ upload_only: true,
+ skip_confirm: true,
+ use_wallet: true,
+ };
+
+ let rpc_client = subxt::backend::rpc::RpcClient::from_url(&up_contract_opts.url).await?;
+ let client = subxt::OnlineClient::::from_rpc_client(rpc_client).await?;
+
+ // Retrieve call data based on the above command options.
+ let (retrieved_call_data, _) = match up_contract_opts.get_contract_data().await {
+ Ok(data) => data,
+ Err(e) => {
+ error(format!("An error occurred getting the call data: {e}"))?;
+ return Err(e);
+ },
+ };
+ // We have retrieved some payload.
+ assert!(!retrieved_call_data.is_empty());
+
+ // Craft encoded call data for an upload code call.
+ let contract_code = get_contract_code(up_contract_opts.path.as_ref())?;
+ let storage_deposit_limit: Option = None;
+ let upload_code = contract_extrinsics::extrinsic_calls::UploadCode::new(
+ contract_code,
+ storage_deposit_limit,
+ contract_extrinsics::upload::Determinism::Enforced,
+ );
+ let expected_call_data = upload_code.build();
+ let mut encoded_expected_call_data = Vec::::new();
+ expected_call_data
+ .encode_call_data_to(&client.metadata(), &mut encoded_expected_call_data)?;
+
+ // Retrieved call data and calculated match.
+ assert_eq!(retrieved_call_data, encoded_expected_call_data);
+ Ok(())
+ }
+
+ async fn get_instantiate_call_data_works(port: u16, temp_dir: PathBuf) -> anyhow::Result<()> {
+ let localhost_url = format!("ws://127.0.0.1:{}", port);
+
+ let up_contract_opts = UpContractCommand {
+ path: Some(temp_dir),
+ constructor: "new".to_string(),
+ args: vec!["false".to_string()],
+ value: "0".to_string(),
+ gas_limit: Some(200_000_000),
+ proof_size: Some(30_000),
+ salt: None,
+ url: Url::parse(&localhost_url).expect("given url is valid"),
+ suri: "//Alice".to_string(),
+ dry_run: false,
+ upload_only: false,
+ skip_confirm: true,
+ use_wallet: true,
+ };
+
+ // Retrieve call data based on the above command options.
+ let (retrieved_call_data, _) = match up_contract_opts.get_contract_data().await {
+ Ok(data) => data,
+ Err(e) => {
+ error(format!("An error occurred getting the call data: {e}"))?;
+ return Err(e);
+ },
+ };
+ // We have retrieved some payload.
+ assert!(!retrieved_call_data.is_empty());
+
+ // Craft instantiate call data.
+ let weight = Weight::from_parts(200_000_000, 30_000);
+ let expected_call_data =
+ get_instantiate_payload(set_up_deployment(up_contract_opts.into()).await?, weight)?;
+ // Retrieved call data matches the one crafted above.
+ assert_eq!(retrieved_call_data, expected_call_data);
+
+ Ok(())
+ }
}
diff --git a/crates/pop-cli/src/common/contracts.rs b/crates/pop-cli/src/common/contracts.rs
index 3d0be11f6..c353d196e 100644
--- a/crates/pop-cli/src/common/contracts.rs
+++ b/crates/pop-cli/src/common/contracts.rs
@@ -3,7 +3,11 @@
use cliclack::{confirm, log::warning, spinner};
use pop_common::{manifest::from_path, sourcing::set_executable_permission};
use pop_contracts::contracts_node_generator;
-use std::path::{Path, PathBuf};
+use std::{
+ path::{Path, PathBuf},
+ process::{Child, Command},
+};
+use tempfile::NamedTempFile;
/// Checks the status of the `substrate-contracts-node` binary, sources it if necessary, and
/// prompts the user to update it if the existing binary is not the latest version.
@@ -68,6 +72,29 @@ pub async fn check_contracts_node_and_prompt(skip_confirm: bool) -> anyhow::Resu
Ok(node_path)
}
+/// Handles the optional termination of a local running node.
+pub fn terminate_node(process: Option<(Child, NamedTempFile)>) -> anyhow::Result<()> {
+ // Prompt to close any launched node
+ let Some((process, log)) = process else {
+ return Ok(());
+ };
+ if confirm("Would you like to terminate the local node?")
+ .initial_value(true)
+ .interact()?
+ {
+ // Stop the process contracts-node
+ Command::new("kill")
+ .args(["-s", "TERM", &process.id().to_string()])
+ .spawn()?
+ .wait()?;
+ } else {
+ log.keep()?;
+ warning(format!("NOTE: The node is running in the background with process ID {}. Please terminate it manually when done.", process.id()))?;
+ }
+
+ Ok(())
+}
+
/// Checks if a contract has been built by verifying the existence of the build directory and the
/// .contract file.
///
diff --git a/crates/pop-cli/src/common/mod.rs b/crates/pop-cli/src/common/mod.rs
index 1cb3ee579..4a89036e5 100644
--- a/crates/pop-cli/src/common/mod.rs
+++ b/crates/pop-cli/src/common/mod.rs
@@ -3,3 +3,4 @@
#[cfg(feature = "contract")]
pub mod contracts;
pub mod helpers;
+pub mod wallet;
diff --git a/crates/pop-cli/src/common/wallet.rs b/crates/pop-cli/src/common/wallet.rs
new file mode 100644
index 000000000..1aedd0294
--- /dev/null
+++ b/crates/pop-cli/src/common/wallet.rs
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier: GPL-3.0
+
+use crate::{
+ cli::traits::Cli,
+ wallet_integration::{FrontendFromString, TransactionData, WalletIntegrationManager},
+};
+use cliclack::{log, spinner};
+
+/// The prompt to ask the user if they want to use the wallet for signing.
+pub const USE_WALLET_PROMPT: &str = "Do you want to use your browser wallet to sign the extrinsic? (Selecting 'No' will prompt you to manually enter the secret key URI for signing, e.g., '//Alice')";
+
+/// Launches the wallet integration for in-browser signing. Blocks until the signature is received.
+///
+/// # Arguments
+/// * `call_data` - The call data to be signed.
+/// * `url` - Chain rpc.
+/// # Returns
+/// * The signed payload, if it exists.
+pub async fn request_signature(call_data: Vec, rpc: String) -> anyhow::Result