diff --git a/packages/hardhat/.prettierrc.json b/packages/hardhat/.prettierrc.json index 8b9b8b7..832d40c 100644 --- a/packages/hardhat/.prettierrc.json +++ b/packages/hardhat/.prettierrc.json @@ -7,9 +7,9 @@ { "files": "*.sol", "options": { - "printWidth": 80, + "printWidth": 120, "tabWidth": 4, - "useTabs": true, + "useTabs": false, "singleQuote": false, "bracketSpacing": true, "explicitTypes": "always" diff --git a/packages/hardhat/contracts/FrogCryptoSqueeze.sol b/packages/hardhat/contracts/FrogCryptoSqueeze.sol new file mode 100644 index 0000000..67a335b --- /dev/null +++ b/packages/hardhat/contracts/FrogCryptoSqueeze.sol @@ -0,0 +1,161 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "./Poseidon.sol"; +import "./Groth16Verifier.sol"; + +abstract contract PotionTokenContract { + function mint(address to, uint256 amount) public virtual; +} + +contract FrogCryptoSqueeze is Groth16Verifier, Poseidon { + // The known hash of the FrogCrypto signer + uint256 constant FROGCRYPTO_SIGNER_HASH = + 320469162396708332516033932244029190181315114284264408621970394677041964715; + + // Mapping from frogId to squeeze timestamp + mapping(uint256 => uint256) public squeezeTimestamps; + + PotionTokenContract public rarityTokenContract; + PotionTokenContract public temperamentTokenContract; + PotionTokenContract public jumpTokenContract; + PotionTokenContract public speedTokenContract; + PotionTokenContract public intelligenceTokenContract; + PotionTokenContract public beautyTokenContract; + + struct ProofArgs { + uint256[2] _pA; + uint256[2][2] _pB; + uint256[2] _pC; + uint256[56] _pubSignals; + } + + struct FrogAttributes { + // uint256 id; + uint256 beauty; + uint256 biome; + uint256 intelligence; + uint256 jump; + uint256 speed; + uint256 rarity; + uint256 owner; + } + + event Squeeze( + uint256 indexed frogId, + address indexed owner, + uint256 rarityReward, + uint256 temperamentReward, + uint256 jummpReward, + uint256 speedReward, + uint256 intelligenceReward, + uint256 beautyReward + ); + + modifier verifiedProof(ProofArgs calldata proof) { + require(this.verifyProof(proof._pA, proof._pB, proof._pC, proof._pubSignals), "Invalid proof"); + _; + } + + constructor( + address rarityTokenAddress, + address temperamentTokenAddress, + address jumpTokenAddress, + address speedTokenAddress, + address intelligenceTokenAddress, + address beautyTokenAddress + ) { + rarityTokenContract = PotionTokenContract(rarityTokenAddress); + temperamentTokenContract = PotionTokenContract(temperamentTokenAddress); + jumpTokenContract = PotionTokenContract(jumpTokenAddress); + speedTokenContract = PotionTokenContract(speedTokenAddress); + intelligenceTokenContract = PotionTokenContract(intelligenceTokenAddress); + beautyTokenContract = PotionTokenContract(beautyTokenAddress); + } + + function squeezeFrog(ProofArgs calldata proof, FrogAttributes calldata attributes, address owner) public { + // First verify the proof and attributes + require(verifyFrogAttributes(proof, attributes), "Invalid frog attributes"); + + // TODO: change cooldown period and owner to frogId + require( + squeezeTimestamps[attributes.owner] + 1 minutes < block.timestamp, + "Squeeze: Cooldown period is not over yet" + ); + + // TODO: change owner to frogId + squeezeTimestamps[attributes.owner] = block.timestamp; + + // TODO: change owner to frogId + bytes32 predictableRandom = keccak256( + abi.encodePacked(attributes.owner, blockhash(block.number - 1), msg.sender, address(this)) + ); + + uint256 rarityAmount = ((uint256(uint8(predictableRandom[0])) % 10) + 1) * (attributes.rarity + 1); + // uint256 temperamentAmount = ((uint256(uint8(predictableRandom[1])) % 10) + 1) * (attributes.temperament + 1); + uint256 jumpAmount = ((uint256(uint8(predictableRandom[2])) % 10) + 1) * (attributes.jump + 1); + uint256 speedAmount = ((uint256(uint8(predictableRandom[3])) % 10) + 1) * (attributes.speed + 1); + uint256 intelligenceAmount = ((uint256(uint8(predictableRandom[4])) % 10) + 1) * (attributes.intelligence + 1); + uint256 beautyAmount = ((uint256(uint8(predictableRandom[5])) % 10) + 1) * (attributes.beauty + 1); + + rarityTokenContract.mint(owner, rarityAmount); + // temperamentTokenContract.mint(owner, temperamentAmount); + jumpTokenContract.mint(owner, jumpAmount); + speedTokenContract.mint(owner, speedAmount); + intelligenceTokenContract.mint(owner, intelligenceAmount); + beautyTokenContract.mint(owner, beautyAmount); + + // TODO: change owner to frogId + emit Squeeze( + attributes.owner, + owner, + rarityAmount, + 0, + jumpAmount, + speedAmount, + intelligenceAmount, + beautyAmount + ); + } + + function verifyFrogAttributes(ProofArgs calldata proof, FrogAttributes calldata attrs) public view returns (bool) { + uint256[56] memory pubSignals = proof._pubSignals; + + // Verify FrogCrypto signer + require(pubSignals[23] == FROGCRYPTO_SIGNER_HASH, "Invalid signer"); + + uint256[1] memory input; + + // Verify beauty + input[0] = attrs.beauty; + require(this.hash(input) == pubSignals[0], "Invalid beauty value"); + + // Verify biome + input[0] = attrs.biome; + require(this.hash(input) == pubSignals[1], "Invalid biome value"); + + // Verify intelligence + input[0] = attrs.intelligence; + require(this.hash(input) == pubSignals[3], "Invalid intelligence value"); + + // Verify jump + input[0] = attrs.jump; + require(this.hash(input) == pubSignals[4], "Invalid jump value"); + + // Verify owner + input[0] = attrs.owner; + require(this.hash(input) == pubSignals[6], "Invalid owner value"); + + // Verify rarity + input[0] = attrs.rarity; + require(this.hash(input) == pubSignals[7], "Invalid rarity value"); + + // Verify speed + input[0] = attrs.speed; + require(this.hash(input) == pubSignals[8], "Invalid speed value"); + + // TODO: Verify frogId + + return true; + } +} diff --git a/packages/hardhat/contracts/PotionToken.sol b/packages/hardhat/contracts/PotionToken.sol new file mode 100644 index 0000000..0cd0a54 --- /dev/null +++ b/packages/hardhat/contracts/PotionToken.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0 <0.9.0; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/access/AccessControl.sol"; + +/** + * ERC20 potion token contract + */ +contract PotionToken is ERC20, AccessControl { + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + + constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) { + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + } + + function decimals() public pure override returns (uint8) { + return 0; + } + + function transferOwnership(address newOwner) public onlyRole(DEFAULT_ADMIN_ROLE) { + require(!hasRole(DEFAULT_ADMIN_ROLE, newOwner), "Ownable: new owner already have admin role"); + + grantRole(DEFAULT_ADMIN_ROLE, newOwner); + renounceRole(DEFAULT_ADMIN_ROLE, msg.sender); + } + + function grantMinterRole(address account) public onlyRole(DEFAULT_ADMIN_ROLE) { + grantRole(MINTER_ROLE, account); + } + + function revokeMinterRole(address account) public onlyRole(DEFAULT_ADMIN_ROLE) { + revokeRole(MINTER_ROLE, account); + } + + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) { + _mint(to, amount); + } +} diff --git a/packages/hardhat/contracts/YourContract.sol b/packages/hardhat/contracts/YourContract.sol deleted file mode 100644 index a9933a5..0000000 --- a/packages/hardhat/contracts/YourContract.sol +++ /dev/null @@ -1,137 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; - -import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; -import "./Poseidon.sol"; -import "./Groth16Verifier.sol"; -import "hardhat/console.sol"; - -contract YourContract is ERC721, Groth16Verifier, Poseidon { - // The known hash of the FrogCrypto signer - uint256 constant FROGCRYPTO_SIGNER_HASH = - 320469162396708332516033932244029190181315114284264408621970394677041964715; - - uint256 private _nextTokenId; - // Mapping from address to whether they've minted - mapping(address => bool) public minted; - // Mapping from token ID to owner address - mapping(uint256 => address) public frogOwners; - - struct ProofArgs { - uint256[2] _pA; - uint256[2][2] _pB; - uint256[2] _pC; - uint256[56] _pubSignals; - } - - struct FrogAttributes { - uint256 beauty; - uint256 biome; - uint256 intelligence; - uint256 jump; - uint256 speed; - uint256 rarity; - uint256 owner; - } - - event FrogMinted(uint256 tokenId, address owner, FrogAttributes attributes); - - modifier verifiedProof(ProofArgs calldata proof) { - require( - this.verifyProof( - proof._pA, - proof._pB, - proof._pC, - proof._pubSignals - ), - "Invalid proof" - ); - _; - } - - modifier notMinted() { - require(!minted[msg.sender], "Already minted"); - _; - } - - constructor() ERC721("FrogCrypto", "FROG") {} - - function mintFrog( - ProofArgs calldata proof, - FrogAttributes calldata attributes - ) public notMinted returns (uint256) { - // First verify the proof and attributes - require( - verifyFrogAttributes(proof, attributes), - "Invalid frog attributes" - ); - - // Mint the NFT - uint256 tokenId = _nextTokenId++; - minted[msg.sender] = true; - frogOwners[tokenId] = msg.sender; - _safeMint(msg.sender, tokenId); - - emit FrogMinted(tokenId, msg.sender, attributes); - - return tokenId; - } - - function verifyFrogAttributes( - ProofArgs calldata proof, - FrogAttributes calldata attrs - ) public view returns (bool) { - uint256[56] memory pubSignals = proof._pubSignals; - - // Verify FrogCrypto signer - require(pubSignals[23] == FROGCRYPTO_SIGNER_HASH, "Invalid signer"); - - uint256[1] memory input; - - // Verify beauty - input[0] = attrs.beauty; - require(this.hash(input) == pubSignals[0], "Invalid beauty value"); - - // Verify biome - input[0] = attrs.biome; - require(this.hash(input) == pubSignals[1], "Invalid biome value"); - - // Verify intelligence - input[0] = attrs.intelligence; - require( - this.hash(input) == pubSignals[3], - "Invalid intelligence value" - ); - - // Verify jump - input[0] = attrs.jump; - require(this.hash(input) == pubSignals[4], "Invalid jump value"); - - // Verify owner - input[0] = attrs.owner; - require(this.hash(input) == pubSignals[6], "Invalid owner value"); - - // Verify rarity - input[0] = attrs.rarity; - require(this.hash(input) == pubSignals[7], "Invalid rarity value"); - - // Verify speed - input[0] = attrs.speed; - require(this.hash(input) == pubSignals[8], "Invalid speed value"); - - return true; - } - - function tokenURI( - uint256 _tokenId - ) public view override returns (string memory) { - require(_exists(_tokenId), "Token does not exist"); - // customize this to return your frog metadata - return "https://bg/frog-metadata/"; - } - - function getFrogOwner(uint256 tokenId) public view returns (address) { - require(_exists(tokenId), "Token does not exist"); - return frogOwners[tokenId]; - } -} diff --git a/packages/hardhat/deploy/00_deploy_your_contract.ts b/packages/hardhat/deploy/00_deploy_your_contract.ts index 68dfcab..7fcb295 100644 --- a/packages/hardhat/deploy/00_deploy_your_contract.ts +++ b/packages/hardhat/deploy/00_deploy_your_contract.ts @@ -1,5 +1,6 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; +import { Contract } from "ethers"; /** * Deploys a contract named "YourContract" using the deployer account and @@ -27,13 +28,89 @@ const deployYourContract: DeployFunction = async function (hre: HardhatRuntimeEn autoMine: true, }); - await deploy("YourContract", { + // TODO: move to scaffold.config + const tokens = [ + { + attribute: "Rarity", + name: "Mystic Relic", + symbol: "🔮", + }, + { + attribute: "Temperament", + name: "Emberstone", + symbol: "🔥", + }, + { + attribute: "Jump", + name: "Skybound Crest", + symbol: "🌌", + }, + { + attribute: "Speed", + name: "Zephyr Token", + symbol: "🍃", + }, + { + attribute: "Intelligence", + name: "Sage's Sigil", + symbol: "🧠", + }, + { + attribute: "Beauty", + name: "Enchantress' Tear", + symbol: "🌺", + } + ]; + + const tokensContracts = []; + + for (const token of tokens) { + const contractName = `FrogCrypto${token.attribute}Token`; + await deploy(contractName, { + from: deployer, + args: [token.name, token.symbol], + log: true, + autoMine: true, + contract: "PotionToken", + }); + + tokensContracts.push(await hre.ethers.getContract(contractName, deployer)); + + console.log(`💵 ${contractName} deployed`); + } + + const tokensContractsAddresses = []; + + for (const tokenContract of tokensContracts) { + tokensContractsAddresses.push(await tokenContract.getAddress()); + }; + + // :: FrogCryptoSqueeze :: + const frogCryptoContract = await deploy("FrogCryptoSqueeze", { from: deployer, + args: tokensContractsAddresses, log: true, // autoMine: can be passed to the deploy function to make the deployment process faster on local networks by // automatically mining the contract deployment transaction. There is no effect on live networks. autoMine: true, }); + + console.log("🐸 FrogCryptoSqueeze deployed"); + + for (const tokenContract of tokensContracts) { + await tokenContract.grantMinterRole(frogCryptoContract.address); + } + + console.log("🔑 Minter role granted to FrogCryptoSqueeze"); + + const tokensOwner = ""; + if (tokensOwner) { + for (const tokenContract of tokensContracts) { + await tokenContract.transferOwnership(tokensOwner); + } + + console.log("🔑 Tokens ownership transferred to", tokensOwner); + } }; export default deployYourContract; diff --git a/packages/nextjs/app/api/mint/route.ts b/packages/nextjs/app/api/squeeze/route.ts similarity index 92% rename from packages/nextjs/app/api/mint/route.ts rename to packages/nextjs/app/api/squeeze/route.ts index 8acad26..61313d4 100644 --- a/packages/nextjs/app/api/mint/route.ts +++ b/packages/nextjs/app/api/squeeze/route.ts @@ -31,11 +31,11 @@ async function generateFrogStory(frogStats: FrogStats): Promise { Create a short, mystical story (max 4 sentences) about a priest juicing this frog in a magical ritual. Use these attributes in creative ways: Name: ${frogStats.name} -Beauty: ${frogStats.beauty}/10 -Intelligence: ${frogStats.intelligence}/10 -Jump: ${frogStats.jump}/10 -Speed: ${frogStats.speed}/10 -Rarity: ${frogStats.rarity}/10 +Beauty: ${frogStats.beauty}/15 +Intelligence: ${frogStats.intelligence}/15 +Jump: ${frogStats.jump}/15 +Speed: ${frogStats.speed}/15 +Rarity: ${frogStats.rarity}/6 Biome: ${frogStats.biome} Description: ${frogStats.description} @@ -75,7 +75,7 @@ type FrogStats = { description: string; }; -type MintRequestBody = { +type SqueezeRequestBody = { proof: ProofData; frogStats: FrogStats; signature: string; @@ -118,7 +118,7 @@ const convertProofToBigInt = (proof: ProofData) => { export async function POST(req: Request) { try { - const body: MintRequestBody = await req.json(); + const body: SqueezeRequestBody = await req.json(); // Convert string values to BigInt const convertedProof = convertProofToBigInt(body.proof); @@ -138,11 +138,11 @@ export async function POST(req: Request) { console.log("The description values are: ", description); - const { address: contractAddress, abi: contractAbi } = deployedContracts[mainNetwork.id].YourContract; + const { address: contractAddress, abi: contractAbi } = deployedContracts[mainNetwork.id].FrogCryptoSqueeze; const hash = await walletClient.writeContract({ address: contractAddress, abi: contractAbi, - functionName: "mintFrog", + functionName: "squeezeFrog", args: [ { _pA: convertedProof.pi_a as any, @@ -159,6 +159,7 @@ export async function POST(req: Request) { rarity: convertedFrogStats.rarity, owner: convertedFrogStats.owner, }, + body.address, ], }); @@ -170,7 +171,7 @@ export async function POST(req: Request) { return NextResponse.json( { success: true, - message: "NFT minted successfully", + message: "Frog squeezed successfully", txHash: hash, story, }, diff --git a/packages/nextjs/app/zpass/page.tsx b/packages/nextjs/app/zpass/page.tsx index b758efa..a0df033 100644 --- a/packages/nextjs/app/zpass/page.tsx +++ b/packages/nextjs/app/zpass/page.tsx @@ -75,7 +75,7 @@ const ZuAuth = () => { const [z, setZ] = useState(null); const [isLoading, setIsLoading] = useState(false); const [story, setStory] = useState(null); - const [mintedFrogName, setMintedFrogName] = useState(null); + const [squeezedFrogName, setSqueezedFrogName] = useState(null); const { signMessageAsync } = useSignMessage(); @@ -107,11 +107,11 @@ const ZuAuth = () => { } }; - const handleMintNFT = async () => { + const handleSqueeze = async () => { try { if (!z) return notification.error("Please authenticate first"); setIsLoading(true); - setStory(null); // Reset story when starting new mint + setStory(null); // Reset story when starting new squeeze const result = await z.gpc.prove({ request: { @@ -155,13 +155,13 @@ const ZuAuth = () => { const owner = frogStats?.owner.value as any as bigint; const description = frogStats?.description.value as any as string; - notification.info("Minting your Frog NFT..."); + notification.info("Squeezing your Frog..."); const signature = await signMessageAsync({ message: `I own ${frogName}`, }); // Send data to backend - const response = await fetch("/api/mint", { + const response = await fetch("/api/squeeze", { method: "POST", headers: { "Content-Type": "application/json", @@ -199,8 +199,8 @@ const ZuAuth = () => { console.log("The data is", data); setStory(data.story); - setMintedFrogName(frogName as string); - notification.success(`Successfully minted Frog NFT: ${frogName}`); + setSqueezedFrogName(frogName as string); + notification.success(`Successfully squeezed Frog: ${frogName}`); } } catch (e) { const errorMessage = getParsedError(e); @@ -220,16 +220,16 @@ const ZuAuth = () => { )} {z && ( - )} - {story && mintedFrogName && ( + {story && squeezedFrogName && (
-

The Tale of {mintedFrogName}

+

The Tale of {squeezedFrogName}

{story}

diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 182bb4b..36069ae 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -6,36 +6,22 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; const deployedContracts = { 31337: { - Poseidon: { - address: "0x5FbDB2315678afecb367f032d93F642f64180aa3", + FrogCryptoBeautyToken: { + address: "0x0165878A594ca255338adfa4d48449f69242Eb8F", abi: [ { inputs: [ { - internalType: "uint256[1]", - name: "", - type: "uint256[1]", + internalType: "string", + name: "_name", + type: "string", }, - ], - name: "hash", - outputs: [ { - internalType: "uint256", - name: "", - type: "uint256", + internalType: "string", + name: "_symbol", + type: "string", }, ], - stateMutability: "pure", - type: "function", - }, - ], - inheritedFunctions: {}, - }, - YourContract: { - address: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", - abi: [ - { - inputs: [], stateMutability: "nonpayable", type: "constructor", }, @@ -51,13 +37,13 @@ const deployedContracts = { { indexed: true, internalType: "address", - name: "approved", + name: "spender", type: "address", }, { - indexed: true, + indexed: false, internalType: "uint256", - name: "tokenId", + name: "value", type: "uint256", }, ], @@ -69,86 +55,74 @@ const deployedContracts = { inputs: [ { indexed: true, - internalType: "address", - name: "owner", - type: "address", + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", }, { indexed: true, internalType: "address", - name: "operator", + name: "account", type: "address", }, { - indexed: false, - internalType: "bool", - name: "approved", - type: "bool", + indexed: true, + internalType: "address", + name: "sender", + type: "address", }, ], - name: "ApprovalForAll", + name: "RoleGranted", type: "event", }, { anonymous: false, inputs: [ { - indexed: false, - internalType: "uint256", - name: "tokenId", - type: "uint256", + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", }, { - indexed: false, + indexed: true, internalType: "address", - name: "owner", + name: "account", type: "address", }, { - components: [ - { - internalType: "uint256", - name: "beauty", - type: "uint256", - }, - { - internalType: "uint256", - name: "biome", - type: "uint256", - }, - { - internalType: "uint256", - name: "intelligence", - type: "uint256", - }, - { - internalType: "uint256", - name: "jump", - type: "uint256", - }, - { - internalType: "uint256", - name: "speed", - type: "uint256", - }, - { - internalType: "uint256", - name: "rarity", - type: "uint256", - }, - { - internalType: "uint256", - name: "owner", - type: "uint256", - }, - ], - indexed: false, - internalType: "struct YourContract.FrogAttributes", - name: "attributes", - type: "tuple", + indexed: true, + internalType: "address", + name: "sender", + type: "address", }, ], - name: "FrogMinted", + name: "RoleRevoked", type: "event", }, { @@ -167,30 +141,86 @@ const deployedContracts = { type: "address", }, { - indexed: true, + indexed: false, internalType: "uint256", - name: "tokenId", + name: "value", type: "uint256", }, ], name: "Transfer", type: "event", }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINTER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { internalType: "address", - name: "to", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", type: "address", }, { internalType: "uint256", - name: "tokenId", + name: "amount", type: "uint256", }, ], name: "approve", - outputs: [], + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], stateMutability: "nonpayable", type: "function", }, @@ -198,7 +228,7 @@ const deployedContracts = { inputs: [ { internalType: "address", - name: "owner", + name: "account", type: "address", }, ], @@ -213,39 +243,57 @@ const deployedContracts = { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "pure", + type: "function", + }, { inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, { internalType: "uint256", - name: "", + name: "subtractedValue", type: "uint256", }, ], - name: "frogOwners", + name: "decreaseAllowance", outputs: [ { - internalType: "address", + internalType: "bool", name: "", - type: "address", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256", - name: "tokenId", - type: "uint256", + internalType: "bytes32", + name: "role", + type: "bytes32", }, ], - name: "getApproved", + name: "getRoleAdmin", outputs: [ { - internalType: "address", + internalType: "bytes32", name: "", - type: "address", + type: "bytes32", }, ], stateMutability: "view", @@ -254,55 +302,72 @@ const deployedContracts = { { inputs: [ { - internalType: "uint256", - name: "tokenId", - type: "uint256", + internalType: "address", + name: "account", + type: "address", }, ], - name: "getFrogOwner", - outputs: [ + name: "grantMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, { internalType: "address", - name: "", + name: "account", type: "address", }, ], - stateMutability: "view", + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256[1]", - name: "", - type: "uint256[1]", + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", }, ], - name: "hash", + name: "hasRole", outputs: [ { - internalType: "uint256", + internalType: "bool", name: "", - type: "uint256", + type: "bool", }, ], - stateMutability: "pure", + stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", - name: "owner", + name: "spender", type: "address", }, { - internalType: "address", - name: "operator", - type: "address", + internalType: "uint256", + name: "addedValue", + type: "uint256", }, ], - name: "isApprovedForAll", + name: "increaseAllowance", outputs: [ { internalType: "bool", @@ -310,50 +375,2800 @@ const deployedContracts = { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - components: [ - { - internalType: "uint256[2]", - name: "_pA", - type: "uint256[2]", - }, - { - internalType: "uint256[2][2]", - name: "_pB", - type: "uint256[2][2]", - }, - { - internalType: "uint256[2]", - name: "_pC", - type: "uint256[2]", - }, - { - internalType: "uint256[56]", - name: "_pubSignals", - type: "uint256[56]", - }, - ], - internalType: "struct YourContract.ProofArgs", - name: "proof", - type: "tuple", + internalType: "address", + name: "to", + type: "address", }, { - components: [ - { - internalType: "uint256", - name: "beauty", - type: "uint256", - }, - { - internalType: "uint256", - name: "biome", - type: "uint256", - }, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + inheritedFunctions: {}, + }, + FrogCryptoIntelligenceToken: { + address: "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707", + abi: [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINTER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + inheritedFunctions: {}, + }, + FrogCryptoJumpToken: { + address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + abi: [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINTER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + inheritedFunctions: {}, + }, + FrogCryptoRarityToken: { + address: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + abi: [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINTER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + inheritedFunctions: {}, + }, + FrogCryptoSpeedToken: { + address: "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9", + abi: [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINTER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + inheritedFunctions: {}, + }, + FrogCryptoSqueeze: { + address: "0x0B306BF915C4d645ff596e518fAf3F9669b97016", + abi: [ + { + inputs: [ + { + internalType: "address", + name: "rarityTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "temperamentTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "jumpTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "speedTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "intelligenceTokenAddress", + type: "address", + }, + { + internalType: "address", + name: "beautyTokenAddress", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "frogId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rarityReward", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "temperamentReward", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "jummpReward", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "speedReward", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "intelligenceReward", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "beautyReward", + type: "uint256", + }, + ], + name: "Squeeze", + type: "event", + }, + { + inputs: [], + name: "beautyTokenContract", + outputs: [ + { + internalType: "contract PotionTokenContract", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[1]", + name: "", + type: "uint256[1]", + }, + ], + name: "hash", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "intelligenceTokenContract", + outputs: [ + { + internalType: "contract PotionTokenContract", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "jumpTokenContract", + outputs: [ + { + internalType: "contract PotionTokenContract", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "rarityTokenContract", + outputs: [ + { + internalType: "contract PotionTokenContract", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "speedTokenContract", + outputs: [ + { + internalType: "contract PotionTokenContract", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256[2]", + name: "_pA", + type: "uint256[2]", + }, + { + internalType: "uint256[2][2]", + name: "_pB", + type: "uint256[2][2]", + }, + { + internalType: "uint256[2]", + name: "_pC", + type: "uint256[2]", + }, + { + internalType: "uint256[56]", + name: "_pubSignals", + type: "uint256[56]", + }, + ], + internalType: "struct FrogCryptoSqueeze.ProofArgs", + name: "proof", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "beauty", + type: "uint256", + }, + { + internalType: "uint256", + name: "biome", + type: "uint256", + }, + { + internalType: "uint256", + name: "intelligence", + type: "uint256", + }, + { + internalType: "uint256", + name: "jump", + type: "uint256", + }, + { + internalType: "uint256", + name: "speed", + type: "uint256", + }, + { + internalType: "uint256", + name: "rarity", + type: "uint256", + }, + { + internalType: "uint256", + name: "owner", + type: "uint256", + }, + ], + internalType: "struct FrogCryptoSqueeze.FrogAttributes", + name: "attributes", + type: "tuple", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "squeezeFrog", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "squeezeTimestamps", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "temperamentTokenContract", + outputs: [ + { + internalType: "contract PotionTokenContract", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256[2]", + name: "_pA", + type: "uint256[2]", + }, + { + internalType: "uint256[2][2]", + name: "_pB", + type: "uint256[2][2]", + }, + { + internalType: "uint256[2]", + name: "_pC", + type: "uint256[2]", + }, + { + internalType: "uint256[56]", + name: "_pubSignals", + type: "uint256[56]", + }, + ], + internalType: "struct FrogCryptoSqueeze.ProofArgs", + name: "proof", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "beauty", + type: "uint256", + }, + { + internalType: "uint256", + name: "biome", + type: "uint256", + }, { internalType: "uint256", name: "intelligence", @@ -380,31 +3195,326 @@ const deployedContracts = { type: "uint256", }, ], - internalType: "struct YourContract.FrogAttributes", - name: "attributes", + internalType: "struct FrogCryptoSqueeze.FrogAttributes", + name: "attrs", type: "tuple", }, ], - name: "mintFrog", + name: "verifyFrogAttributes", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256[2]", + name: "_pA", + type: "uint256[2]", + }, + { + internalType: "uint256[2][2]", + name: "_pB", + type: "uint256[2][2]", + }, + { + internalType: "uint256[2]", + name: "_pC", + type: "uint256[2]", + }, + { + internalType: "uint256[56]", + name: "_pubSignals", + type: "uint256[56]", + }, + ], + name: "verifyProof", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + ], + inheritedFunctions: { + verifyProof: "contracts/Groth16Verifier.sol", + hash: "contracts/Poseidon.sol", + }, + }, + FrogCryptoTemperamentToken: { + address: "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + abi: [ + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string", + }, + { + internalType: "string", + name: "_symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINTER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", outputs: [ { - internalType: "uint256", + internalType: "uint8", name: "", - type: "uint256", + type: "uint8", }, ], - stateMutability: "nonpayable", + stateMutability: "pure", type: "function", }, { inputs: [ { internalType: "address", - name: "", + name: "spender", type: "address", }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, ], - name: "minted", + name: "decreaseAllowance", outputs: [ { internalType: "bool", @@ -412,17 +3522,23 @@ const deployedContracts = { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { - inputs: [], - name: "name", + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", outputs: [ { - internalType: "string", + internalType: "bytes32", name: "", - type: "string", + type: "bytes32", }, ], stateMutability: "view", @@ -431,52 +3547,84 @@ const deployedContracts = { { inputs: [ { - internalType: "uint256", - name: "tokenId", - type: "uint256", + internalType: "address", + name: "account", + type: "address", }, ], - name: "ownerOf", - outputs: [ + name: "grantMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, { internalType: "address", - name: "", + name: "account", type: "address", }, ], - stateMutability: "view", + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", type: "function", }, { inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, { internalType: "address", - name: "from", + name: "account", type: "address", }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "address", - name: "to", + name: "spender", type: "address", }, { internalType: "uint256", - name: "tokenId", + name: "addedValue", type: "uint256", }, ], - name: "safeTransferFrom", - outputs: [], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], stateMutability: "nonpayable", type: "function", }, { inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, { internalType: "address", name: "to", @@ -484,16 +3632,42 @@ const deployedContracts = { }, { internalType: "uint256", - name: "tokenId", + name: "amount", type: "uint256", }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, { - internalType: "bytes", - name: "data", - type: "bytes", + internalType: "address", + name: "account", + type: "address", }, ], - name: "safeTransferFrom", + name: "renounceRole", outputs: [], stateMutability: "nonpayable", type: "function", @@ -502,16 +3676,29 @@ const deployedContracts = { inputs: [ { internalType: "address", - name: "operator", + name: "account", type: "address", }, + ], + name: "revokeMinterRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - internalType: "bool", - name: "approved", - type: "bool", + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", }, ], - name: "setApprovalForAll", + name: "revokeRole", outputs: [], stateMutability: "nonpayable", type: "function", @@ -548,23 +3735,41 @@ const deployedContracts = { stateMutability: "view", type: "function", }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, { internalType: "uint256", - name: "_tokenId", + name: "amount", type: "uint256", }, ], - name: "tokenURI", + name: "transfer", outputs: [ { - internalType: "string", + internalType: "bool", name: "", - type: "string", + type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { @@ -581,88 +3786,11 @@ const deployedContracts = { }, { internalType: "uint256", - name: "tokenId", + name: "amount", type: "uint256", }, ], name: "transferFrom", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "uint256[2]", - name: "_pA", - type: "uint256[2]", - }, - { - internalType: "uint256[2][2]", - name: "_pB", - type: "uint256[2][2]", - }, - { - internalType: "uint256[2]", - name: "_pC", - type: "uint256[2]", - }, - { - internalType: "uint256[56]", - name: "_pubSignals", - type: "uint256[56]", - }, - ], - internalType: "struct YourContract.ProofArgs", - name: "proof", - type: "tuple", - }, - { - components: [ - { - internalType: "uint256", - name: "beauty", - type: "uint256", - }, - { - internalType: "uint256", - name: "biome", - type: "uint256", - }, - { - internalType: "uint256", - name: "intelligence", - type: "uint256", - }, - { - internalType: "uint256", - name: "jump", - type: "uint256", - }, - { - internalType: "uint256", - name: "speed", - type: "uint256", - }, - { - internalType: "uint256", - name: "rarity", - type: "uint256", - }, - { - internalType: "uint256", - name: "owner", - type: "uint256", - }, - ], - internalType: "struct YourContract.FrogAttributes", - name: "attrs", - type: "tuple", - }, - ], - name: "verifyFrogAttributes", outputs: [ { internalType: "bool", @@ -670,60 +3798,49 @@ const deployedContracts = { type: "bool", }, ], - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { inputs: [ { - internalType: "uint256[2]", - name: "_pA", - type: "uint256[2]", - }, - { - internalType: "uint256[2][2]", - name: "_pB", - type: "uint256[2][2]", - }, - { - internalType: "uint256[2]", - name: "_pC", - type: "uint256[2]", + internalType: "address", + name: "newOwner", + type: "address", }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + ], + inheritedFunctions: {}, + }, + Poseidon: { + address: "0x5FbDB2315678afecb367f032d93F642f64180aa3", + abi: [ + { + inputs: [ { - internalType: "uint256[56]", - name: "_pubSignals", - type: "uint256[56]", + internalType: "uint256[1]", + name: "", + type: "uint256[1]", }, ], - name: "verifyProof", + name: "hash", outputs: [ { - internalType: "bool", + internalType: "uint256", name: "", - type: "bool", + type: "uint256", }, ], - stateMutability: "view", + stateMutability: "pure", type: "function", }, ], - 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", - verifyProof: "contracts/Groth16Verifier.sol", - hash: "contracts/Poseidon.sol", - }, + inheritedFunctions: {}, }, }, } as const;