Hedera Smart Contracts Workshop
Hedera Smart Contract Service (HSCS) workshop. Learn how to enable custom logic & processing on Hedera through smart contracts.
Smart contracts are a means to enable custom logic and processing in a DLT. Developers can harness their power to build their own decentralized applications (DApps). Learn how to get started with the Hedera Smart Contract Service (HSCS) in this workshop.
- Syntax of Solidity, a programming language used to write smart contracts
- Using the Solidity compiler
- Using Hedera SDK JS to deploy and interact with smart contracts on Hedera networks
- Using Hardhat + EthersJs to deploy and interact with smart contracts on Hedera networks
- Where to go from here
Hedera Smart Contract Service Workshop Part 1/6 | Introduction
Prior knowledge:
- ✅ Javascript syntax
- ✅ Hedera network core concepts
System setup:
- ✅
git
installed- Minimum version: 2.37
- ✅ NodeJs +
npm
installed- Minimum version of NodeJs: 18
- Minimum version of
npm
: 9.5
- ✅ POSIX-compliant shell
- For Linux & Mac: The shell that ships with the operating system will work. Either
bash
orzsh
will work. - For Windows: The shell that ships with the operating system (
cmd.exe
,powershell.exe
) will not work. Recommended alternatives: WSL/2, or git-bash which ships with git-for-windows.
- ✅ Internet connection
- ✅ Optionally,
jq
- For Linux: Use OS package manager
- For Mac:
brew install jq
Before we begin coding, let's take a look at the various software libraries and developer tools that you will need to be familiar with when working with smart contracts on HSCS.
Hedera SDK JS is a software library that contains functions designed to interact the all of the services available on the Hedera network: HCS, HTS, HFS, and HSCS. That includes smart contracts.
Smart contracts are written using Solidity, but we cannot just take the Solidity code and ask HSCS, or any other EVM implementation, to run it. Instead we need
solc
, the Solidity compiler, to compile it into EVM bytecode, which can then be executed by any EVM implementation, including the one in HSCS.Solidity is not the only game in town. You can actually write smart contracts in any language, as long as it can compile to EVM bytecode. The most popular alternative smart contract programming language is Vyper.
In this workshop we will be using Solidity.
Truffle Suite, Hardhat, and Foundry are developer frameworks that are designed to make it easier to work with smart contract development workflows by providing various utilities, scripts, structure, and documentation that are useful during development.
In this workshop we will be using Hardhat.
Last modified 1mo ago