revert unnecessary change

This commit is contained in:
maskpp 2024-06-03 20:35:07 +08:00
parent 3071d377fb
commit 28a4689107
2 changed files with 3 additions and 3 deletions

View file

@ -234,7 +234,7 @@ func (arguments Arguments) Pack(args ...interface{}) ([]byte, error) {
for _, abiArg := range abiArgs { for _, abiArg := range abiArgs {
inputOffset += getTypeSize(abiArg.Type) inputOffset += getTypeSize(abiArg.Type)
} }
var ret = make([]byte, 0, len(args)) var ret []byte
for i, a := range args { for i, a := range args {
input := abiArgs[i] input := abiArgs[i]
// pack the input // pack the input

View file

@ -63,7 +63,7 @@ func ParseCombinedJSON(combinedJSON []byte, source string, languageVersion strin
return parseCombinedJSONV8(combinedJSON, source, languageVersion, compilerVersion, compilerOptions) return parseCombinedJSONV8(combinedJSON, source, languageVersion, compilerVersion, compilerOptions)
} }
// Compilation succeeded, assemble and return the contracts. // 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 { for name, info := range output.Contracts {
// Parse the individual compilation results. // Parse the individual compilation results.
var abi, userdoc, devdoc interface{} var abi, userdoc, devdoc interface{}
@ -107,7 +107,7 @@ func parseCombinedJSONV8(combinedJSON []byte, source string, languageVersion str
return nil, err return nil, err
} }
// Compilation succeeded, assemble and return the contracts. // 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 { for name, info := range output.Contracts {
contracts[name] = &Contract{ contracts[name] = &Contract{
Code: "0x" + info.Bin, Code: "0x" + info.Bin,