Skip to content

Commit

Permalink
Create centralized config and transaction importer.
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-aptos committed Sep 9, 2024
1 parent 3350b0b commit 85707be
Show file tree
Hide file tree
Showing 8 changed files with 421 additions and 52 deletions.
101 changes: 50 additions & 51 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ members = [
"ecosystem/indexer-grpc/indexer-grpc-table-info",
"ecosystem/indexer-grpc/indexer-grpc-utils",
"ecosystem/indexer-grpc/indexer-test-transactions",
"ecosystem/indexer-grpc/indexer-transaction-generator",
"ecosystem/indexer-grpc/transaction-filter",
"ecosystem/nft-metadata-crawler-parser",
"ecosystem/node-checker",
Expand Down Expand Up @@ -364,6 +365,7 @@ aptos-indexer-grpc-table-info = { path = "ecosystem/indexer-grpc/indexer-grpc-ta
aptos-indexer-test-transactions = { path = "ecosystem/indexer-grpc/indexer-test-transactions" }
aptos-indexer-grpc-utils = { path = "ecosystem/indexer-grpc/indexer-grpc-utils" }
aptos-indexer-grpc-server-framework = { path = "ecosystem/indexer-grpc/indexer-grpc-server-framework" }
aptos-indexer-transaction-generator = { path = "ecosystem/indexer-grpc/indexer-transaction-generator" }
aptos-infallible = { path = "crates/aptos-infallible" }
aptos-inspection-service = { path = "crates/aptos-inspection-service" }
aptos-jellyfish-merkle = { path = "storage/jellyfish-merkle" }
Expand Down
37 changes: 37 additions & 0 deletions ecosystem/indexer-grpc/indexer-transaction-generator/Cargo.toml
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 ecosystem/indexer-grpc/indexer-transaction-generator/README.md
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
```
Loading

0 comments on commit 85707be

Please sign in to comment.