Verifying logic of upgradable contract

"The implementation contract at does not seem to be verified." When trying to verify proxy on Etherscan.

I'm trying to verify OZ upgradable contract to interact with it more easily on Etherscan. I deploy the contract using Truffle and everything seems to go well. It deployed two contracts: 0x9412f6C7C73b218438CC1B3D701170e64Dab6C0d and 0xC1C3A288DAEFECCA0F43B4BB8a5b075A2A244517.

The first contract seems to be the proxy and it was verified by default. I guess the other contract is the logic because it was in the proxy part. It's not verified and I'm not available to verify it using the normal command truffle run verify TestUpgradeable --network rinkeby.

I found one tutorial that said I needed to verify on Etherscan the contract as a proxy. I did it but instead of succeeding, I get an error like this:
image

I couldn't find anything online

Hello @Lankinen

The error message is self explanatory!

You are trying to verify the proxy contract at address 0x9412f6C7C73b218438CC1B3D701170e64Dab6C0d. This proxy points to an implementation at address 0xC1C3A288DAEFECCA0F43B4BB8a5b075A2A244517. The implementation code is not verified.

You need to verify this code before you can verify the proxy. I'm not sure how truffle run verify works ... but on hardhat I would do

hardhat verify --network rinkeby 0xC1C3A288DAEFECCA0F43B4BB8a5b075A2A244517 <constructor args>

Thanks for the answer. It seems like Truffle verify requires to have a contract defined https://github.com/rkalis/truffle-plugin-verify like this truffle verify ContractName.

I tried to run this truffle run verify TestUpgradeable@0x9412f6c7c73b218438cc1b3d701170e64dab6c0d --network rinkeby and it says that it was successfully verified. But it's the proxy and when I try to run the same for logic contract truffle run verify TestUpgradeable@0xC1C3A288DAEFECCA0F43B4BB8a5b075A2A244517 --network rinkeby
It returns this error message:

Verifying TestUpgradeable@0xC1C3A288DAEFECCA0F43B4BB8a5b075A2A244517
Invalid constructor arguments provided. Please verify that they are in ABI-encoded format
Failed to verify 1 contract(s): TestUpgradeable@0xC1C3A288DAEFECCA0F43B4BB8a5b075A2A244517

For future reference please refer to our megathread about Etherscan verification which includes a section about proxies/upgradeable contracts.

Just for the record I tried again deploying it from scratch and then I run truffle run verify TestUpgradeable@0x9ce5c0E8DaFc4Fbc5B5945e1F0cd96A99Bf69669 --network rinkeby where 0x9ce... is the address of the logic contract.