How to deploy a Multisig Wallet

Create a Multisig wallet with TVM CLI

Prerequisites

  • latest Rust release

  • cargo

Build and install CLI tool

cd ~
git clone https://github.com/tvmlabs/tvm-sdk
cd tvm-sdk
cargo install --path tvm_cli --force

The path to the tvm-cli is now publicly accessible. You can also add it to your environment variables (ENVs).

export PATH=$PATH:~/tvm-sdk/target/release

Prepare wallet binary and ABI

Create a folder:

cd ~
mkdir wallet
cd wallet

Download the multisig.abi.jsonarrow-up-right and multisig.tvcarrow-up-right files for your wallet from the multisig wallet repositoryarrow-up-right and place them in this folder.

circle-exclamation

Configure CLI tool

In this guide, we will use the test network at shellnet.ackinacki.orgarrow-up-right. We need to specify the blockchain endpoint for deployment:

Generate seed phrase, keys and address

In Acki Nacki blockchain, the Multisig wallet address depends on its binary code and initial data, which includes the owner's public key.

You can generate everything with one command:

triangle-exclamation
circle-info

After this step, the .tvc file will be overwritten with the specified keys.

The raw address is the future Multisig wallet address. Keys are saved to multisig.keys.json. Be sure to copy your seed phrase if you need it.

Request SHELL tokens

circle-info

On Mainnet Shell tokens will be purchased via special pool

Request SHELL tokensarrow-up-right to your address. If you plan to test your contract systems, you can use this Multisig wallet to top up the balances of these contracts to cover gas fees.

Please contact us in the Telegram Channelarrow-up-right.

Deploy your Multisig wallet

Once you receive the SHELL tokens, check the state of the pre-deployed contract. It should be Uninit:

circle-check

Now you are ready to deploy your Multisig wallet using the following command:

The arguments for the constructor must be enclosed in curly brackets: {<constructor arguments>}

  • owners: An array of custodian public keys. Each key must include the 0x prefix.

  • reqConfirms: The default number of confirmations required to execute a transaction.

  • value: The amount (in nanotokensarrow-up-right) of SHELL tokens to be exchanged for VMSHELL tokens arrow-up-rightduring deployment.

triangle-exclamation
circle-info

In our example, we specify the amount of 10,000,000,000 nanoSHELL, which will be converted into 10,000,000,000 nanoVMSHELL. From this amount, the deployment fee for the contract will be deducted, and the remaining balance will be credited to the Multisig wallet.

Check the contract state again. This time, it should be Active.

circle-check

If you need VMSHELL tokens later, simply call the exchangeToken(uint64 value) method in the Multisig and exchange the required amount. For example, let's convert 10 SHELL tokens into 10 VMSHELL tokens:

circle-check

How to send tokens from Multisig Wallet

To replenish accounts before deployment, use the following command:

circle-info

In this case, the fees will be paid from the Multisig wallet's account

circle-exclamation

For example, we transfer 5 SHELL from the Multisig wallet's balance to the address of the future contract, with the fees also being paid from the Multisig wallet's balance:

Last updated