Code studio
Code Studio introduction
Introduction
The Code Studio is a web-based Visual Studio Code IDE. It offers a comprehensive toolset for building decentralized applications (dApps), including pre-configured extensions and a seamless GitHub integration.
With the built-in SettleMint SDK Command Line Interface (CLI), you can easily use platform services directly from within the Code Studio, making it easier to build your dApp.
Types of code studio
Currently, we offer the following types of Code Studio:
- Smart contract sets - A powerful tool that accelerates the development of your smart contracts. This code studio comes with pre-built smart contract set templates for your chosen use case, which are easily customizable to match your needs. It also includes compilation and migration scripts that drastically simplify deployment to the relevant blockchain.
A Smart Contract Set is a code studio that comes with a smart contract set template for your chosen use case. It is a powerful tool that accelerates the development of your smart contracts.
You can choose from a wide variety of templates in our open-source template library. Each template includes pre-built smart contracts which you can then customize to meet your specific needs.
Overview of the smart contract deployment process on settlemint
SettleMint's smart contract sets include both Hardhat and Foundry, enabling you to compile, test, and deploy using your preferred framework or a combination of both. This flexibility allows you to optimize your development process to best suit your project needs and preferences.
The following is a high-level overview of smart contract development processes at SettleMint.
1. Adding a smart contract set
- Add dev tool: Navigate to the application you want to create the smart contract set in, then to the dev tools page and press the button "Add dev tool".
- Code studio: Select the "Code studio" option as the type of dev tool.
- Smart contract set: Select the "Smart contract set" option as the type of Code studio.
- Picking Your Template: Pick the template of your choice.
For detailed instructions, please see add a smart contract set.
2. Compiling and configuring the smart contract
- Compiling: Convert your smart contract code into a format that the blockchain can understand and execute.
- Configuring: SettleMint sets all the necessary configurations for you,
- Purpose: Tailors the deployment process to your specific requirements and ensures your contract can run on the blockchain.
3. Deploying and interacting with the smart contract
- Deploying: Upload your compiled smart contract to a blockchain network.
- Interacting: Once deployed, interact with the smart contract through transactions that call its functions.
- Purpose: Makes the contract accessible on the blockchain so users can interact with it and utilize its features to perform actions defined in its logic.
Tools to use
At SettleMint, we provide the option to use either Foundry or Hardhat. Both of these tools allow you to compile and deploy smart contracts within the SettleMint IDE. The workflow in both frameworks is very similar: you compile and then deploy the smart contracts.
Foundry
Foundry is a toolkit for EVM development. It provides tools to compile, test, and deploy smart contracts.
- Initialize Project: Set up your project folder and deploy a Foundry smart contract set.
- Write and Configure Contract: Create your smart contract code in Solidity
and set up your project settings in a
foundry.toml
file if needed. - Compile and Deploy Contract: Convert your Solidity code into bytecode and deploy your compiled contract to the blockchain network of your choice.
Hardhat
Hardhat is a development environment for EVM software. It provides a flexible and extensible ecosystem for building, testing, and deploying smart contracts.
- Initialize Project: Set up your project folder and deploy a Hardhat smart contract set.
- Write and Configure Contract: Create your smart contract code in Solidity
and set up your project settings in a
hardhat.config.js
file if needed. - Compile and Deploy Contract: Convert your Solidity code into bytecode and deploy your compiled contract to the blockchain network of your choice.
Key points
- Smart Contracts: Self-executing programs with predefined rules.
- Compiling and Configuring: Converts code into a format the blockchain can run and tailors the deployment process.
- Deploying and Interacting: Uploads the compiled code to the blockchain and makes it accessible for interaction. By following these steps and using the appropriate tools, you can easily create, compile, and deploy smart contracts to automate and secure your business processes on the blockchain.
SettleMint's smart contract templates serve as open-source, ready-to-use foundations for blockchain application development, significantly accelerating the deployment process. These templates enable users to quickly customize and extend their blockchain applications, leveraging tested and community-enhanced frameworks to reduce development time and accelerate market entry.
Open-source smart contract templates under the MIT license
Benefit from the expertise of the blockchain community and trust in the reliability of your smart contracts. These templates are vetted and used by major enterprises and institutions, ensuring enhanced security and confidence in your deployments.
Template library
The programming languages for smart contracts differ depending on the protocol:
- For EVM-compatible networks (like Ethereum), smart contracts are written in Solidity.
- For Hyperledger Fabric, smart contracts (also called chaincode) are written in TypeScript or Go.
Solidity contracts IDE
Template | Description |
---|---|
Empty | A minimal smart contract in Solidity |
ERC20 Token | Standard ERC20 token implementation |
ERC20 with MetaTx | ERC20 token with meta-transaction support |
ERC20 with Crowdsale | ERC20 token with integrated crowdsale |
ERC1155 Token | Multi-token standard (ERC1155) |
ERC721 | Standard NFT token (ERC721) |
ERC721a | Gas-optimized NFT (ERC721A) |
ERC721 Generative Art | NFT with generative art logic |
Soulbound Token | Non-transferable token |
Supply Chain | Asset tracking across supply chain |
State Machine | State transition logic |
Diamond Bond | Bond issuance and tracking |
Attestation Service | Verifiable claim attestations |
Chaincode templates (hyperledger fabric)
Template | Description |
---|---|
Empty (TypeScript) | Minimal TypeScript chaincode |
Empty with PDC (TypeScript) | Chaincode using private data collections |
Empty (Go) | Minimal Go chaincode |
Create your own smart contract templates for your consortium
Within the self-managed SettleMint platform, you can create and add your own templates for use within your consortium. This fosters a collaborative environment where templates can be reused and built upon, promoting innovation and efficiency within your network.
To get started, visit: SettleMint GitHub Repository