Skip to content

Commit f972956

Browse files
feat: Simplify updating Sphinx (#5)
* chore: Drop 'artifacts' program * chore: Add Move contract * chore: Update names * feat: Program for generating Plonk proof using latest sphinx * chore: Update README * ci: Add workflow * chore: Address feedback * chore: Address feedback * ci: Switch to Warpbuild * Format * chore: Top-level version constant --------- Co-authored-by: Samuel Burnham <[email protected]>
1 parent c4d4a17 commit f972956

25 files changed

+2085
-675
lines changed

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Sphinx contracts
2+
on:
3+
merge_group:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
types: [ opened, synchronize, reopened, ready_for_review ]
9+
10+
jobs:
11+
solidity:
12+
runs-on: warp-ubuntu-latest-x64-16x
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install Foundry
16+
uses: foundry-rs/foundry-toolchain@v1
17+
with:
18+
version: nightly
19+
- name: Check formatting
20+
run: |
21+
forge fmt --check
22+
working-directory: ${{ github.workspace }}/solidity/
23+
- name: Run Forge build
24+
run: |
25+
forge --version
26+
forge build
27+
working-directory: ${{ github.workspace }}/solidity/
28+
- name: Run Forge tests
29+
run: |
30+
forge test
31+
working-directory: ${{ github.workspace }}/solidity/
32+
33+
move:
34+
runs-on: warp-ubuntu-latest-x64-16x
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Install Move
38+
run: |
39+
python3 --version
40+
curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3
41+
echo "PATH=$HOME/.local/bin:$PATH" | tee -a $GITHUB_ENV
42+
- name: Check Aptos account balance
43+
id: check_balance
44+
run: |
45+
balance_output=$(aptos account balance --profile testnet)
46+
echo "Balance output: $balance_output"
47+
48+
balance=$(echo $balance_output | jq '.Result[0].balance')
49+
echo "Balance value: $balance"
50+
51+
if [ "$balance" -lt 100000000 ]; then
52+
echo "Balance is below threshold. Funding the account..."
53+
aptos account fund-with-faucet --profile testnet
54+
else
55+
echo "Balance is sufficient. No action needed."
56+
fi
57+
working-directory: ${{ github.workspace }}/move
58+
- name: Run unit tests
59+
run: |
60+
aptos move test --named-addresses plonk_verifier_addr=testnet
61+
working-directory: ${{ github.workspace }}/move
62+
- name: Publish
63+
run: |
64+
aptos move publish --named-addresses plonk_verifier_addr=testnet --profile testnet --assume-yes
65+
working-directory: ${{ github.workspace }}/move

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/.idea
2-
/target
2+
/target
3+
/move/build

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "contracts/lib/forge-std"]
2-
path = contracts/lib/forge-std
2+
path = solidity/lib/forge-std
33
url = https://github.com/foundry-rs/forge-std

0 commit comments

Comments
 (0)