File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed
contracts/tokenbridge/ethereum/gateway Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ contract L1OrbitCustomGateway is L1CustomGateway {
8989 uint256 _gasPriceBid ,
9090 uint256 _maxSubmissionCost ,
9191 uint256 _feeAmount
92- ) external payable onlyOwner returns (uint256 ) {
92+ ) external onlyOwner returns (uint256 ) {
9393 return
9494 _forceRegisterTokenToL2 (
9595 _l1Addresses,
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ contract L1OrbitERC20Gateway is L1ERC20Gateway {
2525 uint256 _gasPriceBid ,
2626 bytes calldata _data
2727 ) public payable override returns (bytes memory res ) {
28+ // fees are paid in native token, so there is no use for ether
29+ require (msg .value == 0 , "NO_VALUE " );
30+
2831 // We don't allow bridging of native token to avoid having multiple representations of it
2932 // on child chain. Native token can be bridged directly through inbox using depositERC20().
3033 require (_l1Token != _getNativeFeeToken (), "NOT_ALLOWED_TO_BRIDGE_FEE_TOKEN " );
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ abstract contract L1ArbitrumExtendedGatewayTest is Test {
146146
147147 vm.prank (router);
148148 vm.expectRevert ("EXTRA_DATA_DISABLED " );
149- l1Gateway.outboundTransferCustomRefund { value: 1 ether } (
149+ l1Gateway.outboundTransferCustomRefund (
150150 address (token),
151151 user,
152152 user,
@@ -162,7 +162,7 @@ abstract contract L1ArbitrumExtendedGatewayTest is Test {
162162
163163 vm.prank (router);
164164 vm.expectRevert ("L1_NOT_CONTRACT " );
165- l1Gateway.outboundTransferCustomRefund { value: 1 ether } (
165+ l1Gateway.outboundTransferCustomRefund (
166166 address (invalidTokenAddress),
167167 user,
168168 user,
@@ -175,7 +175,7 @@ abstract contract L1ArbitrumExtendedGatewayTest is Test {
175175
176176 function test_outboundTransferCustomRefund_revert_NotFromRouter () public {
177177 vm.expectRevert ("NOT_FROM_ROUTER " );
178- l1Gateway.outboundTransferCustomRefund { value: 1 ether } (
178+ l1Gateway.outboundTransferCustomRefund (
179179 address (token),
180180 user,
181181 user,
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ contract L1ERC20GatewayTest is L1ArbitrumExtendedGatewayTest {
182182
183183 vm.prank (router);
184184 vm.expectRevert ("ERC20: insufficient allowance " );
185- l1Gateway.outboundTransferCustomRefund { value: 1 ether } (
185+ l1Gateway.outboundTransferCustomRefund (
186186 address (token),
187187 user,
188188 user,
You can’t perform that action at this time.
0 commit comments