When the contract is deployed it has an address that we can call by address(this). My contract is receivable from an address which means I can send() or transfer() to this contract but If I want to transfer from this actual contract to any account how can I do that?
example code:
function submitTransaction(address _to,uint _value,string memory _desc) public
onlyOwner
{
require(_value <= address(this).balance,"This wallet does not have enough balace to send");
if(!_to.send(_value)){
revert("doposit fail");
}
}
but how can I deduct from address(this).balance?