Ethernaut - Level 0. Hello Ethernaut

김윤성·2024년 10월 6일

1. Set up MetaMask

크롬에 메타마스크를 설치하고, network를 sepolia로 switch.


2. Open the browser's console

f12를 눌러 개발자모드 콘솔 창 열어주고, player()로 player의 주소를 볼 수 있다.


3. Use the console helpers

getBalance(player)로 현재 Ether 잔액을 확인한다.

help()로 다양한 정보를 얻을 수 있다.


4. The ethernaut contract

ethernaut라는 main contract를 활용할 예정이다.


5. Interact with the ABI

ethernaut는 Ethernaut.sol이라는 contract로, TruffleContract에 배포되어있다.
컨트랙트의 ABI는 Ethernaut.sol의 메인 메소드들을 보여준다.


6. Get test ether

7번에서 인스턴스를 생성하는데, 이를 위해서는 수수료의 지불이 필요하다.
공짜로 얻기 위해 https://blog.chain.link/sepolia-eth/
에서 0.1ETH를 얻을 수 있었다.
(그러나 이후 holesky로 네트워크를 변경하고 지인에게 받았다.)


7. Getting a level instance

웹 페이지의 하단에 보면 Get new instance가 있다.

음?
왜이렇게 많이 나오지?

이유는 모르겠으나,, holesky로 바꾸어 성공했다.

메타마스크로 이동하여 수수료를 지불해주면 인스턴스가 생성되었음을 확인할 수 있다.


8. Inspecting the contract


9. Interact with the contract to complete the level

그냥 단순히 따라가기만 하면 된다.

성공!

앞으로는 조금 더 자세한 설명과 내가 고민했던 것들을 구체적으로 적을 예정이다.

profile
윤성킴

0개의 댓글