Skip to main content
Glama
OpenZeppelin

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin
test.ts1.11 kB
import { promises as fs } from 'fs'; import type { TestFn, ExecutionContext } from 'ava'; import _test from 'ava'; import hre from 'hardhat'; import path from 'path'; import { writeGeneratedSources } from './generate/sources'; import type { KindedOptions } from './build-generic'; interface Context { generatedSourcesPath: string; } const test = _test as TestFn<Context>; test.serial('hooks result compiles', async t => { await testCompile(t, 'Hooks'); }); async function testCompile(t: ExecutionContext<Context>, kind: keyof KindedOptions) { const generatedSourcesPath = path.join(hre.config.paths.sources, `generated`); await fs.rm(generatedSourcesPath, { force: true, recursive: true }); await writeGeneratedSources(generatedSourcesPath, 'all', kind); // We only want to check that contracts compile and we don't care about any // of the outputs. Setting empty outputSelection causes compilation to go a // lot faster and not run out of memory. for (const { settings } of hre.config.solidity.compilers) { settings.outputSelection = {}; } await hre.run('compile'); t.pass(); }

Latest Blog Posts

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