Ethereum

--- title: 'Ethereum' author: 'Hun Im' date: 2024-09-11T17:30:13+09:00 category: ['POSTS'] tags: ['Blockchain', 'Ethereum'] og_image: "/images/gamer.png" keywords: ['Blockchain', 'Ethereum'] --- ### What is Ethereum? 1. A blockchain-based platform used to run smart contracts and decentralized applications (dApps). 2. It offers various features beyond cryptocurrency transactions, including smart contract functionality. 3. The Ethereum network consists of numerous nodes, each responsible for maintaining and validating the Ethereum blockchain. **Ethereum Virtual Machine (EVM)** 1. A virtualized computing environment that runs smart contracts within the Ethereum network. 2. The core component of smart contracts and decentralized applications. 3. Acts as a virtual computer that operates in a decentralized manner on the Ethereum network. 4. Smart contracts are written in the Solidity language, compiled into bytecode, and executed by the EVM. **ERC** ERC (Ethereum Request for Comments) is a process used to propose and define standards for smart contracts on the Ethereum blockchain. 1. ERC-20: * Description: The most widely used token standard, used to create fungible tokens on the Ethereum blockchain. ERC-20 tokens have the same value and properties, with each unit treated equally. * Use Cases: Tokens used in ICOs (Initial Coin Offerings), utility tokens for various projects. * Functions: Defines basic token transfer and approval functions such as `transfer`, `approve`, and `transferFrom`. 2. ERC-721: * Description: The standard for **non-fungible tokens (NFTs)**, where each token has unique properties and cannot be exchanged one-to-one with other tokens. * Use Cases: Represents ownership of digital assets (e.g., CryptoKitties), art, and in-game items. * Functions: Tracks and transfers ownership of specific tokens using functions like `ownerOf` and `transferFrom`. 3. ERC-1155: * Description: A multi-token standard that allows for the management of both fungible and non-fungible tokens within a single contract. * Use Cases: Useful in games where various types of items (both regular and unique) need to be managed. * Functions: Efficiently transfers and manages multiple types of tokens using functions like `safeTransferFrom` and `balanceOf`. 4. ERC-777: * Description: An improved token standard over ERC-20, offering a more flexible transfer mechanism and enhanced security features. It allows the use of custom hooks during token transfers. * Use Cases: Used to overcome limitations of ERC-20 and in more complex smart contract systems. 5. ERC-1400: * Description: A standard for security tokens, providing stricter control over token ownership to meet legal requirements. * Use Cases: Security tokens (STOs), financial assets where regulatory compliance is essential.
Β 
--- title: 'Ethereum' author: 'μž„ν›ˆ' date: 2024-09-11T17:30:13+09:00 category: ['POSTS'] tags: ['Blockchain', 'Ethereum'] og_image: "/images/gamer.png" keywords: ['Blockchain', 'Ethereum'] --- ### μ΄λ”λ¦¬μ›€μ΄λž€? 1. 블둝체인 기반 ν”Œλž«νΌ: 슀마트 계약과 νƒˆμ€‘μ•™ν™” μ• ν”Œλ¦¬μΌ€μ΄μ…˜(dApps) μ‹€ν–‰ν•˜λŠ”λ° μ‚¬μš© λœλ‹€. 2. μ•”ν˜Έν™”ν 거래 μ΄μƒμ˜ λ‹€μ–‘ν•œ κΈ°λŠ₯(μŠ€λ§ˆνŠΈκ³„μ•½ ν•¨μˆ˜)을 μ œκ³΅ν•œλ‹€ 3. 이더리움 λ„€νŠΈμ›Œν¬λŠ” μˆ˜λ§Žμ€ λ…Έλ“œλ‘œ κ΅¬μ„±λ˜μ–΄ 있으며, 각 λ…Έλ“œλŠ” 이더리움 블둝체인을 μœ μ§€ν•˜κ³  κ²€μ¦ν•˜λŠ” 역할을 ν•œλ‹€. **이더리움 가상 λ¨Έμ‹  (EVM, Ethereum Virtual Machine)** 1. 이더리움 λ„€νŠΈμ›Œν¬ λ‚΄μ—μ„œ 슀마트 계약을 μ‹€ν–‰ν•˜λŠ” κ°€μƒν™”λœ μ»΄ν“¨νŒ… ν™˜κ²½ 2. 슀마트 계약과 νƒˆμ€‘μ•™ν™” μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ ν•΅μ‹¬μš”μ†Œ 3. κ°€μƒν™”λœ μ»΄ν“¨ν„°λ‘œ, 이더리움 λ„€νŠΈμ›Œν¬μ—μ„œ λΆ„μ‚°μ μœΌλ‘œ μ‹€ν–‰ 4. 슀마트 계약은 Solidity μ–Έμ–΄λ‘œ, λ°”μ΄νŠΈμ½”λ“œλ‘œ μ»΄νŒŒμΌλ˜μ–΄, EVMμ—μ„œ 이 λ°”μ΄νŠΈμ½”λ“œλ₯Ό 읽어 μ‹€ν–‰ν•œλ‹€. **ERC** 이더리움 λΈ”λ‘μ²΄μΈμ—μ„œ 슀마트 계약 ν‘œμ€€μ„ μ œμ•ˆν•˜κ³  μ •μ˜ν•˜λŠ” ν”„λ‘œμ„ΈμŠ€μ΄λ‹€. 1. ERC-20: * μ„€λͺ…: κ°€μž₯ 널리 μ‚¬μš©λ˜λŠ” 토큰 ν‘œμ€€μœΌλ‘œ, 이더리움 λΈ”λ‘μ²΄μΈμ—μ„œ **λŒ€μ²΄ κ°€λŠ₯ν•œ 토큰(fungible token)**을 μƒμ„±ν•˜λŠ” ν‘œμ€€μž…λ‹ˆλ‹€. ERC-20 토큰은 λ™μΌν•œ κ°’κ³Ό 속성을 κ°€μ§€λ©°, λͺ¨λ“  λ‹¨μœ„κ°€ λ™λ“±ν•˜κ²Œ μ·¨κΈ‰λ©λ‹ˆλ‹€. * μ‚¬μš© μ˜ˆμ‹œ: λŒ€λΆ€λΆ„μ˜ ICO(Initial Coin Offering)μ—μ„œ μ‚¬μš©λœ 토큰, λ‹€μ–‘ν•œ ν”„λ‘œμ νŠΈμ˜ μœ ν‹Έλ¦¬ν‹° 토큰 λ“±. * κΈ°λŠ₯: `transfer`, `approve`, `transferFrom` λ“±μ˜ 기본적인 토큰 전솑 및 승인 κΈ°λŠ₯을 μ •μ˜. 2. ERC-721: * μ„€λͺ…: **λŒ€μ²΄ λΆˆκ°€λŠ₯ν•œ 토큰(NFT, Non-Fungible Token)** ν‘œμ€€μœΌλ‘œ, 각 토큰이 κ³ μœ ν•œ 속성을 κ°€μ§€λ©°, λ‹€λ₯Έ 토큰과 λ™λ“±ν•˜κ²Œ κ΅ν™˜λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. * μ‚¬μš© μ˜ˆμ‹œ: λ””μ§€ν„Έ μžμ‚°(예: CryptoKitties), μ˜ˆμˆ ν’ˆ, κ²Œμž„ μ•„μ΄ν…œ λ“±μ˜ μ†Œμœ κΆŒμ„ λ‚˜νƒ€λ‚΄λŠ” 토큰. * κΈ°λŠ₯: `ownerOf`, `transferFrom` 등을 톡해 νŠΉμ • ν† ν°μ˜ μ†Œμœ κΆŒμ„ μΆ”μ ν•˜κ³  전솑. 3. ERC-1155: * μ„€λͺ…: 닀쀑 토큰 ν‘œμ€€μœΌλ‘œ, ν•˜λ‚˜μ˜ κ³„μ•½μ—μ„œ λŒ€μ²΄ κ°€λŠ₯ν•œ 토큰과 λŒ€μ²΄ λΆˆκ°€λŠ₯ν•œ 토큰을 λ™μ‹œμ— 관리할 수 μžˆμŠ΅λ‹ˆλ‹€. * μ‚¬μš© μ˜ˆμ‹œ: κ²Œμž„μ—μ„œ λ‹€μ–‘ν•œ μœ ν˜•μ˜ μ•„μ΄ν…œ(일반 μ•„μ΄ν…œκ³Ό 고유 μ•„μ΄ν…œ)을 관리할 λ•Œ 유용. * κΈ°λŠ₯: `safeTransferFrom`, `balanceOf` 등을 μ‚¬μš©ν•΄ μ—¬λŸ¬ μœ ν˜•μ˜ 토큰을 효율적으둜 전솑 및 관리. 4. ERC-777: * μ„€λͺ…: ERC-20의 κ°œμ„ λœ 토큰 ν‘œμ€€μœΌλ‘œ, 더 μœ μ—°ν•œ 전솑 λ©”μ»€λ‹ˆμ¦˜κ³Ό λ³΄μ•ˆ κΈ°λŠ₯을 μ œκ³΅ν•©λ‹ˆλ‹€. 특히, 토큰 전솑 μ‹œ μ‚¬μš©μž μ •μ˜λœ 후크(hook) κΈ°λŠ₯을 μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€. * μ‚¬μš© μ˜ˆμ‹œ: ERC-20의 ν•œκ³„λ₯Ό κ·Ήλ³΅ν•˜κ³  더 λ³΅μž‘ν•œ 슀마트 계약 μ‹œμŠ€ν…œμ—μ„œ μ‚¬μš©. 5. ERC-1400: * μ„€λͺ…: λ³΄μ•ˆ 토큰을 μœ„ν•œ ν‘œμ€€μœΌλ‘œ, 법적 μš”κ΅¬μ‚¬ν•­μ„ μΆ©μ‘±μ‹œν‚€κΈ° μœ„ν•΄ 토큰 μ†Œμœ κΆŒμ„ λ”μš± μ—„κ²©ν•˜κ²Œ κ΄€λ¦¬ν•˜λŠ” κΈ°λŠ₯을 μ œκ³΅ν•©λ‹ˆλ‹€. * μ‚¬μš© μ˜ˆμ‹œ: μ¦κΆŒν˜• 토큰(λ³΄μ•ˆ 토큰), 규제 μš”κ±΄μ΄ μ€‘μš”ν•œ 금육 μžμ‚°.