목록2024/02 (5)
개발공부일지
https://tailwindcss.com/docs/installation/using-postcss https://react.dev/learn/typescript https://react-typescript-cheatsheet.netlify.app/docs/basic/setup - 설치하기 npx create-react-app mini --template typescript npm install @types/react @types/react-dom npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p - tailwind.config.js /** @type {import('tailwindcss').Config} */ module.e..
목차 1. ERC 4337 2. 계정 추상화 3. ERC4337 이전에 제안된 개념 4. 가스비 대납 paymaster 5. metaTransaction 실습 6. ethers 사용하기 1. ERC 4337 ① user Operations - 프론트 페이지에서 보내는 객체(트랜잭션 형태) - 새로운 트랜잭션 pool에 요청하면 객체가 쌓임(pending상태) - EIP-2718 === 미래의 거래유형을 위해서 새로운 트랜잭션 pool 유형을 정의함 - 기존의 트랜잭션 수정하기 않기 위해서 → 이전버전과 호환이 되지않을수있기때문 - Dapp 환경에서 새로운 트랜잭션 풀에 담기위해 새로운 객체를 만들어서 요청을 보냄, → 담아놓은것을 처리하는것이 bundlers ② bundlers - user Operati..
목차 1. Proxy 2. EVM OPCODE 3. Proxy 패턴 ① 4. Proxy 패턴 ② 5. Proxy 패턴 ③ 1. Proxy - 블록체인의 장점이 불변성인데, 컨트랙트 배포하면 수정이 불가능함 - 그래서 사용하는 proxy 패턴 (버그발생이나 이벤트 추가 등등 수정할 일이 생겼을 경우) - 상태는 proxy에 보관하고, 로직부분은 대리호출을 담당하는 컨트랙트에서 담당 - 클라이언트가 직접 컨트랙트에 요청하는게 아니라 프록시에 요청 (프록시 CA주소가 바뀌지않음) - 사용하는 컨트랙트를 수정하는일이 생겼다면 프록시에 바뀐 컨트랙트CA주소를 참조해서 사용 - 클라이언트는 프록시 CA주소로 요청하면됨 - client → proxy contract(대리 호출) → 사용할 컨트랙트 → proxy 상태..
목차 1. factory contract 2. 스마트 컨트랙트의 DAO 3. checks-effects-interactions pattern 4. mutex 패턴 5. modifier (조건 논리 제어자) 1. factory contract - 컨트랙트 배포하는 로직을 작성하는 컨트랙트 - 규칙이 있는 인스턴스 생성하는 패턴 import "./ERC721.sol" contract Factory { function createContract (string memory _name, string memory _symbol) external { // ERC721 newNFT = ERC721(address) // 이미배포되어있는 인스턴스에 접근할때 사용한 방법 ERC721 newNFT = new ERC721(_n..
** ERC721(NFT) - 대체 불가능한 토큰 : 모양은 같지만 고유한 식별자가 있음. 각각의 NFT는 대체가 불가능함. - 영화티켓처럼, 티켓모양은 같지만 입장코드가 있는것과 같이 대체불가능하다는 의미 - 민팅 : 블록체인 네트워크에서 새로운 토큰을 생성하는 과정을 의미한다. - 토큰생성하는 메서드가 _mint()라서 민팅! ERC20에서 - ERC20은 생성할때 내부 데이터보다 갯수에 의미가있었는데 - ERC721은 생성할때 데이터를 포함시켜서 객체의 내용을 가지고 고유한 식별포함하고있음 - 백엔드에 업로드는 탈중앙화에 어긋나기때문에, ipfs에 업로드! - 설치 및 실행 npx create-react-app erc20 npm i web3 npm i @openzeppelin/contracts re..