mirror of
https://github.com/chaintool-py/eth-erc20.git
synced 2024-11-23 10:16:47 +01:00
Add id generator for approve, transfer from
This commit is contained in:
parent
7ea1aa21ca
commit
84ce22e8b6
@ -148,7 +148,7 @@ class ERC20(TxFactory):
|
|||||||
return tx
|
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 = ABIContractEncoder()
|
||||||
enc.method('transferFrom')
|
enc.method('transferFrom')
|
||||||
enc.typ(ABIContractType.ADDRESS)
|
enc.typ(ABIContractType.ADDRESS)
|
||||||
@ -164,7 +164,7 @@ class ERC20(TxFactory):
|
|||||||
return tx
|
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 = ABIContractEncoder()
|
||||||
enc.method('approve')
|
enc.method('approve')
|
||||||
enc.typ(ABIContractType.ADDRESS)
|
enc.typ(ABIContractType.ADDRESS)
|
||||||
|
@ -61,7 +61,7 @@ token_address = config.get('_EXEC_ADDRESS')
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
g = ERC20(chain_spec=chain_spec)
|
g = ERC20(chain_spec=chain_spec, gas_oracle=rpc.get_gas_oracle())
|
||||||
|
|
||||||
# determine decimals
|
# determine decimals
|
||||||
decimals_o = g.decimals(token_address)
|
decimals_o = g.decimals(token_address)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
confini>=0.3.6rc3,<0.5.0
|
confini>=0.3.6rc3,<0.5.0
|
||||||
crypto-dev-signer>=0.4.15a1,<=0.4.15
|
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
|
potaahto~=0.0.1a2
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = eth-erc20
|
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.
|
description = ERC20 interface and simple contract with deployment script that lets any address mint and gift itself tokens.
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
Loading…
Reference in New Issue
Block a user