Skip to content

Commit e69147d

Browse files
committed
Merge remote-tracking branch 'origin/main' into solana-examples/conditional-ata-value
2 parents 7488349 + 128b697 commit e69147d

287 files changed

Lines changed: 16888 additions & 10868 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@layerzerolabs/verify-contract": patch
3+
---
4+
5+
fix duplicated sourcemaps

.changeset/forty-months-turn.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@layerzerolabs/oft-adapter-initia-example": patch
3+
"@layerzerolabs/devtools-move": major
4+
"@layerzerolabs/oft-initia-example": patch
5+
---
6+
7+
update initia.js version and object creation seed derivation

.changeset/small-starfishes-crash.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/dependabot.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directories:
5+
- "/"
6+
- "/packages/*"
7+
- "/examples/*"
8+
9+
schedule:
10+
interval: "daily"
11+
12+
# Keep at most one open Dependabot PR at a time
13+
open-pull-requests-limit: 1
14+
15+
# Only update this single public package
16+
allow:
17+
- dependency-name: "@layerzerolabs/lz-definitions"
18+
dependency-type: "direct"
19+
20+
# Grouping is redundant with the allow-list, but harmless and keeps naming consistent
21+
groups:
22+
lz-definitions:
23+
patterns:
24+
- "@layerzerolabs/lz-definitions"

.github/workflows/codeql.yml

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- .-.-. .-.-. .-.-
2+
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ / / \ \ / / \ \ / / \
3+
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-' `-`-' `-`-' `-`-'
4+
#
5+
# CodeQL
6+
#
7+
# This workflow replaces the GitHub CodeQL extension to support fork PRs.
8+
# The extension doesn't trigger on fork PRs due to security restrictions.
9+
# This workflow uses the pull_request event which works for all PRs.
10+
#
11+
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.- .-.-. .-.-. .-.-
12+
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ / / \ \ / / \ \ / / \
13+
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-' `-`-' `-`-'
14+
name: CodeQL
15+
16+
on:
17+
push:
18+
branches:
19+
- main
20+
- develop
21+
pull_request:
22+
branches:
23+
- main
24+
- develop
25+
merge_group:
26+
# Required for GitHub merge queue
27+
branches:
28+
- main
29+
- develop
30+
schedule:
31+
# Run weekly security scans every Monday at midnight UTC
32+
- cron: '0 0 * * 1'
33+
34+
# Cancel in-progress runs when a new commit is pushed
35+
concurrency:
36+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
37+
cancel-in-progress: true
38+
39+
# Minimal permissions for fork PRs
40+
# Results are uploaded to Security tab and posted as checks
41+
permissions:
42+
contents: read
43+
security-events: write
44+
actions: read
45+
46+
jobs:
47+
analyze:
48+
name: CodeQL Analysis
49+
runs-on: ubuntu-latest
50+
timeout-minutes: 15
51+
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
language: ['javascript-typescript']
56+
57+
# Skip autobuild - CodeQL can analyze source code directly
58+
# No need to compile or install dependencies for static analysis
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@v4
62+
with:
63+
submodules: 'true'
64+
65+
- name: Initialize CodeQL
66+
uses: github/codeql-action/init@v4
67+
with:
68+
languages: ${{ matrix.language }}
69+
build-mode: none
70+
# Use default queries plus security-extended for more coverage
71+
queries: security-extended
72+
73+
- name: Perform CodeQL Analysis
74+
uses: github/codeql-action/analyze@v4
75+
with:
76+
category: "/language:${{ matrix.language }}"
77+
78+
dockerfile:
79+
name: Dockerfile Lint
80+
runs-on: ubuntu-latest
81+
timeout-minutes: 5
82+
needs: analyze
83+
84+
permissions:
85+
contents: read
86+
security-events: write
87+
88+
steps:
89+
- name: Checkout repository
90+
uses: actions/checkout@v4
91+
92+
- name: Run Hadolint
93+
uses: hadolint/hadolint-action@v3.1.0
94+
with:
95+
dockerfile: Dockerfile
96+
format: sarif
97+
output-file: hadolint.sarif
98+
no-fail: true
99+
100+
- name: Upload Hadolint results
101+
uses: github/codeql-action/upload-sarif@v4
102+
if: always()
103+
with:
104+
sarif_file: hadolint.sarif
105+
category: "hadolint"
106+
107+
# Note: ShellCheck action doesn't natively support SARIF output
108+
# Results will appear in workflow logs
109+
shellcheck:
110+
name: Shell Script Lint
111+
runs-on: ubuntu-latest
112+
timeout-minutes: 5
113+
needs: analyze
114+
115+
permissions:
116+
contents: read
117+
security-events: write
118+
119+
steps:
120+
- name: Checkout repository
121+
uses: actions/checkout@v4
122+
123+
- name: Run ShellCheck
124+
uses: ludeeus/action-shellcheck@2.0.0
125+
with:
126+
scandir: '.'
127+
format: gcc
128+
severity: warning
129+
continue-on-error: true
130+
131+
# Final status check job for backwards compatibility with the old CodeQL workflow
132+
CodeQL:
133+
name: CodeQL
134+
runs-on: ubuntu-latest
135+
needs: [analyze, dockerfile, shellcheck]
136+
if: always()
137+
138+
steps:
139+
- name: Check all jobs succeeded
140+
run: |
141+
if [ "${{ needs.analyze.result }}" != "success" ]; then
142+
echo "CodeQL analysis failed"
143+
exit 1
144+
fi
145+
if [ "${{ needs.dockerfile.result }}" != "success" ]; then
146+
echo "Dockerfile lint failed"
147+
exit 1
148+
fi
149+
if [ "${{ needs.shellcheck.result }}" != "success" ]; then
150+
echo "ShellCheck lint failed"
151+
exit 1
152+
fi
153+
echo "All security checks passed!"
154+

.github/workflows/on-develop.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ name: Check code submission
1212

1313
on:
1414
pull_request:
15+
merge_group:
1516
workflow_dispatch:
1617

1718
# We want the workflow to stop and yield to a new run if new code is pushed

.github/workflows/reusable-test.yaml

Lines changed: 56 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -162,16 +162,6 @@ jobs:
162162
- name: Setup build cache
163163
uses: ./.github/workflows/actions/setup-build-cache
164164

165-
- name: E2E Test Notice
166-
run: |
167-
echo "::notice::🧪 E2E tests are non-blocking and run against live networks"
168-
echo "::notice::These tests validate real blockchain interactions but may fail due to:"
169-
echo "::notice:: - Network connectivity issues"
170-
echo "::notice:: - RPC rate limiting"
171-
echo "::notice:: - External service downtime"
172-
echo "::notice:: - Gas price fluctuations"
173-
echo "::notice::E2E test failures do NOT block the main CI pipeline"
174-
175165
# There is a small bug in docker compose that will cause 401 if we don't pull the base image manually
176166
#
177167
# See more here https://github.com/docker/compose-cli/issues/1545
@@ -217,34 +207,74 @@ jobs:
217207
with:
218208
path: ./logs
219209

220-
# Post comment on E2E test failure
221-
- name: Comment on E2E failure
222-
if: steps.test-e2e.outcome == 'failure'
210+
# Post comment on E2E test completion (success or failure)
211+
- name: Comment on E2E results
212+
if: always() && steps.test-e2e.outcome != 'skipped' && steps.test-e2e.outcome != 'cancelled'
223213
uses: actions/github-script@v7
224214
with:
225215
script: |
216+
const outcome = '${{ steps.test-e2e.outcome }}';
217+
const emoji = outcome === 'success' ? '✅' : '❌';
218+
const status = outcome === 'success' ? 'Passed' : 'Failed';
219+
const timestamp = new Date().toISOString().replace('T', ' ').substring(0, 16) + ' (UTC)';
220+
const runNumber = context.runNumber;
226221
const runUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
227222
const prNumber = context.payload.pull_request?.number;
223+
const header = "## 🧪 E2E Test Status";
224+
225+
const newEntry = `- ${emoji} [Run #${runNumber}](${runUrl}) - ${status} - ${timestamp}`;
228226
229227
if (prNumber) {
230-
const comment = "## 🚨 E2E Tests Failed\n\n" +
231-
"The E2E tests failed during CI. These tests validate real blockchain interactions and may fail due to:\n" +
232-
"- Network connectivity issues\n" +
233-
"- RPC rate limiting\n" +
234-
"- External service downtime\n" +
235-
"**Action Run:** " + runUrl + "\n\n" +
236-
"This is **non-blocking** and does not prevent merging. Check the action logs above for detailed failure information.";
237-
238228
try {
239-
await github.rest.issues.createComment({
240-
issue_number: prNumber,
229+
const { data: comments } = await github.rest.issues.listComments({
241230
owner: context.repo.owner,
242231
repo: context.repo.repo,
243-
body: comment
232+
issue_number: prNumber,
244233
});
234+
235+
const botComment = comments.find(comment =>
236+
comment.user.type === 'Bot' &&
237+
comment.body.includes(header)
238+
);
239+
240+
if (botComment) {
241+
// Extract existing entries
242+
const bodyLines = botComment.body.split('\n');
243+
const runsStartIndex = bodyLines.findIndex(line => line.trim() === '**Test Runs (Newest First):**');
244+
245+
let newBody;
246+
if (runsStartIndex !== -1) {
247+
// Prepend new entry to existing runs (newest first)
248+
const beforeRuns = bodyLines.slice(0, runsStartIndex + 1).join('\n');
249+
const existingRuns = bodyLines.slice(runsStartIndex + 1).join('\n');
250+
newBody = beforeRuns + '\n' + newEntry + '\n' + existingRuns;
251+
} else {
252+
// Shouldn't happen, but handle gracefully
253+
newBody = botComment.body + '\n\n**Test Runs (Newest First):**\n' + newEntry;
254+
}
255+
256+
await github.rest.issues.updateComment({
257+
owner: context.repo.owner,
258+
repo: context.repo.repo,
259+
comment_id: botComment.id,
260+
body: newBody
261+
});
262+
} else {
263+
// Create new comment
264+
const comment = header + "\n\n" +
265+
"E2E tests are non-blocking and validate real blockchain interactions. Failures may occur due to network issues, RPC rate limits, or external service downtime.\n\n" +
266+
"**Test Runs (Newest First):**\n" +
267+
newEntry;
268+
269+
await github.rest.issues.createComment({
270+
issue_number: prNumber,
271+
owner: context.repo.owner,
272+
repo: context.repo.repo,
273+
body: comment
274+
});
275+
}
245276
} catch (error) {
246-
// Silently fail if we don't have permission to comment (e.g., on forks)
247-
console.log('Could not post comment to PR:', error.message);
277+
console.log('Error managing PR comments:', error.message);
248278
}
249279
}
250280

bin/env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
# (The "." will execute this inside the current shell instead of creating a child one)
1111

1212
set -a
13-
source ${1:-.env}
13+
# shellcheck source=/dev/null
14+
source "${1:-.env}"
1415
set +a

examples/lzapp-migration/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# @layerzerolabs/lzapp-migration-example
22

3+
## 0.3.9
4+
5+
### Patch Changes
6+
7+
- a2851bf: bump versions of monorepo packages
8+
- Updated dependencies [a2851bf]
9+
- Updated dependencies [afb4dd3]
10+
- @layerzerolabs/ua-devtools-evm-hardhat@9.0.1
11+
- @layerzerolabs/devtools-evm-hardhat@4.0.4
12+
- @layerzerolabs/ua-devtools-solana@8.0.5
13+
- @layerzerolabs/protocol-devtools@3.0.2
14+
- @layerzerolabs/devtools-solana@3.0.5
15+
- @layerzerolabs/ua-devtools-evm@7.0.1
16+
- @layerzerolabs/ua-devtools@5.0.2
17+
- @layerzerolabs/devtools@2.0.4
18+
- @layerzerolabs/io-devtools@0.3.2
19+
320
## 0.3.8
421

522
### Patch Changes

0 commit comments

Comments
 (0)