Javascript is disabled. Please enable Javascript to continue browsing

Reminder: Once you’ve hit your HBAR earnings cap, you’ll still be charged per view but won’t earn.

Unsupported device or screen size

Oops! It looks like you’re trying to access on an unsupported device or screen size.

To use, you'll need to visit us on a desktop or laptop using the Chrome Web Browser with the Hedera Browser Extension installed. If you are on a desktop browser, please maximize the size of your browser window.

You can learn more about at

Smart Contracts: From Zero to Dapp Hero

Written by: Hedera Hashgraph


Get started with smart contracts and the Solidity™ language. In this presentation, you’ll receive an introduction to Solidity, a programming language for creating smart contracts on platforms like Ethereum and Hedera Hashgraph. You will learn step-by-step procedures for creating simple smart contracts and explore best practices for testing and developing distributed applications (dapps).


John Gethoefer | Principal Software Engineer | Bumped, Inc.

Smart Contracts: From Zero to Dapp Hero | Hedera18

Slides Speaker John Gethoefer | Principal Software Engineer | Bumped, Inc. Abstract Get started with Smart Contracts and the Solidity™ language. In this presentation, you’ll receive an introduction to Solidity, a programming language for creating smart contracts for Ethereum and Hedera Hashgraph.

Smart Contracts: From Zero to Dapp Hero

Distributed ledger technologies (DLTs) allow users to store information and complete transactions without the need for a trusted third-party. The infrastructure they provide enables exciting new possibilities. Using smart contracts, developers can harness the power of a public ledger to securely execute complicated transactions and build full-scale, decentralized applications (dapps).

In this presentation, Bumped Inc. Principal Software Engineer John Gethoefer gives us an introduction to smart contracts and decentralized applications. After defining these terms, he walks us through a basic smart contract written in the Solidity language and provides several tools to get started.

What is a Smart Contract? [1:11]

At their core, smart contracts are binding agreements between multiple parties. Whether they represent the exchange of a few coins or the purchasing of a multimillion dollar house, smart contracts establish and record the terms of a transaction. In this way, smart contracts fulfill the same role as traditional, written contracts.

However, unlike traditional contracts, smart contracts are self-executing and enforced by computation. While written contracts record the terms of an exchange, they hold no power in and of themselves. Traditional contracts must be executed and enforced in a traditional way, usually relying on a legal team or a governmental force; without an executive body behind these traditional contracts, they are simply stacks of paper.

In contrast, smart contracts can enforce and execute themselves. Written in code, smart contracts are programs which can carry out their own terms precisely, transparently, and without middlemen. In these exchanges, otherwise known as atomic swaps, a transaction is completed perfectly or not at all. Therefore, smart contracts not only record the terms of an exchange, but they also self-execute and enforce those terms to the letter.

While smart contracts alone can be a powerful tool, combined with other smart contracts and software they can provide novel and industry-disrupting functionalities. Alongside DLTs, smart contracts form the building blocks of decentralized applications.

what are smart contracts slide

What are Dapps? [2:44]

Dapps are applications that rely on distributed ledger technology, typically smart contracts. Unlike traditional applications, which are governed by a central authority (think Google or Facebook), dapps are distributed across users. As a result, users often enjoy higher transparency and freedom, all while maintaining greater control of their own user experience and data. Because of this limitation on central control, dapps have implications in areas such as free speech, open marketplaces, and supply chains.

what are dapps slide

Building Dapps with Solidity [10:14]

Solidity is a language for developers to construct smart contracts for Ethereum, Hedera Hashgraph, and other distributed ledger technologies. Solidity is a high-level language that was influenced by popular languages like JavaScript and Python. Its features include inheritance and static typing, and it supports user-created libraries and types. At timestamp [11:22], John Gethoefer walks us through an example smart contract written in Solidity (slide shown below).

basic solidity code

Tools for Solidity [12:33]

In the remainder of his presentation, John Gethoefer discusses several tools for Solidity that can help developers get started right away: Remix IDE, Truffle, and Embark.

Remix IDE is the easiest way to immediately get started writing smart contracts. Remix is a browser-based application which allows developers to write, compile, run, test, and analyze Solidity code. It is a great tool for newcomers to Solidity and smart contracts. You can begin using Remix IDE here.

Once you have the basics down, you can move to Truffle, a more powerful program than Remix IDE. Truffle is command-line client which supports unit testing, migration, deployment, and other advanced functions. With its wide variety of templates, Truffle lets you quickly get started on advanced smart contracts and even dapps.

If you want more of an end-to-end experience, you can use Embark. Embark is likely easier to pick up than Truffle, and provides similar functionality. In addition to providing templates and advanced development tools like Truffle, Embark supports testing and code generation.

Finally, when building decentralized applications or advanced smart contracts with Truffle or Embark, you may want to use other smart contracts as building blocks. The Open Zeppelin Project stores a large collection of smart contract templates. As a developer, you can use these templates to perform basic transactions or build more robust functionality on top of them. In addition to being a great tool for finding community-tested templates, the Open Zeppelin library is also a great place to discover what is possible with smart contracts. You can access these resources here:

More stories