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

chore: add full abi coder tests #3349

Merged
merged 67 commits into from
Nov 25, 2024

Conversation

petertonysmith94
Copy link
Contributor

@petertonysmith94 petertonysmith94 commented Oct 21, 2024

Summary

  • We have added a fully featured contract (abi-contract) that takes fixed inputs and returns an expected value.
    • As @nedsalk mentioned, Sway performs some precompilation.
  • We have implemented tests for each of the contract functions, and we are currently using our existing encoding package, @fuel-ts/abi-coder.
    • This setup will enable us to swap out the Interface for our newly refactored package with complete confidence and no risk of regression.
  • I have introduced a new custom Vitest matcher, toEqualBn, to simplify the validation of returned BN values.

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link
Contributor

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

Woah, great work! Few comments

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
76.86%(+0%) 70.52%(+0%) 75.09%(+0%) 76.96%(+0%)
Changed Files:

Coverage values did not change👌.

@petertonysmith94 petertonysmith94 merged commit 6061481 into master Nov 25, 2024
25 checks passed
@petertonysmith94 petertonysmith94 deleted the ps/chore/add-full-abi-coder-tests branch November 25, 2024 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants