Skip to content
This repository was archived by the owner on Jun 13, 2018. It is now read-only.

Commit 7a085f1

Browse files
committed
hevm library fix: run library "constructors"
We can't just put the code there, we have to run the code as a creation and it will return the library runtime code...
1 parent a627daf commit 7a085f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libexec/dapp/dapp---make-library-state

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ state=$(mktemp --tmpdir= -d hevm.libs.XXXXX)
2525

2626
for lib in "${libraries[@]}"; do
2727
address=$(dapp address "$sender" "$nonce")
28-
echo >&2 "dapp: Predeploying test library $lib at $address"
2928
links+=" $lib:$address"
30-
mkdir -p "$state/$address"
3129
binpath=$(sed -E "s/.*:(.*)/$DAPP_OUT\/\1.bin/" <<<"$lib")
32-
cp "$binpath" "$state/$address/code"
30+
echo >&2 "dapp: Predeploying test library $lib at $address"
31+
mkdir -p "$state/$address"
32+
hevm exec --code "$(cat "$binpath")" > "$state/$address/code" --gas 1000000000
3333
((nonce++))
3434
done
3535

0 commit comments

Comments
 (0)