Package format
Reference for the CDN-hosted ABI artifact and the npm bindings package produced by a GitMyABI build.
A successful GitMyABI build publishes two artifacts: a smart contract ABI as a JSON file on a public CDN, and a TypeScript bindings npm package that wraps the same ABI in a typed class. This page documents the shape of each artifact. Use the URLs and names shown on the build detail page rather than hardcoding any host or registry value.
CDN-hosted ABI
- URL pattern. Each contract's ABI is served from a stable URL keyed by project and build. The URL takes the form
<cdn-base>/<project-id>/<build-id>/<contract>.json, where<cdn-base>is the configured GitMyABI CDN host. The exact URL for each contract is shown on the build detail page. - Aliases. The same artifact is also reachable through aliases keyed by Git reference, such as
/branches/<name>/...,/tags/<name>/...,/releases/<tag>/..., and/commits/<hash>/.... Branch and tag aliases follow the latest matching build; commit and release aliases are static. - Content. Standard Solidity JSON ABI array with one entry per function, event, error, or constructor.
- Authentication. The CDN URL is fetched without authentication.
npm bindings package
- Name. The published package name is shown on the build detail page.
- Version. Taken from the project's
package.jsonwhen set; otherwise0.0.<buildNumber>. - Exports. One named class export per compiled contract, plus bundled TypeScript declarations.
- Constructor. Each class uses a viem-style constructor:
new ContractName( address: `0x${string}`, clients: { publicClient, walletClient } ) - Methods. Read and write functions are exposed as typed instance methods. Reads return decoded values; writes return a transaction hash.
- Distribution. Packages produced from public projects are publicly installable. Packages produced from private projects require the registry configuration shown in the package installation instructions on the build detail page.
See generated contract bindings for what the package contains at runtime, ABI and TypeScript bindings publishing for how the artifacts are produced, and use generated contract bindings in a frontend for consumption examples.
Related
- Generated contract bindings
TypeScript packages produced from contract ABIs for typed integration.
- ABI and bindings publishing
How GitMyABI delivers ABIs via CDN and bindings via npm.
- Use generated bindings in a frontend
Consume a published bindings package from a frontend application.
- Publish generated bindings to npm
Configure a project so each build publishes a typed bindings package to npm.