Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Fix TrueFiPool2 'tether flush' test and disable Certora in CI #1180

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -143,10 +136,6 @@ workflows:
- slither:
requires:
- setup
- verify:
context: main
requires:
- setup
- test-truefi:
requires:
- build
Expand Down
9 changes: 7 additions & 2 deletions test/integration/TrueFiPool2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ describe('TrueFiPool2', () => {
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
Expand All @@ -46,12 +48,15 @@ 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(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)

await expect(usdtPool.connect(configGnosis).flush(10000000)).not.to.be.reverted
})
Expand Down