The Complete NFT Web Development Course - Zero To Expert - Section 2 : The Ethereum Virtual Machine - EVM - (NFT Technology Under the Hood)

2022. 2. 17. 18:07· 스터디📖/블록체인
목차
  1. 8. What Is A Virtual Machine (Basic Introduction)
  2. The Ethereum Virtual Machine
  3. 9. What Are Smart Contracts - Ethereum & Solidity
  4. Smart Contracts
  5. 10. Optional - Advanced - Introduction to Opcodes for the EVM
  6. 11. How Contract Storage Works With Ethereum Smart Contracts
  7. 12. Optional - Advanced - Opcodes Allow The EVM To Compute Almost Anything
  8. 13. Review - What Is The EVM

8. What Is A Virtual Machine (Basic Introduction)

The Ethereum Virtual Machine

In order to develop NFT Smart Contracts we compile down to a Virtual Machine which acts as a layer of abstraction.

 

Virtual machines are essentially creating a level of abstraction btw the executing code and the executing machine.

 

This layer is needed to improve the portability of software, as well as to make sure applications are separated from each other, and separated from their host.


9. What Are Smart Contracts - Ethereum & Solidity

Smart Contracts

Smart contracts are actually the code, which consists of the terms and agreements that build our NFTs.

 

Smart contracts ar written in a programming language called "Solidity", a language similar to Javascript and C++. Solidity is the most widely used language for building smart contracts.

 

There are other languages for writing smart contracts like Vyper and Bamboo. Before Solidity was released, other languages llike Serpent and Mutan were used which are now deprecated.


10. Optional - Advanced - Introduction to Opcodes for the EVM

Smart contract languages like Solidity cannot be executed by the EVM directly. Instead, they are compiled to low-level machine instructions called opcodes).

https://ethervm.io/

 

Ethereum Virtual Machine Opcodes

3D RETURNDATASIZE - size = RETURNDATASIZE() Byzantium hardfork, EIP-211: the size of the returned data from the last external call, in bytes

ethervm.io

 

사실 당연한 소리다. 우리가 사용하는 모든 high-level programming language는 compiler나 interpreter를 이용해서 low-level language로 번역되어 실행된다. 그게 EVM에서 어떻게 동작하는 지 자세히 알고 싶다면 위의 문서를 참고하라고 한다. 지금 당장은 필요가 없는 내용이겠지만, 알아둘 가치가 분명 있다고 한다.


11. How Contract Storage Works With Ethereum Smart Contracts

Lower-level programming languages often use a stack to pass values to functions.

 

The EVM uses a 256-bit register stack from which the most recent 16 items can be accessed or manipulated at once. In total, the stack can only hold 1024 items.

 

Because of these limitations, complicated opcodes instead use contract memory to retrieve or pass data.

 

Contract storage essentially acts as a public database, from which values can be read extremely without having to send a transaction to the contract(no fees!).

 

However, writing to storage is very expensive (as much as 6000x) compared to writing to memory.


12. Optional - Advanced - Opcodes Allow The EVM To Compute Almost Anything

EVM uses a set of instructions called opcodes to execute specific tasks.

 

There are over 100 opcoes more, maybe closer to 200.

 

This means the EVM is able to compute almost anything given enough resources because opcodes are one byte and there could only be a maximum of 256. But that is more than enough.


13. Review - What Is The EVM

  • Smart contract languages like Solidity cannot be executed by the EVM directly. Instead, they are compiled to low-level machine instructions called opcodes).
  • Smart contracts interact with the EVM which is more expensive than running programs on traditional servers however provide for a more decentralized approach to developing Applications.
  • In order to develop NFT Smart contracts we compile down to a Virtual Machine which acts as a layer of abstraction Virtual machines are essentially creating a level of abstraction btw the executing code and the executing machine.
  • This layer is needed to improove the portability of software, as well as make sure applications are separated from each other, and separated from their host.
저작자표시 (새창열림)

'스터디📖 > 블록체인' 카테고리의 다른 글

The Complete NFT Web Development Course - Zero To Expert - 섹션 6: Optional - Crash Course Solidity (Programming For Complete Beginners) Part II  (0) 2022.02.19
The Complete NFT Web Development Course - Zero To Expert - 섹션 5: Optional - Crash Course Solidity (Programming For Complete Beginners) Part I  (0) 2022.02.18
The Complete NFT Web Development Course - Zero To Expert - 섹션 4: What is the ERC721 NFT Standard  (0) 2022.02.18
The Complete NFT Web Development Course - Zero To Expert - 섹션 3: What Is an NFT Marketplace (Introduction)  (0) 2022.02.18
The Complete NFT Web Development Course - Zero To Expert - Section 1 : What Is An NFT (A Cultural Introduction)  (0) 2022.02.17
  1. 8. What Is A Virtual Machine (Basic Introduction)
  2. The Ethereum Virtual Machine
  3. 9. What Are Smart Contracts - Ethereum & Solidity
  4. Smart Contracts
  5. 10. Optional - Advanced - Introduction to Opcodes for the EVM
  6. 11. How Contract Storage Works With Ethereum Smart Contracts
  7. 12. Optional - Advanced - Opcodes Allow The EVM To Compute Almost Anything
  8. 13. Review - What Is The EVM
'스터디📖/블록체인' 카테고리의 다른 글
  • The Complete NFT Web Development Course - Zero To Expert - 섹션 5: Optional - Crash Course Solidity (Programming For Complete Beginners) Part I
  • The Complete NFT Web Development Course - Zero To Expert - 섹션 4: What is the ERC721 NFT Standard
  • The Complete NFT Web Development Course - Zero To Expert - 섹션 3: What Is an NFT Marketplace (Introduction)
  • The Complete NFT Web Development Course - Zero To Expert - Section 1 : What Is An NFT (A Cultural Introduction)
호프
호프
호프
Untitled
호프
전체
오늘
어제
  • 분류 전체보기 (341)
    • 오류😬 (4)
    • 스터디📖 (96)
      • 웹 개발 기초 (8)
      • Spring (20)
      • ML, DL (30)
      • Node.js (22)
      • React (0)
      • 블록체인 (12)
      • Go (3)
      • Javascript (1)
    • 알고리즘💻 (153)
      • 그리디 (23)
      • Bruteforce&Backtracking (16)
      • DP (17)
      • 이분탐색&정렬&분할정복 (17)
      • 누적합&투포인터 (6)
      • 스택&큐&덱 (19)
      • 그래프(DFS&BFS) (19)
      • 트리 (7)
      • 우선순위큐&다익스트라 (11)
      • 벨만포드&플로이드와샬 (8)
      • map&set&number theory (5)
      • 기타 (5)
    • 프로젝트 (3)
      • 캡스톤 디자인 프로젝트 (3)
    • 블록체인🔗 (3)
      • Solana (2)
      • 개발 (0)
      • Harmony (1)
    • ASC (6)
    • CS (73)
      • 데이터베이스 (12)
      • 클라우드컴퓨팅 (21)
      • 운영체제 (11)
      • 컴퓨터네트워크 (14)
      • 블록체인응용 (15)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • 복습

최근 댓글

최근 글

hELLO · Designed By 정상우.v4.2.1
호프
The Complete NFT Web Development Course - Zero To Expert - Section 2 : The Ethereum Virtual Machine - EVM - (NFT Technology Under the Hood)
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.