Automator

mimo automator: automate swap for advanced trader.

What you need?

You need the following tools or knowledge for this page

  1. ioctl - command line tool for IoTeX blockchain. a detailed instruction is here.

  2. bash - you need to have basic knowledge about bash functions

The recommended environment of running the automator is on macOS or Linux. On Windows, the best way to use it is WSL (windows subsystem for linux).

Enjoy the lightning fast trading experience provided by mimo on IoTeX network, now with automator!

Basic Functions

function to convert a timestamp to 32 bytes hex

function deadline() {
  ts=`date +"%s"`
  printf "%064x\n" `expr $ts + 60`
}

function to convert a decimal number to 32 bytes hex

function decimal2hex() {
  echo "ibase=A;obase=16;$1" | bc | xargs -0 -I h printf "%64s" h | sed "s/ /0/g"
}

Construct ioctl Commands

Add liquidity

Remove liquidity

Get token to IOTX input price

Get IOTX to token input price

Swap token to IOTX

Swap IOTX to token

Last updated

Was this helpful?