This guide breaks down the typical workflow for deploying smart contracts on to a blockchain, and provides an overview of the different options available to you on thirdweb.
When you build a web3 application, you have to make a decision on which blockchain(s) your application will support.
What is a Testnet?
Firstly, let's start with test networks. A testnet or "test network" is a test environment that mocks the main network of a blockchain.
Testnets act as a way to test smart contracts in a sandbox environment before they are deployed to the main network and interact with real currency.
Testnets typically act the same as a main network, and come with "fake" currencies you can get for free via a faucet. For example, a popular testnet that mocks the Ethereum blockchain is the Goerli Ethereum testnet.
You can receive free test Ether on the Goerli network from the Goerli Faucet. This allows you to cover the gas costs for deploying smart contracts, and perform any other operation that you would normally
be able to do on the main Ethereum network; like mint NFTs or transfer Ether.
In solana, you can use Solana's devnet to test your contracts, you can get funds from our Solana devnet faucet
Why Use a Testnet?
By using a testnet, you can quickly get your application up and running without having to worry about the costs of deploying to the main network.
The typical workflow for web3 applications is to first deploy and test your smart contracts on a testnet, and then deploy them to the main network; once you are ready to go live.
For example, if you wanted to deploy your application to the Polygon blockchain, you could first deploy a smart contract on the Polygon Mumbai Testnet, after getting some free test MATIC from the Polygon Faucet.
In this risk-free environment, you can deploy your test contracts for free, interact with them the same way you would interact with the main network, and deploy the contract to the main network once you have set up your application to interact with your smart contracts.
Which Blockchain Should I Use?
It is ultimately your decision which blockchain you deploy your smart contracts to. This section will explore the different options available to you, and how to decide which blockchain you should use.
Ethereum is the most popular blockchain for web3 applications. It is a Layer 1 blockchain,
meaning it is highly secure, but it is also very expensive to use when compared to other alternatives.
Projects that don't require a lot of interaction with the blockchain are typically more suitable for Ethereum as a result of the network's high gas fees.
If you take a look at our Gas Estimator, you can quickly see that Ethereum smart contracts
are both expensive for you to deploy and expensive for your users to interact with.
Ethereum currently uses the Proof-of-work (POW) consensus mechanism, which causes an inefficient usage of resources with
a more negative impact on the environment compared to other consensus mechanisms.
Polygon is a Layer 2 sidechain for the Ethereum network.
Polygon has exponentially lower (approximately ~10,000x lower) gas fees than Ethereum does,
and utilises Proof-of-Stake (POS) consensus, which has a less negative impact on the environment than Proof-of-Work (POW).
Using Polygon is a great choice for all kinds of blockchain projects,
especially those that require a lot of interaction with the blockchain; because of it's low gas fees.
Avalanche is Layer 1 Proof-of-Stake (POS) blockchain which has a low cost to use and fast transaction finality times.
Projects built on Avalanche are typically in the De-Fi (Decentralised Finance) space, such as the Trader Joe trading platform.
Building projects on Avalanche has the benefit of lower gas fees than Ethereum, and will expose your project to users in the AVAX ecosystem.
You can learn about Fantoms' Lachesis in detail on their FAQ Page.
In a nutshell, Fantom's aBFT (asynchronous Byzantine Fault Tolerant) consensus mechanism is used to have faster transaction finality times
when compared to Ethereum without sacrificing security.
Projects such as SpookySwap in the De-Fi space are built on Fantom.
Arbitrum is a Layer 2 chain, built on top of Ethereum which utilizes
which performs the majority of computations off-chain, batches them together, and writes the results to the Layer 1 blockchain (Ethereum).
For developers and users, this means lower gas fees and faster transaction confirmation times, since the blockchain only performs "proof of confirmation" if a validator node is suspicious a transaction might be fraudulent.
This means that when you interact with a smart contract on Arbitrum, your transactions require lower gas fees and are confirmed within seconds, providing a better user experience.
Optimism is another Layer 2 chain built on top of Ethereum, which utilizes "optimistic rollups".
Similar to Arbitrum, it performs the majority of the computations off-chain, which results in lower gas fees and faster transaction confirmation times.
The differences between Optimism and Arbitrum revolve around the mechanisms behind their transaction validation and fraudulency detection.
Both Optimism and Arbitrum are scalability solutions for utilizing Ethereum as the security layer for your smart contracts.
Solana is a Layer 1 blockchain that uses a modified version of Proof of Stake (PoS) called Proof of History (PoH) which serves as a reliable clock that allows Solana to do parallel execution reducing the messaging overhead in the network.
Solana is ideal for projects that require fast transaction times with a significant amount of on-chain transactions.
We are working on adding even more solutions for you to use, including:
Join our Discord to stay up to date with the latest updates from the team!