Skip to content

Commit

Permalink
update dodo pool
Browse files Browse the repository at this point in the history
  • Loading branch information
yuichiroaoki committed Mar 15, 2022
1 parent fb53e1a commit 90aecb5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/node.js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ jobs:
- run: yarn test
env:
ALCHEMY_POLYGON_RPC_URL: ${{ secrets.ALCHEMY_POLYGON_RPC_URL }}

docker:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Docker Build
run: |
source startup.sh
3 changes: 0 additions & 3 deletions src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,9 @@ export const ERC20Token: erc20Token = {
type PoolMap = { [pair: string]: string };

export const dodoV2Pool: PoolMap = {
USDC_DAI: "0xaaE10Fa31E73287687ce56eC90f81A800361B898",
USDT_DAI: "0xDa43a4aAB20D313Ab3AA07d8E09f3521F32a3D83",
WETH_USDC: "0x5333Eb1E32522F1893B7C9feA3c263807A02d561",
WMATIC_USDC: "0x10Dd6d8A29D489BEDE472CC1b22dc695c144c5c7",
USDT_USDC: "0xA0020444b98f67B77a3d6dE6E66aF11c87da086e",
WBTC_USDC: "0xe020008465cD72301A18b97d33D73bF44858A4b7",
};

type RouterMap = { [protocol: string]: string };
Expand Down
4 changes: 1 addition & 3 deletions src/flashloan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ const Flashloan = new ethers.Contract(
type testedPoolMap = { [erc20Address: string]: string[] };

const testedPools: testedPoolMap = {
DAI: [dodoV2Pool.USDC_DAI],
WETH: [dodoV2Pool.WETH_USDC],
USDC: [dodoV2Pool.WETH_USDC, dodoV2Pool.USDC_DAI],
USDT: [dodoV2Pool.USDT_DAI],
USDC: [dodoV2Pool.WETH_USDC],
WMATIC: [dodoV2Pool.WMATIC_USDC],
};

Expand Down
12 changes: 3 additions & 9 deletions test/checkBalanceDodo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,9 @@ describe("DODO pool check", () => {
for (const [name, poolAddr] of Object.entries(dodoV2Pool)) {
test(name, async () => {
const dodoPool = new ethers.Contract(poolAddr, DodoPool.abi, provider);
if (poolAddr !== dodoV2Pool.WBTC_USDC) {
expect(
(await dodoPool._BASE_RESERVE_()).gt(getBigNumber(10000, 6))
).toBe(true);
} else {
expect((await dodoPool._BASE_RESERVE_()).gt(getBigNumber(1, 8))).toBe(
true
);
}
expect(
(await dodoPool._BASE_RESERVE_()).gt(getBigNumber(10000, 6))
).toBe(true);
expect(
(await dodoPool._QUOTE_RESERVE_()).gt(getBigNumber(10000, 6))
).toBe(true);
Expand Down

0 comments on commit 90aecb5

Please sign in to comment.