#!/usr/bin/fift -s "TonUtil.fif" include { ."usage: " @' $0 type ." []" cr ."Creates a request to simple configuration smart contract created by mc0.fif requesting to change configuration parameter to , " ."with private key loaded from file .pk, " ."and saves it into .boc ('config-query.boc' by default)" cr 1 halt } : usage $# dup 4 < swap 5 > or ' usage if "config-master" constant file-base 0 constant seqno -1 constant idx true constant bounce "new-value.boc" constant boc-filename 100 constant interval // valid for 100 seconds $1 =: file-base $2 parse-int =: seqno $3 parse-int =: idx $4 =: boc-filename def? $5 { @' $5 } { "config-query" } cond constant savefile file-base +".addr" load-address 2dup 2constant config_addr ."Configuration smart contract address = " 2dup .addr cr 6 .Addr cr file-base +".pk" load-keypair nip constant config_pk ."Loading new value of configuration parameter " idx . ."from file " boc-filename type cr boc-filename file>B B>boc dup dup ."signing message: " dup ."resulting external message: " B dup Bx. cr savefile +".boc" tuck B>file ."(Saved to file " type .")" cr