Skip to content

Conversation

@vinibarbosabr
Copy link
Contributor

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 ?

  • yes
  • no

Which category (categories) does this pull request belong to?

  • document new feature
  • update documentation that is not relevant anymore
  • add examples or more information about a component
  • fix grammar issues
  • other

@andreibancioiu andreibancioiu requested a review from Copilot June 30, 2025 08:23
Copy link
Contributor

Copilot AI left a 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.
Copy link

Copilot AI Jun 30, 2025

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
sc-meta all build
```

### Creating test file
Copy link

Copilot AI Jun 30, 2025

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.

Suggested change
### Creating test file
### Creating Test File

Copilot uses AI. Check for mistakes.

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
Copy link

Copilot AI Jun 30, 2025

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.

Suggested change
```rust title=sc-config.toml
```toml title=sc-config.toml

Copilot uses AI. Check for mistakes.
In the terminal, in the root of the contract, we will run the next command that will generate the proxy for your smart contract:


```
Copy link

Copilot AI Jun 30, 2025

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.

Suggested change
```
```bash

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants