Skip to content

Commit 1f3dfde

Browse files
committed
update links
1 parent 9d90f22 commit 1f3dfde

File tree

1 file changed

+8
-6
lines changed
  • apps/nextra/pages/en/build/indexer/indexer-sdk/advanced-tutorials

1 file changed

+8
-6
lines changed

apps/nextra/pages/en/build/indexer/indexer-sdk/advanced-tutorials/txn-script.mdx

+8-6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Each configuration file defines a sequences of transactions for a test scenario.
4646
- script_path: This field holds the path to the Move script file that will be executed as part of the transaction.
4747
- sender_address: : This field contains the address of the account that will send the transaction.
4848

49+
The number of output is totally up to you, but the output name should be unique for each transaction. Add as many transactions as you need to test your processor.
4950
```yaml
5051
transactions:
5152
- output_name: simple_user_script1
@@ -72,7 +73,7 @@ Each configuration file defines a sequences of transactions for a test scenario.
7273

7374
1. Read the configuration in the `move_fixtures` folder.
7475
2. Execute the specified Move scripts.
75-
3. Output the generated JSON files to the designated folder (`~/aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator/json_transactions`).
76+
3. Output the generated JSON files to the designated folder (`~/aptos-core/ecosystem/indexer-grpc/indexer-test-transactions/src/json_transactions`).
7677
4. Overwrite `generated_transactions.rs` with the new transaction data based on the generated JSON files. This file contains the transaction constants that can be used in tests.
7778

7879
### Verification
@@ -85,7 +86,7 @@ Verify that the json_transactions folder in the target directory contains the ge
8586

8687
### Export the Generated File
8788

88-
Update the `mod.rs` file to include the generated Rust file containing the transaction constants. If `mod.rs` doesnt exist, create one in the target folder:
89+
Update the `mod.rs` file to include the generated Rust file containing the transaction constants. If `mod.rs` doesn't exist, create one in the target folder:
8990

9091
[Reference mod.rs](https://github.com/aptos-labs/aptos-indexer-processor-example/blob/main/test-transactions-example/src/json_transactions/mod.rs).
9192

@@ -97,9 +98,10 @@ Since the `generated_transactions.rs` relies on the `json_transactions` Ensure t
9798

9899
### Integrate into Test Cases
99100

100-
Use the exported transaction constants directly in your test cases to simulate real transactions and validate processing logic.
101-
102-
[Example Crate](https://github.com/aptos-labs/aptos-indexer-processor-example/tree/main/test-transactions-example).
101+
If you decided to output the rust file in a different crate, you can update you cargo.toml to import the crate containing the generated file as a dependency. Otherwise, you can simply import the generated file directly in your test file.
102+
[Example](https://github.com/aptos-labs/aptos-indexer-processors-v2/blob/main/integration-tests/Cargo.toml#L19).
103103

104104
## Next Steps
105-
Once the transaction constants are integrated, you can use them in processor tests to validate functionality. For detailed instructions on writing processor tests, refer to Writing Processor Tests.
105+
Once the transaction constants are integrated, you can use them in processor tests to validate functionality. For detailed instructions on writing processor tests, refer to Writing Processor Tests.
106+
107+
[Example](https://github.com/aptos-labs/aptos-indexer-processors-v2/blob/main/integration-tests/src/sdk_tests/events_processor_tests.rs)

0 commit comments

Comments
 (0)