1

Is it possible for my NFT contract deployed on Polygon to see if a user (msg.sender) has an NFT on the Ethereum mainnet. For example, if I wanted my NFT contract to give some sort of 'bonus' to all BAYC holders, would this be possible? Perhaps using an oracle? I'm assuming not, but would appreciate any help!

2
  • Is your objective to take a snapshot of bayc holders or to check it live (but then one could buy/borrow a bayc, claim your NFT, sell the bayc) ? You can take a snapshot then store it (as a mapping for instance) in a dedicated contract - it will cost a lot of gas, sugg using a Merkel tree (for instance) Commented Dec 5, 2021 at 19:41
  • Ideally, my polygon contract would be calling the ERC721 balanceOf() function on the BAYC contract. So, when someone would go to mint my NFT on polygon, they would receive some sort of 'bonus' for holding a BAYC. But a snapshot might work for my use case, I'll just need to make some adjustments. Also not too familiar with using Merkle trees but will do a deep dive. Cheers!
    – vcumminz
    Commented Dec 6, 2021 at 19:25

1 Answer 1

0

You can not read data on ETH mainnet from POLYGON net. As mentioned here

3
  • 1
    Hi Bskit and welcome - could you provide additional details on your answer (ie not just a link which can unfortunately go down in the future)? Thank you:) Commented Dec 3, 2021 at 19:52
  • The chains are completely different, this isnt web2, theres no CORS, it seems silly to asume as such @DrGorrlla.eth thanks for the welcome though.
    – nemo
    Commented Dec 5, 2021 at 7:58
  • 1
    Hi, “good” answers on stackExchange need to include more than just a link (please read my comment and this stackoverflow.com/help/how-to-answer ) - I’m questioning the format (for the answer itself, you just dismiss oracle’s existence) Commented Dec 5, 2021 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.