Commit 03e4da95 authored by Sasha Gryaznov's avatar Sasha Gryaznov
Browse files

Merge branch 'master' into ag-decode-cmd

parents 1f24d5be ceebfcff
Pipeline #188053 failed with stages
in 7 seconds
......@@ -206,9 +206,9 @@ dependencies = [
[[package]]
name = "async-std"
version = "1.10.0"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952"
checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c"
dependencies = [
"async-attributes",
"async-channel",
......@@ -483,14 +483,14 @@ dependencies = [
"hex",
"impl-serde",
"indexmap",
"ink_env",
"ink_env 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ink_lang",
"ink_lang_codegen",
"ink_metadata",
"ink_primitives",
"ink_metadata 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ink_primitives 3.0.1",
"ink_storage",
"itertools",
"jsonrpsee 0.9.0",
"jsonrpsee 0.10.1",
"log",
"nom",
"nom-supreme",
......@@ -1420,6 +1420,15 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "ink_allocator"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "156d1399accf10640ba7e712a4c5b68b938b57aae14f4698ed9a43b113bdde11"
dependencies = [
"cfg-if",
]
[[package]]
name = "ink_engine"
version = "3.0.1"
......@@ -1433,19 +1442,61 @@ dependencies = [
"sha3",
]
[[package]]
name = "ink_engine"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b3d2da83b1a6a121fc6a1d7d9b49a3273a3b9663e0ed3d486c6940890f6f718"
dependencies = [
"blake2",
"derive_more",
"parity-scale-codec",
"rand 0.8.5",
"secp256k1 0.22.1",
"sha2 0.10.2",
"sha3",
]
[[package]]
name = "ink_env"
version = "3.0.1"
dependencies = [
"arrayref",
"blake2",
"cfg-if",
"derive_more",
"ink_allocator 3.0.1",
"ink_engine 3.0.1",
"ink_metadata 3.0.1",
"ink_prelude 3.0.1",
"ink_primitives 3.0.1",
"num-traits",
"parity-scale-codec",
"paste",
"rand 0.8.5",
"rlibc",
"scale-info",
"secp256k1 0.22.1",
"sha2 0.10.2",
"sha3",
"static_assertions",
]
[[package]]
name = "ink_env"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5d465fe08377a1d92063ff6b3fa222ab337001bc70de1941884dbc8d7a7e599"
dependencies = [
"arrayref",
"blake2",
"cfg-if",
"derive_more",
"ink_allocator",
"ink_engine",
"ink_metadata",
"ink_prelude",
"ink_primitives",
"ink_allocator 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ink_engine 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ink_metadata 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ink_prelude 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ink_primitives 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits",
"parity-scale-codec",
"paste",
......@@ -1462,7 +1513,7 @@ dependencies = [
name = "ink_eth_compatibility"
version = "3.0.1"
dependencies = [
"ink_env",
"ink_env 3.0.1",
"libsecp256k1",
]
......@@ -1471,12 +1522,12 @@ name = "ink_lang"
version = "3.0.1"
dependencies = [
"derive_more",
"ink_env",
"ink_env 3.0.1",
"ink_eth_compatibility",
"ink_lang_macro",
"ink_metadata",
"ink_prelude",
"ink_primitives",
"ink_metadata 3.0.1",
"ink_prelude 3.0.1",
"ink_primitives 3.0.1",
"ink_storage",
"parity-scale-codec",
]
......@@ -1516,7 +1567,7 @@ version = "3.0.1"
dependencies = [
"ink_lang_codegen",
"ink_lang_ir",
"ink_primitives",
"ink_primitives 3.0.1",
"parity-scale-codec",
"proc-macro2",
"syn",
......@@ -1528,15 +1579,38 @@ version = "3.0.1"
dependencies = [
"derive_more",
"impl-serde",
"ink_prelude",
"ink_primitives",
"ink_prelude 3.0.1",
"ink_primitives 3.0.1",
"scale-info",
"serde",
]
[[package]]
name = "ink_metadata"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fbe60facb61034f78367fc30dc56bd5e385487ce60aefd0b1727e6b680446dc"
dependencies = [
"derive_more",
"impl-serde",
"ink_prelude 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ink_primitives 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"scale-info",
"serde",
]
[[package]]
name = "ink_prelude"
version = "3.0.1"
dependencies = [
"cfg-if",
]
[[package]]
name = "ink_prelude"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4917e51ffd6374c7be1cb030e89607a7b9384f331d47bfa7589750ff8f27fd7f"
dependencies = [
"cfg-if",
]
......@@ -1546,7 +1620,19 @@ name = "ink_primitives"
version = "3.0.1"
dependencies = [
"cfg-if",
"ink_prelude",
"ink_prelude 3.0.1",
"parity-scale-codec",
"scale-info",
]
[[package]]
name = "ink_primitives"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1793c77ab7354147a4a0de3e0a77a31a29bf6fbd5f97192b8202c3ce2587699"
dependencies = [
"cfg-if",
"ink_prelude 3.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-scale-codec",
"scale-info",
]
......@@ -1558,10 +1644,10 @@ dependencies = [
"array-init",
"cfg-if",
"derive_more",
"ink_env",
"ink_metadata",
"ink_prelude",
"ink_primitives",
"ink_env 3.0.1",
"ink_metadata 3.0.1",
"ink_prelude 3.0.1",
"ink_primitives 3.0.1",
"ink_storage_derive",
"parity-scale-codec",
"scale-info",
......@@ -1627,72 +1713,72 @@ dependencies = [
[[package]]
name = "jsonrpsee"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05fd8cd6c6b1bbd06881d2cf88f1fc83cc36c98f2219090f839115fb4a956cb9"
checksum = "f0d0b8cc1959f8c05256ace093b2317482da9127f1d9227564f47e7e6bf9bda8"
dependencies = [
"jsonrpsee-client-transport 0.8.0",
"jsonrpsee-core 0.8.0",
"jsonrpsee-client-transport 0.9.0",
"jsonrpsee-core 0.9.0",
]
[[package]]
name = "jsonrpsee"
version = "0.9.0"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0d0b8cc1959f8c05256ace093b2317482da9127f1d9227564f47e7e6bf9bda8"
checksum = "91dc760c341fa81173f9a434931aaf32baad5552b0230cc6c93e8fb7eaad4c19"
dependencies = [
"jsonrpsee-core 0.9.0",
"jsonrpsee-types 0.9.0",
"jsonrpsee-core 0.10.1",
"jsonrpsee-types 0.10.1",
"jsonrpsee-ws-client",
]
[[package]]
name = "jsonrpsee-client-transport"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3303cdf246e6ab76e2866fb3d9acb6c76a068b1b28bd923a1b7a8122257ad7b5"
checksum = "fa370c2c717d798c3c0a315ae3f0a707a388c6963c11f9da7dbbe1d3f7392f5f"
dependencies = [
"futures",
"http",
"jsonrpsee-core 0.8.0",
"jsonrpsee-types 0.8.0",
"jsonrpsee-core 0.9.0",
"jsonrpsee-types 0.9.0",
"pin-project",
"rustls-native-certs",
"soketto",
"thiserror",
"tokio",
"tokio-rustls",
"tokio-util",
"tokio-util 0.6.9",
"tracing",
"webpki-roots",
]
[[package]]
name = "jsonrpsee-client-transport"
version = "0.9.0"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa370c2c717d798c3c0a315ae3f0a707a388c6963c11f9da7dbbe1d3f7392f5f"
checksum = "765f7a36d5087f74e3b3b47805c2188fef8eb54afcb587b078d9f8ebfe9c7220"
dependencies = [
"futures",
"http",
"jsonrpsee-core 0.9.0",
"jsonrpsee-types 0.9.0",
"jsonrpsee-core 0.10.1",
"jsonrpsee-types 0.10.1",
"pin-project",
"rustls-native-certs",
"soketto",
"thiserror",
"tokio",
"tokio-rustls",
"tokio-util",
"tokio-util 0.7.1",
"tracing",
"webpki-roots",
]
[[package]]
name = "jsonrpsee-core"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f220b5a238dc7992b90f1144fbf6eaa585872c9376afe6fe6863ffead6191bf3"
checksum = "22abc3274b265dcefe2e26c4beecf9fda4fffa48cf94930443a6c73678f020d5"
dependencies = [
"anyhow",
"arrayvec 0.7.2",
......@@ -1701,7 +1787,7 @@ dependencies = [
"futures-channel",
"futures-util",
"hyper",
"jsonrpsee-types 0.8.0",
"jsonrpsee-types 0.9.0",
"rustc-hash",
"serde",
"serde_json",
......@@ -1713,9 +1799,9 @@ dependencies = [
[[package]]
name = "jsonrpsee-core"
version = "0.9.0"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22abc3274b265dcefe2e26c4beecf9fda4fffa48cf94930443a6c73678f020d5"
checksum = "82ef77ecd20c2254d54f5da8c0738eacca61e6b6511268a8f2753e3148c6c706"
dependencies = [
"anyhow",
"arrayvec 0.7.2",
......@@ -1724,7 +1810,7 @@ dependencies = [
"futures-channel",
"futures-util",
"hyper",
"jsonrpsee-types 0.9.0",
"jsonrpsee-types 0.10.1",
"rustc-hash",
"serde",
"serde_json",
......@@ -1736,9 +1822,9 @@ dependencies = [
[[package]]
name = "jsonrpsee-types"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1b3f601bbbe45cd63f5407b6f7d7950e08a7d4f82aa699ff41a4a5e9e54df58"
checksum = "9f4c45d2e2aa1db4c7d7d7dbaabc10a5b5258d99cd9d42fbfd5260b76f80c324"
dependencies = [
"anyhow",
"beef",
......@@ -1750,9 +1836,9 @@ dependencies = [
[[package]]
name = "jsonrpsee-types"
version = "0.9.0"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f4c45d2e2aa1db4c7d7d7dbaabc10a5b5258d99cd9d42fbfd5260b76f80c324"
checksum = "38b6aa52f322cbf20c762407629b8300f39bcc0cf0619840d9252a2f65fd2dd9"
dependencies = [
"anyhow",
"beef",
......@@ -1764,13 +1850,13 @@ dependencies = [
[[package]]
name = "jsonrpsee-ws-client"
version = "0.9.0"
version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31b58983485b2b626c276f1eb367d62dae82132451b281072a7bfa536a33ddf3"
checksum = "dd66d18bab78d956df24dd0d2e41e4c00afbb818fda94a98264bdd12ce8506ac"
dependencies = [
"jsonrpsee-client-transport 0.9.0",
"jsonrpsee-core 0.9.0",
"jsonrpsee-types 0.9.0",
"jsonrpsee-client-transport 0.10.1",
"jsonrpsee-core 0.10.1",
"jsonrpsee-types 0.10.1",
]
[[package]]
......@@ -2670,9 +2756,9 @@ dependencies = [
[[package]]
name = "scale-info"
version = "2.0.1"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0563970d79bcbf3c537ce3ad36d859b30d36fc5b190efd227f1f7a84d7cf0d42"
checksum = "21fe4ca2b2295d5519b364579162b8e18f4902f6c9e8a975e7d05e7ef63622f5"
dependencies = [
"bitvec",
"cfg-if",
......@@ -2684,9 +2770,9 @@ dependencies = [
[[package]]
name = "scale-info-derive"
version = "2.0.0"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7805950c36512db9e3251c970bb7ac425f326716941862205d612ab3b5e46e2"
checksum = "e767e52f2d5b2e71e86b1c82976bf4c3acdef88d72af7fa3498cef31cd9708cb"
dependencies = [
"proc-macro-crate 1.1.3",
"proc-macro2",
......@@ -3338,9 +3424,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]]
name = "subxt"
version = "0.19.0"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da729d136eac5e53eb54d11aa61bae0cd0c8d3822226b8fe49e6fade269c8c84"
checksum = "cc99c89f8e581c6e8b3e6923e66512041d908180efee7cb026b2ccd5f0334218"
dependencies = [
"async-trait",
"bitvec",
......@@ -3349,7 +3435,7 @@ dependencies = [
"frame-metadata",
"futures",
"hex",
"jsonrpsee 0.8.0",
"jsonrpsee 0.9.0",
"log",
"parity-scale-codec",
"scale-info",
......@@ -3363,9 +3449,9 @@ dependencies = [
[[package]]
name = "subxt-codegen"
version = "0.19.0"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bf09d0dbc6ba8c36beeae0784eaf256f353ea8a870be646cd33b2c5255df5b7"
checksum = "74283176932f38c579311f65f4138ff2817a3bd1040250055fbd1f3857027cbb"
dependencies = [
"async-trait",
"darling",
......@@ -3382,9 +3468,9 @@ dependencies = [
[[package]]
name = "subxt-macro"
version = "0.19.0"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e683ca8888e5da50dce8d3715c48ca66fe3495936743ffb7a1de34737ec0ff41"
checksum = "6bb844cf84cdae36fc337810569cc39e3e022c17cc2ed11031c66d0e09b73726"
dependencies = [
"async-trait",
"darling",
......@@ -3588,6 +3674,20 @@ dependencies = [
"tokio",
]
[[package]]
name = "tokio-util"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764"
dependencies = [
"bytes",
"futures-core",
"futures-io",
"futures-sink",
"pin-project-lite",
"tokio",
]
[[package]]
name = "toml"
version = "0.5.8"
......
......@@ -48,17 +48,17 @@ impl-serde = "0.3.2"
regex = "1.5.5"
# dependencies for extrinsics (deploying and calling a contract)
async-std = { version = "1.10.0", features = ["attributes", "tokio1"] }
ink_metadata = { path="../ink/crates/metadata/", features = ["derive"] }
ink_env = {path="../ink/crates/env/"}
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
async-std = { version = "1.11.0", features = ["attributes", "tokio1"] }
ink_metadata = { version = "3.0", features = ["derive"] }
ink_env = "3.0"
scale-info = { version = "2.1.0", default-features = false, features = ["derive"] }
sp-core = "6.0.0"
sp-runtime = "6.0.0"
pallet-contracts-primitives = "6.0.0"
subxt = "0.19.0"
subxt = "0.20.0"
futures = "0.3.19"
hex = "0.4.3"
jsonrpsee = { version = "0.9.0", features = ["ws-client"] }
jsonrpsee = { version = "0.10.1", features = ["ws-client"] }
nom = "7.1.1"
nom-supreme = { version = "0.7.0", features = ["error"] }
indexmap = "1.8.1"
......
......@@ -83,12 +83,10 @@ pub struct BuildCommand {
///
/// - `code-only`: Only the Wasm is created, generation of metadata and a bundled
/// `<name>.contract` file is skipped.
#[clap(
long = "generate",
default_value = "all",
value_name = "all | code-only",
verbatim_doc_comment
)]
///
/// - `check-only`: No artifacts produced: runs the `cargo check` command for the Wasm target,
/// only checks for compilation errors.
#[clap(long = "generate", arg_enum, default_value = "all")]
build_artifact: BuildArtifacts,
#[clap(flatten)]
verbosity: VerbosityFlags,
......
......@@ -25,7 +25,7 @@ use jsonrpsee::{core::client::ClientT, rpc_params, ws_client::WsClientBuilder};
use serde::Serialize;
use sp_core::Bytes;
use std::fmt::Debug;
use subxt::{rpc::NumberOrHex, ClientBuilder, Config, DefaultConfig, Signer};
use subxt::{rpc::NumberOrHex, ClientBuilder, Config, DefaultConfig};
type ContractExecResult = pallet_contracts_primitives::ContractExecResult<Balance>;
......@@ -144,7 +144,7 @@ impl CallCommand {
self.extrinsic_opts.storage_deposit_limit,
data,
)
.sign_and_submit_then_watch(signer)
.sign_and_submit_then_watch_default(signer)
.await?;
let result = wait_for_success_and_handle_error(tx_progress).await?;
......
......@@ -29,7 +29,7 @@ use std::{
fs,
path::{Path, PathBuf},
};
use subxt::{rpc::NumberOrHex, ClientBuilder, Config, DefaultConfig, Signer};
use subxt::{rpc::NumberOrHex, ClientBuilder, Config, DefaultConfig};
type ContractInstantiateResult =
pallet_contracts_primitives::ContractInstantiateResult<ContractAccount, Balance>;
......@@ -230,7 +230,7 @@ impl<'a> Exec<'a> {
self.args.data.clone(),
self.args.salt.0.clone(),
)
.sign_and_submit_then_watch(&self.signer)
.sign_and_submit_then_watch_default(&self.signer)
.await?;
let result = wait_for_success_and_handle_error(tx_progress).await?;
......@@ -262,7 +262,7 @@ impl<'a> Exec<'a> {
self.args.data.clone(),
self.args.salt.0.clone(),
)
.sign_and_submit_then_watch(&self.signer)
.sign_and_submit_then_watch_default(&self.signer)
.await?;
let result = wait_for_success_and_handle_error(tx_progress).await?;
......
......@@ -46,8 +46,8 @@ pub use upload::UploadCommand;
type Balance = u128;
type CodeHash = <DefaultConfig as Config>::Hash;
type ContractAccount = <DefaultConfig as Config>::AccountId;
type PairSigner = subxt::PairSigner<DefaultConfig, SignedExtra, sp_core::sr25519::Pair>;
type SignedExtra = subxt::DefaultExtra<DefaultConfig>;
type PairSigner = subxt::PairSigner<DefaultConfig, sp_core::sr25519::Pair>;
type SignedExtra = subxt::SubstrateExtrinsicParams<DefaultConfig>;
type RuntimeApi = runtime_api::api::RuntimeApi<DefaultConfig, SignedExtra>;
/// Arguments required for creating and sending an extrinsic to a substrate node.
......
......@@ -24,7 +24,7 @@ use jsonrpsee::{core::client::ClientT, rpc_params, ws_client::WsClientBuilder};
use serde::Serialize;
use sp_core::Bytes;
use std::{fmt::Debug, path::PathBuf};
use subxt::{rpc::NumberOrHex, ClientBuilder, Config, DefaultConfig, Signer};
use subxt::{rpc::NumberOrHex, ClientBuilder, Config, DefaultConfig};
type CodeUploadResult = pallet_contracts_primitives::CodeUploadResult<CodeHash, Balance>;
type CodeUploadReturnValue = pallet_contracts_primitives::CodeUploadReturnValue<CodeHash, Balance>;
......@@ -114,7 +114,7 @@ impl UploadCommand {
.tx()
.contracts()
.upload_code(code, self.extrinsic_opts.storage_deposit_limit)
.sign_and_submit_then_watch(signer)
.sign_and_submit_then_watch_default(signer)
.await?;
let result = wait_for_success_and_handle_error(tx_progress).await?;
......
......@@ -209,15 +209,19 @@ impl TryFrom<&UnstableOptions> for UnstableFlags {
}
/// Describes which artifacts to generate
#[derive(Copy, Clone, Eq, PartialEq, Debug, Subcommand, serde::Serialize)]
#[derive(Copy, Clone, Eq, PartialEq, Debug, clap::ArgEnum, serde::Serialize)]
#[clap(name = "build-artifacts")]
pub enum BuildArtifacts {
/// Generate the Wasm, the metadata and a bundled `<name>.contract` file
#[clap(name = "all")]
All,
/// Only the Wasm is created, generation of metadata and a bundled `<name>.contract` file is skipped
/// Only the Wasm is created, generation of metadata and a bundled `<name>.contract` file is
/// skipped
#[clap(name = "code-only")]
CodeOnly,
/// No artifacts produced: runs the `cargo check` command for the Wasm target, only checks for
/// compilation errors.
#[clap(name = "check-only")]
CheckOnly,
}
......@@ -233,17 +237,6 @@ impl BuildArtifacts {
}
}
impl std::str::FromStr for BuildArtifacts {
type Err = String;
fn from_str(artifact: &str) -> Result<Self, Self::Err> {
match artifact {
"all" => Ok(BuildArtifacts::All),
"code-only" => Ok(BuildArtifacts::CodeOnly),
_ => Err("Could not parse build artifact".to_string()),
}
}
}
impl Default for BuildArtifacts {
fn default() -> Self {
BuildArtifacts::All
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment