From 0da63995cf94f463eece3fdd3a70cfb9d08ad395 Mon Sep 17 00:00:00 2001 From: Marcus Wentz <52706599+MarcusWentz@users.noreply.github.com> Date: Mon, 24 Jul 2023 18:44:07 -0400 Subject: [PATCH] docs(website): Foundry reference forge verify contract Blockscout URL bug fix (#14266) Co-authored-by: d1onys1us <13951458+d1onys1us@users.noreply.github.com> --- .../build-on-taiko/verify-a-contract.mdx | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/website/pages/docs/guides/build-on-taiko/verify-a-contract.mdx b/packages/website/pages/docs/guides/build-on-taiko/verify-a-contract.mdx index e51065a1d5..db37ccb348 100644 --- a/packages/website/pages/docs/guides/build-on-taiko/verify-a-contract.mdx +++ b/packages/website/pages/docs/guides/build-on-taiko/verify-a-contract.mdx @@ -75,8 +75,27 @@ This guide will help get your contract verified on a Taiko testnet! Follow Blockscout's [official guide](https://docs.blockscout.com/for-users/verifying-a-smart-contract) to verify your contract on Taiko's blockscout explorers. - - Foundry's `verify-contract` command is currently broken with Blockscout (see why [here](https://github.com/foundry-rs/foundry/issues/4909)). Please check the Hardhat or Blockscout steps to verify your contract. - + Copy the following Foundry test repo https://github.com/MarcusWentz/foundry-testing using git clone SSH + ```sh + git clone git@github.com:MarcusWentz/foundry-testing.git + ``` + Deploy to Taiko Grimsvotn L2 network and verify at the same time on Blockscout (with EIP-1559 gas [transaction type 1]) + ```sh + forge create --rpc-url https://rpc.test.taiko.xyz --private-key $devTestnetPrivateKey src/Contract.sol:SimpleStorage --verify --verifier blockscout --verifier-url https://explorer.test.taiko.xyz/api\? + ``` + Deploy to Taiko Eldfell L3 network and verify at the same time on Blockscout (with EIP-1559 gas [transaction type 1]) + ```sh + forge create --rpc-url https://rpc.l3test.taiko.xyz --private-key $devTestnetPrivateKey src/Contract.sol:SimpleStorage --verify --verifier blockscout --verifier-url https://blockscoutapi.l3test.taiko.xyz/api\? + ``` + + To use Legacy gas for [transaction type 0], add the + ```sh + --legacy + ``` + flag with forge create. Example: + ``` + forge create --legacy --rpc-url https://rpc.test.taiko.xyz --private-key $devTestnetPrivateKey src/Contract.sol:SimpleStorage --verify --verifier blockscout --verifier-url https://explorer.test.taiko.xyz/api\? + ``` +