Skip to content

Commit

Permalink
feat ✨: Changed up the pegout zcript to allow you to pass the number …
Browse files Browse the repository at this point in the history
…of satoshis used

ISSUE: #60
  • Loading branch information
emailnjv committed Dec 11, 2024
1 parent 34ab129 commit ac67ffd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/regtest_pegout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. $SCRIPT_DIR/utils/shared.sh

PRIVATE_KEY=${PRIVATE_KEY:-$1}
SATOSHIS=${SATOSHIS:-1000001}
if [ -z $PRIVATE_KEY ]; then
PRIVATE_KEY=$DEV_PRIVATE_KEY
else
Expand All @@ -12,4 +13,4 @@ fi

BTC_ADDRESS=${BTC_ADDRESS:-$2}

pegout $PRIVATE_KEY $BTC_ADDRESS
pegout $PRIVATE_KEY $BTC_ADDRESS $SATOSHIS
2 changes: 1 addition & 1 deletion scripts/utils/shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function pegout() {
cd $PWD/contracts

# 0.00100000 btc, or 100000 satoshi
export SATOSHIS=100000
export SATOSHIS="$3"
export PRIVATE_KEY="$1"
forge script script/PegOut.s.sol --rpc-url http://localhost:8545 --broadcast --silent
)
Expand Down

0 comments on commit ac67ffd

Please sign in to comment.