diff --git a/packages/foundry/script/Deploy.s.sol b/packages/foundry/script/Deploy.s.sol index d7423f1..1ac426e 100644 --- a/packages/foundry/script/Deploy.s.sol +++ b/packages/foundry/script/Deploy.s.sol @@ -16,9 +16,8 @@ contract DeployScript is ScaffoldETHDeploy { DeployDemoScript deployer = new DeployDemoScript(); deployer.run(); - DeployFactoryScript factoryDeployer = new DeployFactoryScript(); - - factoryDeployer.run(); + // DeployFactoryScript factoryDeployer = new DeployFactoryScript(); + // factoryDeployer.run(); exportDeployments(); } diff --git a/packages/nextjs/app/collections/[network]/[address]/page.tsx b/packages/nextjs/app/collections/[network]/[address]/page.tsx index 619a51f..71b5489 100644 --- a/packages/nextjs/app/collections/[network]/[address]/page.tsx +++ b/packages/nextjs/app/collections/[network]/[address]/page.tsx @@ -1,58 +1,58 @@ -"use client"; - -import React from "react"; -//, { useEffect } -import { useState } from "react"; -import { useAccount } from "wagmi"; -// import "react-dropdown/style.css"; -import { Collection } from "~~/components/scaffold-nft/collection/Collection"; -// import useAdvancedFiltering from "~~/hooks/scaffold-nft/useAdvancedFiltering"; -// import useCheckboxes from "~~/hooks/scaffold-nft/useCheckboxes"; -// import useTokenIds from "~~/hooks/scaffold-nft/useTokenIds"; -import { useTokens } from "~~/hooks/scaffold-nft/useTokens"; - -// import { renderInputOptions } from "~~/scaffold-nft-config"; - -export default function CollectionPage({ params }: { params: { network: string; address: string } }) { - // const { inputComponents, componentsToRender } = useCheckboxes(renderInputOptions); - - const userAccount = useAccount(); - - // const { tokenIds, setTokenIds } = useTokenIds(2); - // async function onSubmit(newIds: bigint[]) { - // setTokenIds([...newIds]); - // } - - // const tokenIds = [BigInt(0), BigInt(1)]; - - const [tokenIds] = useState([BigInt(0), BigInt(1)]); - - // const { - // chosenOption, - // // chosenOption2, - // output: advancedOutput, - // } = useAdvancedFiltering(inputComponents, onSubmit); - - const { collection, isLoading, isError } = useTokens( - params["network"], - params["address"], - userAccount.address, - tokenIds, - "nftstorage", - //chosenOption2, - ); - - console.log(collection); - - return ( -
- {/* {advancedOutput} */} - -
- ); -} +// "use client"; + +// import React from "react"; +// //, { useEffect } +// import { useState } from "react"; +// import { useAccount } from "wagmi"; +// // import "react-dropdown/style.css"; +// import { Collection } from "~~/components/scaffold-nft/collection/Collection"; +// // import useAdvancedFiltering from "~~/hooks/scaffold-nft/useAdvancedFiltering"; +// // import useCheckboxes from "~~/hooks/scaffold-nft/useCheckboxes"; +// // import useTokenIds from "~~/hooks/scaffold-nft/useTokenIds"; +// import { useTokens } from "~~/hooks/scaffold-nft/useTokens"; + +// // import { renderInputOptions } from "~~/scaffold-nft-config"; + +// export default function CollectionPage({ params }: { params: { network: string; address: string } }) { +// // const { inputComponents, componentsToRender } = useCheckboxes(renderInputOptions); + +// const userAccount = useAccount(); + +// // const { tokenIds, setTokenIds } = useTokenIds(2); +// // async function onSubmit(newIds: bigint[]) { +// // setTokenIds([...newIds]); +// // } + +// // const tokenIds = [BigInt(0), BigInt(1)]; + +// const [tokenIds] = useState([BigInt(0), BigInt(1)]); + +// // const { +// // chosenOption, +// // // chosenOption2, +// // output: advancedOutput, +// // } = useAdvancedFiltering(inputComponents, onSubmit); + +// const { collection, isLoading, isError } = useTokens( +// params["network"], +// params["address"], +// userAccount.address, +// tokenIds, +// "nftstorage", +// //chosenOption2, +// ); + +// console.log(collection); + +// return ( +//
+// {/* {advancedOutput} */} +// +//
+// ); +// } diff --git a/packages/nextjs/app/factory/_components/Factory.tsx b/packages/nextjs/app/factory/_components/Factory.tsx index 29804c3..0d419ed 100644 --- a/packages/nextjs/app/factory/_components/Factory.tsx +++ b/packages/nextjs/app/factory/_components/Factory.tsx @@ -1,217 +1,217 @@ -"use client"; - -import { useState } from "react"; -import { abi as factoryAbi } from "../factoryAbi"; -import { abi as repAbi } from "../repAbi"; -import { UpdateTokenCard } from "./UpdateTokenCard"; -import { decodeEventLog } from "viem"; -import { useAccount, usePublicClient } from "wagmi"; -import { useWalletClient } from "wagmi"; -import { useScaffoldWriteContract } from "~~/hooks/scaffold-eth"; - -export function Factory() { - const account = useAccount(); - - // const { data: factoryContract } = useScaffoldContract({ contractName: "ReputationTokensFactory" }); - - const { writeContractAsync: writeFactoryAsync } = useScaffoldWriteContract("ReputationTokensFactory"); - - // const blockNum = useBlockNumber(); - // const initialBlock = useBlock(); - - const publicClient = usePublicClient(); - const { data: walletClient } = useWalletClient(); - - // const [block, setBlock] = useState(initialBlock); - - // useWatchContractEvent({ - // address: factoryContract?.address, - // abi: factoryContract?.abi, - // eventName: "CreatedNewInstance", - // onLogs: logs => { - // logs.map(log => { - // console.log("mapped"); - // console.log(log); - // // const { instance } = log.args; - // // console.log("📡 Factory create", instance); - // }); - // }, - // }); - - // const { - // data: events, - // isLoading: isLoadingEvents, - // error: errorReadingEvents, - // } = useScaffoldEventHistory({ - // contractName: "ReputationTokensFactory", - // eventName: "CreatedNewInstance", - // fromBlock: block?.number || BigInt(0), - // watch: true, - // blockData: true, - // transactionData: true, - // receiptData: true, - // }); - - // console.log(events); - - // const [deployedInstance, setDeployedInstance] = useState(); - - const [deployedInstance, setDeployedInstance] = useState(); - - // let deployedInstance; - // events?.map(event => { - // const { instance } = event.args; - // deployedInstance = instance; - // // setDeployedInstance(instance); - // }); - - // useScaffoldWatchContractEvent({ - // contractName: "ReputationTokensFactory", - // eventName: "CreatedNewInstance", - // watch: true, - // // The onLogs function is called whenever a GreetingChange event is emitted by the contract. - // // Parameters emitted by the event can be destructed using the below example - // // for this example: event GreetingChange(address greetingSetter, string newGreeting, bool premium, uint256 value); - // onLogs: logs => { - // logs.map(log => { - // const { instance } = log.args; - // console.log("📡 Factory create", instance); - // }); - // }, - // }); - - const [newTokens, setNewTokens] = useState([{ tokenType: 0, uri: "" }]); - - console.log(newTokens); - - async function onTypeChanged(index: number, res: any) { - const tokens = newTokens; - tokens[index].tokenType = res.value; - setNewTokens([...tokens]); - } - - async function onUriChanged(index: number, uri: any) { - const tokens = newTokens; - tokens[index].uri = uri.target.value; - setNewTokens([...tokens]); - } - - const updateCards = newTokens.map((token, index) => { - return ; - }); - - // console.log(tokens); - return ( - <> -
-
-
-
{updateCards}
- {/* */} - - - - -
-
- -

Reputation Tokens deployed at: {deployedInstance}

-
- - ); -} +// "use client"; + +// import { useState } from "react"; +// import { abi as factoryAbi } from "../factoryAbi"; +// import { abi as repAbi } from "../repAbi"; +// import { UpdateTokenCard } from "./UpdateTokenCard"; +// import { decodeEventLog } from "viem"; +// import { useAccount, usePublicClient } from "wagmi"; +// import { useWalletClient } from "wagmi"; +// import { useScaffoldWriteContract } from "~~/hooks/scaffold-eth"; + +// export function Factory() { +// const account = useAccount(); + +// // const { data: factoryContract } = useScaffoldContract({ contractName: "ReputationTokensFactory" }); + +// const { writeContractAsync: writeFactoryAsync } = useScaffoldWriteContract("ReputationTokensFactory"); + +// // const blockNum = useBlockNumber(); +// // const initialBlock = useBlock(); + +// const publicClient = usePublicClient(); +// const { data: walletClient } = useWalletClient(); + +// // const [block, setBlock] = useState(initialBlock); + +// // useWatchContractEvent({ +// // address: factoryContract?.address, +// // abi: factoryContract?.abi, +// // eventName: "CreatedNewInstance", +// // onLogs: logs => { +// // logs.map(log => { +// // console.log("mapped"); +// // console.log(log); +// // // const { instance } = log.args; +// // // console.log("📡 Factory create", instance); +// // }); +// // }, +// // }); + +// // const { +// // data: events, +// // isLoading: isLoadingEvents, +// // error: errorReadingEvents, +// // } = useScaffoldEventHistory({ +// // contractName: "ReputationTokensFactory", +// // eventName: "CreatedNewInstance", +// // fromBlock: block?.number || BigInt(0), +// // watch: true, +// // blockData: true, +// // transactionData: true, +// // receiptData: true, +// // }); + +// // console.log(events); + +// // const [deployedInstance, setDeployedInstance] = useState(); + +// const [deployedInstance, setDeployedInstance] = useState(); + +// // let deployedInstance; +// // events?.map(event => { +// // const { instance } = event.args; +// // deployedInstance = instance; +// // // setDeployedInstance(instance); +// // }); + +// // useScaffoldWatchContractEvent({ +// // contractName: "ReputationTokensFactory", +// // eventName: "CreatedNewInstance", +// // watch: true, +// // // The onLogs function is called whenever a GreetingChange event is emitted by the contract. +// // // Parameters emitted by the event can be destructed using the below example +// // // for this example: event GreetingChange(address greetingSetter, string newGreeting, bool premium, uint256 value); +// // onLogs: logs => { +// // logs.map(log => { +// // const { instance } = log.args; +// // console.log("📡 Factory create", instance); +// // }); +// // }, +// // }); + +// const [newTokens, setNewTokens] = useState([{ tokenType: 0, uri: "" }]); + +// console.log(newTokens); + +// async function onTypeChanged(index: number, res: any) { +// const tokens = newTokens; +// tokens[index].tokenType = res.value; +// setNewTokens([...tokens]); +// } + +// async function onUriChanged(index: number, uri: any) { +// const tokens = newTokens; +// tokens[index].uri = uri.target.value; +// setNewTokens([...tokens]); +// } + +// const updateCards = newTokens.map((token, index) => { +// return ; +// }); + +// // console.log(tokens); +// return ( +// <> +//
+//
+//
+//
{updateCards}
+// {/* */} + +// + +// +//
+//
+ +//

