From ff7616ba04954c814bbc09ba1832a14537d39bd3 Mon Sep 17 00:00:00 2001 From: Peter Kuchta Date: Tue, 19 Jul 2022 17:34:14 +0200 Subject: [PATCH 1/3] Fix TrueFiPool2 'tether flush' test --- test/integration/TrueFiPool2.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration/TrueFiPool2.test.ts b/test/integration/TrueFiPool2.test.ts index 3dae103ef..e186f6de9 100644 --- a/test/integration/TrueFiPool2.test.ts +++ b/test/integration/TrueFiPool2.test.ts @@ -19,6 +19,7 @@ describe('TrueFiPool2', () => { const USDC_ADDRESS = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' const TFUSDT_ADDRESS = '0x6002b1dcb26e7b1aa797a17551c6f487923299d7' const TFUSDT_STRATEGY_ADDRESS = '0x8D162Caa649e981E2a0b0ba5908A77f2536B11A8' + const PROXY_ADDRESS = '0x0BA5908a77f2536b11a88d162CAa649E981E2a0b' const TRU_HOLDER = '0x23696914ca9737466d8553a2d619948f548ee424' const ETH_HOLDER = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' const OWNER = '0x52bc44d5378309EE2abF1539BF71dE1b7d7bE3b5' @@ -46,12 +47,13 @@ describe('TrueFiPool2', () => { it('tether flush', async () => { const usdtPool = TrueFiPool2__factory.connect(TFUSDT_ADDRESS, powner) - const proxy = OwnedProxyWithReference__factory.connect(TFUSDT_ADDRESS, powner) + const proxy = OwnedProxyWithReference__factory.connect(PROXY_ADDRESS, powner) const strategyProxy = OwnedUpgradeabilityProxy__factory.connect(TFUSDT_STRATEGY_ADDRESS, powner) await proxy.changeImplementationReference(implementationReference.address) const newStrategy = await deployContract(CurveYearnStrategy__factory) await strategyProxy.upgradeTo(newStrategy.address) await holder.sendTransaction({ value: parseEth(100), to: CONFIG_GNOSIS_SAFE }) + await usdtPool.connect(configGnosis).switchStrategy(strategyProxy.address) await expect(usdtPool.connect(configGnosis).flush(10000000)).not.to.be.reverted }) From 26dfc7ec99837e44d355938d58676756162bf627 Mon Sep 17 00:00:00 2001 From: Peter Kuchta Date: Tue, 19 Jul 2022 18:22:01 +0200 Subject: [PATCH 2/3] Disable Certora in CI --- .circleci/config.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 021ea7beb..164ae2a8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,13 +66,6 @@ jobs: - attach_workspace: at: . - run: yarn lint - verify: - docker: - - image: circleci/python:3-node - steps: - - attach_workspace: - at: . - - run: yarn verify test-others: docker: - image: cimg/node:16.1.0 @@ -143,10 +136,6 @@ workflows: - slither: requires: - setup - - verify: - context: main - requires: - - setup - test-truefi: requires: - build From 6b7a07fc33f55ec5a56531a900707f843ab14aad Mon Sep 17 00:00:00 2001 From: Peter Kuchta Date: Wed, 20 Jul 2022 17:16:03 +0200 Subject: [PATCH 3/3] Address review comments --- test/integration/TrueFiPool2.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/integration/TrueFiPool2.test.ts b/test/integration/TrueFiPool2.test.ts index e186f6de9..71e7c63a6 100644 --- a/test/integration/TrueFiPool2.test.ts +++ b/test/integration/TrueFiPool2.test.ts @@ -19,17 +19,18 @@ describe('TrueFiPool2', () => { const USDC_ADDRESS = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' const TFUSDT_ADDRESS = '0x6002b1dcb26e7b1aa797a17551c6f487923299d7' const TFUSDT_STRATEGY_ADDRESS = '0x8D162Caa649e981E2a0b0ba5908A77f2536B11A8' - const PROXY_ADDRESS = '0x0BA5908a77f2536b11a88d162CAa649E981E2a0b' const TRU_HOLDER = '0x23696914ca9737466d8553a2d619948f548ee424' const ETH_HOLDER = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' const OWNER = '0x52bc44d5378309EE2abF1539BF71dE1b7d7bE3b5' const PROXY_OWNER = '0x16cea306506c387713c70b9c1205fd5ac997e78e' const CONFIG_GNOSIS_SAFE = '0xf0aE09d3ABdF3641e2eB4cD45cf56873296a02CB' - const provider = forkChain([OWNER, PROXY_OWNER, CONFIG_GNOSIS_SAFE, TRU_HOLDER, ETH_HOLDER]) + const DAO_TIMELOCK_CONTROLLER = '0x4f4AC7a7032A14243aEbDa98Ee04a5D7Fe293d07' + const provider = forkChain([OWNER, PROXY_OWNER, CONFIG_GNOSIS_SAFE, TRU_HOLDER, ETH_HOLDER, DAO_TIMELOCK_CONTROLLER]) const owner = provider.getSigner(OWNER) const powner = provider.getSigner(PROXY_OWNER) const configGnosis = provider.getSigner(CONFIG_GNOSIS_SAFE) const holder = provider.getSigner(ETH_HOLDER) + const daoTimelockController = provider.getSigner(DAO_TIMELOCK_CONTROLLER) const deployContract = setupDeploy(owner) let implementationReference: ImplementationReference @@ -47,11 +48,13 @@ describe('TrueFiPool2', () => { it('tether flush', async () => { const usdtPool = TrueFiPool2__factory.connect(TFUSDT_ADDRESS, powner) - const proxy = OwnedProxyWithReference__factory.connect(PROXY_ADDRESS, powner) + const proxy = OwnedProxyWithReference__factory.connect(TFUSDT_ADDRESS, daoTimelockController) + await holder.sendTransaction({ value: parseEth(100), to: DAO_TIMELOCK_CONTROLLER }) const strategyProxy = OwnedUpgradeabilityProxy__factory.connect(TFUSDT_STRATEGY_ADDRESS, powner) await proxy.changeImplementationReference(implementationReference.address) const newStrategy = await deployContract(CurveYearnStrategy__factory) await strategyProxy.upgradeTo(newStrategy.address) + await holder.sendTransaction({ value: parseEth(100), to: CONFIG_GNOSIS_SAFE }) await usdtPool.connect(configGnosis).switchStrategy(strategyProxy.address)