Skip to content

test(utils): cover sorobanConverter and contractArgsBuilder boundaries - #734

Merged
Calebux merged 1 commit into
zintarh:mainfrom
Richkid2:test/soroban-converter-args-builder
Oct 1, 2026
Merged

Calebux merged 1 commit into
zintarh:mainfrom
Richkid2:test/soroban-converter-args-builder

Conversation

@Richkid2

Copy link
Copy Markdown
Contributor

Closes #640

Adds direct tests for src/utils/sorobanConverter.ts and
src/utils/contractArgsBuilder.ts:

  • every supported type (address, u32/i32/u64/i64/u128/i128, symbol, string,
    bool, bytes, vec, map) with boundary values: i128 min/max, values beyond
    Number.MAX_SAFE_INTEGER, empty bytes, 32/33-char symbols
  • toScVal -> fromScVal round trips
  • rejection of unsupported input with clear errors
  • argument order, count and ScVal types for each builder

Known bugs are documented with it.fails (they pass while the bug exists and
fail once it is fixed, at which point they should become it):

  • objectToScValMap does not sort keys (Soroban host requires sorted maps)
  • toScVal(Uint8Array) is inferred as a map, not bytes
  • 64/128-bit converters silently coerce null/true/""/[] and floor fractions
  • i128 from a decimal string loses precision past 2^53
  • bytesToScVal accepts strings

Note: tests were written without a local run; please check CI.
#640

@vercel

vercel Bot commented Sep 29, 2026

Copy link
Copy Markdown

@Richkid2 is attempting to deploy a commit to the zintarh Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 29, 2026

Copy link
Copy Markdown

@Richkid2 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Calebux
Calebux merged commit 75dc233 into zintarh:main Oct 1, 2026
1 check failed
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.

fix(stellar): sorobanConverter and contractArgsBuilder have no direct tests

2 participants