I have an ERC721 token deployed on Polygon that I want to bridge into Ethereum. I'm having a hard time figuring out how bridges and layer 2 work, so I have a few questions about this workflow.
1 - I suppose I need my smart contract to be deployed on both networks. In this case, if I have a dynamically minted limited supply, my smart contract in any of the networks won't know the currently minted supply on the other network to know when total supply has reached so it can stop minting. Any ideas on how to deal with this problem?
2 - Do I need to develop a custom bridge for that token, or does the Matic bridge already has the interfaces to handle these common ERC721/ERC20s in a more automatic manner?
3 - If I would need a custom bridge, I presume I'd need an oracle to gather data to transfer from one chain to another. Does Polygon have anything that would do this natively or maybe a first-party solution?