Make a simple multisig contract with fift
advanced level
This information is very low-level. Could be hard to understand for newcomers and designed for advanced people who want to understand fift. The use of fift is not required in everyday tasks.
💡 Overview
This tutorial help you learn how to deploy your multisig contract.
Recall, that (n, k)-multisig contract is a multisignature wallet with n private keys holders, which accepts requests to send messages if the request (aka order, query) collects at least k signatures of the holders.
Based on original multisig contract code and updates by akifoq:
- original TON Blockchain multisig-code.fc
- akifoq/multisig with fift libraries to work with multisig.
starter tip
For anyone new with multisig: What is Multisig Technology? (video)
📖 What you'll learn
- How to create and customize a simple multisig wallet.
- How to deploy multisig wallet using lite-client.
- How to sign request and send it in message to the blockchain.
⚙ Set your environment
Before we begin our journey, check and prepare your environment.
- Install
func
,fift
,lite-client
binaries andfiftlib
from the Installation section. - Clone repository and open its directory in CLI.
git clone https://github.com/akifoq/multisig.git
cd ~/multisig
🚀 Let's get started!
- Compile the code to fift.
- Prepare multisig owners keys.
- Deploy your contract.
- Interact with deployed multisig wallet in blockchain.
Compile the contract
Compile the contract to Fift with:
func -o multisig-code.fif -SPA stdlib.fc multisig-code.fc