Skip to content

Commit

Permalink
chore: cleanup unused imports and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
0xIryna committed Nov 21, 2024
1 parent 4c0cdd6 commit af64f43
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/HubPortal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ contract HubPortal is IHubPortal, Portal {
function _sendMessage(
uint16 destinationChainId_,
bytes32 refundAddress_,
uint64 _sequence,
uint64 sequence_,
bytes memory payload_
) private returns (bytes32 messageId_) {
if (refundAddress_ == bytes32(0)) revert InvalidRefundAddress();
Expand All @@ -158,7 +158,7 @@ contract HubPortal is IHubPortal, Portal {
) = _prepareForTransfer(destinationChainId_, DEFAULT_TRANSCEIVER_INSTRUCTIONS);

TransceiverStructs.NttManagerMessage memory message_ = TransceiverStructs.NttManagerMessage(
bytes32(uint256(_sequence)),
bytes32(uint256(sequence_)),
msg.sender.toBytes32(),
payload_
);
Expand Down
2 changes: 0 additions & 2 deletions src/SpokePortal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

pragma solidity 0.8.26;

import { IERC20 } from "../lib/common/src/interfaces/IERC20.sol";
import { UIntMath } from "../lib/common/src/libs/UIntMath.sol";
import { IndexingMath } from "../lib/common/src/libs/IndexingMath.sol";

import { ISpokeMTokenLike } from "./interfaces/ISpokeMTokenLike.sol";
import { IRegistrarLike } from "./interfaces/IRegistrarLike.sol";
Expand Down
9 changes: 0 additions & 9 deletions test/harnesses/SpokePortalHarness.sol

This file was deleted.

3 changes: 1 addition & 2 deletions test/unit/Portal.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ contract PortalTests is UnitTestBase {
function test_handleMsg_invalidFork() external {
uint256 amount_ = 1_000e6;
uint128 index_ = 0;
uint256 msgValue_ = 2;
bytes32 recipient_ = _alice.toBytes32();

(TransceiverStructs.NttManagerMessage memory message_, bytes32 messageId_) = _createTransferMessage(
(TransceiverStructs.NttManagerMessage memory message_, ) = _createTransferMessage(
amount_,
index_,
recipient_,
Expand Down
8 changes: 3 additions & 5 deletions test/unit/SpokePortal.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { SpokePortal } from "../../src/SpokePortal.sol";
import { PayloadEncoder } from "../../src/libs/PayloadEncoder.sol";
import { TypeConverter } from "../../src/libs/TypeConverter.sol";

import { SpokePortalHarness } from "../harnesses/SpokePortalHarness.sol";

import { UnitTestBase } from "./UnitTestBase.t.sol";
import { MockSpokeMToken } from "../mocks/MockSpokeMToken.sol";
import { MockSpokeRegistrar } from "../mocks/MockSpokeRegistrar.sol";
Expand All @@ -25,7 +23,7 @@ contract SpokePortalTests is UnitTestBase {
MockSpokeMToken internal _mToken;
MockSpokeRegistrar internal _registrar;

SpokePortalHarness internal _portal;
SpokePortal internal _portal;

function setUp() external {
_mToken = new MockSpokeMToken();
Expand All @@ -36,8 +34,8 @@ contract SpokePortalTests is UnitTestBase {
_registrar = new MockSpokeRegistrar();
_transceiver = new MockTransceiver();

SpokePortal implementation_ = new SpokePortalHarness(address(_mToken), address(_registrar), _LOCAL_CHAIN_ID);
_portal = SpokePortalHarness(_createProxy(address(implementation_)));
SpokePortal implementation_ = new SpokePortal(address(_mToken), address(_registrar), _LOCAL_CHAIN_ID);
_portal = SpokePortal(_createProxy(address(implementation_)));

_initializePortal(_portal);
}
Expand Down

0 comments on commit af64f43

Please sign in to comment.