-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: set fee rate to 0 in e2e testing
- Loading branch information
Showing
5 changed files
with
57 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: E2E Test Mainnet | ||
name: E2E Test | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Pull Request Template | ||
|
||
--- | ||
|
||
## Protocol Information | ||
|
||
- **Name:** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import * as core from '@protocolink/core'; | ||
import { getChainId } from '@protocolink/test-helpers'; | ||
import * as helpers from '@nomicfoundation/hardhat-network-helpers'; | ||
|
||
export async function setup() { | ||
const hre = await import('hardhat'); | ||
const chainId = await getChainId(); | ||
|
||
const router = core.Router__factory.connect(core.getContractAddress(chainId, 'Router'), hre.ethers.provider); | ||
const ownerAddress = await router.owner(); | ||
await helpers.impersonateAccount(ownerAddress); | ||
const owner = hre.ethers.provider.getSigner(ownerAddress); | ||
await router.connect(owner).setFeeRate(0); | ||
} |