Skip to content

Conversation

@ajara87
Copy link
Member

@ajara87 ajara87 commented Oct 28, 2025

Description

  • Add circular reference detection for namedtypes in ContractAbi. This validation needs global visibility of all namedtype relations, so it is implemented at the ABI level.
  • Tests coverage for circular references:
    • A => A. Invalid
    • A => B, B => A. Invalid
    • A => B => C => A. Invalid
    • A => B => C => B. Invalid
    • A => value, B => A, C => A. Valid
    • A => value, value => A. Valid
    • A => value, value => B | B => value, value => A. Valid
    • A => B => C. Valid

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • FromJson_Circular_Reference_A_A_ShouldThrow
  • FromJson_Circular_Reference_A_B_B_A_ShouldThrow
  • FromJson_Circular_Reference_A_B_C_A_ShouldThrow
  • FromJson_Circular_Reference_A_B_C_B_ShouldThrow
  • FromJson_No_Circular_Reference_A_B_C
  • FromJson_Circular_Reference_A_NO_B_A_C_A
  • FromJson_Circular_Reference_A_VALUE_A
  • FromJson_Circular_Reference_A_VALUE_B_B_VALUE_A

Test Configuration:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ajara87 ajara87 requested a review from shargon October 28, 2025 22:16
Copy link
Member

@shargon shargon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test for
A
B-> A
C-> A

@ajara87
Copy link
Member Author

ajara87 commented Oct 29, 2025

Could you add a test for A B-> A C-> A

added

@ajara87 ajara87 requested a review from shargon October 29, 2025 17:11
@ajara87 ajara87 requested a review from shargon October 29, 2025 22:56
@shargon shargon merged commit 0c5d4c6 into neo-project:nep-25 Oct 30, 2025
7 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