본문 바로가기

BlockChain Developer/Public Blockchain

(14)
[Solditiy] CEI & Mutex Pattern [소개] Smart Contract는 코인 또는 토큰을 보관할 수 있으며 배포 후 Verify가 진행되면 누구에게나 열람할 수 있는 권한이 있다. 이에 따라 코드상에 보안 문제가 다양하게 발생할 수 있다. 금일 이야기 해 볼 주제인 CEI 패턴은 "Re-Entrancy Attack(재진입 공격)"을 방지하는 방법 중 하나의 패턴이다. 이에 대응하기위해 Openzeppelin에서 Re-Entrancy Guard 를 사용해 Re-Entrancy Attack을 방법을 주로 채택한다. 스마트컨트랙트를 작성하다보면 GasFee Optimization(가스비 최적화)문제에 자주 맞닥드리게되는데 상기 Re-Entrancy Guard에 비해 CEI 패턴으로 작성된 컨트랙트는 보다 낮은 가스비용을 지출하므로 가스비 최적..
Hardhat - Upgradable Contract & Verify Contract 1. Project Settiing # Initialize npm init -y # install hardhat npm i hardhat --dev # hardhat initialize npx hardhat # init openzeppelin npm install @openzeppelin/hardhat-upgrades --dev # For Verify Contract npm install @nomiclabs/hardhat-etherscan --dev 2. Hardhat 기본 사용법 # View Accounts npx hardhat accounts # Compile Solidity npx hardhat compile # TESTING npx hardhat test ./test/mycontract.test...
Blockchain Dev Initial Setting 설치 목록 0. Chrome & Metamask Wallet # Chrome https://www.google.com/intl/ko/chrome/ # Metamask https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=ko 1. Nodejs & npm https://nodejs.org/ko/download/ 2. Remixd https://remix-ide.readthedocs.io/en/latest/remixd.html 3. Truffle # Truffle ngm install truffle -g 4. SourceTree (Github & 발급토큰 적용하기); # SourceTree https://w..
Install IPFS IN Ubuntu WEB3 객체저장소 IPFS 설치방법 요약 1. Ubuntu Setup sudo apt-get update sudo apt-get -y upgrade 2. Golang 설치 (Dependency) [경로작업은 불필요하다] sudo apt install golang-go -y 3. IPFS 설치 wget https://dist.ipfs.io/go-ipfs/v0.5.0/go-ipfs_v0.5.0_linux-amd64.tar.gz tar zxvf go-ipfs_v0.5.0_linux-amd64.tar.gz cd go-ipfs sudo ./install.sh 4. IPFS 실행 ipfs init //Initialization (PEER ID 확인) ipfs daemon (IPFS 실행) // ID 확인 방법 i..