Skip to content

Integration tests for wasm queries#121

Merged
TxCorpi0x merged 3 commits into
masterfrom
mehdi/wasm-integration-tests-query
Apr 10, 2026
Merged

Integration tests for wasm queries#121
TxCorpi0x merged 3 commits into
masterfrom
mehdi/wasm-integration-tests-query

Conversation

@TxCorpi0x

@TxCorpi0x TxCorpi0x commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request enhances the WASM integration tests for fungible and non-fungible token modules by adding comprehensive query tests for both token types. These changes ensure that the WASM smart contracts can correctly query and return on-chain state for a variety of scenarios, improving test coverage and reliability.

Fungible Token Query Enhancements:

  • Added new query methods for fungible tokens, including params, token, tokens, balance, frozen_balance, and whitelisted_balance, and updated the ftMethod type accordingly.
  • Implemented tests in TestWASMFungibleTokenInContract to verify WASM contract queries for token parameters, token info, tokens by issuer, account balances, frozen balances, and whitelisted balances. These tests check the correctness of query responses against expected values.
  • Introduced the issuerBodyFTRequest struct to support issuer-based queries.

Non-Fungible Token Query Enhancements:

  • Added a test in TestWASMNonFungibleTokenInContract to verify querying the owner of an NFT via WASM contract, ensuring correct serialization and response handling for NFT ownership queries.

Reviewers checklist:

  • Try to write more meaningful comments with clear actions to be taken.
  • Nit-picking should be unblocking. Focus on core issues.

Authors checklist

  • Provide a concise and meaningful description
  • Review the code yourself first, before making the PR.
  • Annotate your PR in places that require explanation.
  • Think and try to split the PR to smaller PR if it is big.

This change is Reviewable

@TxCorpi0x TxCorpi0x requested a review from a team as a code owner April 9, 2026 06:06
@TxCorpi0x TxCorpi0x requested review from masihyeganeh, metalarm10, miladz68 and ysv and removed request for a team April 9, 2026 06:06
@TxCorpi0x TxCorpi0x merged commit b192afd into master Apr 10, 2026
13 of 14 checks passed
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