Skip to content

Conversation

@2PykeETH
Copy link

@2PykeETH 2PykeETH commented Oct 4, 2025

Summary

This PR introduces the getUserPositionInPool external view function to the TestAMMContract smart contract.
The function provides a structured and detailed overview of a user’s position within a specific prediction market pool — enabling enhanced frontend visibility, analytics integration, and on-chain composability for liquidity tracking.


Changes

🧩 New Function — getUserPositionInPool(address _user, bytes32 _marketId)

Purpose:

To expose comprehensive position data for a given user and market pool without modifying contract state.

Function Signature:

function getUserPositionInPool(address _user, bytes32 _marketId)
    external
    view
    returns (
        address operator,
        address token0,
        address token1,
        uint24 fee,
        uint128 liquidity,
        int24 tickLower,
        int24 tickUpper,
        uint128 tokensOwed0,
        uint128 tokensOwed1,
        uint256 amount0,
        uint256 amount1
    );

@Neros0 Neros0 self-requested a review October 5, 2025 20:11
@Neros0 Neros0 added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 5, 2025
@Neros0 Neros0 merged commit b276b2b into Arenium-Social:main Oct 5, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants