From dcdfc09e1e2d35af61b10ab04417bfdfca90dcf0 Mon Sep 17 00:00:00 2001 From: azen07508-debug <263673583+azen07508-debug@users.noreply.github.com> Date: Sat, 19 Sep 2026 16:46:42 +0800 Subject: [PATCH] chore: add MIT license and make deploy paths subpath-safe 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 --- .github/workflows/pages.yml | 3 ++- LICENSE | 21 +++++++++++++++++++++ README.md | 11 +++++++++++ package.json | 1 + vercel.json | 2 +- 5 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 LICENSE diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 1dee620..979ebe4 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -35,7 +35,8 @@ jobs: run: npm run web:build env: VITE_XLAYER_RPC_URL: https://rpc.xlayer.tech - VITE_DEPLOYMENT_URL: /deployments/xlayer-mainnet.json + # 相对路径:Pages 部署在 // 子路径下,绝对路径 /deployments/... 会 404 + VITE_DEPLOYMENT_URL: ./deployments/xlayer-mainnet.json - name: Upload Pages artifact uses: actions/upload-pages-artifact@v3 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d5ea095 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 azen07508-debug + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index f867896..8465c1a 100644 --- a/README.md +++ b/README.md @@ -180,3 +180,14 @@ It writes `deployments/xlayer-demo-results.json` with transaction hashes and OKL Chinese name: `XGuard Hook:新资产池的动态保护层` One-liner: XGuard is a dynamic risk-fee Hook for Uniswap v4 pools on X Layer, increasing LP fees under high-impact or abnormal swap conditions while exposing transparent onchain risk states. + +## License + +MIT — see [LICENSE](LICENSE). + +The license covers the source code in this repository. It does not grant rights to any third-party +trademarks or brand names referenced in the documentation. The deployment addresses listed above are +reference deployments, not production infrastructure. + +**The contracts have not been audited.** Do not deploy them to mainnet with real funds without an +independent security review. diff --git a/package.json b/package.json index ca5301c..c9840ae 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "xguard-hook", "version": "0.1.0", "private": true, + "license": "MIT", "type": "module", "scripts": { "test": "forge test", diff --git a/vercel.json b/vercel.json index def58cb..3b09c03 100644 --- a/vercel.json +++ b/vercel.json @@ -11,7 +11,7 @@ } ], "env": { - "VITE_DEPLOYMENT_URL": "/deployments/xlayer-mainnet.json", + "VITE_DEPLOYMENT_URL": "./deployments/xlayer-mainnet.json", "VITE_XLAYER_RPC_URL": "https://rpc.xlayer.tech" } }