Reputation Tokens deployed at: {deployedInstance}

+//
+// +// ); +// } diff --git a/packages/nextjs/app/factory/page.tsx b/packages/nextjs/app/factory/page.tsx index cd69165..ab747a4 100644 --- a/packages/nextjs/app/factory/page.tsx +++ b/packages/nextjs/app/factory/page.tsx @@ -1,18 +1,18 @@ -import { Factory } from "./_components/Factory"; -import type { NextPage } from "next"; -import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; +// import { Factory } from "./_components/Factory"; +// import type { NextPage } from "next"; +// import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; -export const metadata = getMetadata({ - title: "Factory", - description: "Factory", -}); +// export const metadata = getMetadata({ +// title: "Factory", +// description: "Factory", +// }); -const FactoryPage: NextPage = () => { - return ( - <> - - - ); -}; +// const FactoryPage: NextPage = () => { +// return ( +// <> +// +// +// ); +// }; -export default FactoryPage; +// export default FactoryPage; diff --git a/packages/nextjs/components/Header.tsx b/packages/nextjs/components/Header.tsx index 1c96989..e8ab2fc 100644 --- a/packages/nextjs/components/Header.tsx +++ b/packages/nextjs/components/Header.tsx @@ -78,11 +78,11 @@ export const Header = () => { }); useEffect(() => { - if (location?.hostname === "localhost" || location?.hostname === "127.0.0.1") { - setOutput( - , - ); - } + // if (location?.hostname === "localhost" || location?.hostname === "127.0.0.1") { + // setOutput( + // , + // ); + // } // eslint-disable-next-line react-hooks/exhaustive-deps }, [tokens.length]); @@ -100,10 +100,10 @@ export const Header = () => { href: "/hats", }); - linksToAdd.push({ - label: "Factory", - href: "/factory", - }); + // linksToAdd.push({ + // label: "Factory", + // href: "/factory", + // }); linksToAdd.push({ label: "Debug Contracts", @@ -147,7 +147,7 @@ export const Header = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, []); - const [output, setOutput] = useState(); + // const [output, setOutput] = useState(); return (
@@ -188,8 +188,8 @@ export const Header = () => {
- {output} - {/* */} + {/* {output} */} + diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 62216e6..92b8970 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: { ReputationTokens: { - address: "0x7bc06c482dead17c0e297afbc32f6e63d3846650", + address: "0xf4b146fba71f41e0592668ffbf264f1d186b2ca8", abi: [ { type: "constructor", @@ -1410,7 +1410,7 @@ const deployedContracts = { }, }, ReputationFaucet: { - address: "0x922d6956c99e12dfeb3224dea977d0939758a1fe", + address: "0x46b142dd1e924fab83ecc3c08e4d46e82f005e0e", abi: [ { type: "constructor", @@ -1535,7 +1535,7 @@ const deployedContracts = { }, }, Hats: { - address: "0x21df544947ba3e8b3c32561399e88b52dc8b2823", + address: "0x49fd2be640db2910c2fab69bb8531ab6e76127ff", abi: [ { type: "constructor", @@ -3496,7 +3496,7 @@ const deployedContracts = { }, }, MultiClaimsHatter: { - address: "0xdc11f7e700a4c898ae5caddb1082cffa76512add", + address: "0xa4899d35897033b927acfcf422bc745916139776", abi: [ { type: "constructor", @@ -3822,7 +3822,7 @@ const deployedContracts = { }, }, ActiveModule: { - address: "0x36b58f5c1969b7b6591d752ea6f5486d069010ab", + address: "0xaa292e8611adf267e563f334ee42320ac96d0463", abi: [ { type: "function", @@ -3852,7 +3852,7 @@ const deployedContracts = { inheritedFunctions: {}, }, ERC1155EligibiltiyModule: { - address: "0x202cce504e04bed6fc0521238ddf04bc9e8e15ab", + address: "0xe8d2a1e88c91dcd5433208d4152cc4f399a7e91d", abi: [ { type: "constructor", @@ -3902,1805 +3902,6 @@ const deployedContracts = { ], inheritedFunctions: {}, }, - ReputationTokensUpgradeable: { - address: "0xbec49fa140acaa83533fb00a2bb19bddd0290f25", - abi: [ - { - type: "function", - name: "MINTER_ROLE", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "TOKEN_MIGRATOR_ROLE", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "TOKEN_UPDATER_ROLE", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "accountsByToken", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "address[]", - internalType: "address[]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "balanceOf", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "balanceOfBatch", - inputs: [ - { - name: "accounts", - type: "address[]", - internalType: "address[]", - }, - { - name: "ids", - type: "uint256[]", - internalType: "uint256[]", - }, - ], - outputs: [ - { - name: "", - type: "uint256[]", - internalType: "uint256[]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "burnedBalanceOf", - inputs: [ - { - name: "addr", - type: "address", - internalType: "address", - }, - { - name: "tokenId", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "burnedBalance", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "distributableBalanceOf", - inputs: [ - { - name: "addr", - type: "address", - internalType: "address", - }, - { - name: "tokenId", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "distributableBalance", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "distribute", - inputs: [ - { - name: "from", - type: "address", - internalType: "address", - }, - { - name: "to", - type: "address", - internalType: "address", - }, - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - { - name: "value", - type: "uint256", - internalType: "uint256", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "distributeBatch", - inputs: [ - { - name: "from", - type: "address", - internalType: "address", - }, - { - name: "to", - type: "address", - internalType: "address", - }, - { - name: "ids", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "values", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "getRoleAdmin", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getRoleMember", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "index", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getRoleMemberCount", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getTokenType", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "uint8", - internalType: "enum IReputationTokensTypes.TokenType", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "grantRole", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "hasRole", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "honestBalanceOf", - inputs: [ - { - name: "addr", - type: "address", - internalType: "address", - }, - { - name: "tokenId", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "transferrableBalance", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "initialize", - inputs: [ - { - name: "newOwner", - type: "address", - internalType: "address", - }, - { - name: "admins", - type: "address[]", - internalType: "address[]", - }, - { - name: "tokenUpdaters", - type: "address[]", - internalType: "address[]", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "isApprovedForAll", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - { - name: "operator", - type: "address", - internalType: "address", - }, - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "migrate", - inputs: [ - { - name: "from", - type: "address", - internalType: "address", - }, - { - name: "to", - type: "address", - internalType: "address", - }, - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - { - name: "value", - type: "uint256", - internalType: "uint256", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "migrateBatch", - inputs: [ - { - name: "from", - type: "address", - internalType: "address", - }, - { - name: "to", - type: "address", - internalType: "address", - }, - { - name: "ids", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "values", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "mint", - inputs: [ - { - name: "to", - type: "address", - internalType: "address", - }, - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - { - name: "value", - type: "uint256", - internalType: "uint256", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "mintBatch", - inputs: [ - { - name: "to", - type: "address", - internalType: "address", - }, - { - name: "ids", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "values", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "renounceRole", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "revokeRole", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "safeBatchTransferFrom", - inputs: [ - { - name: "from", - type: "address", - internalType: "address", - }, - { - name: "to", - type: "address", - internalType: "address", - }, - { - name: "ids", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "values", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "safeTransferFrom", - inputs: [ - { - name: "from", - type: "address", - internalType: "address", - }, - { - name: "to", - type: "address", - internalType: "address", - }, - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - { - name: "value", - type: "uint256", - internalType: "uint256", - }, - { - name: "data", - type: "bytes", - internalType: "bytes", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setApprovalForAll", - inputs: [ - { - name: "operator", - type: "address", - internalType: "address", - }, - { - name: "status", - type: "bool", - internalType: "bool", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "supportsInterface", - inputs: [ - { - name: "interfaceId", - type: "bytes4", - internalType: "bytes4", - }, - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "tokensByAccount", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [ - { - name: "", - type: "uint256[]", - internalType: "uint256[]", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "totalHolders", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "totalSupply", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "transferOwnership", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "updateToken", - inputs: [ - { - name: "id", - type: "uint256", - internalType: "uint256", - }, - { - name: "tokenType", - type: "uint8", - internalType: "enum IReputationTokensTypes.TokenType", - }, - { - name: "uri", - type: "string", - internalType: "string", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "updateTokenBatch", - inputs: [ - { - name: "ids", - type: "uint256[]", - internalType: "uint256[]", - }, - { - name: "tokenTypes", - type: "uint8[]", - internalType: "enum IReputationTokensTypes.TokenType[]", - }, - { - name: "uris", - type: "string[]", - internalType: "string[]", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "uri", - inputs: [ - { - name: "tokenId", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "string", - internalType: "string", - }, - ], - stateMutability: "view", - }, - { - type: "event", - name: "ApprovalForAll", - inputs: [ - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "operator", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "approved", - type: "bool", - indexed: false, - internalType: "bool", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "Create", - inputs: [ - { - name: "tokenId", - type: "uint256", - indexed: true, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "Distribute", - inputs: [ - { - name: "from", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "tokenId", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - { - name: "value", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "DistributeBatch", - inputs: [ - { - name: "from", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "tokenId", - type: "uint256[]", - indexed: false, - internalType: "uint256[]", - }, - { - name: "value", - type: "uint256[]", - indexed: false, - internalType: "uint256[]", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "Initialized", - inputs: [ - { - name: "version", - type: "uint8", - indexed: false, - internalType: "uint8", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "Migrate", - inputs: [ - { - name: "from", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "id", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - { - name: "value", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "MigrateBatch", - inputs: [ - { - name: "from", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "ids", - type: "uint256[]", - indexed: false, - internalType: "uint256[]", - }, - { - name: "values", - type: "uint256[]", - indexed: false, - internalType: "uint256[]", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "Mint", - inputs: [ - { - name: "from", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "tokenId", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - { - name: "value", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "MintBatch", - inputs: [ - { - name: "from", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "tokenIds", - type: "uint256[]", - indexed: false, - internalType: "uint256[]", - }, - { - name: "values", - type: "uint256[]", - indexed: false, - internalType: "uint256[]", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "RoleAdminChanged", - inputs: [ - { - name: "role", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - { - name: "previousAdminRole", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - { - name: "newAdminRole", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "RoleGranted", - inputs: [ - { - name: "role", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sender", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "RoleRevoked", - inputs: [ - { - name: "role", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sender", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "TransferBatch", - inputs: [ - { - name: "operator", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "from", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "ids", - type: "uint256[]", - indexed: false, - internalType: "uint256[]", - }, - { - name: "values", - type: "uint256[]", - indexed: false, - internalType: "uint256[]", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "TransferSingle", - inputs: [ - { - name: "operator", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "from", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "to", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "id", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - { - name: "value", - type: "uint256", - indexed: false, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "URI", - inputs: [ - { - name: "value", - type: "string", - indexed: false, - internalType: "string", - }, - { - name: "tokenId", - type: "uint256", - indexed: true, - internalType: "uint256", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "Update", - inputs: [ - { - name: "tokenId", - type: "uint256", - indexed: true, - internalType: "uint256", - }, - { - name: "tokenType", - type: "uint8", - indexed: true, - internalType: "enum IReputationTokensTypes.TokenType", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "UpdateBatch", - inputs: [ - { - name: "tokenId", - type: "uint256[]", - indexed: true, - internalType: "uint256[]", - }, - { - name: "tokenType", - type: "uint8[]", - indexed: true, - internalType: "enum IReputationTokensTypes.TokenType[]", - }, - ], - anonymous: false, - }, - { - type: "error", - name: "ERC1155Base__ArrayLengthMismatch", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__BalanceQueryZeroAddress", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__BurnExceedsBalance", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__BurnFromZeroAddress", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__ERC1155ReceiverNotImplemented", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__ERC1155ReceiverRejected", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__MintToZeroAddress", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__NotOwnerOrApproved", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__SelfApproval", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__TransferExceedsBalance", - inputs: [], - }, - { - type: "error", - name: "ERC1155Base__TransferToZeroAddress", - inputs: [], - }, - { - type: "error", - name: "ERC165Base__InvalidInterfaceId", - inputs: [], - }, - { - type: "error", - name: "EnumerableSet__IndexOutOfBounds", - inputs: [], - }, - { - type: "error", - name: "Initializable__AlreadyInitialized", - inputs: [], - }, - { - type: "error", - name: "Ownable__NotOwner", - inputs: [], - }, - { - type: "error", - name: "Ownable__NotTransitiveOwner", - inputs: [], - }, - { - type: "error", - name: "ReputationTokens__CannotTransferSoulboundToken", - inputs: [], - }, - { - type: "error", - name: "ReputationTokens__InsufficientBalance", - inputs: [], - }, - { - type: "error", - name: "UintUtils__InsufficientPadding", - inputs: [], - }, - { - type: "error", - name: "UintUtils__InvalidBase", - inputs: [], - }, - ], - inheritedFunctions: { - owner: "lib/reputation/lib/solidstate-solidity/contracts/access/ownable/Ownable.sol", - transferOwnership: "lib/reputation/lib/solidstate-solidity/contracts/access/ownable/Ownable.sol", - MINTER_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", - TOKEN_MIGRATOR_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", - TOKEN_UPDATER_ROLE: "lib/reputation/contracts/ReputationTokensBase.sol", - accountsByToken: "lib/reputation/contracts/ReputationTokensBase.sol", - balanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", - balanceOfBatch: "lib/reputation/contracts/ReputationTokensBase.sol", - burnedBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", - distributableBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", - distribute: "lib/reputation/contracts/ReputationTokensBase.sol", - distributeBatch: "lib/reputation/contracts/ReputationTokensBase.sol", - getRoleAdmin: "lib/reputation/contracts/ReputationTokensBase.sol", - getRoleMember: "lib/reputation/contracts/ReputationTokensBase.sol", - getRoleMemberCount: "lib/reputation/contracts/ReputationTokensBase.sol", - getTokenType: "lib/reputation/contracts/ReputationTokensBase.sol", - grantRole: "lib/reputation/contracts/ReputationTokensBase.sol", - hasRole: "lib/reputation/contracts/ReputationTokensBase.sol", - honestBalanceOf: "lib/reputation/contracts/ReputationTokensBase.sol", - isApprovedForAll: "lib/reputation/contracts/ReputationTokensBase.sol", - migrate: "lib/reputation/contracts/ReputationTokensBase.sol", - migrateBatch: "lib/reputation/contracts/ReputationTokensBase.sol", - mint: "lib/reputation/contracts/ReputationTokensBase.sol", - mintBatch: "lib/reputation/contracts/ReputationTokensBase.sol", - renounceRole: "lib/reputation/contracts/ReputationTokensBase.sol", - revokeRole: "lib/reputation/contracts/ReputationTokensBase.sol", - safeBatchTransferFrom: "lib/reputation/contracts/ReputationTokensBase.sol", - safeTransferFrom: "lib/reputation/contracts/ReputationTokensBase.sol", - setApprovalForAll: "lib/reputation/contracts/ReputationTokensBase.sol", - supportsInterface: "lib/reputation/contracts/ReputationTokensBase.sol", - tokensByAccount: "lib/reputation/contracts/ReputationTokensBase.sol", - totalHolders: "lib/reputation/contracts/ReputationTokensBase.sol", - totalSupply: "lib/reputation/contracts/ReputationTokensBase.sol", - updateToken: "lib/reputation/contracts/ReputationTokensBase.sol", - updateTokenBatch: "lib/reputation/contracts/ReputationTokensBase.sol", - uri: "lib/reputation/contracts/ReputationTokensBase.sol", - }, - }, - ReputationTokensFactory: { - address: "0xd84379ceae14aa33c123af12424a37803f885889", - abi: [ - { - type: "constructor", - inputs: [ - { - name: "_admins", - type: "address[]", - internalType: "address[]", - }, - { - name: "implementation", - type: "address", - internalType: "address", - }, - { - name: "op", - type: "address", - internalType: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "DEFAULT_ADMIN_ROLE", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "DEPLOYER_ROLE", - inputs: [], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "contractInstanceCount", - inputs: [], - outputs: [ - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "createNewInstance", - inputs: [ - { - name: "owner", - type: "address", - internalType: "address", - }, - { - name: "admins", - type: "address[]", - internalType: "address[]", - }, - { - name: "tokenUpdaters", - type: "address[]", - internalType: "address[]", - }, - ], - outputs: [ - { - name: "instanceAddress", - type: "address", - internalType: "address", - }, - ], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "getRoleAdmin", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - ], - outputs: [ - { - name: "", - type: "bytes32", - internalType: "bytes32", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "grantRole", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "hasRole", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "instances", - inputs: [ - { - name: "", - type: "uint256", - internalType: "uint256", - }, - ], - outputs: [ - { - name: "", - type: "address", - internalType: "contract ReputationTokensUpgradeable", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "renounceRole", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "callerConfirmation", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "revokeRole", - inputs: [ - { - name: "role", - type: "bytes32", - internalType: "bytes32", - }, - { - name: "account", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "s_implementation", - inputs: [], - outputs: [ - { - name: "", - type: "address", - internalType: "address", - }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "setImplementation", - inputs: [ - { - name: "implementation", - type: "address", - internalType: "address", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "supportsInterface", - inputs: [ - { - name: "interfaceId", - type: "bytes4", - internalType: "bytes4", - }, - ], - outputs: [ - { - name: "", - type: "bool", - internalType: "bool", - }, - ], - stateMutability: "view", - }, - { - type: "event", - name: "CreatedNewInstance", - inputs: [ - { - name: "creator", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "instance", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "RoleAdminChanged", - inputs: [ - { - name: "role", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - { - name: "previousAdminRole", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - { - name: "newAdminRole", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "RoleGranted", - inputs: [ - { - name: "role", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sender", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "event", - name: "RoleRevoked", - inputs: [ - { - name: "role", - type: "bytes32", - indexed: true, - internalType: "bytes32", - }, - { - name: "account", - type: "address", - indexed: true, - internalType: "address", - }, - { - name: "sender", - type: "address", - indexed: true, - internalType: "address", - }, - ], - anonymous: false, - }, - { - type: "error", - name: "AccessControlBadConfirmation", - inputs: [], - }, - { - type: "error", - name: "AccessControlUnauthorizedAccount", - inputs: [ - { - name: "account", - type: "address", - internalType: "address", - }, - { - name: "neededRole", - type: "bytes32", - internalType: "bytes32", - }, - ], - }, - { - type: "error", - name: "ERC1167FailedCreateClone", - inputs: [], - }, - ], - inheritedFunctions: {}, - }, }, } as const;