Skip to content

Commit

Permalink
v4.0.1 (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchoabbate authored Oct 22, 2024
1 parent 8eb38ef commit 98028bb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ RUN pipx install solc-select

# Foundry at specific version
RUN curl -L https://foundry.paradigm.xyz | zsh
RUN foundryup --version nightly-cafc2606a2187a42b236df4aa65f4e8cdfcea970

RUN foundryup --version nightly-2044faec64f99a21f0e5f0094458a973612d0712

# Clean up
RUN sudo apt-get autoremove -y && sudo apt-get clean -y
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v4.0.1

- Updated README instructions to include `--isolate` mode (https://github.com/theredguild/damn-vulnerable-defi/pull/77)
- Fixed typo in typehash (https://github.com/theredguild/damn-vulnerable-defi/pull/75)
- Fixed typo in challenge prompt (https://github.com/theredguild/damn-vulnerable-defi/pull/79)
- Removed unused state variable in test (https://github.com/theredguild/damn-vulnerable-defi/issues/76)
- Updated Foundry version in devcontainer

## v4.0.0

- Full migration from Hardhat to Foundry.
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use Damn Vulnerable DeFi to:
## Install

1. Clone the repository.
2. Checkout the latest release (for example, `git checkout v4.0.0`)
2. Checkout the latest release (for example, `git checkout v4.0.1`)
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.
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...")
5. Run `forge build` to initialize the project.
Expand All @@ -33,6 +33,9 @@ To solve a challenge:
2. Uncover the flaw(s) in the challenge's smart contracts.
3. Code your solution in the corresponding test file.
4. Try your solution with `forge test --mp test/<challenge-name>/<ChallengeName>.t.sol`.

> In challenges that restrict the number of transactions, you might need to run the test with the `--isolate` flag.
If the test passes, you've solved the challenge!

Challenges may have more than one possible solution.
Expand Down
2 changes: 1 addition & 1 deletion src/naive-receiver/BasicForwarder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract BasicForwarder is EIP712 {
error InvalidValue();

bytes32 private constant _REQUEST_TYPEHASH = keccak256(
"Request(address from,address target,uint256 value,uint256 gas,uint256 nonce,bytes data,uint256 deadline"
"Request(address from,address target,uint256 value,uint256 gas,uint256 nonce,bytes data,uint256 deadline)"
);

mapping(address => uint256) public nonces;
Expand Down
2 changes: 1 addition & 1 deletion src/side-entrance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ A surprisingly simple pool allows anyone to deposit ETH, and withdraw it at any

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

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.
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.
1 change: 0 additions & 1 deletion test/unstoppable/Unstoppable.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {UnstoppableMonitor} from "../../src/unstoppable/UnstoppableMonitor.sol";
contract UnstoppableChallenge is Test {
address deployer = makeAddr("deployer");
address player = makeAddr("player");
address monitor = makeAddr("monitor");

uint256 constant TOKENS_IN_VAULT = 1_000_000e18;
uint256 constant INITIAL_PLAYER_TOKEN_BALANCE = 10e18;
Expand Down

0 comments on commit 98028bb

Please sign in to comment.