-
Hey all thanks for all easily available contracts and tools, it's been fun building with these. However we've run into a small issue when looking to run the ERC20 contract on Starknet. Here's what we did:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
I found the error I think and it's as banal as expected. So Starknet represents numbers with the felt type, what this means is that when passing an base-10 integer or a hex integer the number will be converted to a felt. What we think is happening is that the conversion from base-10 and hex to felt are broken somehow, and hence when passing the same number via the base-10 or the hex route they are represented with a different felt. What this results in is if |
Beta Was this translation helpful? Give feedback.
-
Adding an extra point onto this. When calling the |
Beta Was this translation helpful? Give feedback.
-
Thanks for reporting this with such detail. A few questions to better debug this:
|
Beta Was this translation helpful? Give feedback.
-
@agolajko agolajko asked me to reply to you: We think we found the bug (it is in Voyager.online), let me explain that first, and then answer your questions. Since then we realized that the issue is on Voyager.online. We used their platform for a single mint, and to verify the account balance, and that was likely the cause of the whole issue. It seems Voyager.online cannot parse large hexes correctly, making large hexes equal to 1, both in the mint and getBalance calls, so it looks consistent. When looking at the transaction data, or when calling from the command line, the issue became visible. We have brought this issue up with the Voyager team: https://discord.com/channels/793094838509764618/912410047236149298/918850430308606073 Linking this back to our original problem, the result of this hex parsing error in Voyager was that we thought we were checking with getBalance on Voyager that the address had balance > 0, but then later when invoking transact from the command line, we called an account with 0 balance. This was the cause of the assert_not_zero error, which in retrospect was valid. To specifically answer your questions: we found no issues when calling starknet from cli (so we could not reproduce the error on devnet), we included specific commands as pictures for the Voyager.online error with above linked Discord message, if that interest you. |
Beta Was this translation helpful? Give feedback.
@agolajko agolajko asked me to reply to you:
We think we found the bug (it is in Voyager.online), let me explain that first, and then answer your questions.
Since then we realized that the issue is on Voyager.online. We used their platform for a single mint, and to verify the account balance, and that was likely the cause of the whole issue. It seems Voyager.online cannot parse large hexes correctly, making large hexes equal to 1, both in the mint and getBalance calls, so it looks consistent. When looking at the transaction data, or when calling from the command line, the issue became visible. We have brought this issue up with the Voyager team: https://discord.com/channels/79309483850976…