Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrum deploy #712

Merged
merged 28 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
40f2e2b
Arbitrum deployment
scott-silver Mar 1, 2023
80fd3b9
Arbitrum mainnet (#717)
scott-silver Mar 17, 2023
28a8bff
CometRewards with multiplier (#702)
kevincheng96 Mar 20, 2023
d54f91b
restore hardhat-etherscan version; createCrossChainProposal; Goerli l…
scott-silver Mar 21, 2023
0170650
update ArbitrumBridgeScenario
scott-silver Mar 21, 2023
c405edf
refactor, rename in relayArbitrumMessage
scott-silver Mar 21, 2023
856d916
Pin Solidity version (#731)
scott-silver Apr 10, 2023
2d028d1
replace LINK with ARB
scott-silver Apr 10, 2023
377dc72
pull in ARB in deploy.ts
scott-silver Apr 10, 2023
0730456
replace nock with undici in VerifyTest
scott-silver Apr 11, 2023
f1af805
specify shanghai hardfork
scott-silver Apr 11, 2023
28a80ee
Emit event when setting rewards claimed (#736)
kevincheng96 Apr 13, 2023
a8fe8c3
Update aliases to include arbitrum prefix
kevincheng96 Apr 21, 2023
06203f8
updates from #719 to enable proposals
scott-silver Apr 21, 2023
40f8084
Fix spidering when using explicit address in relations config; use ad…
kevincheng96 Apr 21, 2023
dc90eeb
Adjust timelock delay on testnet
kevincheng96 Apr 21, 2023
c5978fc
Move arbitrum cross-chain scenario into cross-chain governance scenar…
kevincheng96 Apr 21, 2023
3f9c3ae
Add pauseGuardian for arbitrum goerli
kevincheng96 Apr 21, 2023
0ae8724
Add custom chain for arbitrum goerli to verify on etherscan
kevincheng96 Apr 24, 2023
55023e5
Add api key for arbitrum goerli
kevincheng96 Apr 24, 2023
de5a7c2
Modified deployment roots from GitHub Actions
Apr 24, 2023
91b1db8
add Arbitrum pauseGuardian address to config
scott-silver Apr 25, 2023
be3e83a
SweepableBridgeReceiver, tests (#733)
scott-silver May 4, 2023
d58d6e5
Add custom chain in hardhat etherscan config for arbitrum
kevincheng96 May 4, 2023
6949eda
Modified deployment roots from GitHub Actions
May 4, 2023
9c3d22d
Arbitrum proposals (#719)
scott-silver May 10, 2023
a2aecea
Small fixes for Arbitrum scenarios
kevincheng96 May 15, 2023
c807954
Some more scenario fixes
kevincheng96 May 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/deploy-market.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
- goerli
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
deployment:
description: Deployment Name (e.g. "usdc")
required: true
Expand All @@ -29,11 +31,12 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
steps:
- name: Seacrest
uses: hayesgm/seacrest@v1
with:
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"kovan\":\"https://kovan-eth.compound.finance\",\"mainnet\":\"https://mainnet-eth.compound.finance\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"kovan\":\"https://kovan-eth.compound.finance\",\"mainnet\":\"https://mainnet-eth.compound.finance\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/enact-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
- goerli
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
deployment:
description: Deployment Name (e.g. "usdc")
required: true
Expand All @@ -37,13 +39,14 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
steps:
- name: Get governance network
run: |
case ${{ github.event.inputs.network }} in
polygon)
polygon | arbitrum)
echo "GOV_NETWORK=mainnet" >> $GITHUB_ENV ;;
mumbai)
mumbai | arbitrum-goerli)
echo "GOV_NETWORK=goerli" >> $GITHUB_ENV ;;
*)
echo "No governance network for selected network" ;;
Expand All @@ -52,14 +55,14 @@ jobs:
- name: Seacrest
uses: hayesgm/seacrest@v1
with:
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"kovan\":\"https://kovan.infura.io/v3/$INFURA_KEY\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"kovan\":\"https://kovan.infura.io/v3/$INFURA_KEY\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

- name: Seacrest (governance network)
uses: hayesgm/seacrest@v1
with:
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"kovan\":\"https://kovan.infura.io/v3/$INFURA_KEY\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\"}')[env.GOV_NETWORK] }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"kovan\":\"https://kovan.infura.io/v3/$INFURA_KEY\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[env.GOV_NETWORK] }}"
port: 8685
if: github.event.inputs.eth_pk == '' && env.GOV_NETWORK != ''

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/prepare-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
- goerli
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
deployment:
description: Deployment Name (e.g. "usdc")
required: true
Expand All @@ -32,11 +34,12 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
steps:
- name: Seacrest
uses: hayesgm/seacrest@v1
with:
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"kovan\":\"https://kovan.infura.io/v3/$INFURA_KEY\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"kovan\":\"https://kovan.infura.io/v3/$INFURA_KEY\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-contract-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
steps:
- uses: actions/checkout@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-eslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-forge-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}

