From 53676398b1abf3aeae6f66a04f66d9534edc1838 Mon Sep 17 00:00:00 2001 From: Illia Malachyn Date: Tue, 5 Nov 2024 13:07:40 +0200 Subject: [PATCH] subscribe to evm address in account statuses example --- examples/stream_account_statuses/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/stream_account_statuses/main.go b/examples/stream_account_statuses/main.go index 0f35684c0..da495d321 100644 --- a/examples/stream_account_statuses/main.go +++ b/examples/stream_account_statuses/main.go @@ -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 {