From a75609c02c651e3b374391e5fc7c6c696658ff28 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 11 May 2023 00:49:32 +0800 Subject: [PATCH] fix(protocol): allow Bridge to receive ETHs from TaikoL1 (#13737) --- packages/protocol/contracts/bridge/Bridge.sol | 3 ++- packages/protocol/script/DeployOnL1.s.sol | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/protocol/contracts/bridge/Bridge.sol b/packages/protocol/contracts/bridge/Bridge.sol index de6979654e0..a139e00824e 100644 --- a/packages/protocol/contracts/bridge/Bridge.sol +++ b/packages/protocol/contracts/bridge/Bridge.sol @@ -49,11 +49,12 @@ contract Bridge is EssentialContract, IBridge, BridgeErrors { * External Functions* *********************/ - /// Allow Bridge to receive ETH from the TokenVault or EtherVault. + /// Allow Bridge to receive ETH from the TaikoL1, TokenVault or EtherVault. receive() external payable { if ( msg.sender != resolve("token_vault", true) && msg.sender != resolve("ether_vault", true) && + msg.sender != resolve("taiko", true) && msg.sender != owner() ) { revert B_CANNOT_RECEIVE(); diff --git a/packages/protocol/script/DeployOnL1.s.sol b/packages/protocol/script/DeployOnL1.s.sol index 3fda9c85563..dbd09bd7d79 100644 --- a/packages/protocol/script/DeployOnL1.s.sol +++ b/packages/protocol/script/DeployOnL1.s.sol @@ -146,6 +146,7 @@ contract DeployOnL1 is Script { ) ) ); + setAddress("taiko", taikoL1Proxy); setAddress("proto_broker", taikoL1Proxy); // Bridge