mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
update converted v1 bindings
remove commented-out line
This commit is contained in:
parent
bcc305dc20
commit
9dd006f4e0
6 changed files with 22 additions and 21 deletions
|
|
@ -344,6 +344,7 @@ func TestBindingV2ConvertedV1Tests(t *testing.T) {
|
|||
}
|
||||
|
||||
// TODO: remove these before merging abigen2 PR. these are for convenience if I need to regenerate the converted bindings or add a new one.
|
||||
|
||||
if err := os.WriteFile(fmt.Sprintf("convertedv1bindtests/%s.go", strings.ToLower(tc.name)), []byte(code), 0666); err != nil {
|
||||
t.Fatalf("err writing expected output to file: %v\n", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ func (crowdsale *Crowdsale) UnpackFunders(data []byte) (FundersOutput, error) {
|
|||
|
||||
outstruct.Addr = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
||||
|
||||
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(big.Int)
|
||||
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ func (dAO *DAO) UnpackMembers(data []byte) (MembersOutput, error) {
|
|||
|
||||
outstruct.Name = *abi.ConvertType(out[2], new(string)).(*string)
|
||||
|
||||
outstruct.MemberSince = abi.ConvertType(out[3], new(big.Int)).(big.Int)
|
||||
outstruct.MemberSince = abi.ConvertType(out[3], new(big.Int)).(*big.Int)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
|
|
@ -307,19 +307,19 @@ func (dAO *DAO) UnpackProposals(data []byte) (ProposalsOutput, error) {
|
|||
|
||||
outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
||||
|
||||
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(big.Int)
|
||||
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.Description = *abi.ConvertType(out[2], new(string)).(*string)
|
||||
|
||||
outstruct.VotingDeadline = abi.ConvertType(out[3], new(big.Int)).(big.Int)
|
||||
outstruct.VotingDeadline = abi.ConvertType(out[3], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.Executed = *abi.ConvertType(out[4], new(bool)).(*bool)
|
||||
|
||||
outstruct.ProposalPassed = *abi.ConvertType(out[5], new(bool)).(*bool)
|
||||
|
||||
outstruct.NumberOfVotes = abi.ConvertType(out[6], new(big.Int)).(big.Int)
|
||||
outstruct.NumberOfVotes = abi.ConvertType(out[6], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.CurrentResult = abi.ConvertType(out[7], new(big.Int)).(big.Int)
|
||||
outstruct.CurrentResult = abi.ConvertType(out[7], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.ProposalHash = *abi.ConvertType(out[8], new([32]byte)).(*[32]byte)
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ func (getter *Getter) UnpackGetter(data []byte) (GetterOutput, error) {
|
|||
|
||||
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
|
||||
|
||||
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([32]byte)).(*[32]byte)
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ func (tupler *Tupler) UnpackTuple(data []byte) (TupleOutput, error) {
|
|||
|
||||
outstruct.A = *abi.ConvertType(out[0], new(string)).(*string)
|
||||
|
||||
outstruct.B = abi.ConvertType(out[1], new(big.Int)).(big.Int)
|
||||
outstruct.B = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.C = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
|
||||
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@ func (underscorer *Underscorer) UnpackAllPurelyUnderscoredOutput(data []byte) (A
|
|||
return *outstruct, 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)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
|
|
@ -98,9 +98,9 @@ func (underscorer *Underscorer) UnpackLowerLowerCollision(data []byte) (LowerLow
|
|||
return *outstruct, err
|
||||
}
|
||||
|
||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(big.Int)
|
||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(big.Int)
|
||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
|
|
@ -126,9 +126,9 @@ func (underscorer *Underscorer) UnpackLowerUpperCollision(data []byte) (LowerUpp
|
|||
return *outstruct, err
|
||||
}
|
||||
|
||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(big.Int)
|
||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(big.Int)
|
||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
|
|
@ -154,9 +154,9 @@ func (underscorer *Underscorer) UnpackPurelyUnderscoredOutput(data []byte) (Pure
|
|||
return *outstruct, err
|
||||
}
|
||||
|
||||
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(big.Int)
|
||||
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.Res = abi.ConvertType(out[1], new(big.Int)).(big.Int)
|
||||
outstruct.Res = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ func (underscorer *Underscorer) UnpackUnderscoredOutput(data []byte) (Underscore
|
|||
return *outstruct, err
|
||||
}
|
||||
|
||||
outstruct.Int = abi.ConvertType(out[0], new(big.Int)).(big.Int)
|
||||
outstruct.Int = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.String = *abi.ConvertType(out[1], new(string)).(*string)
|
||||
|
||||
|
|
@ -210,9 +210,9 @@ func (underscorer *Underscorer) UnpackUpperLowerCollision(data []byte) (UpperLow
|
|||
return *outstruct, err
|
||||
}
|
||||
|
||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(big.Int)
|
||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(big.Int)
|
||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
|
|
@ -238,9 +238,9 @@ func (underscorer *Underscorer) UnpackUpperUpperCollision(data []byte) (UpperUpp
|
|||
return *outstruct, err
|
||||
}
|
||||
|
||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(big.Int)
|
||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||
|
||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(big.Int)
|
||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||
|
||||
return *outstruct, err
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue