Skip to content

Commit

Permalink
rm peerChainId
Browse files Browse the repository at this point in the history
  • Loading branch information
simplemachine92 committed Jun 19, 2024
1 parent d33f35f commit 45b116a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
13 changes: 1 addition & 12 deletions src/JBCCIPSucker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ contract JBCCIPSucker is JBSucker {
JBSucker(directory, tokens, permissions, atbMode)
{}

//*********************************************************************//
// ------------------------ external views --------------------------- //
//*********************************************************************//

/// @notice Returns the chain on which the peer is located.
/// @return chainId of the peer.
/// TODO: Check this, maybe remove from impl or return dummy info to keep interface the same.
function peerChainID() external view virtual override returns (uint256 chainId) {}

//*********************************************************************//
// --------------------- internal transactions ----------------------- //
//*********************************************************************//
Expand All @@ -63,7 +54,6 @@ contract JBCCIPSucker is JBSucker {
internal
override
{
// TODO: Require transportPayment, CCIP expects to be paid
if (transportPayment == 0) {
revert UNEXPECTED_MSG_VALUE();
}
Expand All @@ -76,7 +66,6 @@ contract JBCCIPSucker is JBSucker {
uint64 nonce = ++outbox[token][remoteSelector].nonce;

// Ensure the token is mapped to an address on the remote chain.
// TODO: re-enable
if (remoteToken.addr == address(0)) {
revert TOKEN_NOT_MAPPED(token);
}
Expand Down Expand Up @@ -116,7 +105,7 @@ contract JBCCIPSucker is JBSucker {
/* messageId = */
router.ccipSend{value: fees}({destinationChainSelector: remoteSelector, message: evm2AnyMessage});

// TODO: Refund remaining balance.
// Refund remaining balance.
(bool sent,) = msg.sender.call{value: msg.value - fees}("");
if (!sent) revert FailedToRefundFee();

Expand Down
4 changes: 0 additions & 4 deletions src/JBSucker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,6 @@ abstract contract JBSucker is JBPermissioned, ModifiedReceiver, IJBSucker {
return remoteTokenFor[token].addr != address(0);
}

/// @notice Returns the chain on which the peer is located.
/// @return chain ID of the peer.
function peerChainID() external view virtual returns (uint256);

//*********************************************************************//
// --------------------- internal transactions ----------------------- //
//*********************************************************************//
Expand Down
2 changes: 0 additions & 2 deletions src/interfaces/IJBSucker.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ pragma solidity ^0.8.0;
import {JBTokenMapping} from "../structs/JBTokenMapping.sol";

interface IJBSucker {
function peerChainID() external view returns (uint256 chainId);

function isMapped(address token) external view returns (bool);

function prepare(
Expand Down

0 comments on commit 45b116a

Please sign in to comment.