Add more readable serialisation of InputValue
s representing boolean values.
#1324
Closed
1 task done
Labels
Problem
Currently we allow users to set boolean arguments in the toml files as a
true
/false
value. However whennoirc_abi
saves them to file, they all get converted to0x0000000000000000000000000000000000000000000000000000000000000001
or0x0000000000000000000000000000000000000000000000000000000000000000
.This isn't particularly readable, ideally we'd preserve the "booleanness" of these args rather than treating them as arbitrary fields.
Proposed solution
The reason for this issue is that
InputValue
represents all of fields, integers and bools asInputValue::Field
.noir/crates/noirc_abi/src/input_parser/mod.rs
Lines 14 to 19 in 260d87d
We could address this by either adding a
InputValue::Boolean
variant or passing the ABI into the serialisation method similarly to how we do for parsing.Alternatives considered
No response
Additional context
No response
Submission Checklist
The text was updated successfully, but these errors were encountered: