Skip to content

Commit

Permalink
style: remove unused member instantrouter
Browse files Browse the repository at this point in the history
  • Loading branch information
easonchan17 committed Feb 29, 2024
1 parent 0a7445e commit a8c67ae
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
14 changes: 0 additions & 14 deletions contracts/routers/CcTransferRouterLogic.sol
Expand Up @@ -93,13 +93,6 @@ contract CcTransferRouterLogic is ICcTransferRouter, CcTransferRouterStorage,
_setLockers(_lockers);
}

/// @notice Setter for instant router
/// @dev Only owner can call this
/// @param _instantRouter Address of the instant router contract
function setInstantRouter(address _instantRouter) external override nonZeroAddress(_instantRouter) onlyOwner {
_setInstantRouter(_instantRouter);
}

/// @notice Setter for coreBTC
/// @dev Only owner can call this
/// @param _coreBTC CoreDAO BTC ERC20 token address
Expand Down Expand Up @@ -148,13 +141,6 @@ contract CcTransferRouterLogic is ICcTransferRouter, CcTransferRouterStorage,
lockers = _lockers;
}

/// @notice Internal setter for instant router
/// @param _instantRouter Address of the instant router contract
function _setInstantRouter(address _instantRouter) private nonZeroAddress(_instantRouter) {
emit NewInstantRouter(instantRouter, _instantRouter);
instantRouter = _instantRouter;
}

/// @notice Internal setter for coreBTC
/// @param _coreBTC CoreDAO BTC ERC20 token address
function _setCoreBTC(address _coreBTC) private nonZeroAddress(_coreBTC) {
Expand Down
1 change: 0 additions & 1 deletion contracts/routers/CcTransferRouterStorage.sol
Expand Up @@ -17,7 +17,6 @@ contract CcTransferRouterStorage is ICcTransferRouterStorage {
address public override relay;
address public override lockers;
address public override coreBTC;
address public override instantRouter;
address public override treasury;
mapping(bytes32 => ccTransferRequest) public ccTransferRequests; // TxId to ccTransferRequest structure

Expand Down
18 changes: 5 additions & 13 deletions contracts/routers/interfaces/ICcTransferRouter.sol
Expand Up @@ -31,37 +31,31 @@ interface ICcTransferRouter {

/// @notice Emits when changes made to relay address
event NewRelay (
address oldRelay,
address oldRelay,
address newRelay
);

/// @notice Emits when changes made to InstantRouter address
event NewInstantRouter (
address oldInstantRouter,
address newInstantRouter
);

/// @notice Emits when changes made to Lockers address
event NewLockers (
address oldLockers,
address oldLockers,
address newLockers
);

/// @notice Emits when changes made to CoreBTC address
event NewCoreBTC (
address oldCoreBTC,
address oldCoreBTC,
address newCoreBTC
);

/// @notice Emits when changes made to protocol percentage fee
event NewProtocolPercentageFee (
uint oldProtocolPercentageFee,
uint oldProtocolPercentageFee,
uint newProtocolPercentageFee
);

/// @notice Emits when changes made to Treasury address
event NewTreasury (
address oldTreasury,
address oldTreasury,
address newTreasury
);

Expand All @@ -75,8 +69,6 @@ interface ICcTransferRouter {

function setRelay(address _relay) external;

function setInstantRouter(address _instantRouter) external;

function setLockers(address _lockers) external;

function setCoreBTC(address _coreBTC) external;
Expand Down
8 changes: 3 additions & 5 deletions contracts/routers/interfaces/ICcTransferRouterStorage.sol
Expand Up @@ -18,21 +18,19 @@ interface ICcTransferRouterStorage {
}

// Read-only functions

function startingBlockNumber() external view returns (uint);

function protocolPercentageFee() external view returns (uint);

function version() external view returns (uint);

function chainId() external view returns (uint);

function appId() external view returns (uint);

function relay() external view returns (address);

function instantRouter() external view returns (address);

function lockers() external view returns (address);

function coreBTC() external view returns (address);
Expand Down

0 comments on commit a8c67ae

Please sign in to comment.