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

replace tx-sender with contract-caller where appropriate #45

Open
pseudozach opened this issue Sep 21, 2023 · 0 comments
Open

replace tx-sender with contract-caller where appropriate #45

pseudozach opened this issue Sep 21, 2023 · 0 comments
Assignees

Comments

@pseudozach
Copy link
Collaborator

pseudozach commented Sep 21, 2023

TMS-2
File(s):
Trustless-rewards.clar, triggerswap_v6.clar, stxswap_v10.clar, sip10swap_v3.clar
Recommendation: Use variable contract-caller that is local and it cannot be improperly encapsulated as tx-sender can be. In some cases with transfer the solution to this problem is to use the function as-contract to limit tx-sender and contract-caller to the value of the contract context.

@pseudozach pseudozach self-assigned this Sep 21, 2023
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