mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-16 08:53:46 +00:00
accounts/abi/abigen: fix generation of event struct fields in bindings
This commit is contained in:
parent
9ab62d60f0
commit
868e3c6552
11 changed files with 29 additions and 51 deletions
|
|
@ -155,10 +155,9 @@ var (
|
||||||
// {{$contract.Type}}{{.Normalized.Name}} represents a {{.Normalized.Name}} event raised by the {{$contract.Type}} contract.
|
// {{$contract.Type}}{{.Normalized.Name}} represents a {{.Normalized.Name}} event raised by the {{$contract.Type}} contract.
|
||||||
type {{$contract.Type}}{{.Normalized.Name}} struct {
|
type {{$contract.Type}}{{.Normalized.Name}} struct {
|
||||||
{{- range .Normalized.Inputs}}
|
{{- range .Normalized.Inputs}}
|
||||||
{{- capitalise .Name}}
|
{{ capitalise .Name}}
|
||||||
{{- else}} {{bindtype .Type $structs}}
|
{{- if .Indexed}} {{ bindtopictype .Type $structs}}{{- else}} {{ bindtype .Type $structs}}{{ end }}
|
||||||
{{- end }}
|
{{- end}}
|
||||||
{{end}}
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,6 @@ type CrowdsaleFundTransfer struct {
|
||||||
Backer common.Address
|
Backer common.Address
|
||||||
Amount *big.Int
|
Amount *big.Int
|
||||||
IsContribution bool
|
IsContribution bool
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
5
accounts/abi/abigen/testdata/v2/dao.go.txt
vendored
5
accounts/abi/abigen/testdata/v2/dao.go.txt
vendored
|
|
@ -442,7 +442,6 @@ type DAOChangeOfRules struct {
|
||||||
MinimumQuorum *big.Int
|
MinimumQuorum *big.Int
|
||||||
DebatingPeriodInMinutes *big.Int
|
DebatingPeriodInMinutes *big.Int
|
||||||
MajorityMargin *big.Int
|
MajorityMargin *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -485,7 +484,6 @@ func (dAO *DAO) UnpackChangeOfRulesEvent(log *types.Log) (*DAOChangeOfRules, err
|
||||||
type DAOMembershipChanged struct {
|
type DAOMembershipChanged struct {
|
||||||
Member common.Address
|
Member common.Address
|
||||||
IsMember bool
|
IsMember bool
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -530,7 +528,6 @@ type DAOProposalAdded struct {
|
||||||
Recipient common.Address
|
Recipient common.Address
|
||||||
Amount *big.Int
|
Amount *big.Int
|
||||||
Description string
|
Description string
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -575,7 +572,6 @@ type DAOProposalTallied struct {
|
||||||
Result *big.Int
|
Result *big.Int
|
||||||
Quorum *big.Int
|
Quorum *big.Int
|
||||||
Active bool
|
Active bool
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -620,7 +616,6 @@ type DAOVoted struct {
|
||||||
Position bool
|
Position bool
|
||||||
Voter common.Address
|
Voter common.Address
|
||||||
Justification string
|
Justification string
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@ type EventCheckerDynamic struct {
|
||||||
IdxDat common.Hash
|
IdxDat common.Hash
|
||||||
Str string
|
Str string
|
||||||
Dat []byte
|
Dat []byte
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,7 +138,6 @@ func (eventChecker *EventChecker) UnpackEmptyEvent(log *types.Log) (*EventChecke
|
||||||
type EventCheckerIndexed struct {
|
type EventCheckerIndexed struct {
|
||||||
Addr common.Address
|
Addr common.Address
|
||||||
Num *big.Int
|
Num *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -182,7 +180,6 @@ func (eventChecker *EventChecker) UnpackIndexedEvent(log *types.Log) (*EventChec
|
||||||
type EventCheckerMixed struct {
|
type EventCheckerMixed struct {
|
||||||
Addr common.Address
|
Addr common.Address
|
||||||
Num *big.Int
|
Num *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -225,7 +222,6 @@ func (eventChecker *EventChecker) UnpackMixedEvent(log *types.Log) (*EventChecke
|
||||||
type EventCheckerUnnamed struct {
|
type EventCheckerUnnamed struct {
|
||||||
Arg0 *big.Int
|
Arg0 *big.Int
|
||||||
Arg1 *big.Int
|
Arg1 *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ func (nameConflict *NameConflict) UnpackGetRequest(data []byte) (Oraclerequest,
|
||||||
type NameConflictLog struct {
|
type NameConflictLog struct {
|
||||||
Msg *big.Int
|
Msg *big.Int
|
||||||
Msg0 *big.Int
|
Msg0 *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,6 @@ func (numericMethodName *NumericMethodName) PackE2test() []byte {
|
||||||
// NumericMethodNameE1TestEvent represents a E1TestEvent event raised by the NumericMethodName contract.
|
// NumericMethodNameE1TestEvent represents a E1TestEvent event raised by the NumericMethodName contract.
|
||||||
type NumericMethodNameE1TestEvent struct {
|
type NumericMethodNameE1TestEvent struct {
|
||||||
Param common.Address
|
Param common.Address
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,6 @@ func (overload *Overload) PackFoo0(I *big.Int) []byte {
|
||||||
// OverloadBar represents a Bar event raised by the Overload contract.
|
// OverloadBar represents a Bar event raised by the Overload contract.
|
||||||
type OverloadBar struct {
|
type OverloadBar struct {
|
||||||
I *big.Int
|
I *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -121,7 +120,6 @@ func (overload *Overload) UnpackBarEvent(log *types.Log) (*OverloadBar, error) {
|
||||||
type OverloadBar0 struct {
|
type OverloadBar0 struct {
|
||||||
I *big.Int
|
I *big.Int
|
||||||
J *big.Int
|
J *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
1
accounts/abi/abigen/testdata/v2/token.go.txt
vendored
1
accounts/abi/abigen/testdata/v2/token.go.txt
vendored
|
|
@ -280,7 +280,6 @@ type TokenTransfer struct {
|
||||||
From common.Address
|
From common.Address
|
||||||
To common.Address
|
To common.Address
|
||||||
Value *big.Int
|
Value *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
accounts/abi/abigen/testdata/v2/tuple.go.txt
vendored
2
accounts/abi/abigen/testdata/v2/tuple.go.txt
vendored
|
|
@ -148,7 +148,6 @@ type TupleTupleEvent struct {
|
||||||
C [2][]TupleT
|
C [2][]TupleT
|
||||||
D []TupleS
|
D []TupleS
|
||||||
E []*big.Int
|
E []*big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -190,7 +189,6 @@ func (tuple *Tuple) UnpackTupleEventEvent(log *types.Log) (*TupleTupleEvent, err
|
||||||
// TupleTupleEvent2 represents a TupleEvent2 event raised by the Tuple contract.
|
// TupleTupleEvent2 represents a TupleEvent2 event raised by the Tuple contract.
|
||||||
type TupleTupleEvent2 struct {
|
type TupleTupleEvent2 struct {
|
||||||
Arg0 []TupleP
|
Arg0 []TupleP
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,6 @@ type DBInsert struct {
|
||||||
Key *big.Int
|
Key *big.Int
|
||||||
Value *big.Int
|
Value *big.Int
|
||||||
Length *big.Int
|
Length *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -255,7 +254,6 @@ func (dB *DB) UnpackInsertEvent(log *types.Log) (*DBInsert, error) {
|
||||||
type DBKeyedInsert struct {
|
type DBKeyedInsert struct {
|
||||||
Key *big.Int
|
Key *big.Int
|
||||||
Value *big.Int
|
Value *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,6 @@ func (c *C) PackEmitOne() []byte {
|
||||||
type CBasic1 struct {
|
type CBasic1 struct {
|
||||||
Id *big.Int
|
Id *big.Int
|
||||||
Data *big.Int
|
Data *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -192,7 +191,6 @@ func (c *C) UnpackBasic1Event(log *types.Log) (*CBasic1, error) {
|
||||||
type CBasic2 struct {
|
type CBasic2 struct {
|
||||||
Flag bool
|
Flag bool
|
||||||
Data *big.Int
|
Data *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue