mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-07 05:07:36 +00:00
smartcontract: move flags to a separate package
This commit is contained in:
parent
36b5751262
commit
dbe81f9b80
29 changed files with 182 additions and 171 deletions
|
@ -15,7 +15,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/bigint"
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
||||
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
||||
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -114,7 +114,7 @@ func testSyscallHandler(v *VM, id uint32) error {
|
|||
case 0x77777777:
|
||||
v.Estack().PushVal(stackitem.NewInterop(new(int)))
|
||||
case 0x66666666:
|
||||
if !v.Context().callFlag.Has(smartcontract.ReadOnly) {
|
||||
if !v.Context().callFlag.Has(callflag.ReadOnly) {
|
||||
return errors.New("invalid call flags")
|
||||
}
|
||||
v.Estack().PushVal(stackitem.NewInterop(new(int)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue