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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.15; | |
import {console2} from "forge-std/console2.sol"; | |
contract FizzBuzz { | |
modifier fizz(uint256 n) { | |
_; | |
if (n % 3 == 0 && n % 5 != 0) { | |
console2.log("Fizz"); |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.8.0; | |
contract AdversarialRoyalties { | |
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; | |
function supportsInterface(bytes4 interfaceID) external pure returns (bool) { | |
return interfaceID == _INTERFACE_ID_ERC2981; | |
} |
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
// SPDX-License-Identifier: Unlicense | |
pragma solidity >=0.8.0; | |
contract CheckBeforeStore { | |
event Log(address); | |
bytes32 stored; | |
function setUp() public { | |
stored = keccak256(abi.encode(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
[ | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "address", | |
"name": "account", | |
"type": "address" | |
}, |
NewerOlder