From def0478025dd2ad0d54457604b37a44764a493b5 Mon Sep 17 00:00:00 2001 From: gzeon Date: Thu, 19 Oct 2023 00:52:34 +0900 Subject: [PATCH] fix: standarderc20 test (#367) * fix: standarderc20 test * chore: use latest testnode * format: fix --- .github/workflows/build-test.yml | 1 - tests/integration/standarderc20.test.ts | 10 +++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f23b4548d9..11125b71ac 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -114,7 +114,6 @@ jobs: uses: OffchainLabs/actions/run-nitro-test-node@main with: no-token-bridge: true - nitro-testnode-ref: '520f2589411d76bf2ce740c65658ee81bea433df' - name: Copy .env run: cp ./.env-sample ./.env diff --git a/tests/integration/standarderc20.test.ts b/tests/integration/standarderc20.test.ts index 4a1ac7ce83..e79838b6ef 100644 --- a/tests/integration/standarderc20.test.ts +++ b/tests/integration/standarderc20.test.ts @@ -210,13 +210,9 @@ describe('standard ERC20', () => { ]) ) - // supply just enough gas to cover l1 costs - this also covers l2 costs since the - // that estimate returns some margin - await redeemAndTest( - waitRes.message, - 0, - gasComponents.gasEstimateForL1.sub(200000) - ) + // force the redeem to fail by submitted just a bit under the required gas + // so it is enough to pay for L1 + L2 intrinsic gas costs + await redeemAndTest(waitRes.message, 0, gasComponents.gasEstimate.sub(1000)) await redeemAndTest(waitRes.message, 1) })