[✅ SOLVED] GasLimit too low
mervyn126 opened this issue · 10 comments
New Issue Checklist
- [ x] Updated Zhip to the latest version
- [ x] I read the Contribution Guidelines
- [ x I searched for existing GitHub issues
Issue Description
The wallet is not letting me send Zillow’s out of the wallet. Is there an issue I need to be aware of?
Environment
Stand in the root of the repo and run ./environments.sh
and paste the output below
[INSERT OUTPUT HERE]
@mervyn126 were you aware that Zilliqa network was down yesterday for maintenance?
https://twitter.com/zilliqa/status/1397788292200816643
Try again now please. And you can try setting TX fee to 0.1 Zil, that is 100 000 ”Li” I believe. Should work!
@mervyn126 you are right, thank you for reporting! Zilliqa must have a breaking change recently in their RPC API.
So I must implement these changes and upload a new version of Zhip to AppStore, this might take 1-2 weeks.
I don’t want you to be blocked by this, so I recommend you import your private key into Chrome Extension ”ZilPay” and send your funds from//with ZilPay.
Please report back that you managed to do this :) they might support keystore, but simplest would just be to use the private key. Which you should have backed up? Otherwise you can reveal it in Zhip under Settings => Backup Wallet and enter your password.
@mervyn126 Thx for the confidence and patience! I believe I've identified the change, see here:
Two months ago Zilliqa merged a Pull request in their JS lib which changes the gas limit for payment transaction to 50
instead of 1
: https://github.com/Zilliqa/Zilliqa-JavaScript-Library/pull/290/files
So I must make the same change in my Swift library Zesame
which Zhip uses, to also use the value 50. So I actually just need to change this single line of code and then make a release. Will probably have time to do this tomorrow and then it might take ~1 week for Apple to approve the change.
We can also see that the documentation of Zilliqas RPC API have been changed to 50 in its example:
https://dev.zilliqa.com/docs/apis/api-transaction-create-tx
curl -d '{
"id": "1",
"jsonrpc": "2.0",
"method": "CreateTransaction",
"params": [{
"version": 65537,
"nonce": 1,
"toAddr": "0x4BAF5faDA8e5Db92C3d3242618c5B47133AE003C",
"amount": "1000000000000",
"pubKey": "0205273e54f262f8717a687250591dcfb5755b8ce4e3bd340c7abefd0de1276574",
"gasPrice": "2000000000",
"gasLimit": "50",
"code": "",
"data": "",
"signature": "29ad673848dcd7f5168f205f7a9fcd1e8109408e6c4d7d03e4e869317b9067e636b216a32314dd37176c35d51f9d4c24e0e519ba80e66206457c83c9029a490d",
"priority": false
}]
}' -H "Content-Type: application/json" -X POST "https://api.zilliqa.com/"
(see "gasLimit": "50"
above)
But the the table below incorrectly specifies 1:
I will inform them and ask them to update this.
@mervyn126 so I've fixed the issue in Zesame (in this PR), and will now update in Zhip and then publish a release.
@mervyn126 I've now fixed the issue in PR #128 and submitted a new version to App Store, version 1.0.4. Expect it to take ~1 week for it to be approved and released.
Thank you for reporting this and thank you for the patience!
@mervyn126 Good news, it is released! Apple was very quick with the review, so in a couple of minutes, look for version 1.0.4
of Zhip in App Store.
Thanks again!