From 90b01bcea65c5e4f398a6b74f5a8ff1b981c4c4a Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Sat, 8 Jul 2023 13:48:52 +0300 Subject: [PATCH 1/4] core: move SignersToStackItem to transaction package It will be reused from interops. Signed-off-by: Anna Shaleva --- pkg/core/native/ledger.go | 30 +----------------------------- pkg/core/transaction/signer.go | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/pkg/core/native/ledger.go b/pkg/core/native/ledger.go index ba21a3487..6a1d43a22 100644 --- a/pkg/core/native/ledger.go +++ b/pkg/core/native/ledger.go @@ -3,7 +3,6 @@ package native import ( "fmt" "math" - "math/big" "github.com/nspcc-dev/neo-go/pkg/core/dao" "github.com/nspcc-dev/neo-go/pkg/core/interop" @@ -163,7 +162,7 @@ func (l *Ledger) getTransactionSigners(ic *interop.Context, params []stackitem.I if err != nil || !isTraceableBlock(ic, h) { return stackitem.Null{} } - return SignersToStackItem(tx.Signers) + return transaction.SignersToStackItem(tx.Signers) } // getTransactionVMState returns VM state got after transaction invocation. @@ -231,30 +230,3 @@ func getTransactionAndHeight(d *dao.Simple, item stackitem.Item) (*transaction.T } return d.GetTransaction(hash) } - -// SignersToStackItem converts transaction.Signers to stackitem.Item. -func SignersToStackItem(signers []transaction.Signer) stackitem.Item { - res := make([]stackitem.Item, len(signers)) - for i, s := range signers { - contracts := make([]stackitem.Item, len(s.AllowedContracts)) - for j, c := range s.AllowedContracts { - contracts[j] = stackitem.NewByteArray(c.BytesBE()) - } - groups := make([]stackitem.Item, len(s.AllowedGroups)) - for j, g := range s.AllowedGroups { - groups[j] = stackitem.NewByteArray(g.Bytes()) - } - rules := make([]stackitem.Item, len(s.Rules)) - for j, r := range s.Rules { - rules[j] = r.ToStackItem() - } - res[i] = stackitem.NewArray([]stackitem.Item{ - stackitem.NewByteArray(s.Account.BytesBE()), - stackitem.NewBigInteger(big.NewInt(int64(s.Scopes))), - stackitem.NewArray(contracts), - stackitem.NewArray(groups), - stackitem.NewArray(rules), - }) - } - return stackitem.NewArray(res) -} diff --git a/pkg/core/transaction/signer.go b/pkg/core/transaction/signer.go index 5b42f56f5..663513925 100644 --- a/pkg/core/transaction/signer.go +++ b/pkg/core/transaction/signer.go @@ -2,10 +2,12 @@ package transaction import ( "errors" + "math/big" "github.com/nspcc-dev/neo-go/pkg/crypto/keys" "github.com/nspcc-dev/neo-go/pkg/io" "github.com/nspcc-dev/neo-go/pkg/util" + "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" ) // The maximum number of AllowedContracts or AllowedGroups. @@ -57,3 +59,30 @@ func (c *Signer) DecodeBinary(br *io.BinReader) { br.ReadArray(&c.Rules, maxSubitems) } } + +// SignersToStackItem converts transaction.Signers to stackitem.Item. +func SignersToStackItem(signers []Signer) stackitem.Item { + res := make([]stackitem.Item, len(signers)) + for i, s := range signers { + contracts := make([]stackitem.Item, len(s.AllowedContracts)) + for j, c := range s.AllowedContracts { + contracts[j] = stackitem.NewByteArray(c.BytesBE()) + } + groups := make([]stackitem.Item, len(s.AllowedGroups)) + for j, g := range s.AllowedGroups { + groups[j] = stackitem.NewByteArray(g.Bytes()) + } + rules := make([]stackitem.Item, len(s.Rules)) + for j, r := range s.Rules { + rules[j] = r.ToStackItem() + } + res[i] = stackitem.NewArray([]stackitem.Item{ + stackitem.NewByteArray(s.Account.BytesBE()), + stackitem.NewBigInteger(big.NewInt(int64(s.Scopes))), + stackitem.NewArray(contracts), + stackitem.NewArray(groups), + stackitem.NewArray(rules), + }) + } + return stackitem.NewArray(res) +} From 2fba04490a1303a393a3f603c15c31acc5c12684 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Sat, 8 Jul 2023 13:54:04 +0300 Subject: [PATCH 2/4] core: add System.Runtime.CurrentSigners syscall Port the https://github.com/neo-project/neo/pull/2827. Signed-off-by: Anna Shaleva --- pkg/core/interop/interopnames/names.go | 2 ++ pkg/core/interop/runtime/engine.go | 14 ++++++++ pkg/core/interop/runtime/engine_test.go | 43 +++++++++++++++++++++++++ pkg/core/interops.go | 2 ++ pkg/interop/runtime/runtime.go | 8 +++++ 5 files changed, 69 insertions(+) diff --git a/pkg/core/interop/interopnames/names.go b/pkg/core/interop/interopnames/names.go index ccc2e12ed..f0af87b0a 100644 --- a/pkg/core/interop/interopnames/names.go +++ b/pkg/core/interop/interopnames/names.go @@ -15,6 +15,7 @@ const ( SystemIteratorValue = "System.Iterator.Value" SystemRuntimeBurnGas = "System.Runtime.BurnGas" SystemRuntimeCheckWitness = "System.Runtime.CheckWitness" + SystemRuntimeCurrentSigners = "System.Runtime.CurrentSigners" SystemRuntimeGasLeft = "System.Runtime.GasLeft" SystemRuntimeGetAddressVersion = "System.Runtime.GetAddressVersion" SystemRuntimeGetCallingScriptHash = "System.Runtime.GetCallingScriptHash" @@ -52,6 +53,7 @@ var names = []string{ SystemIteratorValue, SystemRuntimeBurnGas, SystemRuntimeCheckWitness, + SystemRuntimeCurrentSigners, SystemRuntimeGasLeft, SystemRuntimeGetAddressVersion, SystemRuntimeGetCallingScriptHash, diff --git a/pkg/core/interop/runtime/engine.go b/pkg/core/interop/runtime/engine.go index 05ee4a86d..b7a985a33 100644 --- a/pkg/core/interop/runtime/engine.go +++ b/pkg/core/interop/runtime/engine.go @@ -7,6 +7,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/config" "github.com/nspcc-dev/neo-go/pkg/core/interop" + "github.com/nspcc-dev/neo-go/pkg/core/transaction" "github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag" "github.com/nspcc-dev/neo-go/pkg/vm" "github.com/nspcc-dev/neo-go/pkg/vm/stackitem" @@ -179,3 +180,16 @@ func BurnGas(ic *interop.Context) error { } return nil } + +// CurrentSigners returns signers of the currently loaded transaction or stackitem.Null +// if script container is not a transaction. +func CurrentSigners(ic *interop.Context) error { + tx, ok := ic.Container.(*transaction.Transaction) + if ok { + ic.VM.Estack().PushItem(transaction.SignersToStackItem(tx.Signers)) + } else { + ic.VM.Estack().PushItem(stackitem.Null{}) + } + + return nil +} diff --git a/pkg/core/interop/runtime/engine_test.go b/pkg/core/interop/runtime/engine_test.go index 646926d8a..f5a5fe79c 100644 --- a/pkg/core/interop/runtime/engine_test.go +++ b/pkg/core/interop/runtime/engine_test.go @@ -9,6 +9,7 @@ import ( "github.com/nspcc-dev/neo-go/internal/random" "github.com/nspcc-dev/neo-go/pkg/core/block" "github.com/nspcc-dev/neo-go/pkg/core/interop" + "github.com/nspcc-dev/neo-go/pkg/core/transaction" "github.com/nspcc-dev/neo-go/pkg/crypto/hash" "github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag" "github.com/nspcc-dev/neo-go/pkg/smartcontract/trigger" @@ -129,3 +130,45 @@ func TestLog(t *testing.T) { require.Equal(t, h.StringLE(), logMsg["script"]) }) } + +func TestCurrentSigners(t *testing.T) { + t.Run("container is block", func(t *testing.T) { + b := block.New(false) + ic := &interop.Context{VM: vm.New(), Container: b} + require.NoError(t, CurrentSigners(ic)) + checkStack(t, ic.VM, stackitem.Null{}) + }) + + t.Run("container is transaction", func(t *testing.T) { + tx := &transaction.Transaction{ + Signers: []transaction.Signer{ + { + Account: util.Uint160{1}, + Scopes: transaction.None, + }, + { + Account: util.Uint160{2}, + Scopes: transaction.CalledByEntry, + }, + }, + } + ic := &interop.Context{VM: vm.New(), Container: tx} + require.NoError(t, CurrentSigners(ic)) + checkStack(t, ic.VM, stackitem.NewArray([]stackitem.Item{ + stackitem.NewArray([]stackitem.Item{ + stackitem.NewByteArray(util.Uint160{1}.BytesBE()), + stackitem.NewBigInteger(big.NewInt(int64(transaction.None))), + stackitem.NewArray([]stackitem.Item{}), + stackitem.NewArray([]stackitem.Item{}), + stackitem.NewArray([]stackitem.Item{}), + }), + stackitem.NewArray([]stackitem.Item{ + stackitem.NewByteArray(util.Uint160{2}.BytesBE()), + stackitem.NewBigInteger(big.NewInt(int64(transaction.CalledByEntry))), + stackitem.NewArray([]stackitem.Item{}), + stackitem.NewArray([]stackitem.Item{}), + stackitem.NewArray([]stackitem.Item{}), + }), + })) + }) +} diff --git a/pkg/core/interops.go b/pkg/core/interops.go index 88de802ba..003f012cd 100644 --- a/pkg/core/interops.go +++ b/pkg/core/interops.go @@ -46,6 +46,8 @@ var systemInterops = []interop.Function{ {Name: interopnames.SystemRuntimeBurnGas, Func: runtime.BurnGas, Price: 1 << 4, ParamCount: 1}, {Name: interopnames.SystemRuntimeCheckWitness, Func: runtime.CheckWitness, Price: 1 << 10, RequiredFlags: callflag.NoneFlag, ParamCount: 1}, + {Name: interopnames.SystemRuntimeCurrentSigners, Func: runtime.CurrentSigners, Price: 1 << 4, + RequiredFlags: callflag.NoneFlag}, {Name: interopnames.SystemRuntimeGasLeft, Func: runtime.GasLeft, Price: 1 << 4}, {Name: interopnames.SystemRuntimeGetAddressVersion, Func: runtime.GetAddressVersion, Price: 1 << 3}, {Name: interopnames.SystemRuntimeGetCallingScriptHash, Func: runtime.GetCallingScriptHash, Price: 1 << 4}, diff --git a/pkg/interop/runtime/runtime.go b/pkg/interop/runtime/runtime.go index a23039473..7c041e6ea 100644 --- a/pkg/interop/runtime/runtime.go +++ b/pkg/interop/runtime/runtime.go @@ -7,6 +7,7 @@ package runtime import ( "github.com/nspcc-dev/neo-go/pkg/interop" "github.com/nspcc-dev/neo-go/pkg/interop/contract" + "github.com/nspcc-dev/neo-go/pkg/interop/native/ledger" "github.com/nspcc-dev/neo-go/pkg/interop/neogointernal" ) @@ -30,6 +31,13 @@ func CheckWitness(hashOrKey []byte) bool { return neogointernal.Syscall1("System.Runtime.CheckWitness", hashOrKey).(bool) } +// CurrentSigners returns signers of the currently loaded transaction or nil if +// executing script container is not a transaction. It uses +// `System.Runtime.CurrentSigners` syscall. +func CurrentSigners() []ledger.TransactionSigner { + return neogointernal.Syscall0("System.Runtime.CurrentSigners").([]ledger.TransactionSigner) +} + // LoadScript loads the given bytecode into the VM and executes it with the // given call flags and arguments. This bytecode is executed as is from byte 0, // it's not a deployed contract that can have methods. The execution context is From e63a93b8a00e2588e47f7f5de8d60ce55589afcc Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Sat, 8 Jul 2023 14:38:00 +0300 Subject: [PATCH 3/4] compiler: add tests for System.Runtime.CurrentSigners Signed-off-by: Anna Shaleva --- pkg/compiler/interop_test.go | 30 ++++++++++++++++++++++++++++++ pkg/compiler/syscall_test.go | 1 + 2 files changed, 31 insertions(+) diff --git a/pkg/compiler/interop_test.go b/pkg/compiler/interop_test.go index 875fb56fb..95c2a0d68 100644 --- a/pkg/compiler/interop_test.go +++ b/pkg/compiler/interop_test.go @@ -18,6 +18,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/core/native/nativenames" "github.com/nspcc-dev/neo-go/pkg/core/state" "github.com/nspcc-dev/neo-go/pkg/core/storage" + "github.com/nspcc-dev/neo-go/pkg/core/transaction" "github.com/nspcc-dev/neo-go/pkg/crypto/hash" "github.com/nspcc-dev/neo-go/pkg/encoding/address" "github.com/nspcc-dev/neo-go/pkg/encoding/base58" @@ -247,6 +248,35 @@ func TestAssertMsg(t *testing.T) { require.True(t, strings.Contains(err.Error(), "ASSERTMSG is executed with false result. Reason: some message"), err) } +func TestCurrentSigners(t *testing.T) { + bc, acc := chain.NewSingle(t) + e := neotest.NewExecutor(t, bc, acc, acc) + src := `package foo + import ( + "github.com/nspcc-dev/neo-go/pkg/interop/native/ledger" + "github.com/nspcc-dev/neo-go/pkg/interop/runtime" + ) + func Main() []ledger.TransactionSigner { + return runtime.CurrentSigners() + }` + ctr := neotest.CompileSource(t, e.CommitteeHash, strings.NewReader(src), &compiler.Options{Name: "Helper"}) + e.DeployContract(t, ctr, nil) + c := e.CommitteeInvoker(ctr.Hash) + + t.Run("non-empty", func(t *testing.T) { + expected := stackitem.NewArray([]stackitem.Item{ + stackitem.NewArray([]stackitem.Item{ + stackitem.NewByteArray(e.CommitteeHash.BytesBE()), + stackitem.NewBigInteger(big.NewInt(int64(transaction.Global))), + stackitem.NewArray([]stackitem.Item{}), + stackitem.NewArray([]stackitem.Item{}), + stackitem.NewArray([]stackitem.Item{}), + }), + }) + c.Invoke(t, expected, "main") + }) +} + func spawnVM(t *testing.T, ic *interop.Context, src string) *vm.VM { b, di, err := compiler.CompileWithOptions("foo.go", strings.NewReader(src), nil) require.NoError(t, err) diff --git a/pkg/compiler/syscall_test.go b/pkg/compiler/syscall_test.go index 466271343..1358e02cb 100644 --- a/pkg/compiler/syscall_test.go +++ b/pkg/compiler/syscall_test.go @@ -73,6 +73,7 @@ func TestSyscallExecution(t *testing.T) { "iterator.Value": {interopnames.SystemIteratorValue, []string{"iterator.Iterator{}"}, false}, "runtime.BurnGas": {interopnames.SystemRuntimeBurnGas, []string{"1"}, true}, "runtime.CheckWitness": {interopnames.SystemRuntimeCheckWitness, []string{b}, false}, + "runtime.CurrentSigners": {interopnames.SystemRuntimeCurrentSigners, nil, false}, "runtime.GasLeft": {interopnames.SystemRuntimeGasLeft, nil, false}, "runtime.GetAddressVersion": {interopnames.SystemRuntimeGetAddressVersion, nil, false}, "runtime.GetCallingScriptHash": {interopnames.SystemRuntimeGetCallingScriptHash, nil, false}, From 06c99fb2af5efe8cc19438446d97a267da9491e1 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 20 Nov 2023 14:50:30 +0300 Subject: [PATCH 4/4] *: update interop deps Signed-off-by: Anna Shaleva --- examples/engine/go.mod | 2 +- examples/engine/go.sum | 4 ++-- examples/events/go.mod | 2 +- examples/events/go.sum | 4 ++-- examples/iterator/go.mod | 2 +- examples/iterator/go.sum | 4 ++-- examples/nft-d/go.mod | 2 +- examples/nft-d/go.sum | 4 ++-- examples/nft-nd-nns/go.mod | 2 +- examples/nft-nd-nns/go.sum | 4 ++-- examples/nft-nd/go.mod | 2 +- examples/nft-nd/go.sum | 4 ++-- examples/oracle/go.mod | 2 +- examples/oracle/go.sum | 4 ++-- examples/runtime/go.mod | 2 +- examples/runtime/go.sum | 4 ++-- examples/storage/go.mod | 2 +- examples/storage/go.sum | 4 ++-- examples/timer/go.mod | 2 +- examples/timer/go.sum | 4 ++-- examples/token/go.mod | 2 +- examples/token/go.sum | 4 ++-- examples/zkp/cubic_circuit/go.sum | 4 ++-- examples/zkp/xor_compat/go.mod | 2 +- examples/zkp/xor_compat/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- internal/contracts/oracle_contract/go.mod | 2 +- internal/contracts/oracle_contract/go.sum | 4 ++-- 29 files changed, 44 insertions(+), 44 deletions(-) diff --git a/examples/engine/go.mod b/examples/engine/go.mod index 418a87db8..87696aa6a 100644 --- a/examples/engine/go.mod +++ b/examples/engine/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/engine go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/engine/go.sum b/examples/engine/go.sum index 05f981f98..05942e410 100644 --- a/examples/engine/go.sum +++ b/examples/engine/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/events/go.mod b/examples/events/go.mod index aac1fa6ee..d70edc40c 100644 --- a/examples/events/go.mod +++ b/examples/events/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/events go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/events/go.sum b/examples/events/go.sum index 05f981f98..05942e410 100644 --- a/examples/events/go.sum +++ b/examples/events/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/iterator/go.mod b/examples/iterator/go.mod index c83cca13e..ceeb6b85f 100644 --- a/examples/iterator/go.mod +++ b/examples/iterator/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/iterator go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/iterator/go.sum b/examples/iterator/go.sum index 05f981f98..05942e410 100644 --- a/examples/iterator/go.sum +++ b/examples/iterator/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/nft-d/go.mod b/examples/nft-d/go.mod index b15c99042..c4076c6da 100644 --- a/examples/nft-d/go.mod +++ b/examples/nft-d/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/nft go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/nft-d/go.sum b/examples/nft-d/go.sum index 05f981f98..05942e410 100644 --- a/examples/nft-d/go.sum +++ b/examples/nft-d/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/nft-nd-nns/go.mod b/examples/nft-nd-nns/go.mod index 00158934e..3ed6c18d1 100644 --- a/examples/nft-nd-nns/go.mod +++ b/examples/nft-nd-nns/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/nspcc-dev/neo-go v0.102.1-0.20231020181554-d89c8801d689 - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e github.com/stretchr/testify v1.8.4 ) diff --git a/examples/nft-nd-nns/go.sum b/examples/nft-nd-nns/go.sum index c3944721c..3809f9718 100644 --- a/examples/nft-nd-nns/go.sum +++ b/examples/nft-nd-nns/go.sum @@ -200,8 +200,8 @@ github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/neo-go v0.102.1-0.20231020181554-d89c8801d689 h1:WnEdGAQwaW0C8wnNnQZ+rM/JfFKZDSTOqwm8cS0TOdk= github.com/nspcc-dev/neo-go v0.102.1-0.20231020181554-d89c8801d689/go.mod h1:x+wmcYqpZYJwLp1l/pHZrqNp3RSWlkMymWGDij3/OPo= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11 h1:QOc8ZRN5DXlAeRPh5QG9u8rMLgoeRNiZF5/vL7QupWg= diff --git a/examples/nft-nd/go.mod b/examples/nft-nd/go.mod index cb30baa4e..60660373a 100644 --- a/examples/nft-nd/go.mod +++ b/examples/nft-nd/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/nft-nd go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/nft-nd/go.sum b/examples/nft-nd/go.sum index 05f981f98..05942e410 100644 --- a/examples/nft-nd/go.sum +++ b/examples/nft-nd/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/oracle/go.mod b/examples/oracle/go.mod index 10b8debbb..9743c8569 100644 --- a/examples/oracle/go.mod +++ b/examples/oracle/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/oracle go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/oracle/go.sum b/examples/oracle/go.sum index 05f981f98..05942e410 100644 --- a/examples/oracle/go.sum +++ b/examples/oracle/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/runtime/go.mod b/examples/runtime/go.mod index b20b795d3..19cc266ff 100644 --- a/examples/runtime/go.mod +++ b/examples/runtime/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/runtime go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/runtime/go.sum b/examples/runtime/go.sum index 05f981f98..05942e410 100644 --- a/examples/runtime/go.sum +++ b/examples/runtime/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/storage/go.mod b/examples/storage/go.mod index 5df387de4..517312e77 100644 --- a/examples/storage/go.mod +++ b/examples/storage/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/storage go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/storage/go.sum b/examples/storage/go.sum index 05f981f98..05942e410 100644 --- a/examples/storage/go.sum +++ b/examples/storage/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/timer/go.mod b/examples/timer/go.mod index d09a123a3..007eb396e 100644 --- a/examples/timer/go.mod +++ b/examples/timer/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/timer go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/timer/go.sum b/examples/timer/go.sum index 05f981f98..05942e410 100644 --- a/examples/timer/go.sum +++ b/examples/timer/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/token/go.mod b/examples/token/go.mod index bf528f7ce..eb5e597fc 100644 --- a/examples/token/go.mod +++ b/examples/token/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/token go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/token/go.sum b/examples/token/go.sum index 05f981f98..05942e410 100644 --- a/examples/token/go.sum +++ b/examples/token/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/examples/zkp/cubic_circuit/go.sum b/examples/zkp/cubic_circuit/go.sum index 358d734d0..8e1c19b03 100644 --- a/examples/zkp/cubic_circuit/go.sum +++ b/examples/zkp/cubic_circuit/go.sum @@ -214,7 +214,7 @@ github.com/nspcc-dev/dbft v0.0.0-20230515113611-25db6ba61d5c h1:uyK5aLbAhrnZtnvo github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaFCKt1pQJd7PXoMJabZWK9ejjbLOVrkl/lOUmshg= github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11 h1:QOc8ZRN5DXlAeRPh5QG9u8rMLgoeRNiZF5/vL7QupWg= @@ -582,7 +582,7 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.1 h1:upNTNqv0ES+2ZOOqACwVtS3Il8M12/+Hz41RCPzAjQg= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/examples/zkp/xor_compat/go.mod b/examples/zkp/xor_compat/go.mod index dd0160bac..e1bc48fd3 100644 --- a/examples/zkp/xor_compat/go.mod +++ b/examples/zkp/xor_compat/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/examples/zkp/xor go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/examples/zkp/xor_compat/go.sum b/examples/zkp/xor_compat/go.sum index 05f981f98..05942e410 100644 --- a/examples/zkp/xor_compat/go.sum +++ b/examples/zkp/xor_compat/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= diff --git a/go.mod b/go.mod index 7777037ac..1c2d4de84 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/mr-tron/base58 v1.2.0 github.com/nspcc-dev/dbft v0.0.0-20230515113611-25db6ba61d5c github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 - github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 + github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11 github.com/nspcc-dev/rfc6979 v0.2.0 github.com/pierrec/lz4 v2.6.1+incompatible diff --git a/go.sum b/go.sum index 9d1f2aab7..0a3e0df24 100644 --- a/go.sum +++ b/go.sum @@ -229,8 +229,8 @@ github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22 h1:n4ZaF github.com/nspcc-dev/go-ordered-json v0.0.0-20220111165707-25110be27d22/go.mod h1:79bEUDEviBHJMFV6Iq6in57FEOCMcRhfQnfaf0ETA5U= github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y= github.com/nspcc-dev/hrw v1.0.9/go.mod h1:l/W2vx83vMQo6aStyx2AuZrJ+07lGv2JQGlVkPG06MU= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0 h1:jhuN8Ldqz7WApvUJRFY0bjRXE1R3iCkboMX5QVZhHVk= github.com/nspcc-dev/neofs-api-go/v2 v2.14.0/go.mod h1:DRIr0Ic1s+6QgdqmNFNLIqMqd7lNMJfYwkczlm1hDtM= github.com/nspcc-dev/neofs-crypto v0.4.0 h1:5LlrUAM5O0k1+sH/sktBtrgfWtq1pgpDs09fZo+KYi4= diff --git a/internal/contracts/oracle_contract/go.mod b/internal/contracts/oracle_contract/go.mod index aeb4fd9f8..6ce6ab256 100644 --- a/internal/contracts/oracle_contract/go.mod +++ b/internal/contracts/oracle_contract/go.mod @@ -2,4 +2,4 @@ module github.com/nspcc-dev/neo-go/internal/examples/oracle go 1.19 -require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 +require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e diff --git a/internal/contracts/oracle_contract/go.sum b/internal/contracts/oracle_contract/go.sum index 05f981f98..05942e410 100644 --- a/internal/contracts/oracle_contract/go.sum +++ b/internal/contracts/oracle_contract/go.sum @@ -1,2 +1,2 @@ -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5 h1:09CpI5uwsxb1EeFPIKQRwwWlfCmDD/Dwwh01lPiQScM= -github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231020160724-c3955f87d1b5/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e h1:2lMbujHWDnACgVpjAY/Ci2OoFa4ZvGKGDaXt7H2mJSo= +github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231120114907-e63a93b8a00e/go.mod h1:J/Mk6+nKeKSW4wygkZQFLQ6SkLOSGX5Ga0RuuuktEag=