Skip to content

Commit

Permalink
Merge branch 'master' into LIT-3995-batchGenKeysAddSignTx
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansonhkg authored Dec 23, 2024
2 parents 8f8cc8e + b393fb2 commit a7ef988
Show file tree
Hide file tree
Showing 412 changed files with 14,925 additions and 26,628 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"
}
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Default reviewers
* @joshLong145 @Ansonhkg
* @Ansonhkg
64 changes: 56 additions & 8 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 @@ -35,21 +42,28 @@ jobs:
integration-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DATIL_COMMIT_HASH: ae3c20e07eb933b61073689b95f56867c03de252
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout Lit Actions
- name: Find latest datil commit hash for last successful "rust/lit-node-build-commit-hash" workflow in the Lit Assets repo
uses: LIT-Protocol/last-successful-build-action@372ea3325a894558ee74d970217ca421ea562fba
id: last-successful-build
with:
token: "${{ secrets.GH_PAT_FOR_SHIVA }}"
branch: "datil"
workflow: "rust/lit-node-build-commit-hash"
repo: LIT-Protocol/lit-assets
# this outputs to dollarSign{{ steps.last-successful-build.outputs.lastSuccessfulBuildSha }}
- name: Checkout Lit Assets
uses: actions/checkout@v4
id: checkout
with:
fetch-depth: 0
repository: LIT-Protocol/lit-assets
ref: ${{env.DATIL_COMMIT_HASH}}
token: ${{secrets.GH_PAT}}
ref: ${{ steps.last-successful-build.outputs.lastSuccessfulBuildSha }}
token: ${{secrets.GH_PAT_FOR_SHIVA}}
path: ${{ github.workspace }}/lit-assets/
submodules: false
sparse-checkout: |
Expand All @@ -62,17 +76,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=${{ steps.last-successful-build.outputs.lastSuccessfulBuildSha }} -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 +113,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 a7ef988

Please sign in to comment.