infrastructure-upgrade/lib/v3-periphery/contracts/test/NonfungiblePositionManagerPositionsGasTest.sol
T-Hax 735546619e
init
Signed-off-by: T-Hax <>
2023-04-08 18:46:18 +00:00

19 lines
620 B
Solidity

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.7.6;
import '../interfaces/INonfungiblePositionManager.sol';
contract NonfungiblePositionManagerPositionsGasTest {
INonfungiblePositionManager immutable nonfungiblePositionManager;
constructor(INonfungiblePositionManager _nonfungiblePositionManager) {
nonfungiblePositionManager = _nonfungiblePositionManager;
}
function getGasCostOfPositions(uint256 tokenId) external view returns (uint256) {
uint256 gasBefore = gasleft();
nonfungiblePositionManager.positions(tokenId);
return gasBefore - gasleft();
}
}