From 30a48a4c92072f28f77f0cf7842da4d77e3144ec Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 29 Sep 2025 00:08:05 -0300 Subject: [PATCH 1/3] fix ids --- content/contracts-compact/api/access.mdx | 22 +++++++++---------- .../contracts-compact/api/fungibleToken.mdx | 2 +- .../api/nonFungibleToken.mdx | 2 +- content/contracts-compact/api/ownable.mdx | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/content/contracts-compact/api/access.mdx b/content/contracts-compact/api/access.mdx index 249f31f..8d7b970 100644 --- a/content/contracts-compact/api/access.mdx +++ b/content/contracts-compact/api/access.mdx @@ -104,7 +104,7 @@ None. circuitSig="hasRole(roleId: Bytes<32>, account: Either) → Boolean" kind="circuit" complexity="k=10, rows=487" - id="AccessControl-_operatorRoles" + modulePrefix="AccessControl" > Returns `true` if `account` has been granted `roleId`. @@ -115,7 +115,7 @@ None. circuitSig="assertOnlyRole(roleId: Bytes<32>) → []" kind="circuit" complexity="k=10, rows=345" - id="AccessControl-assertOnlyRole" + modulePrefix="AccessControl" > Reverts if caller is missing `roleId`. @@ -131,7 +131,7 @@ None. circuitSig="_checkRole(roleId: Bytes<32>, account: Either) → []" kind="circuit" complexity="k=10, rows=467" - id="AccessControl-_checkRole" + modulePrefix="AccessControl" > Reverts if `account` is missing `roleId`. @@ -146,7 +146,7 @@ None. circuitSig="getRoleAdmin(roleId: Bytes<32>) → Bytes<32>" kind="circuit" complexity="k=10, rows=207" - id="AccessControl-getRoleAdmin" + modulePrefix="AccessControl" > Returns the admin role that controls `roleId` or a byte array with all zero bytes if `roleId` doesn’t exist. See [grantRole](#AccessControl-grantRole) and [revokeRole](#AccessControl-revokeRole). @@ -160,7 +160,7 @@ None. circuitSig="grantRole(roleId: Bytes<32>, account: Either) → []" kind="circuit" complexity="k=10, rows=994" - id="AccessControl-grantRole" + modulePrefix="AccessControl" > Grants `roleId` to `account`. @@ -181,7 +181,7 @@ None. circuitSig="revokeRole(roleId: Bytes<32>, account: Either) → []" kind="circuit" complexity="k=10, rows=827" - id="AccessControl-revokeRole" + modulePrefix="AccessControl" > Revokes `roleId` from `account`. @@ -197,7 +197,7 @@ None. stackParams="true" kind="circuit" complexity="k=10, rows=640" - id="AccessControl-renounceRole" + modulePrefix="AccessControl" > Revokes `roleId` from the calling account. @@ -222,7 +222,7 @@ None. circuitSig="_setRoleAdmin(roleId: Bytes<32>, adminRole: Bytes<32>) → []" kind="circuit" complexity="k=10, rows=209" - id="AccessControl-_setRoleAdmin" + modulePrefix="AccessControl" > Sets `adminRole` as `roleId`’s admin role. @@ -233,7 +233,7 @@ None. circuitSig="_grantRole(roleId: Bytes<32>, account: Either) → Boolean" kind="circuit" complexity="k=10, rows=734" - id="AccessControl-_grantRole" + modulePrefix="AccessControl" > Attempts to grant `roleId` to `account` and returns a boolean indicating if `roleId` was granted. @@ -256,7 +256,7 @@ None. kind="circuit" complexity="k=10, rows=733" stackParams="true" - id="AccessControl-_unsafeGrantRole" + modulePrefix="AccessControl" > Unsafe variant of [_grantRole](#AccessControl-_grantRole). @@ -273,7 +273,7 @@ None. circuitSig="_revokeRole(roleId: Bytes<32>, account: Either) → Boolean" kind="circuit" complexity="k=10, rows=563" - id="AccessControl-_revokeRole" + modulePrefix="AccessControl" > Attempts to revoke `roleId` from `account` and returns a boolean indicating if `roleId` was revoked. diff --git a/content/contracts-compact/api/fungibleToken.mdx b/content/contracts-compact/api/fungibleToken.mdx index a9817fa..f40b7eb 100644 --- a/content/contracts-compact/api/fungibleToken.mdx +++ b/content/contracts-compact/api/fungibleToken.mdx @@ -278,7 +278,7 @@ None. modulePrefix="FungibleToken" > Moves `value` tokens from `from` to `to` using the allowance mechanism. - `value` is the deducted from the caller’s allowance. + `value` is then deducted from the caller’s allowance. Transfers to contract addresses are currently disallowed until contract-to-contract interactions are supported in Compact. diff --git a/content/contracts-compact/api/nonFungibleToken.mdx b/content/contracts-compact/api/nonFungibleToken.mdx index 213defc..d990100 100644 --- a/content/contracts-compact/api/nonFungibleToken.mdx +++ b/content/contracts-compact/api/nonFungibleToken.mdx @@ -57,7 +57,7 @@ import "./node-modules/@openzeppelin-compact/contracts/src/token/NonFungibleToke Mapping from account addresses to their token balances. diff --git a/content/contracts-compact/api/ownable.mdx b/content/contracts-compact/api/ownable.mdx index 82ede37..3539815 100644 --- a/content/contracts-compact/api/ownable.mdx +++ b/content/contracts-compact/api/ownable.mdx @@ -44,7 +44,7 @@ None. circuitSig='initialize(initialOwner: Either) → []' kind="circuit" complexity="k=10, rows=258" - id="Ownable-initialize" + modulePrefix="Ownable" > Initializes the contract by setting the `initialOwner`. This must be called in the contract’s constructor. From fdf9432e4deb04d4ce786431b92d327a6295cb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9F=A3=20=E2=82=AC=E2=82=A5=E2=84=B5=E2=88=AA=E2=84=93?= =?UTF-8?q?=20=E2=9F=A2?= <34749913+emnul@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:15:30 -0400 Subject: [PATCH 2/3] Add caching --- .github/workflows/lint.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f279b8d..231f1dc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,6 +10,9 @@ jobs: lint: name: Lint and Format Check runs-on: ubuntu-latest + strategy: + matrix: + node-version: [22] steps: - name: Checkout code @@ -18,6 +21,23 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v5 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + + - name: Confgiure Build Caching + uses: actions/cache@v4 + with: + path: | + ${{ github.workspace }}/.next/cache + # Generate a new cache whenever packages or source files change. + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} + # If source files changed but packages didn't, rebuild from a prior cache. + restore-keys: | + ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- + - name: Install dependencies run: pnpm install --frozen-lockfile From 8955f1a4e33ca560222528ffb63c787635be577e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9F=A3=20=E2=82=AC=E2=82=A5=E2=84=B5=E2=88=AA=E2=84=93?= =?UTF-8?q?=20=E2=9F=A2?= <34749913+emnul@users.noreply.github.com> Date: Mon, 29 Sep 2025 15:24:25 -0400 Subject: [PATCH 3/3] Opt out of telemetry collection --- .github/workflows/lint.yml | 14 +--- package.json | 144 ++++++++++++++++++------------------- 2 files changed, 75 insertions(+), 83 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 231f1dc..d1f9d6b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [main] +env: + NEXT_TELEMETRY_DISABLED: 1 + jobs: lint: name: Lint and Format Check @@ -27,17 +30,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: "pnpm" - - name: Confgiure Build Caching - uses: actions/cache@v4 - with: - path: | - ${{ github.workspace }}/.next/cache - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- - - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/package.json b/package.json index 344a841..e6c20ff 100644 --- a/package.json +++ b/package.json @@ -1,73 +1,73 @@ { - "name": "docs", - "version": "0.0.0", - "private": true, - "type": "module", - "scripts": { - "build": "next build --turbo", - "dev": "next dev --turbo", - "start": "next start", - "postinstall": "fumadocs-mdx", - "lint": "biome lint src/", - "lint:links": "tsx scripts/link-validation.ts", - "lint:links-save": "tsx scripts/link-validation.ts --output broken-links.md", - "lint:fix": "biome lint --write src/", - "format": "biome format src/", - "format:fix": "biome format --write src/", - "check": "biome check src/ && pnpm run lint:links", - "check:fix": "biome check --write src/" - }, - "dependencies": { - "@fumadocs/mdx-remote": "^1.4.0", - "@netlify/plugin-nextjs": "^5.13.3", - "@next/third-parties": "^15.5.4", - "@orama/orama": "^3.1.13", - "@radix-ui/react-collapsible": "^1.1.12", - "@radix-ui/react-popover": "^1.1.15", - "@radix-ui/react-presence": "^1.1.5", - "@radix-ui/react-scroll-area": "^1.2.10", - "@radix-ui/react-separator": "^1.1.7", - "@tanstack/react-query": "^5.89.0", - "algoliasearch": "^5.37.0", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "fumadocs-core": "15.7.11", - "fumadocs-mdx": "12.0.1", - "fumadocs-openapi": "^9.3.8", - "fumadocs-ui": "15.7.11", - "glob": "^11.0.3", - "katex": "^0.16.22", - "lucide-react": "^0.540.0", - "mermaid": "^11.11.0", - "micromatch": "^4.0.8", - "next": "^15.5.3", - "next-themes": "^0.4.6", - "next-validate-link": "^1.6.3", - "react": "^19.1.1", - "react-dom": "^19.1.1", - "rehype-katex": "^7.0.1", - "remark": "^15.0.1", - "remark-gfm": "^4.0.1", - "remark-math": "^6.0.0", - "remark-mdx": "^3.1.1", - "shiki": "^3.12.2", - "tailwind-merge": "^3.3.1", - "unist-util-visit": "^5.0.0" - }, - "devDependencies": { - "@biomejs/biome": "^2.2.4", - "@tailwindcss/postcss": "^4.1.13", - "@tanstack/react-query-devtools": "^5.89.0", - "@types/mdx": "^2.0.13", - "@types/micromatch": "^4.0.9", - "@types/node": "24.1.0", - "@types/react": "^19.1.12", - "@types/react-dom": "^19.1.9", - "postcss": "^8.5.6", - "tailwindcss": "^4.1.13", - "tsx": "^4.20.5", - "tw-animate-css": "^1.3.8", - "typescript": "^5.9.2" - }, - "packageManager": "pnpm@10.17.1" -} + "name": "docs", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "build": "next build --turbo", + "dev": "next dev --turbo", + "start": "next start", + "postinstall": "fumadocs-mdx", + "lint": "biome lint src/", + "lint:links": "tsx scripts/link-validation.ts", + "lint:links-save": "tsx scripts/link-validation.ts --output broken-links.md", + "lint:fix": "biome lint --write src/", + "format": "biome format src/", + "format:fix": "biome format --write src/", + "check": "biome check src/ && pnpm run lint:links", + "check:fix": "biome check --write src/" + }, + "dependencies": { + "@fumadocs/mdx-remote": "^1.4.0", + "@netlify/plugin-nextjs": "^5.13.3", + "@next/third-parties": "^15.5.4", + "@orama/orama": "^3.1.13", + "@radix-ui/react-collapsible": "^1.1.12", + "@radix-ui/react-popover": "^1.1.15", + "@radix-ui/react-presence": "^1.1.5", + "@radix-ui/react-scroll-area": "^1.2.10", + "@radix-ui/react-separator": "^1.1.7", + "@tanstack/react-query": "^5.89.0", + "algoliasearch": "^5.37.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "fumadocs-core": "15.7.11", + "fumadocs-mdx": "12.0.1", + "fumadocs-openapi": "^9.3.8", + "fumadocs-ui": "15.7.11", + "glob": "^11.0.3", + "katex": "^0.16.22", + "lucide-react": "^0.540.0", + "mermaid": "^11.11.0", + "micromatch": "^4.0.8", + "next": "^15.5.3", + "next-themes": "^0.4.6", + "next-validate-link": "^1.6.3", + "react": "^19.1.1", + "react-dom": "^19.1.1", + "rehype-katex": "^7.0.1", + "remark": "^15.0.1", + "remark-gfm": "^4.0.1", + "remark-math": "^6.0.0", + "remark-mdx": "^3.1.1", + "shiki": "^3.12.2", + "tailwind-merge": "^3.3.1", + "unist-util-visit": "^5.0.0" + }, + "devDependencies": { + "@biomejs/biome": "^2.2.4", + "@tailwindcss/postcss": "^4.1.13", + "@tanstack/react-query-devtools": "^5.89.0", + "@types/mdx": "^2.0.13", + "@types/micromatch": "^4.0.9", + "@types/node": "24.1.0", + "@types/react": "^19.1.12", + "@types/react-dom": "^19.1.9", + "postcss": "^8.5.6", + "tailwindcss": "^4.1.13", + "tsx": "^4.20.5", + "tw-animate-css": "^1.3.8", + "typescript": "^5.9.2" + }, + "packageManager": "pnpm@10.17.1" +} \ No newline at end of file