- #8
af2eb8bThanks @yougogirldoteth! - Include verified source files for proxy targets wheninclude.sourcesis enabled.
f2a6f75Thanks @jwahdatehagh! - Update proxies library
0e03e1fThanks @yougogirldoteth! - Add structured not found errors for sourcify misses
6dc8182Thanks @yougogirldoteth! - Fix resolving ENS
-
7fe475bThanks @jwahdatehagh! - Initial release of@evmnow/sdk— resolve complete contract metadata from multiple 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.
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.
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?, … }
- 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