This commit is contained in:
maskpp 2025-04-23 21:01:49 +08:00
parent 4c524e6b1d
commit 77ef9beb64
2 changed files with 3 additions and 3 deletions

View file

@ -132,7 +132,7 @@ var (
{{- if .Structured}} {{- if .Structured}}
outstruct := new({{.Normalized.Name}}Output) outstruct := new({{.Normalized.Name}}Output)
if err != nil { if err != nil {
return outstruct, nil return nil, err
} }
{{- range $i, $t := .Normalized.Outputs}} {{- range $i, $t := .Normalized.Outputs}}
{{- if ispointertype .Type}} {{- if ispointertype .Type}}

View file

@ -127,7 +127,7 @@ func (dB *DB) UnpackGetNamedStatParams(data []byte) (*GetNamedStatParamsOutput,
out, err := dB.abi.Unpack("getNamedStatParams", data) out, err := dB.abi.Unpack("getNamedStatParams", data)
outstruct := new(GetNamedStatParamsOutput) outstruct := new(GetNamedStatParamsOutput)
if err != nil { if err != nil {
return outstruct, nil return nil, err
} }
outstruct.Gets = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Gets = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Inserts = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Inserts = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
@ -171,7 +171,7 @@ func (dB *DB) UnpackGetStatParams(data []byte) (*GetStatParamsOutput, error) {
out, err := dB.abi.Unpack("getStatParams", data) out, err := dB.abi.Unpack("getStatParams", data)
outstruct := new(GetStatParamsOutput) outstruct := new(GetStatParamsOutput)
if err != nil { if err != nil {
return outstruct, nil return nil, err
} }
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int) outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int) outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)