1. BNB Chain IDE Environment Configuration
This tutorial covers the information regarding creating the project on BNB Chain and configuration with Binance Chain wallet and MetaMask wallet
Once you click the "Try Now" button, you can view all files, and click New Project to create Binance, Chain33, Ethereum, and Fabric chain projects.
As we are configuring wallets for BNB Chain, so we will choose BNB Chain for the demonstration purpose. To select BNB Chain, click the New Project button, select Binance on the left, and select a project template on the right to create a Binance project as shown in the figure below.
2. IDE's and Templates Corresponding to IDE
Once you have selected any of the templates, you can see a window as shown in figure 3.
3. Before Wallet Installation
As we can see in the figure the BNB Chain IDE says the wallet is not found, we need a wallet to deploy our project on BNB Chain. There are two wallets available that can be used for deployment purposes and those are MetaMask Wallet and Binance Chain Wallet. Now, we will see how we can configure these wallets.
Note! Any one of these wallets is necessary for the deployment purpose, we will explain a method for both, users can choose anyone according to their desire.
As we already discussed, a wallet is needed to deploy the smart contract on the blockchain. MetaMask is the commonly used wallet and it supports a wide range of blockchains. Binance introduced its own wallet for BNB Chain. So, first, we see how to configure with MetaMask, and then we configure with Binance Chain wallet.
4. MetaMask Configuration with BNB Chain IDE
To connect a MetaMask wallet with BNB Chain IDE, you need to click on the "Unconnected" button shown at the top of the figure in step 1. Once you click that button, a window will appear and you need to click "Injected Web3 provider". After that, it will give you the option to connect two wallets. You can select MetaMask, once you select it, it will as you whether you want to test the network or the main network. For testing purposes, usually, the testnet is used. Once your application is free of errors and issues, then you can deploy it on the main network. As deploy on the real main network costs money and once you deploy your smart contract it can never be changed later. So, for learning purposes and testing purposes, users are suggested to use a test network.
!Note: The IDE will automatically check and provide options corresponding to the IDE, such as if you open an IDE for Ethereum, it will show the option for just MetaMask wallet connectivity, while for BNB Chain it will show an option for both Binance Chain Wallet and MetaMask wallet as BNB Chain supports both of these wallets.
5. MetaMask connected with BNB Chain IDE
Following figure 4, you can easily connect your wallet with BNB Chain IDE, but you still need dummy gas to deploy your smart contract on the test network, and you need real BNB as a gas fee if you want to deploy your smart contract on the BNB Chain Mainnet. Now, we will see how we can buy dummy BNB to pay as a gas fee to deploy and make transactions to our deployed smart contract.
To buy a dummy BNB you need to go to the BNB Chain Faucet, once you go there, you can see an image as shown below.
5. Binance Smart Chain Faucet (available at :https://testnet.binance.org/faucet-smart)
To buy a dummy BNB, you simply need your wallet address.
6. Buy BNB using MetaMask
Following figure 5, you can get a dummy BNB and deploy your project on BNB Chain Testnet easily.
To obtain tokens using Binance Chain Wallet, first log in to Binance Chain Wallet successfully, click on the top select network to select the Binance Smart Chain test network. Create a Binance project through the entry page as shown in figure 1 and figure 2. Click the welcome button in the lower-left corner to enter the homepage of BNB Chain IDE. Below, there are some plug-ins for BNB Chain, contract editing templates of templates, and recently opened projects.
7. Binance Chain Wallet Configuration with BNB Chain
Once the wallet is connected, you can change/select the desired environment for the wallet, We are connecting for Binance Smart Chain. So, we will select Binance Smart Chain.
8. Binance Smart Chain Test Network Selection
To get BNB using Binance Chain Wallet, simply follow the steps shown in figure 8. Following the steps, you can easily get BNB.
8. Get BNB using Binance Chain Wallet