Github

작성한 모든 문제 코드는 아래 github에서 확인 가능

https://github.com/Ho-Ya-Ho/mogakso

명령어 모음

디버깅 방법 → 나중에는 script로 디버깅해서 문제품

아래처럼 console을 import하고 찍어볼 수 있다.

// src 내부

import "forge-std/console.sol";

function sendAllocation(address payable allocator) public {
    require(allocations[allocator] > 0);
    allocator.transfer(allocations[allocator]);
    console.log("allocator : %s", address(allocator));
}
// forge 명령어
forge test --match-test test_I -vvvv
> [여기에 뜸]

// test 폴더 내부에서 sendAllocation() 함수를 호출하는 테스트 코드를 작성한 후 실행하면 된다.