@artblocks/abx-sdk 0.1.0-alpha.32 → 0.1.0-alpha.33
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/CHANGELOG.md +3 -97
- package/dist/deployments.d.ts +2 -2
- package/dist/deployments.js +2 -2
- package/dist/node.d.ts +5 -5
- package/dist/node.js +5 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,102 +1,8 @@
|
|
|
1
1
|
# @artblocks/abx-sdk
|
|
2
2
|
|
|
3
|
-
## 0.1.0-alpha.
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- 0fed512: `deploy-code`'s post-deploy setup (script chunks, PostParam schemas, dependency declarations,
|
|
8
|
-
on-chain-URI legs, reserve mints) no longer rides one atomic multicall no matter how large the
|
|
9
|
-
on-chain script is. A 60KB script (3 chunks) produced a setup transaction wanting 17,307,586 gas
|
|
10
|
-
against the ~16,777,216 (2^24) `eth_estimateGas` ceiling — not the block gas limit — and failed with
|
|
11
|
-
a useless "gas limit too high", leaving a verifiably half-configured contract on chain.
|
|
12
|
-
|
|
13
|
-
The setup now splits into gas-bounded transactions when it doesn't fit one: every script-chunk batch,
|
|
14
|
-
then every config (schema/dependency/on-chain-URI) batch, then every mint batch, in that order and
|
|
15
|
-
never mixed. Script-chunk writes and config setters are idempotent, so an interruption at any split
|
|
16
|
-
point is finished by the existing `deploy-code --resume` (which now also gas-batches whatever it
|
|
17
|
-
finds missing); mints ride strictly last because a mint is the one non-idempotent leg. A setup that
|
|
18
|
-
already fit one transaction is unaffected — same single combined multicall as before. There is no new
|
|
19
|
-
size-based refusal; the dry run's `transactions`/`approvals` reports the real transaction count and
|
|
20
|
-
cost for the whole plan.
|
|
21
|
-
|
|
22
|
-
`@artblocks/abx-sdk` exports the reusable pieces: `packCallsByGas` (a generic gas-bounded bin packer,
|
|
23
|
-
the call-level sibling of `planContentTxs`'s own batching), `estimateChunkGasForBytes`, and
|
|
24
|
-
`SETUP_LEG_GAS` (flat gas estimates for a schema/dependency/on-chain-URI/mint call).
|
|
25
|
-
|
|
26
|
-
## 0.1.0-alpha.31
|
|
27
|
-
|
|
28
|
-
### Minor Changes
|
|
29
|
-
|
|
30
|
-
- c068a0f: Add `probeChunkStore` — a fail-closed sibling to `ensureChunkStore` that resolves whether a usable
|
|
31
|
-
on-chain chunk store exists (configured address, has code, answers the current `writeContent` ABI)
|
|
32
|
-
without ever sending a transaction or deploying one. Returns a typed verdict (`ok` / `unconfigured` /
|
|
33
|
-
`no-code` / `incompatible` / `unreachable`) instead of throwing, so a request-scoped or read-only
|
|
34
|
-
service can call it at startup and branch on the reason.
|
|
35
|
-
- c068a0f: Local data-directory resolution (`.abx-self-host` / `ABX_DATA_DIR`) is now centralized in one SDK
|
|
36
|
-
resolver (`resolveDataDir` from `@artblocks/abx-sdk/node`) instead of five independent copies of the
|
|
37
|
-
same fallback across the CLI, indexer, and storage packages — the setup that could silently split a
|
|
38
|
-
project's SQLite projection from its managed Arweave key into two different directories.
|
|
39
|
-
|
|
40
|
-
A handful of READ commands (`status`, `state`, `verify`, `doctor`, `capabilities`, `tokens`,
|
|
41
|
-
`tokenuri`, `contracturi`, `inspect`, `minter show`) now search upward from the current directory,
|
|
42
|
-
git-style, for an already-existing `.abx-self-host` before falling back to creating one at cwd —
|
|
43
|
-
bounded at the home directory, a `.git` repository root, or the filesystem root, and never crossing
|
|
44
|
-
into an unrelated directory tree. Running one of these from a project subdirectory (e.g. a
|
|
45
|
-
`contracts/` folder) now finds the same node a run from the project root would, instead of quietly
|
|
46
|
-
reporting an empty one. `abx status`'s existing `data: <path>` line — and a new one-line notice —
|
|
47
|
-
name the directory whenever it was found this way. Every WRITE command is unaffected: it always
|
|
48
|
-
resolves strictly to the current directory, exactly as before, so nothing is ever created somewhere
|
|
49
|
-
you didn't `cd` into. `ABX_DATA_DIR`, when set, still always wins outright and disables the search
|
|
50
|
-
entirely.
|
|
51
|
-
|
|
52
|
-
- c068a0f: `deploy-code --resume <address>` now works against an EditionCode (`--copies`) target, not just
|
|
53
|
-
SeriesCode. The mint leg diffs per id against that id's own `totalSupply(id)` — pass the same
|
|
54
|
-
content flags the original deploy used, plus `--mint-count`/`--mint-amount` if it premint any ids.
|
|
55
|
-
- c068a0f: `reconstructProject()` and `reconstructIncremental()` accept `toBlock: 'safe' | 'finalized'` in
|
|
56
|
-
addition to a literal block number and the existing `'latest'` default. The tag is resolved to a
|
|
57
|
-
concrete inclusive block number (via the new `resolveBlockTag()`) before any `eth_getLogs` scan
|
|
58
|
-
starts, and that number — never the tag — is what lands in the persisted `ProjectState.toBlock`. An
|
|
59
|
-
RPC that doesn't support the requested tag throws the new `BlockTagUnavailableError` instead of
|
|
60
|
-
silently falling back to `latest`. `SelfHostIndexer#reindex` gained a matching `blockTag` option.
|
|
61
|
-
Existing callers (the `'latest'`/unset default) are unaffected.
|
|
62
|
-
|
|
63
|
-
`abx index --to-block safe|finalized` stops a re-index at a reorg-safe boundary.
|
|
64
|
-
|
|
65
|
-
- c068a0f: Add `abx replace-script <address> --script <file>` — a safe, first-class way to replace an UNLOCKED
|
|
66
|
-
code project's on-chain program (`SeriesCode`/`EditionCode`, before `abx lock-script`). It refuses
|
|
67
|
-
outright on a locked script or a non-code target, diffs the replacement by content against what's
|
|
68
|
-
on-chain (an index that already matches is never re-sent), handles a smaller replacement by queuing
|
|
69
|
-
the trailing `removeLastScriptChunk` calls it needs, folds every write and remove into ONE atomic
|
|
70
|
-
transaction (a revert can never leave a half-applied script), and reads the completed script back to
|
|
71
|
-
verify it reassembles exactly to the file before reporting success. Supports `--dry-run` and every
|
|
72
|
-
signing lane.
|
|
73
|
-
|
|
74
|
-
The SDK gains the primitives this is built on: `prepareSetScriptChunk`/`prepareRemoveLastScriptChunk`
|
|
75
|
-
(no `prepare*` wrapper existed for `OnChainScript.sol`'s writers before this — every caller hand-
|
|
76
|
-
encoded `encodeFunctionData`), plus `planScriptReplace`/`verifyScriptReplace`, which take a small
|
|
77
|
-
reader interface (mirroring `resume.ts`'s own reader seam) so the diff and post-write verification
|
|
78
|
-
are testable without a chain.
|
|
79
|
-
|
|
80
|
-
- c068a0f: Additive for SDK consumers — a new exported function, nothing existing changed shape or behavior.
|
|
81
|
-
|
|
82
|
-
`abx verify` now compares a collection's actual `tokenURIRenderer` and `animation_url` generator
|
|
83
|
-
pointers against the current canonical singletons for its chain, reporting each as current or
|
|
84
|
-
not-current (never treating an older-but-working deployment as broken). Adds the SDK helper
|
|
85
|
-
`isCurrentGenerator` alongside the existing `isCurrentRenderer` probe.
|
|
86
|
-
|
|
87
|
-
### Patch Changes
|
|
88
|
-
|
|
89
|
-
- c068a0f: `decodeReader` now requires the canonical `abi.encode(address reader, address pointer)`
|
|
90
|
-
shape — exactly two 32-byte words, each zero-padded — and rejects truncated, trailing-byte,
|
|
91
|
-
or double-encoded `reader` field values with an actionable error instead of silently
|
|
92
|
-
decoding a wrong address pair.
|
|
93
|
-
|
|
94
|
-
## 0.1.0-alpha.30
|
|
3
|
+
## 0.1.0-alpha.33
|
|
95
4
|
|
|
96
5
|
### Patch Changes
|
|
97
6
|
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
## Unreleased
|
|
101
|
-
|
|
102
|
-
Public release history begins here.
|
|
7
|
+
- 9242a05: Prepare package metadata, release notes, and public-facing source comments for the initial public
|
|
8
|
+
source release.
|
package/dist/deployments.d.ts
CHANGED
|
@@ -115,13 +115,13 @@ export declare function resolveFixedPriceMinter1155(chainId: number, override?:
|
|
|
115
115
|
export declare function resolveGenerator(chainId: number, override?: string): Address | undefined;
|
|
116
116
|
/**
|
|
117
117
|
* Is `generator` the chain's CURRENT canonical generator — the per-collection pointer check
|
|
118
|
-
* `abx verify` runs for the singleton `generatorFor(state)` resolves (site/content/docs
|
|
118
|
+
* `abx verify` runs for the singleton `generatorFor(state)` resolves (see site/content/docs).
|
|
119
119
|
*
|
|
120
120
|
* Binary by construction, on purpose: it answers current / not-current and nothing finer. A
|
|
121
121
|
* mismatch can mean either "pinned to a prior canonical generation" or "a fully custom field
|
|
122
122
|
* renderer", and this file's own docstring is explicit that no superseded generator address is
|
|
123
123
|
* EVER kept as live state here — so there is nothing recorded to tell those two apart against.
|
|
124
|
-
* Building that historical registry is
|
|
124
|
+
* Building that historical registry is deliberately out of scope (the factory-generation
|
|
125
125
|
* ladder already has one, {@link ANCHOR_GENERATIONS}; the generator deliberately does not).
|
|
126
126
|
*
|
|
127
127
|
* `null` ⇒ this chain has no canonical generator recorded at all (unshipped) — a different fact
|
package/dist/deployments.js
CHANGED
|
@@ -175,13 +175,13 @@ export function resolveGenerator(chainId, override) {
|
|
|
175
175
|
}
|
|
176
176
|
/**
|
|
177
177
|
* Is `generator` the chain's CURRENT canonical generator — the per-collection pointer check
|
|
178
|
-
* `abx verify` runs for the singleton `generatorFor(state)` resolves (site/content/docs
|
|
178
|
+
* `abx verify` runs for the singleton `generatorFor(state)` resolves (see site/content/docs).
|
|
179
179
|
*
|
|
180
180
|
* Binary by construction, on purpose: it answers current / not-current and nothing finer. A
|
|
181
181
|
* mismatch can mean either "pinned to a prior canonical generation" or "a fully custom field
|
|
182
182
|
* renderer", and this file's own docstring is explicit that no superseded generator address is
|
|
183
183
|
* EVER kept as live state here — so there is nothing recorded to tell those two apart against.
|
|
184
|
-
* Building that historical registry is
|
|
184
|
+
* Building that historical registry is deliberately out of scope (the factory-generation
|
|
185
185
|
* ladder already has one, {@link ANCHOR_GENERATIONS}; the generator deliberately does not).
|
|
186
186
|
*
|
|
187
187
|
* `null` ⇒ this chain has no canonical generator recorded at all (unshipped) — a different fact
|
package/dist/node.d.ts
CHANGED
|
@@ -35,9 +35,9 @@ export interface ResolveDataDirOptions {
|
|
|
35
35
|
* indexer's SQLite store, the storage package's local-disk backend, content index, and managed
|
|
36
36
|
* Arweave key — used to carry an INDEPENDENT copy of `ABX_DATA_DIR ?? cwd/.abx-self-host`, which is
|
|
37
37
|
* exactly the setup that silently splits one project's SQLite projection from its managed Arweave
|
|
38
|
-
* key into two different directories the moment any single copy drifts from the others
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* key into two different directories the moment any single copy drifts from the others. To keep
|
|
39
|
+
* managed Arweave key and projection locations coherent, every one of those call sites now
|
|
40
|
+
* resolves through here instead.
|
|
41
41
|
*
|
|
42
42
|
* `ABX_DATA_DIR` always wins outright — set it and discovery never runs, full stop. That isolation
|
|
43
43
|
* is load-bearing (tests rely on it to run concurrently against disposable temp dirs; an operator
|
|
@@ -48,13 +48,13 @@ export interface ResolveDataDirOptions {
|
|
|
48
48
|
* per-command allowlist in `config.ts`), and only when nothing already exists at cwd, this walks
|
|
49
49
|
* UP the directory tree looking for an EXISTING `.abx-self-host`, so (say) `abx status` run from a
|
|
50
50
|
* project subdirectory finds the same node a run from the project root would — instead of quietly
|
|
51
|
-
* opening a second, empty one
|
|
51
|
+
* opening a second, empty one.
|
|
52
52
|
*
|
|
53
53
|
* The search is BOUNDED, git-style — it stops at (but still checks) the user's home directory, a
|
|
54
54
|
* directory containing `.git` (a repository root), or the filesystem root, so it can never wander
|
|
55
55
|
* into an unrelated ancestor tree. And it never merges two directories: the first EXISTING
|
|
56
56
|
* `.abx-self-host` found wins outright, and `source: 'discovered'` tells the caller to say so — a
|
|
57
|
-
* discovered node is not the one a human just `cd`-ed into
|
|
57
|
+
* discovered node is not the one a human just `cd`-ed into; that distinction must stay visible
|
|
58
58
|
* rather than silently answering from the wrong place.
|
|
59
59
|
*/
|
|
60
60
|
export declare function resolveDataDir(options?: ResolveDataDirOptions): DataDirResolution;
|
package/dist/node.js
CHANGED
|
@@ -30,9 +30,9 @@ function isDirectory(path) {
|
|
|
30
30
|
* indexer's SQLite store, the storage package's local-disk backend, content index, and managed
|
|
31
31
|
* Arweave key — used to carry an INDEPENDENT copy of `ABX_DATA_DIR ?? cwd/.abx-self-host`, which is
|
|
32
32
|
* exactly the setup that silently splits one project's SQLite projection from its managed Arweave
|
|
33
|
-
* key into two different directories the moment any single copy drifts from the others
|
|
34
|
-
*
|
|
35
|
-
*
|
|
33
|
+
* key into two different directories the moment any single copy drifts from the others. To keep
|
|
34
|
+
* managed Arweave key and projection locations coherent, every one of those call sites now
|
|
35
|
+
* resolves through here instead.
|
|
36
36
|
*
|
|
37
37
|
* `ABX_DATA_DIR` always wins outright — set it and discovery never runs, full stop. That isolation
|
|
38
38
|
* is load-bearing (tests rely on it to run concurrently against disposable temp dirs; an operator
|
|
@@ -43,13 +43,13 @@ function isDirectory(path) {
|
|
|
43
43
|
* per-command allowlist in `config.ts`), and only when nothing already exists at cwd, this walks
|
|
44
44
|
* UP the directory tree looking for an EXISTING `.abx-self-host`, so (say) `abx status` run from a
|
|
45
45
|
* project subdirectory finds the same node a run from the project root would — instead of quietly
|
|
46
|
-
* opening a second, empty one
|
|
46
|
+
* opening a second, empty one.
|
|
47
47
|
*
|
|
48
48
|
* The search is BOUNDED, git-style — it stops at (but still checks) the user's home directory, a
|
|
49
49
|
* directory containing `.git` (a repository root), or the filesystem root, so it can never wander
|
|
50
50
|
* into an unrelated ancestor tree. And it never merges two directories: the first EXISTING
|
|
51
51
|
* `.abx-self-host` found wins outright, and `source: 'discovered'` tells the caller to say so — a
|
|
52
|
-
* discovered node is not the one a human just `cd`-ed into
|
|
52
|
+
* discovered node is not the one a human just `cd`-ed into; that distinction must stay visible
|
|
53
53
|
* rather than silently answering from the wrong place.
|
|
54
54
|
*/
|
|
55
55
|
export function resolveDataDir(options = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artblocks/abx-sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.33",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Typed SDK for ABX protocol reads, deployments, operations, reconstruction, and verification.",
|
|
6
6
|
"type": "module",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"viem": "^2.56.
|
|
52
|
+
"viem": "^2.56.3"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"esbuild": "^0.28.2"
|