Skip to content

Commit

Permalink
update zkey wasm used for contracts tests
Browse files Browse the repository at this point in the history
  • Loading branch information
remicolin committed Dec 16, 2024
1 parent 03b312a commit 890500e
Show file tree
Hide file tree
Showing 4 changed files with 18,987 additions and 17,476 deletions.
37 changes: 37 additions & 0 deletions circuits/scripts/download_zkey_wasm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh

# Define environment variables
BUCKET_NAME="proofofpassport-us"
CIRCUIT_NAME="contracts_zkey_wasm.zip"
DESTINATION_DIR="build/fromAWS/contracts"

# Create the destination directory if it doesn't exist
echo "Creating destination directory..."
mkdir -p ${DESTINATION_DIR}

# Download the file
echo "Downloading ${CIRCUIT_NAME} from S3..."
aws s3 cp s3://${BUCKET_NAME}/${CIRCUIT_NAME} ${DESTINATION_DIR}/${CIRCUIT_NAME} --no-sign-request

if [ $? -eq 0 ]; then
echo "Successfully downloaded ${CIRCUIT_NAME}"

echo "Unzipping files..."
# Use -j flag to junk (ignore) directory paths when extracting
unzip -q -j -o ${DESTINATION_DIR}/${CIRCUIT_NAME} -d ${DESTINATION_DIR}

if [ $? -eq 0 ]; then
echo "Successfully unzipped files"

echo "Cleaning up zip file..."
rm ${DESTINATION_DIR}/${CIRCUIT_NAME}

echo "Process completed successfully"
else
echo "Failed to unzip ${CIRCUIT_NAME}"
exit 1
fi
else
echo "Failed to download ${CIRCUIT_NAME} from S3"
exit 1
fi
Loading

0 comments on commit 890500e

Please sign in to comment.