- name: Build Comet with older solc versions
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-gas-profiler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ jobs:
strategy:
fail-fast: false
matrix:
bases: [ development, mainnet, mainnet-weth, goerli, goerli-weth, fuji, mumbai, polygon ]
bases: [ development, mainnet, mainnet-weth, goerli, goerli-weth, fuji, mumbai, polygon, arbitrum, arbitrum-goerli ]
name: Run scenarios
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
44 changes: 40 additions & 4 deletions contracts/CometRewards.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ contract CometRewards {
address token;
uint64 rescaleFactor;
bool shouldUpscale;
// Note: We define new variables after existing variables to keep interface backwards-compatible
uint256 multiplier;
}

struct RewardOwed {
Expand All @@ -30,14 +32,19 @@ contract CometRewards {
/// @notice Rewards claimed per Comet instance and user account
mapping(address => mapping(address => uint)) public rewardsClaimed;

/// @dev The scale for factors
uint256 internal constant FACTOR_SCALE = 1e18;

/** Custom events **/

event GovernorTransferred(address indexed oldGovernor, address indexed newGovernor);
event RewardsClaimedSet(address indexed user, address indexed comet, uint256 amount);
event RewardClaimed(address indexed src, address indexed recipient, address indexed token, uint256 amount);

/** Custom errors **/

error AlreadyConfigured(address);
error BadData();
error InvalidUInt64(uint);
error NotPermitted(address);
error NotSupported(address);
Expand All @@ -55,8 +62,9 @@ contract CometRewards {
* @notice Set the reward token for a Comet instance
* @param comet The protocol instance
* @param token The reward token address
* @param multiplier The multiplier for converting a unit of accrued tracking to a unit of the reward token
*/
function setRewardConfig(address comet, address token) external {
function setRewardConfigWithMultiplier(address comet, address token, uint256 multiplier) public {
if (msg.sender != governor) revert NotPermitted(msg.sender);
if (rewardConfig[comet].token != address(0)) revert AlreadyConfigured(comet);

Expand All @@ -67,17 +75,45 @@ contract CometRewards {
rewardConfig[comet] = RewardConfig({
token: token,
rescaleFactor: accrualScale / tokenScale,
shouldUpscale: false
shouldUpscale: false,
multiplier: multiplier
});
} else {
rewardConfig[comet] = RewardConfig({
token: token,
rescaleFactor: tokenScale / accrualScale,
shouldUpscale: true
shouldUpscale: true,
multiplier: multiplier
});
}
}

/**
* @notice Set the reward token for a Comet instance
* @param comet The protocol instance
* @param token The reward token address
*/
function setRewardConfig(address comet, address token) external {
setRewardConfigWithMultiplier(comet, token, FACTOR_SCALE);
}

/**
* @notice Set the rewards claimed for a list of users
* @param comet The protocol instance to populate the data for
* @param users The list of users to populate the data for
* @param claimedAmounts The list of claimed amounts to populate the data with
*/
function setRewardsClaimed(address comet, address[] calldata users, uint[] calldata claimedAmounts) external {
if (msg.sender != governor) revert NotPermitted(msg.sender);
if (users.length != claimedAmounts.length) revert BadData();

for (uint i = 0; i < users.length; ) {
rewardsClaimed[comet][users[i]] = claimedAmounts[i];
emit RewardsClaimedSet(users[i], comet, claimedAmounts[i]);
unchecked { i++; }
}
}

/**
* @notice Withdraw tokens from the contract
* @param token The reward token address
Expand Down Expand Up @@ -176,7 +212,7 @@ contract CometRewards {
} else {
accrued /= config.rescaleFactor;
}
return accrued;
return accrued * config.multiplier / FACTOR_SCALE;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/IGovernorBravo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ interface IGovernorBravo {
bytes[] memory calldatas,
string memory description
) external returns (uint256 proposalId);
function queue(uint256 proposalId) external payable;
function execute(uint256 proposalId) external payable;
function queue(uint256 proposalId) external;
function execute(uint256 proposalId) external;
function castVote(uint256 proposalId, uint8 support) external returns (uint256 balance);
function getActions(uint proposalId) external view returns (
address[] memory targets,
Expand Down
62 changes: 62 additions & 0 deletions contracts/bridges/SweepableBridgeReceiver.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.15;

import "../IERC20NonStandard.sol";
import "./BaseBridgeReceiver.sol";

contract SweepableBridgeReceiver is BaseBridgeReceiver {
error FailedToSendNativeToken();
error TransferOutFailed();

/**
* @notice A public function to sweep accidental ERC-20 transfers to this contract
* @dev Note: Make sure to check that the asset being swept out is not malicious
* @param recipient The address that will receive the swept funds
* @param asset The address of the ERC-20 token to sweep
*/
function sweepToken(address recipient, address asset) external {
if (msg.sender != localTimelock) revert Unauthorized();

uint256 balance = IERC20NonStandard(asset).balanceOf(address(this));
doTransferOut(asset, recipient, balance);
}

/**
* @notice A public function to sweep accidental native token transfers to this contract
* @param recipient The address that will receive the swept funds
*/
function sweepNativeToken(address recipient) external {
if (msg.sender != localTimelock) revert Unauthorized();

uint256 balance = address(this).balance;
(bool success, ) = recipient.call{ value: balance }("");
if (!success) revert FailedToSendNativeToken();
}

/**
* @notice Similar to ERC-20 transfer, except it properly handles `transfer` from non-standard ERC-20 tokens
* @param asset The ERC-20 token to transfer out
* @param to The recipient of the token transfer
* @param amount The amount of the token to transfer
* @dev Note: This wrapper safely handles non-standard ERC-20 tokens that do not return a value. See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca
*/
function doTransferOut(address asset, address to, uint amount) internal {
IERC20NonStandard(asset).transfer(to, amount);

bool success;
assembly {
switch returndatasize()
case 0 { // This is a non-standard ERC-20
success := not(0) // set success to true
}
case 32 { // This is a compliant ERC-20
returndatacopy(0, 0, 32)
success := mload(0) // Set `success = returndata` of override external call
}
default { // This is an excessively non-compliant ERC-20, revert.
revert(0, 0)
}
}
if (!success) revert TransferOutFailed();
}
}
39 changes: 39 additions & 0 deletions contracts/bridges/arbitrum/AddressAliasHelper.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// SPDX-License-Identifier: Apache-2.0

/*
* Copyright 2019-2021, Offchain Labs, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

pragma solidity 0.8.15;

library AddressAliasHelper {
uint160 constant offset = uint160(0x1111000000000000000000000000000000001111);

/// @notice Utility function that converts the address in the L1 that submitted a tx to
/// the inbox to the msg.sender viewed in the L2
/// @param l1Address the address in the L1 that triggered the tx to L2
/// @return l2Address L2 address as viewed in msg.sender
function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) {
l2Address = address(uint160(l1Address) + offset);
}

/// @notice Utility function that converts the msg.sender viewed in the L2 to the
/// address in the L1 that submitted a tx to the inbox
/// @param l2Address L2 address as viewed in msg.sender
/// @return l1Address the address in the L1 that triggered the tx to L2
function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) {
l1Address = address(uint160(l2Address) - offset);
}
}
11 changes: 11 additions & 0 deletions contracts/bridges/arbitrum/ArbitrumBridgeReceiver.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.15;

import "../SweepableBridgeReceiver.sol";
import "./AddressAliasHelper.sol";

contract ArbitrumBridgeReceiver is SweepableBridgeReceiver {
fallback() external payable {
processMessage(AddressAliasHelper.undoL1ToL2Alias(msg.sender), msg.data);
}
}
15 changes: 15 additions & 0 deletions contracts/bridges/test/SweepableBridgeReceiverHarness.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.15;

import "../SweepableBridgeReceiver.sol";

contract SweepableBridgeReceiverHarness is SweepableBridgeReceiver {
function processMessageExternal(
address rootMessageSender,
bytes calldata data
) external {
processMessage(rootMessageSender, data);
}

fallback() external payable { }
}
Loading