Function: _bridgeWithCeler(address _receiver, address _token, uint256 _amount, uint16 _dstChainId, uint256 maxSlippage)
This bridges with Celer.
Inputs
_receiverConstraints: No constraints.
Impact: The address to receive the bridged tokens.
_tokenConstraints: No constraints.
Impact: The address of the token to bridge.
_amountConstraints: No constraints.
Impact: The amount of the token to bridge.
_dstChainIdConstraints: No constraints.
Impact: The ID of the chain the token is being bridged to.
maxSlippageConstraints: No constraints.
Impact: The max slippage allowed for the bridge.
Branches and code coverage (including function calls)
Intended branches
The function approves the
celerBridgecontract to spend_amountof_token.The function call
celerBridge.send(...)succeeds without reverting.
Negative behavior
The function reverts if the approval for
celerBridgefails.
Function call analysis
ERC20(_token).safeApprove(address(celerBridge), _amount)What is controllable?
_tokenand_amount.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? If this reverts, the entire call fails --- no reentrancy issues.
celerBridge.send(_receiver, _token, _amount, _dstChainId, uint64(block.timestamp), uint32(maxSlippage))What is controllable?
_receiver,_token,_amount,_dstChainId,block.timestamp, andmaxSlippage.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? If this reverts, the entire call fails --- no reentrancy issues.