From 4585f96acf9c8504ea6de35f06f0fb666294428f Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 5 May 2021 16:30:30 +0300 Subject: [PATCH] [#75] Fix typos Signed-off-by: Alex Vanin --- balance/balance_contract.go | 6 +++--- common/vote.go | 2 +- container/config.yml | 2 +- neofsid/neofsid_contract.go | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/balance/balance_contract.go b/balance/balance_contract.go index 6f7d667..e354384 100644 --- a/balance/balance_contract.go +++ b/balance/balance_contract.go @@ -138,7 +138,7 @@ func TransferX(from, to interop.Hash160, amount int, details []byte) bool { var ( // for invocation collection without notary alphabet []common.IRNode nodeKey []byte - inderectCall bool + indirectCall bool ) if notaryDisabled { @@ -148,7 +148,7 @@ func TransferX(from, to interop.Hash160, amount int, details []byte) bool { panic("transferX: this method must be invoked from inner ring") } - inderectCall = common.FromKnownContract( + indirectCall = common.FromKnownContract( ctx, runtime.GetCallingScriptHash(), containerContractKey, @@ -160,7 +160,7 @@ func TransferX(from, to interop.Hash160, amount int, details []byte) bool { } } - if notaryDisabled && !inderectCall { + if notaryDisabled && !indirectCall { threshold := len(alphabet)*2/3 + 1 id := common.InvokeID([]interface{}{from, to, amount}, []byte("transfer")) diff --git a/common/vote.go b/common/vote.go index bd45cf6..a136c69 100644 --- a/common/vote.go +++ b/common/vote.go @@ -133,7 +133,7 @@ func InvokeID(args []interface{}, prefix []byte) []byte { - it is indirect invocation from other smart-contract. However there is a possible attack, when malicious inner ring node creates - malicious smart-contract in morph chain to do inderect call. + malicious smart-contract in morph chain to do indirect call. MaliciousIR -(1 invoke)-> [ Malicious Contract ] -(1 invoke) -> [ Balance Contract ] diff --git a/container/config.yml b/container/config.yml index cb7ba72..43e81ab 100644 --- a/container/config.yml +++ b/container/config.yml @@ -1,5 +1,5 @@ name: "NeoFS Container" -safemethods: ["get", "owner", "list", "eacl", "getContainerSize", "listContainerSizes", "version"] +safemethods: ["get", "owner", "list", "eACL", "getContainerSize", "listContainerSizes", "version"] events: - name: containerPut parameters: diff --git a/neofsid/neofsid_contract.go b/neofsid/neofsid_contract.go index c5bac93..c3f8f05 100644 --- a/neofsid/neofsid_contract.go +++ b/neofsid/neofsid_contract.go @@ -80,7 +80,7 @@ func AddKey(owner []byte, keys []interop.PublicKey) bool { var ( // for invocation collection without notary alphabet []common.IRNode nodeKey []byte - inderectCall bool + indirectCall bool ) if notaryDisabled { @@ -90,7 +90,7 @@ func AddKey(owner []byte, keys []interop.PublicKey) bool { panic("addKey: invocation from non inner ring node") } - inderectCall = common.FromKnownContract( + indirectCall = common.FromKnownContract( ctx, runtime.GetCallingScriptHash(), containerContractKey, @@ -121,7 +121,7 @@ addLoop: info.Keys = append(info.Keys, pubKey) } - if notaryDisabled && !inderectCall { + if notaryDisabled && !indirectCall { threshold := len(alphabet)*2/3 + 1 id := invokeIDKeys(owner, keys, []byte("add"))