0

I know how to check ownership of a token which relies on the same chain, but I need to check ownership of a token which is in another EVM chain.

For exemple, NFT contract is deployed on Polygon (I can have full code, ABI, contract address etc...). Then I want to deploy another contract on Ethereum which will check ownership of the NFTs on Polygon and act accordingly.

Is there any way to check this within the contract? If not, is there any workaround?

1 Answer 1

0

The workarounds would be:

  1. (Proactive) using Chainlinks GET requests - you can make requests to your backend, which then returns the owner for the asset.

  2. (Passiv) Provide the ownership information as a transaction argument.

    • Before the user submits a transaction to the Ethereum chain, your backend checks the ownership for some asset on Polygon
    • Your backend signs this data with your aka Validator Private Key. You can include additional data, like the current block number, or current block timestamp (Those could be like a nonce value, to prevent reentrancy).
    • Then you create a transaction for the user, add those values with the signature as the arguments,
    • User submits the transaction
    • In the polygons contract, you recover the signature to check if it was signed by your validator address, and act accordingly.

I would prefer the second option

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.