You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/v3/guidelines/smart-contracts/howto/multisig.md
+24-20Lines changed: 24 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ This tutorial help you learn how to deploy your multisig contract.
14
14
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.
15
15
16
16
Based on original multisig contract code and updates by akifoq:
17
+
17
18
-[original TON Blockchain multisig-code.fc](https://github.com/ton-blockchain/ton/blob/master/crypto/smartcont/multisig-code.fc)
18
19
-[akifoq/multisig](https://github.com/akifoq/multisig) with fift libraries to work with multisig.
19
20
@@ -37,12 +38,10 @@ Before we begin our journey, check and prepare your environment.
37
38
```bash
38
39
git clone https://github.com/akifoq/multisig.git
39
40
cd~/multisig
40
-
```
41
-
41
+
```
42
42
43
43
## 🚀 Let's get started!
44
44
45
-
46
45
1. Compile the code to fift.
47
46
2. Prepare multisig owners keys.
48
47
3. Deploy your contract.
@@ -56,8 +55,8 @@ Compile the contract to Fift with:
*`$WALLET_ID$` - the wallet number assigned for current key. It is recommended to use a unique `$WALLET_ID$` for each new wallet with the same key.
111
-
*`$KEYS_COUNT$` - the number of keys needed for confirmation, usually equal to the number of public keys
109
+
-`$WALLET_ID$` - the wallet number assigned for current key. It is recommended to use a unique `$WALLET_ID$` for each new wallet with the same key.
110
+
-`$KEYS_COUNT$` - the number of keys needed for confirmation, usually equal to the number of public keys
112
111
113
112
:::info wallet_id explained
114
113
It's possible to create many wallets with the same keys (Alice key, Bob key). What to do if Alice and Bob already have treasure? That's why `$WALLET_ID$` is crucial here.
@@ -128,7 +127,7 @@ Bounceable address (for later access): kQBLuyZgCX21xy3V6QhhFQEPD4yFAeC4_vH-MY2d5
128
127
(Saved wallet creating query to file wallet-create.boc)
129
128
```
130
129
131
-
:::info
130
+
:::info
132
131
If you have "public key must be 48 characters long" error, please make sure your `keys.txt` has unix type word wrap - LF. For example, word wrap can be changed via Sublime text editor.
133
132
:::
134
133
@@ -166,7 +165,6 @@ sendfile ./wallet-create.boc
166
165
167
166
After that, the wallet will be ready to work within a minute.
168
167
169
-
170
168
### Interact with multisig wallet
171
169
172
170
#### Create a request
@@ -177,9 +175,9 @@ First you need to create a message request:
*`$WALLET_ID$` — is an ID of wallet backed by this multisig contract.
203
-
*`$AWAIT_TIME$` — Time in seconds that smart contract will await signs from multisig wallet's owners for request.
204
-
*`$MESSAGE$` — here is a name of message boc-file created on the previous step.
201
+
202
+
-`$WALLET_ID$` — is an ID of wallet backed by this multisig contract.
203
+
-`$AWAIT_TIME$` — Time in seconds that smart contract will await signs from multisig wallet's owners for request.
204
+
-`$MESSAGE$` — here is a name of message boc-file created on the previous step.
205
205
206
206
:::info
207
207
If time equals `$AWAIT_TIME$` passed before the request signs, the request becomes expired. As usual, $AWAIT_TIME$ equals a couple of hours (7200 seconds)
208
208
:::
209
209
210
210
For example:
211
+
211
212
```
212
213
fift -s create-order.fif 0 message -t 7200
213
214
```
214
215
215
-
216
216
Ready file will be saved in `order.boc`
217
217
218
218
:::info
@@ -227,8 +227,8 @@ To sign, you need to do:
227
227
fift -s add-signature.fif $KEY$ $KEY_INDEX$
228
228
```
229
229
230
-
*`$KEY$` - name of the file containing the private key to sign, without extension.
231
-
*`$KEY_INDEX$` - index of the given key in `keys.txt` (zero-based)
230
+
-`$KEY$` - name of the file containing the private key to sign, without extension.
231
+
-`$KEY_INDEX$` - index of the given key in `keys.txt` (zero-based)
0 commit comments