Skip to main content
Glama

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin
common-options.ts1.27 kB
import type { Argument } from './contract'; import type { Access } from './set-access-control'; import type { Info } from './set-info'; import { defaults as infoDefaults } from './set-info'; import type { Upgradeable } from './set-upgradeable'; export const defaults: Required<CommonOptions> = { upgradeable: true, info: infoDefaults, } as const; export const contractDefaults: Required<CommonContractOptions> = { ...defaults, access: false, } as const; export interface CommonOptions { upgradeable?: Upgradeable; info?: Info; } export interface CommonContractOptions extends CommonOptions { access?: Access; } export function withCommonDefaults(opts: CommonOptions): Required<CommonOptions> { return { upgradeable: opts.upgradeable ?? defaults.upgradeable, info: opts.info ?? defaults.info, }; } export function withCommonContractDefaults(opts: CommonContractOptions): Required<CommonContractOptions> { return { ...withCommonDefaults(opts), access: opts.access ?? contractDefaults.access, }; } export function getSelfArg(scope: 'external' | 'view' = 'external'): Argument { if (scope === 'view') { return { name: 'self', type: '@ContractState' }; } else { return { name: 'ref self', type: 'ContractState' }; } }

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