-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create centralized config and transaction importer.
- Loading branch information
1 parent
3350b0b
commit 85707be
Showing
8 changed files
with
421 additions
and
52 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
ecosystem/indexer-grpc/indexer-transaction-generator/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[package] | ||
name = "aptos-indexer-transaction-generator" | ||
description = "Indexer integration testing framework." | ||
version = "1.0.0" | ||
|
||
# Workspace inherited keys | ||
authors = { workspace = true } | ||
edition = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
publish = { workspace = true } | ||
repository = { workspace = true } | ||
rust-version = { workspace = true } | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
# used for localnode. | ||
# aptos = { workspace = true } | ||
# aptos-config = { workspace = true } | ||
aptos-indexer-grpc-utils = { workspace = true } | ||
aptos-protos ={ workspace = true } | ||
clap = { workspace = true } | ||
futures = { workspace = true } | ||
# rand = { workspace = true } | ||
# regex = { workspace = true } | ||
serde = { workspace = true } | ||
serde_json = { workspace = true } | ||
serde_yaml = { workspace = true } | ||
tokio = { workspace = true } | ||
# toml = { workspace = true } | ||
tonic = { workspace = true } | ||
url = { workspace = true } | ||
|
||
[dev-dependencies] | ||
itertools = { workspace = true } | ||
tempfile = { workspace = true } | ||
tokio-stream = { workspace = true } |
20 changes: 19 additions & 1 deletion
20
ecosystem/indexer-grpc/indexer-transaction-generator/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# Indexer Transaction Generator | ||
|
||
This tool is to generate transactions for testing purpose. | ||
This tool is to generate transactions for testing purpose. | ||
|
||
## Usage | ||
|
||
`cargo run -- --config example.yaml --output-folder /your_path_to_store_transactions/` | ||
|
||
### Config | ||
|
||
```YAML | ||
import_config: | ||
testnet_config: | ||
# Transaction Stream endpoint addresss. | ||
transaction_stream_endpoint: https://grpc.testnet.aptoslabs.com:443 | ||
# (Optional) The key to use with developers.aptoslabs.com | ||
api_key: YOUR_KEY_HERE | ||
# A map from versions to dump and their output names. | ||
versions_to_import: | ||
123: testnet_v1.json | ||
``` |
Oops, something went wrong.