Skip to content

Commit

Permalink
Automatically merged updates to draft EIP(s) 1271 (ethereum#2776)
Browse files Browse the repository at this point in the history
Hi, I'm a bot! This change was automatically merged because:

 - It only modifies existing Draft or Last Call EIP(s)
 - The PR was approved or written by at least one author of each modified EIP
 - The build is passing
  • Loading branch information
frozeman authored and Arachnid committed Mar 6, 2021
1 parent 149e0f0 commit cdeb24d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions EIPS/eip-1271.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ pragma solidity ^0.5.0;

contract ERC1271 {

// bytes4(keccak256("isValidSignature(bytes,bytes)")
bytes4 constant internal MAGICVALUE = 0x20c13b0b;
// bytes4(keccak256("isValidSignature(bytes32,bytes)")
bytes4 constant internal MAGICVALUE = 0x1626ba7e;

/**
* @dev Should return whether the signature provided is valid for the provided data
* @param _data Arbitrary length data signed on the behalf of address(this)
* @param _signature Signature byte array associated with _data
*
* MUST return the bytes4 magic value 0x20c13b0b when function passes.
* MUST return the bytes4 magic value 0x1626ba7e when function passes.
* MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5)
* MUST allow external calls
*/
function isValidSignature(
bytes memory _data,
bytes32 _hash,
bytes memory _signature)
public
view
Expand Down Expand Up @@ -88,6 +88,7 @@ This EIP is backward compatible with previous work on signature validation since
Existing implementations :
* ERC725 [implemented in the ERC725Account](https://github.com/ERC725Alliance/ERC725/blob/master/implementations/contracts/ERC725/ERC725Account.sol#L73-L90).
* The 0x project [implemented this method](https://github.com/0xProject/0x-monorepo/blob/05b35c0fdcbca7980d4195e96ec791c1c2d13398/packages/contracts/src/2.0.0/protocol/Exchange/MixinSignatureValidator.sol#L187) in their protocol version 2.
* Zeppelin is [in the process](https://github.com/OpenZeppelin/openzeppelin-solidity/issues/1104) of implementing this method.
Expand Down

0 comments on commit cdeb24d

Please sign in to comment.