Comment on page
User Guide for Matrix IDE
Matrix IDE is an online integrated development environment built on the Matrix Mainnet supporting the use of Solidity to develop, compile, deploy and interact with Matrix smart contracts online.
1. Icon Panel: Click to choose which plugin to show in the Side Panel
2. Side Panel: A graphical user interface to show icons
3. Main Panel: A work area for editing files
4. Terminal: The area to show results
The Icon Panel contains the file explorer, the compiler, deploy & run functions, tools, settings and other useful features.
The File Explorer
The File Explorer is a tool for browsing files saved in the local storage. By default, it contains two test contract files and one Matrix address converter.
Click + on the upper left corner to create a new Solidity contract file. Let’s name the file test.sol in the window that pops up.
Click OK, and you will see hello.sol under Browser in the File Explorer on the left side panel.
Simultaneously, a newly created file will open in the Editor. At this point, the file is still empty.
Next, write some simple Solidity codes.
Add a local file.
You may select files from your local storage to load onto the IDE explorer.
You can edit codes here.
Select the newly created hello.sol file and enter a simple string of codes.
Let’s use the simplest codes we can think of, as in the example above. The function of echo () is to return any string of codes that is entered.
The Terminal is mainly for showing the results of running a contract or a static analysis.
You may click the box right next to Compiler to choose which version of Solidity compiler you wish to use.
Click Start Compiling to compile the currently selected code file in the Matrix IDE Compiler. In this case, the file is hello.sol.
If no error is found after compiling is done, you will see Hello in the dropdown menu under Compiler Configuration.
Deploy & Run
On the Deploy & Run page, you may deploy a compiled contract as well as run already deployed contracts.
Three options are offered under Environment.
· Java Script VM is a virtual machine in Java Script. It operates in your explorer so you don’t have to worry about Java Script node configuration or losing MAN. This environment is most suitable for learning and prototype testing.
· If you have your own node, you may select Aiman Provider to connect IDE to your node. However, please note that if a node is connected to the Mainnet, any transaction will be charged a transaction fee.
In the image above, the selection box is set to Hello. The selection box will contain a list of compiled contracts. Click Deploy to deploy the selected contract. After mining, newly created items will be added, which may take a few seconds. Please note that if the constructor contains parameters, then they will need to be specified.
At Address can be used for viewing deployed contracts. This is assuming the provided address is an item under the selected contract. Please note that this feature does not currently offer security checks. Make sure you are using a trusted contract address.
Now we can see our contract under Deployed Contracts. Click our contract.
As we can see, the echo method set out in the Hello contract automatically shows up.
The return value is the same as the parameters we entered. We have achieved our goal.
address_conversion.sol is a library file for swiftly migrating Ethereum contracts to the Matrix Mainnet.
toMan converts an Ethereum address to an Matrix address.
toAddress converts an Matrix address to an Ethereum address.
This section contains some useful tools you may need on the Matrix Mainnet.
Select a theme.