From the course: Blockchain and Smart Contracts Security

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Anatomy of a smart contract

Anatomy of a smart contract

- [Instructor] Before getting into the security bugs and controls for smart contracts, let's take a look at a sample contract written in Solidity. It's a rudimentary program just to demonstrate a limited set of language features so that you can appreciate what goes into a smart contract. By the way, a deep dive into the Solidity language and its programming constructs is beyond the scope of this course. But I encourage you to check out the following resources on LinkedIn Learning. This example program makes a very simple family will, which is codified as a smart contract to be deployed in the Ethereum blockchain. This fictitious will captures the wishes of a person known as the grantor. The grantor wants to distribute her estate to her beneficiaries after she is no longer living. The goal of the smart contract is to make sure assets are distributed in a certain order and in the desired proportions. The first part of the…

Contents