Repository navigation
executor: report v2 and inherited token standards to the API - #9
Merged
Merged
Conversation
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.
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SmartContractAnalyzer.defineTokenStandardcompared only the interfaces the contract class declares itself with the v0/v1 token standards (equals), andTokenStandardIdhas 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.TokenStandardIdorder).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 tokensContractExecutorTest(external calls) as on the base branch, nothing newci/contracts/executor_harness.py, ci: token smart contract tests (executor harness and private testnet) node#127):BasicV2reported 3 here, 0 on the release executor; every other answer identical🤖 Generated with Claude Code