[#205] proxy: do not store netmap hash
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
8718e146c9
commit
c1adea2484
1 changed files with 1 additions and 18 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue