Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
molecula451 committed Apr 16, 2024
1 parent 6c19305 commit 57235bb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 51 deletions.
12 changes: 12 additions & 0 deletions packages/contracts/run-smt-setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Define paths
foundryTomlPath="foundry.toml"
backupFoundryTomlPath="foundry.toml.backup"
smtScriptPath="scripts/smt-checker/smt/smt.ts"

# Copy foundry.toml to backup file
cp -p "$foundryTomlPath" "$backupFoundryTomlPath"

# Run smt.ts script
npx tsx "$smtScriptPath"
4 changes: 2 additions & 2 deletions packages/contracts/scripts/smt-checker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Before proceeding, ensure that you have `g++` and `python3` installed on your sy

### Run script:
```sh
sh ./update-dependencies.sh
./update-deps-ubuntu
```

Once installed, you can verify that Z3 is correctly installed by checking the version number.
Expand Down Expand Up @@ -41,7 +41,7 @@ https://github.com/molecula451/ubiquity-dollar/assets/41552663/cdcf3982-94a4-4cf
Ensure that your repository is up-to-date with the latest npm/yarn packages, then run the following command:

```sh
sh ./run-smt-setup.sh
./run-smt-setup
```


Expand Down
27 changes: 0 additions & 27 deletions packages/contracts/scripts/smt-checker/check-deps.sh

This file was deleted.

22 changes: 22 additions & 0 deletions packages/contracts/scripts/smt-checker/update-deps-ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Install dependencies
apt-get update && sudo apt-get install -y g++ && \
apt-get install -y wget
apt-get install -y z3 && \
apt-get install -y libz3-dev && \

# Download and install Z3
wget https://github.com/Z3Prover/z3/archive/refs/tags/z3-4.11.0.tar.gz && \
tar -zxvf z3-4.11.0.tar.gz && \
cd z3-z3-4.11.0 && \
python3 scripts/mk_make.py && \
cd build && \
make -j$(nproc) && \
make install && \
cp libz3.so libz3.so.4.11 && \
mv libz3.so.4.11 /usr/lib/x86_64-linux-gnu && \
echo "Successfully copied Z3 to the system" && \

# Print success message
echo "Z3 installation completed successfully!"
22 changes: 0 additions & 22 deletions packages/contracts/scripts/smt-checker/update-deps-ubuntu.sh

This file was deleted.

0 comments on commit 57235bb

Please sign in to comment.