-
Notifications
You must be signed in to change notification settings - Fork 12
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
Permisions precondition #306
Draft
Geometer1729
wants to merge
121
commits into
develop
Choose a base branch
from
brian/permisions-precondition
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…and base field params
…t token usage permissions The MayUseToken type and object were added to represent the permissions for token usage in a transaction. It includes two boolean fields: parentsOwnToken to indicate if the parent owns the token, and inheritFromParent to specify if the token usage should be inherited from the parent. The check method was also added to enforce the constraint that a transaction cannot both have the parent own the token and inherit the token usage from the parent at the same time. This addition provides a structured way to handle token usage permissions within the transaction leaves.
- Check if parentsOwnToken and inheritFromParent are instances of Bool - Throw an error if the fields are not of type Bool - This ensures that the correct types are passed to the MayUseToken object, preventing potential runtime errors due to incorrect types being used in the check function
…ermissions The MayUseToken type was added to the derivedLeafTypesSignable function to represent the token usage permissions for a zkApp account. It includes two boolean fields: - parentsOwnToken: indicates if the parent account owns the token - inheritFromParent: indicates if the token usage permission should be inherited from the parent account This allows for more granular control over token usage permissions in zkApp accounts. feat(transaction-leaves): export MayUseToken type in transaction leaf type definitions The MayUseToken type is now exported from the transaction-leaves-bigint.ts and transaction-leaves-json.ts files. This makes the type available for use in other parts of the project that deal with transaction leaves and zkApp account permissions. feat(gen): include MayUseToken in generated transaction types The generated transaction types in transaction-bigint.ts and transaction.ts now include the MayUseToken type in the CustomTypes definition. This ensures that the MayUseToken type is properly integrated into the generated transaction types and can be used when working with transactions.
…en fields The type checking for the `parentsOwnToken` and `inheritFromParent` fields in the `MayUseToken` object has been simplified. Instead of using an `if` statement with multiple conditions and throwing an error, the code now uses the `Bool.check()` method to ensure that each field is of type `Bool`. This change improves code readability and maintainability by utilizing the built-in type checking functionality provided by the `Bool` class.
…ify MayUseToken type The createMayUseToken function was removed as it was not providing any additional functionality. The MayUseToken type was simplified to directly use the signable function with the parentsOwnToken and inheritFromParent fields of type Bool. This change reduces the complexity of the code without changing its behavior.
[v2] Fix MayUseToken vulnerability in AccountUpdates
Canonical representation of provable types
Merge main into v2
Merge main -> v2
Merge main into v2 to fix CI
…ests Regenerate bindings w.r.t. proof-systems update (external prover rng)
fix git diff to include .wasm files
Treat devnet and testnet as the same networkId
Handle whole domain commitment by pointer
Bring mina/compatible up to date
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bindings portion of o1-labs/o1js#1862