Ethereum
Scott
Agenda
EIPs
- ERC(Ethereum Request for Comments)
토큰 유형
토큰 구현
EIPs - Ethereum Improvement Proposal repository
https://eips.ethereum.org/
https://github.com/ethereum/EIPs/tree/master/EIPS
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1.md
토큰 유형 - ERC20
비탈릭이 제안한 표준 토큰
실제 코드가 아닌 인터페이스 규약만 정의
수천 개의 프로젝트에서 사용되고 있음
Fungible Token - 동일한 가치를 가지는 토큰
토큰에 대한 분할이 가능하다.
ERC20 Token이 아닌 주소에도 Token을 보낼 수 있으며, 취소할 수 없다(다시 못찾음).
https://github.com/ethereum/EIPs/blob
/master/EIPS/eip-20.md
https://bloxy.info/list_tokens/ERC20
토큰 유형 - ERC20
함수
totalSupply: 전체 토큰 수
balanceOf: 보유한 토큰 수(계정)
transfer: token 전송
approve: token 인출 권리를 부여
allowance: 인출을 허락한 토큰 수
tranferFrom: from 계좌에서 to로 token 전송,
approve를 통해 인출권리를 받은 계정만 실행 가능
이벤트
Transfer: transfer 함수 실행시 이벤트
Approval: approve 함수 실행시 이벤트
토큰 유형 - ERC223
ERC20 단점을 보완하려고 제안됨.
그 중에 실수로 보냈을 경우 취소하여 손실을
방지할 수 있는 기능을 제공
가스비가 절약된다고 함
ERC20 토큰과 호환된다.
아직 검증 단계.
Official site가 아닌 github에 올라와 있음
https://github.com/Dexaran/ERC223-token-standard
https://bloxy.info/list_tokens/ERC223
토큰 유형 - ERC721
Non Fungible Token - 대체 불가능한 토큰
발행된 토큰에 대한 가치가 각각 다르다.
토큰을 분할할 수 없다.
현물을 토근화 하는데 적합(부동산, 와인 등등)
ex) 크립토키티
https://github.com/ethereum/EIPs/blob
/master/EIPS/eip-721.md
https://bloxy.info/list_tokens/ERC721
토큰 유형 - ERC1155
ERC20과 ERC721의 특징을 합친 제안
XBox, PS 블록체인 게임(9라이브즈아레나)
ERC20, ERC721 토큰 간 거래 가능
아토믹 스왑을 2단계 트랜잭션으로 처리
한명 이상의 수신자에게 원하는 수량을 보내는
멀티 전송 기능 지원
토큰 구현 - Examples
http://ihpark92.tistory.com/35
https://steemit.com/kr-dev/@nida-io/2oduk2-erc20-1
토큰 구현 - OpenZeppelin + Truffle
https://openzeppelin.org/
https://github.com/OpenZeppelin/openzeppelin-solidity
https://github.com/trufflesuite/truffle
토큰 구현 - Ethereum Wallet(Mist)
https://steemkr.com/kr-dev/@nida-io/f35os-erc20
https://github.com/ethereum/mist/releases
https://rinkeby.etherscan.io/address/0xb73ae2fa
586392a2b3f3d5e84247d428bc0c6122
토큰 구현 - Ethereum Wallet(Mist)
토큰 구현 - OpenZeppelin + Embark
https://github.com/embark-framework/embark/
Tha
nks.
Made with Slides.com