Skip to content

Commit cb696f8

Browse files
committed
Merge branch 'refs/heads/master' into LIT-4016-epoch-change-events
# Conflicts: # local-tests/setup/tinny-environment.ts # packages/core/src/lib/lit-core.ts
2 parents d99e8b2 + b5ccf66 commit cb696f8

File tree

416 files changed

+15755
-26849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

416 files changed

+15755
-26849
lines changed

.env.ci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tinny ENV Vars
22
MAX_ATTEMTPS=1
3-
NETWORK=localchain
3+
NETWORK=custom
44
DEBUG=true
55
WAIT_FOR_KEY_INTERVAL=3000
66
TIME_TO_RELEASE_KEY=10000
@@ -16,4 +16,4 @@ STOP_TESTNET=false
1616
TESTNET_MANAGER_URL=http://127.0.0.1:8000
1717
USE_LIT_BINARIES=true
1818
LIT_NODE_BINARY_PATH=/usr/bin/lit_node
19-
LIT_ACTION_BINARY_PATH=/usr/bin/lit_actions
19+
LIT_ACTION_BINARY_PATH=/usr/bin/lit_actions

.env.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tinny ENV Vars
22
MAX_ATTEMPTS=1
3-
NETWORK=cayenne
3+
NETWORK=datil-dev
44
DEBUG=true
55
WAIT_FOR_KEY_INTERVAL=3000
66
LIT_OFFICAL_RPC=https://chain-rpc.litprotocol.com/http
@@ -18,4 +18,4 @@ STOP_TESTNET=false
1818
TESTNET_MANAGER_URL=http://0.0.0.0:8000
1919
USE_LIT_BINARIES=true
2020
LIT_NODE_BINARY_PATH=/path/to/lit_node/binary
21-
LIT_ACTION_BINARY_PATH=/path/to/lit_action_binary
21+
LIT_ACTION_BINARY_PATH=/path/to/lit_action_binary

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
node_modules
2+
packages/wasm/rust/**/*
3+
packages/wasm/src/pkg/*

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"type"
6969
]
7070
}
71-
]
71+
],
72+
"no-throw-literal": "error"
7273
}
7374
}

.github/workflows/ci.yml

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- staging/**
1010
- feat/**
1111
- feature/**
12+
- staging/**
1213
jobs:
1314
unit-tests:
1415
runs-on: warp-ubuntu-latest-x64-16x
@@ -23,6 +24,16 @@ jobs:
2324
with:
2425
node-version: '20'
2526
cache: 'yarn'
27+
- name: Install rust
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: 1.83.0
31+
override: true
32+
components: rust-std
33+
- uses: jetli/[email protected]
34+
with:
35+
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
36+
version: 'latest'
2637
- name: Install project dependencies
2738
run: yarn --frozen-lockfile
2839
- uses: nrwl/nx-set-shas@v3
@@ -35,21 +46,28 @@ jobs:
3546
integration-tests:
3647
runs-on: ubuntu-latest
3748
timeout-minutes: 30
38-
env:
39-
DATIL_COMMIT_HASH: ae3c20e07eb933b61073689b95f56867c03de252
4049
steps:
4150
- name: Checkout repo
4251
uses: actions/checkout@v2
4352
with:
4453
fetch-depth: 0
45-
- name: Checkout Lit Actions
54+
- name: Find latest datil commit hash for last successful "rust/lit-node-build-commit-hash" workflow in the Lit Assets repo
55+
uses: LIT-Protocol/last-successful-build-action@372ea3325a894558ee74d970217ca421ea562fba
56+
id: last-successful-build
57+
with:
58+
token: "${{ secrets.GH_PAT_FOR_SHIVA }}"
59+
branch: "datil"
60+
workflow: "rust/lit-node-build-commit-hash"
61+
repo: LIT-Protocol/lit-assets
62+
# this outputs to dollarSign{{ steps.last-successful-build.outputs.lastSuccessfulBuildSha }}
63+
- name: Checkout Lit Assets
4664
uses: actions/checkout@v4
4765
id: checkout
4866
with:
4967
fetch-depth: 0
5068
repository: LIT-Protocol/lit-assets
51-
ref: ${{env.DATIL_COMMIT_HASH}}
52-
token: ${{secrets.GH_PAT}}
69+
ref: ${{ steps.last-successful-build.outputs.lastSuccessfulBuildSha }}
70+
token: ${{secrets.GH_PAT_FOR_SHIVA}}
5371
path: ${{ github.workspace }}/lit-assets/
5472
submodules: false
5573
sparse-checkout: |
@@ -62,17 +80,21 @@ jobs:
6280
working-directory: ${{github.workspace}}/lit-assets/blockchain/contracts
6381
- name: Docker login
6482
id: login
65-
run: docker login ghcr.io/ -u ${{secrets.GH_USER}} --password ${{secrets.GH_PAT}}
83+
run: docker login ghcr.io/ -u ${{ github.actor }} --password ${{secrets.GH_PAT_FOR_SHIVA}}
6684
- name: Pull Shiva Container
6785
id: shiva-pull
6886
run: docker pull ghcr.io/lit-protocol/shiva:latest
6987
- name: Run Shiva Container
7088
id: shiva-runner
71-
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
89+
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
7290
- name: Set up Node.js
7391
uses: actions/setup-node@v3
7492
with:
7593
node-version: '20'
94+
- uses: jetli/[email protected]
95+
with:
96+
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
97+
version: 'latest'
7698
- name: Install project dependencies
7799
run: yarn --frozen-lockfile
78100
- uses: nrwl/nx-set-shas@v3
@@ -95,4 +117,34 @@ jobs:
95117
run: docker stop shiva && docker rm shiva
96118
- name: Post Pull Shiva Image
97119
if: steps.shiva-pull.outputs.exit_code == 0
98-
run: docker rmi ghcr.io/lit-protocol/shiva
120+
run: docker rmi ghcr.io/lit-protocol/shiva
121+
ping-lit-configuration-guides:
122+
runs-on: ubuntu-latest
123+
# needs: [unit-tests, integration-tests] # Make sure this job runs after others complete
124+
steps:
125+
- name: Get PR labels
126+
id: pr-labels
127+
uses: actions/github-script@v6
128+
if: github.event_name == 'pull_request'
129+
with:
130+
script: |
131+
const labels = context.payload.pull_request.labels
132+
.map(label => label.name)
133+
.filter(name => name.startsWith('tag:'))
134+
.map(name => name.split(':')[1]);
135+
if (labels.length > 0) {
136+
core.setOutput('tag', labels[0]);
137+
} else {
138+
core.setOutput('skip', 'true');
139+
}
140+
- name: Trigger dependencies bot in lit-configuration-guides
141+
if: steps.pr-labels.outputs.skip != 'true'
142+
run: |
143+
TAG="${{ steps.pr-labels.outputs.tag }}"
144+
curl -X POST \
145+
-H "Accept: application/vnd.github.everest-preview+json" \
146+
-H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \
147+
https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \
148+
-d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}"
149+
env:
150+
GH_PAT_LIT_CONFIGURATION_GUIDES_REPO: ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}

.github/workflows/lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818
with:
1919
node-version: '18'
2020
cache: 'yarn'
21+
- name: Install rust
22+
uses: dtolnay/[email protected]
23+
- uses: jetli/[email protected]
24+
with:
25+
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
26+
version: 'latest'
2127
- name: Install project dependencies
2228
run: yarn install
2329
- name: Lint

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@
1212
/packages/*/dist
1313
.nx
1414
tools
15-
**/*/dist
15+
/packages/wasm/rust/*
16+
/packages/wasm/src/pkg/*
17+
**/*/dist

0 commit comments

Comments
 (0)