From c1adea24843b53da1255567312784776b3bea2b3 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 27 Dec 2021 09:53:08 +0300 Subject: [PATCH] [#205] proxy: do not store netmap hash Signed-off-by: Evgenii Stratonikov --- proxy/proxy_contract.go | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/proxy/proxy_contract.go b/proxy/proxy_contract.go index c4f71e2..84b0158 100644 --- a/proxy/proxy_contract.go +++ b/proxy/proxy_contract.go @@ -7,14 +7,9 @@ import ( "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/storage" "github.com/nspcc-dev/neofs-contract/common" ) -const ( - netmapContractKey = "netmapScriptHash" -) - // OnNEP17Payment is a callback for NEP-17 compatible native GAS contract. func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) { caller := runtime.GetCallingScriptHash() @@ -23,23 +18,11 @@ func OnNEP17Payment(from interop.Hash160, amount int, data interface{}) { } } -func _deploy(data interface{}, isUpdate bool) { +func _deploy(_ interface{}, isUpdate bool) { if isUpdate { return } - args := data.(struct { - addrNetmap interop.Hash160 - }) - - ctx := storage.GetContext() - - if len(args.addrNetmap) != interop.Hash160Len { - panic("incorrect length of contract script hash") - } - - storage.Put(ctx, netmapContractKey, args.addrNetmap) - runtime.Log("proxy contract initialized") }