Skip to content

Commit

Permalink
Added onlyPayloadSize implementation
Browse files Browse the repository at this point in the history
Added onlyPayloadSize modifier implementation for PR OpenZeppelin#224.
  • Loading branch information
rudygodoy committed Aug 2, 2017
1 parent f7723b6 commit 2dd78cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/token/StandardToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ contract StandardToken is ERC20, BasicToken {

mapping (address => mapping (address => uint256)) allowed;

modifier onlyPayloadSize(uint numwords) {
require(msg.data.length == numwords * 32 + 4);
_;
}

/**
* @dev Transfer tokens from one address to another
Expand Down

0 comments on commit 2dd78cf

Please sign in to comment.