1.0.1 • Published 12 months ago

nami_crank v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

NAMI Crank

This script will allow you to call a function with message to sign and broadcast it to the blockchain. It uses a feegrant to make one single wallet responsible for providing the fees.

The script is very flexible and other workers can be added whenever we like.

How to use it

  1. Create your local .env: a. Fill the MNEMONIC b. Set the RPC_ENDPOINT to our starsquid node c. Set the REBALANCER_CONTRACT d. Fill in the ENABLED_WORKER: "rebalancer"

  2. Rebalancer: Call submitMessageToBlockchain(msg) from ./bin/app.jsand pass the following msg:

{
    "from_amount": BigNumberish, // (ethers package)
    "from_denom": Addr,
    "to_denom": Addr,
    "price": Decimal
}