mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +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.
|
||||
type {{$contract.Type}}{{.Normalized.Name}} struct {
|
||||
{{- range .Normalized.Inputs}}
|
||||
{{- capitalise .Name}}
|
||||
{{- else}} {{bindtype .Type $structs}}
|
||||
{{ capitalise .Name}}
|
||||
{{- if .Indexed}} {{ bindtopictype .Type $structs}}{{- else}} {{ bindtype .Type $structs}}{{ end }}
|
||||
{{- end}}
|
||||
{{end}}
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -265,7 +265,6 @@ type CrowdsaleFundTransfer struct {
|
|||
Backer common.Address
|
||||
Amount *big.Int
|
||||
IsContribution bool
|
||||
|
||||
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
|
||||
DebatingPeriodInMinutes *big.Int
|
||||
MajorityMargin *big.Int
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -485,7 +484,6 @@ func (dAO *DAO) UnpackChangeOfRulesEvent(log *types.Log) (*DAOChangeOfRules, err
|
|||
type DAOMembershipChanged struct {
|
||||
Member common.Address
|
||||
IsMember bool
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -530,7 +528,6 @@ type DAOProposalAdded struct {
|
|||
Recipient common.Address
|
||||
Amount *big.Int
|
||||
Description string
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -575,7 +572,6 @@ type DAOProposalTallied struct {
|
|||
Result *big.Int
|
||||
Quorum *big.Int
|
||||
Active bool
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -620,7 +616,6 @@ type DAOVoted struct {
|
|||
Position bool
|
||||
Voter common.Address
|
||||
Justification string
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ type EventCheckerDynamic struct {
|
|||
IdxDat common.Hash
|
||||
Str string
|
||||
Dat []byte
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -139,7 +138,6 @@ func (eventChecker *EventChecker) UnpackEmptyEvent(log *types.Log) (*EventChecke
|
|||
type EventCheckerIndexed struct {
|
||||
Addr common.Address
|
||||
Num *big.Int
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +180,6 @@ func (eventChecker *EventChecker) UnpackIndexedEvent(log *types.Log) (*EventChec
|
|||
type EventCheckerMixed struct {
|
||||
Addr common.Address
|
||||
Num *big.Int
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -225,7 +222,6 @@ func (eventChecker *EventChecker) UnpackMixedEvent(log *types.Log) (*EventChecke
|
|||
type EventCheckerUnnamed struct {
|
||||
Arg0 *big.Int
|
||||
Arg1 *big.Int
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ func (nameConflict *NameConflict) UnpackGetRequest(data []byte) (Oraclerequest,
|
|||
type NameConflictLog struct {
|
||||
Msg *big.Int
|
||||
Msg0 *big.Int
|
||||
|
||||
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.
|
||||
type NumericMethodNameE1TestEvent struct {
|
||||
Param common.Address
|
||||
|
||||
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.
|
||||
type OverloadBar struct {
|
||||
I *big.Int
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -121,7 +120,6 @@ func (overload *Overload) UnpackBarEvent(log *types.Log) (*OverloadBar, error) {
|
|||
type OverloadBar0 struct {
|
||||
I *big.Int
|
||||
J *big.Int
|
||||
|
||||
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
|
||||
To common.Address
|
||||
Value *big.Int
|
||||
|
||||
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
|
||||
D []TupleS
|
||||
E []*big.Int
|
||||
|
||||
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.
|
||||
type TupleTupleEvent2 struct {
|
||||
Arg0 []TupleP
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -212,7 +212,6 @@ type DBInsert struct {
|
|||
Key *big.Int
|
||||
Value *big.Int
|
||||
Length *big.Int
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -255,7 +254,6 @@ 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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,6 @@ func (c *C) PackEmitOne() []byte {
|
|||
type CBasic1 struct {
|
||||
Id *big.Int
|
||||
Data *big.Int
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
@ -192,7 +191,6 @@ func (c *C) UnpackBasic1Event(log *types.Log) (*CBasic1, error) {
|
|||
type CBasic2 struct {
|
||||
Flag bool
|
||||
Data *big.Int
|
||||
|
||||
Raw *types.Log // Blockchain specific contextual infos
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue