-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ccc530
commit 06eb6ae
Showing
4 changed files
with
218 additions
and
52 deletions.
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
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,22 @@ | ||
// SPDX-License-Identifier: CC0-1.0 | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
|
||
contract MaliciousERC20 is ERC20 { | ||
constructor() ERC20("MaliciousToken", "MTK") {} | ||
|
||
function transferFrom( | ||
address sender, | ||
address recipient, | ||
uint256 amount | ||
) public override returns (bool) { | ||
return false; | ||
} | ||
|
||
// Mint function for testing purposes | ||
function mint(address to, uint256 amount) external { | ||
_mint(to, amount); | ||
} | ||
} |
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,15 @@ | ||
// SPDX-License-Identifier: CC0-1.0 | ||
|
||
// contracts/MaliciousRecipient.sol | ||
pragma solidity ^0.8.0; | ||
|
||
contract MaliciousRecipient { | ||
// Fallback function that reverts when receiving Ether | ||
fallback() external payable { | ||
revert("MaliciousRecipient: Reverting on receive"); | ||
} | ||
|
||
receive() external payable { | ||
revert("MaliciousRecipient: Reverting on receive"); | ||
} | ||
} |
Oops, something went wrong.