alloy-rs / alloy-rs/alloy

[Bug] SendTransaction Failed on BSC due to Legacy TxType

Aperta
#3,775 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Rust
Stelle
1.3k
Fork
668
Merge medio
2g 1h
PR unite (30g)
29

Descrizione

### Component

provider, pubsub

### What version of Alloy are you on?

1.6.1

### Operating System

macOS (Apple Silicon)

### Describe the bug

In `provider/trait.rs`, function `estimate_eip1559_fees_with`, there is a condition to check if the latest block even has a base fee/supports EIP1559, it works for all evm chains which support eip1559 but fails on **Binance Smart Chain**. For BSC, although it does include `baseFeePerGas` in block headers and its RPC likely succeeds on EIP-1559 fee estimation calls, but it doesn't actually process EIP-1559 transaction types. If you call RPC something like "eth_getBlockByNumber", it returns a header that includes `baseFeePerGas` with "0x0" instead of None. So the condition check might fail with BSC, a small fix that additionally checks whether `baseFeePerGas` is non-zero might work well.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.