Skip to content

test: add contract-side coverage for maxAutomaticTokenAssociations = -1 - #1779

Merged
Dosik13 merged 3 commits into
mainfrom
feat/1778-contract-max-auto-associations-tests
Jul 21, 2026
Merged

test: add contract-side coverage for maxAutomaticTokenAssociations = -1#1779
Dosik13 merged 3 commits into
mainfrom
feat/1778-contract-max-auto-associations-tests

Conversation

@Dosik13

@Dosik13 Dosik13 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description:

Add tests for the HIP-904 "unlimited" auto-association sentinel (-1) on the
contract entry points. The value already round-trips and works today, but only
the account path was tested — the contract path (including the Int32Value
wrapper on update and the != 0 sentinel guard in the flow) was unverified.
Additive tests only; no production change.

  • Add ContractCreateTransaction unit test — -1 survives the proto round-trip as a plain int32
  • Add ContractUpdateTransaction unit test — -1 survives inside the Int32Value wrapper (wrapper non-nil)
  • Add ContractCreateFlow unit test — -1 propagates to the inner create tx, pinning the != 0 guard
  • Add e2e test — a contract created with -1 auto-associates two distinct fungible tokens with no explicit association
  • Add e2e test — ContractUpdateTransaction to -1, verified via ContractInfoQuery

Related issue(s):

Fixes #1778

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: dosi <dosi.kolev@limechain.tech>
@Dosik13
Dosik13 requested review from a team as code owners July 20, 2026 08:20
@Dosik13
Dosik13 requested a review from gsstoykov July 20, 2026 08:20
@lfdt-bot

lfdt-bot commented Jul 20, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dosik13
Dosik13 merged commit bedae22 into main Jul 21, 2026
16 checks passed
@Dosik13
Dosik13 deleted the feat/1778-contract-max-auto-associations-tests branch July 21, 2026 08:13
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.

Add contract-side test coverage for maxAutomaticTokenAssociations = -1

3 participants