Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vesting] rewrite the private sale module #75

Merged
merged 17 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

potentiellement remplacé complètement le binaire par l'intégration directe de la lib haskell https://github.com/input-output-hk/cardano-addresses

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# 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