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:
Daan van der Plas
2023-10-30 17:08:14 +01:00
committed by GitHub
parent 3dd030fa67
commit c3831c26d8
3 changed files with 271 additions and 170 deletions
+4 -14
View File
@@ -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() {