Skip to content

Commit a6630ea

Browse files
committed
Fix compilation errors
1 parent 6e6f792 commit a6630ea

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Cargo.lock

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/phaxt/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ serde = { version = "1.0.130", features = ["derive"] }
88
serde_json = "1.0.67"
99
parity-scale-codec = "3.3"
1010
scale-info = '2.3'
11-
scale-encode = "0.1.2"
11+
scale-encode = "0.3"
1212
anyhow = "1"
1313
tokio = "1"
1414

crates/phaxt/src/dynamic/tx.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ impl TxPayload for EncodedPayload {
2424
metadata: &subxt::Metadata,
2525
out: &mut Vec<u8>,
2626
) -> Result<(), subxt::Error> {
27-
let pallet = metadata.pallet(self.pallet_name)?;
28-
let call = pallet.call(self.call_name)?;
27+
let pallet = metadata.pallet_by_name_err(self.pallet_name)?;
28+
let call = pallet.call_variant_by_name(self.call_name).ok_or_else(|| {
29+
subxt::error::MetadataError::CallNameNotFound((*self.call_name).to_owned())
30+
})?;
2931

3032
let pallet_index = pallet.index();
31-
let call_index = call.index();
33+
let call_index = call.index;
3234

3335
pallet_index.encode_to(out);
3436
call_index.encode_to(out);

crates/phaxt/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pub struct ParaId(pub u32);
1717

1818
pub type StorageProof = Vec<Vec<u8>>;
1919
pub type StorageState = Vec<(Vec<u8>, Vec<u8>)>;
20-
pub type ExtrinsicParams = PolkadotExtrinsicParams<subxt::SubstrateConfig>;
21-
pub type ExtrinsicParamsBuilder = PolkadotExtrinsicParamsBuilder<subxt::SubstrateConfig>;
20+
pub type ExtrinsicParams = PolkadotExtrinsicParams<Config>;
21+
pub type ExtrinsicParamsBuilder = PolkadotExtrinsicParamsBuilder<Config>;
2222
pub use subxt::PolkadotConfig as Config;
2323
pub type RpcClient = subxt::OnlineClient<Config>;
2424

0 commit comments

Comments
 (0)