erc20token-sdk-python icon indicating copy to clipboard operation
erc20token-sdk-python copied to clipboard

sendToken does not work

Open RZeynalov opened this issue 6 years ago • 1 comments

Hi Guyz,

The problem in _encode_transaction_data method, i guess new lib of web3 py has changed its methods, do you know how to fix it? Thx

PS: sendEther is working well

Traceback (most recent call last): File "/home/rashid/PycharmProjects/CryptiArbitrage/TestWeb3.py", line 21, in print("send token ",sdk.send_tokens_new(address=Web3.toChecksumAddress(kukoinDadyWallet),amount=100)) File "/home/rashid/PycharmProjects/CryptiArbitrage/walletman.py", line 219, in send_tokens_new hex_data2 = self.token_contract._encode_transaction_data('transfer', args=(address, self.web3.toWei(amount, 'ether'))) AttributeError: 'Contract' object has no attribute '_encode_transaction_data'

RZeynalov avatar Jun 24 '18 11:06 RZeynalov

Try with web3==3.16.x, the library is not compatible with version 4x of web3.

pip install web3==3.16.5

theskumar avatar Aug 02 '18 12:08 theskumar