Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction replayer #258

Merged
merged 4 commits into from
Nov 7, 2024
Merged

Conversation

SurfingNerd
Copy link
Collaborator

Transaction Replayer is able to replay pending transactions from one RPC on the configured network.
This might be a hardhat forked network, and synergises well with it to replay transactions that could not get included
in the original network, because it did lead to a problem in the block finalization.
Here is an example how to spin up a forked Network, used in testing of the alpha4 network.
Spin up a Node:
hh node --fork http://62.171.133.46:54100 --fork-block-number 450019
Add a new external network in the hardhat config.

forked: {
   url: "http://127.0.0.1:8545",
   timeout: 1_000_000
   },

Then you can use the TransactionReplayer to replay the transactions from the original RPC.

import { TransactionReplayer } from "./forked/transactionReplayer";
let replayer = new TransactionReplayer("http://62.171.133.46:54100");
await replayer.replayAllPendingTransactions();

@SurfingNerd SurfingNerd merged commit 2ec4354 into DMDcoin:dev Nov 7, 2024
5 checks passed
@SurfingNerd SurfingNerd self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant