Sitelet https://github.com/njelich/examples/commit/6a7f6c9a807506c8ff72d7d4c55b3baa42c74040
Skip to content

Commit 6a7f6c9

Browse files
chore: bump alloy (alloy-rs#82)
* chore: bump alloy * merkle doesnt allow for tracing calls anymore without api key * prefer expect instead of unwrap --------- Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
1 parent 2410fac commit 6a7f6c9

21 files changed

Lines changed: 59 additions & 36 deletions

File tree

‎.github/workflows/integration.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
-e 'ws' \
3636
-e 'ws_auth' \
3737
-e 'subscribe_logs' \
38+
-e 'trace_call' \
39+
-e 'trace_transaction' \
3840
| xargs -n1 echo
3941
)"
4042

‎.github/workflows/test.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
-e 'ws' \
5454
-e 'ws_auth' \
5555
-e 'subscribe_logs' \
56+
-e 'trace_call' \
57+
-e 'trace_transaction' \
5658
| xargs -n1 echo
5759
)"
5860

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ cargo run --example 2>&1 \
154154
-e 'ws' \
155155
-e 'ws_auth' \
156156
-e 'subscribe_logs' \
157+
-e 'trace_call' \
158+
-e 'trace_transaction' \
157159
| xargs -I {} sh -c 'if cargo run --example {} --quiet 1>/dev/null; then \
158160
echo "Successfully ran: {}"; \
159161
else \

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ unnecessary_struct_initialization = "allow"
8181
use_self = "allow"
8282

8383
[workspace.dependencies]
84-
alloy = { git = "https://github.com/alloy-rs/alloy", rev = "e22d9be", features = [
84+
alloy = { git = "https://github.com/alloy-rs/alloy", rev = "bd39117", features = [
8585
"consensus",
8686
"kzg",
8787
"eips",

‎examples/contracts/examples/deploy_from_bytecode.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ async fn main() -> Result<()> {
5757

5858
let deploy_result = provider.send_transaction(tx).await?.get_receipt().await?;
5959

60-
let contract_address = deploy_result.contract_address().unwrap();
60+
let contract_address =
61+
deploy_result.contract_address().expect("Failed to get contract address");
6162
let contract = Counter::new(contract_address, &provider);
6263
println!("Deployed contract at address: {}", contract.address());
6364

‎examples/fillers/examples/gas_filler.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ async fn main() -> Result<()> {
4646
// Send the transaction, the nonce (0) is automatically managed by the provider.
4747
let builder = provider.send_transaction(tx.clone()).await?;
4848
let node_hash = *builder.tx_hash();
49-
let pending_tx = provider.get_transaction_by_hash(node_hash).await?;
49+
let pending_tx =
50+
provider.get_transaction_by_hash(node_hash).await?.expect("Pending transaction not found");
5051
assert_eq!(pending_tx.nonce, 0);
5152

5253
println!("Transaction sent with nonce: {}", pending_tx.nonce);
@@ -57,7 +58,8 @@ async fn main() -> Result<()> {
5758
// Send the transaction, the nonce (1) is automatically managed by the provider.
5859
let builder = provider.send_transaction(tx).await?;
5960
let node_hash = *builder.tx_hash();
60-
let pending_tx = provider.get_transaction_by_hash(node_hash).await?;
61+
let pending_tx =
62+
provider.get_transaction_by_hash(node_hash).await?.expect("Pending transaction not found");
6163
assert_eq!(pending_tx.nonce, 1);
6264

6365
println!("Transaction sent with nonce: {}", pending_tx.nonce);

‎examples/fillers/examples/nonce_filler.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ async fn main() -> Result<()> {
5757
// Send the transaction, the nonce (0) is automatically managed by the provider.
5858
let builder = provider.send_transaction(tx.clone()).await?;
5959
let node_hash = *builder.tx_hash();
60-
let pending_tx = provider.get_transaction_by_hash(node_hash).await?;
60+
let pending_tx = provider.get_transaction_by_hash(node_hash).await?.unwrap();
6161
assert_eq!(pending_tx.nonce, 0);
6262

6363
println!("Transaction sent with nonce: {}", pending_tx.nonce);
6464

6565
// Send the transaction, the nonce (1) is automatically managed by the provider.
6666
let builder = provider.send_transaction(tx).await?;
6767
let node_hash = *builder.tx_hash();
68-
let pending_tx = provider.get_transaction_by_hash(node_hash).await?;
68+
let pending_tx = provider.get_transaction_by_hash(node_hash).await?.unwrap();
6969
assert_eq!(pending_tx.nonce, 1);
7070

7171
println!("Transaction sent with nonce: {}", pending_tx.nonce);

‎examples/fillers/examples/recommended_fillers.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ async fn main() -> Result<()> {
4141
// Send the transaction, the nonce (0) is automatically managed by the provider.
4242
let builder = provider.send_transaction(tx.clone()).await?;
4343
let node_hash = *builder.tx_hash();
44-
let pending_tx = provider.get_transaction_by_hash(node_hash).await?;
44+
let pending_tx =
45+
provider.get_transaction_by_hash(node_hash).await?.expect("Pending transaction not found");
4546
assert_eq!(pending_tx.nonce, 0);
4647

4748
println!("Transaction sent with nonce: {}", pending_tx.nonce);
4849

4950
// Send the transaction, the nonce (1) is automatically managed by the provider.
5051
let builder = provider.send_transaction(tx).await?;
5152
let node_hash = *builder.tx_hash();
52-
let pending_tx = provider.get_transaction_by_hash(node_hash).await?;
53+
let pending_tx =
54+
provider.get_transaction_by_hash(node_hash).await?.expect("Pending transaction not found");
5355
assert_eq!(pending_tx.nonce, 1);
5456

5557
println!("Transaction sent with nonce: {}", pending_tx.nonce);

‎examples/fillers/examples/signer_filler.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ async fn main() -> Result<()> {
5959

6060
println!("Transaction hash matches node hash: {}", tx_hash == node_hash);
6161

62-
let receipt = provider.get_transaction_receipt(tx_hash).await?.expect("Receipt not found");
62+
let receipt =
63+
provider.get_transaction_receipt(tx_hash).await?.expect("Transaction receipt not found");
6364
let receipt_hash = receipt.transaction_hash;
6465
assert_eq!(receipt_hash, node_hash);
6566

‎examples/providers/examples/builtin.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async fn main() -> Result<()> {
3232

3333
let handle = tokio::spawn(async move {
3434
while let Some(block) = stream.next().await {
35-
println!("{}", block.header.number.unwrap());
35+
println!("{}", block.header.number.expect("Failed to get block number"));
3636
}
3737
});
3838

0 commit comments

Comments
 (0)