1

Is it possible to execute a read function of an ETH Mainnet smart contract from a Polygon smart contract?

Example: I want to make it so Bob can only execute a function on Matic IF he owns a certain NFT on the ETH Mainnet. The Polygon contract would ping the ownerOf function on the ETH Mainnet and if it’s equal to the msg.sender on Polygon, it will allow the Matic function to execute.

I’m having a hard time finding an answer for this on Google.

1 Answer 1

1

Is it possible to execute a read function of an ETH Mainnet smart contract from a Polygon smart contract?

No it is not possible. Why do you think it would be possible in the first place?

3
  • 2
    I’m still wrapping my arms around Polygon and frankly am not totally understanding it yet. But the answer you provided makes sense and is helpful, I think I can think of a workaround for this without interacting with the ETH contract and off chain computation.
    – sooprise
    Commented Nov 30, 2021 at 14:51
  • Polygon is often called a "layer 2" blockchain of Ethereum and the idea of doing "rollups" which are posted back to Ethereum mainnet are often mentioned as a use case for Polygon. If true, it would be handy if one could execute view functions against Ethereum-main contracts from a Polygon contract. If its not possible, I'm puzzled why people call it a "layer 2". It seems like Polygon functions as an fully separate blockchain, isolated from Ethereum Main, but also happens to use the EVM. So in what sense is Polygon a "Layer 2" to Eth Mainnet?
    – GGizmos
    Commented Sep 6, 2022 at 3:31
  • Polygon is not layer 2. Whatever you have read is not true and someone is lying. Commented Sep 6, 2022 at 7:24

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.