Ethereum Smart Contract Programming Using Solidity
Request more details:
This is a hands-on course to provide foundational skills in creating Smart Contracts on the Ethereum blockchain making use of Solidity and web3.js. The course includes (if required) an introduction to blockchain technology and cryptocurrencies.
Cost: Price on application
Duration: 5 Days
This course is not available as part of our public schedule but can be provided on a customised client specific basis.
This is a programming course so some familiarity with a programming language is expected. There is no expectation that participants will have any experience with blockchain technology, Ethereum or the Solidity language.
What you will learn:
What is Ethereum
What are Smart Contracts
The Ethereum development environment
Creating a contract with Solidity
Creating a web front-end for a Smart Contract
Smart Contract security
Who should attend:
Overview of blockchain technology:
This module will provide a full overview of blockchain technology, bitcoin and ethereum. It will cover some or all of the material in the course Blockchain Technology Introduction as required depending on participants previous experience.
The second generation of blockchains - Ethereum:
What is Ethereum?
How is ethereum different to bitcoin?
What is a smart contract?
Some sample use cases for smart contracts
Have a look at a running node
Setting up your development environment:
Monitoring a network using etherscan
Visualising the live network
Do you need your own node?
Ether, gas and why every transaction costs some amount
Understanding the Ganache(testrpc) local test network
Getting ether from a faucet
Introduction to solidity and the Hello World contract:
Solidity syntax overview
Creating a solidity contract
Compiling the contract
Deploying the contract
Calling contract functions
Calling a contract function as part of a transaction
ERC20 token smart contract:
We will create our own token that is ERC20 compliant
This contract introduces some more advanced solidity concepts and gives us an opportunity to interact with the network in a number of new ways
Introducing web3.js and using it to interact with our token smart contract
Introducing truffle.js and using it to create an interface to our smart contract and to help deploy it
Creating a front end for our contract:
A more advanced smart contract:
We will now tackle a more advanced smart contract with a more fully featured front end. This smart contract will allow users to enter a lottery. The smart contract will manage the creation of the lottery, it will determine how many tickets there are. It will manage users who purchase these tickets for ether and finally when a threshold of tickets are sold the manager of the lottery can conclude the sale by invoking a function that will choose a winner and distribute the prize to that address. The smart contract will also have a front end created in node.js to allow an administrator to manage the lottery and allow users to purchase tickets using metamask.
Smart contract security:
In 2016 a smart contract for an organisation called The DAO was deployed with a security flaw that allowed a hacker to withdraw about $60 million worth of ether. As solidity is a very new language there not the wealth of experience that is available for other technologies. This module will go through the currently accepted best practices and will describe some potential security flaws and how to avoid them.