From 487e7117f26c356b4192a3258e5df52969ed6f84 Mon Sep 17 00:00:00 2001 From: aki-0517 Date: Thu, 5 Dec 2024 19:32:48 +0900 Subject: [PATCH] deploy script --- .../nextjs/contracts/deployedContracts.ts | 218 ++++++++++++++++-- 1 file changed, 201 insertions(+), 17 deletions(-) diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index ff3b7d3..bdeec41 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; const deployedContracts = { 31337: { ExpirableERC721: { - address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + address: "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707", abi: [ { inputs: [ @@ -30,6 +30,11 @@ const deployedContracts = { stateMutability: "nonpayable", type: "constructor", }, + { + inputs: [], + name: "ERC721EnumerableForbiddenBatchMint", + type: "error", + }, { inputs: [ { @@ -133,6 +138,22 @@ const deployedContracts = { name: "ERC721NonexistentToken", type: "error", }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "ERC721OutOfBoundsIndex", + type: "error", + }, { inputs: [ { @@ -239,12 +260,36 @@ const deployedContracts = { name: "tokenId", type: "uint256", }, + { + indexed: false, + internalType: "string", + name: "title", + type: "string", + }, { indexed: false, internalType: "uint256", - name: "expirationTime", + name: "issueDate", type: "uint256", }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "expiryDate", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "usageScope", + type: "string", + }, ], name: "TokenMinted", type: "event", @@ -373,6 +418,52 @@ const deployedContracts = { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "listVouchers", + outputs: [ + { + components: [ + { + internalType: "string", + name: "title", + type: "string", + }, + { + internalType: "uint256", + name: "issueDate", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiryDate", + type: "uint256", + }, + { + internalType: "string", + name: "usageScope", + type: "string", + }, + ], + internalType: "struct ExpirableERC721.Voucher[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -386,9 +477,29 @@ const deployedContracts = { type: "uint256", }, { - internalType: "uint256[]", - name: "expirationTimes", - type: "uint256[]", + internalType: "string", + name: "title", + type: "string", + }, + { + internalType: "uint256", + name: "issueDate", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiryDate", + type: "uint256", + }, + { + internalType: "string", + name: "usageScope", + type: "string", }, ], name: "mintBatch", @@ -549,6 +660,25 @@ const deployedContracts = { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "tokenByIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -568,6 +698,30 @@ const deployedContracts = { stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "index", + type: "uint256", + }, + ], + name: "tokenOfOwnerByIndex", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -587,6 +741,19 @@ const deployedContracts = { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -625,18 +792,35 @@ const deployedContracts = { }, ], inheritedFunctions: { - approve: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - balanceOf: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - getApproved: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - isApprovedForAll: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - name: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - ownerOf: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - safeTransferFrom: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - setApprovalForAll: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - supportsInterface: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - symbol: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - tokenURI: "@openzeppelin/contracts/token/ERC721/ERC721.sol", - transferFrom: "@openzeppelin/contracts/token/ERC721/ERC721.sol", + approve: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + balanceOf: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + getApproved: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + isApprovedForAll: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + name: "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + ownerOf: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + safeTransferFrom: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + setApprovalForAll: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + supportsInterface: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + symbol: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + tokenByIndex: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + tokenOfOwnerByIndex: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + tokenURI: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + totalSupply: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", + transferFrom: + "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol", owner: "@openzeppelin/contracts/access/Ownable.sol", renounceOwnership: "@openzeppelin/contracts/access/Ownable.sol", transferOwnership: "@openzeppelin/contracts/access/Ownable.sol",