From 41606381e8ecaec5d6264c44be52d84264ad893f Mon Sep 17 00:00:00 2001
From: Robert Martin-Legene <robert@nic.ar>
Date: Mon, 10 Jun 2019 17:01:40 -0300
Subject: [PATCH] solidity v4->v5 distinguises between addresses and payable
 addresses

---
 src/Distillery.sol | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Distillery.sol b/src/Distillery.sol
index f378723..e7e890f 100644
--- a/src/Distillery.sol
+++ b/src/Distillery.sol
@@ -1,10 +1,10 @@
 // vim:filetype=javascript
-pragma solidity ^0.4.24;
+pragma solidity ^0.5;
 
 contract Distillery {
-    address     owner;
+    address payable     owner;
     struct      Allowances {
-        address         beneficiary;
+        address payable beneficiary;
         uint            topuplimit;
     }
     Allowances[]        thelist;
@@ -42,7 +42,7 @@ contract Distillery {
     // Or returns 0  if the address is not found in thelist.
     // 0 : not found
     // 1 : first position
-    function _beneficiaryPosition( address beneficiary ) internal view returns ( uint ) {
+    function _beneficiaryPosition( address payable beneficiary ) internal view returns ( uint ) {
         uint    pos         =   thelist.length;
         while ( pos-- > 0 )
             if ( beneficiary == thelist[pos].beneficiary )
@@ -52,7 +52,7 @@ contract Distillery {
     // This function returns the "allowance" that a given address is set to.
     // Using this function, you don't have to cycle through atPosition() until
     // you find the address you want to know about.
-    function    getEtherAllowance( address beneficiary ) public view returns (uint256) {
+    function    getEtherAllowance( address payable beneficiary ) public view returns (uint256) {
         uint    pos         =   _beneficiaryPosition( beneficiary );
         if ( pos == 0 )
             return 0;
@@ -60,7 +60,7 @@ contract Distillery {
     }
     // This admin (ownerOnly) function allows the creator of the contract to
     // add/change/delete "allowances" per address.
-    function    setEtherAllowance( address beneficiary, uint256 topuplimit ) public onlyOwner {
+    function    setEtherAllowance( address payable beneficiary, uint256 topuplimit ) public onlyOwner {
         uint    pos         =   _beneficiaryPosition( beneficiary );
         // Not found and trying to delete beneficiary? Just return immediately.
         if ( pos == 0 && topuplimit == 0 )
-- 
GitLab