-
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
Read only methods #1049
Read only methods #1049
Conversation
ContractManifest currentManifest = engine.Snapshot.Contracts.TryGet(engine.CurrentScriptHash)?.Manifest; | ||
|
||
if (currentManifest != null && !currentManifest.CanCall(contract.Manifest, method.GetString())) | ||
if (currentManifest != null && !currentManifest.CanCall(contract.Manifest, methodStr)) |
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.
@neo-project/core @erikzhang current Manifest could be null? i think that it is a MUST
if (currentManifest != null && !currentManifest.CanCall(contract.Manifest, methodStr)) | |
if (currentManifest == null || !currentManifest.CanCall(contract.Manifest, methodStr)) |
public static readonly uint System_Contract_Destroy = Register("System.Contract.Destroy", Contract_Destroy, 0_01000000, TriggerType.Application); | ||
public static readonly uint System_Storage_GetContext = Register("System.Storage.GetContext", Storage_GetContext, 0_00000400, TriggerType.Application); | ||
public static readonly uint System_Contract_Destroy = Register("System.Contract.Destroy", Contract_Destroy, 0_01000000, TriggerType.Application, true); | ||
public static readonly uint System_Storage_GetContext = Register("System.Storage.GetContext", Storage_GetContext, 0_00000400, TriggerType.Application, true); |
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.
@igormcoelho I increased the scope not only for the storages, for destroy, update, and create too
Codecov Report
@@ Coverage Diff @@
## master #1049 +/- ##
==========================================
+ Coverage 61.34% 61.35% +0.01%
==========================================
Files 195 196 +1
Lines 13407 13414 +7
==========================================
+ Hits 8224 8230 +6
- Misses 5183 5184 +1
Continue to review full report at Codecov.
|
* Update VM to last changes * Remove hashes
Wrong rebased, closed in favor of #1052 |
Close #927
TODO: