-
Notifications
You must be signed in to change notification settings - Fork 10
/
build-wrapper
executable file
·34 lines (26 loc) · 1.22 KB
/
build-wrapper
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -euf -o pipefail
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
BEACONROOT_BYTECODE="$(geas "src/beacon_root/main.eas")"
EXECHASH_BYTECODE="$(geas "src/execution_hash/main.eas")"
WITHDRAWALS_BYTECODE="$(geas "src/withdrawals/main.eas")"
CONSOLODATIONS_BYTECODE="$(geas "src/consolidations/main.eas")"
FAKE_EXPO_BYTECODE="$(geas "src/common/fake_expo_test.eas")"
sed \
-e "s/@bytecode@/$BEACONROOT_BYTECODE/" \
"$SCRIPT_DIR/test/BeaconRoot.t.sol.in" > "$SCRIPT_DIR/test/BeaconRoot.t.sol"
sed \
-e "s/@bytecode@/$EXECHASH_BYTECODE/" \
"$SCRIPT_DIR/test/ExecutionHash.t.sol.in" > "$SCRIPT_DIR/test/ExecutionHash.t.sol"
sed \
-e "s/@bytecode@/$WITHDRAWALS_BYTECODE/" \
-e "s/@bytecode_expo@/$FAKE_EXPO_BYTECODE/" \
"$SCRIPT_DIR/test/Withdrawal.t.sol.in" > "$SCRIPT_DIR/test/Withdrawal.t.sol"
sed \
-e "s/@bytecode@/$FAKE_EXPO_BYTECODE/" \
"$SCRIPT_DIR/test/FakeExpo.t.sol.in" > "$SCRIPT_DIR/test/FakeExpo.t.sol"
sed \
-e "s/@bytecode@/$CONSOLODATIONS_BYTECODE/" \
-e "s/@bytecode_expo@/$FAKE_EXPO_BYTECODE/" \
"$SCRIPT_DIR/test/Consolidation.t.sol.in" > "$SCRIPT_DIR/test/Consolidation.t.sol"
forge "$@" --evm-version shanghai