Skip to main content
Glama

OpenZeppelin Contracts MCP Server

Official
by OpenZeppelin
erc721.test.ts.md27.7 kB
# Snapshot report for `src/erc721.test.ts` The actual snapshot is saved in `erc721.test.ts.snap`. Generated by [AVA](https://avajs.dev). ## basic > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721 {␊ constructor() ERC721("MyToken", "MTK") {}␊ }␊ ` ## name is unicodeSafe > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyTokec is ERC721 {␊ constructor() ERC721(unicode"MyTokeć", "MTK") {}␊ }␊ ` ## base uri > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721 {␊ constructor() ERC721("MyToken", "MTK") {}␊ ␊ function _baseURI() internal pure override returns (string memory) {␊ return "https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/";␊ }␊ }␊ ` ## enumerable > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";␊ ␊ contract MyToken is ERC721, ERC721Enumerable {␊ constructor() ERC721("MyToken", "MTK") {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address to, uint256 tokenId, address auth)␊ internal␊ override(ERC721, ERC721Enumerable)␊ returns (address)␊ {␊ return super._update(to, tokenId, auth);␊ }␊ ␊ function _increaseBalance(address account, uint128 value)␊ internal␊ override(ERC721, ERC721Enumerable)␊ {␊ super._increaseBalance(account, value);␊ }␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721, ERC721Enumerable)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ ` ## uri storage > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage {␊ constructor() ERC721("MyToken", "MTK") {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function tokenURI(uint256 tokenId)␊ public␊ view␊ override(ERC721, ERC721URIStorage)␊ returns (string memory)␊ {␊ return super.tokenURI(tokenId);␊ }␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721, ERC721URIStorage)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ ` ## mintable + uri storage > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, Ownable {␊ constructor(address initialOwner)␊ ERC721("MyToken", "MTK")␊ Ownable(initialOwner)␊ {}␊ ␊ function safeMint(address to, uint256 tokenId, string memory uri)␊ public␊ onlyOwner␊ {␊ _safeMint(to, tokenId);␊ _setTokenURI(tokenId, uri);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function tokenURI(uint256 tokenId)␊ public␊ view␊ override(ERC721, ERC721URIStorage)␊ returns (string memory)␊ {␊ return super.tokenURI(tokenId);␊ }␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721, ERC721URIStorage)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ ` ## mintable + uri storage + incremental > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, Ownable {␊ uint256 private _nextTokenId;␊ ␊ constructor(address initialOwner)␊ ERC721("MyToken", "MTK")␊ Ownable(initialOwner)␊ {}␊ ␊ function safeMint(address to, string memory uri)␊ public␊ onlyOwner␊ returns (uint256)␊ {␊ uint256 tokenId = _nextTokenId++;␊ _safeMint(to, tokenId);␊ _setTokenURI(tokenId, uri);␊ return tokenId;␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function tokenURI(uint256 tokenId)␊ public␊ view␊ override(ERC721, ERC721URIStorage)␊ returns (string memory)␊ {␊ return super.tokenURI(tokenId);␊ }␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721, ERC721URIStorage)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ ` ## burnable > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ ␊ contract MyToken is ERC721, ERC721Burnable {␊ constructor() ERC721("MyToken", "MTK") {}␊ }␊ ` ## burnable + uri storage > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ ␊ contract MyToken is ERC721, ERC721URIStorage, ERC721Burnable {␊ constructor() ERC721("MyToken", "MTK") {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function tokenURI(uint256 tokenId)␊ public␊ view␊ override(ERC721, ERC721URIStorage)␊ returns (string memory)␊ {␊ return super.tokenURI(tokenId);␊ }␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721, ERC721URIStorage)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ ` ## pausable > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Pausable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, ERC721Pausable, Ownable {␊ constructor(address initialOwner)␊ ERC721("MyToken", "MTK")␊ Ownable(initialOwner)␊ {}␊ ␊ function pause() public onlyOwner {␊ _pause();␊ }␊ ␊ function unpause() public onlyOwner {␊ _unpause();␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address to, uint256 tokenId, address auth)␊ internal␊ override(ERC721, ERC721Pausable)␊ returns (address)␊ {␊ return super._update(to, tokenId, auth);␊ }␊ }␊ ` ## mintable > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, Ownable {␊ constructor(address initialOwner)␊ ERC721("MyToken", "MTK")␊ Ownable(initialOwner)␊ {}␊ ␊ function safeMint(address to, uint256 tokenId) public onlyOwner {␊ _safeMint(to, tokenId);␊ }␊ }␊ ` ## mintable + roles > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721, AccessControl {␊ bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ ␊ constructor(address defaultAdmin, address minter) ERC721("MyToken", "MTK") {␊ _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ _grantRole(MINTER_ROLE, minter);␊ }␊ ␊ function safeMint(address to, uint256 tokenId) public onlyRole(MINTER_ROLE) {␊ _safeMint(to, tokenId);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721, AccessControl)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ ` ## mintable + managed > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ ␊ contract MyToken is ERC721, AccessManaged {␊ constructor(address initialAuthority)␊ ERC721("MyToken", "MTK")␊ AccessManaged(initialAuthority)␊ {}␊ ␊ function safeMint(address to, uint256 tokenId) public restricted {␊ _safeMint(to, tokenId);␊ }␊ }␊ ` ## mintable + incremental > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ ␊ contract MyToken is ERC721, Ownable {␊ uint256 private _nextTokenId;␊ ␊ constructor(address initialOwner)␊ ERC721("MyToken", "MTK")␊ Ownable(initialOwner)␊ {}␊ ␊ function safeMint(address to) public onlyOwner returns (uint256) {␊ uint256 tokenId = _nextTokenId++;␊ _safeMint(to, tokenId);␊ return tokenId;␊ }␊ }␊ ` ## votes > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address to, uint256 tokenId, address auth)␊ internal␊ override(ERC721, ERC721Votes)␊ returns (address)␊ {␊ return super._update(to, tokenId, auth);␊ }␊ ␊ function _increaseBalance(address account, uint128 value)␊ internal␊ override(ERC721, ERC721Votes)␊ {␊ super._increaseBalance(account, value);␊ }␊ }␊ ` ## votes + blocknumber > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address to, uint256 tokenId, address auth)␊ internal␊ override(ERC721, ERC721Votes)␊ returns (address)␊ {␊ return super._update(to, tokenId, auth);␊ }␊ ␊ function _increaseBalance(address account, uint128 value)␊ internal␊ override(ERC721, ERC721Votes)␊ {␊ super._increaseBalance(account, value);␊ }␊ }␊ ` ## votes + timestamp > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ ␊ contract MyToken is ERC721, EIP712, ERC721Votes {␊ constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ ␊ function clock() public view override returns (uint48) {␊ return uint48(block.timestamp);␊ }␊ ␊ // solhint-disable-next-line func-name-mixedcase␊ function CLOCK_MODE() public pure override returns (string memory) {␊ return "mode=timestamp";␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address to, uint256 tokenId, address auth)␊ internal␊ override(ERC721, ERC721Votes)␊ returns (address)␊ {␊ return super._update(to, tokenId, auth);␊ }␊ ␊ function _increaseBalance(address account, uint128 value)␊ internal␊ override(ERC721, ERC721Votes)␊ {␊ super._increaseBalance(account, value);␊ }␊ }␊ ` ## full upgradeable transparent > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ function initialize(address initialOwner) public initializer {␊ __ERC721_init("MyToken", "MTK");␊ __ERC721Enumerable_init();␊ __ERC721Pausable_init();␊ __Ownable_init(initialOwner);␊ __ERC721Burnable_init();␊ __EIP712_init("MyToken", "1");␊ __ERC721Votes_init();␊ }␊ ␊ function pause() public onlyOwner {␊ _pause();␊ }␊ ␊ function unpause() public onlyOwner {␊ _unpause();␊ }␊ ␊ function safeMint(address to, uint256 tokenId) public onlyOwner {␊ _safeMint(to, tokenId);␊ }␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address to, uint256 tokenId, address auth)␊ internal␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, ERC721VotesUpgradeable)␊ returns (address)␊ {␊ return super._update(to, tokenId, auth);␊ }␊ ␊ function _increaseBalance(address account, uint128 value)␊ internal␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721VotesUpgradeable)␊ {␊ super._increaseBalance(account, value);␊ }␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ ` ## full upgradeable uups > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ function initialize(address initialOwner) public initializer {␊ __ERC721_init("MyToken", "MTK");␊ __ERC721Enumerable_init();␊ __ERC721Pausable_init();␊ __Ownable_init(initialOwner);␊ __ERC721Burnable_init();␊ __EIP712_init("MyToken", "1");␊ __ERC721Votes_init();␊ __UUPSUpgradeable_init();␊ }␊ ␊ function pause() public onlyOwner {␊ _pause();␊ }␊ ␊ function unpause() public onlyOwner {␊ _unpause();␊ }␊ ␊ function safeMint(address to, uint256 tokenId) public onlyOwner {␊ _safeMint(to, tokenId);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ override␊ onlyOwner␊ {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address to, uint256 tokenId, address auth)␊ internal␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, ERC721VotesUpgradeable)␊ returns (address)␊ {␊ return super._update(to, tokenId, auth);␊ }␊ ␊ function _increaseBalance(address account, uint128 value)␊ internal␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721VotesUpgradeable)␊ {␊ super._increaseBalance(account, value);␊ }␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ ` ## full upgradeable uups + managed > Snapshot 1 `// SPDX-License-Identifier: MIT␊ // Compatible with OpenZeppelin Contracts ^5.4.0␊ pragma solidity ^0.8.27;␊ ␊ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ ␊ contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, AccessManagedUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ /// @custom:oz-upgrades-unsafe-allow constructor␊ constructor() {␊ _disableInitializers();␊ }␊ ␊ function initialize(address initialAuthority) public initializer {␊ __ERC721_init("MyToken", "MTK");␊ __ERC721Enumerable_init();␊ __ERC721Pausable_init();␊ __AccessManaged_init(initialAuthority);␊ __ERC721Burnable_init();␊ __EIP712_init("MyToken", "1");␊ __ERC721Votes_init();␊ __UUPSUpgradeable_init();␊ }␊ ␊ function pause() public restricted {␊ _pause();␊ }␊ ␊ function unpause() public restricted {␊ _unpause();␊ }␊ ␊ function safeMint(address to, uint256 tokenId) public restricted {␊ _safeMint(to, tokenId);␊ }␊ ␊ function _authorizeUpgrade(address newImplementation)␊ internal␊ override␊ restricted␊ {}␊ ␊ // The following functions are overrides required by Solidity.␊ ␊ function _update(address to, uint256 tokenId, address auth)␊ internal␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, ERC721VotesUpgradeable)␊ returns (address)␊ {␊ return super._update(to, tokenId, auth);␊ }␊ ␊ function _increaseBalance(address account, uint128 value)␊ internal␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721VotesUpgradeable)␊ {␊ super._increaseBalance(account, value);␊ }␊ ␊ function supportsInterface(bytes4 interfaceId)␊ public␊ view␊ override(ERC721Upgradeable, ERC721EnumerableUpgradeable)␊ returns (bool)␊ {␊ return super.supportsInterface(interfaceId);␊ }␊ }␊ `

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