Skip to content

Commit 98028bb

Browse files
authored
v4.0.1 (#80)
1 parent 8eb38ef commit 98028bb

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ RUN pipx install solc-select
2727

2828
# Foundry at specific version
2929
RUN curl -L https://foundry.paradigm.xyz | zsh
30-
RUN foundryup --version nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970
30+
31+
RUN foundryup --version nightly-2044faec64f99a21f0e5f0094458a973612d0712
3132

3233
# Clean up
3334
RUN sudo apt-get autoremove -y && sudo apt-get clean -y

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v4.0.1
4+
5+
- Updated README instructions to include `--isolate` mode (https://github.com/theredguild/damn-vulnerable-defi/pull/77)
6+
- Fixed typo in typehash (https://github.com/theredguild/damn-vulnerable-defi/pull/75)
7+
- Fixed typo in challenge prompt (https://github.com/theredguild/damn-vulnerable-defi/pull/79)
8+
- Removed unused state variable in test (https://github.com/theredguild/damn-vulnerable-defi/issues/76)
9+
- Updated Foundry version in devcontainer
10+
311
## v4.0.0
412

513
- Full migration from Hardhat to Foundry.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Use Damn Vulnerable DeFi to:
1414
## Install
1515

1616
1. Clone the repository.
17-
2. Checkout the latest release (for example, `git checkout v4.0.0`)
17+
2. Checkout the latest release (for example, `git checkout v4.0.1`)
1818
3. Rename the `.env.sample` file to `.env` and add a valid RPC URL. This is only needed for the challenges that fork mainnet state.
1919
4. Either install [Foundry](https://book.getfoundry.sh/getting-started/installation), or use the [provided devcontainer](./.devcontainer/) (In VSCode, open the repository as a devcontainer with the command "Devcontainer: Open Folder in Container...")
2020
5. Run `forge build` to initialize the project.
@@ -33,6 +33,9 @@ To solve a challenge:
3333
2. Uncover the flaw(s) in the challenge's smart contracts.
3434
3. Code your solution in the corresponding test file.
3535
4. Try your solution with `forge test --mp test/<challenge-name>/<ChallengeName>.t.sol`.
36+
37+
> In challenges that restrict the number of transactions, you might need to run the test with the `--isolate` flag.
38+
3639
If the test passes, you've solved the challenge!
3740

3841
Challenges may have more than one possible solution.

src/naive-receiver/BasicForwarder.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ contract BasicForwarder is EIP712 {
2828
error InvalidValue();
2929

3030
bytes32 private constant _REQUEST_TYPEHASH = keccak256(
31-
"Request(address from,address target,uint256 value,uint256 gas,uint256 nonce,bytes data,uint256 deadline"
31+
"Request(address from,address target,uint256 value,uint256 gas,uint256 nonce,bytes data,uint256 deadline)"
3232
);
3333

3434
mapping(address => uint256) public nonces;

src/side-entrance/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ A surprisingly simple pool allows anyone to deposit ETH, and withdraw it at any
44

55
It has 1000 ETH in balance already, and is offering free flashloans using the deposited ETH to promote their system.
66

7-
Yoy start with 1 ETH in balance. Pass the challenge by rescuing all ETH from the pool and depositing it in the designated recovery account.
7+
You start with 1 ETH in balance. Pass the challenge by rescuing all ETH from the pool and depositing it in the designated recovery account.

test/unstoppable/Unstoppable.t.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {UnstoppableMonitor} from "../../src/unstoppable/UnstoppableMonitor.sol";
1010
contract UnstoppableChallenge is Test {
1111
address deployer = makeAddr("deployer");
1212
address player = makeAddr("player");
13-
address monitor = makeAddr("monitor");
1413

1514
uint256 constant TOKENS_IN_VAULT = 1_000_000e18;
1615
uint256 constant INITIAL_PLAYER_TOKEN_BALANCE = 10e18;

0 commit comments

Comments
 (0)