@polygonlabs/meta@1.0.0
Major Changes
-
0c1d7e5: Initial release of
@polygonlabs/meta, replacing the legacy@maticnetwork/meta@2.xpackage.What's new
- Per-contract typed deep imports.
import { abi } from '@polygonlabs/meta/abi/<chain>/<network>/<type>/<Contract>'pulls exactly one ABI; the rest of the package is tree-shaken at bundle time. as constliteral ABI types. Each ABI is exported as a literal tuple soviem,wagmi, andabitypecan extract function names, argument types, and return types at the call site. Withoutas constthe type widens to{ name: string }[]and consumer-side type inference disappears entirely — the typed-ABI value proposition exists only because ofas const.- Typed network metadata under
/info/<chain>/<network>and/info/networks, alsoas const. - Raw JSON access preserved. The
./network/*subpath export keeps the same path scheme as@maticnetwork/meta@2.x, so consumers who only want JSON migrate by changing the package name. - Provenance-stamped publishes via npm OIDC trusted publishing, driven by changesets-on-merge.
Breaking changes vs
@maticnetwork/meta@2.x- Package renamed:
@maticnetwork/meta→@polygonlabs/meta. - ESM-only.
require()is no longer supported. Consumers must be ESM and on Node ≥ 24. - The
Networkclass is gone. Replacenew Network(chain, version).abi(name)with the typed deep imports under./abi/<chain>/<network>/<type>/<Contract>— same data, fully typed, sync, tree-shakable. - Mumbai testnet is gone (already removed upstream); use Amoy.
The HTTP endpoint at
static.polygon.technologyis unchanged. SeeMIGRATION.mdfor full before/after import examples. - Per-contract typed deep imports.