# Snapshot report for `src/zip-hardhat.test.ts`

The actual snapshot is saved in `zip-hardhat.test.ts.snap`.

Generated by [AVA](https://avajs.dev).

## erc20 full

> Snapshot 1

    [
      `// SPDX-License-Identifier: MIT␊
      // Compatible with OpenZeppelin Contracts ^5.0.0␊
      pragma solidity ^0.8.22;␊
      ␊
      import "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊
      import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊
      import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊
      import "@openzeppelin/contracts/access/AccessControl.sol";␊
      import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊
      import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊
      import "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊
      ␊
      contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊
          bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊
          bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊
      ␊
          constructor(address defaultAdmin, address pauser, address minter)␊
              ERC20("My Token", "MTK")␊
              ERC20Permit("My Token")␊
          {␊
              _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊
              _grantRole(PAUSER_ROLE, pauser);␊
              _mint(msg.sender, 2000 * 10 ** decimals());␊
              _grantRole(MINTER_ROLE, minter);␊
          }␊
      ␊
          function pause() public onlyRole(PAUSER_ROLE) {␊
              _pause();␊
          }␊
      ␊
          function unpause() public onlyRole(PAUSER_ROLE) {␊
              _unpause();␊
          }␊
      ␊
          function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊
              _mint(to, amount);␊
          }␊
      ␊
          // The following functions are overrides required by Solidity.␊
      ␊
          function _update(address from, address to, uint256 value)␊
              internal␊
              override(ERC20, ERC20Pausable, ERC20Votes)␊
          {␊
              super._update(from, to, value);␊
          }␊
      ␊
          function nonces(address owner)␊
              public␊
              view␊
              override(ERC20Permit, Nonces)␊
              returns (uint256)␊
          {␊
              return super.nonces(owner);␊
          }␊
      }␊
      `,
      `import { HardhatUserConfig } from "hardhat/config";␊
      import "@nomicfoundation/hardhat-toolbox";␊
      ␊
      ␊
      const config: HardhatUserConfig = {␊
        solidity: {␊
          version: "0.8.22",␊
          settings: {␊
            optimizer: {␊
              enabled: true,␊
            },␊
          },␊
        },␊
      };␊
      ␊
      export default config;␊
      `,
      `{␊
        "name": "hardhat-sample",␊
        "version": "0.0.1",␊
        "description": "",␊
        "main": "index.js",␊
        "scripts": {␊
          "test": "hardhat test"␊
        },␊
        "author": "",␊
        "license": "MIT",␊
        "devDependencies": {␊
          "@openzeppelin/contracts": "^5.0.0",␊
          "@nomicfoundation/hardhat-toolbox": "^5.0.0",␊
          "hardhat": "^2.16.1"␊
        }␊
      }`,
      `import { ethers } from "hardhat";␊
      ␊
      async function main() {␊
        const ContractFactory = await ethers.getContractFactory("MyToken");␊
      ␊
        // TODO: Set addresses for the contract arguments below␊
        const instance = await ContractFactory.deploy(defaultAdmin, pauser, minter);␊
        await instance.waitForDeployment();␊
      ␊
        console.log(\`Contract deployed to ${await instance.getAddress()}\`);␊
      }␊
      ␊
      // We recommend this pattern to be able to use async/await everywhere␊
      // and properly handle errors.␊
      main().catch((error) => {␊
        console.error(error);␊
        process.exitCode = 1;␊
      });␊
      `,
      `import { expect } from "chai";␊
      import { ethers } from "hardhat";␊
      ␊
      describe("MyToken", function () {␊
        it("Test contract", async function () {␊
          const ContractFactory = await ethers.getContractFactory("MyToken");␊
      ␊
          const defaultAdmin = (await ethers.getSigners())[0].address;␊
          const pauser = (await ethers.getSigners())[1].address;␊
          const minter = (await ethers.getSigners())[2].address;␊
      ␊
          const instance = await ContractFactory.deploy(defaultAdmin, pauser, minter);␊
          await instance.waitForDeployment();␊
      ␊
          expect(await instance.name()).to.equal("My Token");␊
        });␊
      });␊
      `,
    ]

## erc721 upgradeable

> Snapshot 1

    [
      `// SPDX-License-Identifier: MIT␊
      // Compatible with OpenZeppelin Contracts ^5.0.0␊
      pragma solidity ^0.8.22;␊
      ␊
      import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊
      import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊
      import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊
      import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊
      ␊
      contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {␊
          /// @custom:oz-upgrades-unsafe-allow constructor␊
          constructor() {␊
              _disableInitializers();␊
          }␊
      ␊
          function initialize(address initialOwner) initializer public {␊
              __ERC721_init("My Token", "MTK");␊
              __Ownable_init(initialOwner);␊
              __UUPSUpgradeable_init();␊
          }␊
      ␊
          function _authorizeUpgrade(address newImplementation)␊
              internal␊
              onlyOwner␊
              override␊
          {}␊
      }␊
      `,
      `import { HardhatUserConfig } from "hardhat/config";␊
      import "@nomicfoundation/hardhat-toolbox";␊
      import "@openzeppelin/hardhat-upgrades";␊
      ␊
      const config: HardhatUserConfig = {␊
        solidity: {␊
          version: "0.8.22",␊
          settings: {␊
            optimizer: {␊
              enabled: true,␊
            },␊
          },␊
        },␊
      };␊
      ␊
      export default config;␊
      `,
      `{␊
        "name": "hardhat-sample",␊
        "version": "0.0.1",␊
        "description": "",␊
        "main": "index.js",␊
        "scripts": {␊
          "test": "hardhat test"␊
        },␊
        "author": "",␊
        "license": "MIT",␊
        "devDependencies": {␊
          "@openzeppelin/contracts": "^5.0.0",␊
          "@openzeppelin/contracts-upgradeable": "^5.0.0",␊
          "@openzeppelin/hardhat-upgrades": "^3.0.0",␊
          "@nomicfoundation/hardhat-toolbox": "^5.0.0",␊
          "hardhat": "^2.16.1"␊
        }␊
      }`,
      `import { ethers, upgrades } from "hardhat";␊
      ␊
      async function main() {␊
        const ContractFactory = await ethers.getContractFactory("MyToken");␊
      ␊
        // TODO: Set addresses for the contract arguments below␊
        const instance = await upgrades.deployProxy(ContractFactory, [initialOwner]);␊
        await instance.waitForDeployment();␊
      ␊
        console.log(\`Proxy deployed to ${await instance.getAddress()}\`);␊
      }␊
      ␊
      // We recommend this pattern to be able to use async/await everywhere␊
      // and properly handle errors.␊
      main().catch((error) => {␊
        console.error(error);␊
        process.exitCode = 1;␊
      });␊
      `,
      `import { expect } from "chai";␊
      import { ethers, upgrades } from "hardhat";␊
      ␊
      describe("MyToken", function () {␊
        it("Test contract", async function () {␊
          const ContractFactory = await ethers.getContractFactory("MyToken");␊
      ␊
          const initialOwner = (await ethers.getSigners())[0].address;␊
      ␊
          const instance = await upgrades.deployProxy(ContractFactory, [initialOwner]);␊
          await instance.waitForDeployment();␊
      ␊
          expect(await instance.name()).to.equal("My Token");␊
        });␊
      });␊
      `,
    ]

## erc1155 basic

> Snapshot 1

    [
      `// SPDX-License-Identifier: MIT␊
      // Compatible with OpenZeppelin Contracts ^5.0.0␊
      pragma solidity ^0.8.22;␊
      ␊
      import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊
      import "@openzeppelin/contracts/access/Ownable.sol";␊
      ␊
      contract MyToken is ERC1155, Ownable {␊
          constructor(address initialOwner)␊
              ERC1155("https://myuri/{id}")␊
              Ownable(initialOwner)␊
          {}␊
      ␊
          function setURI(string memory newuri) public onlyOwner {␊
              _setURI(newuri);␊
          }␊
      }␊
      `,
      `import { HardhatUserConfig } from "hardhat/config";␊
      import "@nomicfoundation/hardhat-toolbox";␊
      ␊
      ␊
      const config: HardhatUserConfig = {␊
        solidity: {␊
          version: "0.8.22",␊
          settings: {␊
            optimizer: {␊
              enabled: true,␊
            },␊
          },␊
        },␊
      };␊
      ␊
      export default config;␊
      `,
      `{␊
        "name": "hardhat-sample",␊
        "version": "0.0.1",␊
        "description": "",␊
        "main": "index.js",␊
        "scripts": {␊
          "test": "hardhat test"␊
        },␊
        "author": "",␊
        "license": "MIT",␊
        "devDependencies": {␊
          "@openzeppelin/contracts": "^5.0.0",␊
          "@nomicfoundation/hardhat-toolbox": "^5.0.0",␊
          "hardhat": "^2.16.1"␊
        }␊
      }`,
      `import { ethers } from "hardhat";␊
      ␊
      async function main() {␊
        const ContractFactory = await ethers.getContractFactory("MyToken");␊
      ␊
        // TODO: Set addresses for the contract arguments below␊
        const instance = await ContractFactory.deploy(initialOwner);␊
        await instance.waitForDeployment();␊
      ␊
        console.log(\`Contract deployed to ${await instance.getAddress()}\`);␊
      }␊
      ␊
      // We recommend this pattern to be able to use async/await everywhere␊
      // and properly handle errors.␊
      main().catch((error) => {␊
        console.error(error);␊
        process.exitCode = 1;␊
      });␊
      `,
      `import { expect } from "chai";␊
      import { ethers } from "hardhat";␊
      ␊
      describe("MyToken", function () {␊
        it("Test contract", async function () {␊
          const ContractFactory = await ethers.getContractFactory("MyToken");␊
      ␊
          const initialOwner = (await ethers.getSigners())[0].address;␊
      ␊
          const instance = await ContractFactory.deploy(initialOwner);␊
          await instance.waitForDeployment();␊
      ␊
          expect(await instance.uri(0)).to.equal("https://myuri/{id}");␊
        });␊
      });␊
      `,
    ]

## custom basic

> Snapshot 1

    [
      `// SPDX-License-Identifier: MIT␊
      // Compatible with OpenZeppelin Contracts ^5.0.0␊
      pragma solidity ^0.8.22;␊
      ␊
      contract MyContract {␊
      }␊
      `,
      `import { HardhatUserConfig } from "hardhat/config";␊
      import "@nomicfoundation/hardhat-toolbox";␊
      ␊
      ␊
      const config: HardhatUserConfig = {␊
        solidity: {␊
          version: "0.8.22",␊
          settings: {␊
            optimizer: {␊
              enabled: true,␊
            },␊
          },␊
        },␊
      };␊
      ␊
      export default config;␊
      `,
      `{␊
        "name": "hardhat-sample",␊
        "version": "0.0.1",␊
        "description": "",␊
        "main": "index.js",␊
        "scripts": {␊
          "test": "hardhat test"␊
        },␊
        "author": "",␊
        "license": "MIT",␊
        "devDependencies": {␊
          "@openzeppelin/contracts": "^5.0.0",␊
          "@nomicfoundation/hardhat-toolbox": "^5.0.0",␊
          "hardhat": "^2.16.1"␊
        }␊
      }`,
      `import { ethers } from "hardhat";␊
      ␊
      async function main() {␊
        const ContractFactory = await ethers.getContractFactory("MyContract");␊
      ␊
        ␊
        const instance = await ContractFactory.deploy();␊
        await instance.waitForDeployment();␊
      ␊
        console.log(\`Contract deployed to ${await instance.getAddress()}\`);␊
      }␊
      ␊
      // We recommend this pattern to be able to use async/await everywhere␊
      // and properly handle errors.␊
      main().catch((error) => {␊
        console.error(error);␊
        process.exitCode = 1;␊
      });␊
      `,
      `import { expect } from "chai";␊
      import { ethers } from "hardhat";␊
      ␊
      describe("MyContract", function () {␊
        it("Test contract", async function () {␊
          const ContractFactory = await ethers.getContractFactory("MyContract");␊
      ␊
          const instance = await ContractFactory.deploy();␊
          await instance.waitForDeployment();␊
        });␊
      });␊
      `,
    ]

## custom upgradeable

> Snapshot 1

    [
      `// SPDX-License-Identifier: MIT␊
      // Compatible with OpenZeppelin Contracts ^5.0.0␊
      pragma solidity ^0.8.22;␊
      ␊
      import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊
      ␊
      contract MyContract is Initializable {␊
          /// @custom:oz-upgrades-unsafe-allow constructor␊
          constructor() {␊
              _disableInitializers();␊
          }␊
      }␊
      `,
      `import { HardhatUserConfig } from "hardhat/config";␊
      import "@nomicfoundation/hardhat-toolbox";␊
      import "@openzeppelin/hardhat-upgrades";␊
      ␊
      const config: HardhatUserConfig = {␊
        solidity: {␊
          version: "0.8.22",␊
          settings: {␊
            optimizer: {␊
              enabled: true,␊
            },␊
          },␊
        },␊
      };␊
      ␊
      export default config;␊
      `,
      `{␊
        "name": "hardhat-sample",␊
        "version": "0.0.1",␊
        "description": "",␊
        "main": "index.js",␊
        "scripts": {␊
          "test": "hardhat test"␊
        },␊
        "author": "",␊
        "license": "MIT",␊
        "devDependencies": {␊
          "@openzeppelin/contracts": "^5.0.0",␊
          "@openzeppelin/contracts-upgradeable": "^5.0.0",␊
          "@openzeppelin/hardhat-upgrades": "^3.0.0",␊
          "@nomicfoundation/hardhat-toolbox": "^5.0.0",␊
          "hardhat": "^2.16.1"␊
        }␊
      }`,
      `import { ethers, upgrades } from "hardhat";␊
      ␊
      async function main() {␊
        const ContractFactory = await ethers.getContractFactory("MyContract");␊
      ␊
        ␊
        const instance = await upgrades.deployProxy(ContractFactory, []);␊
        await instance.waitForDeployment();␊
      ␊
        console.log(\`Proxy deployed to ${await instance.getAddress()}\`);␊
      }␊
      ␊
      // We recommend this pattern to be able to use async/await everywhere␊
      // and properly handle errors.␊
      main().catch((error) => {␊
        console.error(error);␊
        process.exitCode = 1;␊
      });␊
      `,
      `import { expect } from "chai";␊
      import { ethers, upgrades } from "hardhat";␊
      ␊
      describe("MyContract", function () {␊
        it("Test contract", async function () {␊
          const ContractFactory = await ethers.getContractFactory("MyContract");␊
      ␊
          const instance = await upgrades.deployProxy(ContractFactory, []);␊
          await instance.waitForDeployment();␊
        });␊
      });␊
      `,
    ]
