-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow deploy native contracts in any block (only once) #2056
Conversation
I prefer to use And how do |
I think logic of onPersistScript and postPersistScript should also be changed. |
Remove |
This reverts commit 8ee10c8.
Yes. But let's wait for #2044. |
Ping We need to merge this pr in preview4. |
Ready to review again |
If so, we should add |
|
I think we don't need to deploy it in |
@Tommo-L Then we need GAS in the deploy transaction, and the sender has no gas.... |
No need to charge for the txs in genesis block. |
Why do we need |
Just like a normal contract upgrade, we don't have to worry about the impact of the state, due to the native contract upgrade. |
But the code is not in the |
@@ -6,24 +6,24 @@ namespace Neo.SmartContract | |||
{ | |||
partial class ApplicationEngine | |||
{ | |||
public static readonly InteropDescriptor Neo_Native_Deploy = Register("Neo.Native.Deploy", nameof(DeployNativeContracts), 0, CallFlags.AllowModifyStates, false); | |||
public static readonly InteropDescriptor Neo_Native_Deploy = Register("Neo.Native.Deploy", nameof(DeployNativeContract), 0, CallFlags.AllowModifyStates, false); |
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.
Do we need Neo.Native.Update
? How do we update native contract?
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 that we should do a condition inside the method, and change the method hash in order to include the arguments, in this way we can have method overloads (or just use other name).
I think this can be simplified by using the following model:
This:
|
Please check #2119 |
Close #2055