eth-erc20

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

commit 84ce22e8b63da62acfe2979fb277fca3dbbaf081
parent 7ea1aa21caca03b6c4a55b2d01e8d6a4b47ba80c
Author: nolash <dev@holbrook.no>
Date:   Thu, 30 Sep 2021 17:18:27 +0200

Add id generator for approve, transfer from

Diffstat:
Mpython/eth_erc20/erc20.py | 4++--
Mpython/eth_erc20/runnable/balance.py | 2+-
Mpython/requirements.txt | 2+-
Mpython/setup.cfg | 2+-
4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/python/eth_erc20/erc20.py b/python/eth_erc20/erc20.py @@ -148,7 +148,7 @@ class ERC20(TxFactory): return tx - def transfer_from(self, contract_address, sender_address, holder_address, recipient_address, value, tx_format=TxFormat.JSONRPC): + def transfer_from(self, contract_address, sender_address, holder_address, recipient_address, value, tx_format=TxFormat.JSONRPC, id_generator=None): enc = ABIContractEncoder() enc.method('transferFrom') enc.typ(ABIContractType.ADDRESS) @@ -164,7 +164,7 @@ class ERC20(TxFactory): return tx - def approve(self, contract_address, sender_address, spender_address, value, tx_format=TxFormat.JSONRPC): + def approve(self, contract_address, sender_address, spender_address, value, tx_format=TxFormat.JSONRPC, id_generator=None): enc = ABIContractEncoder() enc.method('approve') enc.typ(ABIContractType.ADDRESS) diff --git a/python/eth_erc20/runnable/balance.py b/python/eth_erc20/runnable/balance.py @@ -61,7 +61,7 @@ token_address = config.get('_EXEC_ADDRESS') def main(): - g = ERC20(chain_spec=chain_spec) + g = ERC20(chain_spec=chain_spec, gas_oracle=rpc.get_gas_oracle()) # determine decimals decimals_o = g.decimals(token_address) diff --git a/python/requirements.txt b/python/requirements.txt @@ -1,4 +1,4 @@ confini>=0.3.6rc3,<0.5.0 crypto-dev-signer>=0.4.15a1,<=0.4.15 -chainlib-eth>=0.0.9a3,<=0.1.0 +chainlib-eth>=0.0.9a9,<=0.1.0 potaahto~=0.0.1a2 diff --git a/python/setup.cfg b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = eth-erc20 -version = 0.1.2a2 +version = 0.1.2a3 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