Skip to content

Commit

Permalink
Update documentation regarding proxy verification
Browse files Browse the repository at this point in the history
This PR updates the documentation about proxy verification
  • Loading branch information
dule-git committed Feb 5, 2024
1 parent 36c6169 commit f181842
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/contract-verification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NETWORK_NAME>`.
20 changes: 20 additions & 0 deletions packages/tenderly-hardhat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f181842

Please sign in to comment.