blocksmith.js
66%
average score over 4 application evaluations
blocksmith.js

blocksmith.js is a minimal Javascript testing framework for Ethereum contract development using foundry-rs and ethers. Foundry is great speed-wise but writing tests in Solidity is a disaster and the command-line interface is bad for complex operations. Hardhat is slow, has way too much boilerplate, interacts poorly with modern ESM. Both projects are very "do it our way". The result is that many contracts don't have tests, and the tests that exist aren't end-to-end.

OTOH, blocksmith.js is simple. It gives you a lightweight wrapper around forge and anvil, so you can script Foundry however you want. You can use any async JS testing framework, including the default nodejs test runner, or just write simple JS scripts that glue anything you want together.

To properly test an ENS contract with CCIP-Read, you need to deploy a lot of infrastructure: a registry, a resolver, some names, a CCIP-server, and then test all of the interactions. blocksmith.js makes this trivial.

At the moment, you can npm i @adraffy/blocksmith. I'd like to write tests for more contracts to illustrate how to use blocksmith. This is also an useful learning experience as I get to figure out what features I'm missing or what needs improved. This should expand the feature set and improve ergonomics.

I'd like to explore making end-to-end tests for cross-chain communication so developers can locally simulate things like EVM gateway and other ideas. Running parallel testnets is blocksmith.js is effortless and I see a lot of value in cross-chain tests that can be described in a single JS file.

blocksmith.js History

People donating to blocksmith.js, also donated to

Web3 social networking platform utilizing ENS for dynamic profiles, gamification through leaderboards, decentralized messaging, and content aggregation from multiple platforms.
A swap and perpetual DEX offering secure, liquid trading for various blue-chip crypto assets.
Funding journalists via web3 certificates for stories with measurable impact, bypassing traditional grant models, focusing on accountability and incentive for sustained reporting.
Developed a no-code platform for ENS domain owners to easily create and customize decentralized websites (dwebsites) with social media, multimedia, interactive features, and payment integrations.