Skip to content

chore: 补 MIT 许可 + 修正部署路径 - #4

Merged
azen07508-debug merged 1 commit into
mainfrom
chore/license-and-deploy-paths
Sep 19, 2026
Merged

azen07508-debug merged 1 commit into
mainfrom
chore/license-and-deploy-paths

Conversation

@azen07508-debug

Copy link
Copy Markdown
Owner

许可

仓库此前没有任何 License 文件。公开仓库无许可 = 默认「保留所有权利」,别人不能合法使用、修改或分发你的代码。

加了什么

  • LICENSE(MIT 全文)
  • package.json 补 "license": "MIT"
  • README 增加 License 小节,并做了范围限定:
    • MIT 覆盖源码,不授予文档里提到的任何第三方商标或品牌名的权利
    • 文档里的部署地址是参考部署,不是生产基础设施
    • 合约未经审计,未经独立安全审查不要用真金白银部署到主网

⚠️ 版权人当前填的是 azen07508-debug(你的 GitHub 账号名)。这是占位。
如果你要作为产品上架或商业化,应该换成你的真实姓名或公司主体——MIT 的版权声明是法律主体标识。
改的话只需要动 LICENSE 第一行 Copyright (c) 2026 ...。

顺手修的:部署路径

pages.yml 和 vercel.json 里 VITE_DEPLOYMENT_URL 用的是绝对路径 /deployments/xlayer-mainnet.json。

在 GitHub Pages 子路径部署下,这个请求会 404。目前之所以还能用,是因为 loadDeployment() 的回退逻辑会试下一个候选路径——但每次加载都会在控制台留一条 404。

两处都改成相对路径。

验证

构建产物

bundle 内含 "./deployments/xlayer-mainnet.json"

子路径模拟部署(把 dist/ 放到本地 /xguard-hook/ 下)

检查项 结果
六个区块渲染 ✓
部署 JSON HTTP 200
控制台 404 无
剩余控制台条目 仅 RPC 400(未连钱包导致,正常)

其余检查

  • forge test —— 12 / 12
  • npm run test:node —— 22 / 22
  • npm run web:build —— 通过
  • npm run submission:check:final —— 通过

License
- add LICENSE (MIT). The repo had no license file, which under default
  copyright means "all rights reserved" - nobody could legally reuse it.
- add "license": "MIT" to package.json
- add a License section to the README that scopes the grant: MIT covers the
  source code, not any third-party trademarks referenced in the docs, and the
  contracts are unaudited and should not hold real funds without a review.

Deploy paths
- .github/workflows/pages.yml and vercel.json set VITE_DEPLOYMENT_URL to an
  absolute "/deployments/xlayer-mainnet.json". Under the GitHub Pages subpath
  that request 404s and only succeeds because loadDeployment() falls back to a
  BASE_URL-derived candidate, which left a console error on every load.
  Both are now relative.

Verified
- built with the new env values: the bundle contains
  "./deployments/xlayer-mainnet.json"
- served dist/ from a local /xguard-hook/ subpath: all six sections render,
  the deployment JSON returns 200, and the only remaining console entry is the
  expected RPC 400 from connecting without a wallet
- forge test 12/12, npm run test:node 22/22, npm run web:build,
  npm run submission:check:final
@vercel

vercel Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
xguard-hook Ready Ready Preview Sep 19, 2026 8:48am UTC

@azen07508-debug
azen07508-debug merged commit d8c5fc8 into main Sep 19, 2026
3 checks passed
@azen07508-debug
azen07508-debug deleted the chore/license-and-deploy-paths branch September 19, 2026 08:53

This branch was successfully deployed

1 active deployment
Preview — dcdfc09e Deployed Sep 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant