-
Notifications
You must be signed in to change notification settings - Fork 75
feat: Add simple Hypercore Depositor handler #1181
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
Conversation
Signed-off-by: nicholaspai <[email protected]>
Signed-off-by: nicholaspai <[email protected]>
Signed-off-by: nicholaspai <[email protected]>
Signed-off-by: nicholaspai <[email protected]>
Signed-off-by: nicholaspai <[email protected]>
Signed-off-by: nicholaspai <[email protected]>
Signed-off-by: nicholaspai <[email protected]>
| * @param amount The amount of tokens on HyperEVM to deposit. | ||
| * @param user The address of the user on Hypercore to send the tokens to. | ||
| */ | ||
| function depositToHypercore(address token, uint256 amount, address user) external nonReentrant { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes that the tokens are dropped on the contract atomically, right?
What are the downsides of doing a transferFrom from msg.sender to pull the tokens in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a great call, I overlooked this flow. We definitely should pull funds from the msg.sender in depositToHypercore, unlike in handleAcrossV3Message
Signed-off-by: nicholaspai <[email protected]>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
mrice32
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
An alternative to the MulticallHandler designed to support permissioned accounts to deposit ERC20's from hyperevm into an end user's hypercore account
Signed-off-by: nicholaspai [email protected]