Back to feed
Dev.to
Dev.to
6/26/2026
Midnight contract deployment fails on

Midnight contract deployment fails on

Original: Why your Midnight contract "can't be found on chain" (or: Midnight, stop playing with my emotions)

Short summary

A developer discovers old Midnight tutorials reference a deprecated testnet-02 network that no longer exists, causing contract deployment failures. Key issues: networks are separate (local, preprod, mainnet), test tokens require explicit registration to generate gas fees, and wallet configuration must match network selection. A debugging checklist prevents silent deployment failures.

  • Old Midnight tutorials point to retired testnet-02 — verify current network configuration in code
  • NIGHT tokens must be registered to generate DUST gas fees; holding unregistered NIGHT fails silently
  • Wallet must be set to correct network (Preprod vs mainnet) before copying addresses for faucet requests

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more