Open
Conversation
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.
과제 제출 정보
주차: Week
과제 유형:
구현 내용
-Counter 스마트 컨트랙트를 프론트엔드와 연동하여 현재 카운트 값을 읽어오는 기능을 구현했다.
-버튼을 클릭하면 increment 트랜잭션을 실행하여 카운트 값을 증가시키는 기능을 구현했다.
-지갑 연결을 위해 RainbowKit을 사용하여 사용자가 MetaMask 지갑을 연결할 수 있도록 구현했다.
배운 점 (What I Learned)
이번 주에 배운 것 (2-3가지)
1.wagmi 훅을 이용해 프론트엔드에서 스마트 컨트랙트를 읽고 트랜잭션을 전송하는 방법을 배웠다.
2.트랜잭션이 전송된 이후 useWaitForTransactionReceipt를 통해 블록에 포함될 때까지 상태를 추적하는 방법을 배웠다.
3.Web3 프론트엔드에서 지갑 연결(RainbowKit)과 스마트 컨트랙트 호출을 연결하는 전체적인 흐름을 이해했다.
어려웠던 점과 해결 방법
어려웠던 점:
프론트엔드 자체가 처음이라 wagmi 훅에서 반환되는 값들을 구조분해 할당으로 사용하는 방식이 익숙하지 않아 코드 흐름을 이해하는 데 시간이 걸렸다. 또한 useWriteContract에서 반환되는 hash 값을 useWaitForTransactionReceipt와 연결하는 과정이 처음에는 헷갈렸다.
해결 방법:
GPT와 코드를 한줄 한줄 읽어가며 해결하였습니다.
체크리스트
테스트
forge build성공forge test모든 테스트 통과제출 규칙
{username}/week-{XX}형식.env파일이 커밋에 포함되지 않음