Discover more from smol farm gazette
Testing an NFT Launch
Doing a launch like ours is tricky to do right. Be sure to test everything before you go live to ensure it works as you expect!
In our recent articles, I’ve detailed the assortment of technical elements that went into the Dastardly Ducks launch. The complexity of our approach is certain less accessible to people without a technical background mine, but many who have reached out still seem eager to attempt it. One critical angle I have not yet addressed is testing. Publishing a smart contract on ETH is pricey, and you need to ensure it works before you pull that very expensive lever. You should even try to simulate the entire launch, minting test NFTs with your actual smart contract and website code.
Of course, you can start at a more granular level during the development process. Many coders are more than familiar with writing unit tests, which are automated tests that ensure expected conditions are met after a block of code is run. Existing tests can be run periodically to check for unexpected problems. These are fantastic in practically any sort of code crafting — including smart contracts. There is even a fantastic framework called Truffle that makes it easier to write them for Solidity smart contracts.
While unit tests are useful, especially if you want to avoid known issues arising during development, it is arguably even more important to do a true trial run of your contract deployment — and even run several mints. Fortunately, this is where Ethereum testnets like Rinkeby and Goerli come in handy. These are real blockchains designated for testing that enable you to get free test Ethereum through “faucets.” You also will likely have to change some settings in your wallet to get testnets to display and enable you to switch to them.
However, once you have configured your dev environment to support testnets and collected your small fortune of worthless test ETH, it is easy to operate largely as if you were working with the real Ethereum blockchain itself. The most typical way to deploy smart contracts at the present is through Remix, the web-based Solidity IDE. You can easily deploy contracts to testnets there if you point your wallet at them, paying deployment gas fees in your test currency.
These testnets have their own, alternate versions of Etherscan that let you view your contract almost identically as if it were deployed on the real version of Ethereum. If you are launching a collection with a custom smart contract, it is important to verify your source code on Etherscan, so users can see your exact source code and check the contract for anything suspicious. You can do this through a special Remix extension. Upon doing so, you can even call the smart contract’s functions directly on Etherscan.
However, if you are minting through a custom website, you almost assuredly want to point a beta version of that website at the testnet version of the contract and experience the minting process end-to-end, including any feedback the user gets after sending their money to mint their new tokens. You can use this to test mechanics like allowlists as well.
Luckily, there is even a special testnets version of OpenSea that lets you see the NFTs you’ve minted as if they were not test NFTs. This enables you to fully simulate what it will be like for people to mint your NFT collection on your website without paying a penny — at least of a currency with real value. I did this a few times with Dastardly Ducks before launching the collection. Not only did I crucially catch a couple of issues, it gave me much more peace of mind when I spent roughly one thousand dollars worth of real Ethereum to deploy the contract.
Quality assurance is an extremely important part of the software engineering process that is often woefully undervalued. If you wish to emulate the rather technically complex process we used with Dastardly Ducks, you will want to make sure everything works before you even spend money to deploy the smart contract — or having regular users interacting with your site. As in all software development, consider using unit tests. However, specifically with NFTs, utilizing testnets to simulate your entire minting process will protect your launch, you wallet, and your peace of mind.
If you enjoyed this article, please consider liking, sharing, and subscribing to smol farm gazette. Most of our articles are free forever, and the rest can be unlocked for just $5/mo. Proceeds support independent LGBTQ+ women creators.