@perspectivefi/addresses 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cli.js +34 -12
- package/dist/{core-DGXC_tzy.d.ts → core-B0Xb2yCr.d.ts} +1 -1
- package/dist/{core-84-fTw11.d.mts → core-Caifnk7y.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{keys-runtime-CIgeW81X.d.mts → keys-runtime-BxA6wnO7.d.mts} +1 -1
- package/dist/{keys-runtime-AS8fx_e7.d.ts → keys-runtime-vsKdWATI.d.ts} +1 -1
- package/dist/keys.d.mts +7 -3
- package/dist/keys.d.ts +7 -3
- package/dist/keys.js +10 -2
- package/dist/keys.mjs +7 -3
- package/dist/prod-keys.d.mts +7 -3
- package/dist/prod-keys.d.ts +7 -3
- package/dist/prod-keys.js +52 -44
- package/dist/prod-keys.mjs +49 -45
- package/dist/prod.d.mts +3 -3
- package/dist/prod.d.ts +3 -3
- package/dist/prod.js +1 -1
- package/dist/prod.mjs +1 -1
- package/dist/{registry-rKK0TKIW.d.mts → registry-yA3YZHu_.d.mts} +1 -1
- package/dist/{registry-rKK0TKIW.d.ts → registry-yA3YZHu_.d.ts} +1 -1
- package/dist/registry.json +1630 -433
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ Each step is a PR that changes one `status` line (plus the fields it needs).
|
|
|
100
100
|
|
|
101
101
|
`source` and `audit` are required for `role-unsafe`, and for `safe` unless the entry's `approval.basis` is something other than `audit` (`prod-baseline`, `external-integration`, `governance`; the evidence is then in the PR, see [POLICY.md](./POLICY.md)).
|
|
102
102
|
|
|
103
|
-
The on-chain role check reads `owner()`, the EIP-1967 admin slot (and the owner of that admin contract if it is one), and `authority()` for OpenZeppelin AccessManager (`hasRole(0, governance[i])` must be true for at least one governance address, and `hasRole(0, deployer)` must be false). RPC failures on a `safe` entry fail the run.
|
|
103
|
+
The on-chain role check reads `owner()`, the EIP-1967 admin slot (and the owner of that admin contract if it is one), and `authority()` for OpenZeppelin AccessManager (`hasRole(0, governance[i])` must be true for at least one governance address, and `hasRole(0, deployer)` must be false). An owner or proxy-admin owner that is itself an AccessManager, and an AccessManaged proxy admin (it has `authority()` instead of `owner()`), are judged the same way. RPC failures on a `safe` entry fail the run.
|
|
104
104
|
|
|
105
105
|
Every other check, on every PR:
|
|
106
106
|
|
|
@@ -181,7 +181,7 @@ spectra-addresses check <paths...> [--mode off|enforce] [--allow <json file>]...
|
|
|
181
181
|
- **Mode**: `--mode`, else env `ADDRESS_GATE`. There are two modes. `off` prints the full report and always exits 0. `enforce` exits 1 on any violation. If `VERCEL_ENV=production` and the mode is unset or invalid, the check exits 1 ("ADDRESS_GATE must be set to off or enforce in production"), so a missing setting can never silently disable protection. Outside production an unset or invalid mode means `off`. `enforce` is not downgraded on preview builds.
|
|
182
182
|
- **Tagged blocks first**: every `$spectraAddresses` block (from `/keys`, `/prod/keys`, the runtime datasets and the runtime denylist) is found, also when its JSON is escaped inside a JS string. For each `(chain, address)` in a block, the exact entry for **that chain** must be `safe` in the latest registry and not denylisted. The report names key and chain. A block that cannot be parsed, or carries anything besides the fields we emit, is a violation. The runtime denylist block is accepted only for addresses the registry itself denylists.
|
|
183
183
|
- **Then bare addresses**: the blocks are cut out and the rest of the file is scanned for EVM addresses and Stellar contract ids. A bare address passes only if it is on an `--allow` list, **or** every registry entry with that address (on any chain) is `safe` and it is denylisted on no chain. Otherwise it is a violation, and the report says which chain made it fail (`blocked`, `unsafe`, `denylisted`, or `not in registry`). A denylisted address fails even if it is on an `--allow` list.
|
|
184
|
-
- **Latest registry**: the check does not use the version your lockfile pins.
|
|
184
|
+
- **Latest registry**: the check does not use the version your lockfile pins. jsDelivr and unpkg cache `@latest` URLs for hours, so it first asks npm for the exact latest version (`https://registry.npmjs.org/@perspectivefi/addresses/latest`, printed as `latest published version: x.y.z`) and then fetches `dist/registry.json` of that version from jsDelivr (`https://cdn.jsdelivr.net/npm/@perspectivefi/addresses@<version>/dist/registry.json`), then from unpkg (`https://unpkg.com/@perspectivefi/addresses@<version>/dist/registry.json`), 10 second timeout each. If the npm lookup fails it prints a warning and uses the `@latest` CDN URLs instead. `--registry <url-or-file>` or env `ADDRESS_REGISTRY_URL` replaces all of this (the flag wins; no npm lookup). The output says which dataset was used.
|
|
185
185
|
- **If no source loads**: in `off` the check prints a `WARNING` and uses the dataset bundled in the installed package. In `enforce` it exits 1 ("cannot verify against the latest registry"). `--offline` skips the fetch and uses the bundled dataset on purpose; in `enforce` it prints a loud warning that the run is only as fresh as the installed version.
|
|
186
186
|
- Scans files recursively (skips `*.map`, `cache` and `node_modules` dirs, and binary files over 5 MB).
|
|
187
187
|
- Always allowed: the zero address and `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`. `--allow` takes JSON files with an array of address strings (or objects with an `address` field). Use it for token-list addresses. It applies to bare addresses only.
|
|
@@ -245,7 +245,7 @@ What this package guarantees, and what it does not.
|
|
|
245
245
|
After each successful publish, the workflow posts the registry changes to Slack (#nt-deployment-addresses-announcements), most important first:
|
|
246
246
|
|
|
247
247
|
1. **✅ Approved for prod**: entries whose status changed to `safe` (or that were added as `safe`), with the entry's `approval` reason (string, or `approval.basis`) when it has one.
|
|
248
|
-
2. **⛔ Blocked**: status changes to `blocked
|
|
248
|
+
2. **⛔ Blocked**: status changes to `blocked`, additions that are `blocked` (these are not repeated under the additions), and denylist additions and removals (`denylist + 0x…` / `denylist - 0x…`, with the reason). An entry that moved to the denylist is reported here, not as a removal.
|
|
249
249
|
3. New addresses grouped by chain and domain.
|
|
250
250
|
4. Address changes, other status changes, and removals.
|
|
251
251
|
|