Caduceus implements Remix IDE which allows for rapid decentralized application development and deployment to the Caduceus test network and the Caduceus main net. All Caduceus smart contracts under are developed in the Solidity language. (For more on Solidity programming, please see https://soliditylang.org/)
The Caduceus IDE stores Solidity smart contracts in easy to read files that can be stored with or without a file hierarchy. To create a new smart contract, all you need to do is to simply create a new Solidity file.
Create New Solidity File
Clicking on the plus sign will allow you to create and name your new Solidity file.
Name your new Solidity file by typing in the filename with a .sol extension in the box as below.
Import File from Disk
If you have a Solidity file on your local hard drive, you can quickly import it without having to paste the entire thing into the IDE. All you need to do is to click on the folder icon as follows:
Then, you have to select the correct file that you want to import using the file explorer box and click on Open:
Import File from Github
One of the simplest ways of working with Github is to directly import your Solidity file from a Github URL. All you need to do is to click on the Github icon, and fill in the URL in the pop up dialogue that appears. Alternatively, you can click on the big "import from Github" button.When you add the URL, you will see the remote Github file hierarchy emerging on the left side on the screen, as highlighted below in the ERC-20 file import example below:
This is a one time inclusion only. When you modify the file in the editor, you do not actually change the remote file. Any changes will be saved to your local browser, and compiled and deployed separately to the remote file.
Importing a Dependency
A dependency is a file that contains one or more smart contracts that you use as is. (You can utilize them in your own smart contracts, but cannot modify them.) A dependency or library can be imported directly in your smart contract text.When importing from NPM, or a URL (like Github, a IPFS gateway, or a Swarm gateway) you do not need to do anything more than use the import statement in your contract. The dependencies do not need to be “preloaded” into the File Explorer’s current Workspace before the contract is compiled.Files loaded from the import statement are placed in the Files Explorer’s current Workspace’s .deps folder.
IDE Panel Controls
File Explorers is the first control on the left hand selection panel. As expected, File Explorers help to navigate your smart contract files. One file can contain multiple smart contracts. Or, if you choose, you can put one contract in one file to make things simpler.The File icons visible below in succession allow you to 1. Create New File 2. Publish as a Gist to Github, or 3. add a local file from your hard drive to the file explorer, respectively.
To do the reverse, that is, to save a Solidity file to your local disk, create an empty file in a folder, and name it with a .sol extension. Open it using your favorite text editor such as Notepad on Windows, select all code using CTRL ,A and copy the solidity file contents using CTRL C and CTRL V.You can then open it by clicking on the the folder icon above.
sThe Solidity Compiler panel allows you to configure the compiler before you compile your smart contract. Only one smart contract can be compiled at a time, even if your Solidity file contains more than one contract.The system allows you to select the compiler version using the dropdown box at the very top.The compiler version is especially important when you use a dependency or a library that is has already been written in a specific version of Solidity. You must ensure that the selected compiler version matches the code version exactly. For example, if you see pragma solidity 0.8.0 in your contract, you cannot use a lower compiler version such as 0.6.0.Language is set to Solidity by default, that usually that is all that you will use.
If the auto compile checkbox is checked, the system will compile every few seconds when the file is auto-saved or when focus moves away from the current file. If a contract has a lot of dependencies, it can take a while to compile, so that is something to keep in mind as you code. If your contract is large, leaving auto compile unchecked might be a good idea.
Optimization is an advanced feature that allows you to optimize compiled bytecode depending on the number of times the bytecode is estimated to run. You can input this estimation in the provided text box. Leaving Optimization unchecked would not have significantly adverse effects for smaller contracts.
Remix Plugins allow developers to import external functionalities right into the IDE.
Let's take a look at some of the more useful, popular plugins.SolHint Linter
The SolHint Linter is a type of linter - a piece of software that scans your code for formatting, syntax and best practice related issues. In other words, it helps you develop your apps optimally, making sure you use the resources at hand most optimally.