Hi i was able to create and deploy my implementation contract and proxy contract but was only able to verify the implementation and not the proxy. I dont see the files i need to flatten for the proxy. @ericglau
I might need an actual team member to verify this for me. Please
I used the openzepplin wizard and chose all functions with Upgradability UUPS. Then i used the remix to deploy the .sol file and ended up with one contract and one proxy contract when looking at the bottom left corner of deployed contracts. I then go to etherscan and look up the first contract the implementation contract and try to verify the contract. I use the remix flattener tool on the only file i had to compile with and copied the flattened code into etherscan verification and leaving the abi section blank then clicking verify and it got verified. But for the proxy i try to use the same code and it fails. Im not sure if using the same flattened code is right for the proxy. Though i dont see any proxy .sol file version of the contract in remix for me to flatten. I really would appreciate if you look into the contract for me.
So i believe i need to flatten the source code of the proxy version that i dont see in remix.
Thank you for providing those details. This proxy contract was deployed by Remix using precompiled bytecode. I've contacted Remix to see if they can provide the compiler details that were used.
By precompiled bytecode, I mean Remix deploys the proxy contract from a bytecode string. This bytecode was previously compiled at some point in time, and the compiler settings that were used could be different than what you have in your Remix workspace. So we'd need these settings from the Remix team in order to verify the proxy on Etherscan.
I have a whole team of developers waiting @ericglau@frangio i really hope remix can get back to you ASAP. I wish remix would have generated the compiler details for the proxy upon deploying and saved it to my workplace.
Hi @blocky, thanks for your patience with this. We got a response from Remix that they did not have that information saved previously, but they now have it available on Remix-alpha (which is yet to go live).
Navigate the Remix file explorer to .deps/github/OpenZeppelin/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol to view the ERC1967Proxy contract
In the Flattener plugin for Remix, click "Flatten .deps/github/OpenZeppelin/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol"
Then paste the flattened source from clipboard into Etherscan when verifying that proxy
With the above steps, I was able to verify a new proxy on a testnet to look like this.
So i can just flatten this and verify my current proxy ?
That's just a way to get the ERC1967Proxy contract to be imported into Remix's dependencies. It would be more proper to flatten the actual ERC1967Proxy.
You would need to deploy a new one using Remix alpha because its proxy bytecode is different (due to the new compilation settings that were used).
I tried and still cant do it i flattened the file and paste it to the testnet and the proxy sais cant find bytecode. I used the remix alpha to deploy to testnet. Im not sure exactly what to put in abi encoded. @ericglau
I was able to verify the testnet proxy with that bytecode but not the mainnet that i just deployed again using the alpha remix. Is it a different bytecode ? @ericglau