From 38d7711fbd9fae48a0d143f8edbcfa97c95ce541 Mon Sep 17 00:00:00 2001 From: David Racero Date: Mon, 18 Jan 2021 15:56:16 +0100 Subject: [PATCH 1/2] Apply fix --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37bc4176..b012440d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,6 +37,6 @@ certora-test: - mv solc-static-linux /usr/bin/solc - export PATH=$PATH:/usr/bin/solc/solc-static-linux script: - - certoraRun specs/harness/StableDebtTokenHarness.sol:StableDebtTokenHarness --solc_args '--optimize' --verify StableDebtTokenHarness:specs/StableDebtToken.spec --settings -assumeUnwindCond,-b=4 --cache StableDebtToken --cloud - - certoraRun specs/harness/UserConfigurationHarness.sol --verify UserConfigurationHarness:specs/UserConfiguration.spec --solc_args '--optimize' --settings -useBitVectorTheory --cache UserConfiguration --cloud - - certoraRun contracts/protocol/tokenization/VariableDebtToken.sol:VariableDebtToken specs/harness/LendingPoolHarnessForVariableDebtToken.sol --solc_args '--optimize' --link VariableDebtToken:POOL=LendingPoolHarnessForVariableDebtToken --verify VariableDebtToken:specs/VariableDebtToken.spec --settings -assumeUnwindCond,-useNonLinearArithmetic,-b=4 --cache VariableDebtToken --cloud + - certoraRun specs/harness/StableDebtTokenHarness.sol:StableDebtTokenHarness --solc_args "['--optimize']" --verify StableDebtTokenHarness:specs/StableDebtToken.spec --settings -assumeUnwindCond,-b=4 --cache StableDebtToken --cloud + - certoraRun specs/harness/UserConfigurationHarness.sol --verify UserConfigurationHarness:specs/UserConfiguration.spec --solc_args "['--optimize']" --settings -useBitVectorTheory --cache UserConfiguration --cloud + - certoraRun contracts/protocol/tokenization/VariableDebtToken.sol:VariableDebtToken specs/harness/LendingPoolHarnessForVariableDebtToken.sol --solc_args "['--optimize']" --link VariableDebtToken:POOL=LendingPoolHarnessForVariableDebtToken --verify VariableDebtToken:specs/VariableDebtToken.spec --settings -assumeUnwindCond,-useNonLinearArithmetic,-b=4 --cache VariableDebtToken --cloud From 600912463f5eca9977b5b705001482a65cc08d35 Mon Sep 17 00:00:00 2001 From: David Racero Date: Tue, 19 Jan 2021 09:57:36 +0100 Subject: [PATCH 2/2] Add waitTx for some missing scenario actions --- test/helpers/actions.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index b33f146d..cbe06e5c 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -128,7 +128,9 @@ export const approve = async (reserveSymbol: string, user: SignerWithAddress, te const token = await getMintableERC20(reserve); - await token.connect(user.signer).approve(pool.address, '100000000000000000000000000000'); + await waitForTx( + await token.connect(user.signer).approve(pool.address, '100000000000000000000000000000') + ); }; export const deposit = async ( @@ -314,7 +316,7 @@ export const delegateBorrowAllowance = async ( await expect(delegateAllowancePromise, revertMessage).to.be.revertedWith(revertMessage); return; } else { - await delegateAllowancePromise; + await waitForTx(await delegateAllowancePromise); const allowance = await debtToken.borrowAllowance(user.address, receiver); expect(allowance.toString()).to.be.equal( amountToDelegate,