Skip to content

feat: remove Context::init helper (#101) #102

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

Merged
merged 3 commits into from
Jul 10, 2025

Conversation

raymax0x
Copy link
Contributor

This PR removes the obsolete Context::init testing helper, now redundant thanks to Stylus contract constructors.

  • Deleted the helper from crates/motsu/src/context.rs.
  • Verified that no workspace code depends on it and the remaining init
  • Added a CHANGELOG entry under Unreleased documenting the removal (breaking change mitigated by constructors).

Resolves #101

PR Checklist

  • Tests – existing suite still passes after rebuild (no functional changes).
  • Documentation – N/A (helper was internal; CHANGELOG updated).
  • Changelog – entry added under Unreleased.

* feat: remove `Context::init` helper

This commit removes the `Context::init` helper function.
The `Context::init` helper is replaced by contract constructors.

* docs: update CHANGELOG.md
Copy link
Collaborator

@0xNeshi 0xNeshi left a comment

Choose a reason for hiding this comment

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

Nice, just make this one change and we can merge

CHANGELOG.md Outdated
@@ -9,6 +9,9 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

## [Unreleased]

### Removed
- `Context::init` helper (replaced by contract constructors – see issue #101)
Copy link
Collaborator

Choose a reason for hiding this comment

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

The current convention is to place any removals under Changed (Breaking). Also, add number of the PR in which this was introduced (see other logs here as example).

Copy link
Contributor Author

@raymax0x raymax0x Jul 1, 2025

Choose a reason for hiding this comment

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

Thankyou for the review. Fixed in this commit.

Copy link
Collaborator

@0xNeshi 0xNeshi left a comment

Choose a reason for hiding this comment

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

good job

Copy link
Collaborator

@bidzyyys bidzyyys left a comment

Choose a reason for hiding this comment

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

LGTM!

@bidzyyys bidzyyys merged commit c8b0c3b into OpenZeppelin:main Jul 10, 2025
8 checks passed
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.

[Feature]: Remove fn init
3 participants