Skip to content

Commit

Permalink
fix: allow abi encoding tuples from JS (#3894)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

We currently disallow abi encoding tuples which contain a mix of
primitive types, arrays and structs due to the types which have been
applied. This PR loosens the types so that we can pass a mix of these
types as a tuple.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench committed Dec 21, 2023
1 parent d025731 commit f7fa181
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"cpus",
"cranelift",
"curvegroup",
"databus",
"deflatten",
"deflattened",
"deflattening",
Expand Down
2 changes: 1 addition & 1 deletion tooling/noirc_abi_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use js_witness_map::JsWitnessMap;
#[wasm_bindgen(typescript_custom_section)]
const INPUT_MAP: &'static str = r#"
export type Field = string | number | boolean;
export type InputValue = Field | Field[] | InputMap | InputMap[];
export type InputValue = Field | InputMap | (Field | InputMap)[];
export type InputMap = { [key: string]: InputValue };
"#;

Expand Down

0 comments on commit f7fa181

Please sign in to comment.