Skip to content

Commit 4594188

Browse files
committed
v0.7.3
1 parent 22ea37d commit 4594188

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

src/solidity/LegacyBridge.sol

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ abstract contract LegacyBridge is StarknetTokenBridge, OverrideLegacyProxyGovern
129129
payload[2] = amount_low;
130130
payload[3] = amount_high;
131131
messagingContract().consumeMessageFromL2(l2TokenBridge(), payload);
132+
133+
// The old msg format is valid only for the legacy bridged token.
134+
// Since the withdraw flow can be token-explicit with any token,
135+
// we must enforce that the token is identical to the legacy token.
136+
require(bridgedToken() == token, "NOT_LEGACY_BRIDGED_TOKEN");
132137
}
133138
}
134139

src/solidity/StarknetERC20Bridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ import "src/solidity/LegacyBridge.sol";
55

66
contract StarknetERC20Bridge is LegacyBridge {
77
function identify() external pure override returns (string memory) {
8-
return "StarkWare_StarknetERC20Bridge_2.0_4";
8+
return "StarkWare_StarknetERC20Bridge_2.0_5";
99
}
1010
}

src/solidity/StarknetEthBridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ contract StarknetEthBridge is LegacyBridge {
99
using Addresses for address;
1010

1111
function identify() external pure override returns (string memory) {
12-
return "StarkWare_StarknetEthBridge_2.0_4";
12+
return "StarkWare_StarknetEthBridge_2.0_5";
1313
}
1414

1515
function acceptDeposit(

src/solidity/StarknetTokenBridge.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ contract StarknetTokenBridge is
9191
uint256 constant DEPOSIT_MESSAGE_FIXED_SIZE = 1;
9292

9393
function identify() external pure virtual returns (string memory) {
94-
return "StarkWare_StarknetTokenBridge_2.0_4";
94+
return "StarkWare_StarknetTokenBridge_2.0_5";
9595
}
9696

9797
function validateInitData(bytes calldata data) internal view virtual override {

0 commit comments

Comments
 (0)