Skip to content

Using Multisig Wallet CLI

The multisigwallet CLI is a command line interface tool that helps handle encoding function data specifically on SKALE Network contracts. Due to the unique ownership structure of a SKALE Chain, this CLI supports with management of your SKALE Chain both from the sChain side and from Mainnet via Gnosis SAFE.

To install the CLI:

  1. Visit the releases, download the most recent version by clicking Assets and then downloading the zip.
  2. Unpack the zip
  3. Ensure Yarn is installed
  4. Run yarn install in your command prompt

You are now ready to use the CLI!

Returns encoded data for interaction with schain through gnosis safe on mainnet.

Terminal window
npx msig encodeData [options] <schainName> <contract> <func> [params...]

Required arguments:

  • <schainName> - Destination schain name
  • <contract> - Destination contract that you wanna call
  • <func> - Function that you wanna call on the destination contract

Optional arguments:

  • [params...] - Arguments for the destination function

To execute via SAFE, see using SAFE.

  • -a, --account <number> - Account number from which the transaction should be performed, by default it’s 1. The account is associated with a private key in .env
  • --custom - For custom abi, set filepath to ABI into .env

Returns the result of executing the transaction, using call.

Terminal window
npx msig call [options] <contract> <func> [params...]

Required arguments:

  • <contract> - Destination contract that you wanna call
  • <func> - Function that you wanna call on the destination contract

Optional arguments:

  • [params...] - Arguments for the destination function

Allows to recharge the sFUEL balance of the MultiSigWallet contract

Terminal window
npx msig recharge [options] <amount>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <amount> - Amount of sFUEL in wei

Allows an owner to submit and confirm a transaction. <contract> must be written in PascalCase. <func> must be written in camelCase and function parameters must be written separated by spaces.

Terminal window
npx msig submitTransaction [options] <contract> <func> [params...]

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <contract> - Name of the contract in pascal case
  • <func> - Name of the function that you wanna call on the destination contract

Optional arguments:

  • [params...] - Arguments for the destination function

Usage example:

Terminal window
npx msig submitTransaction ConfigController addToWhitelist <ethereum-address>

Allows an owner to submit and confirm a transaction with custom data.

Terminal window
npx msig submitTransactionWithData [options] <contractAddress> <data>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <contractAddress> - Destination contract that you wanna call
  • <data> - Encoded data of function selector and params

Allows an owner to confirm a transaction.

Terminal window
npx msig confirmTransaction [options] <transactionId>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <transactionId> - Transaction id

Allows an owner to revoke a confirmation for a transaction.

Terminal window
npx msig revokeConfirmation [options] <transactionId>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <transactionId> - Transaction id

Allows an owner on the MultisigWallet to execute a confirmed transaction.

Terminal window
npx msig executeTransaction [options] <transactionId>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <transactionId> - Transaction id

Returns a list (i.e array) with the owner addresses who confirmed the transaction.

Terminal window
npx msig getConfirmations [options] <transactionId>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <transactionId> - Transaction id

Returns number of confirmations of a transaction (i.e how many times the transaction has been confirmed).

Terminal window
npx msig getConfirmationCount [options] <transactionId>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <transactionId> - Transaction id

Returns the confirmation status of transactions. If transaction ID was provided, than execution will return only status for that transaction.

Terminal window
npx msig isConfirmed [options] <transactionId>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Optional arguments:

  • [transactionId] - Transaction id

Returns list of owners on MultisigWallet on sChain.

Terminal window
npx msig getOwners [options]

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Returns the sFUEL balance of address.

Terminal window
npx msig getBalance [options] <address>

Required variables:

  • ENDPOINT - Endpoint of the SKALE chain
  • PRIVATE_KEY_1 - Originatior private key (owner of the MultiSigWallet)

Required arguments:

  • <address> - The address of which to return the sFUEL balance