diff --git a/accounts/abi/argument.go b/accounts/abi/argument.go index c7009a6165..227a088b7d 100644 --- a/accounts/abi/argument.go +++ b/accounts/abi/argument.go @@ -234,7 +234,7 @@ func (arguments Arguments) Pack(args ...interface{}) ([]byte, error) { for _, abiArg := range abiArgs { inputOffset += getTypeSize(abiArg.Type) } - var ret = make([]byte, 0, len(args)) + var ret []byte for i, a := range args { input := abiArgs[i] // pack the input diff --git a/common/compiler/solidity.go b/common/compiler/solidity.go index f46ba4888d..9de94017c2 100644 --- a/common/compiler/solidity.go +++ b/common/compiler/solidity.go @@ -63,7 +63,7 @@ func ParseCombinedJSON(combinedJSON []byte, source string, languageVersion strin return parseCombinedJSONV8(combinedJSON, source, languageVersion, compilerVersion, compilerOptions) } // Compilation succeeded, assemble and return the contracts. - contracts := make(map[string]*Contract, len(output.Contracts)) + contracts := make(map[string]*Contract) for name, info := range output.Contracts { // Parse the individual compilation results. var abi, userdoc, devdoc interface{} @@ -107,7 +107,7 @@ func parseCombinedJSONV8(combinedJSON []byte, source string, languageVersion str return nil, err } // Compilation succeeded, assemble and return the contracts. - contracts := make(map[string]*Contract, len(output.Contracts)) + contracts := make(map[string]*Contract) for name, info := range output.Contracts { contracts[name] = &Contract{ Code: "0x" + info.Bin,