top of page

Ethereum Development Environment Technical Guide

This page provides technical details about the private "Ethereum Development" environment that has been released in "alpha mode" for early adopters and testers. 

This private development environment is for developing apps/DApps for Ethereum block-chain. It is a vanilla development environment and is not tied to any specific use-case. You can use it to develop and test any type of blockchain based app. Underneath it is a regular Ubuntu Linux instance and all standard Ubuntu CLI commands should work on it.

Please note that this development instance has been released purely for review and development purposes and does not provide any resiliency or deep level of security. As such no sensitive, confidential or production data should be written to it.

  • Data storage & recovery – All data will be deleted and will be lost the moment the instance is terminated. To persist data across restarts, please save appropriately on the instance. 

 

  • Type of blockchain – This development environment is for Ethereum(GETH) blockchain. In near future, Web3fi plans to offer choice of multiple blockchains (e.g. native Ethereum, Polygon, Hyperledger Fabric) for its customers to choose from.

 

  • Feature-set – This instance comes with controls and features (E.g. NGINX proxy) to enable you to start developing as fast as possible.

  • Controls for the development environment - You can control the development instance through the control-panel provided in the development dashboard (Web3fi website > Sign-in > Main dashboard > Development (side panel)> development control-panel). Once a new development instance has been instantiated through the control-panel, please give it 1 min for the instance to be fully up and configured before attempting to connect your REMIX IDE to it or logging into the instance. Below figure 1.1 shows the development instance dashboard screen.

 

  • Access to the development instance – The private development instance can be accessed by using PUTTY app with the putty-key. Upcoming section provides more details about accessing the instance.

 

  • Performance of private development instance – It has been optimized to perform optimally as a development environment. In-order to save power & resources, these instances have been pre-configured to stop automatically after 3 hours of idle time. Kindly ensure to save your data, where appropriate to avoid loss.

  • Components of the sandbox

 

a. Blockchain nodes and reviewers - This is a GETH Ethereum instance that runs in DEV mode by-default when first created. By design, after restart, you will need to manually start Ethereum again if needed. As this is a private development instance, it does not try to connect to public Ethereum nor connect to any peer nodes. Please do not attempt to change this behavior.

b. Smart-contract – No smart-contracts are deployed by default to the private blockchain network. Though feel free to deploy your own smart contracts for development and testing purposes.

 

c. Certificates This development instance comes with 1 self-signed certificate by-default to enable external HTTPs connections. Your REMIX IDE uses this certificate to connect.

d. Accounts - This private DEV instance comes with 1 pre-created account that is funded with test Ether. You can create as many accounts as needed to assist with your project.

Rest of the section provides further information on how to get started with using this private blockchain instance.

How to guide index

  1. How to control the DEV instance​?

2. Start developing with your private development instance...

3. How to get console access to the instance?

4. How do I run GETH CLI commands?

5. Create your own smart-contract and deploy it

6. Let's create a web based DApp

7. How do I use GIT on the instance?

8. How do I transfer files to the instance?

Caution: Using these DEV instances for any reason other than stated above is strictly prohibited. Using the instance for crypto mining is also strictly prohibited.

How to control the DEV instance?

To get started, sign in to the platform from the main website page. The navigate to the "My Development Environments" dashboard page (Web3fi website > Sign-in > Main dashboard > Development (side panel)> My Development Environments).

 

Figure 1.2 shows the "My Development Environments" dashboard page.

Here you will be able to see a summary of all your development environments and explore respective technical documents. Now click on "Use now" to go to the "My Development Instances" dashboard page.

Figure 1.3 shows the "My Development instances" dashboard page.

Here you will be able to control respective development environments/instances through the control-panel.

This control-panel offers 5 different control buttons:

 

1) Create new instance - By clicking this button you can spin-up a new private development instance. As mentioned previously, when new instance is created, it by-default runs GETH DEV instance as start-up time.

 

2) Get instance details - This enables you to check the state of the instance, get instance IP address and name.

 

3) Stop running instance - This enables you to stop the instance when not needed.

4) Restart stopped instance - Restart the instance that was stopped earlier. An instance has to be in stop state to be restarted

 

5) Terminate Instance This button enables you to terminate an instance. Please terminate your instance after use or before attempting to spin-up a new instance.

The black console panel below will display the respective messages for your reference.

The hyperlink with label "putty-key" and key icon lets you download the key to be able to SSH into the instance. You can do a Google search to see tutorials on "how to use putty with putty key to ssh into a linux server".

Start developing with your private development instance...

By clicking "Use now", from "My Development Environments" dashboard page, navigate to "My Development Instances" page. 

Figure 1.3 shows the "My Development instances" dashboard page.

From here, click on "Create new instance" button to spin-up a new private Ethereum development instance. After 1 min, click on "Get instance details" button to get instance IP address. Now copy the IP address from the console screen. 

Go to "https://remix.ethereum.org/" to access online IDE and connect it to your private development instance. Go to "Deploy & Run Transactions" tab on left side panel (5th icon from top - Ethereum) and choose "Custom - External Http Provider".

Then enter the copied IP address as "https://122.248.230.90" and click "OK".

You should now get connected to your private Ethereum instance.

