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: Changes serialization for contract functions #1056

Merged
merged 18 commits into from
Apr 4, 2023

Conversation

kevaundray
Copy link
Contributor

Related issue(s)

Resolves #

Description

This makes the serialization for contract functions more inline with the specs

Summary of changes

Dependency additions / changes

Test additions / changes

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.

Additional context

@kevaundray kevaundray changed the title Changes serialization for contract functions feat: Changes serialization for contract functions Mar 28, 2023
Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

Can you add a link to the spec so I can check that it conforms?

@kevaundray
Copy link
Contributor Author

Can you add a link to the spec so I can check that it conforms?

Yep, so we are trying to make them look closer to the mock contracts here, whichb I am regarding as specs: https://github.com/AztecProtocol/aztec3-packages/blob/master/yarn-project/noir-contracts/src/examples/zk_token_contract.json

It won't conform entirely, I ran through the changes with Joe before submitting them to check that it is closer to what they need. Noting the camel case and the fact that we have an array of functions.

Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

Generally looks fine to me. It would be nice to have a test which deserialises and reserialises an example contract artifact.

Flagged up a couple of differences in spec, no action needed as you say we don't expect to conform 100% but I want to make sure they're known.

Can merge once tests are passing and vecmap is dealt with.

crates/noirc_driver/src/contract.rs Show resolved Hide resolved
crates/noirc_driver/src/contract.rs Show resolved Hide resolved
crates/noirc_driver/src/lib.rs Outdated Show resolved Hide resolved
crates/nargo_cli/src/cli/preprocess_cmd.rs Outdated Show resolved Hide resolved
crates/noirc_driver/src/contract.rs Outdated Show resolved Hide resolved
crates/nargo_cli/src/cli/compile_cmd.rs Show resolved Hide resolved
TomAFrench
TomAFrench previously approved these changes Apr 4, 2023
Copy link
Member

@TomAFrench TomAFrench left a comment

Choose a reason for hiding this comment

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

LGTM

crates/nargo_cli/src/cli/compile_cmd.rs Outdated Show resolved Hide resolved
Merged via the queue into master with commit 41e0020 Apr 4, 2023
@kevaundray kevaundray deleted the kw/change-contract-func-ser branch April 4, 2023 19:01
TomAFrench added a commit that referenced this pull request Apr 5, 2023
* master:
  feat: Changes serialization for contract functions (#1056)
  chore: move `allow(dead_code)` to only cover `CyclicDependenciesError` (#1093)
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.

2 participants