Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
  • Rust 98.7%
  • JavaScript 0.5%
  • Shell 0.4%
  • Solidity 0.2%
Find a file
stevencartavia b2f2ab451c
fix(script): treat unknown tx as dropped to avoid receipt-poll hang (#14626)
* fix(script): treat unknown tx as dropped to avoid receipt-poll hang

`provider.get_transaction_by_hash(hash)` returns `Result<Option<Tx>, _>`.
`check_tx_status` matched `Ok(_)` for the 'node knows the tx' path,
incorrectly bucketing `Ok(None)` (tx unknown) as known. In the
`get_receipt`-error branch this fed `RetryError::Continue`, which is
unbounded — producing an infinite `eth_blockNumber` + `eth_getTransactionReceipt`
loop whenever a tx was rejected at submission or dropped from the
mempool after a halt (e.g. anvil's new -32003 mapping for non-REVERT
EVM halts).

Distinguish `Ok(Some(_))` from `Ok(None)`; treat the latter the same as
a transport error and terminate as `TxStatus::Dropped`.

Amp-Thread-ID: https://ampcode.com/threads/T-019dfe94-2b0d-71bc-a863-633e05594581
Co-authored-by: Amp <amp@ampcode.com>

* test(script): cover check_tx_status dropped/unknown tx paths

Amp-Thread-ID: https://ampcode.com/threads/T-019e0814-2cda-7271-a8d6-c59e6739946b
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com>
2026-05-11 16:38:35 +00:00
.cargo fix(lint): allow custom types in "constant fn getters" (#11866) 2025-09-29 07:54:45 +00:00
.config ci: add nightly workflow for flaky tests (#13134) 2026-01-20 13:26:28 +00:00
.github chore(ci): increase nightly bench result retention days (#14681) 2026-05-10 10:25:01 +02:00
benches feat(bench): nightly regression tracking workflow (#14586) 2026-05-05 12:05:40 +02:00
crates fix(script): treat unknown tx as dropped to avoid receipt-poll hang (#14626) 2026-05-11 16:38:35 +00:00
docs/dev docs: add forge lint rule docs (#14571) 2026-05-04 15:44:29 +00:00
foundryup fix(foundryup): mirror tag resolution for install & use (#14611) 2026-05-06 11:13:44 +02:00
npm fix(npm): remove deprecated baseUrl compiler option (#14413) 2026-04-22 15:30:09 +02:00
testdata fix(cheatcodes): enforce expectRevert reverter address for CREATE frames (#14615) 2026-05-06 15:00:51 +00:00
.dockerignore feat: alpine based docker image (#981) 2022-03-21 11:47:02 -07:00
.git-blame-ignore-revs chore: ignore edition 2024 bump in .git-blame-ignore-revs (#10919) 2025-07-03 18:24:09 +00:00
.gitattributes feat: harden npm publish & make installer leaner (#11600) 2025-09-15 20:30:46 -07:00
.gitignore chore(meta): update .gitignore (#12975) 2026-01-02 09:36:47 +00:00
benchmark.sh chore(bench): update benchmark.sh (#14548) 2026-05-03 20:29:41 +02:00
Cargo.lock fix(script): treat unknown tx as dropped to avoid receipt-poll hang (#14626) 2026-05-11 16:38:35 +00:00
Cargo.toml chore: bump version to 1.7.2 (#14663) 2026-05-08 11:47:38 +02:00
clippy.toml chore(meta): remove MSRV from clippy.toml (#12489) 2025-11-07 17:02:56 +00:00
CONTRIBUTING.md docs: fix wrong flag and deprecated command for clippy (#12780) 2025-12-09 17:42:32 +00:00
deny.toml chore(deny): remove deprecated repos from whitelist (#14455) 2026-04-24 14:34:41 -06:00
Dockerfile chore: supply chain hardening (#14316) 2026-04-15 12:55:57 +02:00
dprint.json feat: npm publish anvil, cast and chisel (#11945) 2025-10-30 12:08:19 +00:00
flake.lock Update flake.lock (#14682) 2026-05-11 14:10:40 +02:00
flake.nix chore(flake): use nightly rustfmt (#13441) 2026-02-16 11:12:31 +01:00
FUNDING.json feat(fmt): dprint for toml, json, md, dockerfile, ts, & yml (#10824) 2025-06-21 18:26:48 +02:00
LICENSE-APACHE chore: update README for 1.0 (#9540) 2025-01-28 13:14:40 +01:00
LICENSE-MIT chore: update README for 1.0 (#9540) 2025-01-28 13:14:40 +01:00
Makefile fix(Makefile): prevent backtick command substitution in lint-typos message (#14648) 2026-05-07 18:32:16 +02:00
README.md ci: sign release archives, docker images, and publish SBOMs (#14563) 2026-05-04 13:24:54 +02:00
rustfmt.toml chore: bump to rust edition 2024 (#10802) 2025-07-03 18:05:41 +00:00
SECURITY.md ci: sign release archives, docker images, and publish SBOMs (#14563) 2026-05-04 13:24:54 +02:00
typos.toml chore: fix typos CI (#13303) 2026-02-03 08:54:49 +00:00


Blazing fast, portable and modular toolkit for Ethereum application development, written in Rust.

  • Forge — Build, test, fuzz, debug and deploy Solidity contracts.
  • Cast — Swiss Army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
  • Anvil — Fast local Ethereum development node.
  • Chisel — Fast, utilitarian and verbose Solidity REPL.

Demo

Installation

curl -L https://foundry.paradigm.xyz | bash
foundryup

See the installation guide for more details.

To verify a downloaded release archive or container image, see Verifying Releases.

Getting Started

Initialize a new project, build and test:

forge init counter && cd counter
forge build
forge test

Interact with a live network:

cast block-number --rpc-url https://eth.merkle.io
cast balance vitalik.eth --ether --rpc-url https://eth.merkle.io

Fork mainnet locally:

anvil --fork-url https://eth.merkle.io

Read the Foundry Docs to learn more.

Contributing

Contributions are welcome and highly appreciated. To get started, check out the contributing guidelines.

Join our Telegram to chat about the development of Foundry.

Support

Having trouble? Check the Foundry Docs, join the support Telegram, or open an issue.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.