KEMBAR78
Introduction To Solidity | PDF
INTRODUCTION TO
SOLIDITY
101blockchains.com
What Is
Solidity?
Solidity is a type of object-
oriented programming language.
This programing language is
developed specifically for smart
contracts.
This type of language is widely
used in creating smart contracts
features in blockchain platforms.
It’s influenced by C++, JavaScript
and Python. Solidity also uses
Ethereum Virtual Machine to
function properly.
Concepts You Should Know to
Understand Solidity
Ethereum is an open-source blockchain platform
that offers smart contract facilities. Solidity was
first introduced as a new type of programing
language for the Ethereum platform.
Ether is the primary token for the platform. This
platform is dedicated to developers for helping
them develop and deploy decentralized
applications.
Ethereum
Concepts You Should Know to
Understand Solidity
Smart contracts are a type of automated digital
contract. Here, parties within the contract will set
up specific rules and based on that rules, the
contracts will get executed.
Developers use the Solidity programming language
to develop smart contracts. Using Solidity, you can
program the contracts to do any type of task.
Smart Contracts
Concepts You Should Know to
Understand Solidity
Ethereum Virtual Machine is a crucial part of
understanding Solidity. EVM offers a runtime
environment for smart contracts. Using EVM, smart
contracts can execute their core objectives with
higher security.
It’s also very effective in preventing DOS or Denial-of-
Service attacks. EVM comes with a specific set of
codes or instructions to run specific tasks within the
execution environment.
Ethereum Virtual Machine
{ }
Js
( )
</>
Different Methods of Setting Up
Solidity Compiler Environment
Remix
Node.js/ npm
Docker Image
Binary Packages
Remix: Remix IDE is an application that provides plugins and a development
environment for smart contracts. Users can use this application online without
installing any software for the environment.
Node.js/npm: This is the easiest way to set up the environment. Here, you will install a
solidity compiler called solc-js. However, solc-js offer limited functionalities for
accessing the compiler.
Docker Image: Docker image offers simple steps in setting up the environment. Docker
images offer a template to build a container for running the Solidity compiler.
Binary Packages: Binary packages are archive files that will have all directories and files
for installing the Solidity compiler on your device.
Pragma: In Solidity, a pragma language will specify how the
compiler will process any type of input. Typically, the first line
of code in Solidity based smart contracts contains the pragma.
Contract: uintstoredData component within the code will
denote the Solidity contract. This part will contain all the data
and code needed for locating a particular address within the
blockchain.
File Importing: Solidity offers similar support for file import
systems like JavaScript.
Understanding the Solidity Syntax
Alias
Auto
Unchecked
Sizeof
Copyof
Define
Override
Switch
Developers have to learn about reserved keywords for Solidity to fully
understand the logic behind each contract. Some of these keywords are:
Reserved Keywords
Variables are only locations that are reserved for storing
values. Thus, users can reserve any amount of memory for
a certain variable.
Solidity comes with a vast list of value types, such as
Boolean, double floating-point, integers, character, etc.
The operating system will be responsible for allocating
the memory and selecting the data to store for a
particular variable.
Value Types in Solidity
Unsigned and signed fixed-point numbers varying in sizes
8 bits to 256 bits Unsigned integer
8 bits to 256 bits Signed integer
Boolean
Signed fixed-point number
Unsigned fixed-point number
Data Types
State Variable: Users can locate the state variables
within the contract storage where values are
permanently stored.
Local Variable: Users can find the value of any local
variables within the defining function. This value is
not permanently stored.
Global Variables: Global variables help in fetching
data or information from the blockchain platform
and any associated transaction processes.
HTML
JS
CSS
JAV A
P HP
C++
</>
Variables in Solidity
Solidity Use Cases
Financial Services
Upgrading Contracts
Data Storage
Trade Finance
Digital Identity
Financial
Services
Using Solidity, it’s possible to
offer smart contracts facilities to
financial service providers. It can
reduce errors within contracts
and help to make the process
transparent.
Solidity based smart contracts
can also streamline cross-border
payments, insurance claims,
national bonds, mortgages, etc.
Upgrading
Contracts
Solidity offers the option to
create contracts that can be
upgradeable.
As blockchain is immutable, once
a contract is established, it can’t
be altered. However, Solidity
allows contracts to interact with
one another and call a contract
to perform a specific logic.
Trade
Finance
Solidity smart contracts can help
to streamline the issuing of trade
finance documentation that
takes up a lot of resources and
time.
It can help to reduce the risks of
error while maintaining a fast
execution time.
Data
Storage
Smart contracts based on Solidity
can act as data storage for
valuable information or
documents.
Here, Solidity can define the file
type and separately store those
data. When needed, this type of
contract can be called by other
contracts for using the stored
data.
Digital
Identity
Solidity based smart contracts
can help to solve issues related to
identity thefts and data
monopoly.
These contracts are a good
option for storing confidential
information, as it allows the user
to have full control over the data.
Top Solidity Issues
Reentrancy
Clearing Mappings
Unexpected Ether
Default Visibilities
Timestamp Manipulation
Unchecked External Call
Costly Loops and Gas Limit
Arithmetic Precision
Relying On tx.origin
Overflow and Underflow
Learn More About
Solidity
Ethereum Development
Fundamentals course
https://academy.101blockchains.com/courses/
ethereum-development-fundamentals


