The tool leverages the Cobra CLI library to provide multiple functionalities. You can either convert a price to a tick index or convert a tick index to a price using the underlying Osmosis Concentrated Liquidity math module.
To convert a price to a tick index, run the following command at the root of the project:
go run main.go price-to-tick <price>
Example:
go run main.go price-to-tick 1.23
To convert a tick index to a price, run the following command at the root of the project:
go run main.go tick-to-price <tick>
For negative tick values, use:
go run main.go tick-to-price -- <-tick>
Example:
go run main.go tick-to-price 456
go run main.go tick-to-price -- -456