@flashbots/ethers-provider-bundle
Advanced tools
Comparing version
@@ -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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
167683
0.22%874
0.69%