The Complete Ethereum
Technology Course
https://academy.101blockchains.com/courses/et
hereum-technology-course
101 Blockchains Certifications
Certified Enterprise
Blockchain Professional
Certified Enterprise
Blockchain Architect
Certified Blockchain
Security Expert
https://academy.101blockchains.com/cour
ses/certified-enterprise-blockchain-
architect
https://academy.101blockchains.com/cours
es/certified-blockchain-security-expert
https://academy.101blockchains.com/
courses/blockchain-expert-
certification
Why You Must Go With 101 Blockchains
Certification Courses?
High-Quality Research Information
First-class Training Content


Interactive Exercises
Flexible Learning Using Modular
Approach
Access to Bonus Training Materials
Various Training Strategies for Faster
Learning
Tangible Proof of Course Completion
Weekly Hands-on Assignments
Professional Instructors
Premium Support
Free Resources
Enterprise Blockchains Fundamentals - Free Course
Blockchain Webinars
Blockchain Conferences
Access Free Resources Now!
Blockchain Glossary
Blockchain Flash Cards
Blockchain Presentations
Blockchain Infographics
Trusted By 30,000+ Professionals!
Read real stories on Trustpilot and G2Crowd.
500+ reviews
The presentation is not intended to provide any investment advice and should not be
taken as such. Claims made in this presentation do not constitute investment advice
and should not be taken as such. Do your own research!
While the information contained in this document and presentation has been
obtained from sources believed to be reliable, 101 Blockchains disclaims all
warranties as to the completeness or accuracy.
Although 101 Blockchains research and training may address business, financial,
investment and legal issues, 101 Blockchains does not provide any business, financial,
legal or investment advice and this training should not be construed or used as such.
101 Blockchains shall not be responsible for any loss sustained by any person who
relies on this presentation.
Disclaimer
Thank You
© 2021 101 Blockchains. All rights reserved. This document may not be distributed, transmitted or reproduced in any form or by any means without
101 Blockchains’ prior written permission. While the information contained in this document has been obtained from sources believed to be reliable,
101 Blockchains disclaims all warranties as to the completeness or accuracy. Although 101 Blockchains research may address business, financial,
investment and legal issues, 101 Blockchains does not provide any business, financial, legal or investment advice and this document should not be
construed or used as such. 101 Blockchains shall not be responsible for any loss sustained by any person who relies on this publication.

