Function: _bridgeWithHyphen(address _receiver, address _token, uint256 _amount, uint16 _srcChainId)
This bridges with Hyphen.
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.
_srcChainIdConstraints: No constraints.
Impact: The ID of the chain the token is being bridged from.
Branches and code coverage (including function calls)
Intended branches
The function approves the
hyphenBridgecontract to spend_amountof_token.The function call
hyphenBridge.depositErc20(...)succeeds without reverting.
Negative behavior
The function reverts if the approval for
hyphenBridgefails.
Function call analysis
ERC20(_token).safeApprove(address(hyphenBridge), _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.
hyphenBridge.depositErc20(_srcChainId, _token, _receiver, _amount, "Y2K")What is controllable?
_srcChainId,_token,_receiver, and_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.