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

support callback for xtoken receive or rollback #56

Merged
merged 10 commits into from
Mar 21, 2024

Conversation

xiaoch05
Copy link
Contributor

No description provided.

@xiaoch05
Copy link
Contributor Author

mapping-token => xToken

} else {
uint allowance = IERC20(_token).allowance(address(this), _guard);
require(IERC20(_token).approve(_guard, allowance + _amount), "Backing:approve token transfer to guard failed");
IGuard(_guard).deposit(uint256(_transferId), _token, _recipient, _amount);
IGuardV3(_guard).deposit(uint256(_transferId), _token, _recipient, _amount, _extData);
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is it possiable to use the same callback for native and erc20 token

@xiaoch05
Copy link
Contributor Author

xiaoch05 commented Mar 21, 2024

change native token to wtoken
updated in next PR

@xiaoch05 xiaoch05 marked this pull request as ready for review March 21, 2024 04:23
@xiaoch05 xiaoch05 changed the title support uniswap v3 callback support callback for xToken receive or rollback Mar 21, 2024
@xiaoch05 xiaoch05 changed the title support callback for xToken receive or rollback support callback for xtoken receive or rollback Mar 21, 2024
@xiaoch05 xiaoch05 merged commit e1ded62 into master Mar 21, 2024
1 check passed
@xiaoch05 xiaoch05 deleted the xiaoch05-support-uniswapV3Callback branch March 21, 2024 05:47
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.

2 participants