Skip to content

Commit

Permalink
L1Gateway set owner by parameter on constructor to make it deployable…
Browse files Browse the repository at this point in the history
… using CREATE3
  • Loading branch information
lmcorbalan committed May 3, 2024
1 parent 016980a commit b81010a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/L1XERC20Gateway.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { XERC20BaseGateway } from "src/XERC20BaseGateway.sol";
* @title Gateway for xERC20 bridging functionality
*/
contract L1XERC20Gateway is XERC20BaseGateway, L1CustomGateway {
constructor(address _l1Router, address _inbox) {
constructor(address _owner, address _l1Router, address _inbox) {
address _l2Counterpart = address(this);
initialize(_l2Counterpart, _l1Router, _inbox, msg.sender);
initialize(_l2Counterpart, _l1Router, _inbox, _owner);
}

function outboundEscrowTransfer(
Expand Down
2 changes: 1 addition & 1 deletion test/L1XERC20Gateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract L1XERC20GatewayTest is Test {

function setUp() public {
xerc20 = new XERC20("NonArbitrumEnabled", "NON", _owner);
gateway = new L1XERC20Gateway(makeAddr("router"), makeAddr("inbox"));
gateway = new L1XERC20Gateway(_owner, makeAddr("router"), makeAddr("inbox"));
adapter = new L1XERC20Adapter(address(xerc20), address(gateway));
}

Expand Down
2 changes: 1 addition & 1 deletion test/forking/L1XERC20Gateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract L1XERC20GatewayTest is Test {

mainnetFork = vm.createSelectFork("mainnet", 19_690_420);

l1Gateway = new L1XERC20Gateway(l1GatewayRouter, l1Inbox);
l1Gateway = new L1XERC20Gateway(_owner, l1GatewayRouter, l1Inbox);

xerc20 = new XERC20("NonArbitrumEnabled", "NON", _owner);
vm.deal(_owner, 100 ether);
Expand Down

0 comments on commit b81010a

Please sign in to comment.