Last active
August 5, 2022 15:08
-
-
Save 0xAnon101/ac15a0a57b003c20c2ba361cc59bf78f to your computer and use it in GitHub Desktop.
DVD Unstoppable #1 - a()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // why use deposit tokens to get the balance? | |
| function depositTokens(uint256 amount) external nonReentrant { | |
| require(amount > 0, "Must deposit at least one token"); | |
| // Transfer token from sender. Sender must have first approved them. | |
| damnValuableToken.transferFrom(msg.sender, address(this), amount); | |
| poolBalance = poolBalance + amount; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment