diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 50b298f..320a3d7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,9 @@ on: pull_request: branches: - vechain + push: + branches: + - fix/18-hh-tests jobs: call-workflow-hardhat-tests: diff --git a/test/shard2/entrypoint.test.ts b/test/shard2/entrypoint.test.ts index 3422ea5..124f254 100644 --- a/test/shard2/entrypoint.test.ts +++ b/test/shard2/entrypoint.test.ts @@ -506,10 +506,10 @@ describe('EntryPoint', function () { await fund(op1.sender) await fundVtho(op1.sender, entryPoint) - await entryPoint.simulateValidation(op1, { gasLimit: 1e7 }).then(async tx => tx.wait()).catch(e => e) - const block = await ethers.provider.getBlock('latest') - const hash = block.transactions[0] - await checkForBannedOps(block.hash, hash, false) + const transaction = await entryPoint.simulateValidation(op1, { gasLimit: 1e7 }) + transaction.wait().catch(e => e.errorArgs) + const blockHash = transaction.blockHash ?? (await ethers.provider.getBlock('latest')).hash + await checkForBannedOps(blockHash, transaction.hash, false) }) })