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

SendQuantity can send signa balance #24

Closed
deleterium opened this issue Jul 27, 2022 · 1 comment
Closed

SendQuantity can send signa balance #24

deleterium opened this issue Jul 27, 2022 · 1 comment

Comments

@deleterium
Copy link
Owner

deleterium commented Jul 27, 2022

The problem:
Sometimes using sendQuantity sends the some Signa balance.

Expected:
Using sendQuantity must ensure no Signa will be transfered.

Cause:
Wrong assembly implementation of sendQuantity. Implementation must ensure register B3 is zero.

The behavior can be mitigated using #pragma optimizationLevel 1?
No.

Affects:
All smart contracts that uses sendQuantity in SmartC versions 2.0.0 and 2.0.1

Workaround:

  1. Use sendQuantityAndAmount with zero as amount, instead of sendQuantity.
@deleterium
Copy link
Owner Author

Already fixed on stable 2.1.0.

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