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

Open
wants to merge 64 commits into
base: master
Choose a base branch
from

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

Coverage Report:

Lines Branches Functions Statements
64.13%(+0%) 69.71%(+0%) 72.66%(+0%) 64.57%(+0%)
Changed Files:

Coverage values did not change👌.

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.

3 participants