Smart contracts IDE
The SettleMint IDE is the only tool you need to edit the smart contract set template you have selected, or write your own brand new smart contracts. The programming language used for your BSC smart contracts is Solidity.
Using the IDE
When you open the IDE, you land in an instance of Visual Studio Code similar to the image below.
On the left, in the “Explorer” panel, you can see all the folders and files related to the smart contract set.
The smart contract files are located in the “contracts” folder. You can edit them, or use them as they are if the template fits all your needs.
The “deploy” folder contains the scripts that enable the deployment of the smart contract set on the blockchain. You might have to edit these scripts if you add new arguments to the constructor of your smart contract.
The “test” folder contains a script that lets you test the functionalities of your smart contracts. You can add new ones if you edit the template. Do not hesitate to go through the test cases as they provide valuable information on how to use your smart contracts.
The subgraph folder holds all the files needed to index your smart contract using the Graph protocol.
Several scripts are defined in
package.json to help you use the smart contract set:
- lint to lint your smart contracts, i.e. find the stylistic errors.
- compile to compile your smart contracts.
- test to run the test script in the “test” folder.
- smartcontract:deploy to deploy the smart contract set on the blockchain.
- smartcontract:deploy:reset to deploy from scratch after a first deployment.
- graph:config to create the middleware configuration file.
- graph:compile to compile the middleware files.
- graph:codegen to create the middleware schema.
- graph:build to build the middleware.
- graph:deploy to deploy the middleware.
- graph:all to execute all the graph scripts in one command.
To execute the scripts related to the Graph middleware, you need a middleware instance in your app.
You can execute these scripts in the terminal integrated with the IDE by running
For example, to run the
smartcontract:deploy task using the terminal, open a new terminal (ctrl + shift + `) and run the command
To be able to deploy your smart contract set on the blockchain you need to have a private key enabled on your node to sign the transaction, and you need to fund this key with Ether to cover the cost for the transaction. You can create a private key and fund it in the Private keys section of your application. More about private keys.
Every instance of the IDE contains a set of pre-built smart contract templates. These templates are easily customizable to match your specific use case. Discover the smart contract set templates for Binance Smart Chain.