diff --git a/cli/smartcontract/smart_contract.go b/cli/smartcontract/smart_contract.go index ecfec8a46..24864d41b 100644 --- a/cli/smartcontract/smart_contract.go +++ b/cli/smartcontract/smart_contract.go @@ -451,7 +451,7 @@ func initSmartContract(ctx *cli.Context) error { } gm := []byte("module " + contractName + ` require ( - github.com/nspcc-dev/neo-go latest + github.com/nspcc-dev/neo-go/pkg/interop latest )`) if err := ioutil.WriteFile(filepath.Join(basePath, "go.mod"), gm, 0644); err != nil { return cli.NewExitError(err, 1) diff --git a/go.mod b/go.mod index 68221c1f6..472616a1e 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/mr-tron/base58 v1.2.0 github.com/nspcc-dev/dbft v0.0.0-20210721160347-1b03241391ac github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20220114100620-29afa8e7b512 github.com/nspcc-dev/neofs-sdk-go v0.0.0-20220113123743-7f3162110659 github.com/nspcc-dev/rfc6979 v0.2.0 github.com/pierrec/lz4 v2.6.1+incompatible @@ -28,4 +29,6 @@ require ( gopkg.in/yaml.v2 v2.4.0 ) +replace github.com/nspcc-dev/neo-go/pkg/interop => ./pkg/interop + go 1.15 diff --git a/pkg/interop/go.mod b/pkg/interop/go.mod new file mode 100644 index 000000000..44cb08c10 --- /dev/null +++ b/pkg/interop/go.mod @@ -0,0 +1,3 @@ +module github.com/nspcc-dev/neo-go/pkg/interop + +go 1.15 \ No newline at end of file diff --git a/pkg/vm/cli/cli_test.go b/pkg/vm/cli/cli_test.go index 981cc040c..e31af479d 100644 --- a/pkg/vm/cli/cli_test.go +++ b/pkg/vm/cli/cli_test.go @@ -167,7 +167,6 @@ func (e *executor) checkSlot(t *testing.T, items ...interface{}) { } func TestLoad(t *testing.T) { - t.Skip() script := []byte{byte(opcode.PUSH3), byte(opcode.PUSH4), byte(opcode.ADD)} t.Run("loadhex", func(t *testing.T) { e := newTestVMCLI(t) @@ -240,9 +239,9 @@ go 1.15`) require.NoError(t, err) goMod := []byte(`module test.example/kek require ( - github.com/nspcc-dev/neo-go v0.0.0 + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0 ) -replace github.com/nspcc-dev/neo-go => ` + filepath.Join(wd, "../../..") + ` +replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../interop") + ` go 1.15`) require.NoError(t, ioutil.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm))