The Ethernaut - 0. Hello Ethernaut

Gunter·2024년 9월 30일
0

The Ethernaut

목록 보기
1/26

1. Set up Metamask

https://metamask.io/ko/download/

브라우저 주로 사파리 쓰는데.. 사파리는 지원 안되어서 크롬에 설치 😞

network -> sepolia 선택

 


 

2. Open the browser's console


ethernaut 브라우저에서 개발자모드 콘솔 창 열기


player -> player 주소 볼 수 있음

 


 

3. Use the console helpers

getBalance(player)
await getBalance(player) 현재 잔액 확인

help() 입력하면 여러 기능들 확인 가능

 


 

4. The ethernaut contract

ethernaut 이라는 메인 컨트랙트를 이용해 문제를 품
ABI 부분 살펴보기

 


 

5. Interact with the ABI

ethernaut은 Ethernaut.sol 이라는 이름으로 TruffleContract 테스트넷에 배포되어 있는 스마트 컨트렉트

ABI(Application Binary Interface)는 스마트 컨트렉트와 상호작용할 수 있는 "인터페이스"


계약의 소유자가 누군지 확인 가능

 


 

6. Get test ether

sepolia를 골랐으니

https://www.alchemy.com/faucets/ethereum-sepolia

지갑 주소를 복사한 위에 위 사이트에 주소를 전송해주면

?


워게임 시작하는데 필요한 돈이 없어서 공짜로 받으려고 사이트를 들어가니까 공짜로 받으려면 최소 0.001 ETH 가 있어야 된다고요..?

다른 sepolia faucet도 돌아보는데 회원가입 영차영차 하고 보면 뭐 메타마스크 이용시간이 적다 .. 최소금액이 필요하다 .. 등등 0원 거지한테는 다 매정하더라고요

그 와중에 깃헙 서드파티 이용해서 받는 킹갓황사이트 발견
https://blog.chain.link/sepolia-eth/

 


 

7. Getting a level instance

웹 페이지 가장 하단에 있는 'Get new instance' 버튼 클릭
확인 -> 수수료 지불 -> 인스턴스 생성

 


 

8. Inspecting the contract


contract.abi 입력해서 어떤 메서드들이 있는지 확인

 


 

9. Interact with the contract to complete the level








await contract.authenticate("ethernaut0");

submit instance

 


 

문제 푸는건 튜토리얼 정도 난이돈데 이더 충전하기가 빡셌다

0개의 댓글