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

[Fix] Early out of bounced messages #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

e6654321
Copy link

@e6654321 e6654321 commented Jul 6, 2024

This PR addresses the need to check for bounced messages early and applies the early return principle to minimize gas and storage costs. Additionally, this approach helps prevent potentially damaging bugs that could arise from internal message injection attacks.

File Changes

  • contracts/wallet_v5.fc

@@ -33,6 +33,7 @@ const int size::query_id = 64;
const int prefix::signed_external = 0x7369676E;
const int prefix::signed_internal = 0x73696E74;
const int prefix::extension_action = 0x6578746E;
const int prefix::bounced = 0xffffff;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@@ -33,6 +33,7 @@ const int size::query_id = 64;
const int prefix::signed_external = 0x7369676E;
const int prefix::signed_internal = 0x73696E74;
const int prefix::extension_action = 0x6578746E;
const int prefix::bounced = 0xffffff;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const int prefix::bounced = 0xffffff;
const int prefix::bounced = 0xffffff;

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

Successfully merging this pull request may close these issues.

4 participants