abi/bind: generate log subscription funcs on eventer type

This commit is contained in:
Bas van Kervel 2017-10-09 13:24:34 +02:00
parent b2242ec15f
commit d8ee7df03b
No known key found for this signature in database
GPG key ID: BFB23B252EF5812B

View file

@ -323,7 +323,7 @@ package {{.Package}}
// Solidity: event {{.Canonical}} // Solidity: event {{.Canonical}}
// //
// {{if not .Anonymous}}Note: this method will fill in the Event ID topic{{end}} // {{if not .Anonymous}}Note: this method will fill in the Event ID topic{{end}}
func (_{{$contract.Type}} *{{$contract.Type}}Caller) Subscribe{{.Name}}(opts *bind.CallOpts, ch chan<- types.Log, topics ...[]common.Hash) (ethereum.Subscription, error) { func (_{{$contract.Type}} *{{$contract.Type}}Eventer) Subscribe{{.Name}}(opts *bind.CallOpts, ch chan<- types.Log, topics ...[]common.Hash) (ethereum.Subscription, error) {
{{if not .Anonymous}}id := []common.Hash{common.HexToHash("{{.ID}}")} {{if not .Anonymous}}id := []common.Hash{common.HexToHash("{{.ID}}")}
topics = append([][]common.Hash{id}, topics...) topics = append([][]common.Hash{id}, topics...)
{{end}} {{end}}