I am writing a smart contract that uses the CryptoPunks data smart contract.
This contract has a public read function punkImageSvg()
that returns a string with the SVG of the punk in question. The data to generate these SVGs is not stored in the contract source, but was rather added to storage post-deploy.
My question is how I can call punkImageSvg()
in a testing environment. On my local machine this is easy as I just fork mainnet with Hardhat. However, I cannot fork mainnet when I deploy to Rinkeby.
I could create my own CryptoPunkData
contract on Rinkeby, but then I would have to populate it with Punk Data. However, I don’t know how to extract the data on the mainnet version and run it programmatically on the Rinkeby version. This approach would also take a lot of time as there are 10,000 Punks.
Of course the ideal solution would be if there is already a fully-populated Punk Data contract deployed to Rinkeby but if there is I cannot find one.
Overall looking for the best approach to using mainnet data on Rinkeby in a similar way that I use mainnet data locally via forking.