Ethereum Smart Contract Programming Using Solidity
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.
Contact us for pricing
Contact us for dates
Contact us for dates
PrerequisitesThis 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
• Using metamask
• ERC20 compliance
• Creating a web front-end for a Smart Contract
• Smart Contract security
Overview of blockchain technologyThis 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 - EthereumWhat 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 environmentMetamask
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 contractSolidity 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 contractWe 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
A more advanced smart contractWe 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 securityIn 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.