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

Test ID and Hashlock contracts from LigoIDE #27

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

rosalogia
Copy link
Contributor

This PR adds tests for each entrypoint in the ID and Hashlock example contracts found at https://ide.ligolang.org/.

All entrypoints for ID contract are tested so far. In order for them to run to completion or error, some changes had to be made:

  • The implementation of EQ instruction had to be modified. The implementation seemed to take an input value of Int(1) as True and Int(0) as False. However, according to Michelson reference, EQ should return True only if the two values at the top of the stack are equal, and False otherwise. I believe this includes negative values, since otherwise the ID contract does not run.
  • Support for specifying transaction amount had to be added, as certain entrypoints will fail if the transaction amount is not set appropriately

@pkhry pkhry marked this pull request as ready for review October 4, 2022 18:28
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.

2 participants