Skip to content

Commit a7ef988

Browse files
authored
Merge branch 'master' into LIT-3995-batchGenKeysAddSignTx
2 parents 8f8cc8e + b393fb2 commit a7ef988

File tree

412 files changed

+14925
-26628
lines changed

Some content is hidden

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

412 files changed

+14925
-26628
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ trim_trailing_whitespace = true
1111
[*.md]
1212
max_line_length = off
1313
trim_trailing_whitespace = false
14+
15+
[*.rs]
16+
indent_size = 4

.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/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#Default reviewers
2-
* @joshLong145 @Ansonhkg
2+
* @Ansonhkg

.github/workflows/ci.yml

Lines changed: 56 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,12 @@ jobs:
2324
with:
2425
node-version: '20'
2526
cache: 'yarn'
27+
- name: Install rust
28+
uses: dtolnay/[email protected]
29+
- uses: jetli/[email protected]
30+
with:
31+
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
32+
version: 'latest'
2633
- name: Install project dependencies
2734
run: yarn --frozen-lockfile
2835
- uses: nrwl/nx-set-shas@v3
@@ -35,21 +42,28 @@ jobs:
3542
integration-tests:
3643
runs-on: ubuntu-latest
3744
timeout-minutes: 30
38-
env:
39-
DATIL_COMMIT_HASH: ae3c20e07eb933b61073689b95f56867c03de252
4045
steps:
4146
- name: Checkout repo
4247
uses: actions/checkout@v2
4348
with:
4449
fetch-depth: 0
45-
- name: Checkout Lit Actions
50+
- name: Find latest datil commit hash for last successful "rust/lit-node-build-commit-hash" workflow in the Lit Assets repo
51+
uses: LIT-Protocol/last-successful-build-action@372ea3325a894558ee74d970217ca421ea562fba
52+
id: last-successful-build
53+
with:
54+
token: "${{ secrets.GH_PAT_FOR_SHIVA }}"
55+
branch: "datil"
56+
workflow: "rust/lit-node-build-commit-hash"
57+
repo: LIT-Protocol/lit-assets
58+
# this outputs to dollarSign{{ steps.last-successful-build.outputs.lastSuccessfulBuildSha }}
59+
- name: Checkout Lit Assets
4660
uses: actions/checkout@v4
4761
id: checkout
4862
with:
4963
fetch-depth: 0
5064
repository: LIT-Protocol/lit-assets
51-
ref: ${{env.DATIL_COMMIT_HASH}}
52-
token: ${{secrets.GH_PAT}}
65+
ref: ${{ steps.last-successful-build.outputs.lastSuccessfulBuildSha }}
66+
token: ${{secrets.GH_PAT_FOR_SHIVA}}
5367
path: ${{ github.workspace }}/lit-assets/
5468
submodules: false
5569
sparse-checkout: |
@@ -62,17 +76,21 @@ jobs:
6276
working-directory: ${{github.workspace}}/lit-assets/blockchain/contracts
6377
- name: Docker login
6478
id: login
65-
run: docker login ghcr.io/ -u ${{secrets.GH_USER}} --password ${{secrets.GH_PAT}}
79+
run: docker login ghcr.io/ -u ${{ github.actor }} --password ${{secrets.GH_PAT_FOR_SHIVA}}
6680
- name: Pull Shiva Container
6781
id: shiva-pull
6882
run: docker pull ghcr.io/lit-protocol/shiva:latest
6983
- name: Run Shiva Container
7084
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
85+
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
7286
- name: Set up Node.js
7387
uses: actions/setup-node@v3
7488
with:
7589
node-version: '20'
90+
- uses: jetli/[email protected]
91+
with:
92+
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest')
93+
version: 'latest'
7694
- name: Install project dependencies
7795
run: yarn --frozen-lockfile
7896
- uses: nrwl/nx-set-shas@v3
@@ -95,4 +113,34 @@ jobs:
95113
run: docker stop shiva && docker rm shiva
96114
- name: Post Pull Shiva Image
97115
if: steps.shiva-pull.outputs.exit_code == 0
98-
run: docker rmi ghcr.io/lit-protocol/shiva
116+
run: docker rmi ghcr.io/lit-protocol/shiva
117+
ping-lit-configuration-guides:
118+
runs-on: ubuntu-latest
119+
# needs: [unit-tests, integration-tests] # Make sure this job runs after others complete
120+
steps:
121+
- name: Get PR labels
122+
id: pr-labels
123+
uses: actions/github-script@v6
124+
if: github.event_name == 'pull_request'
125+
with:
126+
script: |
127+
const labels = context.payload.pull_request.labels
128+
.map(label => label.name)
129+
.filter(name => name.startsWith('tag:'))
130+
.map(name => name.split(':')[1]);
131+
if (labels.length > 0) {
132+
core.setOutput('tag', labels[0]);
133+
} else {
134+
core.setOutput('skip', 'true');
135+
}
136+
- name: Trigger dependencies bot in lit-configuration-guides
137+
if: steps.pr-labels.outputs.skip != 'true'
138+
run: |
139+
TAG="${{ steps.pr-labels.outputs.tag }}"
140+
curl -X POST \
141+
-H "Accept: application/vnd.github.everest-preview+json" \
142+
-H "Authorization: token ${{ secrets.GH_PAT_LIT_CONFIGURATION_GUIDES_REPO }}" \
143+
https://api.github.com/repos/LIT-Protocol/lit-configuration-guides/dispatches \
144+
-d "{\"event_type\":\"dependency_update\", \"client_payload\": {\"labels\": [\"$TAG\"]}}"
145+
env:
146+
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)