Select Get started template on ChainIDE homepage this a tutorial on how to deploy a simple Decentralized Finance Smart Contract project.
There's also another Binance MasterClass Week3 Template that has tutorial and assignment to help you if you're an absolute beginner it has sample code which you can compile and deploy & interact with the smart contracts on the chainIDE before writing your own. Binance Smart Contract(BSC) runs smart contracts & supports EVM(Ethereum Virtual Machine). It uses BNB mortgage to participate in successful verification of valid blocks given proposed transaction fees in the blocks which can be changed.
pragma solidity ^ 0.6.2; contract AddressBalance { mapping(address => uint ) public balances; function setCurrentBalance(uint currentBalance) public { balances[msg.sender] = currentBalance; } } contract Update { function setCurrentBalance() public returns (uint) { AddressBalance addressBalance = new AddressBalance(); addressBalance.setCurrentBalance(10); return addressBalance.balances(address(this)); } }
compile contract compile contract success
The next step is to deploy the smart contract but before that, we need the network setup with Metamask to fund the wallet with BNB:-
The smart contract deployed on the BSC network can use the
Mainnet you have to use BNB purchased from the Binance Marketplace and deposit it in its own BEP20 address before deployment
We'll focus on the Testnet, here deployment cost is low and takes a simple process. Deployment on BSC requires some setting for Metamask:-
Network Name: BSC Testnet New RPC URL: https://data-seed-prebsc-1-SI-binance.org.8545/ Chain ID: 97 Currency Symbol: BNB Block ExplorerURN: https://testnet.bscscan.com
Connect Metamask to your ChainIDE website by switching the browser to ChainIDE window then click on the Metamask icon where 3dots will appear on the upper-right corner then select connect site. A box will appear click it manually to connect to the current site and click to confirm step by step.(there will be a green dot to show that it has connected on Metamask)
click deploy & interaction on the ChainIDE sidebar. Click deploy then set value to 1,000,000 and confirm the contract to be deployed is correct then click deploy. Jump out of Metamask interface if gas is above the set value modify it. If the deployment fails it means the gas price is high. On successful deploy info-interface and functions in the contract will appear o the right with deployment successful. Click and interact with the smart contract by submitting values of function to implement the contract.