You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
I try to send a transaction with automated fee estimation on local network using jigu. To set it up I used the newest version of Local Terra. Terra station successfully connected to the Local Terra and I am able to perform operations. Unfortunately, when I try to perform transaction with jigu (e.g. send Luna tokens) it throws on simulating fee transaction (code shown below).
What I Did
Here is a minimal working example with Local Terra:
from jigu import Terra
from jigu.core import AccAddress, Coin
from jigu.core.msg import MsgSend
from jigu.key.mnemonic import MnemonicKey
terra = Terra('localterra', 'http://0.0.0.0:1317/')
key = MnemonicKey(
'notice oak worry limit wrap speak medal online prefer cluster roof addict wrist behave treat actual wasp year salad speed social layer crew genius')
wallet = terra.wallet(key)
msg = MsgSend(
from_address=AccAddress('terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v'),
to_address=AccAddress('terra17lmam6zguazs5q5u6z5mmx76uj63gldnse2pdp'),
amount=[Coin("uluna", 3000)]
)
send_tx = wallet.create_and_sign_tx(
msg)
print(send_tx)
Here is the output:
/usr/local/opt/python@3.7/bin/python3 /Users/michal/repo/python-toy/main.py
Traceback (most recent call last):
File "/Users/michal/repo/python-toy/main.py", line 17, in <module>
msg)
File "/usr/local/lib/python3.7/site-packages/jigu/client/object_query/wallet.py", line 75, in create_and_sign_tx
return self.sign_tx(self.create_tx(*msgs, fee=fee, memo=memo))
File "/usr/local/lib/python3.7/site-packages/jigu/client/object_query/wallet.py", line 50, in create_tx
fee = self.terra.tx.estimate_fee(tx)
File "/usr/local/lib/python3.7/site-packages/jigu/client/lcd/api/tx.py", line 79, in estimate_fee
res = self._api_post("/txs/estimate_fee", data=data)
File "/usr/local/lib/python3.7/site-packages/jigu/client/lcd/api/__init__.py", line 79, in _api_post
return self._handle_response(self.terra.lcd.post(path, **kwargs), unwrap)
File "/usr/local/lib/python3.7/site-packages/jigu/client/lcd/lcdclient.py", line 111, in post
return self._request("post", path, **kwargs)
File "/usr/local/lib/python3.7/site-packages/jigu/client/lcd/lcdclient.py", line 88, in _request
return self.handle_response(response)
File "/usr/local/lib/python3.7/site-packages/jigu/client/lcd/lcdclient.py", line 82, in handle_response
r = resp_m(self, r)
File "/usr/local/lib/python3.7/site-packages/jigu/client/lcd/middlewares.py", line 87, in handle_general_errors
raise LcdInternalError(response.status_code, error_msg, response.request)
jigu.error.LcdInternalError: (500) invalid request: must contain at least one message: failed to simulate tx
Process finished with exit code 1
Description
I try to send a transaction with automated fee estimation on local network using jigu. To set it up I used the newest version of Local Terra. Terra station successfully connected to the Local Terra and I am able to perform operations. Unfortunately, when I try to perform transaction with jigu (e.g. send Luna tokens) it throws on simulating fee transaction (code shown below).
What I Did
Here is a minimal working example with Local Terra:
Here is the output:
This example works when i change line:
to
I investigated the problem a little bit and looks like jigu sends post request to
/txs/estimate_fee
endpoint with incorrectly structured body.The text was updated successfully, but these errors were encountered: