swap

command
v1.13.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 14 Imported by: 0

README

Interact with Quipuswap

Use TzGo to work with Quipuswap AMM pools. Right now this example is read-only and we may extend it to run complete swaps in the future.

Usage

Usage: swap [flags] <cmd> [sub-args]

Flags
  -node string
      Tezos node URL (default "https://rpc.tzstats.com")
  -v  be verbose

Commands
  info  <KT1> <pool_id>             show Quipuswap pool info
  sim   <KT1> <pool_id> <in>        dry run a swap on `in` tokens
  swap  <KT1> <pool_id> <in> <pk>   execute swap of `in` tokens

Examples

# get info from tez/ctez pool on Quipuswap v1
go run . info KT1FbYwEWU8BTfrvNoL5xDEC5owsDxv9nqKT 0

# estimate costs of a swapping 1000 tez for ctez
go run . sim KT1FbYwEWU8BTfrvNoL5xDEC5owsDxv9nqKT 0 1000

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL