Skip to content

executor: report v2 and inherited token standards to the API - #9

Merged
EnzinoBB merged 1 commit into
build/reproducible-1518from
fix/token-standard-detection
Oct 30, 2026
Merged

EnzinoBB merged 1 commit into
build/reproducible-1518from
fix/token-standard-detection

Conversation

@EnzinoBB

Copy link
Copy Markdown
Collaborator

Summary

SmartContractAnalyzer.defineTokenStandard compared only the interfaces the contract class declares itself with the v0/v1 token standards (equals), and TokenStandardId has no v2 entries. A token implementing the v2 interfaces of sc-api-support (com.credits.scapi.v2.BasicTokenStandard / ExtensionTokenStandard, which extend the v1 ones), or a standard reached through a superinterface, was reported as not a token (0), and the node's token cache ignores it.

  • A v0/v1 standard the class declares keeps exactly the id build 1518 gives (same first match in TokenStandardId order).
  • Otherwise the most specific standard the class implements at all is reported: extension v1 (4), basic v1 (3), extension v0 (2), basic v0 (1).

The token standard is read only by the node's API (getContractMethods → token cache, SmartContractCompile), never by contract execution: no consensus effect.

Test plan

  • TokenStandardTest: declared standards keep the 1518 ids (also a class declaring two), v2 and inherited standards are tokens
  • Unit tests: the same 8 pre-existing failures of ContractExecutorTest (external calls) as on the base branch, nothing new
  • Node repo harness (ci/contracts/executor_harness.py, ci: token smart contract tests (executor harness and private testnet) node#127): BasicV2 reported 3 here, 0 on the release executor; every other answer identical
  • CI

🤖 Generated with Claude Code

defineTokenStandard compared only the interfaces the contract class declares with the
v0/v1 standards, so a token implementing the v2 interfaces of sc-api-support, or a
standard through its own superinterface, was reported as not a token (0) and the
node's token cache ignored it. A declared v0/v1 standard keeps the id build 1518 gives;
otherwise the most specific standard the class implements is reported. The token
standard is read only by the API (getContractMethods), never by contract execution.
@EnzinoBB
EnzinoBB merged commit bdcbe0d into build/reproducible-1518 Oct 30, 2026
4 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.

1 participant