interop: allow to call CheckWitness without AllowStates

State access is needed only in specific circumstances.
This commit is contained in:
Evgenii Stratonikov 2020-08-24 13:18:02 +03:00
parent b4bcd23c0f
commit f6319f80e8
2 changed files with 8 additions and 1 deletions

View file

@ -77,7 +77,7 @@ var systemInterops = []interop.Function{
{Name: interopnames.SystemJSONDeserialize, Func: json.Deserialize, Price: 500000, ParamCount: 1},
{Name: interopnames.SystemJSONSerialize, Func: json.Serialize, Price: 100000, ParamCount: 1},
{Name: interopnames.SystemRuntimeCheckWitness, Func: runtime.CheckWitness, Price: 30000,
RequiredFlags: smartcontract.AllowStates, ParamCount: 1},
RequiredFlags: smartcontract.NoneFlag, ParamCount: 1},
{Name: interopnames.SystemRuntimeGasLeft, Func: runtime.GasLeft, Price: 400},
{Name: interopnames.SystemRuntimeGetCallingScriptHash, Func: engineGetCallingScriptHash, Price: 400},
{Name: interopnames.SystemRuntimeGetEntryScriptHash, Func: engineGetEntryScriptHash, Price: 400},