Skip to content

Commit

Permalink
fix filter issue (#9)
Browse files Browse the repository at this point in the history
* add contract address to filters

* add contract address to filters

* Add a rustfmt.toml to get around linting issues.

---------

Co-authored-by: Yaron <[email protected]>
  • Loading branch information
DrZoltanFazekas and yaron-zilliqa authored Aug 22, 2024
1 parent 94a1e81 commit 117b6c0
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 22 deletions.
38 changes: 19 additions & 19 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
version: 0.1
cli:
version: 1.22.0
version: 1.22.3
plugins:
sources:
- id: trunk
ref: v1.2.1
ref: v1.6.2
uri: https://github.com/trunk-io/plugins

lint:
enabled:
- clippy@1.65.0
- clippy@1.79.0
- [email protected]
- golangci-lint@1.57.2
- [email protected].1
- golangci-lint@1.60.2
- [email protected].2
- [email protected]
- taplo@0.8.1
- actionlint@1.6.27
- taplo@0.9.3
- actionlint@1.7.1
- [email protected]
- eslint@8.57.0
- [email protected].1
- eslint@9.9.0
- [email protected].2
- git-diff-check
- markdownlint@0.40.0
- prettier@3.2.5
- markdownlint@0.41.0
- prettier@3.3.3
- [email protected]
- svgo@3.2.0
- [email protected].2
- flake8@7.0.0
- svgo@3.3.2
- [email protected].4
- flake8@7.1.1
- [email protected]
- black@24.4.2
- rustfmt@1.65.0
- black@24.8.0
- rustfmt@1.79.0
# - [email protected] - removed for being over-prissy and wanting tab indents - rrw 2023-04-25
ignore:
- linters: [gitleaks]
Expand Down Expand Up @@ -60,9 +60,9 @@ lint:

runtimes:
enabled:
- go@1.18.3
- node@16.14.2
- [email protected].3
- go@1.21.0
- node@18.12.1
- [email protected].8
actions:
enabled:
- trunk-announce
Expand Down
4 changes: 4 additions & 0 deletions bridge-validators/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.79.0"
components = ["rustfmt", "clippy"]
profile = "minimal"
3 changes: 3 additions & 0 deletions bridge-validators/rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
edition = "2021"
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
14 changes: 11 additions & 3 deletions bridge-validators/src/bridge_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ impl BridgeNode {
{
self.chain_client
.get_events(
event.filter,
event
.filter
.address(self.chain_client.chain_gateway_address),
self.chain_client.chain_gateway_block_deployed.into(),
to_block,
)
Expand Down Expand Up @@ -138,8 +140,14 @@ impl BridgeNode {
let chain_gateway: ChainGateway<Client> = self.chain_client.get_contract();

// TODO: polling finalized events
let relayed_filter = chain_gateway.event::<RelayedFilter>().filter;
let dispatched_filter = chain_gateway.event::<DispatchedFilter>().filter;
let relayed_filter = chain_gateway
.event::<RelayedFilter>()
.filter
.address(self.chain_client.chain_gateway_address);
let dispatched_filter = chain_gateway
.event::<DispatchedFilter>()
.filter
.address(self.chain_client.chain_gateway_address);

let relayed_listener: EventListener<RelayedFilter> =
EventListener::new(self.chain_client.clone(), relayed_filter);
Expand Down

0 comments on commit 117b6c0

Please sign in to comment.