Introduction To Solidity

  • 1.
  • 2.
    What Is Solidity? Solidity isa type of object- oriented programming language. This programing language is developed specifically for smart contracts. This type of language is widely used in creating smart contracts features in blockchain platforms. It’s influenced by C++, JavaScript and Python. Solidity also uses Ethereum Virtual Machine to function properly.
  • 3.
    Concepts You ShouldKnow to Understand Solidity Ethereum is an open-source blockchain platform that offers smart contract facilities. Solidity was first introduced as a new type of programing language for the Ethereum platform. Ether is the primary token for the platform. This platform is dedicated to developers for helping them develop and deploy decentralized applications. Ethereum
  • 4.
    Concepts You ShouldKnow to Understand Solidity Smart contracts are a type of automated digital contract. Here, parties within the contract will set up specific rules and based on that rules, the contracts will get executed. Developers use the Solidity programming language to develop smart contracts. Using Solidity, you can program the contracts to do any type of task. Smart Contracts
  • 5.
    Concepts You ShouldKnow to Understand Solidity Ethereum Virtual Machine is a crucial part of understanding Solidity. EVM offers a runtime environment for smart contracts. Using EVM, smart contracts can execute their core objectives with higher security. It’s also very effective in preventing DOS or Denial-of- Service attacks. EVM comes with a specific set of codes or instructions to run specific tasks within the execution environment. Ethereum Virtual Machine { } Js ( ) </>
  • 6.
    Different Methods ofSetting Up Solidity Compiler Environment Remix Node.js/ npm Docker Image Binary Packages
  • 7.
    Remix: Remix IDEis an application that provides plugins and a development environment for smart contracts. Users can use this application online without installing any software for the environment. Node.js/npm: This is the easiest way to set up the environment. Here, you will install a solidity compiler called solc-js. However, solc-js offer limited functionalities for accessing the compiler. Docker Image: Docker image offers simple steps in setting up the environment. Docker images offer a template to build a container for running the Solidity compiler. Binary Packages: Binary packages are archive files that will have all directories and files for installing the Solidity compiler on your device.
  • 8.
    Pragma: In Solidity,a pragma language will specify how the compiler will process any type of input. Typically, the first line of code in Solidity based smart contracts contains the pragma. Contract: uintstoredData component within the code will denote the Solidity contract. This part will contain all the data and code needed for locating a particular address within the blockchain. File Importing: Solidity offers similar support for file import systems like JavaScript. Understanding the Solidity Syntax
  • 9.
    Alias Auto Unchecked Sizeof Copyof Define Override Switch Developers have tolearn about reserved keywords for Solidity to fully understand the logic behind each contract. Some of these keywords are: Reserved Keywords
  • 10.
    Variables are onlylocations that are reserved for storing values. Thus, users can reserve any amount of memory for a certain variable. Solidity comes with a vast list of value types, such as Boolean, double floating-point, integers, character, etc. The operating system will be responsible for allocating the memory and selecting the data to store for a particular variable. Value Types in Solidity
  • 11.
    Unsigned and signedfixed-point numbers varying in sizes 8 bits to 256 bits Unsigned integer 8 bits to 256 bits Signed integer Boolean Signed fixed-point number Unsigned fixed-point number Data Types
  • 12.
    State Variable: Userscan locate the state variables within the contract storage where values are permanently stored. Local Variable: Users can find the value of any local variables within the defining function. This value is not permanently stored. Global Variables: Global variables help in fetching data or information from the blockchain platform and any associated transaction processes. HTML JS CSS JAV A P HP C++ </> Variables in Solidity
  • 13.
    Solidity Use Cases FinancialServices Upgrading Contracts Data Storage Trade Finance Digital Identity
  • 14.
    Financial Services Using Solidity, it’spossible to offer smart contracts facilities to financial service providers. It can reduce errors within contracts and help to make the process transparent. Solidity based smart contracts can also streamline cross-border payments, insurance claims, national bonds, mortgages, etc.
  • 15.
    Upgrading Contracts Solidity offers theoption to create contracts that can be upgradeable. As blockchain is immutable, once a contract is established, it can’t be altered. However, Solidity allows contracts to interact with one another and call a contract to perform a specific logic.
  • 16.
    Trade Finance Solidity smart contractscan help to streamline the issuing of trade finance documentation that takes up a lot of resources and time. It can help to reduce the risks of error while maintaining a fast execution time.
  • 17.
    Data Storage Smart contracts basedon Solidity can act as data storage for valuable information or documents. Here, Solidity can define the file type and separately store those data. When needed, this type of contract can be called by other contracts for using the stored data.
  • 18.
    Digital Identity Solidity based smartcontracts can help to solve issues related to identity thefts and data monopoly. These contracts are a good option for storing confidential information, as it allows the user to have full control over the data.
  • 19.
    Top Solidity Issues Reentrancy ClearingMappings Unexpected Ether Default Visibilities Timestamp Manipulation Unchecked External Call Costly Loops and Gas Limit Arithmetic Precision Relying On tx.origin Overflow and Underflow
  • 20.
    Learn More About Solidity EthereumDevelopment Fundamentals course https://academy.101blockchains.com/courses/ ethereum-development-fundamentals The Complete Ethereum Technology Course https://academy.101blockchains.com/courses/et hereum-technology-course
  • 21.
    101 Blockchains Certifications CertifiedEnterprise Blockchain Professional Certified Enterprise Blockchain Architect Certified Blockchain Security Expert https://academy.101blockchains.com/cour ses/certified-enterprise-blockchain- architect https://academy.101blockchains.com/cours es/certified-blockchain-security-expert https://academy.101blockchains.com/ courses/blockchain-expert- certification
  • 22.
    Why You MustGo With 101 Blockchains Certification Courses? High-Quality Research Information First-class Training Content Interactive Exercises Flexible Learning Using Modular Approach Access to Bonus Training Materials Various Training Strategies for Faster Learning Tangible Proof of Course Completion Weekly Hands-on Assignments Professional Instructors Premium Support
  • 23.
    Free Resources Enterprise BlockchainsFundamentals - Free Course Blockchain Webinars Blockchain Conferences Access Free Resources Now! Blockchain Glossary Blockchain Flash Cards Blockchain Presentations Blockchain Infographics
  • 24.
    Trusted By 30,000+Professionals! Read real stories on Trustpilot and G2Crowd. 500+ reviews
  • 25.
    The presentation isnot intended to provide any investment advice and should not be taken as such. Claims made in this presentation do not constitute investment advice and should not be taken as such. Do your own research! While the information contained in this document and presentation has been obtained from sources believed to be reliable, 101 Blockchains disclaims all warranties as to the completeness or accuracy. Although 101 Blockchains research and training may address business, financial, investment and legal issues, 101 Blockchains does not provide any business, financial, legal or investment advice and this training should not be construed or used as such. 101 Blockchains shall not be responsible for any loss sustained by any person who relies on this presentation. Disclaimer
  • 26.
    Thank You © 2021101 Blockchains. All rights reserved. This document may not be distributed, transmitted or reproduced in any form or by any means without 101 Blockchains’ prior written permission. While the information contained in this document has been obtained from sources believed to be reliable, 101 Blockchains disclaims all warranties as to the completeness or accuracy. Although 101 Blockchains research may address business, financial, investment and legal issues, 101 Blockchains does not provide any business, financial, legal or investment advice and this document should not be construed or used as such. 101 Blockchains shall not be responsible for any loss sustained by any person who relies on this publication.