From eeb5dd95bac91467a0c5352f3208d21c86de51f5 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Tue, 3 Dec 2024 16:35:40 -0500 Subject: [PATCH 1/3] Add process of verifying TeleporterMessenger --- contracts/teleporter/README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/contracts/teleporter/README.md b/contracts/teleporter/README.md index ec73df0a6..9e4f95f62 100644 --- a/contracts/teleporter/README.md +++ b/contracts/teleporter/README.md @@ -14,6 +14,7 @@ - [Upgradability](#upgradability) - [Deploy TeleporterMessenger to an L1](#deploy-teleportermessenger-to-an-avalanche-l1) - [Deploy TeleporterRegistry to an L1](#deploy-teleporterregistry-to-an-avalanche-l1) +- [Verify a Deployment of TeleporterMessenger](#verify-a-deployment-of-teleporterMessenger) ## Overview @@ -173,4 +174,22 @@ Required arguments: - `--rpc-url ` Specify the rpc url of the node to use. - `--private-key ` Funds the deployer address with the account held by `` -`deploy_registry.sh` will deploy a new `TeleporterRegistry` contract for the intended release version, and will also have the corresponding `TeleporterMessenger` contract registered as the initial protocol version. \ No newline at end of file +`deploy_registry.sh` will deploy a new `TeleporterRegistry` contract for the intended release version, and will also have the corresponding `TeleporterMessenger` contract registered as the initial protocol version. + +## Verify a Deployment of TeleporterMessenger + +`TeleporterMessenger` can be verified on L1s using sourcify. `v1.0.0` of this repository must be checked out in order to match the source code properly. + +```bash +git checkout v1.0.0 +git submodule update --init --recursive +cd contracts + +forge verify-contract 0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf \ + src/teleporter/TeleporterMessenger.sol:TeleporterMessenger \ + --chain-id 13337 \ + --rpc-url \ + --verifier sourcify \ + --compiler-version v0.8.18+commit.87f61d96 \ + --num-of-optimizations 200 \ +``` \ No newline at end of file From 590991ceda5462a3944fb9f4b3f64d92b60eb4fd Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Tue, 3 Dec 2024 18:02:10 -0500 Subject: [PATCH 2/3] Update contracts/teleporter/README.md Co-authored-by: cam-schultz <78878559+cam-schultz@users.noreply.github.com> Signed-off-by: Geoff Stuart --- contracts/teleporter/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/teleporter/README.md b/contracts/teleporter/README.md index 9e4f95f62..a3267d16b 100644 --- a/contracts/teleporter/README.md +++ b/contracts/teleporter/README.md @@ -191,5 +191,5 @@ forge verify-contract 0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf \ --rpc-url \ --verifier sourcify \ --compiler-version v0.8.18+commit.87f61d96 \ - --num-of-optimizations 200 \ + --num-of-optimizations 200 \ ``` \ No newline at end of file From 1db22ed04d435cff0801af5f7c344955808248fa Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Tue, 3 Dec 2024 18:19:02 -0500 Subject: [PATCH 3/3] Fix --- contracts/teleporter/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/teleporter/README.md b/contracts/teleporter/README.md index 9e4f95f62..701439609 100644 --- a/contracts/teleporter/README.md +++ b/contracts/teleporter/README.md @@ -187,7 +187,7 @@ cd contracts forge verify-contract 0x253b2784c75e510dD0fF1da844684a1aC0aa5fcf \ src/teleporter/TeleporterMessenger.sol:TeleporterMessenger \ - --chain-id 13337 \ + --chain-id \ --rpc-url \ --verifier sourcify \ --compiler-version v0.8.18+commit.87f61d96 \