Releases: evmnow/sdk
Releases · evmnow/sdk
v0.1.4
v0.1.3
Patch Changes
f2a6f75Thanks @jwahdatehagh! - Update proxies library
v0.1.2
Patch Changes
0e03e1fThanks @yougogirldoteth! - Add structured not found errors for sourcify misses
v0.1.1
Patch Changes
6dc8182Thanks @yougogirldoteth! - Fix resolving ENS
v0.1.0
Minor Changes
-
7fe475bThanks @jwahdatehagh! - Initial release of@evmnow/sdk— resolve complete contract metadata from multiple sources.Sources
- Repository — curated JSON from the
contract-metadataGitHub repo. - contractURI (ERC-7572) — on-chain contractURI resolution (HTTPS, IPFS,
data:). - Sourcify v2 — ABI, NatSpec (
userdoc/devdoc), optionally sources + deployed bytecode. - On-chain proxies — every major proxy convention: ERC-2535 diamonds, EIP-1967 (transparent / UUPS + beacon), EIP-1822, EIP-1167 clones, Gnosis Safe, EIP-897. Implementation-side ABI + NatSpec are folded back into the main result.
Features
createContractClient(config)— factory returning a client withget,fetchRepository,fetchContractURI,fetchSourcify,fetchProxy.client.get(addressOrEns)— resolves ENS, fetches every enabled source in parallel, resolvesincludes, and returns a singleContractResultwith merged metadata, ABI, NatSpec, optional sources + deployed bytecode, and detected proxy info.- Layered merge — curated repository wins over contractURI wins over Sourcify wins over implementation-derived metadata. Record sections (
functions,events,errors, …) shallow-merge per key. includesresolution — interface references (e.g.interface:erc721) are fetched from the schema base and merged left-to-right under the document.- Proxy pipeline —
detectProxyorchestrator with priority ordering; single-hop resolution;sources.proxy: falseskips detection entirely;sources.sourcify: falsealso disables per-target lookups (no hidden traffic). - ENS resolution —
.ethnames via Universal Resolver, with explicit mainnet RPC support whenchainId !== 1. - Dependency-injected
fetch— pass any fetch-compatible function; no implicit globals. - Pure/standalone exports —
merge,resolveIncludes,fetchRepository,fetchContractURI,fetchSourcify,buildSourcifyLayer,fetchProxy,detectProxy+ per-pattern detectors,enrichTargets,composeProxyResolution,buildCompositeAbi,filterAbiBySelectors,computeSelector,canonicalSignature,mergeNatspecDocs,decodeFacets,resolveUri,namehash,dnsEncode, RPC helpers — all usable without the client.
Result shape
interface ContractResult { chainId: number; address: string; metadata: ContractMetadataDocument; // merged across every source abi?: unknown[]; // composite (main contract + implementation targets) natspec?: { userdoc?; devdoc? }; sources?: Record<string, string>; deployedBytecode?: string; proxy?: ProxyResolution; // pattern, targets, beacon?, admin?, … }
Package layout
- Vite build with
preserveModules: truemirrorssrc/→dist/1:1 — every module is independently importable under@evmnow/sdk/...(declared inpackage.json#exports). sideEffects: falsefor aggressive tree-shaking.- Minimal runtime dependencies:
@1001-digital/proxies,@1001-digital/natspec,@noble/hashes.
- Repository — curated JSON from the