Skip to content

Commit a58c170

Browse files
committed
Fix fork tests
1 parent 435b5db commit a58c170

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

solidity/test/token/EverclearTokenBridge.t.sol

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,17 @@ contract EverclearTokenBridgeForkTest is BaseEverclearTokenBridgeForkTest {
755755
uint256 initialBalance = weth.balanceOf(ALICE);
756756
uint256 initialBridgeBalance = weth.balanceOf(address(bridge));
757757

758+
// Get the gas payment quote
759+
Quote[] memory quotes = bridge.quoteTransferRemote(
760+
OPTIMISM_DOMAIN,
761+
RECIPIENT,
762+
amount
763+
);
764+
uint256 gasPayment = quotes[0].amount;
765+
766+
// Give Alice ETH for gas payment
767+
vm.deal(ALICE, gasPayment);
768+
758769
// Test the transfer - it may succeed or fail depending on adapter state
759770
vm.prank(ALICE);
760771
// We don't want to check _intentId, as it's not used
@@ -769,7 +780,11 @@ contract EverclearTokenBridgeForkTest is BaseEverclearTokenBridgeForkTest {
769780
_tokenFee: FEE_AMOUNT,
770781
_nativeFee: 0
771782
});
772-
bridge.transferRemote(OPTIMISM_DOMAIN, RECIPIENT, amount);
783+
bridge.transferRemote{value: gasPayment}(
784+
OPTIMISM_DOMAIN,
785+
RECIPIENT,
786+
amount
787+
);
773788

774789
// Verify the balance changes
775790
// Alice should have lost the transfer amount and the fee

0 commit comments

Comments
 (0)