Skip to content
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

Docs: Fixed the Cheatcodes Error In Docs #3133

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

OWK50GA
Copy link

@OWK50GA OWK50GA commented Mar 21, 2025

Closes #3106

Introduced changes

Updated target: ContractAddress in cheatcodes section of docs to contract_address: ContractAddress, making sure to do this where it was appropriate by looking into the snforge_std

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • Added changes to CHANGELOG.md

@OWK50GA OWK50GA requested a review from a team as a code owner March 21, 2025 15:11
@OWK50GA OWK50GA requested review from ddoktorski and kkawula March 21, 2025 15:11
Copy link
Member

@kkawula kkawula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each of edited docs should also contain these changes.

@@ -3,7 +3,7 @@
Cheatcodes modifying `block_number`:

## `cheat_block_number`
> `fn cheat_block_number(target: ContractAddress, block_number: u64, span: CheatSpan)`
> `fn cheat_block_number(contract_address: ContractAddress, block_number: u64, span: CheatSpan)`

Changes the block number for the given target and span.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Changes the block number for the given target and span.
Changes the block number for the given contract address and span.

@@ -13,12 +13,12 @@ Changes the block number for the given target and span.
Changes the block number for all targets.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Changes the block number for all targets.
Changes the block number for all contracts.

@@ -13,12 +13,12 @@ Changes the block number for the given target and span.
Changes the block number for all targets.

## `start_cheat_block_number`
> `fn start_cheat_block_number(target: ContractAddress, block_number: u64)`
> `fn start_cheat_block_number(contract_address: ContractAddress, block_number: u64)`

Changes the block number for the given target.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Changes the block number for the given target.
Changes the block number for the given contract address.


Changes the block number for the given target.

## `stop_cheat_block_number`
> `fn stop_cheat_block_number(target: ContractAddress)`
> `fn stop_cheat_block_number(contract_address: ContractAddress)`

Cancels the `cheat_block_number` / `start_cheat_block_number` for the given target.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Cancels the `cheat_block_number` / `start_cheat_block_number` for the given target.
Cancels the `cheat_block_number` / `start_cheat_block_number` for the given contract address.

@OWK50GA OWK50GA requested a review from kkawula March 26, 2025 03:47
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.

Update signatures in cheatcodes docs
2 participants