-
Notifications
You must be signed in to change notification settings - Fork 1k
[N4] 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
base: master
Are you sure you want to change the base?
[N4] 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.
| /// <param name="tokenId">Nep11 token Id</param> | ||
| /// <param name="data">Optional data</param> | ||
| [ContractMethod(CpuFee = 1 << 15, RequiredCallFlags = CallFlags.States)] | ||
| private void OnNEP11Payment(ApplicationEngine engine, UInt160 from, BigInteger amount, byte[] tokenId, StackItem data) { } |
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.
1<<15 for an empty payment callback?
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.
We can use just 1
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.
@AnnaShaleva do you have a cost estimation of empty calls?
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.
Not yet, but we may include native method prices evaluation to nspcc-dev/neo-go#4043. @Turalchik is working on this issue right now.
For now I agree to use 1, later we may upgrade prices in a subsequent hardfork once benchmarks are done.
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.
Ref. nspcc-dev/neo-go#4043 (comment), ref. #3894.
Description
Part of the N4 changes, this is focus in the treasury content, no more changes wanted like reward this contract.
Type of change
How Has This Been Tested?
Checklist: