Introduction
This guide will cover how to create (or mint) a liquidity position on the Ramses V3 protocol. Like the Liquidity Position guide it doesn’t have an accompanying example, nevertheless the concepts and functions used here can be found among the various examples that interact with liquidity positions.If you need an introduction to liquidity positions, check out the Liquidity Position guide
- Creating an ethersJS contract to interact with the RamsesV3PositionManager.
- Fetching all positions for an address.
- Fetching the position info for the positions.
@uniswap/v3-periphery (Ramses V3 uses compatible interfaces).
Connecting to the NFTPositionManager Contract
We use ethersJS to interact with the RamsesV3PositionManager Contract. Let’s create an ethers Contract:v3-periphery package and the contract address from the Ramses contract addresses
Fetching the Position Ids
We want to fetch all Position Ids for our address. We first fetch the number of positions and then the ids by their indices. We fetch the number of positions using thebalanceOf read call:
Fetching the Position Info
Now that we have the ids of the Positions associated with our address, we can fetch the position info using thepositions function.
The solidity function returns a lot of values describing the Position:
PositionInfo:
positions:
