Commit 72c1f187 authored by Andrew Jones's avatar Andrew Jones Committed by Hero Bird
Browse files

Update to subxt v0.3 (#275)

* Update to subxt v0.3

* rustfmt

* bump cargo-contract version
parent ef20c62f
Pipeline #69985 failed with stages
in 28 minutes and 8 seconds
[package]
name = "cargo-contract"
version = "0.1.2"
version = "0.2.0"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"
edition = "2018"
......@@ -29,7 +29,7 @@ pwasm-utils = "0.12"
parity-wasm = "0.41"
cargo_metadata = "0.9"
substrate-primitives = { git = "https://github.com/paritytech/substrate/", package = "substrate-primitives" }
subxt = { git = "https://github.com/paritytech/substrate-subxt/", branch = "v0.2", package = "substrate-subxt" }
subxt = { git = "https://github.com/paritytech/substrate-subxt/", branch = "v0.3", package = "substrate-subxt" }
tokio = "0.1.21"
url = "1.7"
......
......@@ -25,7 +25,7 @@ use substrate_primitives::{
H256,
};
use subxt::{
contracts::ContractsXt,
contracts,
system::System,
DefaultNodeRuntime,
};
......@@ -90,10 +90,7 @@ pub(crate) fn execute_deploy(
.set_url(url)
.build()
.and_then(|cli| cli.xt(signer, None))
.and_then(move |xt| {
xt.contracts(|call| call.put_code(gas, code))
.submit_and_watch()
});
.and_then(move |xt| xt.submit_and_watch(contracts::put_code(gas, code)));
let mut rt = tokio::runtime::Runtime::new()?;
let extrinsic_success = rt.block_on(fut)?;
......
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