@flashbots/ethers-provider-bundle
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -151,3 +151,7 @@ "use strict"; | ||
// check bundle against block: | ||
const bundleIncluded = transactionAccountNonces.every((transaction, i) => block.transactions[block.transactions.length - 1 - i] === transaction.hash); | ||
const blockTransactionsHash = {}; | ||
for (const bt of block.transactions) { | ||
blockTransactionsHash[bt] = true; | ||
} | ||
const bundleIncluded = transactionAccountNonces.every((transaction) => blockTransactionsHash[transaction.hash] === true); | ||
resolve(bundleIncluded ? FlashbotsBundleResolution.BundleIncluded : FlashbotsBundleResolution.BlockPassedWithoutInclusion); | ||
@@ -154,0 +158,0 @@ } |
{ | ||
"name": "@flashbots/ethers-provider-bundle", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -275,5 +275,7 @@ import { BlockTag, TransactionReceipt, TransactionRequest } from '@ethersproject/abstract-provider' | ||
// check bundle against block: | ||
const bundleIncluded = transactionAccountNonces.every( | ||
(transaction, i) => block.transactions[block.transactions.length - 1 - i] === transaction.hash | ||
) | ||
const blockTransactionsHash: { [key: string]: boolean } = {} | ||
for (const bt of block.transactions) { | ||
blockTransactionsHash[bt] = true | ||
} | ||
const bundleIncluded = transactionAccountNonces.every((transaction) => blockTransactionsHash[transaction.hash] === true) | ||
resolve(bundleIncluded ? FlashbotsBundleResolution.BundleIncluded : FlashbotsBundleResolution.BlockPassedWithoutInclusion) | ||
@@ -280,0 +282,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
167683
874