Go to releases and take the latest version of the project. Download the multisigwallet-cli.zip
and unpack the archive.
Or clone the repo and run ./scripts/prepare.sh
this will add the latest .json files (ABIs) needed to execute multisig cli commands.
Run yarn install
and setup .env
Optional variables:
PRIVATE_KEY_<number>
- Owner of the wallet, where<number>
should be less or equal 50ABI
- Filename of the custom abi, must be indata/
folder
If you clone this repo instead of using the releases, please run ./scripts/prepare.sh
to generate the necessary pre-deployment.json file.
-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 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
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
npx msig recharge [options] <amount>
Allows to recharge the sFUEL balance of the MultiSigWallet contract
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
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>
npx msig submitTransactionWithData [options] <contractAddress> <data>
Allows an owner to submit and confirm a transaction with custom 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
npx msig confirmTransaction [options] <transactionId>
Allows an owner to confirm a transaction.
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
npx msig revokeConfirmation [options] <transactionId>
Allows an owner to revoke a confirmation for a transaction.
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
npx msig executeTransaction [options] <transactionId>
Allows you to execute a confirmed transaction.
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
npx msig getConfirmations [options] <transactionId>
Returns array with owner addresses, which confirmed transaction.
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
npx msig getConfirmationCount [options] <transactionId>
Returns number of confirmations of a transaction.
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Required arguments:
<transactionId>
- Transaction id
npx msig isConfirmed [options] <transactionId>
Returns the confirmation status of transactions. If transaction ID was provided, than execution will return only status for that transaction.
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
Optional arguments:
[transactionId]
- Transaction id
npx msig getOwners [options]
Returns list of owners.
Required variables:
ENDPOINT
- Endpoint of the SKALE chainPRIVATE_KEY_1
- Originatior private key (owner of the MultiSigWallet)
npx msig getBalance [options] <address>
Returns the sFUEL balance of 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