I have created Timelock in defender but the contract is not verified. I am trying to verify it using the v4.3.1 Timecontroller.sol but the byte code is not matching and it fails. Can someone help me with getting the contract verified on goerli?
Hi @Prash_Cha, thanks for reaching out.
We have some documentation that might help you in the process of verifying the contract here .
This includes the specific version of the timelock controller we're using (v4.3.1), as well as the compiler options:
Let me know if that helps?
I followed that documentation but it still says byte code does not match
I've gone ahead and verified the contract for you: https://goerli.etherscan.io/address/0xB0c1500b1Da0873e5a4c28F28aaDdB350080C175#code
I was able to do this through the hardhat-etherscan plugin as such:
I defined this as
TimelockController.sol in the contracts folder of my Hardhat project:
pragma solidity ^0.8.4;
Then, I defined this as
module.exports = [
and ran the following command:
npx hardhat verify --constructor-args arguments.js --network goerli 0xB0c1500b1Da0873e5a4c28F28aaDdB350080C175
Make sure you install the right version of openzeppelin's contract library. In
Defender is currently deploying version 4.3.1 of the Timelock Controller contract.
Hope that helps!
Thanks a lot. One question. Any reason we are not using the latest version which is 4.7.1?