Skip to content

Conversation

@shargon
Copy link
Member

@shargon shargon commented Nov 25, 2025

Description

Port from #4271

This pull request introduces a new native contract called Treasury to the Neo blockchain codebase. The contract is designed to manage treasury funds and includes standard payment and verification methods. The changes also ensure that the new contract is properly instantiated and tested alongside other native contracts.

New native contract addition:

  • Added the implementation of the Treasury native contract in Treasury.cs, including NEP-26 and NEP-27 standards support, payment callbacks (OnNEP17Payment, OnNEP11Payment), and a committee verification method.
  • Registered the Treasury contract as a static property in NativeContract.cs for global access.

Test and manifest updates:

  • Updated the test setup in UT_NativeContract.cs to include the Treasury contract's manifest, ensuring it is covered in unit tests.
  • Added assertions in TestNativeContractId() to verify the correct IDs for both the new Treasury and existing contracts.

How Has This Been Tested?

  • Unit Testing
  • Run Application
  • Local Computer Tests
  • No Testing

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

@github-actions github-actions bot added the N4 label Nov 25, 2025
@shargon shargon merged commit 43d178e into neo-project:master Nov 26, 2025
7 checks passed
@shargon shargon deleted the treasury-n4 branch November 26, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants