function transferOut(uint256 _toChain, CallData memory _callData) external override
payable
nonReentrant
whenNotPaused
checkBridgeable(Utils.fromBytes(_callData.target), _toChain)
returns(bool)
{
require(_toChain != selfChainId, "Only other chain");
require(_callData.gasLimit >= gasLimitMin ,"Execution gas too low");
require(_callData.gasLimit <= gasLimitMax ,"Execution gas too high");
require(_callData.value == 0,"Not supported at present value");
(uint256 fee,address receiverFeeAddress) = feeService.getMessageFee(_toChain,_callData.target);
//require(fee > 0,"Address has no message fee");
uint256 amount = msg.value;
require(amount == fee, "Need message fee");
if (amount > 0) {
TransferHelper.safeTransferETH(receiverFeeAddress, amount);
}
bytes32 orderId = _getOrderID(msg.sender, _callData.target, _toChain);
bytes memory fromAddress = Utils.toBytes(msg.sender);
bytes memory callData = abi.encode(_callData);
emit mapMessageOut(selfChainId, _toChain, orderId,fromAddress,callData);
return true;
}