Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(contracts-rfq): fix compiler warnings in tests #3357

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/contracts-rfq/test/FastBridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ contract FastBridgeTest is Test {
internal
virtual
{
(uint96 timestamp, address relayer) = fastBridge.bridgeProofs(transactionId);
assertEq(timestamp, uint96(expectedTimestamp));
assertEq(relayer, expectedRelayer);
(uint96 proofTimestamp, address proofRelayer) = fastBridge.bridgeProofs(transactionId);
assertEq(proofTimestamp, uint96(expectedTimestamp));
assertEq(proofRelayer, expectedRelayer);
}

function _getBridgeRequestAndId(
Expand Down
16 changes: 9 additions & 7 deletions packages/contracts-rfq/test/FastBridgeMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ contract FastBridgeMock is IFastBridge, Admin {
}

function mockBridgeRequest(bytes32 transactionId, address sender, BridgeParams memory params) external {
sender;
uint256 originFeeAmount = (params.originAmount * protocolFeeRate) / FEE_BPS;
params.originAmount -= originFeeAmount;

Expand Down Expand Up @@ -73,6 +74,7 @@ contract FastBridgeMock is IFastBridge, Admin {
}

function mockBridgeRequestRaw(bytes32 transactionId, address sender, bytes memory request) external {
sender;
BridgeTransaction memory transaction = getBridgeTransaction(request);
emit BridgeRequested(
transactionId,
Expand Down Expand Up @@ -105,31 +107,31 @@ contract FastBridgeMock is IFastBridge, Admin {
);
}

function bridge(BridgeParams memory params) external payable {
function bridge(BridgeParams memory) external payable {
revert("not implemented");
}

function relay(bytes memory request) external payable {
function relay(bytes memory) external payable {
revert("not implemented");
}

function prove(bytes memory request, bytes32 destTxHash) external {
function prove(bytes memory, bytes32) external pure {
revert("not implemented");
}

function canClaim(bytes32 transactionid, address relayer) external view returns (bool) {
function canClaim(bytes32, address) external pure returns (bool) {
revert("not implemented");
}

function claim(bytes memory request, address to) external {
function claim(bytes memory, address) external pure {
revert("not implemented");
}

function dispute(bytes32 transactionId) external {
function dispute(bytes32) external pure {
revert("not implemented");
}

function refund(bytes memory request) external {
function refund(bytes memory) external pure {
revert("not implemented");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contract FastBridgeMulticallTargetTest is MulticallTargetIntegrationTest {

function getEncodedBridgeTx(IFastBridge.BridgeTransaction memory bridgeTx)
public
view
pure
override
returns (bytes memory)
{
Expand Down
Loading