Menu

1 / 5

devnet-fixtures: funded wallets, mints and token balances from a YAML file

DEV Community: frontend·Abdeldjalil Chougui·9 days ago
#EOoF7ZSs
#devtofrontend#devto#dev#devnet#test
Long article (1233 words) — no AI summary yet.
Reading 0:00
15s threshold

An end-to-end test for a Solana app needs a starting state before it can check anything. There must be a wallet with some SOL to pay fees, a second wallet to receive, a mint with known decimals, token accounts, and balances the test can assert on. Most projects build that state with a setup script: a few airdrops, a mint creation, some mintTo calls, then a list of addresses copied into environment variables.

Those scripts tend to break in the same places. Devnet airdrops are rate limited and fail at random. Running the script twice creates a second mint or doubles the balances. And the addresses change on every run, so the test config has to be regenerated each time.

devnet-fixtures is a small CLI for CI pipelines and local end-to-end tests that replaces the script with a description. You write the wallets, mints and token balances you need in YAML. It creates them on a cluster, then prints their addresses as .env lines or JSON.

Two warnings from the README come first.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.