From cbdf9fe9e37f234c6e57d07800c2fc3995e20a8a Mon Sep 17 00:00:00 2001 From: LeadDev Date: Mon, 15 Aug 2022 11:51:27 +0530 Subject: [PATCH] chore: install live fork --- hardhat.config.ts | 7 +++++++ package.json | 4 +++- yarn.lock | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 6c64ffd6..e3c6b287 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -3,6 +3,7 @@ import 'hardhat-tracer'; import '@typechain/hardhat'; import 'hardhat-gas-reporter'; import 'hardhat-contract-sizer'; +import 'hardhat-live-fork'; import 'hardhat-deploy'; import 'solidity-coverage'; import '@nomiclabs/hardhat-etherscan'; @@ -178,4 +179,10 @@ export default { project: process.env.TENDERLY_PROJECT, username: process.env.TENDERLY_USERNAME, }, + liveFork: { + txMatcher: (tx: any) => { + // only replay txs to chainlink eth usd aggregator + return tx.to === '0x3607e46698d218B3a5Cae44bF381475C0a5e2ca7'; + }, + }, }; diff --git a/package.json b/package.json index dbe28393..01971196 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "clean": "hardhat clean", "compile": "hardhat compile", "coverage": "hardhat coverage", + "hn": "TS_NODE_SKIP_IGNORE=true hardhat node", "deploy": "TS_NODE_SKIP_IGNORE=true hardhat deploy", "deploy:arbtest": "yarn deploy --network arbtest", "deploy:goerli": "hardhat deploy --network goerli && yarn etherscan --network goerli", @@ -62,6 +63,7 @@ "hardhat-contract-sizer": "^2.1.1", "hardhat-deploy": "^0.10.5", "hardhat-gas-reporter": "^1.0.4", + "hardhat-live-fork": "^0.1.2", "hardhat-tracer": "^1.1.0-rc.5", "patch-package": "^6.4.7", "prettier": "^2.6.2", @@ -70,5 +72,5 @@ "ts-node": "^10.7.0", "typechain": "^8.0.0", "typescript": "^4.6.3" - } + } } diff --git a/yarn.lock b/yarn.lock index 41bc3fc8..d4488de1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5255,6 +5255,11 @@ hardhat-gas-reporter@^1.0.4: eth-gas-reporter "^0.2.24" sha1 "^1.1.1" +hardhat-live-fork@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/hardhat-live-fork/-/hardhat-live-fork-0.1.2.tgz#459f29de6e2691a44e59681cbb0ae0c6dbda298c" + integrity sha512-69DO7QHkyRhXMkdlHjtbJ4f33Wxlpg3P857+fldD0w8xmb/T8vtWQRmJNkWuRIl9SYnbbmJWjt9o/nTsVI16Jg== + hardhat-tracer@^1.1.0-rc.5: version "1.1.0-rc.6" resolved "https://registry.yarnpkg.com/hardhat-tracer/-/hardhat-tracer-1.1.0-rc.6.tgz#963f9058a2e1ca7f1dac19d8b00ab2c2e556a1f4"