core: specify allowed triggers for interops

Related #1026, #1027, #1028, #1031.
This commit is contained in:
Evgenii Stratonikov 2020-06-10 18:07:21 +03:00
parent 4dfce07d11
commit 971ab0646f
4 changed files with 46 additions and 36 deletions

View file

@ -56,6 +56,8 @@ type Function struct {
Name string
Func func(*Context, *vm.VM) error
Price int
// AllowedTriggers is a set of triggers which are allowed to initiate invocation.
AllowedTriggers trigger.Type
// RequiredFlags is a set of flags which must be set during script invocations.
// Default value is NoneFlag i.e. no flags are required.
RequiredFlags smartcontract.CallFlag