-
Notifications
You must be signed in to change notification settings - Fork 391
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
bug?(gnovm): interface conversion error when trying to burn grc20 #3685
Comments
Update:
|
Update: I have found out that this error is not only for the Burn, but also for the Mint func in token.gno from grc20. I'm starting to think this is related to the fact that I am storing the ledger in the Pool struct in the tree, which is why I have decied to recreate this. Code I've written works perfectly fine: |
Please note that I might be mistaken as I lack deeper understanding of gnovm
I'm in the process of making a simple dex, which mints LP tokens to liquidity providers. When lp is to withdraw his assets the LP tokens should be burned, i do this in this func:
This results in this error:
0 /mnt/c/Users/matij/Projects/gno/tm2/pkg/errors/errors.go:28 - deliver transaction failed: log:recovered: interface conversion: gnolang.Stmt is *gnolang.AssignStmt, not *gnolang.bodyStmt
The prints I added in token.gno indicate that the error happens in line 214:
I have made sure that the amount of minted LPs is much higher than the amount I try to burn (I've tried burning both a little % as well as 100% of minted LPs). I have also double checked all the types (all are uint64). I have also run the
gno tool lint
and everything seems to be in order. Also calling this function works as inteded:which is what confuses me the most. Regardless, I hope to stand corrected (and find a solution to the error that I am getting).
The text was updated successfully, but these errors were encountered: