From 0ba439386f1df792c363c708a153b8908b3c760d Mon Sep 17 00:00:00 2001 From: yuunlimm Date: Fri, 25 Oct 2024 11:49:22 -0700 Subject: [PATCH] remve imported txns filefrom gitingore --- .../workflows/indexer-processor-testing.yaml | 13 ++++++----- .gitignore | 2 +- .../template_config.yaml | 9 -------- .../tests/imported_transactions.yaml | 22 +++++++++++++++++++ .../tests/testing_accounts.yaml | 16 ++++++++++++++ 5 files changed, 47 insertions(+), 15 deletions(-) create mode 100644 ecosystem/indexer-grpc/indexer-transaction-generator/tests/imported_transactions.yaml create mode 100644 ecosystem/indexer-grpc/indexer-transaction-generator/tests/testing_accounts.yaml diff --git a/.github/workflows/indexer-processor-testing.yaml b/.github/workflows/indexer-processor-testing.yaml index 80d30bbe485b08..ca46a2d35b7629 100644 --- a/.github/workflows/indexer-processor-testing.yaml +++ b/.github/workflows/indexer-processor-testing.yaml @@ -46,11 +46,12 @@ jobs: service_account: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }} - name: Prepare and Replace API Keys in Yaml + id: api_key_tokens uses: 'google-github-actions/get-secretmanager-secrets@v2' with: secrets: |- testnet_api_key:aptos-ci/TESTNET_INDEXER_API_KEY - mainnet_aptos_api_key:aptos-ci/MAINNET_INDEXER_API_KEY + mainnet_api_key:aptos-ci/MAINNET_INDEXER_API_KEY - name: Run CLI to Generate JSON Files id: api_key_update @@ -58,9 +59,10 @@ jobs: cd ecosystem/indexer-grpc/indexer-transaction-generator ls -al ./tests echo "Updating API keys in YAML files..." - sed -i "s/TESTNET_API_KEY/${{ steps.api_key_update.testnet_api_key }}/g" ./tests/imported_transactions.yaml - sed -i "s/MAINNET_API_KEY/${{ steps.api_key_update.testnet_api_key }}/g" ./tests/imported_transactions.yaml - + sed -i "s/TESTNET_API_KEY/${{ steps.api_key_tokens.outputs.testnet_api_key }}/g" ./tests/imported_transactions.yaml + sed -i "s/MAINNET_API_KEY/${{ steps.api_key_tokens.outputs.mainnet_api_key }}/g" ./tests/imported_transactions.yaml + + cat ./tests/imported_transactions.yaml # Print the updated file for verification cargo run -- --testing-folder ./tests --output-folder ../indexer-test-transactions/new_json_transactions - name: Install jq @@ -71,7 +73,8 @@ jobs: - name: Prepare and Clean JSON Files run: | cd ecosystem/indexer-grpc/indexer-test-transactions - + ls -al ./new_json_transactions + for folder in json_transactions/scripted_transactions new_json_transactions/scripted_transactions; do for file in $folder/*.json; do echo "Processing $file..." diff --git a/.gitignore b/.gitignore index e12d93cd544c78..885cde7bd9a303 100644 --- a/.gitignore +++ b/.gitignore @@ -130,7 +130,7 @@ run_* test_indexer_grpc_*.yaml test_indexer_grpc/* ecosystem/indexer-grpc/indexer-transaction-generator/*.yaml -ecosystem/indexer-grpc/indexer-transaction-generator/**/*.yaml +ecosystem/indexer-grpc/indexer-transaction-generator/tests/move_fixtures/*.yaml # ignore compiler artifacts *.dot diff --git a/ecosystem/indexer-grpc/indexer-transaction-generator/template_config.yaml b/ecosystem/indexer-grpc/indexer-transaction-generator/template_config.yaml index a0193e836045ac..0d287c47f0f140 100644 --- a/ecosystem/indexer-grpc/indexer-transaction-generator/template_config.yaml +++ b/ecosystem/indexer-grpc/indexer-transaction-generator/template_config.yaml @@ -14,12 +14,3 @@ mainnet: # api_key: YOUR_KEY_HERE # versions_to_import: { # } -# devnet: -# transaction_stream_endpoint: https://grpc.devnet.aptoslabs.com:443 -# api_key: YOUR_KEY_HERE -# versions_to_import: { -# } -# custom: -# transaction_stream_endpoint: https://CUSTOM_ENDPOINT:443 -# versions_to_import: { -# } \ No newline at end of file diff --git a/ecosystem/indexer-grpc/indexer-transaction-generator/tests/imported_transactions.yaml b/ecosystem/indexer-grpc/indexer-transaction-generator/tests/imported_transactions.yaml new file mode 100644 index 00000000000000..989b7ba7e3fec0 --- /dev/null +++ b/ecosystem/indexer-grpc/indexer-transaction-generator/tests/imported_transactions.yaml @@ -0,0 +1,22 @@ +testnet: + # Transaction Stream endpoint addresss. + transaction_stream_endpoint: https://grpc.testnet.aptoslabs.com:443 + # (Optional) The key to use with developers.aptoslabs.com + api_key: TESTNET_API_KEY + # A map from versions to dump and their output names. + versions_to_import: + # naming: + 1: 1_genesis + 2: 2_new_block_event + 3: 3_empty_txn + 278556781: 278556781_v1_coin_register_fa_metadata + 1255836496: 1255836496_v2_fa_metadata_ + 5979639459: 5979639459_coin_register + 5992795934: 5992795934_fa_activities + 5523474016: 5523474016_validator_txn + +mainnet: + transaction_stream_endpoint: https://grpc.mainnet.aptoslabs.com:443 + api_key: MAINNET_API_KEY + versions_to_import: + 308783012: 308783012_fa_transfer diff --git a/ecosystem/indexer-grpc/indexer-transaction-generator/tests/testing_accounts.yaml b/ecosystem/indexer-grpc/indexer-transaction-generator/tests/testing_accounts.yaml new file mode 100644 index 00000000000000..cec489415cde88 --- /dev/null +++ b/ecosystem/indexer-grpc/indexer-transaction-generator/tests/testing_accounts.yaml @@ -0,0 +1,16 @@ +# This file serves the accounts to use during account generation. +# These are generated in localnet and safe to share. +accounts: + - private_key: "0x99978d48e7b2d50d0a7a3273db0929447ae59635e71118fa256af654c0ce56c9" + public_key: "0x39b4acc85e026dc056464a5ea00b98f858260eaad2b74dd30b86ae0d4d94ddf5" + account: a531b7fdd7917f73ca216d89a8d9ce0cf7e7cfb9086ca6f6cbf9521532748d16 + - private_key: "0xe77498ac20ca67e8f642a6521077c8d5cba54853e7bed1e2c33b67e5a7b6c76e" + public_key: "0xc92c8e7b4467e629ca8cd201a21564de39eea7cbe45b59bfd37f10b56e0a728c" + account: 501b015c58f2a1a62a330a6da80dfee723f528f719d25a4232751986f9a9f43f + - private_key: "0x76a641118ffb5ca5f9de4fe414a7d216d89616e74bec2c445324a2f0ab609ab6" + public_key: "0xef05bede15f422e16c0002e3cee8b4d4341518d99c4695352a1869b0779864fb" + account: 8f0de18409d6fca18c72fac4062fc0f9baa6404296fed93a3ad0250fb671f8b3 + - private_key: "0xf24423f014e6f2fdd1914d6961b49a2cfc9eac59b88a57457e4cd9424fc140c8" + public_key: "0xb298975d27dbff3020e5ee7fdbbad8a969d4f2a2d5286e097d1db9760d04dd31" + account: 765d8c8d4d5859f43a56e2756fbf5f3d2483dbaa14f3fb62872df820d6e64eff + \ No newline at end of file