Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.13 #175

Merged
merged 14 commits into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Version 0.13.0
* Update to Substrate 2.0.0 [#173](https://github.com/paritytech/substrate-subxt/pull/173)
* Display RawEvent data in hex [#168](https://github.com/paritytech/substrate-subxt/pull/168)
* Add SudoUncheckedWeightCall [#167](https://github.com/paritytech/substrate-subxt/pull/167)
* Add Add SetCodeWithoutChecksCall [#166](https://github.com/paritytech/substrate-subxt/pull/166)
* Improve contracts pallet tests [#163](https://github.com/paritytech/substrate-subxt/pull/163)
* Make Metadata types public [#162](https://github.com/paritytech/substrate-subxt/pull/162)
* Fix option decoding and add basic sanity test [#161](https://github.com/paritytech/substrate-subxt/pull/161)
* Add staking support [#160](https://github.com/paritytech/substrate-subxt/pull/161)
* Decode option event arg [#158](https://github.com/paritytech/substrate-subxt/pull/158)

dvdplm marked this conversation as resolved.
Show resolved Hide resolved
# Version 0.12.0

* Only return an error if the extrinsic failed. [#156](https://github.com/paritytech/substrate-subxt/pull/156)
Expand Down Expand Up @@ -61,4 +72,3 @@

* First release
* All substrate dependencies upgraded to `alpha.5`

48 changes: 24 additions & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "client", "proc-macro", "test-node"]

[package]
name = "substrate-subxt"
version = "0.12.0"
version = "0.13.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

Expand Down Expand Up @@ -34,34 +34,34 @@ serde_json = "1.0.57"
url = "2.1.1"
codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive", "full"] }

frame-metadata = { version = "11.0.0-rc6", package = "frame-metadata" }
frame-support = { version = "2.0.0-rc6", package = "frame-support" }
sp-runtime = { version = "2.0.0-rc6", package = "sp-runtime" }
sp-version = { version = "2.0.0-rc6", package = "sp-version" }
pallet-indices = { version = "2.0.0-rc6", package = "pallet-indices" }
frame-metadata = { version = "12", package = "frame-metadata" }
frame-support = { version = "2.0.0", package = "frame-support" }
sp-runtime = { version = "2.0.0", package = "sp-runtime" }
sp-version = { version = "2.0.0", package = "sp-version" }
pallet-indices = { version = "2.0.0", package = "pallet-indices" }
hex = "0.4.2"
sp-std = "2.0.0-rc6"
application-crypto = { version = "2.0.0-rc6", package = "sp-application-crypto" }
sp-finality-grandpa = "2.0.0-rc6"
sp-consensus-babe = "0.8.0-rc6"
pallet-im-online = "2.0.0-rc6"
sp-authority-discovery = "2.0.0-rc6"
pallet-staking = "2.0.0-rc6"
sp-std = "2.0.0"
application-crypto = { version = "2.0.0", package = "sp-application-crypto" }
sp-finality-grandpa = "2.0.0"
sp-consensus-babe = "0.8.0"
pallet-im-online = "2.0.0"
sp-authority-discovery = "2.0.0"
pallet-staking = "2.0.0"

sp-rpc = { version = "2.0.0-rc6", package = "sp-rpc" }
sp-core = { version = "2.0.0-rc6", package = "sp-core" }
sc-rpc-api = { version = "0.8.0-rc6", package = "sc-rpc-api" }
sp-transaction-pool = { version = "2.0.0-rc6", package = "sp-transaction-pool" }
substrate-subxt-client = { version = "0.4.0", path = "client", optional = true }
substrate-subxt-proc-macro = { version = "0.12.0", path = "proc-macro" }
sp-rpc = { version = "2.0.0", package = "sp-rpc" }
sp-core = { version = "2.0.0", package = "sp-core" }
sc-rpc-api = { version = "0.8.0", package = "sc-rpc-api" }
sp-transaction-pool = { version = "2.0.0", package = "sp-transaction-pool" }
substrate-subxt-client = { version = "0.5.0", path = "client", optional = true }
substrate-subxt-proc-macro = { version = "0.13.0", path = "proc-macro" }

[dev-dependencies]
async-std = { version = "1.6.3", features = ["attributes"] }
async-std = { version = "1.6.4", features = ["attributes"] }
env_logger = "0.7.1"
frame-system = { version = "2.0.0-rc6", package = "frame-system" }
pallet-balances = { version = "2.0.0-rc6", package = "pallet-balances" }
sp-keyring = { version = "2.0.0-rc6", package = "sp-keyring" }
substrate-subxt-client = { version = "0.4.0", path = "client" }
frame-system = { version = "2.0.0", package = "frame-system" }
pallet-balances = { version = "2.0.0", package = "pallet-balances" }
sp-keyring = { version = "2.0.0", package = "sp-keyring" }
substrate-subxt-client = { version = "0.5.0", path = "client" }
tempdir = "0.3.7"
test-node = { path = "test-node" }
wabt = "0.10.0"
Expand Down
12 changes: 6 additions & 6 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "substrate-subxt-client"
version = "0.4.0"
version = "0.5.0"
authors = ["David Craven <david@craven.ch>", "Parity Technologies <admin@parity.io>"]
edition = "2018"

Expand All @@ -12,19 +12,19 @@ description = "Embed a substrate node into your subxt application."
keywords = ["parity", "substrate", "blockchain"]

[dependencies]
async-std = "1.6.3"
async-std = "1.6.4"
futures = { version = "0.3.5", features = ["compat"] }
futures01 = { package = "futures", version = "0.1.29" }
jsonrpsee = "0.1.0"
log = "0.4.11"
sc-network = { version = "0.8.0-rc6", default-features = false }
sc-service = { version = "0.8.0-rc6", default-features = false }
sc-network = { version = "0.8.0", default-features = false }
sc-service = { version = "0.8.0", default-features = false }
serde_json = "1.0.57"
sp-keyring = "2.0.0-rc6"
sp-keyring = "2.0.0"
thiserror = "1.0.20"

[dev-dependencies]
async-std = { version = "1.6.3", features = ["attributes"] }
async-std = { version = "1.6.4", features = ["attributes"] }
env_logger = "0.7.1"
substrate-subxt = { path = ".." }
tempdir = "0.3.7"
Expand Down
8 changes: 4 additions & 4 deletions proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "substrate-subxt-proc-macro"
version = "0.12.0"
version = "0.13.0"
authors = ["David Craven <david@craven.ch>", "Parity Technologies <admin@parity.io>"]
edition = "2018"
autotests = false
Expand All @@ -24,11 +24,11 @@ syn = "1.0.38"
synstructure = "0.12.4"

[dev-dependencies]
async-std = { version = "1.6.3", features = ["attributes"] }
codec = { package = "parity-scale-codec", version = "1.3.4", features = ["derive"] }
async-std = { version = "1.6.4", features = ["attributes"] }
codec = { package = "parity-scale-codec", version = "1.3.5", features = ["derive"] }
env_logger = "0.7.1"
pretty_assertions = "0.6.1"
sp-keyring = "2.0.0-rc6"
sp-keyring = "2.0.0"
substrate-subxt = { path = ".." }
trybuild = "1.0.32"

Expand Down
2 changes: 1 addition & 1 deletion src/frame/balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ mod tests {
let event = client
.transfer_and_watch(&alice, &bob.account_id(), 10_000)
.await
.unwrap()
.expect("sending an xt works")
.transfer()
.unwrap()
.unwrap();
Expand Down
1 change: 1 addition & 0 deletions src/frame/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ pub struct InstantiatedEvent<T: Contracts> {
}

#[cfg(test)]
#[cfg(feature = "integration-tests")]
mod tests {
use sp_keyring::AccountKeyring;

Expand Down
4 changes: 2 additions & 2 deletions src/frame/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub struct ErasRewardPointsStore<T: Staking> {
#[derive(Clone, Encode, Decode, Debug, Call)]
pub struct SetPayeeCall<T: Staking> {
/// The payee
pub payee: RewardDestination,
pub payee: RewardDestination<T::AccountId>,
/// Marker for the runtime
pub _runtime: PhantomData<T>,
}
Expand Down Expand Up @@ -99,7 +99,7 @@ pub struct LedgerStore<T: Staking> {
/// Where the reward payment should be made. Keyed by stash.
#[derive(Encode, Copy, Clone, Debug, Hash, PartialEq, Eq, Ord, PartialOrd, Store)]
pub struct PayeeStore<T: Staking> {
#[store(returns = RewardDestination)]
#[store(returns = RewardDestination<T::AccountId>)]
/// Tٗhe stash account
pub stash: T::AccountId,
}
Expand Down
2 changes: 1 addition & 1 deletion src/frame/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub trait System {
}

/// Type used to encode the number of references an account has.
pub type RefCount = u8;
pub type RefCount = u32;

/// Information of an account.
#[derive(Clone, Debug, Eq, PartialEq, Default, Decode, Encode)]
Expand Down
10 changes: 6 additions & 4 deletions src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ impl Metadata {

#[derive(Clone, Debug)]
pub struct ModuleMetadata {
index: u8,
name: String,
storage: HashMap<String, StorageMetadata>,
// constants
Expand Down Expand Up @@ -482,7 +483,7 @@ impl TryFrom<RuntimeMetadataPrefixed> for Metadata {
return Err(ConversionError::InvalidPrefix.into())
}
let meta = match metadata.1 {
RuntimeMetadata::V11(meta) => meta,
RuntimeMetadata::V12(meta) => meta,
_ => return Err(ConversionError::InvalidVersion.into()),
};
let mut modules = HashMap::new();
Expand All @@ -509,6 +510,7 @@ impl TryFrom<RuntimeMetadataPrefixed> for Metadata {
modules.insert(
module_name.clone(),
ModuleMetadata {
index: module.index,
name: module_name.clone(),
storage: storage_map,
},
Expand All @@ -523,7 +525,7 @@ impl TryFrom<RuntimeMetadataPrefixed> for Metadata {
modules_with_calls.insert(
module_name.clone(),
ModuleWithCalls {
index: modules_with_calls.len() as u8,
index: module.index,
calls: call_map,
},
);
Expand All @@ -536,7 +538,7 @@ impl TryFrom<RuntimeMetadataPrefixed> for Metadata {
modules_with_events.insert(
module_name.clone(),
ModuleWithEvents {
index: modules_with_events.len() as u8,
index: module.index,
name: module_name.clone(),
events: event_map,
},
Expand All @@ -549,7 +551,7 @@ impl TryFrom<RuntimeMetadataPrefixed> for Metadata {
modules_with_errors.insert(
module_name.clone(),
ModuleWithErrors {
index: modules_with_errors.len() as u8,
index: module.index,
name: module_name.clone(),
errors: error_map,
},
Expand Down
38 changes: 19 additions & 19 deletions test-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,28 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.5"
log = "0.4.11"
structopt = "0.3.16"
structopt = "0.3.17"
parking_lot = "0.11.0"

sc-cli = { version = "0.8.0-rc6", features = ["wasmtime"] }
sp-core = "2.0.0-rc6"
sc-executor = { version = "0.8.0-rc6", features = ["wasmtime"] }
sc-service = { version = "0.8.0-rc6", features = ["wasmtime"] }
sp-inherents = "2.0.0-rc6"
sc-transaction-pool = "2.0.0-rc6"
sp-transaction-pool = "2.0.0-rc6"
sc-network = "0.8.0-rc6"
sc-consensus-aura = "0.8.0-rc6"
sp-consensus-aura = "0.8.0-rc6"
sp-consensus = "0.8.0-rc6"
sc-consensus = "0.8.0-rc6"
sc-finality-grandpa = "0.8.0-rc6"
sp-finality-grandpa = "2.0.0-rc6"
sc-client-api = "2.0.0-rc6"
sp-runtime = "2.0.0-rc6"
sc-basic-authorship = "0.8.0-rc6"
sc-cli = { version = "0.8.0", features = ["wasmtime"] }
sp-core = "2.0.0"
sc-executor = { version = "0.8.0", features = ["wasmtime"] }
sc-service = { version = "0.8.0", features = ["wasmtime"] }
sp-inherents = "2.0.0"
sc-transaction-pool = "2.0.0"
sp-transaction-pool = "2.0.0"
sc-network = "0.8.0"
sc-consensus-aura = "0.8.0"
sp-consensus-aura = "0.8.0"
sp-consensus = "0.8.0"
sc-consensus = "0.8.0"
sc-finality-grandpa = "0.8.0"
sp-finality-grandpa = "2.0.0"
sc-client-api = "2.0.0"
sp-runtime = "2.0.0"
sc-basic-authorship = "0.8.0"

test-node-runtime = { path = "runtime" }

[build-dependencies]
substrate-build-script-utils = "2.0.0-rc6"
substrate-build-script-utils = "2.0.0"
51 changes: 26 additions & 25 deletions test-node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,32 @@ repository = "https://github.com/paritytech/substrate/"
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "1.3.5", default-features = false, features = ["derive"] }

frame-executive = { version = "2.0.0-rc6", default-features = false }
frame-support = { version = "2.0.0-rc6", default-features = false }
frame-system = { version = "2.0.0-rc6", default-features = false }
pallet-aura = { version = "2.0.0-rc6", default-features = false }
pallet-balances = { version = "2.0.0-rc6", default-features = false }
pallet-grandpa = { version = "2.0.0-rc6", default-features = false }
pallet-randomness-collective-flip = { version = "2.0.0-rc6", default-features = false }
pallet-staking = { version = "2.0.0-rc6", default-features = false }
pallet-sudo = { version = "2.0.0-rc6", default-features = false }
pallet-timestamp = { version = "2.0.0-rc6", default-features = false }
pallet-transaction-payment = { version = "2.0.0-rc6", default-features = false }
serde = { version = "1.0.115", optional = true, features = ["derive"] }
sp-api = { version = "2.0.0-rc6", default-features = false }
sp-block-builder = { version = "2.0.0-rc6", default-features = false }
sp-consensus-aura = { version = "0.8.0-rc6", default-features = false }
sp-core = { version = "2.0.0-rc6", default-features = false }
sp-inherents = { version = "2.0.0-rc6", default-features = false }
sp-io = { version = "2.0.0-rc6", default-features = false }
sp-offchain = { version = "2.0.0-rc6", default-features = false }
sp-runtime = { version = "2.0.0-rc6", default-features = false }
sp-session = { version = "2.0.0-rc6", default-features = false }
sp-std = { version = "2.0.0-rc6", default-features = false }
sp-transaction-pool = { version = "2.0.0-rc6", default-features = false }
sp-version = { version = "2.0.0-rc6", default-features = false }
frame-executive = { version = "2.0.0", default-features = false }
frame-support = { version = "2.0.0", default-features = false }
frame-system = { version = "2.0.0", default-features = false }
pallet-aura = { version = "2.0.0", default-features = false }
pallet-balances = { version = "2.0.0", default-features = false }
pallet-grandpa = { version = "2.0.0", default-features = false }
pallet-randomness-collective-flip = { version = "2.0.0", default-features = false }
pallet-staking = { version = "2.0.0", default-features = false }
pallet-sudo = { version = "2.0.0", default-features = false }
pallet-timestamp = { version = "2.0.0", default-features = false }
pallet-transaction-payment = { version = "2.0.0", default-features = false }
serde = { version = "1.0.116", optional = true, features = ["derive"] }
sp-api = { version = "2.0.0", default-features = false }
sp-block-builder = { version = "2.0.0", default-features = false }
sp-consensus-aura = { version = "0.8.0", default-features = false }
sp-core = { version = "2.0.0", default-features = false }
sp-inherents = { version = "2.0.0", default-features = false }
sp-io = { version = "2.0.0", default-features = false }
sp-offchain = { version = "2.0.0", default-features = false }
sp-runtime = { version = "2.0.0", default-features = false }
sp-session = { version = "2.0.0", default-features = false }
sp-std = { version = "2.0.0", default-features = false }
sp-transaction-pool = { version = "2.0.0", default-features = false }
sp-version = { version = "2.0.0", default-features = false }

[build-dependencies]
substrate-wasm-builder-runner = "1.0.6"
Expand All @@ -52,6 +52,7 @@ std = [
"pallet-balances/std",
"pallet-grandpa/std",
"pallet-randomness-collective-flip/std",
"pallet-staking/std",
"pallet-sudo/std",
"pallet-timestamp/std",
"pallet-transaction-payment/std",
Expand Down
Loading