Solidity Polygon: Accessing ETH Mainnet Data via Polygon Contract

polygonsolidity

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.

Best Answer

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?