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(abi)!: add explicit return type field to ABI. #865

Merged
merged 11 commits into from
Feb 17, 2023
Merged

Conversation

TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Feb 17, 2023

Related issue(s)

Resolves #678

Description

Summary of changes

Draft pending proper error types.

The ABI now has separate fields for the type and witness assignments of the return value. As a know on effect, the circuit's return value is now no longer included in the InputMap and so is taken as a separate argument to Abi.encode and returned separately by Abi.decode.

Some care needs to be taken now when checking to see if an ABI contains a public input as this could either be a public param or a return value, whereas previously we could just search abi.parameters for a public parameter. I've added a getter to perform this check for us.

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.
  • This PR requires documentation updates when merged.

Additional context

@TomAFrench TomAFrench marked this pull request as ready for review February 17, 2023 14:59
crates/noirc_abi/src/lib.rs Outdated Show resolved Hide resolved
crates/noirc_abi/src/lib.rs Outdated Show resolved Hide resolved
@kevaundray kevaundray added this pull request to the merge queue Feb 17, 2023
Merged via the queue into master with commit 8ca5676 Feb 17, 2023
@kevaundray kevaundray deleted the abi-return-type branch February 17, 2023 20:03
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.

Add an explicit return type field into ABI
2 participants