万本电子书0元读

万本电子书0元读

顶部广告

Solidity Programming Essentials电子书

售       价:¥

8人正在读 | 0人评论 9.8

作       者:Ritesh Modi

出  版  社:Packt Publishing

出版时间:2018-04-20

字       数:20.2万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn the most powerful and primary programming language for writing smart contracts and find out how to write, deploy, and test smart contracts in Ethereum. About This Book ? Get you up and running with Solidity Programming language ? Build Ethereum Smart Contracts with Solidity as your scripting language ? Learn to test and deploy the smart contract to your private Blockchain Who This Book Is For This book is for anyone who would like to get started with Solidity Programming for developing an Ethereum smart contract. No prior knowledge of EVM is required. What You Will Learn ? Learn the basics and foundational concepts of Solidity and Ethereum ? Explore the Solidity language and its uniqueness in depth ? Create new accounts and submit transactions to blockchain ? Get to know the complete language in detail to write smart contracts ? Learn about major tools to develop and deploy smart contracts ? Write defensive code using exception handling and error checking ? Understand Truffle basics and the debugging process In Detail Solidity is a contract-oriented language whose syntax is highly influenced by JavaScript, and is designed to compile code for the Ethereum Virtual Machine. Solidity Programming Essentials will be your guide to understanding Solidity programming to build smart contracts for Ethereum and blockchain from ground-up. We begin with a brief run-through of blockchain, Ethereum, and their most important concepts or components. You will learn how to install all the necessary tools to write, test, and debug Solidity contracts on Ethereum. Then, you will explore the layout of a Solidity source file and work with the different data types. The next set of recipes will help you work with operators, control structures, and data structures while building your smart contracts. We take you through function calls, return types, function modifers, and recipes in object-oriented programming with Solidity. Learn all you can on event logging and exception handling, as well as testing and debugging smart contracts. By the end of this book, you will be able to write, deploy, and test smart contracts in Ethereum. This book will bring forth the essence of writing contracts using Solidity and also help you develop Solidity skills in no time. Style and approach Solidity is a high-level programming language best understood using examples. After covering basic concepts of Ethereum and Solidity, programming constructs will be explained with help of examples. As chapters progress, deployment, usage and testing of contacts will form major aspect of the book. Troubleshooting and unit testing is an important exercise and skill to master this language will also be covered in this book.
目录展开

Title Page

Copyright and Credits

Solidity Programming Essentials

Packt Upsell

Why subscribe?

PacktPub.com

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Conventions used

Get in touch

Reviews

Introduction to Blockchain, Ethereum, and Smart Contracts

What is a blockchain?

Why blockchains?

Cryptography

Symmetric encryption and decryption

Asymmetric encryption and decryption

Hashing

Digital signatures

Ether

Gas

Blockchain and Ethereum architecture

How are blocks related to each other?

How are transactions and blocks related to each other?

Ethereum nodes

EVM

Ethereum mining nodes

How does mining work?

Ethereum accounts

Externally owned accounts

Contract accounts

Transactions

Blocks

An end-to-end transaction

What is a contract?

What is a smart contract?

How to write smart contracts?

How are contracts deployed?

Summary

Installing Ethereum and Solidity

Ethereum networks

Main network

Test network

Ropsten

Rinkeby

Kovan

Private network

Consortium network

Geth

Installing Geth on Windows

Creating a private network

ganache-cli

Solidity compiler

The web3 JavaScript library

Mist wallet

MetaMask

Summary

Introducing Solidity

Ethereum Virtual Machine

Solidity and Solidity files

Pragma

Comments

The import statement

Contracts

Structure of a contract

State variables

Structure

Modifiers

Events

Enumeration

Functions

Data types in Solidity

Value types

Passing by value

Reference types

Passing by reference

Storage and memory data locations

Rule 1

Rule 2

Rule 3

Rule 4

Rule 5

Rule 6

Rule 7

Rule 8

Literals

Integers

Boolean

The byte data type

Arrays

Fixed arrays

Dynamic arrays

Special arrays

The bytes array

The String array

Array properties

Structure of an array

Enumerations

Address

Mappings

Summary

Global Variables and Functions

The var type variables

Variables hoisting

Variable scoping

Type conversion

Implicit conversion

Explicit conversion

Block and transaction global variables

Transaction and message global variables

Difference between tx.origin and msg.sender

Cryptography global variables

Address global variables

Contract global variables

Summary

Expressions and Control Structures

Solidity expressions

The if decision control

The while loop

The for loop

The do...while loop

The break statement

The continue statement

The return statement

Summary

Writing Smart Contracts

Smart contracts

Writing a simple contract

Creating contracts

Using the new keyword

Using address of a contract

Constructors

Contract composition

Inheritance

Single inheritance

Multi-level inheritance

Hierarchical inheritance

Multiple inheritance

Encapsulation

Polymorphism

Function polymorphism

Contract polymorphism

Method overriding

Abstract contracts

Interfaces

Summary

Functions, Modifiers, and Fallbacks

Function input and output

Modifiers

The view, constant, and pure functions

The address functions

The send method

The transfer method

The call method

The callcode method

The delegatecall method

The fallback function

Summary

Exceptions, Events, and Logging

Error handling

The require statement

The assert statement

The revert statement

Events and logging

Summary

Truffle Basics and Unit Testing

Application development life cycle management

Truffle

Development with Truffle

Testing with Truffle

Summary

Debugging Contracts

Debugging

The Remix editor

Using events

Using a Block Explorer

Summary

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部