diff --git a/.changeset/silver-windows-punch.md b/.changeset/silver-windows-punch.md new file mode 100644 index 00000000..81ecc3ee --- /dev/null +++ b/.changeset/silver-windows-punch.md @@ -0,0 +1,6 @@ +--- +"@tenderly/hardhat-integration": patch +"@tenderly/hardhat-tenderly": patch +--- + +Added alerts if ethers and hardhat-tenderly versions are not compatible for each other (ethersv5 and hardhat-tenderly@2.x.x, or ethersv6 and hardhat-tenderly@1.x.x. Also added alerts if there's a new hardhat-tenderly version available. diff --git a/examples/contract-verification/ethers-v5/hardhat.config.ts b/examples/contract-verification/ethers-v5/hardhat.config.ts index d4a156fd..30aad94e 100644 --- a/examples/contract-verification/ethers-v5/hardhat.config.ts +++ b/examples/contract-verification/ethers-v5/hardhat.config.ts @@ -20,8 +20,9 @@ console.log("Using automatic verification?", automaticVerifications); const config: HardhatUserConfig = { solidity: "0.8.23", networks: { - tenderly: { - url: `${process.env.TENDERLY_FORK_RPC_URL ?? ""}`, + my_tenderly_testnet: { + // or any other custom network name + url: `${process.env.TENDERLY_TESTNET_RPC_URL ?? ""}`, }, sepolia: { url: `${process.env.SEPOLIA_URL ?? ""}`, diff --git a/examples/contract-verification/ethers-v5/tpl.env b/examples/contract-verification/ethers-v5/tpl.env index c0743a7b..2aaecb95 100644 --- a/examples/contract-verification/ethers-v5/tpl.env +++ b/examples/contract-verification/ethers-v5/tpl.env @@ -1,7 +1,10 @@ -SEPOLIA_URL= # Provider URL for Sepolia test network +SEPOLIA_URL= # Provider URL for Sepolia test network -> Available through Tenderly Node RPCs SEPOLIA_PRIVATE_KEY= # optional -# https://dashboard.tenderly.co/{USERNAME}/{PROJECT}/fork/{FORK_ID} -TENDERLY_FORK_RPC_URL=# The RPC_URL of a Tenderly Fork; Found on the fork UI info tab -TENDERLY_PROJECT=# Project Slug; {PROJECT} in the URL -TENDERLY_USERNAME=# Username; {USERNAME} in the URL +TENDERLY_USERNAME=# Username +TENDERLY_PROJECT=# Project Slug -> Available on the dashboard project dropdown + +TENDERLY_TESTNET_RPC_URL=# The RPC_URL of a Tenderly VirtualTestnet; Found on the Dashboard UI for Virtual Testnets + +# This will automatically populate the `etherscan` field in the hardhat-verify config with the data needed to verify PROXY contracts on Tenderly. +TENDERLY_AUTOMATIC_POPULATE_HARDHAT_VERIFY_CONFIG=true diff --git a/examples/contract-verification/ethers-v6/hardhat.config.ts b/examples/contract-verification/ethers-v6/hardhat.config.ts index fb7ddb59..126e12a6 100644 --- a/examples/contract-verification/ethers-v6/hardhat.config.ts +++ b/examples/contract-verification/ethers-v6/hardhat.config.ts @@ -25,17 +25,9 @@ console.log( const config: HardhatUserConfig = { solidity: "0.8.23", networks: { - my_tenderly_fork_1: { + my_tenderly_testnet: { // or any other custom network name - url: `${process.env.TENDERLY_FORK_RPC_URL ?? ""}`, - }, - my_tenderly_devnet_1: { - // or any other custom network name - url: `${process.env.TENDERLY_DEVNET_RPC_URL_1 ?? ""}`, - }, - my_tenderly_devnet_2: { - // or any other custom network name - url: `${process.env.TENDERLY_DEVNET_RPC_URL_2 ?? ""}`, + url: `${process.env.TENDERLY_TESTNET_RPC_URL ?? ""}`, }, sepolia: { url: `${process.env.SEPOLIA_URL ?? ""}`, diff --git a/examples/contract-verification/ethers-v6/tpl.env b/examples/contract-verification/ethers-v6/tpl.env index 51fdcc94..2aaecb95 100644 --- a/examples/contract-verification/ethers-v6/tpl.env +++ b/examples/contract-verification/ethers-v6/tpl.env @@ -1,12 +1,10 @@ -SEPOLIA_URL= # Provider URL for Sepolia test network +SEPOLIA_URL= # Provider URL for Sepolia test network -> Available through Tenderly Node RPCs SEPOLIA_PRIVATE_KEY= # optional -# https://dashboard.tenderly.co/{USERNAME}/{PROJECT}/fork/{FORK_ID} -TENDERLY_FORK_RPC_URL=# The RPC_URL of a Tenderly Fork; Found on the fork UI info tab -TENDERLY_DEVNET_RPC_URL_1=# The RPC_URL of a Tenderly Devnet; Found on the devnet UI info tab -TENDERLY_DEVNET_RPC_URL_2=# The RPC_URL of a Tenderly Devnet; Found on the devnet UI info tab -TENDERLY_PROJECT=# Project Slug; {PROJECT} in the URL -TENDERLY_USERNAME=# Username; {USERNAME} in the URL +TENDERLY_USERNAME=# Username +TENDERLY_PROJECT=# Project Slug -> Available on the dashboard project dropdown + +TENDERLY_TESTNET_RPC_URL=# The RPC_URL of a Tenderly VirtualTestnet; Found on the Dashboard UI for Virtual Testnets # This will automatically populate the `etherscan` field in the hardhat-verify config with the data needed to verify PROXY contracts on Tenderly. TENDERLY_AUTOMATIC_POPULATE_HARDHAT_VERIFY_CONFIG=true diff --git a/examples/contract-verification/hardhat-ignition/hardhat.config.ts b/examples/contract-verification/hardhat-ignition/hardhat.config.ts index 3d3ab721..c2c3b267 100644 --- a/examples/contract-verification/hardhat-ignition/hardhat.config.ts +++ b/examples/contract-verification/hardhat-ignition/hardhat.config.ts @@ -11,9 +11,14 @@ tdly.setup(); const config: HardhatUserConfig = { solidity: "0.8.24", networks: { - testnet: { - url: `${process.env.TENDERLY_TESTNET_RPC_URL ?? ""}` - } + my_tenderly_testnet: { + // or any other custom network name + url: `${process.env.TENDERLY_TESTNET_RPC_URL ?? ""}`, + }, + sepolia: { + url: `${process.env.SEPOLIA_URL ?? ""}`, + accounts: [process.env.SEPOLIA_PRIVATE_KEY ?? ""], + }, }, tenderly: { project: process.env.TENDERLY_PROJECT ?? "", diff --git a/examples/contract-verification/hardhat-ignition/tpl.env b/examples/contract-verification/hardhat-ignition/tpl.env index 51fdcc94..20493f0c 100644 --- a/examples/contract-verification/hardhat-ignition/tpl.env +++ b/examples/contract-verification/hardhat-ignition/tpl.env @@ -1,12 +1,7 @@ -SEPOLIA_URL= # Provider URL for Sepolia test network +SEPOLIA_URL= # Provider URL for Sepolia test network -> Available through Tenderly Node RPCs SEPOLIA_PRIVATE_KEY= # optional -# https://dashboard.tenderly.co/{USERNAME}/{PROJECT}/fork/{FORK_ID} -TENDERLY_FORK_RPC_URL=# The RPC_URL of a Tenderly Fork; Found on the fork UI info tab -TENDERLY_DEVNET_RPC_URL_1=# The RPC_URL of a Tenderly Devnet; Found on the devnet UI info tab -TENDERLY_DEVNET_RPC_URL_2=# The RPC_URL of a Tenderly Devnet; Found on the devnet UI info tab -TENDERLY_PROJECT=# Project Slug; {PROJECT} in the URL -TENDERLY_USERNAME=# Username; {USERNAME} in the URL +TENDERLY_USERNAME=# Username +TENDERLY_PROJECT=# Project Slug -> Available on the dashboard project dropdown -# This will automatically populate the `etherscan` field in the hardhat-verify config with the data needed to verify PROXY contracts on Tenderly. -TENDERLY_AUTOMATIC_POPULATE_HARDHAT_VERIFY_CONFIG=true +TENDERLY_TESTNET_RPC_URL=# The RPC_URL of a Tenderly VirtualTestnet; Found on the Dashboard UI for Virtual Testnets