wyvernprotocol / wyvern-v3

Wyvern Protocol v3.1, Ethereum implementation
https://wyvernprotocol.com
MIT License
298 stars 121 forks source link

Incorrect implementation of EIP-1271 #60

Closed juniset closed 2 years ago

juniset commented 2 years ago

You are not using the latest implementation of EIP-1271 which uses function isValidSignature(bytes32 _hash, bytes memory _signature) public view returns (bytes4 magicValue); hence contracts implementing the correct version will return a different magic value (0x1626ba7e) and the check will fail, see https://eips.ethereum.org/EIPS/eip-1271.

https://github.com/wyvernprotocol/wyvern-v3/blob/1d89d6a91faddf3c3494e6ebdcb07b46fe111fb4/contracts/lib/EIP1271.sol#L9 and https://github.com/wyvernprotocol/wyvern-v3/blob/1d89d6a91faddf3c3494e6ebdcb07b46fe111fb4/contracts/exchange/ExchangeCore.sol#L24 should be updated.

cwgoes commented 2 years ago

Argh, why was there a backwards-incompatible change? Thanks though; this should definitely be fixed.

itsMarcoSolis commented 2 years ago

I've submitter a PR (#66) updating to the most recent implementation.