eth-erc20

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

commit 7ab3cd14f52a724a9b25622a82aa06c83998c2e3
parent fc9fa18e1c58a4100af7262976408e9d20ddb883
Author: lash <dev@holbrook.no>
Date:   Tue, 14 Feb 2023 04:25:26 +0000

Simplify chainlib find include

Diffstat:
Mpython/giftable_erc20_token/__init__.py | 3+++
Dpython/giftable_erc20_token/_clf.py | 21---------------------
Mpython/giftable_erc20_token/factory.py | 8++++++++
3 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/python/giftable_erc20_token/__init__.py b/python/giftable_erc20_token/__init__.py @@ -1 +1,4 @@ from .factory import GiftableToken +from .factory import bytecode +from .factory import create +from .factory import default diff --git a/python/giftable_erc20_token/_clf.py b/python/giftable_erc20_token/_clf.py @@ -1,21 +0,0 @@ -# local imports -from .factory import GiftableToken - - -def code(v): - version = None - if v != None: - version = v[0] - return GiftableToken.bytecode(version=version) - - -def init(v): - if v == None or len(v) < 3: - raise ValueError('minimum 3 arguments required') - version = None - if len(v) == 4: - version = v[4] - return GiftableToken.cargs(v[0], v[1], v[2], version=version) - - -default = code diff --git a/python/giftable_erc20_token/factory.py b/python/giftable_erc20_token/factory.py @@ -103,3 +103,11 @@ class GiftableToken(TxFactory): return tx +def bytecode(version=None): + return GiftableToken.bytecode(version=version) + + +def create(name, symbol, decimals, version=None): + return GiftableToken.cargs(name, symbol, decimals, version=version) + +default = bytecode