diff --git a/accounts/abi/abigen/source2.go.tpl b/accounts/abi/abigen/source2.go.tpl index b5fe0d3e21..7c023ed702 100644 --- a/accounts/abi/abigen/source2.go.tpl +++ b/accounts/abi/abigen/source2.go.tpl @@ -155,10 +155,9 @@ var ( // {{$contract.Type}}{{.Normalized.Name}} represents a {{.Normalized.Name}} event raised by the {{$contract.Type}} contract. type {{$contract.Type}}{{.Normalized.Name}} struct { {{- range .Normalized.Inputs}} - {{- capitalise .Name}} - {{- else}} {{bindtype .Type $structs}} - {{- end }} - {{end}} + {{ capitalise .Name}} + {{- if .Indexed}} {{ bindtopictype .Type $structs}}{{- else}} {{ bindtype .Type $structs}}{{ end }} + {{- end}} Raw *types.Log // Blockchain specific contextual infos } diff --git a/accounts/abi/abigen/testdata/v2/crowdsale.go.txt b/accounts/abi/abigen/testdata/v2/crowdsale.go.txt index c8c5f0890f..56f8f239b7 100644 --- a/accounts/abi/abigen/testdata/v2/crowdsale.go.txt +++ b/accounts/abi/abigen/testdata/v2/crowdsale.go.txt @@ -265,8 +265,7 @@ type CrowdsaleFundTransfer struct { Backer common.Address Amount *big.Int IsContribution bool - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const CrowdsaleFundTransferEventName = "FundTransfer" diff --git a/accounts/abi/abigen/testdata/v2/dao.go.txt b/accounts/abi/abigen/testdata/v2/dao.go.txt index 32ad1a40a3..ac89704693 100644 --- a/accounts/abi/abigen/testdata/v2/dao.go.txt +++ b/accounts/abi/abigen/testdata/v2/dao.go.txt @@ -442,8 +442,7 @@ type DAOChangeOfRules struct { MinimumQuorum *big.Int DebatingPeriodInMinutes *big.Int MajorityMargin *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const DAOChangeOfRulesEventName = "ChangeOfRules" @@ -485,8 +484,7 @@ func (dAO *DAO) UnpackChangeOfRulesEvent(log *types.Log) (*DAOChangeOfRules, err type DAOMembershipChanged struct { Member common.Address IsMember bool - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const DAOMembershipChangedEventName = "MembershipChanged" @@ -530,8 +528,7 @@ type DAOProposalAdded struct { Recipient common.Address Amount *big.Int Description string - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const DAOProposalAddedEventName = "ProposalAdded" @@ -575,8 +572,7 @@ type DAOProposalTallied struct { Result *big.Int Quorum *big.Int Active bool - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const DAOProposalTalliedEventName = "ProposalTallied" @@ -620,8 +616,7 @@ type DAOVoted struct { Position bool Voter common.Address Justification string - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const DAOVotedEventName = "Voted" diff --git a/accounts/abi/abigen/testdata/v2/eventchecker.go.txt b/accounts/abi/abigen/testdata/v2/eventchecker.go.txt index 5507115063..e90cc7d0d5 100644 --- a/accounts/abi/abigen/testdata/v2/eventchecker.go.txt +++ b/accounts/abi/abigen/testdata/v2/eventchecker.go.txt @@ -56,8 +56,7 @@ type EventCheckerDynamic struct { IdxDat common.Hash Str string Dat []byte - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const EventCheckerDynamicEventName = "dynamic" @@ -139,8 +138,7 @@ func (eventChecker *EventChecker) UnpackEmptyEvent(log *types.Log) (*EventChecke type EventCheckerIndexed struct { Addr common.Address Num *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const EventCheckerIndexedEventName = "indexed" @@ -182,8 +180,7 @@ func (eventChecker *EventChecker) UnpackIndexedEvent(log *types.Log) (*EventChec type EventCheckerMixed struct { Addr common.Address Num *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const EventCheckerMixedEventName = "mixed" @@ -225,8 +222,7 @@ func (eventChecker *EventChecker) UnpackMixedEvent(log *types.Log) (*EventChecke type EventCheckerUnnamed struct { Arg0 *big.Int Arg1 *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const EventCheckerUnnamedEventName = "unnamed" diff --git a/accounts/abi/abigen/testdata/v2/nameconflict.go.txt b/accounts/abi/abigen/testdata/v2/nameconflict.go.txt index ed4f78c401..97a132f0a1 100644 --- a/accounts/abi/abigen/testdata/v2/nameconflict.go.txt +++ b/accounts/abi/abigen/testdata/v2/nameconflict.go.txt @@ -98,8 +98,7 @@ func (nameConflict *NameConflict) UnpackGetRequest(data []byte) (Oraclerequest, type NameConflictLog struct { Msg *big.Int Msg0 *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const NameConflictLogEventName = "log" diff --git a/accounts/abi/abigen/testdata/v2/numericmethodname.go.txt b/accounts/abi/abigen/testdata/v2/numericmethodname.go.txt index 75addb45e2..bc32915c77 100644 --- a/accounts/abi/abigen/testdata/v2/numericmethodname.go.txt +++ b/accounts/abi/abigen/testdata/v2/numericmethodname.go.txt @@ -90,8 +90,7 @@ func (numericMethodName *NumericMethodName) PackE2test() []byte { // NumericMethodNameE1TestEvent represents a E1TestEvent event raised by the NumericMethodName contract. type NumericMethodNameE1TestEvent struct { Param common.Address - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const NumericMethodNameE1TestEventEventName = "_1TestEvent" diff --git a/accounts/abi/abigen/testdata/v2/overload.go.txt b/accounts/abi/abigen/testdata/v2/overload.go.txt index 68e5f146bc..1103d37425 100644 --- a/accounts/abi/abigen/testdata/v2/overload.go.txt +++ b/accounts/abi/abigen/testdata/v2/overload.go.txt @@ -77,8 +77,7 @@ func (overload *Overload) PackFoo0(I *big.Int) []byte { // OverloadBar represents a Bar event raised by the Overload contract. type OverloadBar struct { - I *big.Int - + I *big.Int Raw *types.Log // Blockchain specific contextual infos } @@ -119,9 +118,8 @@ func (overload *Overload) UnpackBarEvent(log *types.Log) (*OverloadBar, error) { // OverloadBar0 represents a Bar0 event raised by the Overload contract. type OverloadBar0 struct { - I *big.Int - J *big.Int - + I *big.Int + J *big.Int Raw *types.Log // Blockchain specific contextual infos } diff --git a/accounts/abi/abigen/testdata/v2/token.go.txt b/accounts/abi/abigen/testdata/v2/token.go.txt index 6ff348427e..1b662b49b2 100644 --- a/accounts/abi/abigen/testdata/v2/token.go.txt +++ b/accounts/abi/abigen/testdata/v2/token.go.txt @@ -280,8 +280,7 @@ type TokenTransfer struct { From common.Address To common.Address Value *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const TokenTransferEventName = "Transfer" diff --git a/accounts/abi/abigen/testdata/v2/tuple.go.txt b/accounts/abi/abigen/testdata/v2/tuple.go.txt index 680d5eaba0..819c49b292 100644 --- a/accounts/abi/abigen/testdata/v2/tuple.go.txt +++ b/accounts/abi/abigen/testdata/v2/tuple.go.txt @@ -143,12 +143,11 @@ func (tuple *Tuple) PackFunc3(Arg0 []TupleQ) []byte { // TupleTupleEvent represents a TupleEvent event raised by the Tuple contract. type TupleTupleEvent struct { - A TupleS - B [][2]TupleT - C [2][]TupleT - D []TupleS - E []*big.Int - + A TupleS + B [][2]TupleT + C [2][]TupleT + D []TupleS + E []*big.Int Raw *types.Log // Blockchain specific contextual infos } @@ -190,8 +189,7 @@ func (tuple *Tuple) UnpackTupleEventEvent(log *types.Log) (*TupleTupleEvent, err // TupleTupleEvent2 represents a TupleEvent2 event raised by the Tuple contract. type TupleTupleEvent2 struct { Arg0 []TupleP - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const TupleTupleEvent2EventName = "TupleEvent2" diff --git a/accounts/abi/bind/v2/internal/contracts/db/bindings.go b/accounts/abi/bind/v2/internal/contracts/db/bindings.go index c51b058e3b..1f33af6ca2 100644 --- a/accounts/abi/bind/v2/internal/contracts/db/bindings.go +++ b/accounts/abi/bind/v2/internal/contracts/db/bindings.go @@ -212,8 +212,7 @@ type DBInsert struct { Key *big.Int Value *big.Int Length *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const DBInsertEventName = "Insert" @@ -255,8 +254,7 @@ func (dB *DB) UnpackInsertEvent(log *types.Log) (*DBInsert, error) { type DBKeyedInsert struct { Key *big.Int Value *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const DBKeyedInsertEventName = "KeyedInsert" diff --git a/accounts/abi/bind/v2/internal/contracts/events/bindings.go b/accounts/abi/bind/v2/internal/contracts/events/bindings.go index 748f649d59..be9fa323a0 100644 --- a/accounts/abi/bind/v2/internal/contracts/events/bindings.go +++ b/accounts/abi/bind/v2/internal/contracts/events/bindings.go @@ -149,8 +149,7 @@ func (c *C) PackEmitOne() []byte { type CBasic1 struct { Id *big.Int Data *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const CBasic1EventName = "basic1" @@ -192,8 +191,7 @@ func (c *C) UnpackBasic1Event(log *types.Log) (*CBasic1, error) { type CBasic2 struct { Flag bool Data *big.Int - - Raw *types.Log // Blockchain specific contextual infos + Raw *types.Log // Blockchain specific contextual infos } const CBasic2EventName = "basic2"