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

feat: Implement 'open' and 'unconstrained' keywords #1037

Merged
merged 8 commits into from
Mar 27, 2023
Merged

Conversation

jfecher
Copy link
Contributor

@jfecher jfecher commented Mar 24, 2023

Related issue(s)

Resolves #(none)

Description

Summary of changes

Adds the 'open' and 'unconstrained' keywords for contract visibility. These keywords are mutually exclusive and functions with neither keyword are considered to be 'secret' by default. It is an error for functions outside of a contract to specify that they are open or unconstrained (though we may allow unconstrained functions in the future).

These keywords currently do nothing until #1033 is merged, when they will only set the is_secret option in the resulting JSON after compiling a contract.

Dependency additions / changes

None

Test additions / changes

None

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Documentation needs

  • This PR requires documentation updates when merged.

Once we document contracts, we will need to document that they can be secret (the default, no keyword), open, or unconstrained.

Additional context

@jfecher jfecher changed the title Implement 'open' and 'unconstrained' keywords feat: Implement 'open' and 'unconstrained' keywords Mar 27, 2023
vezenovm
vezenovm previously approved these changes Mar 27, 2023
Copy link
Contributor

@vezenovm vezenovm left a comment

Choose a reason for hiding this comment

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

Just one nit

vezenovm
vezenovm previously approved these changes Mar 27, 2023
@jfecher jfecher enabled auto-merge March 27, 2023 15:08
@jfecher jfecher added this pull request to the merge queue Mar 27, 2023
Merged via the queue into master with commit 5a66dec Mar 27, 2023
@jfecher jfecher deleted the jf/more-modifiers branch March 27, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants