-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from provable-things/test-re-entrancy-attack-i…
…s-not-feasible feat(tests): adds test checking that reentrancy attack is not possible during wETH withdrawal
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
pragma solidity ^0.6.0; | ||
|
||
interface Erc20VaultInterface { | ||
function setPNetwork(address _pnetwork) external; | ||
} | ||
|
||
contract CONTRACT_WITH_RE_ENTRANCY_ATTACK { | ||
function attempReEntrancyAttack() payable public { | ||
Erc20VaultInterface vaultContract = Erc20VaultInterface(msg.sender); | ||
vaultContract.setPNetwork(address(this)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters