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

no empty sender recip [SLT-184] #3171

Merged
merged 4 commits into from
Sep 26, 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
1 change: 1 addition & 0 deletions packages/contracts-rfq/contracts/FastBridgeV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ contract FastBridgeV2 is Admin, IFastBridgeV2, IFastBridgeV2Errors {
// check bridge params
if (params.dstChainId == block.chainid) revert ChainIncorrect();
if (params.originAmount == 0 || params.destAmount == 0) revert AmountIncorrect();
if (params.sender == address(0) || params.to == address(0)) revert ZeroAddress();
if (params.originToken == address(0) || params.destToken == address(0)) revert ZeroAddress();
if (params.deadline < block.timestamp + MIN_DEADLINE_PERIOD) revert DeadlineTooShort();

Expand Down
2 changes: 0 additions & 2 deletions packages/contracts-rfq/test/FastBridgeV2.Src.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,12 @@ contract FastBridgeV2SrcTest is FastBridgeV2Test {
}

function test_bridge_revert_zeroSender() public {
vm.skip(true); // TODO: unskip when fixed
tokenParams.sender = address(0);
vm.expectRevert(ZeroAddress.selector);
bridge({caller: userA, msgValue: 0, params: tokenParams});
}

function test_bridge_revert_zeroRecipient() public {
vm.skip(true); // TODO: unskip when fixed
tokenParams.to = address(0);
vm.expectRevert(ZeroAddress.selector);
bridge({caller: userA, msgValue: 0, params: tokenParams});
Expand Down
Loading