Skip to content

Commit

Permalink
no empty sender/to addrs [SLT-184]
Browse files Browse the repository at this point in the history
  • Loading branch information
parodime committed Sep 23, 2024
1 parent faf9387 commit cd32d30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/contracts-rfq/contracts/FastBridgeV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ contract FastBridgeV2 is Admin, IFastBridgeV2 {
// check bridge params
if (params.dstChainId == block.chainid) revert ChainIncorrect();
if (params.originAmount == 0 || params.destAmount == 0) revert AmountIncorrect();
if (params.originToken == address(0) || params.destToken == address(0)) revert ZeroAddress();
if (
params.originToken == address(0) ||
params.destToken == address(0) ||
params.sender == address(0) ||
params.to == address(0)
) revert ZeroAddress();
if (params.deadline < block.timestamp + MIN_DEADLINE_PERIOD) revert DeadlineTooShort();

// transfer tokens to bridge contract
Expand Down

0 comments on commit cd32d30

Please sign in to comment.