Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix:refine example nonce
Signed-off-by: grapebaba <281165273@qq.com>
  • Loading branch information
GrapeBaBa committed Sep 4, 2023
commit dcaed197db3b9a49cc984cfa57592df2d4412bc4
2 changes: 1 addition & 1 deletion example/bundle/RpcMevSimBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void main(String[] args) throws IOException, ExecutionException, I
.getTransactionCount();
final String to = "0x56EdF679B0C80D528E17c5Ffe514dc9a1b254b9c";
RawTransaction rawTransaction = RawTransaction.createEtherTransaction(
nonce.add(BigInteger.ONE),
nonce,
web3j.ethGasPrice().send().getGasPrice(),
DefaultGasProvider.GAS_LIMIT,
to,
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/net/flashbots/provider/HttpProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public <T> CompletableFuture<T> send(
return future;
})
.exceptionallyCompose(throwable -> {
if (throwable instanceof MevShareApiException) {
future.completeExceptionally(throwable);
return future;
}
MevShareApiException e = new MevShareApiException(throwable);
future.completeExceptionally(e);
return future;
Expand Down