-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathChallenge.t.sol
32 lines (23 loc) · 916 Bytes
/
Challenge.t.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
import "./Challenge.sol";
contract ChallengeTest is Test {
Setup setup;
address public playerAddress;
function setUp() public {
playerAddress = makeAddr("player");
setup = new Setup();
}
function testExploit() public {
vm.startPrank(playerAddress, playerAddress);
////////// YOUR CODE GOES HERE //////////
////////// YOUR CODE END //////////
emit log_named_decimal_uint("user tokenA", setup.tokenA().balanceOf(playerAddress), setup.tokenA().decimals());
emit log_named_decimal_uint("user tokenB", setup.tokenB().balanceOf(playerAddress), setup.tokenB().decimals());
assertTrue(setup.isSolved(), "challenge not solved");
vm.stopPrank();
}
}
////////// YOUR CODE GOES HERE //////////
////////// YOUR CODE END //////////