mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
upgrade code
This commit is contained in:
parent
77ef9beb64
commit
88d18ce3ac
2 changed files with 3 additions and 3 deletions
|
|
@ -130,10 +130,10 @@ var (
|
||||||
{{- end }} error) {
|
{{- end }} error) {
|
||||||
out, err := {{ decapitalise $contract.Type}}.abi.Unpack("{{.Original.Name}}", data)
|
out, err := {{ decapitalise $contract.Type}}.abi.Unpack("{{.Original.Name}}", data)
|
||||||
{{- if .Structured}}
|
{{- if .Structured}}
|
||||||
outstruct := new({{.Normalized.Name}}Output)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
outstruct := new({{.Normalized.Name}}Output)
|
||||||
{{- range $i, $t := .Normalized.Outputs}}
|
{{- range $i, $t := .Normalized.Outputs}}
|
||||||
{{- if ispointertype .Type}}
|
{{- if ispointertype .Type}}
|
||||||
outstruct.{{capitalise .Name}} = abi.ConvertType(out[{{$i}}], new({{underlyingbindtype .Type }})).({{bindtype .Type $structs}})
|
outstruct.{{capitalise .Name}} = abi.ConvertType(out[{{$i}}], new({{underlyingbindtype .Type }})).({{bindtype .Type $structs}})
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,10 @@ type GetNamedStatParamsOutput struct {
|
||||||
// Solidity: function getNamedStatParams() view returns(uint256 gets, uint256 inserts, uint256 mods)
|
// Solidity: function getNamedStatParams() view returns(uint256 gets, uint256 inserts, uint256 mods)
|
||||||
func (dB *DB) UnpackGetNamedStatParams(data []byte) (*GetNamedStatParamsOutput, error) {
|
func (dB *DB) UnpackGetNamedStatParams(data []byte) (*GetNamedStatParamsOutput, error) {
|
||||||
out, err := dB.abi.Unpack("getNamedStatParams", data)
|
out, err := dB.abi.Unpack("getNamedStatParams", data)
|
||||||
outstruct := new(GetNamedStatParamsOutput)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
outstruct := new(GetNamedStatParamsOutput)
|
||||||
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)
|
||||||
outstruct.Mods = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
outstruct.Mods = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
||||||
|
|
@ -169,10 +169,10 @@ type GetStatParamsOutput struct {
|
||||||
// Solidity: function getStatParams() view returns(uint256, uint256, uint256)
|
// Solidity: function getStatParams() view returns(uint256, uint256, uint256)
|
||||||
func (dB *DB) UnpackGetStatParams(data []byte) (*GetStatParamsOutput, error) {
|
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)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
outstruct := new(GetStatParamsOutput)
|
||||||
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)
|
||||||
outstruct.Arg2 = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
outstruct.Arg2 = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue