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(Token/ControllerToken): invalid transfer to the token address #47

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KristenPire
Copy link
Contributor

@KristenPire KristenPire commented Oct 14, 2024

Scope

The transfer and transferFrom functions were missing a security check to prevent sending tokens to the token contract's own address, which could lead to unintended behavior.

Implementation

Token Contract

Added a require statement in both the transfer and transferFrom functions to ensure that the to address cannot be the token contract's own address.

ControllerToken Contract

Added a require statement in both the transfer and transferFrom functions to ensure that the to address cannot be either the token contract's own address or the frontend's address.

@KristenPire KristenPire self-assigned this Oct 14, 2024
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.

1 participant