#!/usr/bin/env fift -s "TonUtil.fif" include { ."usage: " @' $0 type ." []" cr ."Creates a request to TestGiver and saves it into .boc" cr ."('testgiver-query.boc' by default)" cr 1 halt } : usage $# 3 - -2 and ' usage if // "testgiver.addr" load-address Masterchain 0xfcb91a3a3816d0f7b8c2c76108b8a9bc5a6b7a55bd79f8ab101c52db29232260 2constant giver_addr ."Test giver address = " giver_addr 2dup .addr cr 6 .Addr cr $1 true parse-load-address =: bounce 2=: dest_addr $2 parse-int =: seqno $3 $>GR =: amount def? $4 { @' $4 } { "testgiver-query" } cond constant savefile ."Requesting " amount .GR ."to account " dest_addr 2dup bounce 7 + .Addr ." = " .addr ."seqno=0x" seqno x. ."bounce=" bounce . cr // create a message (NB: 01b00.., b = bounce) dup ."enveloping message: " dup ."resulting external message: " B dup Bx. cr savefile +".boc" tuck B>file ."(Saved to file " type .")" cr