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

docs(CL): useful CLI messages and queries #5202

Closed
p0mvn opened this issue May 17, 2023 · 1 comment
Closed

docs(CL): useful CLI messages and queries #5202

p0mvn opened this issue May 17, 2023 · 1 comment

Comments

@p0mvn
Copy link
Member

p0mvn commented May 17, 2023

Background

Documenting useful CLIs and queries for people to use.

The example of the CLI flow down below is for testing MsgAddToConcentratedLiquiditySuperfluidPosition
See the list of other messages in a section below.

# useful queries
osmosisd q concentratedliquidity user-positions osmo1cyyzpxplxdzkeea7kwsydadg87357qnahakaks

osmosisd q concentratedliquidity pools

osmosisd q concentratedliquidity claimable-fees 1

osmosisd q concentratedliquidity claimable-incentives 1

# create pool
osmosisd tx concentratedliquidity create-pool uion uosmo 1 0.001 --from lo-test1 --keyring-backend test --chain-id localosmosis -b=block --fees 875uosmo

# create incentive
osmosisd tx concentratedliquidity create-incentive 69082uosmo 0.1 "2023-05-09T16:01:10.419543805" 1ns --pool-id 1 --from lo-test1 --keyring-backend test --chain-id localosmosis -b=block --fees 875uosmo

# Create a positions between ticks 0 to 100 and 50 to 150
osmosisd tx concentratedliquidity create-position 1 0 100 1000000uosmo,1000000uion 1 0 --from lo-test1 --keyring-backend test -b=block --chain-id=localosmosis --fees 875uosmo

# Create a full range position
osmosisd tx concentratedliquidity create-position 1 [-162000000] 342000000 2000000uosmo,2000000uion 1 0 --from lo-test1 --keyring-backend test -b=block --chain-id=localosmosis --fees 875uosmo

# Gov prop to enable SF asset
osmosisd tx gov submit-proposal set-superfluid-assets-proposal --title="set superfluid assets" --description="set superfluid assets description" --superfluid-assets="cl/pool/1" --deposit=10000000uosmo --from=lo-test1 --chain-id=localosmosis --keyring-backend=test --broadcast-mode=block --fees 1000000uosmo

# Pass the prop
osmosisd tx gov vote 1 yes --from val --keyring-backend test --chain-id=localosmosis -b=block --fees 2000uosmo

# create SF position
osmosisd tx superfluid create-full-range-position-and-sf-delegate 1000000uosmo,1000000uion osmovaloper12smx2wdlyttvyzvzg54y2vnqwq2qjatex7kgq4 1 --from lo-test1 -b block --chain-id localosmosis --keyring-backend test --fees 1000000uosmo --gas 9000000

# perform a swap
osmosisd tx poolmanager swap-exact-amount-in 2000000uosmo 1 --swap-route-pool-ids 1 --swap-route-denoms uion --from lo-test1 --keyring-backend test -b=block --chain-id=localosmosis --fees 875uosmo

# add to position
 osmosisd tx superfluid add-to-superfluid-cl-position 5 1000uosmo 1000uion --from lo-test1 --keyring-backend test --chain-id=localosmosis -b=block

All relevant messages by module

  • x/superfluid

    • MsgAddToConcentratedLiquiditySuperfluidPosition
    • MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition
    • MsgCreateFullRangePositionAndSuperfluidDelegate
  • x/gamm

    • MsgMigrateSharesToFullRangeConcentratedPosition
  • x/concentrated-liquidity

    • MsgCreatePosition
    • MsgWithdrawPosition
    • MsgAddToPosition
    • MsgCollectFees
    • MsgCollectIncentives
    • MsgCreateIncentive
    • MsgFungifyChargedPositions
  • x/poolmanager

    • MsgSwapExactAmountIn
    • MsgSwapExactAmountOut

Queries

Relevant Material

@Cordtus
Copy link
Contributor

Cordtus commented Dec 8, 2023

For full-range position the lower tick should be [-108000000]

It also helps to add a gas amount, auto failed but setting gas 450000 seemed fine.

@github-project-automation github-project-automation bot moved this from Needs Triage 🔍 to Done ✅ in Osmosis Chain Development Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants