Skip to main content

ensure_expiring_nonce_discriminator_active

Function ensure_expiring_nonce_discriminator_active 

Source
pub async fn ensure_expiring_nonce_discriminator_active<N: Network, P: Provider<N>>(
    provider: &P,
    tx: &N::TransactionRequest,
) -> Result<()>
where N::TransactionRequest: FoundryTransactionBuilder<N>,
Expand description

Fails when tx carries a non-zero expiring nonce and the chain is known to predate T12.

TIP-1106 turns the nonce of an expiring nonce transaction into an opaque discriminator from T12 on. Earlier hardforks reject any value other than zero. When the active hardfork cannot be determined the check is skipped and validation is left to the node.