Created
June 26, 2017 17:00
-
-
Save anonymous/f5c444b9e087d03438aa990cb91b9e3a to your computer and use it in GitHub Desktop.
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
pragma solidity ^0.4.11; | |
contract Base { | |
modifier onlyPayloadSize(uint256 size) { | |
if(msg.data.length < size + 4) { | |
throw; | |
} | |
_; | |
} | |
function guarded(uint x) onlyPayloadSize(32) { | |
} | |
} | |
contract Foo is Base { | |
function shouldNotThrow() { | |
super.guarded(0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment