mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 23:31:07 +00:00
Update to Substrate release candidate (#116)
* Substrate rc1 * Add tx version extra * Remove CheckBlockGasLimit * Substrate rc2
This commit is contained in:
+12
-12
@@ -27,22 +27,22 @@ serde_json = "1.0"
|
||||
url = "2.1"
|
||||
codec = { package = "parity-scale-codec", version = "1.3", default-features = false, features = ["derive", "full"] }
|
||||
|
||||
frame-metadata = { version = "11.0.0-alpha.8", package = "frame-metadata" }
|
||||
frame-support = { version = "2.0.0-alpha.8", package = "frame-support" }
|
||||
sp-runtime = { version = "2.0.0-alpha.8", package = "sp-runtime" }
|
||||
sp-version = { version = "2.0.0-alpha.8", package = "sp-version" }
|
||||
pallet-indices = { version = "2.0.0-alpha.8", package = "pallet-indices" }
|
||||
frame-metadata = { version = "11.0.0-rc2", package = "frame-metadata" }
|
||||
frame-support = { version = "2.0.0-rc2", package = "frame-support" }
|
||||
sp-runtime = { version = "2.0.0-rc2", package = "sp-runtime" }
|
||||
sp-version = { version = "2.0.0-rc2", package = "sp-version" }
|
||||
pallet-indices = { version = "2.0.0-rc2", package = "pallet-indices" }
|
||||
hex = "0.4.0"
|
||||
sp-rpc = { version = "2.0.0-alpha.8", package = "sp-rpc" }
|
||||
sp-core = { version = "2.0.0-alpha.8", package = "sp-core" }
|
||||
sc-rpc-api = { version = "0.8.0-alpha.8", package = "sc-rpc-api" }
|
||||
sp-transaction-pool = { version = "2.0.0-alpha.8", package = "sp-transaction-pool" }
|
||||
sp-rpc = { version = "2.0.0-rc2", package = "sp-rpc" }
|
||||
sp-core = { version = "2.0.0-rc2", package = "sp-core" }
|
||||
sc-rpc-api = { version = "0.8.0-rc2", package = "sc-rpc-api" }
|
||||
sp-transaction-pool = { version = "2.0.0-rc2", package = "sp-transaction-pool" }
|
||||
substrate-subxt-proc-macro = { version = "0.7.0", path = "proc-macro" }
|
||||
|
||||
[dev-dependencies]
|
||||
async-std = { version = "1.5.0", features = ["attributes"] }
|
||||
env_logger = "0.7"
|
||||
wabt = "0.9"
|
||||
frame-system = { version = "2.0.0-alpha.8", package = "frame-system" }
|
||||
pallet-balances = { version = "2.0.0-alpha.8", package = "pallet-balances" }
|
||||
sp-keyring = { version = "2.0.0-alpha.8", package = "sp-keyring" }
|
||||
frame-system = { version = "2.0.0-rc2", package = "frame-system" }
|
||||
pallet-balances = { version = "2.0.0-rc2", package = "pallet-balances" }
|
||||
sp-keyring = { version = "2.0.0-rc2", package = "sp-keyring" }
|
||||
|
||||
@@ -27,7 +27,7 @@ async-std = { version = "1.5.0", features = ["attributes"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.3.0", features = ["derive"] }
|
||||
env_logger = "0.7.1"
|
||||
pretty_assertions = "0.6.1"
|
||||
sp-keyring = "2.0.0-alpha.8"
|
||||
sp-keyring = "2.0.0-rc2"
|
||||
substrate-subxt = { path = ".." }
|
||||
trybuild = "1.0.25"
|
||||
|
||||
|
||||
+2
-22
@@ -42,6 +42,8 @@ use crate::frame::{
|
||||
///
|
||||
/// This is modified from the substrate version to allow passing in of the version, which is
|
||||
/// returned via `additional_signed()`.
|
||||
|
||||
/// Ensure the runtime version registered in the transaction is the same as at present.
|
||||
#[derive(Encode, Decode, Clone, Eq, PartialEq, Debug)]
|
||||
pub struct CheckSpecVersion<T: System>(
|
||||
pub PhantomData<T>,
|
||||
@@ -219,26 +221,6 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Checks if a transaction would exhausts the block gas limit.
|
||||
#[derive(Encode, Decode, Clone, Eq, PartialEq, Debug)]
|
||||
pub struct CheckBlockGasLimit<T: System>(pub PhantomData<T>);
|
||||
|
||||
impl<T> SignedExtension for CheckBlockGasLimit<T>
|
||||
where
|
||||
T: System + Clone + Debug + Eq + Send + Sync,
|
||||
{
|
||||
const IDENTIFIER: &'static str = "CheckBlockGasLimit";
|
||||
type AccountId = u64;
|
||||
type Call = ();
|
||||
type AdditionalSigned = ();
|
||||
type Pre = ();
|
||||
fn additional_signed(
|
||||
&self,
|
||||
) -> Result<Self::AdditionalSigned, TransactionValidityError> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Trait for implementing transaction extras for a runtime.
|
||||
pub trait SignedExtra<T: System> {
|
||||
/// The type the extras.
|
||||
@@ -276,7 +258,6 @@ impl<T: System + Balances + Clone + Debug + Eq + Send + Sync> SignedExtra<T>
|
||||
CheckNonce<T>,
|
||||
CheckWeight<T>,
|
||||
ChargeTransactionPayment<T>,
|
||||
CheckBlockGasLimit<T>,
|
||||
);
|
||||
|
||||
fn new(
|
||||
@@ -302,7 +283,6 @@ impl<T: System + Balances + Clone + Debug + Eq + Send + Sync> SignedExtra<T>
|
||||
CheckNonce(self.nonce),
|
||||
CheckWeight(PhantomData),
|
||||
ChargeTransactionPayment(<T as Balances>::Balance::default()),
|
||||
CheckBlockGasLimit(PhantomData),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user