-
Notifications
You must be signed in to change notification settings - Fork 1k
[N3] Init Treasury #4271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[N3] Init Treasury #4271
Conversation
|
What is the purpose of this native contract? |
2.4 Neo4 roadmap said:
So we will need a treasury contract, isn't it? |
vncoelho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks like to be a good idea.
|
OK, it's a good idea. |
Co-authored-by: Erik Zhang <[email protected]>
AnnaShaleva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit-tests are failing.
a2c003b
|
moved to N3, ready for review @neo-project/core |
|
@erikzhang shall this be ported to N4? |
|
Please port to N4. |
Description
This pull request introduces a new native contract called
Treasuryto the Neo smart contract platform and integrates it into the codebase. Unit tests are updated to cover the new contract and its identifier.New Treasury contract integration:
Treasurynative contract implementation inTreasury.cs, including NEP-26 and NEP-27 support, payment callbacks, and committee verification logic.Treasurycontract as a static property inNativeContract.cs, making it accessible like other native contracts.Treasurycontract definition and manifest for unit testing.Treasurycontract ID (-11).Bonus calculation refactor:
CalculateBonusmethod ofNeoToken.csfromsumNeoHoldtosumGasPerBlockfor improved clarity and consistency, and updated the return statement accordingly. [1] [2]Type of change
How Has This Been Tested?
Checklist: