Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all. This PR adds fixes for #34 and weiroll/weiroll#56. It checks whether the array/tuple is fixed size or dynamic. If it's fixed, the parameter's value is broken up into 32 byte chunks and set as individual values in the
state
array. I've added some tests to confirm the functionality.As far as I can tell this only works for literal values, if I attempt to pass a return value into an array or tuple I get this error:
Error: invalid BigNumber value...
since we're passing a ReturnValue object into the contract's function instead of a BigNumber. I suspect this requires further changes to theContract
type provided by planner.ts. Although I'm unsure what exactly is needed to fix this. Should I make this a separate issue or would you like it resolve in this PR?