Hi guys,
Is there a way of returning the specific result in a payable function?
Dec 10, 2021, 9:38 AM
function sendTransaction(address payable _to, uint256 _portion) public payable returns(address, uint256){
require(_to != address(0), "Address is invalid");
require(msg.value != 0, "No funds");
... ...
transferEther(_to, amount, fee);
return (_to, amount);
}
It will work?
require(_to != address(0), "Address is invalid");
require(msg.value != 0, "No funds");
... ...
transferEther(_to, amount, fee);
return (_to, amount);
}
It will work?
Dec 10, 2021, 9:40 AM
You should also check address of owner
Dec 10, 2021, 12:05 PM