Skip to content

Commit

Permalink
Merge pull request #75 from smart-chain-fr/redesign-vesting
Browse files Browse the repository at this point in the history
[vesting] rewrite the private sale module
  • Loading branch information
augucharles authored Jan 20, 2023
2 parents 994eb44 + 469e882 commit cbc3930
Show file tree
Hide file tree
Showing 69 changed files with 3,631 additions and 708 deletions.
38 changes: 38 additions & 0 deletions bin/cardano-address-script
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

# This script is a wrapper around cardano-address.
#
# By default, cardano-address takes its input from stdin. For now, piping with
# (|>) from Shh.Internal leads to unexpected behaviour when doing IO inside the
# PropertyM transformer of QuickCheck. With (|>)¸the command cardano-address
# sometimes does not receive stdin and hang indefinitely, probably due to a
# strictness issue of the monads involved.
#
# The purpose of this script is to provide a hack, hidding the plumbing inside a
# bash script to avoid depending on the pipe from Haskell. The parameter
# following `--` is taken as the input for cardano-address. The rest of the
# arguments are propagated as-is.
#
# In order to use cardano-address in property testing from Haskell, you must
# install this script on your path.

args=()

while [ $# -gt 0 ]; do
case "$1" in
"--")
shift
break 2
;;
*)
args+=("$1")
shift
;;
esac
done

if [ -t 0 ]; then
printf '%s\n' "$1"
else
cat -
fi | cardano-address "${args[@]}"
Loading

0 comments on commit cbc3930

Please sign in to comment.