Skip to content
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

createSTXPostCondition and createFungiblePostCondition allows to create invalid post conditions. #154

Open
LNow opened this issue Aug 21, 2022 · 0 comments

Comments

@LNow
Copy link

LNow commented Aug 21, 2022

Both createSTXPostCondition and createFungiblePostCondition accepts values higher than 18446744073709551615 (max value of u64) and as a result they produce invalid post-conditions.

From https://github.com/stacksgov/sips/blob/main/sips/sip-005/sip-005-blocks-and-transactions.md

A STX post condition body is encoded as follows:

...
An 8-byte value encoding the literal number of microSTX

A Fungible token post-condition body is encoded as follows:

...
An 8-byte value encoding the literal number of token units

8-byte value (u64) not 16-byte value (u128)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant