Skip to content

Commit b7c92da

Browse files
fix: revert mistaken variable naming
1 parent b43fb66 commit b7c92da

8 files changed

+358
-48
lines changed

contracts/src/FastBridgeReceiverOnEthereum.sol

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22

33
/**
4-
* @authors: [@jaybuidl, @shotaronowhere, @hrishibhat, @adi274]
4+
* @authors: [@jaybuidl, @shotaronowhere, @hrishibhat]
55
* @reviewers: []
66
* @auditors: []
77
* @bounties: []
@@ -36,30 +36,30 @@ contract FastBridgeReceiverOnEthereum is IFastBridgeReceiver, ISafeBridgeReceive
3636
// * Views * //
3737
// ************************************* //
3838

39-
function isSentBySafeBridge() internal view virtual override returns (bool) {
39+
function isSentBySafeBridge() internal view override returns (bool) {
4040
IOutbox outbox = IOutbox(inbox.bridge().activeOutbox());
41-
return (msg.sender == address(outbox) && outbox.l2ToL1Sender() == fastBridgeSender);
41+
return outbox.l2ToL1Sender() == safeBridgeSender;
4242
}
4343

4444
/**
4545
* @dev Constructor.
4646
* @param _deposit The deposit amount to submit a claim in wei.
4747
* @param _epochPeriod The duration of each epoch.
4848
* @param _challengePeriod The duration of the period allowing to challenge a claim.
49-
* @param _fastBridgeSender The address of the Safe Bridge Sender on the connecting chain.
49+
* @param _safeBridgeSender The address of the Safe Bridge Sender on the connecting chain.
5050
* @param _inbox Ethereum receiver specific: The address of the inbox contract on Ethereum.
5151
*/
5252
constructor(
5353
uint256 _deposit,
5454
uint256 _epochPeriod,
5555
uint256 _challengePeriod,
56-
address _fastBridgeSender,
56+
address _safeBridgeSender,
5757
address _inbox // Ethereum receiver specific
5858
) {
5959
deposit = _deposit;
6060
epochPeriod = _epochPeriod;
6161
challengePeriod = _challengePeriod;
62-
fastBridgeSender = _fastBridgeSender;
62+
safeBridgeSender = _safeBridgeSender;
6363
inbox = IInbox(_inbox); // Ethereum receiver specific
6464
}
6565

@@ -95,7 +95,7 @@ contract FastBridgeReceiverOnEthereum is IFastBridgeReceiver, ISafeBridgeReceive
9595
uint256 public immutable deposit; // The deposit required to submit a claim or challenge
9696
uint256 public immutable override epochPeriod; // Epochs mark the period between potential batches of messages.
9797
uint256 public immutable override challengePeriod; // Epochs mark the period between potential batches of messages.
98-
address public immutable fastBridgeSender; // The address of the Safe Bridge Sender on the connecting chain.
98+
address public immutable safeBridgeSender; // The address of the Safe Bridge Sender on the connecting chain.
9999

100100
mapping(uint256 => bytes32) public fastInbox; // epoch => validated batch merkle root(optimistically, or challenged and verified with the safe bridge)
101101
mapping(uint256 => Claim) public claims; // epoch => claim

contracts/src/FastBridgeReceiverOnGnosis.sol

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22

33
/**
4-
* @authors: [@jaybuidl, @shotaronowhere, @hrishibhat, @adi274]
4+
* @authors: [@jaybuidl, @shotaronowhere, @hrishibhat]
55
* @reviewers: []
66
* @auditors: []
77
* @bounties: []
@@ -36,28 +36,28 @@ contract FastBridgeReceiverOnGnosis is IFastBridgeReceiver, ISafeBridgeReceiver
3636
// ************************************* //
3737

3838
function isSentBySafeBridge() internal view override returns (bool) {
39-
return (msg.sender == address(amb)) && (amb.messageSender() == fastBridgeSender);
39+
return (msg.sender == address(amb)) && (amb.messageSender() == safeBridgeSender);
4040
}
4141

4242
/**
4343
* @dev Constructor.
4444
* @param _deposit The deposit amount to submit a claim in wei.
4545
* @param _epochPeriod The duration of each epoch.
4646
* @param _challengePeriod The duration of the period allowing to challenge a claim.
47-
* @param _fastBridgeSender The address of the Safe Bridge Sender on the connecting chain.
47+
* @param _safeBridgeSender The address of the Safe Bridge Sender on the connecting chain.
4848
* @param _amb The AMB contract on Gnosis Chain.
4949
*/
5050
constructor(
5151
uint256 _deposit,
5252
uint256 _epochPeriod,
5353
uint256 _challengePeriod,
54-
address _fastBridgeSender, // Gnosis receiver specific
54+
address _safeBridgeSender, // Gnosis receiver specific
5555
address _amb // Gnosis receiver specific
5656
) {
5757
deposit = _deposit;
5858
epochPeriod = _epochPeriod;
5959
challengePeriod = _challengePeriod;
60-
fastBridgeSender = _fastBridgeSender;
60+
safeBridgeSender = _safeBridgeSender;
6161
amb = IAMB(_amb); // Gnosis receiver specific
6262
}
6363

@@ -93,7 +93,7 @@ contract FastBridgeReceiverOnGnosis is IFastBridgeReceiver, ISafeBridgeReceiver
9393
uint256 public immutable deposit; // The deposit required to submit a claim or challenge
9494
uint256 public immutable override epochPeriod; // Epochs mark the period between potential batches of messages.
9595
uint256 public immutable override challengePeriod; // Epochs mark the period between potential batches of messages.
96-
address public immutable fastBridgeSender; // The address of the Safe Bridge Sender on the connecting chain.
96+
address public immutable safeBridgeSender; // The address of the Safe Bridge Sender on the connecting chain.
9797

9898
mapping(uint256 => bytes32) public fastInbox; // epoch => validated batch merkle root(optimistically, or challenged and verified with the safe bridge)
9999
mapping(uint256 => Claim) public claims; // epoch => claim

contracts/src/FastBridgeReceiverOnPolygon.sol

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22

33
/**
4-
* @authors: [@jaybuidl, @shotaronowhere, @hrishibhat, @adi274]
4+
* @authors: [@jaybuidl, @shotaronowhere, @hrishibhat]
55
* @reviewers: []
66
* @auditors: []
77
* @bounties: []
@@ -38,21 +38,21 @@ contract FastBridgeReceiverOnPolygon is FxBaseChildTunnel, IFastBridgeReceiver,
3838
* @param _deposit The deposit amount to submit a claim in wei.
3939
* @param _epochPeriod The duration of each epoch.
4040
* @param _challengePeriod The duration of the period allowing to challenge a claim.
41-
* @param _fastBridgeSender The address of the Safe Bridge Sender on the connecting chain. fxRootTunnel contract in ethereum
41+
* @param _safeBridgeSender The address of the Safe Bridge Sender on the connecting chain. fxRootTunnel contract in ethereum
4242
* @param _fxChild The the fxChild contract on Polygon Chain.
4343
*/
4444
constructor(
4545
uint256 _deposit,
4646
uint256 _epochPeriod,
4747
uint256 _challengePeriod,
48-
address _fastBridgeSender, // Polygon receiver specific
48+
address _safeBridgeSender, // Polygon receiver specific
4949
address _fxChild // Polygon receiver specific
5050
) FxBaseChildTunnel(_fxChild) {
5151
deposit = _deposit;
5252
epochPeriod = _epochPeriod;
5353
challengePeriod = _challengePeriod;
54-
fastBridgeSender = _fastBridgeSender;
55-
setFxRootTunnel(_fastBridgeSender);
54+
safeBridgeSender = _safeBridgeSender;
55+
setFxRootTunnel(_safeBridgeSender);
5656
}
5757

5858
// ************************************** //
@@ -87,7 +87,7 @@ contract FastBridgeReceiverOnPolygon is FxBaseChildTunnel, IFastBridgeReceiver,
8787
uint256 public immutable deposit; // The deposit required to submit a claim or challenge
8888
uint256 public immutable override epochPeriod; // Epochs mark the period between potential batches of messages.
8989
uint256 public immutable override challengePeriod; // Epochs mark the period between potential batches of messages.
90-
address public immutable fastBridgeSender; // The address of the Safe Bridge Sender on the connecting chain.
90+
address public immutable safeBridgeSender; // The address of the Safe Bridge Sender on the connecting chain.
9191

9292
mapping(uint256 => bytes32) public fastInbox; // epoch => validated batch merkle root(optimistically, or challenged and verified with the safe bridge)
9393
mapping(uint256 => Claim) public claims; // epoch => claim

contracts/src/FastBridgeSender.sol

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22

33
/**
4-
* @authors: [@jaybuidl, @shotaronowhere, @adi274]
4+
* @authors: [@jaybuidl, @shotaronowhere]
55
* @reviewers: []
66
* @auditors: []
77
* @bounties: []
@@ -44,7 +44,7 @@ contract FastBridgeSender is IFastBridgeSender, ISafeBridgeSender {
4444
bytes4 methodSelector = ISafeBridgeReceiver.verifySafeBatch.selector;
4545
bytes memory safeMessageData = abi.encodeWithSelector(methodSelector, _epoch, batchMerkleRoot);
4646

47-
bytes32 ticketID = _sendSafe(fastBridgeReceiver, safeMessageData);
47+
bytes32 ticketID = _sendSafe(safeBridgeReceiver, safeMessageData);
4848
emit SentSafe(_epoch, ticketID);
4949
}
5050

@@ -56,11 +56,11 @@ contract FastBridgeSender is IFastBridgeSender, ISafeBridgeSender {
5656
/**
5757
* @dev Constructor.
5858
* @param _epochPeriod The duration between epochs.
59-
* @param _fastBridgeReceiver The the Safe Bridge Router on Ethereum to the receiving chain.
59+
* @param _safeBridgeReceiver The the Safe Bridge Router on Ethereum to the receiving chain.
6060
*/
61-
constructor(uint256 _epochPeriod, address _fastBridgeReceiver) {
61+
constructor(uint256 _epochPeriod, address _safeBridgeReceiver) {
6262
epochPeriod = _epochPeriod;
63-
fastBridgeReceiver = _fastBridgeReceiver;
63+
safeBridgeReceiver = _safeBridgeReceiver;
6464
unchecked {
6565
currentBatchID = block.timestamp / _epochPeriod - 1;
6666
}
@@ -79,7 +79,7 @@ contract FastBridgeSender is IFastBridgeSender, ISafeBridgeSender {
7979
uint256 public immutable epochPeriod; // Epochs mark the period between potential batches of messages.
8080
uint256 public currentBatchID;
8181
mapping(uint256 => bytes32) public fastOutbox; // epoch count => merkle root of batched messages
82-
address public immutable fastBridgeReceiver;
82+
address public immutable safeBridgeReceiver;
8383

8484
// merkle tree representation of a batch of messages
8585
// supports 2^64 messages.

contracts/src/SafeBridgeRouterToGnosis.sol

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22

33
/**
4-
* @authors: [@shotaronowhere, @jaybuidl, @adi274]
4+
* @authors: [@shotaronowhere, @jaybuidl]
55
* @reviewers: []
66
* @auditors: []
77
* @bounties: []
@@ -25,25 +25,25 @@ contract SafeBridgeRouter is ISafeBridgeRouter {
2525

2626
IInbox public immutable inbox; // The address of the Arbitrum Inbox contract.
2727
IAMB public immutable amb; // The address of the AMB contract on Ethereum.
28-
address public immutable fastBridgeSender; // The address of the Fast Bridge sender on Arbitrum.
28+
address public immutable safeBridgeSender; // The address of the Safe Bridge sender on Arbitrum.
2929
address public immutable fastBridgeReceiverOnGnosisChain; // The address of the Fast Bridge Receiver on Gnosis Chain.
3030

3131
/**
3232
* @dev Constructor.
3333
* @param _inbox The address of the inbox contract on Ethereum.
3434
* @param _amb The address of the AMB contract on Ethereum.
35-
* @param _fastBridgeSender The fast bridge sender on Arbitrum.
35+
* @param _safeBridgeSender The safe bridge sender on Arbitrum.
3636
* @param _fastBridgeReceiverOnGnosisChain The fast bridge receiver on Gnosis Chain.
3737
*/
3838
constructor(
3939
IInbox _inbox,
4040
IAMB _amb,
41-
address _fastBridgeSender,
41+
address _safeBridgeSender,
4242
address _fastBridgeReceiverOnGnosisChain
4343
) {
4444
inbox = _inbox;
4545
amb = _amb;
46-
fastBridgeSender = _fastBridgeSender;
46+
safeBridgeSender = _safeBridgeSender;
4747
fastBridgeReceiverOnGnosisChain = _fastBridgeReceiverOnGnosisChain;
4848
}
4949

@@ -74,6 +74,6 @@ contract SafeBridgeRouter is ISafeBridgeRouter {
7474

7575
function isSentBySafeBridge() internal view override returns (bool) {
7676
IOutbox outbox = IOutbox(inbox.bridge().activeOutbox());
77-
return outbox.l2ToL1Sender() == fastBridgeSender;
77+
return outbox.l2ToL1Sender() == safeBridgeSender;
7878
}
7979
}

contracts/src/SafeBridgeRouterToPolygon.sol

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22

33
/**
4-
* @authors: [@shotaronowhere, @hrishibhat, @jaybuidl, @adi274]
4+
* @authors: [@shotaronowhere, @hrishibhat, @jaybuidl]
55
* @reviewers: []
66
* @auditors: []
77
* @bounties: []
@@ -24,24 +24,24 @@ contract SafeBridgeRouterToPolygon is ISafeBridgeRouter, FxBaseRootTunnel {
2424
// ************************************* //
2525

2626
IInbox public immutable inbox; // The address of the Arbitrum Inbox contract.
27-
address public immutable fastBridgeSender; // The address of the Safe Bridge sender on Arbitrum.
27+
address public immutable safeBridgeSender; // The address of the Safe Bridge sender on Arbitrum.
2828

2929
/**
3030
* @dev Constructor.
3131
* @param _inbox The address of the inbox contract on Ethereum.
3232
* @param _fxRoot The address of the fxRoot contract in Ethereum.
33-
* @param _fastBridgeSender The safe bridge sender on Arbitrum.
33+
* @param _safeBridgeSender The safe bridge sender on Arbitrum.
3434
* @param _fastBridgeReceiverOnPolygon The fast bridge receiver on Polygon Chain.
3535
*/
3636
constructor(
3737
IInbox _inbox,
3838
address _checkpointManager,
3939
address _fxRoot,
40-
address _fastBridgeSender,
40+
address _safeBridgeSender,
4141
address _fastBridgeReceiverOnPolygon
4242
) FxBaseRootTunnel(_checkpointManager, _fxRoot) {
4343
inbox = _inbox;
44-
fastBridgeSender = _fastBridgeSender;
44+
safeBridgeSender = _safeBridgeSender;
4545
setFxChildTunnel(_fastBridgeReceiverOnPolygon);
4646
}
4747

@@ -80,6 +80,6 @@ contract SafeBridgeRouterToPolygon is ISafeBridgeRouter, FxBaseRootTunnel {
8080

8181
function isSentBySafeBridge() internal view override returns (bool) {
8282
IOutbox outbox = IOutbox(inbox.bridge().activeOutbox());
83-
return outbox.l2ToL1Sender() == fastBridgeSender;
83+
return outbox.l2ToL1Sender() == safeBridgeSender;
8484
}
8585
}

0 commit comments

Comments
 (0)