feat: Verify router contract on tenderly

Fix package.json

--- don't change below this line ---
ENG-4101 Took 34 minutes
This commit is contained in:
Diana Carvalho
2025-02-24 14:49:25 +00:00
parent cbea0bdab3
commit 77ba9498a7
4 changed files with 1525 additions and 219 deletions

View File

@@ -1,7 +1,7 @@
/** @type import('hardhat/config').HardhatUserConfig */ /** @type import('hardhat/config').HardhatUserConfig */
require("@tenderly/hardhat-tenderly");
require("@nomiclabs/hardhat-ethers"); require("@nomiclabs/hardhat-ethers");
require("@nomicfoundation/hardhat-foundry"); require("@nomicfoundation/hardhat-foundry");
// require("@tenderly/hardhat-tenderly");
module.exports = { module.exports = {
solidity: { solidity: {

1711
foundry/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,11 +2,12 @@
"name": "hardhat-project", "name": "hardhat-project",
"devDependencies": { "devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.2.3", "@nomiclabs/hardhat-ethers": "^2.2.3",
"@tenderly/hardhat-tenderly": "^2.5.2",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",
"hardhat": "^2.22.18" "hardhat": "^2.22.0"
}, },
"dependencies": { "dependencies": {
"@nomicfoundation/hardhat-foundry": "^1.1.3", "@nomicfoundation/hardhat-foundry": "^1.1.3",
"@tenderly/hardhat-tenderly": "^2.3.0" "ethers": "^5.0.0"
} }
} }

View File

@@ -21,22 +21,16 @@ async function main() {
await router.deployed(); await router.deployed();
console.log(`TychoRouter deployed to: ${router.address}`); console.log(`TychoRouter deployed to: ${router.address}`);
// Verify contract on Etherscan/tenderly try {
console.log("Waiting a bit before verifying..."); console.log("Verifying contract on Tenderly...");
// Wait for a few more confirmations before verifying await hre.tenderly.verify({
await new Promise(resolve => setTimeout(resolve, 10000)); name: "TychoRouter",
address: router.address,
// TODO: this doesn't work aarrggghh when I install and add hardhat-tenderly everything dies. I think it's a version mismatch with ethers });
// try { console.log("Contract verified successfully on Tenderly");
// console.log("Verifying contract on Tenderly..."); } catch (error) {
// await hre.tenderly.verify({ console.error("Error during contract verification:", error);
// name: "TychoRouter", }
// address: router.address,
// });
// console.log("Contract verified successfully on Tenderly");
// } catch (error) {
// console.error("Error during contract verification:", error);
// }
} }
// Execute deployment // Execute deployment