From 1608db67b552c67077c619ce0f7f8f0df85c2d86 Mon Sep 17 00:00:00 2001 From: Yuun Lim <38443641+yuunlimm@users.noreply.github.com> Date: Wed, 2 Oct 2024 22:26:37 -0700 Subject: [PATCH] update the folder name to be consistent (#14856) --- .../indexer-test-transactions/build.rs | 7 +++++-- .../simple_user_script1.json | 14 +++++++------- .../simple_user_script2.json | 14 +++++++------- .../simple_user_script3.json | 14 +++++++------- .../simple_user_script4.json | 14 +++++++------- .../indexer-test-transactions/src/lib.rs | 2 +- .../indexer-transaction-generator/example.yaml | 10 ++++++++++ 7 files changed, 44 insertions(+), 31 deletions(-) rename ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/{generated_txns => scripted_transactions}/simple_user_script1.json (92%) rename ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/{generated_txns => scripted_transactions}/simple_user_script2.json (92%) rename ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/{generated_txns => scripted_transactions}/simple_user_script3.json (92%) rename ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/{generated_txns => scripted_transactions}/simple_user_script4.json (92%) create mode 100644 ecosystem/indexer-grpc/indexer-transaction-generator/example.yaml diff --git a/ecosystem/indexer-grpc/indexer-test-transactions/build.rs b/ecosystem/indexer-grpc/indexer-test-transactions/build.rs index 4c47d6b644ca7..3180e0da35164 100644 --- a/ecosystem/indexer-grpc/indexer-test-transactions/build.rs +++ b/ecosystem/indexer-grpc/indexer-test-transactions/build.rs @@ -12,7 +12,7 @@ fn main() { create_directory_if_missing("json_transactions/imported_mainnet_txns"); create_directory_if_missing("json_transactions/imported_testnet_txns"); - create_directory_if_missing("json_transactions/scripted_txns"); + create_directory_if_missing("json_transactions/scripted_transactions"); all_transactions_code.push_str(&process_directory( "imported_mainnet_txns", @@ -22,7 +22,10 @@ fn main() { "imported_testnet_txns", "imported_testnet_txns", )); - all_transactions_code.push_str(&process_directory("generated_txns", "generated_txns")); + all_transactions_code.push_str(&process_directory( + "scripted_transactions", + "scripted_transactions", + )); fs::write(dest_path, all_transactions_code).unwrap(); } diff --git a/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script1.json b/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script1.json similarity index 92% rename from ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script1.json rename to ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script1.json index 6a26fbca3c8c0..2791bea70215a 100644 --- a/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script1.json +++ b/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script1.json @@ -1,17 +1,17 @@ { "timestamp": { - "seconds": "1727421325", - "nanos": 197950000 + "seconds": "1727820423", + "nanos": 374924000 }, "version": "65", "info": { - "hash": "EVjdz6VT0ucfIThWYuM1275MjzHyEgSJP5RVaC8NlBA=", - "stateChangeHash": "i/eXRYj+jS/niJmWwd2iTvSzQm8s4S1qvyN06q0K3qU=", + "hash": "HVkZSbpJSlZwoFhNjwQIZVRP98gL/FflFz0XDr1s/jQ=", + "stateChangeHash": "3soporrHMTRz3yCupvKV3zTuT08yUmHu0fDCQ7t9Z14=", "eventRootHash": "J/kCueHhHqJXi8MVudrh82sOQ/pqY9TJ9VjLOdgel6I=", "gasUsed": "3", "success": true, "vmStatus": "Executed successfully", - "accumulatorRootHash": "oZCcacA0QaSJ73RZXyUy2VF0qSleXwVfxGZ+oen4qkQ=", + "accumulatorRootHash": "x7tsbu3sxHcS4gRpYWlhR++sAahWzRGE0pQEzcZ7sN4=", "changes": [ { "type": "TYPE_WRITE_RESOURCE", @@ -99,7 +99,7 @@ "maxGasAmount": "4", "gasUnitPrice": "100", "expirationTimestampSecs": { - "seconds": "1727421355" + "seconds": "1727820453" }, "payload": { "type": "TYPE_SCRIPT_PAYLOAD", @@ -128,7 +128,7 @@ "type": "TYPE_ED25519", "ed25519": { "publicKey": "ObSsyF4CbcBWRkpeoAuY+FgmDqrSt03TC4auDU2U3fU=", - "signature": "zKv0luBq+y21hWdUPNwXgr3IMqa/bOu2F6EEOsKE8Nj/hHTpufL9cRw1qw9HFqg1jPYjHrkj4CHz0AEpMzohDw==" + "signature": "IU2OKSpVrg5lkxDIaQcu2bof2350i1ZK1Fa5fnQDD69b511fgTzhLo3HxKBfUWPRVSHz4r4F3069tzbt2QRGAg==" } } }, diff --git a/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script2.json b/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script2.json similarity index 92% rename from ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script2.json rename to ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script2.json index 58156a8638d62..3e0147bc98bb4 100644 --- a/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script2.json +++ b/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script2.json @@ -1,17 +1,17 @@ { "timestamp": { - "seconds": "1727421331", - "nanos": 441046000 + "seconds": "1727820429", + "nanos": 295697000 }, "version": "85", "info": { - "hash": "PW14bLZ3tJ0R17SjNgnmkojeN1M9kHGQ7HqplAGrNMI=", - "stateChangeHash": "2x+QMF/oSpT68TbIeBfM9ii9C/BBxxaynIA9o5YyFWE=", + "hash": "q13GWfM8FlYaXVhA7NMVDn/xk0+k5DmQ02RaWRBqIyY=", + "stateChangeHash": "hD3RRNs1JLei2+pGUGnfhBTFaiG53wVQSddrWWbNEeI=", "eventRootHash": "J/kCueHhHqJXi8MVudrh82sOQ/pqY9TJ9VjLOdgel6I=", "gasUsed": "3", "success": true, "vmStatus": "Executed successfully", - "accumulatorRootHash": "nuQFa0uh8LYnJpm/ZCZltSy8QIsy/RZ62yR1EmI+Jhk=", + "accumulatorRootHash": "QYI3MKmiAbxczpvK5hz+ViHMVpr1fz1tXfnESqq+isM=", "changes": [ { "type": "TYPE_WRITE_RESOURCE", @@ -100,7 +100,7 @@ "maxGasAmount": "4", "gasUnitPrice": "100", "expirationTimestampSecs": { - "seconds": "1727421361" + "seconds": "1727820459" }, "payload": { "type": "TYPE_SCRIPT_PAYLOAD", @@ -129,7 +129,7 @@ "type": "TYPE_ED25519", "ed25519": { "publicKey": "ObSsyF4CbcBWRkpeoAuY+FgmDqrSt03TC4auDU2U3fU=", - "signature": "KU0rMZs8n95eJcX0vkVDRIMKt/kaJjPP4ttdTms5mniusNLILqM7qPqC2bDImRmmYhNRtJ4+BJcxn+T76rRsBQ==" + "signature": "6AjqLiElP1/XJ/cA5JLYn4ZhKlFCWP1mez4RUnsu8VMlrySXcTCmiQcdTyK1dlCwygPCd8bpPK556oLfXD/FCA==" } } }, diff --git a/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script3.json b/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script3.json similarity index 92% rename from ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script3.json rename to ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script3.json index a40abc7bf98cf..c6b8e2a84cef2 100644 --- a/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script3.json +++ b/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script3.json @@ -1,17 +1,17 @@ { "timestamp": { - "seconds": "1727421312", - "nanos": 921233000 + "seconds": "1727820411", + "nanos": 25131000 }, "version": "23", "info": { - "hash": "2RmO+iRS2emMjOVhnZpv9ZwJNM9y63TCwaYLobNg+RA=", - "stateChangeHash": "VMJsni+6OOtOvYbW9TkmqnbaKPjmkniZXoySrY2J0Zw=", + "hash": "GZknxbrVbJ5aNZM9oxo8z2rn7vXPdCvI6xnNXFwTCbI=", + "stateChangeHash": "WVt5Qp5hqlE5kot3+/OaitmDhrCxSBoOAD11eWHj3Vs=", "eventRootHash": "J/kCueHhHqJXi8MVudrh82sOQ/pqY9TJ9VjLOdgel6I=", "gasUsed": "3", "success": true, "vmStatus": "Executed successfully", - "accumulatorRootHash": "1yTie36mbirBFeepzuuC/bLZbFAJqNqwR1emhQKMVs4=", + "accumulatorRootHash": "aXWm4P5j68oLt6Ti0vzFIib/dLvCzgTgBBQE33QBR7o=", "changes": [ { "type": "TYPE_WRITE_RESOURCE", @@ -99,7 +99,7 @@ "maxGasAmount": "4", "gasUnitPrice": "100", "expirationTimestampSecs": { - "seconds": "1727421342" + "seconds": "1727820441" }, "payload": { "type": "TYPE_SCRIPT_PAYLOAD", @@ -128,7 +128,7 @@ "type": "TYPE_ED25519", "ed25519": { "publicKey": "spiXXSfb/zAg5e5/27rYqWnU8qLVKG4JfR25dg0E3TE=", - "signature": "Fsmy9//Uha51qhZGM0d4YPmGVXCjU7aIsFqjZ5cw8ieC47atfHpktEA164wc+i6PSAuj9TIoH4r/xi6dpclWAA==" + "signature": "bp1zbI6WAhlpVcvHStPchYhxufqxtxRVy+/BMs253MCe7fqK8dXJVTseyfz12GQN7MEax0+6ywn8WrKJ6e7bDg==" } } }, diff --git a/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script4.json b/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script4.json similarity index 92% rename from ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script4.json rename to ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script4.json index eccc37576107a..0bdcbf5fc6580 100644 --- a/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/generated_txns/simple_user_script4.json +++ b/ecosystem/indexer-grpc/indexer-test-transactions/json_transactions/scripted_transactions/simple_user_script4.json @@ -1,17 +1,17 @@ { "timestamp": { - "seconds": "1727421318", - "nanos": 640581000 + "seconds": "1727820416", + "nanos": 759819000 }, "version": "43", "info": { - "hash": "kq1i+DudMSQSPMed3N2xiuVq4RIeBTm5vyvl/29VBwA=", - "stateChangeHash": "zwtBKlKw9jZwEznxm9VtQucWtXtPf7vzbodt6SHcIRk=", + "hash": "kloPL+AJzlOiHUD8DctUWeIZY3habQK1KrpM1+QnlnE=", + "stateChangeHash": "x2csE3/ogps+13tND7qzDszafZ96xYXGIwFYnkx77Ag=", "eventRootHash": "J/kCueHhHqJXi8MVudrh82sOQ/pqY9TJ9VjLOdgel6I=", "gasUsed": "3", "success": true, "vmStatus": "Executed successfully", - "accumulatorRootHash": "91KHbKiUBC+o2jUqg0zFiNjVa1V4YpYqcX23oh6xWGo=", + "accumulatorRootHash": "dXORuqtTul46Lyl8Q5HORdGaKR6461GPCPSdsL20lLw=", "changes": [ { "type": "TYPE_WRITE_RESOURCE", @@ -99,7 +99,7 @@ "maxGasAmount": "4", "gasUnitPrice": "100", "expirationTimestampSecs": { - "seconds": "1727421348" + "seconds": "1727820446" }, "payload": { "type": "TYPE_SCRIPT_PAYLOAD", @@ -128,7 +128,7 @@ "type": "TYPE_ED25519", "ed25519": { "publicKey": "7wW+3hX0IuFsAALjzui01DQVGNmcRpU1KhhpsHeYZPs=", - "signature": "BWUCSlTwShIrM508yRGjhb2vAymDu+08DYtyn/oh3YuB7ptCeeaYAQg4GdzDQuGkBQixnjoWHVzA/tdgDWsuAQ==" + "signature": "nsZra2UgS2lbtSWogQG39J89KyK6f49h46acnn+rZD87OmJAzYux/9poCzoqiVyUEvJTShJ0RjUFKKxO6aUdAA==" } } }, diff --git a/ecosystem/indexer-grpc/indexer-test-transactions/src/lib.rs b/ecosystem/indexer-grpc/indexer-test-transactions/src/lib.rs index cd4c4b7fc7023..19c9634431480 100644 --- a/ecosystem/indexer-grpc/indexer-test-transactions/src/lib.rs +++ b/ecosystem/indexer-grpc/indexer-test-transactions/src/lib.rs @@ -10,7 +10,7 @@ mod tests { #[test] fn test_generate_transactions() { - let json_bytes = GENERATED_TXNS_SIMPLE_USER_SCRIPT1; + let json_bytes = SCRIPTED_TRANSACTIONS_SIMPLE_USER_SCRIPT1; // Check that the transaction is valid JSON let transaction = serde_json::from_slice::(json_bytes).unwrap(); diff --git a/ecosystem/indexer-grpc/indexer-transaction-generator/example.yaml b/ecosystem/indexer-grpc/indexer-transaction-generator/example.yaml new file mode 100644 index 0000000000000..1bf7c0649d272 --- /dev/null +++ b/ecosystem/indexer-grpc/indexer-transaction-generator/example.yaml @@ -0,0 +1,10 @@ +import_config: + 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: aptoslabs_L7pzPsqiShp_EwzUCbhb6ehTe8PSvFp6ZeUr3B3gBdGaX + # A map from versions to dump and their output names. + versions_to_import: + 1: v1_genesis + 278556781: coin_register_fa_metadata_278556781 \ No newline at end of file