Deploying a smart contract using Atom IDE
Easily deploy a smart contract, which is developed in Atom, to the Side Chain using the Atom IDE plug-in.
Configuring the Luniverse Atom plug-in
Installing the Luniverse Atom plug-in


- Go to http://atom.io to download and install Atom. (Atom is an IDE for open source development, which is used by many developers.)
- After the installation, run Atom and connect to Package Store. (Press Cmd+Shift+P and search “install package”.)


- Search for “luniverse-atom-plugin” in Package Store. Click [Install] to download the plug-in.
Obtaining an access token
To use the Luniverse Atom plug-in, you need to register first by obtaining a Luniverse access token. You must not lose the access token because it is used to call the Luniverse server API and utilized as the user verification method.


- Click Packages > luniverse-atom-plugin > Settings.
- Click the link at the bottom in Settings to obtain a Luniverse access token.
- Follow the link and enter your Luniverse membership ID and password to log in.
- If you have not signed up for Luniverse, refer to the section of Sign-up and Login for how to sign up for Luniverse.


- Click [Copy] to copy the access key of the access token you have obtained.


- Go back to the Luniverse plug-in on Atom and enter the access key in the field of the Luniverse access token at the bottom of Settings (simply press Cmd+V to paste the copied access key).
Deploying a smart contract developed in Atom to Luniverse
Requesting to deploy a contract to the Luniverse chain
pragma solidity ^0.4.24;
contract SimpleStorage {
uint256 private value;
constructor(uint256 _value) public {
value = _value;
}
function setValue(uint256 _value) external {
value = _value;
}
function getValue() external view returns (uint256 _value) {
return value;
}
}
- Use Solidity on Atom and create a simple smart contract named SimpleStorage.


- Compile the created smart contract. (Click [Compile Contact Code] from the context menus that are displayed when you right-click in Atom Editor.)


- When the Create User Contract screen appears, enter the name and description of the smart contract.
- Select the Side Chain to deploy the smart contract in Chain Select.
- When deployable chains are not shown, check if there are available chains in Luniverse Console.
- Select the smart contract to deploy in Contract Select. Contract Select shows contracts that are included in the compiled smart contract file.
- When you select the smart contract to deploy, a window for entering a constructor parameters appears. Enter an appropriate value for each parameter.
- Click [Apply] to complete the process to request deployment of the smart contract.
Deploying a smart contract


- When the deployment of the smart contract is requested, a message appears at the top of the screen. Click [Details] to go to Luniverse Console.


- Go to Home > Chain > User Contract List and check if the requested smart contract has been added.
- If the state of the smart contract requested for deployment is “Ready to Deploy,” the deployment has been successfully requested.
- Click [Ready to Deploy] to go to the "User Contract Detail" screen.


- Click [Deploy] to deploy the contract.
Updated about 3 years ago