feat(week-04): Uniswap V3 프론트엔드 구현 및 퀴즈 풀이#58
Open
summersurf0452 wants to merge 2 commits intoBay-17th:mainfrom
Open
feat(week-04): Uniswap V3 프론트엔드 구현 및 퀴즈 풀이#58summersurf0452 wants to merge 2 commits intoBay-17th:mainfrom
summersurf0452 wants to merge 2 commits intoBay-17th:mainfrom
Conversation
wagmi + RainbowKit 기반 dApp 구현 (지갑 연결, 토큰 잔액 조회, 풀 생성, 유동성 추가, 스왑) 및 week-04 퀴즈 답안 작성
- isSuccess 대신 receipt 데이터로 트랜잭션 확정 감지 - writeError/receiptError 에러 메시지 UI 추가
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wagmi + RainbowKit 기반 dApp 구현 (지갑 연결, 토큰 잔액 조회,
풀 생성, 유동성 추가, 스왑) 및 week-04 퀴즈 답안 작성
과제 제출 정보
주차: Week 04
과제 유형:
구현 내용
스크린샷
지갑 연결
풀 생성
유동성 추가 (3단계 flow)
스왑
배운 점 (What I Learned)
이번 주에 배운 것 (2-3가지)
wagmi hooks로 블록체인과 통신하는 방법
읽기,쓰기 패턴을 배웠습니다
ERC20 토큰의 approve-execute 패턴
3단계를 순서대로 처리해야 해서, step state와 useWaitForTransactionReceipt를
조합해 각 트랜잭션 완료를 감지하고 다음 단계로 넘어가도록 구현해야한다는 흐름을 배웠습니다.
컨트랙트 ABI의 역할
함수 이름, 파라미터 타입, 리턴 타입을 ABI에서 읽어서 wagmi가 자동으로 트랜잭션 데이터를 인코딩해준다는 걸 새로 배웠습니다
어려웠던 점과 해결 방법
어려웠던 점:
Uniswap V3에서 token0 < token1 정렬 규칙과 Next.js의 서버/클라이언트 컴포넌트 구분이 어려웠습니다.
처음에는 토큰 순서가 왜 중요한지 잘 이해가 안돼서 잘 모르는 상태로 풀 생성을 구현했던 것 같습니다
해결 방법:
LiquidityProvider의 토큰 자동 정렬 로직을 보고, 토큰 쌍의 순서까지 포함함으로써 중복 풀 방지용 약속을 만들어 풀을 유일하게 식별한다는 것을 이해했습니다.그리고 wagmi hooks는 브라우저 지갑을 써야 해서 서버 컴포넌트에서는 동작하지 않는다는 점을 알게 되었습니다. 메타마스크나 팬텀같은 브라우저 지갑 기능을 쓰려면
use client를 써야한다는 것을 새로 배웠습니다질문 사항
-없습니다 감사합니다!!
체크리스트
테스트
forge build성공forge test모든 테스트 통과제출 규칙
{username}/week-{XX}형식.env파일이 커밋에 포함되지 않음