You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to use mirror js to interact with mirror but after reading searching the docs and testing out the mirror js deposit function for several hours, we are stuck on the position_idx input, it seems we are providing the wrong value (based on our error msg)
How do I get this position_idx input? Thank you!
The text was updated successfully, but these errors were encountered:
Hi, position_idx represents a Collateral Debt Position (CDP) and Mirror's Mint contract handles that.
You get this value on opening a position with mirror.mint.openPosition where mint is an instance of the mirror.jsMirror class (that's part of a short farming flow on the Web App) and provide it to perform activities on your position.
Like in your case, depositing collateral to a CDP would obviously require a position_idx identifying that CDP you're going to update.
I'm sure you've already found the answer, but let me post this here just in case someone's searching for the same.
Not sure if issues are the right place to talk about that though ;)
You might wanna close this one and visit project Discord for questions as an option.
Hi I was wondering what the position_idx input here in the deposit function is and how I can get it?
mirror.js/src/contracts/MirrorMint.ts
Line 297 in 6862923
We are trying to use mirror js to interact with mirror but after reading searching the docs and testing out the mirror js deposit function for several hours, we are stuck on the position_idx input, it seems we are providing the wrong value (based on our error msg)
How do I get this position_idx input? Thank you!
The text was updated successfully, but these errors were encountered: