neo-go/pkg/smartcontract/call_flags.go
Anna Shaleva fadbae8997 core: rename call flags
Also new States flag is added and ReadOnly flag is adjusted.
2020-12-11 10:34:01 +03:00

22 lines
469 B
Go

package smartcontract
// CallFlag represents call flag.
type CallFlag byte
// Default flags.
const (
ReadStates CallFlag = 1 << iota
WriteStates
AllowCall
AllowNotify
States = ReadStates | WriteStates
ReadOnly = ReadStates | AllowCall
All = States | AllowCall | AllowNotify
NoneFlag CallFlag = 0
)
// Has returns true iff all bits set in cf are also set in f.
func (f CallFlag) Has(cf CallFlag) bool {
return f&cf == cf
}