mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Update to subxt 0.29
This commit is contained in:
@@ -22,7 +22,7 @@ scale-info = { version = "2", optional = true }
|
||||
serai-runtime = { path = "../runtime", version = "0.1" }
|
||||
|
||||
sp-core = { git = "https://github.com/serai-dex/substrate" }
|
||||
subxt = { version = "0.28", default-features = false, features = ["jsonrpsee-ws"], optional = true }
|
||||
subxt = { version = "0.29", default-features = false, features = ["jsonrpsee-ws"], optional = true }
|
||||
|
||||
bitcoin = { version = "0.30", optional = true }
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ pub struct Tip {
|
||||
pub tip: u64,
|
||||
}
|
||||
|
||||
pub type Header = SubstrateHeader<<Runtime as Config>::BlockNumber, BlakeTwo256>;
|
||||
pub type Header = SubstrateHeader<serai_runtime::BlockNumber, BlakeTwo256>;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
||||
pub struct SeraiConfig;
|
||||
@@ -48,7 +48,7 @@ impl SubxtConfig for SeraiConfig {
|
||||
type Hash = <Runtime as Config>::Hash;
|
||||
type Hasher = BlakeTwo256;
|
||||
|
||||
type Index = <Runtime as Config>::Index;
|
||||
type Index = serai_runtime::Nonce;
|
||||
type AccountId = <Runtime as Config>::AccountId;
|
||||
// TODO: Bech32m
|
||||
type Address = SeraiAddress;
|
||||
|
||||
@@ -64,8 +64,8 @@ use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
|
||||
/// An index to a block.
|
||||
pub type BlockNumber = u64;
|
||||
|
||||
/// Index of a transaction in the chain, for a given account.
|
||||
pub type Index = u32;
|
||||
/// Nonce of a transaction in the chain, for a given account.
|
||||
pub type Nonce = u32;
|
||||
|
||||
/// A hash of some data used by the chain.
|
||||
pub type Hash = sp_core::H256;
|
||||
@@ -189,7 +189,7 @@ impl system::Config for Runtime {
|
||||
type Lookup = AccountLookup;
|
||||
type Hash = Hash;
|
||||
type Hashing = BlakeTwo256;
|
||||
type Nonce = u32;
|
||||
type Nonce = Nonce;
|
||||
type Block = Block;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
@@ -564,8 +564,8 @@ sp_api::impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, PublicKey, Index> for Runtime {
|
||||
fn account_nonce(account: PublicKey) -> Index {
|
||||
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, PublicKey, Nonce> for Runtime {
|
||||
fn account_nonce(account: PublicKey) -> Nonce {
|
||||
System::account_nonce(account)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user