Skip to content

Commit

Permalink
remove hard coded arbitrum
Browse files Browse the repository at this point in the history
  • Loading branch information
hexonaut committed Mar 26, 2024
1 parent 978025b commit 37f0979
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 53 deletions.
50 changes: 0 additions & 50 deletions src/XChainForwarders.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,6 @@ library XChainForwarders {
);
}

function sendMessageArbitrum(
address l1CrossDomain,
address target,
bytes memory message,
uint256 gasLimit
) internal {
sendMessageArbitrum(
l1CrossDomain,
target,
message,
gasLimit,
// These constants are reasonable estimates based on current market conditions
// They can be updated as needed
1 gwei,
block.basefee + 10 gwei
);
}

function sendMessageArbitrumOne(
address target,
bytes memory message,
Expand All @@ -139,22 +121,6 @@ library XChainForwarders {
);
}

function sendMessageArbitrumOne(
address target,
bytes memory message,
uint256 gasLimit
) internal {
sendMessageArbitrumOne(
target,
message,
gasLimit,
// These constants are reasonable estimates based on current market conditions
// They can be updated as needed
1 gwei,
block.basefee + 10 gwei
);
}

function sendMessageArbitrumNova(
address target,
bytes memory message,
Expand All @@ -172,22 +138,6 @@ library XChainForwarders {
);
}

function sendMessageArbitrumNova(
address target,
bytes memory message,
uint256 gasLimit
) internal {
sendMessageArbitrumNova(
target,
message,
gasLimit,
// These constants are reasonable estimates based on current market conditions
// They can be updated as needed
1 gwei,
block.basefee + 10 gwei
);
}

/// ================================ Gnosis ================================

function sendMessageGnosis(
Expand Down
12 changes: 9 additions & 3 deletions test/ArbitrumIntegration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,17 @@ contract ArbitrumIntegrationTest is IntegrationBaseTest {
address(arbitrum.INBOX()),
address(moArbitrum),
abi.encodeWithSelector(MessageOrdering.push.selector, 1),
100000
100000,
1 gwei,
block.basefee + 10 gwei
);
XChainForwarders.sendMessageArbitrum(
address(arbitrum.INBOX()),
address(moArbitrum),
abi.encodeWithSelector(MessageOrdering.push.selector, 2),
100000
100000,
1 gwei,
block.basefee + 10 gwei
);
vm.stopPrank();

Expand All @@ -92,7 +96,9 @@ contract ArbitrumIntegrationTest is IntegrationBaseTest {
address(arbitrum.INBOX()),
address(moArbitrum),
abi.encodeWithSelector(MessageOrdering.push.selector, 999),
100000
100000,
1 gwei,
block.basefee + 10 gwei
);
vm.stopPrank();

Expand Down

0 comments on commit 37f0979

Please sign in to comment.