From 28a468910725e07c1e2357b4c99016b05cc7e5e1 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 3 Jun 2024 20:35:07 +0800 Subject: [PATCH] revert unnecessary change --- accounts/abi/argument.go | 2 +- common/compiler/solidity.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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,