Repository: vyperlang/vyper

Issue:
Solidity Compatible ERC20 broken
The [Solidity compatible ERC20 token](https://github.com/ethereum/vyper/blob/master/examples/tokens/ERC20_solidity_compatible/ERC20.v.py) no longer compiles, since it was not updated after the removal of separate uint256 math functions. This is a super easy fix. I can do it later in the week if no one gets to it before then. 


Discussion:

Resolving patch:
diff --git a/examples/tokens/ERC20_solidity_compatible/ERC20.v.py b/examples/tokens/ERC20_solidity_compatible/ERC20.v.py
--- a/examples/tokens/ERC20_solidity_compatible/ERC20.v.py
+++ b/examples/tokens/ERC20_solidity_compatible/ERC20.v.py
@@ -21,8 +21,8 @@
 def deposit():
     _value: uint256 = convert(msg.value, 'uint256')
     _sender: address = msg.sender
-    self.balances[_sender] = uint256_add(self.balances[_sender], _value)
-    self.num_issued = uint256_add(self.num_issued, _value)
+    self.balances[_sender] = self.balances[_sender] + _value
+    self.num_issued = self.num_issued + _value
     # Fire deposit event as transfer from 0x0
     log.Transfer(0x0000000000000000000000000000000000000000, _sender, _value)
 
@@ -31,12 +31,12 @@ def withdraw(_value : uint256) -> bool:
     _sender: address = msg.sender
     # Make sure sufficient funds are present, op will not underflow supply
     # implicitly through overflow protection
-    self.balances[_sender] = uint256_sub(self.balances[_sender], _value)
-    self.num_issued = uint256_sub(self.num_issued, _value)
+    self.balances[_sender] = self.balances[_sender] - _value
+    self.num_issued = self.num_issued - _value
     send(_sender, as_wei_value(convert(_value, 'int128'), 'wei'))
     # Fire withdraw event as transfer to 0x0
     log.Transfer(_sender, 0x0000000000000000000000000000000000000000, _value)
-    return true
+    return True
 
 @public
 @constant
@@ -52,23 +52,23 @@ def balanceOf(_owner : address) -> uint256:
 def transfer(_to : address, _value : uint256) -> bool:
     _sender: address = msg.sender
     # Make sure sufficient funds are present implicitly through overflow protection
-    self.balances[_sender] = uint256_sub(self.balances[_sender], _value)
-    self.balances[_to] = uint256_add(self.balances[_to], _value)
+    self.balances[_sender] = self.balances[_sender] - _value
+    self.balances[_to] = self.balances[_to] + _value
     # Fire transfer event
     log.Transfer(_sender, _to, _value)
-    return true
+    return True
 
 @public
 def transferFrom(_from : address, _to : address, _value : uint256) -> bool:
     _sender: address = msg.sender
     allowance: uint256 = self.allowances[_from][_sender]
     # Make sure sufficient funds/allowance are present implicitly through overflow protection
-    self.balances[_from] = uint256_sub(self.balances[_from], _value)
-    self.balances[_to] = uint256_add(self.balances[_to], _value)
-    self.allowances[_from][_sender] = uint256_sub(allowance, _value)
+    self.balances[_from] = self.balances[_from] - _value
+    self.balances[_to] = self.balances[_to] + _value
+    self.allowances[_from][_sender] = allowance - _value
     # Fire transfer event
     log.Transfer(_from, _to, _value)
-    return true
+    return True
 
 @public
 def approve(_spender : address, _value : uint256) -> bool:
@@ -76,7 +76,7 @@ def approve(_spender : address, _value : uint256) -> bool:
     self.allowances[_sender][_spender] = _value
     # Fire approval event
     log.Approval(_sender, _spender, _value)
-    return true
+    return True
 
 @public
 @constant


Test patch: