generating test transactions with move script#775
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f346475 to
337099f
Compare
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
337099f to
41c221f
Compare
d35779c to
18f5a07
Compare
41c221f to
f4a5496
Compare
18f5a07 to
e3a6dae
Compare
f4a5496 to
7c9ef01
Compare
e3a6dae to
51b360e
Compare
7c9ef01 to
443f3c1
Compare
51b360e to
0307421
Compare
443f3c1 to
719d843
Compare
0307421 to
d1e31ef
Compare
719d843 to
fc57bc1
Compare
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
apps/nextra/pages/en/build/indexer/indexer-sdk/documentation/advanced-tutorials/txn-script.mdx
Outdated
Show resolved
Hide resolved
fc57bc1 to
ee03a7e
Compare
|
|
||
|
|
||
| ## Next Steps | ||
| 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](). No newline at end of file |
There was a problem hiding this comment.
The empty link [Writing Processor Tests]() will be broken when rendered. Please either add the correct URL path to the parentheses or remove the Markdown link formatting if the destination page doesn't exist yet.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
|
|
||
| 1. Read the configuration in the `move_fixtures` folder. | ||
| 2. Execute the specified Move scripts. | ||
| 3. Output the generated JSON files to the designated folder (`~/aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator/json_transactions`). |
There was a problem hiding this comment.
The output path shown in the documentation (~/aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator/json_transactions) differs from the path specified in the command (../indexer-test-transactions/src/). This discrepancy should be resolved to ensure users can follow the instructions correctly. Consider updating either the command or the documentation to show the correct output path.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
| ### Set up `move_fixtures` folder | ||
| Before proceeding, ensure you have the move_fixtures folder set up in the appropriate location: | ||
| 1. Location: | ||
| The move_fixtures folder should be created in the `aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator/imported_transactions` directory. This is the folder where Move scripts and their configurations for test transactions will be stored. |
There was a problem hiding this comment.
| The move_fixtures folder should be created in the `aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator/imported_transactions` directory. This is the folder where Move scripts and their configurations for test transactions will be stored. | |
| The `move_fixtures` folder should be created in the `aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator/imported_transactions` directory. This is the folder where Move scripts and their configurations for test transactions will be stored. |
| 1. Location: | ||
| The move_fixtures folder should be created in the `aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator/imported_transactions` directory. This is the folder where Move scripts and their configurations for test transactions will be stored. | ||
|
|
||
| <Callout> **Note:** Do not create the `move_fixtures` folder in your processor repository. All Move-related files should reside in the `aptos-core` repository under the specified directory. </Callout> |
There was a problem hiding this comment.
why can't you put move_fixtures in the processor repository? what if they want to add the fixtures to version control?
| ### Set Up Test Accounts | ||
|
|
||
| 1. These accounts will be used to deploy your module. | ||
| 2. Set up as many accounts as you need. These accounts will be used to send the scripted transactions. Refer to the guide [here](https://aptos.dev/en/build/cli/setup-cli) to create accounts. |
There was a problem hiding this comment.
| 2. Set up as many accounts as you need. These accounts will be used to send the scripted transactions. Refer to the guide [here](https://aptos.dev/en/build/cli/setup-cli) to create accounts. | |
| 2. Set up as many accounts as you need. These accounts will be used to send the scripted transactions. Refer to [Aptos CLI](https://aptos.dev/en/build/cli/setup-cli) to create accounts. |
|
|
||
| ## Overview: | ||
|
|
||
| This section outlines how to create test transactions with Move scripts. |
There was a problem hiding this comment.
i think it'd help to have details on why you need scripted txn's, and when you would use a scripted txn instead of an imported txn
| - **Add as a Dependency**: | ||
|
|
||
| Include the crate containing the generated transactions as a dependency in the `Cargo.toml` file of your test crate. (Internally, transactions are stored in `aptos-core` and used in the [processor repo](https://github.com/aptos-labs/aptos-indexer-processors/blob/0c92d323b0f560b5f8601a831a36520ad9b72d68/rust/Cargo.toml#L34)). |
There was a problem hiding this comment.
not needed as per discussion on previous PR
|
|
||
| ```bash | ||
| cd ~/aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator | ||
| cargo run -- --testing-folder ./imported_transactions --output-folder ../indexer-test-transactions/src/ |
There was a problem hiding this comment.
| cargo run -- --testing-folder ./imported_transactions --output-folder ../indexer-test-transactions/src/ | |
| cargo run -- --testing-folder ./imported_transactions --output-folder /path/to/processor/repo/ |
60db79c to
e8f5eaf
Compare
260f684 to
95c1024
Compare
e8f5eaf to
775613a
Compare
95c1024 to
d958d58
Compare
| The move_fixtures folder should be created in the `aptos-core/ecosystem/indexer-grpc/indexer-transaction-generator/imported_transactions` directory. This is the folder where Move scripts and their configurations for test transactions will be stored. | ||
|
|
||
| <Callout> **Note:** Do not create the `move_fixtures` folder in your processor repository. All Move-related files should reside in the `aptos-core` repository under the specified directory. </Callout> | ||
| 2. Steps to set up the follder: |
There was a problem hiding this comment.
Typo: follder -> folder
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
|
|
||
|
|
||
| ## Next Steps | ||
| 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](). No newline at end of file |
There was a problem hiding this comment.
The link [Writing Processor Tests]() appears to be a placeholder without a destination URL. Consider either adding the correct documentation URL or removing the link formatting until the documentation is available. This will prevent broken links in the published documentation.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
d958d58 to
72c37ec
Compare
775613a to
475d800
Compare
72c37ec to
8313ef5
Compare
| @@ -0,0 +1,102 @@ | |||
| --- | |||
| title: "Aptos Transaction generated using Move Script" | |||
There was a problem hiding this comment.
I think it might be good to make the title of this consistent with the sidebar title you have in _meta.tsx
8313ef5 to
9d90f22
Compare
| The configuration file should be structured like this: | ||
| - output_name: This field specifies the name of the output file where the results of the transaction will be saved. | ||
| - script_path: This field holds the path to the Move script file that will be executed as part of the transaction. | ||
| - sender_address: : This field contains the address of the account that will send the transaction. |
There was a problem hiding this comment.
There is a duplicate colon in sender_address: : - one colon is sufficient here.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
|
|
||
| ### Export the `json_transactions` Folder | ||
|
|
||
| Since the `generated_transactions.rs` relies on the `json_transactions` Ensure the `json_transactions` folder is properly exported in the library file for your tests have direct access to the transaction data. |
There was a problem hiding this comment.
Missing comma after "json_transactions" in this sentence. The corrected version should read: "Since the generated_transactions.rs relies on the json_transactions, ensure..."
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
| The configuration file should be structured like this: | ||
| - output_name: This field specifies the name of the output file where the results of the transaction will be saved. | ||
| - script_path: This field holds the path to the Move script file that will be executed as part of the transaction. | ||
| - sender_address: : This field contains the address of the account that will send the transaction. |
There was a problem hiding this comment.
There is a duplicate colon in sender_address: : - this should be sender_address:
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
c5cd27a to
0de5f57
Compare
| - import | ||
| - script | ||
|
|
||
| 4. `--network` |
There was a problem hiding this comment.
isn't the network to get txn's from already in the config.yaml file?
Merge activity
|

Description
Checklist
pnpm fmt?pnpm lint?