We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
SwapRouterBase
ref: https://github.com/pancakeswap/pancake-v4-periphery/blob/main/src/SwapRouterBase.sol
Originally the implementation is as follows:
function _payAndSettle(Currency currency, address msgSender, int128 settleAmount) internal virtual { _pay(currency, msgSender, address(vault), uint256(uint128(settleAmount))); vault.settleAndMintRefund(currency, msgSender); } function _pay(Currency currency, address payer, address recipient, uint256 amount) internal virtual;
Then we made some changes in v4-core and the new implementation is as follows:
function _payAndSettle(Currency currency, address msgSender, int128 settleAmount) internal virtual { if (currency.isNative()) { vault.settle{value: uint256(uint128(settleAmount))}(currency); } else { vault.sync(currency); _pay(currency, msgSender, address(vault), uint256(uint128(settleAmount))); vault.settle(currency); } } function _pay(Currency currency, address payer, address recipient, uint256 amount) internal virtual;
Problem
Problem 1: its not clear for implementation to know how to implement _pay for example:
_pay
Suggestion to get feedback
rename the _pay
// from _pay(Currency currency, address payer, address recipient, uint256 amount) // to _payNonNativeToVault(Currency currency, address payer, address vault, uint256 amount);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ref: https://github.com/pancakeswap/pancake-v4-periphery/blob/main/src/SwapRouterBase.sol
Originally the implementation is as follows:
Then we made some changes in v4-core and the new implementation is as follows:
Problem
Problem 1: its not clear for implementation to know how to implement
_pay
for example:Suggestion to get feedback
rename the _pay
The text was updated successfully, but these errors were encountered: