Add id generator for approve, transfer from

This commit is contained in:
nolash 2021-09-30 17:18:27 +02:00
parent 7ea1aa21ca
commit 84ce22e8b6
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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