Skip to content

[pallet-revive] eth-rpc: SubmittedTransaction::gas() panics when transaction has no gas field #11889

@Nathy-bajo

Description

@Nathy-bajo

SubmittedTransaction::gas() in the published pallet-revive-eth-rpc crate (exposed via pub mod example; with no feature gate) unwraps an Option<U256> and panics when the underlying GenericTransaction has no gas field set, which is a legitimate state since GenericTransaction::gas is Option<U256> for legacy/incomplete payloads and the constructor never enforces gas-is-set; the fix is to change the return type to Option<U256> to match the underlying field and update the in-crate wait_for_receipt assertion to handle the None case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions