5 awesome tools for Ethereum development!

Smart contract development is still in its early stages! The tools you can use to build, monitor and visualize your smart contracts evolves every day and we picked for you the 5 tools you should keep an eye on.

 

MetaMask

Simple access to the blockchain through the browser!

MetaMask is a browser extension available for Chrome, Firefox and Opera that allows anyone to interact with the Ethereum blockchain in a simple way! From MetaMask, you can access or create a new Ethereum address, easily send transfers to other address and sign transactions to interact with Ethereum decentralized applications (DApps).

Enabling users to access and play with the blockchain in one click is awesome and MetaMask allows developers to build awesome applications like CryptoKitties, EtherDelta that rocks the blockchain!

 

Infura

Scalable and safe Ethereum nodes available for developers.

When starting with blockchain development, something that can be a deal breaker is getting the Blockchain on your device! Thanks to Infura, you can access any data you would normally access through the web3.js tool through their API.

infura provides to anyone, free of charge a set of nodes you can query to get block informations, transaction receipts and events. On their website they tell they handle more than 5 billions requests per day and more than 9 thousand developers.

To use Infura, you need an API key that you can get by registering on their website. You should not that some operations are not permitted as they may be too costly for them to handle. Such as new blocks and event listening.

 

 

Remix IDE

Powerful web based Ethereum IDE.

Remix is a web interface that helps you to write, deploy and interact with your smart contracts. It is available here but can also be self hosted as the project is open source.

The interface can be sometimes a little bit complicated but it’s really powerful. It also come with a code analyser that will help you write better code by raising warnings, and a debugger that let you run code step by step! As Remix runs inside your browser and connects to the Ethereum blockchain through Metamask, you can deploy directly to any Ethereum network or even your own test blockchain.

 

 

DAppBoard ethereum analaytics

DAppBoard

The analytics platform for Ethereum’s smart contracts.

DAppBoard is a new Ethereum blockchain explorer. With this tool, you can easily see in a visual way how smart contracts and decentralized applications are doing. How many users are using a decentralized application, how much Ether is processed by the smart contract. You can also visualize global charts that compares games and tokens living on the blockchain.

DAppBoard is still in its early stage but might offer an API in the future that can be great to speed up development of Ethereum smart contracts and empower creators with bird eye view on their applications.

Pragma

An easy to use IDE for Ethereum smart contract development.

Pragma is a tool really similar to the Remix IDE that lets you write, deploy and interact with your contracts directly from your browser. It is more limited than Remix but more easy to understand and use! After deploying you contract, you can even share a user interface that lets your users interact with the smart contract in a really simple way. This is one of the key feature as users don’t need to install anything (only Metamask) and you don’t have to develop any front end.

Pragma is the number on go tool for first time Ethereum developers that just want to play around and test the features of Solidity.

 

 

Are you building or using a tool you want us to feature? Let us know in the comments!

Fork and scalability

Since the recent hard fork, the difficulty and reward for mining were adjusted. On the 18 of October, the Ethereum network managed to process more than  500K transactions, around 5,000 more than its previous high, as usage has seemingly considerably increased in the previous months.

With the network now almost instantly confirming transactions in just 15 seconds, Ethereum is one of the fastest decentralized public blockchain.

What is awesome is not only the decentralized network is faster to process and verify transactions, the price also had a diet. As the network is able to clear the queue of pending transactions, the price you need to use as gas drastically decreased to $0.006 which is awesome considering an Ethereum transaction can carry any amount of money through the world.

Scalability is an important parameter when you’re developing solutions based on the blockchain and the Ethereum technology is moving in the right direction with the development of solutions able to scale as networks like banks in the future.

We definitely expect the amount of transactions to grow due to the adoption of the technology by big institutions and the release of decentralized applications (Dapp) that were founded in the recent ICOs. In the following weeks and months, working on the amount of transactions per day is an important problem and the Ethereum team and contributors should be proud of their hard work! (and hard fork)

An introduction to Plasma

As you may know, blockchains are not as effective for processing an enormous amount of transactions as a centralised system like the VISA network that can handle as more as 2,000 transactions per second. Plasma is a scalability solution for blockchains. The Plasma solution was proposed this year by Joseph Poon and Vitalik Buterin. This interesting talk explains how Plasma works and shows how smart contracts can be implemented on such a system. It also explains why not all contracts are suitable as is. Primitives for the programming language Solidity are suggested that could ease cross-chain communications in such systems.

You can find the Plasma white paper and more informations on plasma.io.

The talk was held by Christian Reitwiessner who is working at the Ethereum Fondation and is the creator of the Solidity programing language used fo developing Ethereum smart contracts. You can find the slides of the talks here and the text version of the talk here.

We are excited to see the future of the Plasma technology.

 

ETHWaterloo hackathon was awesome

ETHWaterloo is the world’s largest Ethereum hackathon of 2017, where over 300 developers of all backgrounds worked on projects using Ethereum that can have an impact on the world. Teams to make something great in only 36 hours by providing an abundance of hacking resources like mentors, sponsors, and software.

If you did not made it to the event you can still enjoy it thanks to the streamed video. The keynote includes some awesome speaks from the organizer and main actors of the blockchain ecosystem about what to look in the future such as the relationship between blockchains and mechanism design.

And Vitalik Butterin explaining what are the strenghts and visions about blockchains and privacy through cryptography explaining things like Plasma, Ring Signatures and Zk-SNARKS.

During the event, another talk was held about how decentralized technologies will Impact our society with the talks from Joseph Lubin (Consensys), Vitalik Buterin (Ethereum) and more:

 

Finally, You can find all the submissions of ETHWaterloo on DevPost here.

This hackathon is a nice proof of the blockchain and Ethereum technologies getting more and more popular among institutions, companies and developers.

How to deploy your Truffle projects

The Truffle framework is an awesome tool to help you write and test your Ethereum smart contracts. Once your code is finished and tested, it’s time to publish your smart contracts to the blockchain to interact with the live network and let people interact with your smart contract.

First of all, we will cover how to configure your Truffle project and deploy your project to the blockchain using an Ethereum client.

Then we’ll see how to publish and verify your smart contract source code on Etherscan. Etherscan is a website that let anyone explore the data of the blockchain from accounts to smart contracts and transactions.

 

 

Deploy your Truffle smart contracts to the Live Network

You finished building your contract using the Truffle Framework and are done testing it on the test RPC and are ready to put it on the Ethereum main net to share it to the world? In this tutorial, we’ll cover what you need to deploy a contract to the Ethereum blockchain.

Setting Up Your Ethereum client

There are many Ethereum clients to choose from. The most popular are go-ethereum and cpp-ethereum. We’ll not cover how to install and configure the client as lot of documentation is available on the clients project page.

To deploy your contract to the blockchain you need that:

  • Your client is completely downloaded the blockchain data.
  • Your client is hosting an RPC server on localhost and is accessible by a port, for example: 8546
  • Your client has at least one account registered and have the rights to sign transactions for that account
  • The registered account contains enough Ethereum to deploy your contracts

Setting up your Truffle project

The next step is to tell Truffle how to communicate with our client. For this we will open and edit the truffle.js file at the root of your project. In the network array, we will add the information of our live configuration which specifies the name of the network, the port and the address used to communicate with the client.

Save the file and we are now ready to deploy our project to the blockchain.

Deploying your smart contract

To deploy your smart contract, just open your terminal and type:

Truffle will run the command and will use your client registered address to publish the smart contract to the Ethereum blockchain.

Once your contract will be compiled and deployed, the address of the deployed contracts will be printed on your console. You can also find the address in the json files located in the build/contracts/YOUR_CONTRACT_NAME.json .

 

If you’re looking for people to thrust your contracts, it might be important to share and verify your contract code on Etherscan webiste.

 

 

 

Verify your Truffle compiled and deployed contract on Etherscan

When asking users to thrust your smart contract code it may be important to share the code of the contract with them. Linking to the project source code from Github may not be enough as there is no guarantee that the code you show is the same as the code that runs your smart contract. You can see a list of verified smart contracts on Etherscan.io.

First of all, once you published you smart contract to the main net or any test network you need to find it on Etherscan by using the search field.

Once on your smart contract page, navigate to the Contract code  tab and click on Verify and publish .

As the truffle framework optimize your contract, you’ll need to verify your contract source code in the new interface by clicking new Beta Source Code Contract Verifier .

You will then need to enter the name of your contract. The name must exactly match the one in your source code.

Then select the version of your Solidity compiler. If you are not sure about which version you are running, you can get it by typing solc --version  in your terminal.

You then need to paste the code of your contract in the code text box. At this point, if you have any import  you will need to manually remove them and copy and paste the content of the file instead of the import  statement. If you want to go faster, you may check Blockcat solidity-flattener, a tool that will automatically concatenate the files for you.

If you deployed a contract which contained constructor arguments, you’ll need to add them in the following input box. Constructor arguments are expected to be ABI-encoded. More information on ABI-encoding can be found on the page, but remember that the constructor arguments are written right to left.

In the additional parameters section, you should check the number of times the optimizer is runt. For contracts compiled with Truffle, the correct default value for runs is 0.

 

Looking for contributors

With an always growing list of articles and still a lot of topics to cover we are looking for contributors to help EthereumDev.io grow.

If you want to write article with us, have ideas, want to share your ideas. Visit our contact page. We are open for collaboration, guest blogging and technical articles on how to use your library or service.

Next topics we are working on are:

But we are open to your ideas!

 

If you enjoy our website and want to help us creating and maintaining free content for people learning smart contract development, you can donate to these addresses.

Ethereum:
0xC618b905f7b41c7D53C23474322D7D3297730419

Bitcoin:
38ghd1Pokhk6oxs7t1Vna1PxtAy8A7SXWN

Oracles, data outside of the blockchain

Smart contracts requirements may need to do actions depending on results of real world events and don’t have any native way to communicate with data on the internet. In the context of blockchains, the oracle pattern is the principle of linking real world data that lives outside of the blockchain to actors living inside the blockchain: mainly smart contracts that consumes data in order to decide which action to take.

We published an article that present the basics of what is an oracle and how to implement one for the Ethereum blockchain. In this article you’ll see different uses cases and where to use an Oracle. We also cover a simple oracle implementation in Solidity that mimic a basic insurance contract on the blockchain.

As Oracle can take many forms, our second article explains how to use the Oraclize platform to fetch data from the internet and use it in your smart contract. Our example shows how to fetch the current USD price of Ethereum from a web API.

Oracles: bringing data to the blockchain

In the context of blockchains, an oracle is an agent that finds and verifies real-world occurrences and submits this information to the blockchain to be used by smart contracts. The data could be the price of a currency, the weather at a given location, the result of a sport event or an election.

There are different types of oracles that can be implemented and used depending on your needs:

  • Software oracles handle information available online on the internet. An example could be the temperature, prices of commodities and goods, flight or train delays, etc. The data originates from online sources, like APIs, websites… The software oracle extracts the needed information and pushes it into the smart contract. We wrote about the Oraclize service that does this for you.
  • Hardware Oracles, some smart contracts need information directly from the physical world, for example, a product is scanned using a barcode reader and the information is sent to the smart contract. Another use case is RFID sensors in the supply chain industry that could help the blockchain tracks the supply.

The oracle could just provide the result of an action happening in the real world or could be here to resolve a dispute as an expert in a contract where parties are don’t agree on something.

The oracles can either bring data inside the blockchain or inform an actor outside of the blockchain about an event:

  • Inbound Oracles These provide the smart contract with data from the external world. Example use case will be an automatic buy order if the USD hits a certain price.
  • Outbound Oracles These provide smart contracts with the ability to send data to the outside world. An example would be a smart lock in the physical world which receives a payment on its blockchain address and will unlock automatically.

 

To implement a simple Oracle pattern we could write a simple smart contract for a flight delay insurance. In this smart contract, they will be three actors: The insurer, the client and an thrusted oracle that will tell if the flight was late or not and transfer all the bounty to the insurer or the client depending on the result.

Our smart contract will work in 3 steps:

  • The insurer create the contract and lock 10 time the price of the cost of the insurance in the smart contract.
  • The client pay the price of the insurance and the money of the client and the insurer are locked.
  • The oracle tells if the flight was delayed or not. If the flight was late the client receive his deposit and the money from the insurer, if the flight was on time the insurer get refunded his guarantee and get the fee paid by the client.

There is lot of room for improvement in our basic contract, for example we could also imagine that the oracle get a fee for rewarding his service.

Here is the basic implementation of our contract: