compiler: make pkg/interop a separate module
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
548a6a06f1
commit
25583f9aeb
4 changed files with 9 additions and 4 deletions
|
@ -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)
|
||||
|
|
3
go.mod
3
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
|
||||
|
|
3
pkg/interop/go.mod
Normal file
3
pkg/interop/go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module github.com/nspcc-dev/neo-go/pkg/interop
|
||||
|
||||
go 1.15
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue