From f181842633601368c1e25d9cc26281063238d6e0 Mon Sep 17 00:00:00 2001 From: dule-git <61541725+dule-git@users.noreply.github.com> Date: Mon, 5 Feb 2024 17:08:19 +0100 Subject: [PATCH] Update documentation regarding proxy verification This PR updates the documentation about proxy verification --- examples/contract-verification/README.md | 8 ++++++++ packages/tenderly-hardhat/README.md | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/examples/contract-verification/README.md b/examples/contract-verification/README.md index c654ba5f..820f9be0 100644 --- a/examples/contract-verification/README.md +++ b/examples/contract-verification/README.md @@ -105,4 +105,12 @@ yarn run private:greeter:manual-simple --network sepolia yarn run fork:calculatr:manual-advanced --network my_tenderly_fork_1 ``` +## Proxy contract verification + +Like with the commands above, we have created a set of commands that will help you quickly start verifying proxy contracts. The commands are: +```bash +yarn fork:proxy:automatic --network my_tenderly_fork_1 +yarn private:proxy:manual-simple --network sepolia +``` + When running against a specific network, you must add `--network `. diff --git a/packages/tenderly-hardhat/README.md b/packages/tenderly-hardhat/README.md index 861b5287..8707dbcb 100644 --- a/packages/tenderly-hardhat/README.md +++ b/packages/tenderly-hardhat/README.md @@ -21,6 +21,8 @@ Also, there are three ways of how you can actually do the verification based on - **Manual verification approach** - You will have to manually verify the contracts via plugin method calls. - **Task verification approach** - Verify your contracts via `tenderly:verify` hardhat task. +You can also verify proxy contracts supported by `@openzeppelin/hardhat-upgrades` plugin. For more information on that, you can check out the chapter about [Proxy Contract Verification](#proxy-contract-verification). + ## Installation ```bash @@ -263,6 +265,24 @@ You can also verify your contracts via exposed API calls. Although this is not r For more information on how to use these methods, you can check out their javadocs. +# Proxy contract verification + +This plugin supports verification of proxy contracts, their implementation and all the related contracts. +In order to successfully verify a proxy contract, please read the chapters about [Verification Modes](#verification-modes) and [Verification Approaches](#verification-approaches) first. +This will lead you to setup the configuration the right way, so you can verify your proxy contracts and their implementation on Tenderly. + +After you have successfully configured `hardhat.config.ts`, you need to populate the configuration in the format that `@nomicfoundation/hardhat-verify` plugin expects, given that this plugin uses their verification beneath for verifying proxies. +But luckily, we have provided a way to automatically populate the configuration for you, you just need to set the `AUTOMATIC_POPULATE_HARDHAT_VERIFY_CONFIG=true` environment variable. + +In order to see how this all plays out, you can clone our [@tenderly/hardhat-tenderly](https://github.com/Tenderly/hardhat-tenderly) repo and navigate to the [examples/contract-verification](https://github.com/Tenderly/hardhat-tenderly/tree/master/examples/contract-verification) directory. +This directory contains all the possibilities that you can explore in order to verify your proxy contracts. +Right now we support, both manual and automatic verification of the following proxy contracts: +- BeaconProxy +- TransparentUpgradeableProxy +- UUPSUpgradeableProxy + +And we support them on all type of verification modes (e.g. **devnet**, **fork**, **public**, **private**). + # Troubleshooting If you are having trouble with the plugin and want to contact support, you can run the deploy script with the following ```--verbose``` flag as so: ```bash