Skip to content

Commit

Permalink
Merge pull request #14 from moonstream-to/starknet-event-block-number
Browse files Browse the repository at this point in the history
Add BlockNumber to parsed event
  • Loading branch information
kompotkot authored Feb 19, 2024
2 parents 2e5a4eb + 0b00437 commit 4411d20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions starknet/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ var {{.EventHashVar}} string = "{{.EventHash}}"
// {{.GoName}} is the Go struct corresponding to the {{.OriginalName}} event.
type {{.GoName}} struct {
BlockNumber uint64
{{range .Definition.Members}}
{{(CamelCase .Name)}} {{(GenerateGoNameForType .Type)}}
{{- end}}
Expand Down Expand Up @@ -660,6 +661,7 @@ func (p *EventParser) Parse(event RawEvent) (ParsedEvent, error) {
if parseErr != nil {
return defaultResult, parseErr
}
parsedEvent.BlockNumber = event.BlockNumber
return ParsedEvent{Name: {{.EventNameVar}}, Event: parsedEvent}, nil
}
{{- end}}
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package version

var SeerVersion string = "0.1.1"
var SeerVersion string = "0.1.2"

0 comments on commit 4411d20

Please sign in to comment.