Skip to content

Commit

Permalink
Merge pull request #4 from alloy-rs/tx_examples
Browse files Browse the repository at this point in the history
feat(transactions): transaction examples
  • Loading branch information
yash-atreya authored Mar 25, 2024
2 parents aff3dfe + 07dec42 commit e329e7d
Show file tree
Hide file tree
Showing 15 changed files with 1,552 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ alloy = { git = "https://github.com/alloy-rs/alloy", rev = "fd8f065", features =
# "rpc-types",
"rpc-types-eth",
# "rpc-types-engine",
# "rpc-types-trace",
"rpc-types-trace",
"signers",
# "signer-aws",
# "signer-gcp",
Expand Down
26 changes: 7 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,13 @@ cargo run --example mnemonic_signer
- [ ] Watch blocks
- [ ] Subscribe events by type
- [ ] Subscribe logs
- [ ] Transactions
- [ ] Call override
- [ ] Create raw transaction
- [ ] Create typed transaction
- [ ] Decode input
- [ ] EIP-1559
- [ ] ENS
- [ ] Estimate gas
- [ ] Get gas price
- [ ] Get gas price USD
- [ ] Remove liquidity
- [ ] Set gas for a transaction
- [ ] Send raw transaction
- [ ] Send typed transaction
- [ ] Trace
- [ ] Transaction receipt
- [ ] Transaction status
- [ ] Transfer ETH
- [ ] Transfer ERC20 token
- [x] Transactions
- [x] [Decode input](./examples/transactions/examples/decode_input.rs)
- [x] [Get gas price in USD](./examples/transactions/examples/gas_price_usd.rs)
- [x] [Trace call](./examples/transactions/examples/trace_call.rs)
- [x] [Trace transaction](./examples/transactions/examples/trace_transaction.rs)
- [x] [Transfer ERC20 token](./examples/transactions/examples/transfer_erc20.rs)
- [x] [Transfer ETH](./examples/transactions/examples/transfer_eth.rs)
- [ ] Wallets
- [ ] AWS signer
- [ ] GCP signer
Expand Down
18 changes: 18 additions & 0 deletions examples/transactions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "examples-transactions"

publish.workspace = true
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[dev-dependencies]
alloy.workspace = true

eyre.workspace = true
reqwest.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread", "macros"] }
698 changes: 698 additions & 0 deletions examples/transactions/examples/contracts/ERC20Example.json

Large diffs are not rendered by default.

Loading

0 comments on commit e329e7d

Please sign in to comment.