Warning: Using contract member "balance" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, for example use "address(contract).balance" instead.
I am getting this warning in Solidity using the Remix editor.
This is the code chunk:
function getSummary() public view returns(
uint, uint, uint, uint, address
){
return (
minimumContribution,
this.balance, // This is the warning line.
requests.length,
approversCount,
manager
);
}
I tried following what the warning suggests:
function getSummary() public view returns(
uint, uint, uint, uint, address
){
return (
minimumContribution,
address(contract).balance,
requests.length,
approversCount,
manager
);
}
But that does not work.