From 15b8c8b08d6b1cf9b6426ad1385e118d5ecfcfb3 Mon Sep 17 00:00:00 2001 From: JD Date: Tue, 9 Apr 2024 12:16:20 +0100 Subject: [PATCH 1/5] update issuance modules for dseth and gtceth --- src/utils/issuanceModules.test.ts | 4 ++-- src/utils/issuanceModules.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/issuanceModules.test.ts b/src/utils/issuanceModules.test.ts index 0d100eaf..93016b45 100644 --- a/src/utils/issuanceModules.test.ts +++ b/src/utils/issuanceModules.test.ts @@ -41,7 +41,7 @@ describe('getIssuanceModule() - Mainnet - IndexProtocol', () => { }) test('returns debt issuance module v2 for dsETH', async () => { - const expectedModule = IndexDebtIssuanceModuleV2Address + const expectedModule = IndexDebtIssuanceModuleV2Address_v2 const issuanceModule = getIssuanceModule(DiversifiedStakedETHIndex.symbol) expect(issuanceModule.address).toEqual(expectedModule) expect(issuanceModule.isDebtIssuance).toBe(true) @@ -55,7 +55,7 @@ describe('getIssuanceModule() - Mainnet - IndexProtocol', () => { }) test('returns debt issuance module v2 for gtcETH', async () => { - const expectedModule = IndexDebtIssuanceModuleV2Address + const expectedModule = IndexDebtIssuanceModuleV2Address_v2 const issuanceModule = getIssuanceModule(GitcoinStakedETHIndex.symbol) expect(issuanceModule.address).toEqual(expectedModule) expect(issuanceModule.isDebtIssuance).toBe(true) diff --git a/src/utils/issuanceModules.ts b/src/utils/issuanceModules.ts index 3983d49b..9242b3a5 100644 --- a/src/utils/issuanceModules.ts +++ b/src/utils/issuanceModules.ts @@ -41,6 +41,8 @@ export function getIssuanceModule( case ETH2xFlexibleLeverageIndex.symbol: return { address: DebtIssuanceModuleAddress, isDebtIssuance: true } case CoinDeskEthTrendIndex.symbol: + case DiversifiedStakedETHIndex.symbol: + case GitcoinStakedETHIndex.symbol: case IndexCoopBitcoin2xIndex.symbol: case IndexCoopEthereum2xIndex.symbol: case LeveragedrEthStakingYield.symbol: @@ -48,8 +50,6 @@ export function getIssuanceModule( address: IndexDebtIssuanceModuleV2Address_v2, isDebtIssuance: true, } - case DiversifiedStakedETHIndex.symbol: - case GitcoinStakedETHIndex.symbol: case wsETH2.symbol: return { address: IndexDebtIssuanceModuleV2Address, isDebtIssuance: true } case InterestCompoundingETHIndex.symbol: From 9372ffd81e75e9ff885db371185467023ed01f6d Mon Sep 17 00:00:00 2001 From: JD Date: Wed, 10 Apr 2024 14:41:26 +0100 Subject: [PATCH 2/5] enable dseth test --- .github/workflows/publish.yml | 12 ++++++------ src/tests/dseth/index.test.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9129c097..252b4b06 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,12 +32,12 @@ jobs: - run: npm ci - run: npm run lint - run: npm run build --if-present - - run: npm run hardhat & npm run test:btc2x - - run: npm run hardhat & npm run test:cdeti + # - run: npm run hardhat & npm run test:btc2x + # - run: npm run hardhat & npm run test:cdeti - run: npm run hardhat & npm run test:dseth - - run: npm run hardhat & npm run test:eth2x - - run: npm run hardhat & npm run test:gtceth - - run: npm run hardhat & npm run test:iceth + # - run: npm run hardhat & npm run test:eth2x + # - run: npm run hardhat & npm run test:gtceth + # - run: npm run hardhat & npm run test:iceth # - run: npm run hardhat & npm run test:icreth # run last - as it alters the block number - - run: npm run hardhat & npm run test:eth2xfli + # - run: npm run hardhat & npm run test:eth2xfli diff --git a/src/tests/dseth/index.test.ts b/src/tests/dseth/index.test.ts index 75b8c26f..c004624c 100644 --- a/src/tests/dseth/index.test.ts +++ b/src/tests/dseth/index.test.ts @@ -16,7 +16,7 @@ import { const { dseth, eth, reth, seth2, steth, usdc, weth, wseth } = QuoteTokens const zeroExApi = ZeroExApiSwapQuote -describe.skip('dsETH (mainnet)', () => { +describe('dsETH (mainnet)', () => { let factory: TestFactory beforeEach(async () => { const provider = LocalhostProvider @@ -24,7 +24,7 @@ describe.skip('dsETH (mainnet)', () => { factory = new TestFactory(provider, signer, zeroExApi) }) - test('minting with ETH', async () => { + test.only('minting with ETH', async () => { await factory.fetchQuote({ isMinting: true, inputToken: eth, From cf42023c098d319f6d894a33e2efc3943e8abd19 Mon Sep 17 00:00:00 2001 From: JD Date: Thu, 11 Apr 2024 07:28:53 +0100 Subject: [PATCH 3/5] re-enable gtceth test --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 252b4b06..4e902fcd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,7 +36,7 @@ jobs: # - run: npm run hardhat & npm run test:cdeti - run: npm run hardhat & npm run test:dseth # - run: npm run hardhat & npm run test:eth2x - # - run: npm run hardhat & npm run test:gtceth + - run: npm run hardhat & npm run test:gtceth # - run: npm run hardhat & npm run test:iceth # - run: npm run hardhat & npm run test:icreth # run last - as it alters the block number From 18c5da4e1e76bf9152fd2382b3dc5d3bf548ec56 Mon Sep 17 00:00:00 2001 From: JD Date: Thu, 18 Apr 2024 15:18:18 +0100 Subject: [PATCH 4/5] revert issuance for gtceth for now --- src/utils/issuanceModules.test.ts | 2 +- src/utils/issuanceModules.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/issuanceModules.test.ts b/src/utils/issuanceModules.test.ts index 93016b45..e1786fba 100644 --- a/src/utils/issuanceModules.test.ts +++ b/src/utils/issuanceModules.test.ts @@ -55,7 +55,7 @@ describe('getIssuanceModule() - Mainnet - IndexProtocol', () => { }) test('returns debt issuance module v2 for gtcETH', async () => { - const expectedModule = IndexDebtIssuanceModuleV2Address_v2 + const expectedModule = IndexDebtIssuanceModuleV2Address const issuanceModule = getIssuanceModule(GitcoinStakedETHIndex.symbol) expect(issuanceModule.address).toEqual(expectedModule) expect(issuanceModule.isDebtIssuance).toBe(true) diff --git a/src/utils/issuanceModules.ts b/src/utils/issuanceModules.ts index 9242b3a5..426199be 100644 --- a/src/utils/issuanceModules.ts +++ b/src/utils/issuanceModules.ts @@ -42,7 +42,6 @@ export function getIssuanceModule( return { address: DebtIssuanceModuleAddress, isDebtIssuance: true } case CoinDeskEthTrendIndex.symbol: case DiversifiedStakedETHIndex.symbol: - case GitcoinStakedETHIndex.symbol: case IndexCoopBitcoin2xIndex.symbol: case IndexCoopEthereum2xIndex.symbol: case LeveragedrEthStakingYield.symbol: @@ -50,6 +49,7 @@ export function getIssuanceModule( address: IndexDebtIssuanceModuleV2Address_v2, isDebtIssuance: true, } + case GitcoinStakedETHIndex.symbol: case wsETH2.symbol: return { address: IndexDebtIssuanceModuleV2Address, isDebtIssuance: true } case InterestCompoundingETHIndex.symbol: From 6ceb8d8989bbe2d089706967f2a5326b5bb1fec7 Mon Sep 17 00:00:00 2001 From: JD Date: Thu, 18 Apr 2024 15:19:10 +0100 Subject: [PATCH 5/5] re-activate tests --- .github/workflows/publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4e902fcd..9129c097 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -32,12 +32,12 @@ jobs: - run: npm ci - run: npm run lint - run: npm run build --if-present - # - run: npm run hardhat & npm run test:btc2x - # - run: npm run hardhat & npm run test:cdeti + - run: npm run hardhat & npm run test:btc2x + - run: npm run hardhat & npm run test:cdeti - run: npm run hardhat & npm run test:dseth - # - run: npm run hardhat & npm run test:eth2x + - run: npm run hardhat & npm run test:eth2x - run: npm run hardhat & npm run test:gtceth - # - run: npm run hardhat & npm run test:iceth + - run: npm run hardhat & npm run test:iceth # - run: npm run hardhat & npm run test:icreth # run last - as it alters the block number - # - run: npm run hardhat & npm run test:eth2xfli + - run: npm run hardhat & npm run test:eth2xfli