Please note: Incase you get an error, it could be because your browser may need you to accept the self-signed SSL certificate of your private dev instance. This is normal behavior and as expected. For address this, first open a new tab in your browser, enter the IP address as "https://122.248.230.90" and click "proceed to 122.248.230.90". Now try again using REMIX IDE to connect to your private dev instance.

You should now see the connected network as "Customer (1337) network" which is your very own private Ethereum network. You will be able to see 1 account in the drop-down that was pre-created for you with test ether.

You are now ready to build your DApps and deploy your very own smart-contracts.

How to get console access to the instance?

By clicking "Use now", from "My Development Environments" dashboard page, navigate to "My Development Instances" page. 

Figure 1.3 shows the "My Development instances" dashboard page.

From here, click on "Create new instance" button to spin-up a new private Ethereum development instance. After 1 min, click on "Get instance details" button to get instance IP address. Now copy the IP address from the console screen. 

Now download and save the putty-key to your desktop from the same control-panel.

Open Putty app, and select the key by going to SSH > Auth > Browse from left panel.

 

 

Now, input copied IP address by clicking Session on left panel and then clicking Open. Click Yes to pop-up alert. Now login by entering "ubuntu" at the prompt.

You should now be connected to the console of your private Dev instance.

How do I run GETH CLI commands?

Once you are logged-in to the console, you can pretty much follow the GETH reference guide to customize the Ethereum network per your needs (while keeping it private), create as many accounts you need to test etc.

Here are some commands to get you started:

You may need to use "sudo" to run some commands

1) Start Ethereum blockchain network in DEV mode:

geth --dev --http --http.vhosts "*" --http.api eth,web3,net,debug,personal --datadir datadir/ --http.corsdomain "*" --http.addr "localhost" --dev.gaslimit 0 --miner.gasprice 0

2) Connect to the GETH Javascript console:

geth attach datadir/geth.ipc

3) Check the accounts (inside Javascript console):

eth.accounts

4) Check balance of a particular account (inside Javascript console):

eth.getBalance("put account ID here")

Reference guides:

a) GETH command line to modify/control private Ethereum network behavior -

 

https://geth.ethereum.org/docs/fundamentals/command-line-options

b) GETH Javascript console to check accounts, balance, transfer tokens etc.

https://geth.ethereum.org/docs/interacting-with-geth/javascript-console

c) Clef command line to manage accounts.

https://geth.ethereum.org/docs/fundamentals/account-management

Create your own smart-contract and deploy it

Lets create a simple solidity smart-contract and then deploy it to your private Ethereum network. 

You can find the code here at our GIT repo: 

https://github.com/web3filabs/Ethereum

Create a new file by clicking on files icon on the left panel (2nd from top) and paste the solidity contract code from the GIT repo.

 

 

 

 

 

 

 

 

 

 

 

 

Then go to the "Solidity Compiler" tab (4th from top), choose correct compiler version and compile the code.

Then go to "Deploy and Run transactions" tab (5th from top) and deploy the contract by clicking "deploy" (orange button). Woo hoo...your smart-contract is now deployed to your private Ethereum blockchain. You can see the hash details on the right bottom of the screen.

 

 

Now, click on "Deployed Contracts" tab on the left panel. This will reveal the in-built DApps interface in the REMIX IDE. You can click "getWeather" to read current weather if already set. It will return blank string.

Now input the weather at your location and press "setWeather". This will write a new transaction to the blockchain. Then click "getWeather" to read from the blockchain.

Let's create a web based DApp

In the previous section you deployed a solidity smart contract to set and read your local weather. Lets create a web browser based DApp for it.

You can find the code here at our GIT repo: 

https://github.com/web3filabs/Ethereum

From previous step, after deploying the smart contract to your private Ethereum instance, from the "Deployed Contract" tab, copy the address of the smart contract. It is the address that was returned by Ethereum blockchain once the smart contract was successfully deployed on the network.

Now copy/clone the "index.html" file from the GIT repo to your local desktop and open it in your favorite IDE. Change the IP address to your private Ethereum instance, the smart contract address to the one we copied in previous step and save the file.

Now by right clicking, open the "index.html" file in your browser. Your DApp is now ready :)

Play away by setting and reading the weather.

How do I use GIT on the instance?

As mentioned previously, underneath this DEV instance is a regular Ubuntu Linux instance and all standard Ubuntu CLI commands are expected to work on it.

GIT is already pre-installed on the instance. So you can directly clone our GIT repo (https://github.com/web3filabs/Ethereum) and start using the code.

Also to connect to your own GIT and setup it up, regular GIT commands will work.

How can I transfer files to the instance?

In general, GIT or any other repo cloning commands should suffice for downloading code files etc.

However, if for some reason, you do need to transfer files directly, below is an example of how it can be achieved. For this example, I am using WINSCP software. You can choose your own as needed.

Open WinSCP software. Enter DEV instance IP address, for port use "22". For "User name" enter "ubuntu"

Choose Advanced > Advanced > SSH > Authentication and choose the putty-key file you had downloaded previously(refer). Then click "OK". Click "Login" on main screen.

You should now be connected to the DEV instance and can see local files.

bottom of page