-
Notifications
You must be signed in to change notification settings - Fork 152
Add Steps at Rust Test Setup #1123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds missing initial setup steps to the Rust smart contract testing guide, clarifying the build and proxy generation process.
- Introduces a build command step before testing
- Documents how to create a test file in
tests/ - Adds instructions for generating and importing the contract proxy
|
|
||
| [comment]: # (mx-context-auto) | ||
|
|
||
| If you haven't yet, run the build command for your smart contract while in the contract directory `your-contract/`, that contains all the contract's directories. |
Copilot
AI
Jun 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider rephrasing "If you haven't yet" to "If you haven't already" for smoother readability.
| If you haven't yet, run the build command for your smart contract while in the contract directory `your-contract/`, that contains all the contract's directories. | |
| If you haven't already, run the build command for your smart contract while in the contract directory `your-contract/`, that contains all the contract's directories. |
| sc-meta all build | ||
| ``` | ||
|
|
||
| ### Creating test file |
Copilot
AI
Jun 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Heading capitalization is inconsistent; consider using title case (e.g., "### Create Test File") to match other section headings.
| ### Creating test file | |
| ### Creating Test File |
|
|
||
| In the root of the contract, at the path `your-contract/`, create the configuration file `sc-config.toml`, where we will specify the path to generate the proxy. The file should contain the following code: | ||
|
|
||
| ```rust title=sc-config.toml |
Copilot
AI
Jun 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The sc-config.toml snippet is TOML, so using toml instead of rust would improve syntax highlighting and clarity.
| ```rust title=sc-config.toml | |
| ```toml title=sc-config.toml |
| In the terminal, in the root of the contract, we will run the next command that will generate the proxy for your smart contract: | ||
|
|
||
|
|
||
| ``` |
Copilot
AI
Jun 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This code block should specify a language (e.g., ```bash) for consistent formatting of CLI commands.
| ``` | |
| ```bash |
Description of the pull request (what is new / what has changed)
Added two steps for developers/testing/rust/sc-test-setup.md and an overall introduction.
It was unclear for me (as a beginner) that I was supposed to first generate a proxy before being able to run blackbox tests.
The lack of this information got me stuck for a while with unresolved errors, until understanding this need, which should be clearly specified in the Test Setup directory.
Did you test the changes locally ?
Which category (categories) does this pull request belong to?