eth-erc20

ERC20 interface and example giftable token contract
Log | Files | Refs | LICENSE

commit d1e5b84cfb4fedfb3193d5100844ae3b834433bc
parent 4f2d47778c2daf903b363907a42be1260da0bfc6
Author: lash <dev@holbrook.no>
Date:   Tue, 30 May 2023 17:38:56 +0100

Add missing unittest module to erc20 package

Diffstat:
Mpython/CHANGELOG | 4++++
Apython/eth_erc20/unittest/__init__.py | 1+
Apython/giftable_erc20_token/data/.chainlib | 0
Mpython/giftable_erc20_token/factory.py | 4+++-
Mpython/run_tests.sh | 1+
Mpython/setup.cfg | 3++-
Msolidity/GiftableToken.sol | 3++-
7 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/python/CHANGELOG b/python/CHANGELOG @@ -1,3 +1,7 @@ +* 0.7.4 + - Add missing unittest module to python package +* 0.7.3 + - Add ERC5679Ext20 fills * 0.7.2 - Update python classifiers - Upgrade to beta diff --git a/python/eth_erc20/unittest/__init__.py b/python/eth_erc20/unittest/__init__.py @@ -0,0 +1 @@ +from .base import * diff --git a/python/giftable_erc20_token/data/.chainlib b/python/giftable_erc20_token/data/.chainlib diff --git a/python/giftable_erc20_token/factory.py b/python/giftable_erc20_token/factory.py @@ -45,7 +45,9 @@ class GiftableToken(ERC20): enc.string(symbol) enc.uint256(decimals) enc.uint256(expire) - code += enc.get() + args = enc.get() + code += args + logg.debug('constructor code: ' + args) return code diff --git a/python/run_tests.sh b/python/run_tests.sh @@ -1,6 +1,7 @@ #!/bin/bash export PYTHONPATH=${PYTHONPATH}:. +>&2 echo "using pythonpath $PYTHONPATH" set -e set -x diff --git a/python/setup.cfg b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = eth-erc20 -version = 0.7.3 +version = 0.7.4 description = ERC20 interface and simple contract with deployment script that lets any address mint and gift itself tokens. author = Louis Holbrook author_email = dev@holbrook.no @@ -36,6 +36,7 @@ packages = eth_erc20 eth_erc20.data eth_erc20.runnable + eth_erc20.unittest static_token.data [options.package_data] diff --git a/solidity/GiftableToken.sol b/solidity/GiftableToken.sol @@ -65,8 +65,9 @@ contract GiftableToken { return totalMinted - totalBurned; } - // Implements Minter mapping(address => bool) writers; + + // Implements Minter function mintTo(address _to, uint256 _value) public returns (bool) { require(writers[msg.sender] || msg.sender == owner);