This repository was archived by the owner on Dec 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- docker exec -it sbtc sbtc $@
3+ docker exec -it sbtc sbtc " $@ "
Original file line number Diff line number Diff line change @@ -13,13 +13,15 @@ stacks_address=$(source $dir/get_credentials.sh | jq -r '.credentials["1"].stack
1313
1414amount=$(( RANDOM% 9000 + 1000 ))
1515
16- json=$( sbtc deposit \
16+ json=$( $dir /../sbtc/bin/ sbtc deposit \
1717 -w $btc_wif \
1818 -n regtest \
1919 -r $stacks_address \
2020 -a $amount \
2121 -d $btc_p2tr_address \
22- -u localhost:60401)
22+ -u electrs:60401)
23+
24+ echo $json
2325
2426if [ $? -ne 0 ]; then
2527 echo ' The deposit failed, did you forget to run "mine_btc.sh"?'
2830
2931tx=$( echo -n $json | jq -r .hex)
3032
31- sbtc broadcast localhost:60401 $tx | jq -r .
33+ echo $tx
34+
35+ $dir /../sbtc/bin/sbtc broadcast electrs:60401 $tx | jq -r .
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ dir=" $( dirname " $0 " ) "
4+
35# Returns the default credentials for the devnet
46
57mnemonic=" twice kind fence tip hidden tilt action fragile skin nothing glory cousin green tomorrow spring wrist shed math olympic multiply hip blue scout claw"
68
7- sbtc generate-from -s testnet -b regtest --accounts 2 mnemonic " $mnemonic "
9+ $dir /../sbtc/bin/ sbtc generate-from -s testnet -b regtest --accounts 2 mnemonic " $mnemonic "
Original file line number Diff line number Diff line change 1212
1313btc_address=$( source $dir /get_credentials.sh | jq -r ' .credentials["1"].bitcoin.p2wpkh.address' )
1414
15- bitcoin-cli -rpcconnect=localhost -rpcport=18443 -rpcuser=devnet -rpcpassword=devnet generatetoaddress $num_blocks $btc_address
15+ $dir /../ bitcoin/bin/bitcoin -cli generatetoaddress $num_blocks $btc_address
Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ stacks_wif=$(source $dir/get_credentials.sh | jq -r '.credentials["1"].stacks.wi
1818amount=$(( RANDOM% 1000 + 1000 ))
1919fulfillment_fee=$(( RANDOM% 1000 + 1000 ))
2020
21- json=$( sbtc withdraw \
21+ json=$( $dir /../sbtc/bin/ sbtc withdraw \
2222 -w $btc_wif \
2323 -n regtest \
2424 -d $stacks_wif \
2525 -b $btc_address \
2626 -a $amount \
2727 -f $fulfillment_fee \
2828 -p $btc_p2tr_address \
29- -u localhost :60401)
29+ -u electrs :60401)
3030
3131
3232if [ $? -ne 0 ]; then
3636
3737tx=$( echo -n $json | jq -r .hex)
3838
39- sbtc broadcast localhost :60401 $tx | jq -r .
39+ $dir /../ sbtc/bin/sbtc broadcast electrs :60401 $tx | jq -r .
You can’t perform that action at this time.
0 commit comments