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

ConcentratedLiquidityPoolManager Allowance Check Issue #317

Open
theKata opened this issue Mar 4, 2022 · 2 comments
Open

ConcentratedLiquidityPoolManager Allowance Check Issue #317

theKata opened this issue Mar 4, 2022 · 2 comments

Comments

@theKata
Copy link

theKata commented Mar 4, 2022

referenced : ConcentratedLiquidityPoolManager.sol

Is there any reason why it is possible to call only msg.sender?

require(msg.sender == ownerOf(tokenId), "NOT_ID_OWNER"); 

If this happens, it will be difficult to create a 3rd party contract for the position NFT in the future. How about changing it to _isApprovedOrOwner as shown below?

require(_isApprovedOrOwner(msg.sender, tokenId), "NOT_ALLOWED");;

RELATED CODES

require(address(position.pool) == address(pool), "POOL_MIS_MATCH");
require(position.lower == lower && position.upper == upper, "RANGE_MIS_MATCH");
require(ownerOf(positionId) == msg.sender, "NOT_ID_OWNER");

function burn(
uint256 tokenId,
uint128 amount,
address recipient,
bool unwrapBento,
uint256 minimumOut0,
uint256 minimumOut1
) external returns (uint256 token0Amount, uint256 token1Amount) {
require(msg.sender == ownerOf(tokenId), "NOT_ID_OWNER");

function collect(
uint256 tokenId,
address recipient,
bool unwrapBento
) public returns (uint256 token0amount, uint256 token1amount) {
require(msg.sender == ownerOf(tokenId), "NOT_ID_OWNER");

@theKata
Copy link
Author

theKata commented Mar 4, 2022

ConcentratedLiquidityPoolManager has not been deployed on the testnet yet, is there any reason?

@theKata
Copy link
Author

theKata commented Mar 14, 2022

It would be better to extend the parameter so that mint can separately specify the receiver

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

No branches or pull requests

1 participant