[#58] proxy: Use alphabet list from chain

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-03-24 11:12:44 +03:00 committed by Alex Vanin
parent 766596f496
commit 24fe1573c1

View file

@ -4,6 +4,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/interop" "github.com/nspcc-dev/neo-go/pkg/interop"
"github.com/nspcc-dev/neo-go/pkg/interop/native/gas" "github.com/nspcc-dev/neo-go/pkg/interop/native/gas"
"github.com/nspcc-dev/neo-go/pkg/interop/native/management" "github.com/nspcc-dev/neo-go/pkg/interop/native/management"
"github.com/nspcc-dev/neo-go/pkg/interop/native/neo"
"github.com/nspcc-dev/neo-go/pkg/interop/runtime" "github.com/nspcc-dev/neo-go/pkg/interop/runtime"
"github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/interop/storage"
"github.com/nspcc-dev/neofs-contract/common" "github.com/nspcc-dev/neofs-contract/common"
@ -54,11 +55,11 @@ func Migrate(script []byte, manifest []byte) bool {
} }
func Verify() bool { func Verify() bool {
ctx := storage.GetReadOnlyContext() alphabet := neo.GetCommittee()
sig := common.InnerRingMultiAddressViaStorage(ctx, netmapContractKey) sig := common.Multiaddress(alphabet, false)
if !runtime.CheckWitness(sig) { if !runtime.CheckWitness(sig) {
sig = common.CommitteeMultiAddressViaStorage(ctx, netmapContractKey) sig = common.Multiaddress(alphabet, true)
return runtime.CheckWitness(sig) return runtime.CheckWitness(sig)
} }