Skip to content

Commit

Permalink
subscribe to evm address in account statuses example
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-malachyn committed Nov 5, 2024
1 parent cfff175 commit 5367639
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/stream_account_statuses/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ func demo() {
fmt.Printf("Latest block height: %d\n", header.Height)
fmt.Printf("Latest block ID: %s\n", header.ID)

accountStatusesChan, errChan, initErr := flowClient.SubscribeAccountStatusesFromStartBlockID(ctx, header.ID, flow.AccountStatusFilter{})
flowEVMTestnetAddress := "0x8c5303eaa26202d6"
filter := flow.AccountStatusFilter{
EventFilter: flow.EventFilter{
Addresses: []string{flowEVMTestnetAddress},
},
}
accountStatusesChan, errChan, initErr := flowClient.SubscribeAccountStatusesFromStartBlockID(ctx, header.ID, filter)
examples.Handle(initErr)

for {
Expand Down

0 comments on commit 5367639

Please sign in to comment.