You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it would be possible to use staticcall for mirrorERC721 in order to detect if the contract is DN404 however this could also cause an issue with abi.decode since it doesn't catch decoding errors effectively
function _getMirrorERC721(addresspossibleDN404) internalviewreturns (addressresult) {
assembly {
mstore(0x00, 0x4ef41efc) // `mirrorERC721()`.ifand(
gt(returndatasize(), 0x1f),
staticcall(gas(), possibleDN404, 0x1c, 0x04, 0x00, 0x20)
) {
// If result is a non-zero address, contract is very likely DN404.
result :=shr(96, mload(0x0c))
}
}
}
Currently, it would be possible to use
staticcall
formirrorERC721
in order to detect if the contract is DN404 however this could also cause an issue withabi.decode
since it doesn't catch decoding errors effectivelyethereum/solidity#10381
Therefore, the cleanest method would be supporting an arbitrary value for supportsInterface function
#68
The text was updated successfully, but these errors were encountered: