Skip to content

Commit 3432017

Browse files
committed
attempting to brute force tx sender nonce
1 parent ff0b0c7 commit 3432017

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

Cargo.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ integration = []
2727
[dependencies]
2828
init4-bin-base = { version = "0.4.2", features = ["perms"] }
2929

30-
signet-constants = { git = "https://github.com/init4tech/signet-sdk" }
31-
signet-sim = { git = "https://github.com/init4tech/signet-sdk" }
32-
signet-tx-cache = { git = "https://github.com/init4tech/signet-sdk" }
33-
signet-types = { git = "https://github.com/init4tech/signet-sdk" }
34-
signet-zenith = { git = "https://github.com/init4tech/signet-sdk" }
30+
signet-constants = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/logging" }
31+
signet-sim = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/logging" }
32+
signet-tx-cache = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/logging" }
33+
signet-types = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/logging" }
34+
signet-zenith = { git = "https://github.com/init4tech/signet-sdk", branch = "dylan/logging" }
3535

3636
trevm = { version = "0.23.4", features = ["concurrent-db", "test-utils"] }
3737

@@ -58,4 +58,3 @@ tokio = { version = "1.36.0", features = ["full", "macros", "rt-multi-thread"] }
5858
oauth2 = "5"
5959
tokio-stream = "0.1.17"
6060
url = "2.5.4"
61-
tracing = "0.1.41"

bin/submit_transaction.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,19 @@ async fn main() {
6969

7070
async fn send_transaction(provider: &HostProvider, recipient_address: Address) {
7171
// construct simple transaction to send ETH to a recipient
72+
let nonce = match provider.get_transaction_count(provider.default_signer_address()).await {
73+
Ok(count) => count + 1,
74+
Err(e) => {
75+
error!(error = ?e, "failed to get transaction count");
76+
return;
77+
},
78+
};
79+
7280
let tx = TransactionRequest::default()
7381
.with_from(provider.default_signer_address())
7482
.with_to(recipient_address)
7583
.with_value(U256::from(1))
84+
.with_nonce(nonce)
7685
.with_gas_limit(30_000);
7786

7887
// start timer to measure how long it takes to mine the transaction

0 commit comments

Comments
 (0)