dn404 icon indicating copy to clipboard operation
dn404 copied to clipboard

Support 0x04040404 for supportsInterface function

Open zerotwodao opened this issue 2 years ago • 3 comments

Description

Would be great if we could support 0x04040404 as an identifier for DN404 contracts, so that the contract could automatically call setSkipNFT before transfer, etc.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • [x] Ran forge fmt?
  • [x] Ran forge snapshot?
  • [x] Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

zerotwodao avatar Feb 15 '24 09:02 zerotwodao

Just try catch call setSkipNFT. Not a fan of 165, it can be spoofed.

Btw, all contracts are automatically whitelisted to skip NFTs.

Vectorized avatar Feb 15 '24 09:02 Vectorized

@Vectorized Hmm would it be problematic if the token is sent before the contract deployment? https://despac1to.medium.com/carefully-use-openzeppelins-address-iscontract-msg-sender-4136cc6ff66d

edit ) seems like _ADDRESS_DATA_INITIALIZED_FLAG prevents it though.

ghost avatar Feb 15 '24 10:02 ghost

🤔 Lemme marinate on this.

Vectorized avatar Feb 15 '24 10:02 Vectorized