Cryptotelegraph
  • News
    • Bitcoin News
    • Ethereum News
    • Crypto News
    • Crypto Technology
    • Analysis
    • Blockchain News
    • Industry News
    • NFTs
    • ICO News
    • Press Releases
  • Market Cap
  • Exchanges
  • ICOs
  • Videos
    • Bitcoin Videos
    • Ethereum Videos
    • Altcoin Videos
    • Blockchain Videos
    • ICO Videos
  • Submit Press Release
    • Read Press Releases
  • Contact Us
No Result
View All Result
Cryptotelegraph.com
No Result
View All Result
Home Videos Ethereum Videos

Intro To Smart Contracts in Ethereum, Learn About Solidity and the EVM in 6 mins

RocketPrep by RocketPrep
January 17, 2017
in Ethereum Videos
Reading Time: 3 mins read
14.8k 943
0
Intro To Smart Contracts in Ethereum, Learn About Solidity and the EVM in 6 mins
2.7k
SHARES
68.3k
VIEWS
Share on FacebookShare on Twitter



Welcome to this introduction to smart contracts! In this series, we will learn the fundamentals of smart contracts in Ethereum. We will also build a smart contract from scratch using the Solidity language.

Here’s a quick recap of what we have learned so far.
We learned about geth, the command line interface into Ethereum.

Related articles

Video – Bitcoin Vs Ethereum with Samson Mow & Vitalik Buterin

Video – Bitcoin Vs Ethereum with Samson Mow & Vitalik Buterin

August 24, 2020
⚫Elon Musk – SpaceX & NASA Live Event | ETH, Ethereum 2.0, ETH Halving 2020⚫

⚫Elon Musk – SpaceX & NASA Live Event | ETH, Ethereum 2.0, ETH Halving 2020⚫

August 24, 2020

We learned how to create a private blockchain on our computer.

We also learned how to mine ether on our private blockchain.
If you need to refresh these topics, watch our videos in this series, in the Youtube channel called “Turbo Prep”.

So, here are the goals for today’s video.
We will learn about the basics of smart contracts in Ethereum.

We will learn about EVM, or the Ethereum Virtual Machine, and why it’s important for understanding smart contracts.

We will also learn about the Solidity language, for creating smart contracts.

Lets get started!

To begin with, we will look at the basics of smart contracts in Ethereum.

What is a smart contract?

It is a “Mechanism To Distribute Assets Among A Fixed Number Of Parties”.

Let’s go through each aspect of this definition.

Parties refers to accounts on the Ethereum blockchain. As we have seen in prior videos, accounts can send ether to each other using transactions.
Smart contracts treat each of these accounts, as parties to a smart contract.

Smart contracts are nothing but software programs, that reside on the Ethereum blockchain.
This is what makes Ethereum’s blockchain different than some other blockchains, in that, it not only allows currency to reside on it, but software code as well.

A smart contract needs a way to distribute assets, usually ether, amongst its accounts. It does so using Ethereum transactions.
In other words, just like a human operating an account can send ether to another human operating an account, a smart contract can send ether to another account, multiple accounts, or even other smart contracts.

Here are some examples of smart contracts.
An escrow agreement can be modelled as a smart contract, where it will store ether on behalf of one or more parties, and release it upon completion of certain conditions.

On the same lines, an employment agreement can be modelled as a smart contract, where it will release a fixed amount of ether to the employee, upon completion of a finite amount of work.

An auction is a smart contract between bidders, who get ownership of a digital asset based on two conditions: one, the submission of the highest bid, and two, the payment of the final bid.

Lastly, voting can be modelled as a smart contract. We will learn to build a voting system in the next video.

Now, let’s get into more details around smart contracts, by learning about the EVM and Solidity.

What is the EVM?

It is the “Part of the Ethereum blockchain that handles state and logic”.

A key point to remember is this:
In Ethereum, a smart contract is similar to an object in an object oriented language such as C++ or Java.
Objects in Ethereum are nothing but accounts.

This means, each account can have its own state and logic. Again, this is no different than objects in object oriented languages having variables and methods.

Since accounts can communicate using transactions, so too can smart contracts send transactions to each other.
So – just like a tank is a truck with a gun and ammunition, Ethereum accounts are objects that have transactions and ethers.

Now, the EVM executes bytecode. Smart contracts exist as bytecode, which is executed by the Ethereum Virtual Machine.
It is similar to bytecode used in the Java JVM or C# CLR.

Finally, every transaction and execution of bytecode costs ether.
This mechanism ensures that any code running on the EVM does not waste resources, by going into an infinite loop, for instance.

Now we come to Solidity. Why do we need it?

Solidity is the “Language for writing smart contracts targeting Ethereum”.

Instead of directly writing bytecode, programmers can use Solidity to write smart contracts in a Javascript-like language.
It is the most popular way of writing Ethereum contracts as of now.
Other languages are also being created, such as Serpent, for Python programmers.

Several compilers are available for compiling smart contracts written in Solidity.
SolC and the browser-based compiler are the two most common compilers for Solidity.

These compilers compile Solidity into EVM bytecodes, which can then be deployed into the Ethereum blockchain.

This completes the entire lifecycle of a smart contract in Ethereum.
It starts as a Solidity file, which is compiled into EVM bytecodes, which are deployed into the Ethereum blockchain, ready to receive transactions.

This ends our introduction to smart contracts.

In the next video, we will learn to build and deploy a voting smart contract using Solidity in our lab.

Thanks for watching!

source

Tags: #Ethereum
Share1094Tweet684
RocketPrep

RocketPrep

Related Posts

Video – Bitcoin Vs Ethereum with Samson Mow & Vitalik Buterin

Video – Bitcoin Vs Ethereum with Samson Mow & Vitalik Buterin

by Peter McCormack
August 24, 2020
0

During this debate Chief Strategy Officer at Blockstream, Samson Mow, and Ethereum creator Vitalik Buterin traded blows on Twitter. I...

⚫Elon Musk – SpaceX & NASA Live Event | ETH, Ethereum 2.0, ETH Halving 2020⚫

⚫Elon Musk – SpaceX & NASA Live Event | ETH, Ethereum 2.0, ETH Halving 2020⚫

by sᴘᴀᴄᴇx Official
August 24, 2020
0

⚫ More information ➱ https://bit.ly/3hu1P52 source

BITCOIN – FIN DE CONSOLIDATION ET RETOUR HAUSSIER – OBJECTIF 14 000$ ?! + ETHEREUM crypto monnaie fr

BITCOIN – FIN DE CONSOLIDATION ET RETOUR HAUSSIER – OBJECTIF 14 000$ ?! + ETHEREUM crypto monnaie fr

by Cryptanalyst - Analyses crypto FR
August 24, 2020
0

Pour vous former et devenir gagnant avec l'investissement et le trading crypto tout en soutenant la chaîne : https://www.patreon.com/CryptanalystFR 💥Rejoignez...

⚫Elon Musk – SpaceX & NASA Live Event | ETH, Ethereum 2.0, ETH Halving 2020⚫

⚫Elon Musk – SpaceX & NASA Live Event | ETH, Ethereum 2.0, ETH Halving 2020⚫

by sᴘᴀᴄᴇx Official
August 24, 2020
0

⚫ More information ➱ https://bit.ly/3hu1P52 source

⚫Elon Musk – SpaceX & NASA Live Event | ETH, Ethereum 2.0, ETH Halving 2020⚫

⚫Elon Musk – SpaceX & NASA Live Event | ETH, Ethereum 2.0, ETH Halving 2020⚫

by sᴘᴀᴄᴇx Official
August 24, 2020
0

⚫ More information ➱ https://bit.ly/3hu1P52 source

Load More

Discussion about this post

Partners

Crypto Prices

  • Trending
  • Comments
  • Latest
Blockchain | Hack Script 2020 GENERATES Unlimited 100% WORKING bitcoin hacked

Blockchain | Hack Script 2020 GENERATES Unlimited 100% WORKING bitcoin hacked

March 14, 2020
Blockchain unconfirmed transaction hack 100% Working! New proof!

Blockchain unconfirmed transaction hack 100% Working! New proof!

March 13, 2020
Blockchain Hack Script 2020 GENERATES Unlimited Bitcoin 100% WORKING bitcoin hacked

Blockchain Hack Script 2020 GENERATES Unlimited Bitcoin 100% WORKING bitcoin hacked

February 11, 2020
🔥 Forsage 🚀 (Fast and Furious) – Fully Decentralized Matrix program on Ethereum Smart Contract 🔥

🔥 Forsage 🚀 (Fast and Furious) – Fully Decentralized Matrix program on Ethereum Smart Contract 🔥

March 31, 2020
Ripple XRP Token

Ripple and XRP – The Convoluted Truth Behind XRP’s Creation

0
Bitcoin cash hard fork. BitcoinCash Hard fork (BCH Hard fork)

Bitcoin Cash ‘hard fork’ What you need to know about it

0
Crytotelegraph - Crypto News & Reviews - Bitcoin & Altcoins

Bitcoin price news: 10 year forecast shows bitcoin ‘WON’T DIE’ Latest BTC prediction

0
BAKKT Futures: BAKKT Warehouse & Bitcoin Exchange

Will Bakkt Send Bitcoin’s price skyrocketing?

0
Bitcoin Price Prediction: Fed’s Stance, ETF Approval, & Yuan’s Impact on BTC

Bitcoin Price Prediction: Fed’s Stance, ETF Approval, & Yuan’s Impact on BTC

September 23, 2023
Resurfaced Video From 1998 Shows Alleged Bitcoin Creator Hal Finney Discussing Cryptographic Technology

Resurfaced Video From 1998 Shows Alleged Bitcoin Creator Hal Finney Discussing Cryptographic Technology

September 23, 2023
Bitcoin Price Prediction as Trading Volume Surges Past $13 Billion as Interest in Crypto Comes Back – Time to Buy?

Bitcoin Price Prediction as Trading Volume Surges Past $13 Billion as Interest in Crypto Comes Back – Time to Buy?

September 23, 2023
Venezuelan Police Raid Uncovers Bitcoin Mining Machines, Rocket Launchers In Prison

Venezuelan Police Raid Uncovers Bitcoin Mining Machines, Rocket Launchers In Prison

September 23, 2023

Cryptotelegraph logo x 2




The Cryptotelegraph is a Crypto News Magazine ‘Startup’ that hunts high and low to compile the very latest crypto news and reviews from around the web, whilst at the same time producing thought provoking articles and interpretations surrounding the cryptocurrency market today!


Read More





Disclaimer

Information found on Cryptotelegraph is those of referring websites (or) writers quoted. It does not represent the opinions of Cryptotelegraph on whether or not to buy, trade, sell or hold any investments. You are advised to conduct your own research before making any investment decisions. Use all provided information at your own risk. Full disclaimer.

Crypto News

Bitcoin Price Prediction: Fed’s Stance, ETF Approval, & Yuan’s Impact on BTC

Resurfaced Video From 1998 Shows Alleged Bitcoin Creator Hal Finney Discussing Cryptographic Technology

Bitcoin Price Prediction as Trading Volume Surges Past $13 Billion as Interest in Crypto Comes Back – Time to Buy?

Venezuelan Police Raid Uncovers Bitcoin Mining Machines, Rocket Launchers In Prison

High Gas Fees Alert: Binance Wallet Records $840,000 in Abnormal Ethereum Charges

Bitcoin Price and Ethereum Prediction: Minimal 1% Fluctuations Offer Trading Insights for BTC and ETH

Donations Welcome




Bitcoin Address : 3AhxNswMkD5tjJJ544NRCwWhCDXHJ5GTzq

Ethereum Address : 0x9627FB741C19e1a70E7006F2B0D0c26d14AA1816

Bitcoin Cash Address : qq93an6n9unnu496vpcx684zekkmn4yk6g79kllf7d

Litecoin Address : MKVphBBJkBbjSh4D6aFLds9XHE1rnS9iHW





© Copyrights 2017 - 2021 Cryptotelegraph.com. All Rights Reserved.

Contact    About    Privacy & Cookie Policy

No Result
View All Result
  • News
    • Bitcoin News
    • Ethereum News
    • Crypto News
    • Crypto Technology
    • Analysis
    • Blockchain News
    • Industry News
    • NFTs
    • ICO News
    • Press Releases
  • Market Cap
  • Exchanges
  • ICOs
  • Videos
    • Bitcoin Videos
    • Ethereum Videos
    • Altcoin Videos
    • Blockchain Videos
    • ICO Videos
  • Submit Press Release
    • Read Press Releases
  • Contact Us

© Cryptotelegraph.com

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.