zksync-sdk / zksync-python

Python 3.8 SDK for zkSync
MIT License
116 stars 64 forks source link

Tx is incorrect according to jsonrpc response #24

Open ankitchiplunkar opened 3 years ago

ankitchiplunkar commented 3 years ago

hi I am using the latest python sdk and all the transactions are incorrect according to the jsonrpc response

Traceback (most recent call last):
  File "scripts/zksync/test_move.py", line 31, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "scripts/zksync/test_move.py", line 27, in main
    await zk_wallet.transfer(next_wallet.address, token.decimal_amount(amount), token_symbol)
  File "/home/ankit/projects/automated_rewards/venv/lib/python3.8/site-packages/zksync_sdk/wallet.py", line 318, in transfer
    return await self.send_signed_transaction(transfer, eth_signature)
  File "/home/ankit/projects/automated_rewards/venv/lib/python3.8/site-packages/zksync_sdk/wallet.py", line 48, in send_signed_transaction
    return await self.zk_provider.submit_tx(tx, eth_signature, fast_processing)
  File "/home/ankit/projects/automated_rewards/venv/lib/python3.8/site-packages/zksync_sdk/zksync_provider/v01.py", line 24, in submit_tx
    return await self.provider.request("tx_submit",
  File "/home/ankit/projects/automated_rewards/venv/lib/python3.8/site-packages/zksync_sdk/transport/http.py", line 22, in request
    raise ResponseError(data['code'], data['message'])
zksync_sdk.transport.ResponseError: Response error with code 103 
 Tx is incorrect

the code

        amount = 10000000000000000
        await zk_wallet.transfer(next_wallet.address, token.decimal_amount(amount), token_symbol)

I followed the tutorials till now to initialiwe tokens and zkwallet