-
Notifications
You must be signed in to change notification settings - Fork 134
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
🔨 Updating state.ts to deprecate existing precondition apis and updating them with new #1263
Conversation
As discussed in issue o1-labs#1247 , I have replaced old api by deprecating them rather than removing. Question: Do we need to update this `assertStatePrecondition` too ? Please review and let know if anything else is required.
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.
Very nice! If you're up for it, two things are needed as a follow-up (feel free to do this in a later PR)
- update
/src/examples
- maybe grep for.getAndAssertEquals
etc, check if it's now deprecated and replace with require version - add an entry to
CHANGELOG.md
(under## Changed
) about this change
src/lib/state.ts
Outdated
assertEquals(state: T) { | ||
if (this._contract === undefined) |
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.
It would be nice if you could get rid of the code duplication, by making the assert*
methods just call the require*
versions. Something like
assertEquals(state: T) {
return this.requireEquals(state);
}
etc
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.
Hi @mitschabaude ,
As discussed above I have removed the duplicate code by making assert* call the require* version.
Please let me know if any change is required.
Thank You 😃
Hi @mitschabaude , As discussed above I have removed the duplicate code by making assert* call the require* version. Also, I am making changes to CHANGELOG.md for first time so can you please help to review it. I have added change in Unreleased for now. Let me know if we need move it. Please let me know if any change is required. Thank You 😃 |
Hi @mitschabaude ,
As discussed in issue #1247 , I have replaced old api by deprecating them rather than removing.
Question:
Please review and let know if any changes are required.