> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skale.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Multisig Wallet CLI

> Explore how to use the multisigwallet CLI to manage your SKALE Chain

The [multisigwallet CLI](https://github.com/skalenetwork/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](/developers/run-a-skale-chain/schain-ownership) of a SKALE Chain, this CLI supports with management of your SKALE Chain both from the SKALE Chain side and from Mainnet via Gnosis SAFE.

## Installing the CLI?

To install the CLI:

1. Visit the [releases](https://github.com/skalenetwork/multisigwallet-cli/releases), download the most recent version by clicking **Assets** and then downloading the zip.
2. Unpack the zip
3. Ensure [Yarn](https://yarnpkg.com/getting-started/install) is installed
4. Run `yarn install` in your command prompt

You are now ready to use the CLI!

## Using Gnosis SAFE

### Encode Function Data

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

```bash theme={null}
npx msig encodeData [options] <schainName> <contract> <func> [params...]
```

Required arguments:

* `<schainName>` - Destination SKALE Chain 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](/developers/run-a-skale-chain/using-safe).

## Using the MultisigWallet on SKALE Chain

<Note>
  The following calls require a PRIVATE\_KEY and RPC to be set in .env or passed in via CLI to work. The `.env` method is encouraged.
  The below calls execute directly through the SKALE Chain MultiSigWallet and DO NOT require the Gnosis SAFE on Ethereum Mainnet.
</Note>

### Global options

* `-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`

### Call

Returns the result of executing the transaction, using call.

```bash theme={null}
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

### Recharge

Allows to recharge the sFUEL balance of the MultiSigWallet contract

```bash theme={null}
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

### Submit Transaction

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.

```bash theme={null}
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:

```bash theme={null}
npx msig submitTransaction ConfigController addToWhitelist <ethereum-address>
```

### Submit Transaction with Data

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

```bash theme={null}
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

### Confirm Transaction

Allows an owner to confirm a transaction.

```bash theme={null}
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

### Revoke Confirmation

Allows an owner to revoke a confirmation for a transaction.

```bash theme={null}
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

### Execute Transaction

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

```bash theme={null}
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

### Get Confirmations

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

```bash theme={null}
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

### Get Confirmation Count

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

```bash theme={null}
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

### Is Transaction Confirmed

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

```bash theme={null}
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

### Get Owners

Returns list of owners on MultisigWallet on SKALE Chain.

```bash theme={null}
npx msig getOwners [options]
```

Required variables:

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

### Get Balance of MultisigWallet

Returns the sFUEL balance of address.

```bash theme={null}
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
