Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions crates/server/src/handlers/blocks/processing/extrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//! - Converting account addresses to SS58 format

use crate::state::AppState;
use crate::utils::{self, EraInfo};
use crate::utils::{self, ChargeAssetTxPayment, ChargeTransactionPayment, CheckNonce, EraInfo};
use heck::ToLowerCamelCase;
use serde_json::{Value, json};
use sp_core::crypto::{AccountId32, Ss58Codec};
Expand All @@ -22,29 +22,6 @@ use super::super::types::{
ExtrinsicInfo, GetBlockError, MethodInfo, MultiAddress, SignatureInfo, SignerId,
};

// ================================================================================================
// Signed Extension Types
// ================================================================================================

/// CheckNonce signed extension - contains the account nonce
/// SCALE encoded as a compact u32
#[derive(parity_scale_codec::Decode)]
struct CheckNonce(#[codec(compact)] u32);

/// ChargeTransactionPayment signed extension - contains the tip amount
/// SCALE encoded as a compact u128
#[derive(parity_scale_codec::Decode)]
struct ChargeTransactionPayment(#[codec(compact)] u128);

/// ChargeAssetTxPayment signed extension - contains tip and optional asset_id
/// Used on Asset Hub and other chains that support paying fees in non-native assets
#[derive(parity_scale_codec::Decode)]
struct ChargeAssetTxPayment {
#[codec(compact)]
tip: u128,
// asset_id is Option<AssetId> but we don't need it for tip extraction
}

/// Extract extrinsics from a block using subxt with explicit ss58_prefix
///
/// This version allows specifying the ss58_prefix explicitly, useful for
Expand Down
2 changes: 2 additions & 0 deletions crates/server/src/handlers/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ pub mod dry_run;
pub mod fee_estimate;
pub mod material;
pub mod metadata_blob;
pub mod parse;
pub mod submit;

pub use dry_run::{dry_run, dry_run_rc};
pub use fee_estimate::{fee_estimate, fee_estimate_rc};
pub use material::{material, material_rc, material_versioned, material_versioned_rc};
pub use metadata_blob::{metadata_blob, metadata_blob_rc};
pub use parse::{parse, parse_rc};
pub use submit::{submit, submit_rc};
Loading
Loading