Skip to main content
Glama

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin
build-generic.ts930 B
import type { FungibleOptions } from './fungible'; import { buildFungible } from './fungible'; import type { NonFungibleOptions } from './non-fungible'; import { buildNonFungible } from './non-fungible'; import type { StablecoinOptions } from './stablecoin'; import { buildStablecoin } from './stablecoin'; export interface KindedOptions { Fungible: { kind: 'Fungible' } & FungibleOptions; NonFungible: { kind: 'NonFungible' } & NonFungibleOptions; Stablecoin: { kind: 'Stablecoin' } & StablecoinOptions; } export type GenericOptions = KindedOptions[keyof KindedOptions]; export function buildGeneric(opts: GenericOptions) { switch (opts.kind) { case 'Fungible': return buildFungible(opts); case 'NonFungible': return buildNonFungible(opts); case 'Stablecoin': return buildStablecoin(opts); default: { const _: never = opts; throw new Error('Unknown kind'); } } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OpenZeppelin/contracts-wizard'

If you have feedback or need assistance with the MCP directory API, please join our Discord server