gaztec 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aztec-nargo.sh +6 -0
- package/aztec-postprocess-contract.sh +6 -0
- package/aztec.sh +6 -0
- package/install-aztec.sh +34 -0
- package/package.json +11 -0
package/aztec-nargo.sh
ADDED
package/aztec.sh
ADDED
package/install-aztec.sh
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
install_aztec() {
|
|
5
|
+
local version=$1
|
|
6
|
+
|
|
7
|
+
local aztec_path="$HOME/.aztec/v$version/bin"
|
|
8
|
+
|
|
9
|
+
if [[ ! -f "$aztec_path/aztec" ]]; then
|
|
10
|
+
echo "Installing aztec $version in $aztec_path"
|
|
11
|
+
VERSION=$version BIN_PATH=$aztec_path NON_INTERACTIVE=1 bash -i <(curl -s https://install.aztec.network)
|
|
12
|
+
fi
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# go from the current dir to the root of the filesystem and find the first .gaztecrc file
|
|
16
|
+
dir=$(pwd)
|
|
17
|
+
while [[ $dir != "/" ]]; do
|
|
18
|
+
if [[ -f "$dir/.gaztecrc" ]]; then
|
|
19
|
+
AZTEC_VERSION=$(cat $dir/.gaztecrc | tr -d '\n')
|
|
20
|
+
break
|
|
21
|
+
fi
|
|
22
|
+
dir=$(dirname $dir)
|
|
23
|
+
done
|
|
24
|
+
if [[ -z "$AZTEC_VERSION" ]]; then
|
|
25
|
+
echo "No .gaztecrc file found in the current or parent directories starting from $(pwd)"
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
install_aztec $AZTEC_VERSION
|
|
31
|
+
|
|
32
|
+
AZTEC="$HOME/.aztec/v$AZTEC_VERSION/bin/aztec"
|
|
33
|
+
AZTEC_NARGO="$HOME/.aztec/v$AZTEC_VERSION/bin/aztec-nargo"
|
|
34
|
+
AZTEC_POSTPROCESS_CONTRACT="$HOME/.aztec/v$AZTEC_VERSION/bin/aztec-postprocess-contract"
|
package/package.json
ADDED