Multipass on Windows and MacOS with TONOS-CLI
Step 1 (once)
Install Multipass
Download Multipass for Windows
Windows 10 Pro/Enterprise v 1803
https://multipass.run/download/windows
or if you have a later version of Windows 10 Home / Pro / Enterprise you need to download the Virtualbox
Virtualbox for x64 Windows
https://download.virtualbox.org/virtualbox/6.0.24/VirtualBox-6.0.24-139119-Win.exe
Virtualbox for x86 Windows
https://download.virtualbox.org/virtualbox/5.2.44/VirtualBox-5.2.44-139111-Win.exe
Download Multipass for macOS
Sierra 10.12.0 or later, 2010 or newer Mac
https://multipass.run/download/macos
Launch a fresh instance of the current Ubuntu LTS
need to copy and paste into the command line
$ multipass launch --name ubuntu-vm 18.04
result..
Launching ubuntu-vm...
Downloading Ubuntu 18.04 LTS..........
Launched: ubuntu-vm
Check out the running instances
need to copy and paste into the command line
$ multipass list
result..
Name State IPv4 Release
ubuntu-vm RUNNING 10.125.174.247 Ubuntu 18.04 LTS
Connect to a running instance
need to copy and paste into the command line
$ multipass shell ubuntu-vm
result..
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-122-generic x86_64)
...
Don’t forget to logout (or Ctrl-D) or you may find yourself heading all the way down the Inception levels… 😉
When you finish working, exit from the VM with the command:
$ exit
Update repository and System Upgrade
need to copy and paste into the command line
$ sudo apt update && sudo apt upgrade -y
Install Cargo
need to copy and paste into the command line
$ sudo apt install cargo pkg-config git libssl-dev rustc -y
Build TONOS-CLI tool from source:
need to copy and paste into the command line
$ git clone https://github.com/tonlabs/tonos-cli.git $ cd tonos-cli $ sudo cargo update $ sudo cargo build --release $ cd
The tonos-cli
executable is built in the tonos-cli/target/release
folder.
Step 2 (every time you create a new project)
Create a folder (multisig or other)
need to copy and paste into the command line
$ sudo mkdir multisig
Copy the tonos-cli
executable into the new folder you have created
need to copy and paste into the command line
$ sudo cp tonos-cli/target/release/tonos-cli multisig
Go to the folder
need to copy and paste into the command line
$ cd multisig
Download contract files
need to copy and paste into the command line
$ sudo wget https://raw.githubusercontent.com/tonlabs/ton-labs-contracts/master/solidity/setcodemultisig/SetcodeMultisigWallet.abi.json
$ sudo wget https://github.com/tonlabs/ton-labs-contracts/raw/master/solidity/setcodemultisig/SetcodeMultisigWallet.tvc
Configure TONOS-CLI environment
need to copy and paste into the command line
$ export PATH="multisig:$PATH" $ sudo ./tonos-cli config --url https://main.ton.dev
Generate deployment key pair file
need to copy and paste into the command line and insert your seed phrase!!!!!!!!!!!
$ sudo ./tonos-cli getkeypair deploy.keys.json "<seed_phrase>"
For example:
sudo ./tonos-cli getkeypair deploy.keys.json "dizzy modify exotic daring gloom rival pipe disagree again film neck fuel"
$ cd
Exit
need to copy and paste into the command line
$ exit
Stop an instance to save resources
need to copy and paste into the command line
$ multipass stop ubuntu-vm
Step 3 (every time you start working with a project)
Start an instance
need to copy and paste into the command line
$ multipass start ubuntu-vm
Connect to a running instance
need to copy and paste into the command line
$ multipass shell ubuntu-vm
result..
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-122-generic x86_64)
...
Don’t forget to logout (or Ctrl-D) or you may find yourself heading all the way down the Inception levels… 😉
When you finish working, exit from the VM with the command:
$ exit
Go to the working folder (multisig or other)
need to copy and paste into the command line
$ cd multisig
To confirm/sign the transaction use the following command:
you need to copy the received link and paste it here click enter
For example:
sudo ./tonos-cli call 0:bf7afb5e8610ae337daad42128d16f828e957c5374e81d32e9732f5f86ea5a3c confirmTransaction '{"transactionId":"0x5f98db74b0dae401"}' --abi SetcodeMultisigWallet.abi.json --sign deploy.keys.json
need to copy and paste into the command line
$ cd
Exit
need to copy and paste into the command line
$ exit
Stop an instance to save resources
need to copy and paste into the command line
$ multipass stop ubuntu-vm
Delete the instance (if you needed)
need to copy and paste into the command line
$ multipass delete ubuntu-vm
And when you want to completely get rid of it:
need to copy and paste into the command line
$ multipass purge