From 44cb7ccfd8118247c30087c55c047b7e7f6a3a35 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 17 Mar 2021 16:54:55 +0300 Subject: [PATCH] [#25] container: Use `interop.Hash160` for contract addresses Signed-off-by: Alex Vanin --- container/container_contract.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container/container_contract.go b/container/container_contract.go index 1bbfa9f..6c0e92f 100644 --- a/container/container_contract.go +++ b/container/container_contract.go @@ -112,8 +112,8 @@ func Put(container []byte, signature interop.Signature, publicKey interop.Public } from := walletToScriptHash(ownerID) - netmapContractAddr := storage.Get(ctx, netmapContractKey).([]byte) - balanceContractAddr := storage.Get(ctx, balanceContractKey).([]byte) + netmapContractAddr := storage.Get(ctx, netmapContractKey).(interop.Hash160) + balanceContractAddr := storage.Get(ctx, balanceContractKey).(interop.Hash160) containerFee := contract.Call(netmapContractAddr, "config", contract.ReadOnly, containerFeeKey).(int) // todo: check if new container with unique container id @@ -154,7 +154,7 @@ func Delete(containerID, signature []byte) bool { multiaddr := common.InnerRingMultiAddressViaStorage(ctx, netmapContractKey) if !runtime.CheckWitness(multiaddr) { // check provided key - neofsIDContractAddr := storage.Get(ctx, neofsIDContractKey).([]byte) + neofsIDContractAddr := storage.Get(ctx, neofsIDContractKey).(interop.Hash160) keys := contract.Call(neofsIDContractAddr, "key", contract.ReadOnly, ownerID).([]interop.PublicKey) if !verifySignature(containerID, signature, keys) {