feat(week-01): complete counter assignment#3
Closed
m1k-2y wants to merge 1 commit intoBay-17th:mainfrom
Closed
Conversation
Member
리뷰개발 과제
구현 코드를 추가할 때 기존 TODO/힌트 주석은 삭제해주시면 좋을거 같아요 // 이렇게 하면 깔끔합니다
function increment() public {
count += 1;
}
퀴즈
퀴즈 답안이 제출되지 않았어요!
- week-01/theory/quiz-01-template.md를 복사해서 quiz-01-solution.md로 저장 후 답변을 작성해주세요
- 또는 week-01/quiz/quiz-01.md의 문제를 풀어서 quiz-01-solution.md로 제출해주세요
- 작성 후 같은 브랜치에 push하면 이 PR에 자동 반영됩니다
GitHub 적응
첫 PR인데 잘 올리셨습니다 ㅎㅎ 어려웠던 점도 솔직하게 적어줘서 좋습니다. 다음부턴 더 잘하실 겁니다!! |
Author
|
리뷰해주셔서 감사합니다! Todo관련 지우고 퀴즈풀고 다시 올려보겠습니다. 감사합니다.
2026년 2월 10일 (화) 오전 6:43, JinYoung Mo ***@***.***>님이 작성:
… *ahwlsqja* left a comment (Bay-17th/eth-homework#3)
<#3 (comment)>
리뷰 개발 과제
- increment, decrement, reset 모두 정확하게 구현하셨습니다!
- require로 언더플로우 방어도 잘 하셨습니다!!
구현 코드를 추가할 때 기존 TODO/힌트 주석은 삭제해주시면 좋을거 같아요
지금은 코드와 주석이 같이 있어서 살짝 어수선해 보입니다 ㅎㅎ:
// 이렇게 하면 깔끔합니다function increment() public {
count += 1;
}
퀴즈
퀴즈 답안이 제출되지 않았어요!- week-01/theory/quiz-01-template.md를 복사해서 quiz-01-solution.md로 저장 후 답변을 작성해주세요- 또는 week-01/quiz/quiz-01.md의 문제를 풀어서 quiz-01-solution.md로 제출해주세요- 작성 후 같은 브랜치에 push하면 이 PR에 자동 반영됩니다
GitHub 적응
첫 PR인데 잘 올리셨습니다 ㅎㅎ 어려웠던 점도 솔직하게 적어줘서 좋습니다. 다음부턴 더 잘하실 겁니다!!
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BRJ4V3QHQ4O4V7RNSFBC7R34LD5OVAVCNFSM6AAAAACUOYGUGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQNZUGAZDCMRQGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
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 <01>
과제 유형:
구현 내용
우선은 코드를 살펴보면 Counter라는 contract를 형성하였습니다. 그 후 컨트랙트 내부에서 count라는 변수를 public으로 만들었는데 이는 public을 통해 자동으로 getter를 만들 수 있습니다. 밑에 getCount라는 함수가 있는 것을 볼 수 있는데 이는 getter가 어떤 역할을 하는지 보여주기 위해 중복적으로 만들어 둔 거 같다는 생각을 했습니다.
그 아래에 1주차 과제의 todo가 있는 increment, decrement, reset함수가 있습니다. increment는 count += 1을 통해 count에 1을 더하는 기능을 하며 decrement는 require을 통해 count가 0이하일때 count를 감소시키는 것을 막고 0보다 큰 것이 확인 되었을 때 count -= 1을 통해 count를 1만큼 감소 시킵니다. 마지막으로 reset은 count = 0을 통해 count를 0으로 리셋시키는 역할을 하게 만들었습니다.
배운 점 (What I Learned)
이번 주에 배운 것 (2-3가지)
2.public을 선언하면 자동으로 getter가 만들어짐을 알 수 있었으며 밑에 있는 getcount()함수를 통해 getter가 어떻게 작동하는지 배우게 되었다.
3.view를 통해 가스를 소모하지 않으며 단순히 읽는 함수를 만들 수 있음을 배웠다.
어려웠던 점과 해결 방법
**어려웠던 점:**깃허브 사용 경험이 거의 없어 제출 및 테스트를 하는 데 많은 시간이 소요되었습니다. 특히 제출 시에 포크, 토큰의 사용 방법을 몰랐어서 어려움을 겪었습니다.
**해결 방법:**Gpt와 같은 17기 최재민 형의 도움을 통해 포크 방법과 토큰 생성을 하였습니다. 앞으로 깃허브를 쓸 일이 많을 텐데 이러한 경험을 통해 더욱 수월하게 할 수 있을 것 같습니다.