Deploy with Remix
Remix is a Ethereum-focused IDE: an online platform to develop and deploy smart contracts.
Getting started with Remix IDE
To start building a smart contract, click on New File and name it HelloWorld.sol
.
Smart contract
Copy and paste the Smart Contract code provided below into the newly created HelloWorld.sol
file.
Compile Smart Contract
Go to the Solidity Compiler tab (below the search button)
Select compiler version to 0.5.10
Now, compile
HelloWorld.sol
After successful compilation, it will show a green tick mark on the Compiler tab button
Network configuration
To deploy to the Solaris mainnet or Nebulas testnet with Remix, we have to connect to the Web3 world which can be accomplished by using any of the services like Metamask, Brave, Portis, etc. We will be using MetaMask in this tutorial. Please follow this guide to set up a MetaMask Account.
Solaris Mainnet
Open Metamask. Click on the network dropdown menu (set to Ethereum Mainnet by default) and click on the Add Network button and fill in network info:
Network Name: Solaris Mainnet
New RPC URL: https://rpc-mainnet.uniultra.xyz
ChainID: 39
Symbol: U2U
Block Explorer URL: https://u2uscan.xyz
Go ahead and click Save
Copy your wallet address from MetaMask by clicking over your account name
Make sure you have enough U2U token on Solaris mainnet. You can head over to U2OTC.com to buy some U2U token.
Finally, to deploy to Solaris, refer to the instructions in the "Remix deployment" section below.
Nebulas Testnet
Open Metamask. Click on the network dropdown menu (set to Ethereum Mainnet by default) and click on the Add Network button and fill in network info:
Network Name: Nebulas Testnet
New RPC URL: https://rpc-nebulas-testnet.uniultra.xyz
ChainID: 2484
Symbol: U2U
Block Explorer URL: https://testnet.u2uscan.xyz
Go ahead and click Save
Copy your wallet address from MetaMask by clicking over your account name
Head over to Faucet and request test U2U - you will need this to pay for gas on the U2U network. Select U2U Nebulas Testnet as the network and U2U Token as the token in the faucet.
Finally, to deploy to Nebulas, refer to the instructions in the "Remix deployment" section below.
Remix Deployment
In both Testnet and Mainnet, you do the below to deploy your smart contract using Remix. The below step will use the connect MetaMask API keys you set up in the previous steps.
Select Injected Provider MetaMask in the Environment dropdown and your contract
Accept the Connect request received in MetaMask. If the popup doesn't open by default, you can also try manually launching the MetaMask extension
Once MetaMask is connected to Remix, the
Deploy
transaction would generate another MetaMask popup that requires transaction confirmation. Simply confirm the transaction!
Voila!!! Your contract has been deployed.
Last updated