mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 01:07:57 +00:00
fix parachain example (#1228)
* fix parachain example * Simplify chain config * tweak CI to check parachain-example, too (#1234) --------- Co-authored-by: Tadeo Hepperle <62739623+tadeohepperle@users.noreply.github.com> Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
committed by
GitHub
parent
3dd030fa67
commit
c3831c26d8
@@ -1,5 +1,5 @@
|
||||
use subxt::{
|
||||
Config, PolkadotConfig, SubstrateConfig,
|
||||
PolkadotConfig,
|
||||
utils::{AccountId32, MultiAddress},
|
||||
OnlineClient,
|
||||
};
|
||||
@@ -8,19 +8,9 @@ use subxt_signer::sr25519::dev::{self};
|
||||
#[subxt::subxt(runtime_metadata_path = "statemint_metadata.scale")]
|
||||
pub mod statemint {}
|
||||
|
||||
/// Custom config that works with Statemint:
|
||||
pub enum StatemintConfig {}
|
||||
|
||||
impl Config for StatemintConfig {
|
||||
type Hash = <PolkadotConfig as Config>::Hash;
|
||||
type AccountId = <PolkadotConfig as Config>::AccountId;
|
||||
type Address = <PolkadotConfig as Config>::Address;
|
||||
type Signature = <PolkadotConfig as Config>::Signature;
|
||||
type Hasher = <PolkadotConfig as Config>::Hasher;
|
||||
type Header = <PolkadotConfig as Config>::Header;
|
||||
type ExtrinsicParams = <SubstrateConfig as Config>::ExtrinsicParams;
|
||||
}
|
||||
|
||||
// PolkadotConfig or SubstrateConfig will suffice for this example at the moment,
|
||||
// but PolkadotConfig is a little more correct, having the right `Address` type.
|
||||
type StatemintConfig = PolkadotConfig;
|
||||
|
||||
#[tokio::main]
|
||||
pub async fn main() {
|
||||
|
||||
Reference in New Issue
Block a user