Skip to content

Commit

Permalink
Merge pull request #7 from sota-zk-labs/mzk-42-settlement-contract-in…
Browse files Browse the repository at this point in the history
…-aptos

feat: update contract
  • Loading branch information
Tranduy1dol authored Dec 13, 2024
2 parents fe4cd5a + a7661d7 commit d77f32b
Show file tree
Hide file tree
Showing 21 changed files with 888 additions and 950 deletions.
50 changes: 50 additions & 0 deletions .github/actions/setup_aptos_cli/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Setup Aptos CLI
inputs:
version:
require: true
private-key:
require: false
default: ""
public-key:
require: false
default: ""
address:
require: false
default: ""
rpc-url:
require: false
default: "https://fullnode.testnet.aptoslabs.com"

runs:
using: "composite"
steps:
- name: Download Aptos CLI
uses: robinraju/[email protected]
with:
repository: "aptos-labs/aptos-core"
tag: aptos-cli-v${{ inputs.version }}
fileName: aptos-cli-${{ inputs.version }}-Ubuntu-x86_64.zip
- name: Setup Aptos CLI
shell: bash
run: |
unzip aptos-cli-${{ inputs.version }}-Ubuntu-x86_64.zip
mv ./aptos /usr/local/bin
chmod +x /usr/local/bin/aptos
- name: Setup Aptos Client
shell: bash
if: ${{ inputs.private-key != '' && inputs.public-key != '' && inputs.address != '' }}
run: |
set -e -o pipefail
APTOS_CONFIG_DIR="./.aptos/"
mkdir -p "${APTOS_CONFIG_DIR}"
export APTOS_CONFIG_PATH="${APTOS_CONFIG_DIR}/config.yaml"
export APTOS_REST_URL="${{ inputs.rpc-url }}"
export APTOS_PRIVATE_KEY="${{ inputs.private-key }}"
export APTOS_PUBLIC_KEY="${{ inputs.public-key }}"
export APTOS_ACCOUNT_ADDRESS="${{ inputs.address }}"
envsubst < .github/aptos_cli/config.yaml > ${APTOS_CONFIG_PATH}
7 changes: 7 additions & 0 deletions .github/aptos_cli/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
profiles:
default:
private_key: "${APTOS_PRIVATE_KEY}"
public_key: "${APTOS_PUBLIC_KEY}"
account: "${APTOS_ACCOUNT_ADDRESS}"
rest_url: "${APTOS_REST_URL}"
6 changes: 6 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
24 changes: 24 additions & 0 deletions .github/workflows/aptos_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Aptos Test

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
# cancel redundant builds on PRs (only on PR, not on branches)
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
aptos_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup_aptos_cli
with:
version: 4.0.0
- name: Test
working-directory: sources
run: aptos move test
14 changes: 7 additions & 7 deletions Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ version = "1.0.0"
authors = []

[addresses]
#local
starknet_addr = "0xb50b1b8157ebf7315813c1f745a1e1c68c73111afe2b6761975223d317569b69"

#testnet
#starknet_addr = "0x373904556c31ee071c1853fea9dc2d57383073eb4df55af10bd395471b947bcf"
starknet_addr = "_"
lib_addr = "_"

[dev-addresses]
starknet_addr = "0xb50b1b8157ebf7315813c1f745a1e1c68c73111afe2b6761975223d317569b69"
lib_addr = "54ba5979fbdf5fa56c4f4b5147fa33068148d08f6f191c23bca865c21192dcaa"

[dependencies.AptosFramework]
git = "https://github.com/aptos-labs/aptos-core.git"
rev = "release-v.1.14"
rev = "mainnet"
subdir = "aptos-move/framework/aptos-framework"

[dev-dependencies]
[dependencies]
libs = { git = "https://github.com/sota-zk-labs/navori", rev = "layout6", subdir = "libs" }
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ sudo sh get-docker.sh

[Reference](https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script)


## Testing

### Unit
Expand Down Expand Up @@ -53,7 +52,7 @@ aptos move publish --profile <your-profile-name> --network local
To test the verify_kzg_proof function, run this command:

```bash
aptos move run --json-file .\scripts\verify_kzg_proof.json
aptos move run --json-file .\scripts\verify_kzg_proof.json

## StarkNet Consensus Protocol Contracts

Expand All @@ -65,4 +64,5 @@ PoC solidity implementation of the following Starknet Decentralized Protocol pro
- [IV - Proofs in the Protocol](https://community.starknet.io/t/starknet-decentralized-protocol-iv-proofs-in-the-protocol/6030)
- [V - Checkpoints for Fast Finality](https://community.starknet.io/t/starknet-decentralized-protocol-v-checkpoints-for-fast-finality/6032)
- [VI - The Buffer Problem](https://community.starknet.io/t/starknet-decentralized-protocol-vi-the-buffer-problem/7098)
- [VII - Chained Proof Protocols & Braiding](https://community.starknet.io/t/starknet-decentralized-protocol-vii-chained-proof-protocols-braiding/18831)
- [VII - Chained Proof Protocols & Braiding](https://community.starknet.io/t/starknet-decentralized-protocol-vii-chained-proof-protocols-braiding/18831)
```
Loading

0 comments on commit d77f32b

Please sign in to comment.