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.
Installing the CLI?
Section titled “Installing the CLI?”To install the CLI:
- Visit the releases, download the most recent version by clicking Assets and then downloading the zip.
- Unpack the zip
- Ensure Yarn is installed
- Run
yarn install
in your command prompt
You are now ready to use the CLI!
Using Gnosis SAFE
Section titled “Using Gnosis SAFE”Encode Function Data
Section titled “Encode Function Data”Returns encoded data for interaction with schain through gnosis safe on mainnet.
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.
Using the MultisigWallet on sChain
Section titled “Using the MultisigWallet on sChain”Global options
Section titled “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
Returns the result of executing the transaction, using call.
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
Section titled “Recharge”Allows to recharge the sFUEL balance of the MultiSigWallet contract
npx msig recharge [options] <amount>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<amount>
- Amount of sFUEL in wei
Submit Transaction
Section titled “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.
npx msig submitTransaction [options] <contract> <func> [params...]
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_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:
npx msig submitTransaction ConfigController addToWhitelist <ethereum-address>
Submit Transaction with Data
Section titled “Submit Transaction with Data”Allows an owner to submit and confirm a transaction with custom data.
npx msig submitTransactionWithData [options] <contractAddress> <data>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_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
Section titled “Confirm Transaction”Allows an owner to confirm a transaction.
npx msig confirmTransaction [options] <transactionId>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
Revoke Confirmation
Section titled “Revoke Confirmation”Allows an owner to revoke a confirmation for a transaction.
npx msig revokeConfirmation [options] <transactionId>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
Execute Transaction
Section titled “Execute Transaction”Allows an owner on the MultisigWallet to execute a confirmed transaction.
npx msig executeTransaction [options] <transactionId>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
Get Confirmations
Section titled “Get Confirmations”Returns a list (i.e array) with the owner addresses who confirmed the transaction.
npx msig getConfirmations [options] <transactionId>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
Get Confirmation Count
Section titled “Get Confirmation Count”Returns number of confirmations of a transaction (i.e how many times the transaction has been confirmed).
npx msig getConfirmationCount [options] <transactionId>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
Is Transaction Confirmed
Section titled “Is Transaction Confirmed”Returns the confirmation status of transactions. If transaction ID was provided, than execution will return only status for that transaction.
npx msig isConfirmed [options] <transactionId>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Optional arguments:
[transactionId]
- Transaction id
Get Owners
Section titled “Get Owners”Returns list of owners on MultisigWallet on sChain.
npx msig getOwners [options]
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Get Balance of MultisigWallet
Section titled “Get Balance of MultisigWallet”Returns the sFUEL balance of address.
npx msig getBalance [options] <address>
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<address>
- The address of which to return the sFUEL balance