Skip to content

Commit

Permalink
Merge pull request #535 from LIT-Protocol/staging/v7
Browse files Browse the repository at this point in the history
V7 Release
  • Loading branch information
Ansonhkg authored Nov 19, 2024
2 parents ded2c3f + d1c4879 commit d7aabfd
Show file tree
Hide file tree
Showing 350 changed files with 9,015 additions and 24,309 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

[*.rs]
indent_size = 4
4 changes: 2 additions & 2 deletions .env.ci
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tinny ENV Vars
MAX_ATTEMTPS=1
NETWORK=localchain
NETWORK=custom
DEBUG=true
WAIT_FOR_KEY_INTERVAL=3000
TIME_TO_RELEASE_KEY=10000
Expand All @@ -16,4 +16,4 @@ STOP_TESTNET=false
TESTNET_MANAGER_URL=http://127.0.0.1:8000
USE_LIT_BINARIES=true
LIT_NODE_BINARY_PATH=/usr/bin/lit_node
LIT_ACTION_BINARY_PATH=/usr/bin/lit_actions
LIT_ACTION_BINARY_PATH=/usr/bin/lit_actions
4 changes: 2 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tinny ENV Vars
MAX_ATTEMPTS=1
NETWORK=cayenne
NETWORK=datil-dev
DEBUG=true
WAIT_FOR_KEY_INTERVAL=3000
LIT_OFFICAL_RPC=https://chain-rpc.litprotocol.com/http
Expand All @@ -18,4 +18,4 @@ STOP_TESTNET=false
TESTNET_MANAGER_URL=http://0.0.0.0:8000
USE_LIT_BINARIES=true
LIT_NODE_BINARY_PATH=/path/to/lit_node/binary
LIT_ACTION_BINARY_PATH=/path/to/lit_action_binary
LIT_ACTION_BINARY_PATH=/path/to/lit_action_binary
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
packages/wasm/rust/**/*
packages/wasm/src/pkg/*
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"type"
]
}
]
],
"no-throw-literal": "error"
}
}
49 changes: 45 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- staging/**
- feat/**
- feature/**
- staging/**
jobs:
unit-tests:
runs-on: warp-ubuntu-latest-x64-16x
Expand All @@ -23,6 +24,12 @@ jobs:
with:
node-version: '20'
cache: 'yarn'
- name: Install rust
uses: dtolnay/[email protected]
- uses: jetli/[email protected]
with:
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
version: 'latest'
- name: Install project dependencies
run: yarn --frozen-lockfile
- uses: nrwl/nx-set-shas@v3
Expand All @@ -49,7 +56,7 @@ jobs:
fetch-depth: 0
repository: LIT-Protocol/lit-assets
ref: ${{env.DATIL_COMMIT_HASH}}
token: ${{secrets.GH_PAT}}
token: ${{secrets.GH_PAT_FOR_SHIVA}}
path: ${{ github.workspace }}/lit-assets/
submodules: false
sparse-checkout: |
Expand All @@ -62,17 +69,21 @@ jobs:
working-directory: ${{github.workspace}}/lit-assets/blockchain/contracts
- name: Docker login
id: login
run: docker login ghcr.io/ -u ${{secrets.GH_USER}} --password ${{secrets.GH_PAT}}
run: docker login ghcr.io/ -u ${{ github.actor }} --password ${{secrets.GH_PAT_FOR_SHIVA}}
- name: Pull Shiva Container
id: shiva-pull
run: docker pull ghcr.io/lit-protocol/shiva:latest
- name: Run Shiva Container
id: shiva-runner
run: docker run -d -m 32g -p 8000:8000 -p 8545:8545 -p 7470:7470 -p 7471:7471 -p 7472:7472 -p 7473:7473 -p 7474:7474 -p 7475:7475 -v ${{github.workspace}}/lit-assets:/data -e GH_PAT=${{secrets.GH_PAT}} -e HASH=$DATIL_COMMIT_HASH -e IPFS_API_KEY=${{secrets.IPFS_API_KEY}} --name shiva ghcr.io/lit-protocol/shiva:latest
run: docker run -d -m 32g -p 8000:8000 -p 8545:8545 -p 7470:7470 -p 7471:7471 -p 7472:7472 -p 7473:7473 -p 7474:7474 -p 7475:7475 -v ${{github.workspace}}/lit-assets:/data -e GH_PAT=${{secrets.GH_PAT_FOR_SHIVA}} -e HASH=$DATIL_COMMIT_HASH -e IPFS_API_KEY=${{secrets.IPFS_API_KEY}} --name shiva ghcr.io/lit-protocol/shiva:latest
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- uses: jetli/[email protected]
with:
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
version: 'latest'
- name: Install project dependencies
run: yarn --frozen-lockfile
- uses: nrwl/nx-set-shas@v3
Expand All @@ -95,4 +106,34 @@ jobs:
run: docker stop shiva && docker rm shiva
- name: Post Pull Shiva Image
if: steps.shiva-pull.outputs.exit_code == 0
run: docker rmi ghcr.io/lit-protocol/shiva
run: docker rmi ghcr.io/lit-protocol/shiva
ping-lit-configuration-guides:
runs-on: ubuntu-latest
# needs: [unit-tests, integration-tests] # Make sure this job runs after others complete
steps:
- name: Get PR labels
id: pr-labels
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
with:
script: |
const labels = context.payload.pull_request.labels
.map(label => label.name)
.filter(name => name.startsWith('tag:'))
.map(name => name.split(':')[1]);
if (labels.length > 0) {
core.setOutput('tag', labels[0]);
} else {
core.setOutput('skip', 'true');
}
- name: Trigger dependencies bot in lit-configuration-guides
if: steps.pr-labels.outputs.skip != 'true'
run: |
TAG="${{ steps.pr-labels.outputs.tag }}"
curl -X POST \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \
https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \
-d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}"
env:
GH_PAT_LIT_CONFIGURATION_GUIDES_REPO: ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
with:
node-version: '18'
cache: 'yarn'
- name: Install rust
uses: dtolnay/[email protected]
- uses: jetli/[email protected]
with:
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
version: 'latest'
- name: Install project dependencies
run: yarn install
- name: Lint
Expand Down
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
/packages/*/dist
.nx
tools
**/*/dist
/packages/wasm/rust/*
/packages/wasm/src/pkg/*
**/*/dist
Loading

0 comments on commit d7aabfd

Please sign in to comment.