-
Notifications
You must be signed in to change notification settings - Fork 310
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
Postcondition number different from contract call #1611
Comments
Post-conditions can only handle amounts up to 8-byte length. I'm adding a check to serialization that will throw if the amount is larger. |
Added a check here: https://github.com/hirosystems/stacks.js/pull/1612/files |
Also Stacks transfers can only send amounts up to 8-bytes in length. |
Hi @janniks so you mean if post-condition fails due to 8-bytes length, then the underlying transfer should also fail? |
Stacks transfer transactions (STX or other fungible tokens) are encoded to only have 8-bytes of "amount" information in the wireformat (the same goes for post-conditions). This is a part of SIP-005. |
What version of Stacks.js are you using?
Describe the bug
When creating post condition with a very big number, the amount will turn into a random number
How to reproduce
Expected behavior
Reproduce repo:
https://github.com/alexgo-io/post-condition-example
The text was updated successfully, but these errors were encountered: