Skip to main content
Glama

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin
contract.test.ts.md4.88 kB
# Snapshot report for `src/contract.test.ts` The actual snapshot is saved in `contract.test.ts.snap`. Generated by [AVA](https://avajs.dev). ## contract basics > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ ` ## contract with constructor code > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ ␊ #[contractimpl]␊ impl Foo {␊ pub fn __constructor(e: &Env) {␊ someFunction();␊ }␊ }␊ ` ## contract with constructor code with semicolon > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ ␊ #[contractimpl]␊ impl Foo {␊ pub fn __constructor(e: &Env) {␊ someFunction();␊ }␊ }␊ ` ## contract with function code before > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ ␊ #[othertag]␊ #[contractimpl]␊ impl External for ExternalTrait {␊ #[functiontag]␊ fn someFunction() {␊ before();␊ someFunction();␊ }␊ }␊ ` ## contract with function code before with semicolons > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ ␊ #[othertag]␊ #[contractimpl]␊ impl External for ExternalTrait {␊ #[functiontag]␊ fn someFunction() {␊ before();␊ someFunction();␊ }␊ }␊ ` ## contract with standalone import > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ use some::library::SomeLibrary;␊ ␊ #[contract]␊ pub struct Foo;␊ ` ## contract with grouped imports > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ use some::library::{Misc, SomeLibrary};␊ ␊ #[contract]␊ pub struct Foo;␊ ` ## contract with sorted use clauses > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ use another::library::{self as custom1, self as custom2, AnotherLibrary};␊ use some::library::SomeLibrary;␊ ␊ #[contract]␊ pub struct Foo;␊ ` ## contract with documentation > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ ␊ //! Some documentation␊ #![no_std]␊ ␊ #[contract]␊ pub struct Foo;␊ ` ## contract with security contact metadata > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ use soroban_sdk::contractmeta;␊ ␊ contractmeta!(key="contact", val="security@example.com");␊ ␊ #[contract]␊ pub struct Foo;␊ ` ## contract with multiple metadata > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ use soroban_sdk::contractmeta;␊ ␊ contractmeta!(key="contact", val="security@example.com");␊ contractmeta!(key="meta", val="data");␊ ␊ #[contract]␊ pub struct Foo;␊ ` ## contract with multiple metadata and documentation > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ ␊ //! Some documentation␊ #![no_std]␊ ␊ use soroban_sdk::contractmeta;␊ ␊ contractmeta!(key="contact", val="security@example.com");␊ contractmeta!(key="meta", val="data");␊ ␊ #[contract]␊ pub struct Foo;␊ ` ## contract with setInfo > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.4.1␊ #![no_std]␊ ␊ use soroban_sdk::contractmeta;␊ ␊ contractmeta!(key="security_contact", val="security@example.com");␊ ␊ #[contract]␊ pub struct Foo;␊ `

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