Port Treasury from N3 to N4 #4341
Merged
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.
Description
Port from #4271
This pull request introduces a new native contract called
Treasuryto 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:
Treasurynative contract inTreasury.cs, including NEP-26 and NEP-27 standards support, payment callbacks (OnNEP17Payment,OnNEP11Payment), and a committee verification method.Treasurycontract as a static property inNativeContract.csfor global access.Test and manifest updates:
UT_NativeContract.csto include theTreasurycontract's manifest, ensuring it is covered in unit tests.TestNativeContractId()to verify the correct IDs for both the newTreasuryand existing contracts.How Has This Been Tested?
Checklist: