Since 2009, we have been utilizing our extensive expertise in blockchain technologies to help businesses, both large and small, maximize their efficiency.
Explore More
With more than 400+ experts, Oodles comprises a fantastic resource of business knowledge that spans multiple industries. Whatever the circumstances, we keep to our obligations.
Explore More
At Oodles, we help our clients work with a human understanding but at superhuman speed something that others can't. They thus advance and maintain their lead
29th September 2023
11 min read
Technical Project Manager
Avalanche is a groundbreaking blockchain platform known for its high-performance consensus protocol and flexibility in creating custom blockchain networks. In this tutorial, we'll introduce you to Avalanche and guide you through the process of creating and deploying your own Subnet, an essential component of the Avalanche development ecosystem.
Avalanche is a next-generation blockchain platform designed to address the scalability and decentralization challenges faced by earlier blockchain networks like Bitcoin and Ethereum. It stands out for its unique consensus protocol, known as Avalanche consensus, which allows for rapid and secure transaction processing. Avalanche is capable of supporting a wide range of decentralized applications (dApps) and assets, making it a versatile choice for developers.
Suggested Read | Avalanche Blockchain | The Go-To Web3 Development Platform
In the context of Avalanche, a Subnet is a specialized blockchain network that can be customized to suit specific use cases and requirements. Subnets can be thought of as individual branches of the Avalanche network, each with its own unique features, consensus rules, and governance structures.
Subnets enable developers to create blockchain networks tailored to their needs, whether for running smart contracts, managing digital assets, or launching decentralized applications. They can be EVM-based (Ethereum Virtual Machine), making them compatible with Ethereum tools and languages, or they can be designed with custom features to support various decentralized applications.
Check It Out | Cross-Chain DeFi Technology | Shaping the Future of Finance
Now, let's dive into the step-by-step process of creating and deploying your very own Avalanche Subnet.
Begin by installing Avalanche-CLI with the following command:
curl -sSfL https://raw.githubusercontent.com/ava-labs/avalanche-cli/main/scripts/install.sh | sh -s
This command will install Avalanche-CLI in the ~/bin directory. If it doesn't exist, the script will create it. To make the command accessible from anywhere, add it to your system's PATH with:
export PATH=~/bin:$PATH
Now, let's create a Subnet configuration. We'll create an EVM-based Subnet, and for this example, we'll name it "mySubnet." You can choose any name you prefer.
avalanche subnet create mySubnet
Follow these steps during the Subnet Creation Wizard:
Choose Your VM: Select "SubnetEVM."
Enter Your Subnet's ChainID: Pick a unique positive integer.
Token Symbol: Name your Subnet's native token (e.g., AVAX, JOE, BTC).
Subnet-EVM Version: Use the latest version.
Gas Fee Configuration: Select "Low disk use / Low Throughput 1.5 mil gas/s (C-Chain's setting)."
Airdrop: Choose "Airdrop 1 million tokens to the default address" (not for production use).
Precompiles: Select "No" for now.
Upon successful configuration, you will see "Successfully created subnet configuration."
Now, let's deploy your Subnet locally with the following command:
avalanche subnet deploy mySubnet
Make sure to replace "mySubnet" with your chosen Subnet name if different. Select "Local Network" as the deployment option.
The command will set up a five-node Avalanche network on your machine. It may take a few minutes to complete.
Note: If you're using bash on ARM64 on Mac, you may need Rosetta 2. Install it with
softwareupdate --install-rosetta
if required.
Upon successful deployment, the output will resemble the following:
✔ Local Network
Deploying [mySubnet] to Local Network
...
Network ready to use. Local network node endpoints:
You now have your local Subnet running!
Also, Discover | Exploring Modular Blockchain | Moving Beyond Monolothic
Congratulations! You've successfully created and deployed your first Avalanche Subnet. You can use the provided network endpoints to interact with your Subnet, and it's ready for further development and testing. Explore the possibilities of building on the Avalanche platform and take your Subnet development to the next level with our expertise. Connect with our blockchain developers to get started.
Vishal Yadav
Vishal is a highly skilled backend developer with extensive 3+ years experience in developing various blockchain platforms. He has a comprehensive understanding of the technologies and has hands-on expertise in Node.js, Ethereum, Layer 1 and Layer 2 solutions, smart contract development, and databases like MySQL and MongoDB. He has a proven track record of working on a range of blockchain-related projects, including token development, staking, governance, indexes, bridges, NFT, marketplace, ICO/IDO, and more. He is adept at managing trading bots, and developing centralized exchanges, and has a creative mind with excellent analytical skills.
Technical Project Manager
By using this site, you allow our use of cookies. For more information on the cookies we use and how to delete or block them, please read our cookie notice.
We would love to
hear from you!
Innovate with confidence!