Skip to content

Conversation

@ascjones
Copy link
Collaborator

Currently if you forget to supply --args to an instantiate/call, it will fail with a trap because of invalid input. e.g calling a constructor which has args but forgetting to add --args:

contract contract instantiate --suri //Alice

This PR adds a simple check which validates the number of args supplied is equal to the expected number of arguments to the ink! constructor or message.

@ascjones ascjones added the bug Something isn't working label Feb 10, 2023
Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

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

Nice!

@ascjones ascjones merged commit fded85c into master Feb 13, 2023
@ascjones ascjones deleted the aj/check-missing-args branch February 13, 2023 12:46
@ascjones ascjones mentioned this pull request Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants