From cd4005e527ef3ac927931cef0964cf94f77a4244 Mon Sep 17 00:00:00 2001 From: DrZoltanFazekas Date: Thu, 22 Aug 2024 08:30:00 +0200 Subject: [PATCH 1/3] add contract address to filters --- bridge-validators/src/bridge_node.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridge-validators/src/bridge_node.rs b/bridge-validators/src/bridge_node.rs index ccd569a..c4b60cb 100644 --- a/bridge-validators/src/bridge_node.rs +++ b/bridge-validators/src/bridge_node.rs @@ -76,7 +76,7 @@ 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, ) @@ -138,8 +138,8 @@ impl BridgeNode { let chain_gateway: ChainGateway = self.chain_client.get_contract(); // TODO: polling finalized events - let relayed_filter = chain_gateway.event::().filter; - let dispatched_filter = chain_gateway.event::().filter; + let relayed_filter = chain_gateway.event::().filter.address(self.chain_client.chain_gateway_address); + let dispatched_filter = chain_gateway.event::().filter.address(self.chain_client.chain_gateway_address); let relayed_listener: EventListener = EventListener::new(self.chain_client.clone(), relayed_filter); From c363f23e874736b676224d13861f809e8c207940 Mon Sep 17 00:00:00 2001 From: DrZoltanFazekas Date: Thu, 22 Aug 2024 08:30:00 +0200 Subject: [PATCH 2/3] add contract address to filters --- bridge-validators/src/bridge_node.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bridge-validators/src/bridge_node.rs b/bridge-validators/src/bridge_node.rs index c4b60cb..a9a0041 100644 --- a/bridge-validators/src/bridge_node.rs +++ b/bridge-validators/src/bridge_node.rs @@ -76,7 +76,9 @@ impl BridgeNode { { self.chain_client .get_events( - event.filter.address(self.chain_client.chain_gateway_address), + event + .filter + .address(self.chain_client.chain_gateway_address), self.chain_client.chain_gateway_block_deployed.into(), to_block, ) @@ -138,8 +140,14 @@ impl BridgeNode { let chain_gateway: ChainGateway = self.chain_client.get_contract(); // TODO: polling finalized events - let relayed_filter = chain_gateway.event::().filter.address(self.chain_client.chain_gateway_address); - let dispatched_filter = chain_gateway.event::().filter.address(self.chain_client.chain_gateway_address); + let relayed_filter = chain_gateway + .event::() + .filter + .address(self.chain_client.chain_gateway_address); + let dispatched_filter = chain_gateway + .event::() + .filter + .address(self.chain_client.chain_gateway_address); let relayed_listener: EventListener = EventListener::new(self.chain_client.clone(), relayed_filter); From b181f91a416b3689c0d7a5b8e59e2bfccb15b7c2 Mon Sep 17 00:00:00 2001 From: DrZoltanFazekas Date: Thu, 22 Aug 2024 18:10:21 +0200 Subject: [PATCH 3/3] add the SEED token to the x-bridge webapp config --- bridge-web/src/config/config.ts | 42 ++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/bridge-web/src/config/config.ts b/bridge-web/src/config/config.ts index 8c3be1d..db29409 100644 --- a/bridge-web/src/config/config.ts +++ b/bridge-web/src/config/config.ts @@ -33,6 +33,13 @@ export const chainConfigs: Partial> = tokenManagerType: TokenManagerType.LockAndRelease, wagmiChain: zilliqa, tokens: [ + { + name: "SEED", + address: "0xe64cA52EF34FdD7e20C0c7fb2E392cc9b4F6D049", + blockExplorer: + "https://otterscan.zilliqa.com/address/0xe64cA52EF34FdD7e20C0c7fb2E392cc9b4F6D049", + logo: seed_token, + }, { name: "HRSE", address: "0x63B991C17010C21250a0eA58C6697F696a48cdf3", @@ -64,6 +71,13 @@ export const chainConfigs: Partial> = chainGatewayAddress: "0x3967f1a272Ed007e6B6471b942d655C802b42009", tokenManagerType: TokenManagerType.MintAndBurn, tokens: [ + { + name: "SEED", + address: "0x9158dF7da69b048a296636D5DE7a3d9A7FB25E88", + blockExplorer: + "https://bscscan.com/address/0x9158dF7da69b048a296636D5DE7a3d9A7FB25E88", + logo: seed_token, + }, { name: "HRSE", address: "0x3BE0E5EDC58bd55AAa381Fa642688ADC289c05a3", @@ -94,6 +108,13 @@ export const chainConfigs: Partial> = chainGatewayAddress: "0x7370e69565BB2313C4dA12F9062C282513919230", wagmiChain: zilliqaTestnet, tokens: [ + { + name: "SEED", + address: "0x28e8d39Fc68eaA27c88797Eb7D324b4B97D5b844", + blockExplorer: + "https://otterscan.testnet.zilliqa.com/address/0x28e8d39Fc68eaA27c88797Eb7D324b4B97D5b844", + logo: seed_token, + }, { name: "TST", address: "0x8618d39a8276D931603c6Bc7306af6A53aD2F1F3", @@ -108,13 +129,6 @@ export const chainConfigs: Partial> = "https://otterscan.testnet.zilliqa.com/address/0xE90Dd366D627aCc5feBEC126211191901A69f8a0", logo: test_hrse_token, }, - { - name: "SEED", - address: "0x28e8d39Fc68eaA27c88797Eb7D324b4B97D5b844", - blockExplorer: - "https://otterscan.testnet.zilliqa.com/address/0x28e8d39Fc68eaA27c88797Eb7D324b4B97D5b844", - logo: seed_token, - }, ], chainId: 33101, isZilliqa: true, @@ -132,6 +146,13 @@ export const chainConfigs: Partial> = tokenManagerType: TokenManagerType.MintAndBurn, chainGatewayAddress: "0xa9A14C90e53EdCD89dFd201A3bF94D867f8098fE", tokens: [ + { + name: "SEED", + address: "0x486722DbA2F76aeFb9977641D11f3aC3e5bA281f", + blockExplorer: + "https://testnet.bscscan.com/address/0x486722DbA2F76aeFb9977641D11f3aC3e5bA281f", + logo: seed_token, + }, { name: "TST", address: "0x5190e8b4Bbe8C3a732BAdB600b57fD42ACbB9F4B", @@ -146,13 +167,6 @@ export const chainConfigs: Partial> = "https://testnet.bscscan.com/address/0x7Cc585de659E8938Aa7d5709BeaF34bD108bdC03", logo: test_hrse_token, }, - { - name: "SEED", - address: "0x486722DbA2F76aeFb9977641D11f3aC3e5bA281f", - blockExplorer: - "https://testnet.bscscan.com/address/0x486722DbA2F76aeFb9977641D11f3aC3e5bA281f", - logo: seed_token, - }, ], chainId: 97, isZilliqa: false,