Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
#!/usr/bin/fift -s "TonUtil.fif" include "Asm.fif" include "multisig.fift" include <s constant contract_code "multisig_init_storage.fift" include <s constant contract_storage_initializer // (uniq_token, min_signature_num, public_keys_dict) -> cell // PARAMS 0 =: wc 16 =: keys_num // CREATE KEYS { file>B dup Blen 32 <> abort"Private key must be exactly 32 bytes long" dup priv>pub swap } : load-keypair' // ( fname -- pubkey privkey ) { dup file-exists? { load-keypair' } { dup newkeypair swap rot over swap B>file rot drop } cond } : load-generate-keypair' { load-generate-keypair' swap 256 B>u@ } : nkp "p01.pk" nkp =: pub01 =: priv01 "p02.pk" nkp =: pub02 =: priv02 "p03.pk" nkp =: pub03 =: priv03 "p04.pk" nkp =: pub04 =: priv04 "p05.pk" nkp =: pub05 =: priv05 "p06.pk" nkp =: pub06 =: priv06 "p07.pk" nkp =: pub07 =: priv07 "p08.pk" nkp =: pub08 =: priv08 "p09.pk" nkp =: pub09 =: priv09 "p0a.pk" nkp =: pub0a =: priv0a "p0b.pk" nkp =: pub0b =: priv0b "p0c.pk" nkp =: pub0c =: priv0c "p0d.pk" nkp =: pub0d =: priv0d "p0e.pk" nkp =: pub0e =: priv0e "p0f.pk" nkp =: pub0f =: priv0f "p10.pk" nkp =: pub10 =: priv10 // CREATE ORDER -1 constant bounce <b b{01} s, bounce 1 i, b{000100} s, 0 4973788529520401637175306036311921661440676526367978167240186796235618131100 addr, 0 Gram, 0 9 64 32 + + 1+ u, 3 10 u, b> constant example_message_body 3 constant message_mode <b message_mode 8 u, example_message_body ref, b> <s constant example_message_root // CREATE LIST OF PUBKEYS pub01 pub02 pub03 pub04 pub05 pub06 pub07 pub08 pub09 pub0a pub0b pub0c pub0d pub0e pub0f pub10 dictnew { <b b> <s -rot 256 udict! drop } 16 times =: keys 10 constant min_signature_num // INITIALIZE PERSISTENT STORAGE min_signature_num keys contract_storage_initializer runvmdict drop // TODO check execution code constant contract_storage <b b{00110} s, <b contract_code s, b> ref, contract_storage ref, b> dup =: state_init dup hashu wc swap 2constant multisig_addr multisig_addr 256 u>B swap 32 u>B min_signature_num 8 u>B keys_num 8 u>B B+ B+ B+ =: contract_description contract_description "multisig.ctr" B>file multisig_addr swap drop 6277101735386680763835789423207666416102355444464034512896 / =: uniq_token <b 0 8 u, b> <s =: init_message <b b{1000100} s, multisig_addr addr, b{000010} s, state_init <s s, b{0} s, init_message s, b> 2 boc+>B "multisig-init.boc" B>file 1 constant op_num 1 constant seq_no 0xFFFFFFFF constant unix_time_bound 10 =: min_signatures_num example_message_root 0 dictnew 7 udict! drop constant order_dict <b op_num 8 u, seq_no 32 u, unix_time_bound 32 u, min_signatures_num 8 u, uniq_token 64 u, dup constant message_builder order_dict dict, b> constant data_for_signing pub01 priv01 pub02 priv02 pub03 priv03 pub04 priv04 pub05 priv05 pub06 priv06 pub07 priv07 pub08 priv08 pub09 priv09 pub0a priv0a data_for_signing dictnew // SIGNING { swap dup hashu 3 roll ed25519_sign_uint // keys pubk dict data_for_signing signature <b swap B, b> <s // keys pubk dict data_for_signing <signature> 3 -roll 3 -roll 256 udict! drop // keys data_for_siging dict } 9 times =: provided_signatures hashu swap ed25519_sign_uint =: header_signature message_builder swap 256 u, header_signature B, provided_signatures dict, order_dict dict, b> constant store_order_message <b b{1000100} s, multisig_addr addr, 0 Gram, b{00} s, store_order_message ref, b> 2 boc+>B "10signatures.boc" B>file ."new multisig wallet address = " multisig_addr .addr cr ."Non-bounceable address (for init): " multisig_addr 7 .Addr cr ."Bounceable address (for later access): " multisig_addr 6 .Addr cr ."(Saved multisig contract creating query to file multisig-init.boc)" cr ."(Saved order with 10 signatures to file 10signatures.boc)" cr
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
⭐⭐⭐MAKE $900 INSTANTLY⭐⭐
Java | 24 sec ago | 0.09 KB
⭐⭐⭐Make $15OO in 2O minutesV E⭐⭐
Java | 56 sec ago | 0.09 KB
⭐⭐⭐Make $1500 in 20 minutes⭐⭐
Java | 1 min ago | 0.09 KB
Дивизон?
C++ | 1 min ago | 0.32 KB
⭐⭐⭐Exchange Exploit T I⭐⭐
Java | 1 min ago | 0.09 KB
⭐⭐⭐Exploit 500$ in 15 Minutes⭐⭐
Java | 2 min ago | 0.09 KB
⭐⭐⭐MAKE $500 IN 15 MIN⭐⭐
Java | 3 min ago | 0.09 KB
⭐⭐⭐MAKE $9OO INSTANTLY D G⭐⭐
Java | 3 min ago | 0.09 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!