From f20c3aa9e0e01bfc4372cd3bc76d82deca11bc94 Mon Sep 17 00:00:00 2001 From: Alexander Belokon Date: Mon, 17 Jun 2024 15:38:37 +0200 Subject: [PATCH 1/4] feat: add bsc cross chain forwarder event --- l2-bridge-ethereum/src/constants.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/l2-bridge-ethereum/src/constants.ts b/l2-bridge-ethereum/src/constants.ts index 269b4c03..cb8e6e79 100644 --- a/l2-bridge-ethereum/src/constants.ts +++ b/l2-bridge-ethereum/src/constants.ts @@ -107,6 +107,8 @@ export const ARBITRUM_GATEWAY_SET_EVENT = export const LINEA_CUSTOM_CONTRACT_SET_EVENT = "event CustomContractSet(address indexed nativeToken, address indexed customContract, address indexed setBy);"; +export const BSC_CROSS_CHAIN_FORWARDER = ""; + export const L1_ERC20_TOKEN_GATEWAYS = [ { name: "Arbitrum", @@ -602,6 +604,22 @@ const SCROLL_L1_GATEWAY_ROUTER_EVENTS = [ }, ]; +const BSC_L1_CROSS_CHAIN_FORWARDER_EVENTS = [ + { + address: BSC_CROSS_CHAIN_FORWARDER, + event: + "event SenderUpdated(address indexed sender, bool indexed isApproved)", + alertId: "BSC-ADI-APPROVED-SENDER-UPDATED", + name: "🚨🚨🚨 BSC a.DI: Approved sender changed", + description: (args: Result) => + args.isApproved + ? `Address ${args.sender} was set as an approved sender` + : `Address ${args.sender} was removed from the approved senders list`, + severity: FindingSeverity.Critical, + type: FindingType.Info, + }, +]; + export const THIRD_PARTY_PROXY_EVENTS: EventOfNotice[] = ARBITRUM_L1_GATEWAY_ROUTER_PROXY_EVENTS.concat( OPTIMISM_L1_CROSS_DOMAIN_MESSENGER_EVENTS, @@ -613,7 +631,8 @@ export const THIRD_PARTY_PROXY_EVENTS: EventOfNotice[] = .concat(SCROLL_L1_MESSENGER_PROXY_EVENTS) .concat(SCROLL_L1_MESSENGER_EVENTS) .concat(SCROLL_L1_GATEWAY_ROUTER_PROXY_EVENTS) - .concat(SCROLL_L1_GATEWAY_ROUTER_EVENTS); + .concat(SCROLL_L1_GATEWAY_ROUTER_EVENTS) + .concat(BSC_L1_CROSS_CHAIN_FORWARDER_EVENTS); export const L1_BRIDGE_EVENTS: EventOfNotice[] = L1_ERC20_TOKEN_GATEWAYS.map( (gw) => { From e518185879c087a5b58c5cffd0a39ccab52c13db Mon Sep 17 00:00:00 2001 From: Alexander Belokon Date: Tue, 18 Jun 2024 11:05:21 +0200 Subject: [PATCH 2/4] refactor: rename cross chain forwarder to cross chain controller --- l2-bridge-ethereum/src/constants.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/l2-bridge-ethereum/src/constants.ts b/l2-bridge-ethereum/src/constants.ts index cb8e6e79..855a69b5 100644 --- a/l2-bridge-ethereum/src/constants.ts +++ b/l2-bridge-ethereum/src/constants.ts @@ -107,7 +107,7 @@ export const ARBITRUM_GATEWAY_SET_EVENT = export const LINEA_CUSTOM_CONTRACT_SET_EVENT = "event CustomContractSet(address indexed nativeToken, address indexed customContract, address indexed setBy);"; -export const BSC_CROSS_CHAIN_FORWARDER = ""; +export const BSC_CROSS_CHAIN_CONTROLLER = ""; export const L1_ERC20_TOKEN_GATEWAYS = [ { @@ -604,9 +604,9 @@ const SCROLL_L1_GATEWAY_ROUTER_EVENTS = [ }, ]; -const BSC_L1_CROSS_CHAIN_FORWARDER_EVENTS = [ +const BSC_L1_CROSS_CHAIN_CONTROLLER_EVENTS = [ { - address: BSC_CROSS_CHAIN_FORWARDER, + address: BSC_CROSS_CHAIN_CONTROLLER, event: "event SenderUpdated(address indexed sender, bool indexed isApproved)", alertId: "BSC-ADI-APPROVED-SENDER-UPDATED", @@ -632,7 +632,7 @@ export const THIRD_PARTY_PROXY_EVENTS: EventOfNotice[] = .concat(SCROLL_L1_MESSENGER_EVENTS) .concat(SCROLL_L1_GATEWAY_ROUTER_PROXY_EVENTS) .concat(SCROLL_L1_GATEWAY_ROUTER_EVENTS) - .concat(BSC_L1_CROSS_CHAIN_FORWARDER_EVENTS); + .concat(BSC_L1_CROSS_CHAIN_CONTROLLER_EVENTS); export const L1_BRIDGE_EVENTS: EventOfNotice[] = L1_ERC20_TOKEN_GATEWAYS.map( (gw) => { From 63574c096df8db69e1203cfe6b200e01d6169f31 Mon Sep 17 00:00:00 2001 From: Alexander Belokon Date: Wed, 19 Jun 2024 17:03:27 +0200 Subject: [PATCH 3/4] refactor: rename BSC_CROSS_CHAIN_CONTROLLER to BSC_L1_CROSS_CHAIN_CONTROLLER --- l2-bridge-ethereum/src/constants.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/l2-bridge-ethereum/src/constants.ts b/l2-bridge-ethereum/src/constants.ts index 855a69b5..ff6a29da 100644 --- a/l2-bridge-ethereum/src/constants.ts +++ b/l2-bridge-ethereum/src/constants.ts @@ -107,7 +107,7 @@ export const ARBITRUM_GATEWAY_SET_EVENT = export const LINEA_CUSTOM_CONTRACT_SET_EVENT = "event CustomContractSet(address indexed nativeToken, address indexed customContract, address indexed setBy);"; -export const BSC_CROSS_CHAIN_CONTROLLER = ""; +export const BSC_L1_CROSS_CHAIN_CONTROLLER = ""; export const L1_ERC20_TOKEN_GATEWAYS = [ { @@ -606,7 +606,7 @@ const SCROLL_L1_GATEWAY_ROUTER_EVENTS = [ const BSC_L1_CROSS_CHAIN_CONTROLLER_EVENTS = [ { - address: BSC_CROSS_CHAIN_CONTROLLER, + address: BSC_L1_CROSS_CHAIN_CONTROLLER, event: "event SenderUpdated(address indexed sender, bool indexed isApproved)", alertId: "BSC-ADI-APPROVED-SENDER-UPDATED", From 48f077de766c4fa1835758055a8bd88603723ef7 Mon Sep 17 00:00:00 2001 From: Alexander Belokon Date: Thu, 20 Jun 2024 13:52:59 +0200 Subject: [PATCH 4/4] Add bsc cross chain controller address --- l2-bridge-ethereum/src/constants.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/l2-bridge-ethereum/src/constants.ts b/l2-bridge-ethereum/src/constants.ts index ff6a29da..70b935a6 100644 --- a/l2-bridge-ethereum/src/constants.ts +++ b/l2-bridge-ethereum/src/constants.ts @@ -107,7 +107,8 @@ export const ARBITRUM_GATEWAY_SET_EVENT = export const LINEA_CUSTOM_CONTRACT_SET_EVENT = "event CustomContractSet(address indexed nativeToken, address indexed customContract, address indexed setBy);"; -export const BSC_L1_CROSS_CHAIN_CONTROLLER = ""; +export const BSC_L1_CROSS_CHAIN_CONTROLLER = + "0x93559892D3C7F66DE4570132d68b69BD3c369A7C"; export const L1_ERC20_TOKEN_GATEWAYS = [ {