-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues calling a contract #14
Comments
Liquidity uses a parameter syntax which can define entry points into different parts of a contract. I assume you are calling the main entry point for this contract which is the default. If you change your parameter to be:
the constructed payload in the actual call gets formatted as What I found really useful was using liquidity's online IDE with the developer tools network tab open and try forging operations and see how your parameters are being formatted in the forging calls. |
Tried that too, but getting the same error 🤔 It seems to be related to the
|
I was able to recreate the issue. Seems like it was caused by this issue MikeMcl/bignumber.js#217 from bignumber. Anyways, I pushed a fix and updated the version. Update your version to |
@AndrewKishino thanks 😬 Well, atleast I get differet errors now 😝🙈 Calling with
Calling with
Full payload:
🤷♂️ |
@asbjornenge Looks like I may have introduced a small bug when forging ints. New version should be up. Go ahead and give it a try. Thanks for being so patient! |
@AndrewKishino nono, thank YOU for creating this module and helping out 😬👍 Got further this time, but got stuck on signing;
I forked the module and messed about a bit 😝 Had some issues with babel and the tests, so I made a commit that fixes it for me. You can take a peak here asbjornenge@f5c0270 - I'll be happy to PR this if you want it. But, once the tests were up and running I managed to reproduce the error by uncommenting the |
So this error is valid, however the current implementation only supports secret keys which are generated through sotez, or ledger hardware wallets. If you generate a new address using sotez and use that as your keys, that should resolve this latest issue you are seeing. |
@asbjornenge I pushed a change that should detect which sk format you are using and extracts the sk format you can use to sign messages. Hopefully this helps! 🙏 |
Fantastic 🎉 I can now sign 🚀 I was using the keys from one of the accounts created on my node during the tutorial. They have xtz already so thought it was a good idea 😝 Thanks a bunch for all your help! I still get an error:
Any idea what this means? Probably something to do with my node or the params I'm sending...? 🤔 |
You may need to set a higher |
Tried setting the
|
The fee is expressed as mutez (1/1,000,000 of a tez) the default fee for transfers is set to |
@AndrewKishino aha! That worked 😬🎉 I was fiddling with those other params too, but kept the fee too low. The docs says Again, thanks for all your help with this issue! I'm going to continue exploring Tezos and this lib 😉👍 |
Will update the docs to reflect the correct fees. Thanks! |
Hi there 😄
Thanks for a great lib 🎉 I'm just getting started with Tezos and was trying out you library following https://hackernoon.com/tezos-smart-contracts-with-reasonml-docker-and-a-sandboxed-node-89df929ca1cf
I wanted to call the contract from sotez but I keep getting
TypeError: u is not a constructor
.I have been trying with the following:
I'm probably using the params wrong of something. Any input? Is there some way I can use
src/sotez.node
for easier debugging? The compileddist
is of little help 😝Calling the contract using
liquidity
cli works fine.The text was updated successfully, but these errors were encountered: