Skip to content

Commit

Permalink
add forked environment into make
Browse files Browse the repository at this point in the history
  • Loading branch information
andersonlee725 committed Apr 29, 2024
1 parent 4ce1c66 commit dd24c58
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
run: |
SILENT=true make start-ganache
make test
- name: Forked Mainnet Tests
run: |
fuser -k 8545/tcp
make start-forkedMainnet
npx truffle test testUnderForked/*
coverage:
needs: test
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ start-ganache:
@echo " > \033[32mStarting ganache... \033[0m "
./scripts/start_ganache.sh

start-forkedMainnet:
@echo " > \033[32mStarting forked environment... \033[0m "
ganache-cli -f https://eth-mainnet.g.alchemy.com/v2/34NZ4AoqM8OSolHSol6jh5xZSPq1rcL-
sleep 3

start-geth:
@echo " > \033[32mStarting geth... \033[0m "
./scripts/geth/start_geth.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: LGPL-3.0-only
const Ethers = require("ethers");
const TruffleAssert = require("truffle-assertions");
const Helpers = require("../../../../helpers");
const Helpers = require("../../test/helpers");
const DynamicFeeHandlerContract = artifacts.require("DynamicERC20FeeHandlerEVMV2");
const FeeHandlerRouterContract = artifacts.require("FeeHandlerRouter");
const TwapOracleContract = artifacts.require("TwapOracle");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The Licensed Work is (c) 2022 Sygma
// SPDX-License-Identifier: LGPL-3.0-only
const Ethers = require("ethers");
const Helpers = require("../../../../helpers");
const Helpers = require("../../test/helpers");
const DynamicFeeHandlerContract = artifacts.require("DynamicERC20FeeHandlerEVMV2");
const FeeHandlerRouterContract = artifacts.require("FeeHandlerRouter");
const ERC20MintableContract = artifacts.require("ERC20PresetMinterPauser");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const TruffleAssert = require("truffle-assertions");
const Ethers = require("ethers");

const Helpers = require("../../../../helpers");
const Helpers = require("../../test/helpers");

const ERC20MintableContract = artifacts.require("ERC20PresetMinterPauser");
const ERC20HandlerContract = artifacts.require("ERC20Handler");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const TruffleAssert = require("truffle-assertions");
const Ethers = require("ethers");
const Helpers = require("../../../../helpers");
const Helpers = require("../../test/helpers");

const DynamicFeeHandlerContract = artifacts.require("DynamicGenericFeeHandlerEVMV2");
const FeeHandlerRouterContract = artifacts.require("FeeHandlerRouter");
Expand Down

0 comments on commit dd24c58

Please sign in to comment.