diff --git a/.github/workflows/graph.yml b/.github/workflows/graph.yml index 4e2559c..54cc3f4 100644 --- a/.github/workflows/graph.yml +++ b/.github/workflows/graph.yml @@ -13,7 +13,7 @@ jobs: - name: Install node uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 - name: Install Yarn run: npm i -g yarn - name: Install Libs diff --git a/.github/workflows/run-e2e.yml b/.github/workflows/run-e2e.yml index ec86840..9d0328a 100644 --- a/.github/workflows/run-e2e.yml +++ b/.github/workflows/run-e2e.yml @@ -13,7 +13,7 @@ jobs: - name: Install node uses: actions/setup-node@v1 with: - node-version: 14 + node-version: 16 - name: Install Yarn run: npm i -g yarn - name: Install Libs diff --git a/README.md b/README.md index d582048..911069e 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,88 @@ test("handleMintPortals - should update portal status and stats entity", () => { }); ``` + + +## Example Queries + +In this section we provide some example queries which should help you to get first ideas of what to fetch from the graph and how to do it. You can insert all events on the Playground and get the results. If you need help on how to integrate those queries in your app please take a look into the [General Section](https://docs.aavegotchi.com/subgraphs/general). +Events + +## Account owned NFTs + +You can fetch the NFTs of one Account with the following query: + +``` +account(id:"0x01c28a969a7d0ba03419c8c80be59928c4732cd9") { + id + ERC721tokens(first: 5) { + metadata { + name + artistName + description + } + } + ERC1155balances { + id + } + } + +``` + +## New NFT proposals +Further its also possible to fetch upcoming NFTs. +``` +{ + metadataActionLogs(where: {status: 0}) { + name + publisher { + id + } + publisherName + artist { + id + } + artistName + fileHash + flagCount + likeCount + } +} +``` + +The status codes defined as follows: +``` +export const METADATA_STATUS_PENDING = 0; +export const METADATA_STATUS_PAUSED = 1; +export const METADATA_STATUS_APPROVED = 2; +export const METADATA_STATUS_DECLINED = 3; +``` + +## Stats +Additionally we store some useful statistics on the subgraph. You can combine this with a block number and create a chart out of it. + +``` +{ + statistics { + totalOwners + totalFakeGotchiPieces + totalNFTs + burnedNFTs + burnedCards + } + + nftstatistics { + holders(first: 3) { + id + amount + } + burned + amountHolder + totalSupply + } +} +``` + ## Contribute If you want to contribute it would be best to start with a fork. A new branch called feat/name, fix/bug or docs/docTitle for the specific scope. Afterwards please create a PR with a the prefix `WIP:`. diff --git a/abis/Contract.json b/abis/Contract.json new file mode 100644 index 0000000..428192c --- /dev/null +++ b/abis/Contract.json @@ -0,0 +1,9796 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "PetOperatorApprovalForAll", + "type": "event" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "aavegotchiClaimTime", + "outputs": [ + { + "internalType": "uint256", + "name": "claimTime_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "allAavegotchisOfOwner", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "status", + "type": "uint256" + }, + { + "internalType": "int16[6]", + "name": "numericTraits", + "type": "int16[6]" + }, + { + "internalType": "int16[6]", + "name": "modifiedNumericTraits", + "type": "int16[6]" + }, + { + "internalType": "uint16[16]", + "name": "equippedWearables", + "type": "uint16[16]" + }, + { + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "internalType": "address", + "name": "escrow", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinship", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastInteracted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "experience", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toNextLevel", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "usedSkillPoints", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "level", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "hauntId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseRarityScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "modifiedRarityScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType", + "type": "tuple" + } + ], + "internalType": "struct ItemTypeIO[]", + "name": "items", + "type": "tuple[]" + } + ], + "internalType": "struct AavegotchiInfo[]", + "name": "aavegotchiInfos_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_approved", + "type": "address" + }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "balanceOf", + "outputs": [ + { "internalType": "uint256", "name": "balance_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "getAavegotchi", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "status", + "type": "uint256" + }, + { + "internalType": "int16[6]", + "name": "numericTraits", + "type": "int16[6]" + }, + { + "internalType": "int16[6]", + "name": "modifiedNumericTraits", + "type": "int16[6]" + }, + { + "internalType": "uint16[16]", + "name": "equippedWearables", + "type": "uint16[16]" + }, + { + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "internalType": "address", + "name": "escrow", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinship", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastInteracted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "experience", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toNextLevel", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "usedSkillPoints", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "level", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "hauntId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseRarityScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "modifiedRarityScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType", + "type": "tuple" + } + ], + "internalType": "struct ItemTypeIO[]", + "name": "items", + "type": "tuple[]" + } + ], + "internalType": "struct AavegotchiInfo", + "name": "aavegotchiInfo_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "approved_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { "internalType": "bool", "name": "approved_", "type": "bool" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "isPetOperatorForAll", + "outputs": [ + { "internalType": "bool", "name": "approved_", "type": "bool" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "ownerOf", + "outputs": [ + { "internalType": "address", "name": "owner_", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { "internalType": "bool", "name": "_approved", "type": "bool" } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { "internalType": "bool", "name": "_approved", "type": "bool" } + ], + "name": "setPetOperatorForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_index", "type": "uint256" } + ], + "name": "tokenByIndex", + "outputs": [ + { "internalType": "uint256", "name": "tokenId_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "tokenIdsOfOwner", + "outputs": [ + { + "internalType": "uint32[]", + "name": "tokenIds_", + "type": "uint32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { "internalType": "uint256", "name": "_index", "type": "uint256" } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { "internalType": "uint256", "name": "tokenId_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "tokenURI", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "totalSupply_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "ClaimAavegotchi", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_time", + "type": "uint256" + } + ], + "name": "LockAavegotchi", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "_oldName", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "_newName", + "type": "string" + } + ], + "name": "SetAavegotchiName", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_batchId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "SetBatchId", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int16[4]", + "name": "_values", + "type": "int16[4]" + } + ], + "name": "SpendSkillpoints", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_time", + "type": "uint256" + } + ], + "name": "UnLockAavegotchi", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_experience", + "type": "uint256" + } + ], + "name": "aavegotchiLevel", + "outputs": [ + { "internalType": "uint256", "name": "level_", "type": "uint256" } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "_name", "type": "string" } + ], + "name": "aavegotchiNameAvailable", + "outputs": [ + { "internalType": "bool", "name": "available_", "type": "bool" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "availableSkillPoints", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int16[6]", + "name": "_numericTraits", + "type": "int16[6]" + } + ], + "name": "baseRarityScore", + "outputs": [ + { + "internalType": "uint256", + "name": "rarityScore_", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { "internalType": "uint256", "name": "_option", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_stakeAmount", + "type": "uint256" + } + ], + "name": "claimAavegotchi", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "currentHaunt", + "outputs": [ + { + "internalType": "uint256", + "name": "hauntId_", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "hauntMaxSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "portalPrice", + "type": "uint256" + }, + { + "internalType": "bytes3", + "name": "bodyColor", + "type": "bytes3" + }, + { + "internalType": "uint24", + "name": "totalCount", + "type": "uint24" + } + ], + "internalType": "struct Haunt", + "name": "haunt_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "getNumericTraits", + "outputs": [ + { + "internalType": "int16[6]", + "name": "numericTraits_", + "type": "int16[6]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ghstAddress", + "outputs": [ + { + "internalType": "address", + "name": "contract_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "interact", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "kinship", + "outputs": [ + { "internalType": "uint256", "name": "score_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "modifiedTraitsAndRarityScore", + "outputs": [ + { + "internalType": "int16[6]", + "name": "numericTraits_", + "type": "int16[6]" + }, + { + "internalType": "uint256", + "name": "rarityScore_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "portalAavegotchiTraits", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + }, + { + "internalType": "int16[6]", + "name": "numericTraits", + "type": "int16[6]" + }, + { + "internalType": "address", + "name": "collateralType", + "type": "address" + }, + { + "internalType": "uint256", + "name": "minimumStake", + "type": "uint256" + } + ], + "internalType": "struct PortalAavegotchiTraitsIO[10]", + "name": "portalAavegotchiTraits_", + "type": "tuple[10]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "int16[6]", + "name": "_numericTraits", + "type": "int16[6]" + } + ], + "name": "rarityMultiplier", + "outputs": [ + { + "internalType": "uint256", + "name": "multiplier_", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "revenueShares", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "burnAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "daoAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "rarityFarming", + "type": "address" + }, + { + "internalType": "address", + "name": "pixelCraft", + "type": "address" + } + ], + "internalType": "struct AavegotchiGameFacet.RevenueSharesIO", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { "internalType": "string", "name": "_name", "type": "string" } + ], + "name": "setAavegotchiName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "int16[4]", + "name": "_values", + "type": "int16[4]" + } + ], + "name": "spendSkillPoints", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { "internalType": "uint256", "name": "_count", "type": "uint256" }, + { "internalType": "uint256", "name": "_skip", "type": "uint256" }, + { "internalType": "bool", "name": "all", "type": "bool" } + ], + "name": "tokenIdsWithKinship", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinship", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastInteracted", + "type": "uint256" + } + ], + "internalType": "struct AavegotchiGameFacet.TokenIdsWithKinship[]", + "name": "tokenIdsWithKinship_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_experience", + "type": "uint256" + } + ], + "name": "xpUntilNextLevel", + "outputs": [ + { + "internalType": "uint256", + "name": "requiredXp_", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "AddedAavegotchiBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "AddedItemsBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "tokenIds", + "type": "uint256[]" + } + ], + "name": "WithdrawnBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "WithdrawnItems", + "type": "event" + }, + { + "inputs": [], + "name": "childChainManager", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_user", "type": "address" }, + { "internalType": "bytes", "name": "_depositData", "type": "bytes" } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newChildChainManager", + "type": "address" + } + ], + "name": "setChildChainManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "withdrawAavegotchiBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "withdrawItemsBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_reduceAmount", + "type": "uint256" + } + ], + "name": "DecreaseStake", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "experience", + "type": "uint256" + } + ], + "name": "ExperienceTransfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_stakeAmount", + "type": "uint256" + } + ], + "name": "IncreaseStake", + "type": "event" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "collateralBalance", + "outputs": [ + { + "internalType": "address", + "name": "collateralType_", + "type": "address" + }, + { "internalType": "address", "name": "escrow_", "type": "address" }, + { "internalType": "uint256", "name": "balance_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hauntId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_collateralId", + "type": "uint256" + } + ], + "name": "collateralInfo", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "collateralType", + "type": "address" + }, + { + "components": [ + { + "internalType": "int16[6]", + "name": "modifiers", + "type": "int16[6]" + }, + { + "internalType": "bytes3", + "name": "primaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "secondaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "cheekColor", + "type": "bytes3" + }, + { + "internalType": "uint8", + "name": "svgId", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "eyeShapeSvgId", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "conversionRate", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "delisted", + "type": "bool" + } + ], + "internalType": "struct AavegotchiCollateralTypeInfo", + "name": "collateralTypeInfo", + "type": "tuple" + } + ], + "internalType": "struct AavegotchiCollateralTypeIO", + "name": "collateralInfo_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_hauntId", "type": "uint256" } + ], + "name": "collaterals", + "outputs": [ + { + "internalType": "address[]", + "name": "collateralTypes_", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { "internalType": "uint256", "name": "_toId", "type": "uint256" } + ], + "name": "decreaseAndDestroy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_reduceAmount", + "type": "uint256" + } + ], + "name": "decreaseStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllCollateralTypes", + "outputs": [ + { "internalType": "address[]", "name": "", "type": "address[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_hauntId", "type": "uint256" } + ], + "name": "getCollateralInfo", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "collateralType", + "type": "address" + }, + { + "components": [ + { + "internalType": "int16[6]", + "name": "modifiers", + "type": "int16[6]" + }, + { + "internalType": "bytes3", + "name": "primaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "secondaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "cheekColor", + "type": "bytes3" + }, + { + "internalType": "uint8", + "name": "svgId", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "eyeShapeSvgId", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "conversionRate", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "delisted", + "type": "bool" + } + ], + "internalType": "struct AavegotchiCollateralTypeInfo", + "name": "collateralTypeInfo", + "type": "tuple" + } + ], + "internalType": "struct AavegotchiCollateralTypeIO[]", + "name": "collateralInfo_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_stakeAmount", + "type": "uint256" + } + ], + "name": "increaseStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateralToken", + "type": "address" + }, + { "internalType": "uint8", "name": "_svgId", "type": "uint8" } + ], + "name": "setCollateralEyeShapeSvgId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "collateralType", + "type": "address" + }, + { + "components": [ + { + "internalType": "int16[6]", + "name": "modifiers", + "type": "int16[6]" + }, + { + "internalType": "bytes3", + "name": "primaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "secondaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "cheekColor", + "type": "bytes3" + }, + { + "internalType": "uint8", + "name": "svgId", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "eyeShapeSvgId", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "conversionRate", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "delisted", + "type": "bool" + } + ], + "internalType": "struct AavegotchiCollateralTypeInfo", + "name": "collateralTypeInfo", + "type": "tuple" + } + ], + "indexed": false, + "internalType": "struct AavegotchiCollateralTypeIO", + "name": "_collateralType", + "type": "tuple" + } + ], + "name": "AddCollateralType", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "indexed": false, + "internalType": "struct ItemType", + "name": "_itemType", + "type": "tuple" + } + ], + "name": "AddItemType", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "internalType": "uint16[]", + "name": "wearableIds", + "type": "uint16[]" + }, + { + "internalType": "int8[5]", + "name": "traitsBonuses", + "type": "int8[5]" + } + ], + "indexed": false, + "internalType": "struct WearableSet", + "name": "_wearableSet", + "type": "tuple" + } + ], + "name": "AddWearableSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_hauntId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_hauntMaxSize", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_portalPrice", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_bodyColor", + "type": "bytes32" + } + ], + "name": "CreateHaunt", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousDao", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newDao", + "type": "address" + } + ], + "name": "DaoTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousDaoTreasury", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newDaoTreasury", + "type": "address" + } + ], + "name": "DaoTreasuryTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "gameManager_", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "limit_", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "refreshTime_", + "type": "uint256" + } + ], + "name": "GameManagerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "gameManager_", + "type": "address" + } + ], + "name": "GameManagerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_xpValues", + "type": "uint256[]" + } + ], + "name": "GrantExperience", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newItemManager_", + "type": "address" + } + ], + "name": "ItemManagerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "itemManager_", + "type": "address" + } + ], + "name": "ItemManagerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_wearableId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int8[6]", + "name": "_traitModifiers", + "type": "int8[6]" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "_rarityScoreModifier", + "type": "uint8" + } + ], + "name": "ItemModifiersSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_maxQuanities", + "type": "uint256[]" + } + ], + "name": "ItemTypeMaxQuantity", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_xpValues", + "type": "uint256[]" + } + ], + "name": "RemoveExperience", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "int16[6]", + "name": "_oldModifiers", + "type": "int16[6]" + }, + { + "indexed": false, + "internalType": "int16[6]", + "name": "_newModifiers", + "type": "int16[6]" + } + ], + "name": "UpdateCollateralModifiers", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_setId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "internalType": "uint16[]", + "name": "wearableIds", + "type": "uint16[]" + }, + { + "internalType": "int8[5]", + "name": "traitsBonuses", + "type": "int8[5]" + } + ], + "indexed": false, + "internalType": "struct WearableSet", + "name": "_wearableSet", + "type": "tuple" + } + ], + "name": "UpdateWearableSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_wearableId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool[16]", + "name": "_slotPositions", + "type": "bool[16]" + } + ], + "name": "WearableSlotPositionsSet", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hauntId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "collateralType", + "type": "address" + }, + { + "components": [ + { + "internalType": "int16[6]", + "name": "modifiers", + "type": "int16[6]" + }, + { + "internalType": "bytes3", + "name": "primaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "secondaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "cheekColor", + "type": "bytes3" + }, + { + "internalType": "uint8", + "name": "svgId", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "eyeShapeSvgId", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "conversionRate", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "delisted", + "type": "bool" + } + ], + "internalType": "struct AavegotchiCollateralTypeInfo", + "name": "collateralTypeInfo", + "type": "tuple" + } + ], + "internalType": "struct AavegotchiCollateralTypeIO[]", + "name": "_collateralTypes", + "type": "tuple[]" + } + ], + "name": "addCollateralTypes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_newGameManagers", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_limits", + "type": "uint256[]" + } + ], + "name": "addGameManagers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_newItemManagers", + "type": "address[]" + } + ], + "name": "addItemManagers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType[]", + "name": "_itemTypes", + "type": "tuple[]" + } + ], + "name": "addItemTypes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType[]", + "name": "_itemTypes", + "type": "tuple[]" + }, + { "internalType": "string", "name": "_svg", "type": "string" }, + { + "components": [ + { + "internalType": "bytes32", + "name": "svgType", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "sizes", + "type": "uint256[]" + } + ], + "internalType": "struct LibSvg.SvgTypeAndSizes[]", + "name": "_typesAndSizes", + "type": "tuple[]" + } + ], + "name": "addItemTypesAndSvgs", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "internalType": "uint16[]", + "name": "wearableIds", + "type": "uint16[]" + }, + { + "internalType": "int8[5]", + "name": "traitsBonuses", + "type": "int8[5]" + } + ], + "internalType": "struct WearableSet[]", + "name": "_wearableSets", + "type": "tuple[]" + } + ], + "name": "addWearableSets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint24", + "name": "_hauntMaxSize", + "type": "uint24" + }, + { + "internalType": "uint96", + "name": "_portalPrice", + "type": "uint96" + }, + { "internalType": "bytes3", "name": "_bodyColor", "type": "bytes3" } + ], + "name": "createHaunt", + "outputs": [ + { "internalType": "uint256", "name": "hauntId_", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint24", + "name": "_hauntMaxSize", + "type": "uint24" + }, + { + "internalType": "uint96", + "name": "_portalPrice", + "type": "uint96" + }, + { + "internalType": "bytes3", + "name": "_bodyColor", + "type": "bytes3" + }, + { + "components": [ + { + "internalType": "address", + "name": "collateralType", + "type": "address" + }, + { + "components": [ + { + "internalType": "int16[6]", + "name": "modifiers", + "type": "int16[6]" + }, + { + "internalType": "bytes3", + "name": "primaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "secondaryColor", + "type": "bytes3" + }, + { + "internalType": "bytes3", + "name": "cheekColor", + "type": "bytes3" + }, + { + "internalType": "uint8", + "name": "svgId", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "eyeShapeSvgId", + "type": "uint8" + }, + { + "internalType": "uint16", + "name": "conversionRate", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "delisted", + "type": "bool" + } + ], + "internalType": "struct AavegotchiCollateralTypeInfo", + "name": "collateralTypeInfo", + "type": "tuple" + } + ], + "internalType": "struct AavegotchiCollateralTypeIO[]", + "name": "_collateralTypes", + "type": "tuple[]" + }, + { + "internalType": "string", + "name": "_collateralSvg", + "type": "string" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "svgType", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "sizes", + "type": "uint256[]" + } + ], + "internalType": "struct LibSvg.SvgTypeAndSizes[]", + "name": "_collateralTypesAndSizes", + "type": "tuple[]" + }, + { + "internalType": "string", + "name": "_eyeShapeSvg", + "type": "string" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "svgType", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "sizes", + "type": "uint256[]" + } + ], + "internalType": "struct LibSvg.SvgTypeAndSizes[]", + "name": "_eyeShapeTypesAndSizes", + "type": "tuple[]" + } + ], + "internalType": "struct DAOFacet.CreateHauntPayload", + "name": "_payload", + "type": "tuple" + } + ], + "name": "createHauntWithPayload", + "outputs": [ + { "internalType": "uint256", "name": "hauntId_", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_manager", "type": "address" } + ], + "name": "gameManagerBalance", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_manager", "type": "address" } + ], + "name": "gameManagerRefreshTime", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_xpValues", + "type": "uint256[]" + } + ], + "name": "grantExperience", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_manager", "type": "address" } + ], + "name": "isGameManager", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_quantities", + "type": "uint256[]" + } + ], + "name": "mintItems", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_xpValues", + "type": "uint256[]" + } + ], + "name": "removeExperience", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_gameManagers", + "type": "address[]" + } + ], + "name": "removeGameManagers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_itemManagers", + "type": "address[]" + } + ], + "name": "removeItemManagers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_newDao", "type": "address" }, + { + "internalType": "address", + "name": "_newDaoTreasury", + "type": "address" + } + ], + "name": "setDao", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_wearableId", + "type": "uint256" + }, + { + "internalType": "int8[6]", + "name": "_traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "uint8", + "name": "_rarityScoreModifier", + "type": "uint8" + } + ], + "name": "setItemTraitModifiersAndRarityModifier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_wearableId", + "type": "uint256" + }, + { + "internalType": "bool[16]", + "name": "_slotPositions", + "type": "bool[16]" + } + ], + "name": "setWearableSlotPositions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_collateralType", + "type": "address" + }, + { + "internalType": "int16[6]", + "name": "_modifiers", + "type": "int16[6]" + } + ], + "name": "updateCollateralModifiers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_maxQuantities", + "type": "uint256[]" + } + ], + "name": "updateItemTypeMaxQuantity", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_setIds", + "type": "uint256[]" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "internalType": "uint16[]", + "name": "wearableIds", + "type": "uint16[]" + }, + { + "internalType": "int8[5]", + "name": "traitsBonuses", + "type": "int8[5]" + } + ], + "internalType": "struct WearableSet[]", + "name": "_wearableSets", + "type": "tuple[]" + } + ], + "name": "updateWearableSets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "listingFeeInWei", + "type": "uint256" + } + ], + "name": "ChangedListingFee", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "erc1155TokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "erc1155TypeId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ERC1155ExecutedListing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "erc1155TokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "erc1155TypeId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ERC1155ListingAdd", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + } + ], + "name": "ERC1155ListingCancelled", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_listingId", + "type": "uint256" + } + ], + "name": "cancelERC1155Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_listingIds", + "type": "uint256[]" + } + ], + "name": "cancelERC1155Listings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_listingId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_priceInWei", + "type": "uint256" + } + ], + "name": "executeERC1155Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc1155TypeId", + "type": "uint256" + } + ], + "name": "getERC1155Category", + "outputs": [ + { + "internalType": "uint256", + "name": "category_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_listingId", + "type": "uint256" + } + ], + "name": "getERC1155Listing", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc1155TypeId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeLastPurchased", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sourceListingId", + "type": "uint256" + }, + { "internalType": "bool", "name": "sold", "type": "bool" }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC1155Listing", + "name": "listing_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc1155TypeId", + "type": "uint256" + }, + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "getERC1155ListingFromToken", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc1155TypeId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeLastPurchased", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sourceListingId", + "type": "uint256" + }, + { "internalType": "bool", "name": "sold", "type": "bool" }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC1155Listing", + "name": "listing_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_category", + "type": "uint256" + }, + { "internalType": "string", "name": "_sort", "type": "string" }, + { "internalType": "uint256", "name": "_length", "type": "uint256" } + ], + "name": "getERC1155Listings", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc1155TypeId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeLastPurchased", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sourceListingId", + "type": "uint256" + }, + { "internalType": "bool", "name": "sold", "type": "bool" }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC1155Listing[]", + "name": "listings_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getListingFeeInWei", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { + "internalType": "uint256", + "name": "_category", + "type": "uint256" + }, + { "internalType": "string", "name": "_sort", "type": "string" }, + { "internalType": "uint256", "name": "_length", "type": "uint256" } + ], + "name": "getOwnerERC1155Listings", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc1155TypeId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeLastPurchased", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sourceListingId", + "type": "uint256" + }, + { "internalType": "bool", "name": "sold", "type": "bool" }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC1155Listing[]", + "name": "listings_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc1155TypeId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + } + ], + "internalType": "struct ERC1155MarketplaceFacet.Category[]", + "name": "_categories", + "type": "tuple[]" + } + ], + "name": "setERC1155Categories", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc1155TypeId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_quantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_priceInWei", + "type": "uint256" + } + ], + "name": "setERC1155Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_listingFeeInWei", + "type": "uint256" + } + ], + "name": "setListingFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "_erc1155TypeIds", + "type": "uint256[]" + }, + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "updateBatchERC1155Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc1155TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc1155TypeId", + "type": "uint256" + }, + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "updateERC1155Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ERC721ExecutedListing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ERC721ListingAdd", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc721TokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_priceInWei", + "type": "uint256" + } + ], + "name": "addERC721Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_listingId", + "type": "uint256" + } + ], + "name": "cancelERC721Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc721TokenId", + "type": "uint256" + } + ], + "name": "cancelERC721ListingByToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_listingIds", + "type": "uint256[]" + } + ], + "name": "cancelERC721Listings", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_listingId", + "type": "uint256" + } + ], + "name": "executeERC721Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_listingId", + "type": "uint256" + } + ], + "name": "getAavegotchiListing", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timePurchased", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC721Listing", + "name": "listing_", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "status", + "type": "uint256" + }, + { + "internalType": "int16[6]", + "name": "numericTraits", + "type": "int16[6]" + }, + { + "internalType": "int16[6]", + "name": "modifiedNumericTraits", + "type": "int16[6]" + }, + { + "internalType": "uint16[16]", + "name": "equippedWearables", + "type": "uint16[16]" + }, + { + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "internalType": "address", + "name": "escrow", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinship", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastInteracted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "experience", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toNextLevel", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "usedSkillPoints", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "level", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "hauntId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseRarityScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "modifiedRarityScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType", + "type": "tuple" + } + ], + "internalType": "struct ItemTypeIO[]", + "name": "items", + "type": "tuple[]" + } + ], + "internalType": "struct AavegotchiInfo", + "name": "aavegotchiInfo_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_category", + "type": "uint256" + }, + { "internalType": "string", "name": "_sort", "type": "string" }, + { "internalType": "uint256", "name": "_length", "type": "uint256" } + ], + "name": "getAavegotchiListings", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timePurchased", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC721Listing", + "name": "listing_", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "status", + "type": "uint256" + }, + { + "internalType": "int16[6]", + "name": "numericTraits", + "type": "int16[6]" + }, + { + "internalType": "int16[6]", + "name": "modifiedNumericTraits", + "type": "int16[6]" + }, + { + "internalType": "uint16[16]", + "name": "equippedWearables", + "type": "uint16[16]" + }, + { + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "internalType": "address", + "name": "escrow", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinship", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastInteracted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "experience", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toNextLevel", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "usedSkillPoints", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "level", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "hauntId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseRarityScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "modifiedRarityScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType", + "type": "tuple" + } + ], + "internalType": "struct ItemTypeIO[]", + "name": "items", + "type": "tuple[]" + } + ], + "internalType": "struct AavegotchiInfo", + "name": "aavegotchiInfo_", + "type": "tuple" + } + ], + "internalType": "struct ERC721MarketplaceFacet.AavegotchiListing[]", + "name": "listings_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc721TokenId", + "type": "uint256" + } + ], + "name": "getERC721Category", + "outputs": [ + { + "internalType": "uint256", + "name": "category_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_listingId", + "type": "uint256" + } + ], + "name": "getERC721Listing", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timePurchased", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC721Listing", + "name": "listing_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc721TokenId", + "type": "uint256" + }, + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "getERC721ListingFromToken", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timePurchased", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC721Listing", + "name": "listing_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_category", + "type": "uint256" + }, + { "internalType": "string", "name": "_sort", "type": "string" }, + { "internalType": "uint256", "name": "_length", "type": "uint256" } + ], + "name": "getERC721Listings", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timePurchased", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC721Listing[]", + "name": "listings_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { + "internalType": "uint256", + "name": "_category", + "type": "uint256" + }, + { "internalType": "string", "name": "_sort", "type": "string" }, + { "internalType": "uint256", "name": "_length", "type": "uint256" } + ], + "name": "getOwnerAavegotchiListings", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timePurchased", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC721Listing", + "name": "listing_", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "status", + "type": "uint256" + }, + { + "internalType": "int16[6]", + "name": "numericTraits", + "type": "int16[6]" + }, + { + "internalType": "int16[6]", + "name": "modifiedNumericTraits", + "type": "int16[6]" + }, + { + "internalType": "uint16[16]", + "name": "equippedWearables", + "type": "uint16[16]" + }, + { + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "internalType": "address", + "name": "escrow", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinship", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastInteracted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "experience", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toNextLevel", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "usedSkillPoints", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "level", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "hauntId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseRarityScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "modifiedRarityScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType", + "type": "tuple" + } + ], + "internalType": "struct ItemTypeIO[]", + "name": "items", + "type": "tuple[]" + } + ], + "internalType": "struct AavegotchiInfo", + "name": "aavegotchiInfo_", + "type": "tuple" + } + ], + "internalType": "struct ERC721MarketplaceFacet.AavegotchiListing[]", + "name": "listings_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { + "internalType": "uint256", + "name": "_category", + "type": "uint256" + }, + { "internalType": "string", "name": "_sort", "type": "string" }, + { "internalType": "uint256", "name": "_length", "type": "uint256" } + ], + "name": "getOwnerERC721Listings", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "address", + "name": "erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "erc721TokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timePurchased", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "cancelled", + "type": "bool" + } + ], + "internalType": "struct ERC721Listing[]", + "name": "listings_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_erc721TokenAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_erc721TokenId", + "type": "uint256" + }, + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "updateERC721Listing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_erc20Contract", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_depositAmount", + "type": "uint256" + } + ], + "name": "Erc20Deposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_erc20Contract", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_transferAmount", + "type": "uint256" + } + ], + "name": "TransferEscrow", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "_erc20Contracts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchDepositERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchDepositGHST", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_erc20Contract", + "type": "address" + }, + { "internalType": "uint256", "name": "_value", "type": "uint256" } + ], + "name": "depositERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_erc20Contract", + "type": "address" + } + ], + "name": "escrowBalance", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_erc20Contract", + "type": "address" + }, + { + "internalType": "address", + "name": "_recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_transferAmount", + "type": "uint256" + } + ], + "name": "transferEscrow", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint16[16]", + "name": "_oldWearables", + "type": "uint16[16]" + }, + { + "indexed": false, + "internalType": "uint16[16]", + "name": "_newWearables", + "type": "uint16[16]" + } + ], + "name": "EquipWearables", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_toContract", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferToParent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_quantities", + "type": "uint256[]" + } + ], + "name": "UseConsumables", + "type": "event" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { "internalType": "uint256", "name": "_id", "type": "uint256" } + ], + "name": "balanceOf", + "outputs": [ + { "internalType": "uint256", "name": "bal_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "_owners", + "type": "address[]" + }, + { "internalType": "uint256[]", "name": "_ids", "type": "uint256[]" } + ], + "name": "balanceOfBatch", + "outputs": [ + { "internalType": "uint256[]", "name": "bals", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { "internalType": "uint256", "name": "_id", "type": "uint256" } + ], + "name": "balanceOfToken", + "outputs": [ + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint16[16]", + "name": "_wearablesToEquip", + "type": "uint16[16]" + } + ], + "name": "equipWearables", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "equippedWearables", + "outputs": [ + { + "internalType": "uint16[16]", + "name": "wearableIds_", + "type": "uint16[16]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_wearableIds", + "type": "uint256[]" + } + ], + "name": "findWearableSets", + "outputs": [ + { + "internalType": "uint256[]", + "name": "wearableSetIds_", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_itemId", "type": "uint256" } + ], + "name": "getItemType", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + } + ], + "name": "getItemTypes", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType[]", + "name": "itemTypes_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_index", "type": "uint256" } + ], + "name": "getWearableSet", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "internalType": "uint16[]", + "name": "wearableIds", + "type": "uint16[]" + }, + { + "internalType": "int8[5]", + "name": "traitsBonuses", + "type": "int8[5]" + } + ], + "internalType": "struct WearableSet", + "name": "wearableSet_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWearableSets", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "internalType": "uint16[]", + "name": "wearableIds", + "type": "uint16[]" + }, + { + "internalType": "int8[5]", + "name": "traitsBonuses", + "type": "int8[5]" + } + ], + "internalType": "struct WearableSet[]", + "name": "wearableSets_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_account", "type": "address" } + ], + "name": "itemBalances", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "internalType": "struct ItemsFacet.ItemIdIO[]", + "name": "bals_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenContract", + "type": "address" + }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "itemBalancesOfToken", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "internalType": "struct ItemsFacet.ItemIdIO[]", + "name": "bals_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tokenContract", + "type": "address" + }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "itemBalancesOfTokenWithTypes", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType", + "type": "tuple" + } + ], + "internalType": "struct ItemTypeIO[]", + "name": "itemBalancesOfTokenWithTypes_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "itemBalancesWithTypes", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType", + "type": "tuple" + } + ], + "internalType": "struct ItemTypeIO[]", + "name": "output_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "_value", "type": "string" } + ], + "name": "setBaseURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "totalWearableSets", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_id", "type": "uint256" } + ], + "name": "uri", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_quantities", + "type": "uint256[]" + } + ], + "name": "useConsumables", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fromContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_toContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchTransferAsChild", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fromContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchTransferFromParent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { + "internalType": "address", + "name": "_toContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "batchTransferToParent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "extractItemsFromDiamond", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "extractItemsFromSacrificedGotchi", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, + { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, + { "internalType": "bytes", "name": "", "type": "bytes" } + ], + "name": "onERC1155BatchReceived", + "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "bytes", "name": "", "type": "bytes" } + ], + "name": "onERC1155Received", + "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_id", "type": "uint256" }, + { "internalType": "uint256", "name": "_value", "type": "uint256" }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fromContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_toContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + }, + { "internalType": "uint256", "name": "_id", "type": "uint256" }, + { "internalType": "uint256", "name": "_value", "type": "uint256" } + ], + "name": "transferAsChild", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fromContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_id", "type": "uint256" }, + { "internalType": "uint256", "name": "_value", "type": "uint256" } + ], + "name": "transferFromParent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { + "internalType": "address", + "name": "_toContract", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + }, + { "internalType": "uint256", "name": "_id", "type": "uint256" }, + { "internalType": "uint256", "name": "_value", "type": "uint256" } + ], + "name": "transferToParent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address payable", + "name": "relayerAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + } + ], + "name": "MetaTransactionExecuted", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "userAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "functionSignature", + "type": "bytes" + }, + { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, + { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, + { "internalType": "uint8", "name": "sigV", "type": "uint8" } + ], + "name": "executeMetaTransaction", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" } + ], + "name": "getNonce", + "outputs": [ + { "internalType": "uint256", "name": "nonce_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_numAavegotchisToPurchase", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_totalPrice", + "type": "uint256" + } + ], + "name": "BuyPortals", + "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": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_numAavegotchisToPurchase", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_totalPrice", + "type": "uint256" + } + ], + "name": "Xingyun", + "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": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_numAavegotchisToPurchase", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_hauntId", + "type": "uint256" + } + ], + "name": "MintPortals", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_quantities", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_totalPrice", + "type": "uint256" + } + ], + "name": "PurchaseItemsWithGhst", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_quantities", + "type": "uint256[]" + } + ], + "name": "PurchaseItemsWithVouchers", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_quantities", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_totalPrice", + "type": "uint256" + } + ], + "name": "PurchaseTransferItemsWithGhst", + "type": "event" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_ghst", "type": "uint256" } + ], + "name": "buyPortals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_amount", "type": "uint256" } + ], + "name": "mintPortals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_quantities", + "type": "uint256[]" + } + ], + "name": "purchaseItemsWithGhst", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_quantities", + "type": "uint256[]" + } + ], + "name": "purchaseTransferItemsWithGhst", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_svgType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_numLayers", + "type": "uint256" + } + ], + "name": "deleteLastSvgLayers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "getAavegotchiSvg", + "outputs": [ + { "internalType": "string", "name": "ag_", "type": "string" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_itemId", "type": "uint256" } + ], + "name": "getItemSvg", + "outputs": [ + { "internalType": "string", "name": "ag_", "type": "string" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_svgType", + "type": "bytes32" + }, + { "internalType": "uint256", "name": "_itemId", "type": "uint256" } + ], + "name": "getSvg", + "outputs": [ + { "internalType": "string", "name": "svg_", "type": "string" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_svgType", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + } + ], + "name": "getSvgs", + "outputs": [ + { "internalType": "string[]", "name": "svgs_", "type": "string[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "portalAavegotchisSvg", + "outputs": [ + { + "internalType": "string[10]", + "name": "svg_", + "type": "string[10]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hauntId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_collateralType", + "type": "address" + }, + { + "internalType": "int16[6]", + "name": "_numericTraits", + "type": "int16[6]" + }, + { + "internalType": "uint16[16]", + "name": "equippedWearables", + "type": "uint16[16]" + } + ], + "name": "previewAavegotchi", + "outputs": [ + { "internalType": "string", "name": "ag_", "type": "string" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_itemIds", + "type": "uint256[]" + }, + { + "components": [ + { "internalType": "uint8", "name": "x", "type": "uint8" }, + { "internalType": "uint8", "name": "y", "type": "uint8" }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions[]", + "name": "_dimensions", + "type": "tuple[]" + } + ], + "name": "setItemsDimensions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "sleeveId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "wearableId", + "type": "uint256" + } + ], + "internalType": "struct SvgFacet.Sleeve[]", + "name": "_sleeves", + "type": "tuple[]" + } + ], + "name": "setSleeves", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "_svg", "type": "string" }, + { + "components": [ + { + "internalType": "bytes32", + "name": "svgType", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "sizes", + "type": "uint256[]" + } + ], + "internalType": "struct LibSvg.SvgTypeAndSizes[]", + "name": "_typesAndSizes", + "type": "tuple[]" + } + ], + "name": "storeSvg", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "_svg", "type": "string" }, + { + "components": [ + { + "internalType": "bytes32", + "name": "svgType", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "sizes", + "type": "uint256[]" + } + ], + "internalType": "struct LibSvg.SvgTypeAndIdsAndSizes[]", + "name": "_typesAndIdsAndSizes", + "type": "tuple[]" + } + ], + "name": "updateSvg", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "getAavegotchiSideSvgs", + "outputs": [ + { "internalType": "string[]", "name": "ag_", "type": "string[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_itemId", "type": "uint256" } + ], + "name": "getItemSvgs", + "outputs": [ + { "internalType": "string[]", "name": "svg_", "type": "string[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_hauntId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_collateralType", + "type": "address" + }, + { + "internalType": "int16[6]", + "name": "_numericTraits", + "type": "int16[6]" + }, + { + "internalType": "uint16[16]", + "name": "equippedWearables", + "type": "uint16[16]" + } + ], + "name": "previewSideAavegotchi", + "outputs": [ + { "internalType": "string[]", "name": "ag_", "type": "string[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "side", + "type": "string" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + } + ], + "internalType": "struct SvgViewsFacet.SideViewDimensionsArgs[]", + "name": "_sideViewDimensions", + "type": "tuple[]" + } + ], + "name": "setSideViewDimensions", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "OpenPortals", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "PortalOpened", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_vrfTimeSet", + "type": "uint256" + } + ], + "name": "VrfRandomNumber", + "type": "event" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_newFee", "type": "uint256" }, + { + "internalType": "bytes32", + "name": "_keyHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_vrfCoordinator", + "type": "address" + }, + { "internalType": "address", "name": "_link", "type": "address" } + ], + "name": "changeVrf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "keyHash", + "outputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "link", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "linkBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "linkBalance_", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "openPortals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_requestId", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_randomNumber", + "type": "uint256" + } + ], + "name": "rawFulfillRandomness", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_value", "type": "uint256" } + ], + "name": "removeLinkTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "vrfCoordinator", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "MigrateVouchers", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "internalType": "struct VoucherMigrationFacet.VouchersOwner[]", + "name": "_vouchersOwners", + "type": "tuple[]" + } + ], + "name": "migrateVouchers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "kinship", + "type": "uint256" + } + ], + "name": "AavegotchiInteract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ERC1155ListingCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ERC1155ListingRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "quantity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "priceInWei", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "UpdateERC1155Listing", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ERC721ListingCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ERC721ListingRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "svgType", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "sizes", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct LibSvg.SvgTypeAndSizes[]", + "name": "_typesAndSizes", + "type": "tuple[]" + } + ], + "name": "StoreSvg", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "svgType", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "sizes", + "type": "uint256[]" + } + ], + "indexed": false, + "internalType": "struct LibSvg.SvgTypeAndIdsAndSizes[]", + "name": "_typesAndIdsAndSizes", + "type": "tuple[]" + } + ], + "name": "UpdateSvg", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_fromContract", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_fromTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferFromParent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_toContract", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_toTokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenTypeId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferToParent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "_value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_itemId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_priceInWei", + "type": "uint256" + } + ], + "name": "UpdateItemPrice", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + } + ], + "name": "GotchiLendingAdd", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + } + ], + "name": "GotchiLendingEnd", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + } + ], + "name": "GotchiLendingExecute", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_erc721TokenId", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "_initialCost", + "type": "uint96" + }, + { "internalType": "uint32", "name": "_period", "type": "uint32" }, + { + "internalType": "uint8[3]", + "name": "_revenueSplit", + "type": "uint8[3]" + }, + { + "internalType": "address", + "name": "_originalOwner", + "type": "address" + }, + { + "internalType": "address", + "name": "_thirdParty", + "type": "address" + }, + { + "internalType": "uint32", + "name": "_whitelistId", + "type": "uint32" + }, + { + "internalType": "address[]", + "name": "_revenueTokens", + "type": "address[]" + } + ], + "name": "addGotchiLending", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_listingId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "_erc721TokenId", + "type": "uint32" + }, + { + "internalType": "uint96", + "name": "_initialCost", + "type": "uint96" + }, + { "internalType": "uint32", "name": "_period", "type": "uint32" }, + { + "internalType": "uint8[3]", + "name": "_revenueSplit", + "type": "uint8[3]" + } + ], + "name": "agreeGotchiLending", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint32", "name": "_listingId", "type": "uint32" } + ], + "name": "cancelGotchiLending", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_erc721TokenId", + "type": "uint32" + } + ], + "name": "cancelGotchiLendingByToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint32", "name": "_tokenId", "type": "uint32" } + ], + "name": "claimAndEndGotchiLending", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint32", "name": "_tokenId", "type": "uint32" } + ], + "name": "claimGotchiLending", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_erc721TokenId", + "type": "uint32" + } + ], + "name": "getGotchiLendingFromToken", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "erc721TokenId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "internalType": "uint40", + "name": "timeCreated", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "timeAgreed", + "type": "uint40" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "completed", + "type": "bool" + }, + { + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "internalType": "uint40", + "name": "lastClaimed", + "type": "uint40" + }, + { + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + } + ], + "internalType": "struct GotchiLending", + "name": "listing_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_erc721TokenId", + "type": "uint32" + } + ], + "name": "getGotchiLendingIdByToken", + "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint32", "name": "_listingId", "type": "uint32" } + ], + "name": "getGotchiLendingListingInfo", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "erc721TokenId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "internalType": "uint40", + "name": "timeCreated", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "timeAgreed", + "type": "uint40" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "completed", + "type": "bool" + }, + { + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "internalType": "uint40", + "name": "lastClaimed", + "type": "uint40" + }, + { + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + } + ], + "internalType": "struct GotchiLending", + "name": "listing_", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "randomNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "status", + "type": "uint256" + }, + { + "internalType": "int16[6]", + "name": "numericTraits", + "type": "int16[6]" + }, + { + "internalType": "int16[6]", + "name": "modifiedNumericTraits", + "type": "int16[6]" + }, + { + "internalType": "uint16[16]", + "name": "equippedWearables", + "type": "uint16[16]" + }, + { + "internalType": "address", + "name": "collateral", + "type": "address" + }, + { + "internalType": "address", + "name": "escrow", + "type": "address" + }, + { + "internalType": "uint256", + "name": "stakedAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minimumStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "kinship", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastInteracted", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "experience", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "toNextLevel", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "usedSkillPoints", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "level", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "hauntId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "baseRarityScore", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "modifiedRarityScore", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "locked", + "type": "bool" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "itemId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "author", + "type": "string" + }, + { + "internalType": "int8[6]", + "name": "traitModifiers", + "type": "int8[6]" + }, + { + "internalType": "bool[16]", + "name": "slotPositions", + "type": "bool[16]" + }, + { + "internalType": "uint8[]", + "name": "allowedCollaterals", + "type": "uint8[]" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "x", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "y", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "width", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "height", + "type": "uint8" + } + ], + "internalType": "struct Dimensions", + "name": "dimensions", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "ghstPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxQuantity", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalQuantity", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "svgId", + "type": "uint32" + }, + { + "internalType": "uint8", + "name": "rarityScoreModifier", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "canPurchaseWithGhst", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "minLevel", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "canBeTransferred", + "type": "bool" + }, + { + "internalType": "uint8", + "name": "category", + "type": "uint8" + }, + { + "internalType": "int16", + "name": "kinshipBonus", + "type": "int16" + }, + { + "internalType": "uint32", + "name": "experienceBonus", + "type": "uint32" + } + ], + "internalType": "struct ItemType", + "name": "itemType", + "type": "tuple" + } + ], + "internalType": "struct ItemTypeIO[]", + "name": "items", + "type": "tuple[]" + } + ], + "internalType": "struct AavegotchiInfo", + "name": "aavegotchiInfo_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "_status", "type": "bytes32" }, + { "internalType": "uint256", "name": "_length", "type": "uint256" } + ], + "name": "getGotchiLendings", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "erc721TokenId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "internalType": "uint40", + "name": "timeCreated", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "timeAgreed", + "type": "uint40" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "completed", + "type": "bool" + }, + { + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "internalType": "uint40", + "name": "lastClaimed", + "type": "uint40" + }, + { + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + } + ], + "internalType": "struct GotchiLending[]", + "name": "listings_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint32", "name": "_listingId", "type": "uint32" } + ], + "name": "getLendingListingInfo", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "erc721TokenId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "internalType": "uint40", + "name": "timeCreated", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "timeAgreed", + "type": "uint40" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "completed", + "type": "bool" + }, + { + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "internalType": "uint40", + "name": "lastClaimed", + "type": "uint40" + }, + { + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + } + ], + "internalType": "struct GotchiLending", + "name": "listing_", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_lender", "type": "address" }, + { "internalType": "bytes32", "name": "_status", "type": "bytes32" }, + { "internalType": "uint256", "name": "_length", "type": "uint256" } + ], + "name": "getOwnerGotchiLendings", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "erc721TokenId", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "internalType": "uint40", + "name": "timeCreated", + "type": "uint40" + }, + { + "internalType": "uint40", + "name": "timeAgreed", + "type": "uint40" + }, + { + "internalType": "bool", + "name": "canceled", + "type": "bool" + }, + { + "internalType": "bool", + "name": "completed", + "type": "bool" + }, + { + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "internalType": "uint40", + "name": "lastClaimed", + "type": "uint40" + }, + { + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + } + ], + "internalType": "struct GotchiLending[]", + "name": "listings_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_erc721TokenId", + "type": "uint32" + } + ], + "name": "isAavegotchiLent", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + } + ], + "name": "WhitelistCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + } + ], + "name": "WhitelistUpdated", + "type": "event" + }, + { + "inputs": [ + { "internalType": "string", "name": "_name", "type": "string" }, + { + "internalType": "address[]", + "name": "_whitelistAddresses", + "type": "address[]" + } + ], + "name": "createWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_whitelistId", + "type": "uint32" + } + ], + "name": "getWhitelist", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + } + ], + "internalType": "struct Whitelist", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWhitelists", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + } + ], + "internalType": "struct Whitelist[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "_whitelistId", + "type": "uint32" + }, + { + "internalType": "address[]", + "name": "_whitelistAddresses", + "type": "address[]" + } + ], + "name": "updateWhitelist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "GotchiLendingCancel", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "tokenAddresses", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "name": "GotchiLendingClaim", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "ERC721ExecutedToRecipient", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "listingId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + } + ], + "name": "ERC1155ExecutedToRecipient", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "tokenId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "indexed": false, + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timeCreated", + "type": "uint256" + } + ], + "name": "GotchiLendingAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint32", + "name": "tokenId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "indexed": false, + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timeCanceled", + "type": "uint256" + } + ], + "name": "GotchiLendingCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "tokenId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "indexed": false, + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timeClaimed", + "type": "uint256" + } + ], + "name": "GotchiLendingClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "tokenId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "indexed": false, + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timeEnded", + "type": "uint256" + } + ], + "name": "GotchiLendingEnded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint32", + "name": "listingId", + "type": "uint32" + }, + { + "indexed": true, + "internalType": "address", + "name": "lender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "borrower", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "tokenId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "initialCost", + "type": "uint96" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "period", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint8[3]", + "name": "revenueSplit", + "type": "uint8[3]" + }, + { + "indexed": false, + "internalType": "address", + "name": "originalOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "thirdParty", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "whitelistId", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "revenueTokens", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timeAgreed", + "type": "uint256" + } + ], + "name": "GotchiLendingExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "NewSeriesStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_nftDiamond", + "type": "address" + } + ], + "name": "NftAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "_value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_aavegotchiDiamond", + "type": "address" + } + ], + "name": "AavegotchiAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_cardDiamond", + "type": "address" + } + ], + "name": "CardAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "fileHash", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "publisher", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "publisherName", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "externalLink", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "artist", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "artistName", + "type": "string" + }, + { + "indexed": false, + "internalType": "uint256[2]", + "name": "royalty", + "type": "uint256[2]" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rarity", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "createdAt", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "status", + "type": "uint8" + } + ], + "name": "MetadataActionLog", + "type": "event" + } +] diff --git a/abis/diamond_erc1155.json b/abis/diamond_erc1155.json new file mode 100644 index 0000000..8dc8ea3 --- /dev/null +++ b/abis/diamond_erc1155.json @@ -0,0 +1 @@ +[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_aavegotchiDiamond","type":"address"}],"name":"AavegotchiAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_fakeGotchisNftDiamond","type":"address"}],"name":"FakeGotchisNftAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NewSeriesStarted","type":"event"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"bal_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_owners","type":"address[]"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"bals","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_cardOwner","type":"address"},{"internalType":"uint256","name":"_cardSeriesId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"approved_","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_aavegotchiDiamond","type":"address"}],"name":"setAavegotchiAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fakeGotchisNftDiamond","type":"address"}],"name":"setFakeGotchisNftAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"startNewSeries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamondCut.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondCut.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"_init","type":"address"},{"indexed":false,"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamondCut.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondCut.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"_init","type":"address"},{"indexed":false,"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_operator","type":"address"},{"indexed":false,"internalType":"bool","name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"}] \ No newline at end of file diff --git a/abis/diamond_erc721.json b/abis/diamond_erc721.json new file mode 100644 index 0000000..e79b92c --- /dev/null +++ b/abis/diamond_erc721.json @@ -0,0 +1,1264 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_aavegotchiDiamond", + "type": "address" + } + ], + "name": "AavegotchiAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_fakeGotchisCardDiamond", + "type": "address" + } + ], + "name": "FakeGotchisCardAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_ghstContract", + "type": "address" + } + ], + "name": "GhstAddressUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_approved", + "type": "address" + }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "balanceOf", + "outputs": [ + { "internalType": "uint256", "name": "balance_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "approved_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { "internalType": "bool", "name": "approved_", "type": "bool" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_salePrice", + "type": "uint256" + } + ], + "name": "multiRoyaltyInfo", + "outputs": [ + { + "internalType": "address[]", + "name": "receivers", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "royaltyAmounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "ownerOf", + "outputs": [ + { "internalType": "address", "name": "owner_", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "safeBatchTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { "internalType": "bytes", "name": "_data", "type": "bytes" } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_aavegotchiDiamond", + "type": "address" + } + ], + "name": "setAavegotchiAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { "internalType": "bool", "name": "_approved", "type": "bool" } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_fakeGotchisCardDiamond", + "type": "address" + } + ], + "name": "setFakeGotchisCardAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_ghstContract", + "type": "address" + } + ], + "name": "setGhstAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_index", "type": "uint256" } + ], + "name": "tokenByIndex", + "outputs": [ + { "internalType": "uint256", "name": "tokenId_", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "tokenIdsOfOwner", + "outputs": [ + { + "internalType": "uint256[]", + "name": "tokenIds_", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "tokenURI", + "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": "_from", "type": "address" }, + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "publisher", + "type": "address" + }, + { + "internalType": "uint16[2]", + "name": "royalty", + "type": "uint16[2]" + }, + { + "internalType": "uint16", + "name": "editions", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "flagCount", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "likeCount", + "type": "uint32" + }, + { + "internalType": "address", + "name": "artist", + "type": "address" + }, + { + "internalType": "uint40", + "name": "createdAt", + "type": "uint40" + }, + { + "internalType": "uint8", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "minted", + "type": "bool" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "externalLink", + "type": "string" + }, + { + "internalType": "string", + "name": "artistName", + "type": "string" + }, + { + "internalType": "string", + "name": "publisherName", + "type": "string" + }, + { + "internalType": "string", + "name": "fileHash", + "type": "string" + }, + { + "internalType": "string", + "name": "fileType", + "type": "string" + }, + { + "internalType": "string", + "name": "thumbnailHash", + "type": "string" + }, + { + "internalType": "string", + "name": "thumbnailType", + "type": "string" + } + ], + "indexed": false, + "internalType": "struct Metadata", + "name": "metaData", + "type": "tuple" + } + ], + "name": "MetadataActionLog", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_declinedBy", + "type": "address" + } + ], + "name": "MetadataDecline", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_flaggedBy", + "type": "address" + } + ], + "name": "MetadataFlag", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_likedBy", + "type": "address" + } + ], + "name": "MetadataLike", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "_reviewer", + "type": "address" + } + ], + "name": "ReviewPass", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "publisherName", + "type": "string" + }, + { + "internalType": "string", + "name": "externalLink", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "address", + "name": "artist", + "type": "address" + }, + { + "internalType": "string", + "name": "artistName", + "type": "string" + }, + { + "internalType": "uint16[2]", + "name": "royalty", + "type": "uint16[2]" + }, + { + "internalType": "uint16", + "name": "editions", + "type": "uint16" + }, + { + "internalType": "string", + "name": "fileHash", + "type": "string" + }, + { + "internalType": "string", + "name": "fileType", + "type": "string" + }, + { + "internalType": "string", + "name": "thumbnailHash", + "type": "string" + }, + { + "internalType": "string", + "name": "thumbnailType", + "type": "string" + } + ], + "internalType": "struct MetadataFacet.MetadataInput", + "name": "mData", + "type": "tuple" + }, + { "internalType": "uint256", "name": "series", "type": "uint256" } + ], + "name": "addMetadata", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_id", "type": "uint256" }, + { "internalType": "bool", "name": "isBadFaith", "type": "bool" } + ], + "name": "declineMetadata", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_id", "type": "uint256" } + ], + "name": "flag", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_id", "type": "uint256" } + ], + "name": "getMetadata", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "publisher", + "type": "address" + }, + { + "internalType": "uint16[2]", + "name": "royalty", + "type": "uint16[2]" + }, + { + "internalType": "uint16", + "name": "editions", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "flagCount", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "likeCount", + "type": "uint32" + }, + { + "internalType": "address", + "name": "artist", + "type": "address" + }, + { + "internalType": "uint40", + "name": "createdAt", + "type": "uint40" + }, + { + "internalType": "uint8", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "minted", + "type": "bool" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "externalLink", + "type": "string" + }, + { + "internalType": "string", + "name": "artistName", + "type": "string" + }, + { + "internalType": "string", + "name": "publisherName", + "type": "string" + }, + { + "internalType": "string", + "name": "fileHash", + "type": "string" + }, + { + "internalType": "string", + "name": "fileType", + "type": "string" + }, + { + "internalType": "string", + "name": "thumbnailHash", + "type": "string" + }, + { + "internalType": "string", + "name": "thumbnailType", + "type": "string" + } + ], + "internalType": "struct Metadata", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_id", "type": "uint256" } + ], + "name": "like", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_id", "type": "uint256" } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_id", "type": "uint256" } + ], + "name": "passReview", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "_value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "_value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "_approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } +] diff --git a/datasources.json b/datasources.json new file mode 100644 index 0000000..b299ebb --- /dev/null +++ b/datasources.json @@ -0,0 +1,11 @@ +{ + "output": "generated/", + "chain": "matic", + "datasources": [ + { + "address": "0x86935f11c86623dec8a25696e1c19a8659cbf95d", + "startBlock": 11516320, + "module": ["erc721", "ownable"] + } + ] +} diff --git a/package.json b/package.json index 2bd5aa1..bee4720 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "dependencies": { "@2fd/graphdoc": "^2.4.0", "@graphprotocol/graph-cli": "0.59.0", - "@graphprotocol/graph-ts": "0.31.0" + "@graphprotocol/graph-ts": "0.31.0", + "@openzeppelin/subgraphs": "^0.1.8" }, "devDependencies": { "apollo-fetch": "^0.7.0", @@ -25,6 +26,7 @@ "ethers": "^5.5.4", "jest": "^27.4.7", "json-diff": "^0.7.1", - "matchstick-as": "^0.6.0" + "matchstick-as": "^0.6.0", + "@amxx/graphprotocol-utils": "^1.1.0" } } diff --git a/schema.graphql b/schema.graphql index 6b57142..eabfcdf 100644 --- a/schema.graphql +++ b/schema.graphql @@ -151,6 +151,19 @@ type User @entity { # borrowedGotchis: [GotchiLending!]! @derivedFrom(field: "borrower") # lendGotchis: [GotchiLending!]! @derivedFrom(field: "originalOwner") + + fakeGotchiCardBalances: [FakeGotchiCardBalance!]! @derivedFrom(field: "account") + fakeGotchiNFTTokens: [FakeGotchiNFTToken!]! @derivedFrom(field: "owner") + + fakeGotchis: String! # from array + amountFakeGotchis: Int! + + currentUniqueFakeGotchisOwned: Int! + totalUniqueFakeGotchisOwned: Int! + + currentUniqueFakeGotchisOwnedArray: String! # from array + totalUniqueFakeGotchisOwnedArray: String! # from array + totalFakeGotchisOwnedArray: String! # from array } type ERC721Listing @entity { @@ -201,6 +214,14 @@ type ERC721Listing @entity { whitelist: Whitelist priceUpdatedAt: BigInt + + fakeGotchi_name: String + fakeGotchi_publisher: User + fakeGotchi_publisherName: String + fakeGotchi_description: String + fakeGotchi_artist: User + fakeGotchi_artistName: String + fakeGotchi_editions: Int } type ERC1155Listing @entity { @@ -274,6 +295,23 @@ type Statistic @entity { totalWearablesVolume: BigInt! totalConsumablesVolume: BigInt! totalTicketsVolume: BigInt! + + totalFakeGotchiOwners: Int + totalFakeGotchiOwnersArray: [Bytes!]! + + totalFakeGotchiPieces: Int + totalNFTs: Int + totalNFTsArray: String! + + burnedNFTs: Int + burnedCards: Int + + tokenIdCounter: Int + + totalEditionsMinted: Int! + totalEditionsCirculating: Int! + + totalEditionsCirculatingArray: String! } type ItemType @entity { @@ -410,3 +448,93 @@ type ERC721BuyOrder @entity { canceledAt: BigInt canceled: Boolean } + +# Cards +type FakeGotchiCardBalance @entity { + id: ID! + contract: Bytes! + token: BigInt! + account: User + value: BigDecimal! + valueExact: BigInt! +} + +# NFT 721 +type FakeGotchiNFTToken @entity { + id: ID! + contract: Bytes! + identifier: BigInt! + owner: User! + approval: User! + uri: String + metadata: MetadataActionLog + + fileHash: String + name: String + publisher: User + publisherName: String + externalLink: String + description: String + artist: User + artistName: String + editions: Int + thumbnailHash: String + thumbnailType: String +} + +type MetadataActionLog @entity { + id: ID! + emitter: User! + timestamp: BigInt! + sender: User + minted: Boolean + fileHash: String + name: String + publisher: User + publisherName: String + externalLink: String + description: String + artist: User + artistName: String + royalty: [Int!] + createdAt: BigInt + editions: Int + fileType: String + thumbnailHash: String + thumbnailType: String + flagCount: Int + likeCount: Int + status: Int +} + +type Generation @entity { + "a generation is a series" + id: ID! + amount: Int +} + +type FakeGotchiStatistic @entity { + id: ID! + metadata: MetadataActionLog + holders: [FakeGotchiHolder!]! @derivedFrom(field: "fakeGotchiStats") + burned: Int + amountHolder: Int + totalSupply: Int + tokenIds: [BigInt!]! +} + +type FakeGotchiHolder @entity { + id: ID! + fakeGotchiStats: FakeGotchiStatistic + holder: User + amount: Int +} + +type FakeGotchiNFTTransfer @entity { + id: ID! + transaction: Bytes! + timestamp: BigInt! + token: FakeGotchiNFTToken! + from: User! + to: User! +} \ No newline at end of file diff --git a/src/fetch/account.ts b/src/fetch/account.ts new file mode 100644 index 0000000..ff2c87e --- /dev/null +++ b/src/fetch/account.ts @@ -0,0 +1,183 @@ +import { Address, BigInt, Bytes, json, log } from "@graphprotocol/graph-ts"; + +import { + User, + MetadataActionLog, + Statistic, +} from "../../generated/schema"; +import { BIGINT_ONE, BIGINT_ZERO } from "../utils/constants"; +import { createJsonFromJSONObject } from "../helper/json"; + +export function updateAccountStatsFrom( + account: User, + metadataId: string +): User { + const parsedJsonCurrent = json.fromString( + account.currentUniqueFakeGotchisOwnedArray + ); + const jsonObjCurrent = parsedJsonCurrent.toObject(); + + // fetch amount of first series + const entryCurrent = jsonObjCurrent.get(metadataId); + + let newAmount = BIGINT_ONE; + if (entryCurrent) { + newAmount = entryCurrent.toBigInt().minus(BIGINT_ONE); + } + if (newAmount.equals(BIGINT_ZERO)) { + account.currentUniqueFakeGotchisOwned = account.currentUniqueFakeGotchisOwned - 1; + } + + // received on token of that series, therefore +1 + jsonObjCurrent.set(metadataId, json.fromString(newAmount.toString())); + + let newString = createJsonFromJSONObject(jsonObjCurrent); + + account.currentUniqueFakeGotchisOwnedArray = newString; + + return account; +} + +export function updateAccountStatsTo( + account: User, + metadataId: string +): User { + const parsedJsonTotal = json.fromString( + account.totalUniqueFakeGotchisOwnedArray + ); + const jsonObjTotal = parsedJsonTotal.toObject(); + + const parsedJsonCurrent = json.fromString( + account.currentUniqueFakeGotchisOwnedArray + ); + const jsonObjCurrent = parsedJsonCurrent.toObject(); + + if (jsonObjTotal == null || jsonObjCurrent == null) { + return account; + } + + // fetch amount of first series + const entryTotal = jsonObjTotal.get(metadataId); + const entryCurrent = jsonObjCurrent.get(metadataId); + + let newAmount = BIGINT_ONE; + if (entryCurrent) { + newAmount = entryCurrent.toBigInt().plus(BIGINT_ONE); + } + + if (!entryTotal) { + account.totalUniqueFakeGotchisOwned = account.totalUniqueFakeGotchisOwned + 1; + jsonObjTotal.set(metadataId, json.fromString(newAmount.toString())); + } + + // update currentPiecesOwned + if (newAmount.equals(BIGINT_ONE)) { + // new piece + account.currentUniqueFakeGotchisOwned = account.currentUniqueFakeGotchisOwned + 1; + } + + // received on token of that series, therefore +1 + jsonObjCurrent.set(metadataId, json.fromString(newAmount.toString())); + + // create new json object string + let newString = createJsonFromJSONObject(jsonObjTotal); + + account.totalUniqueFakeGotchisOwnedArray = newString; + + newString = createJsonFromJSONObject(jsonObjCurrent); + + account.currentUniqueFakeGotchisOwnedArray = newString; + + return account; +} + +export function updateTotalStatsMint( + stats: Statistic, + metaData: MetadataActionLog +): Statistic { + const parsedJsonTotal = json.fromString( + stats.totalEditionsCirculatingArray + ); + const jsonObjTotal = parsedJsonTotal.toObject(); + const element = jsonObjTotal.get(metaData.id); + if (!element) { + stats.totalEditionsCirculating = stats.totalEditionsCirculating + 1; + jsonObjTotal.set(metaData.id, json.fromString("1")); + stats.totalEditionsMinted = stats.totalEditionsMinted + 1; + } else { + const newAmount = element.toI64() + 1; + if (newAmount == 1) { + stats.totalEditionsCirculating = stats.totalEditionsCirculating + 1; + } + jsonObjTotal.set(metaData.id, json.fromString(newAmount.toString())); + } + + stats.totalEditionsCirculatingArray = createJsonFromJSONObject( + jsonObjTotal + ); + + stats.totalNFTs = stats.totalNFTs + 1; + + return stats; +} + +export function updateTotalStatsBurn( + stats: Statistic, + metaData: MetadataActionLog +): Statistic { + const parsedJsonTotal = json.fromString( + stats.totalEditionsCirculatingArray + ); + const jsonObjTotal = parsedJsonTotal.toObject(); + const element = jsonObjTotal.get(metaData.id); + if (element) { + const newAmount = element.toI64() - 1; + if (newAmount == 0) { + stats.totalEditionsCirculating = stats.totalEditionsCirculating - 1; + } + + jsonObjTotal.set(metaData.id, json.fromString(newAmount.toString())); + } + + stats.totalEditionsCirculatingArray = createJsonFromJSONObject( + jsonObjTotal + ); + + stats.totalNFTs = stats.totalNFTs - 1; + stats.burnedNFTs = stats.burnedNFTs + 1; + return stats; +} + +export function addToOwnersIfNotExists( + totalStats: Statistic, + owner: Bytes +): Statistic { + let ownersArray = totalStats.totalFakeGotchiOwnersArray; + if (ownersArray.indexOf(owner) == -1) { + ownersArray.push(owner); + totalStats.totalFakeGotchiOwnersArray = ownersArray; + totalStats.totalFakeGotchiOwners = ownersArray.length; + } + + return totalStats; +} + +export function removeFromOwnersIfExistsAndBalanceNotZero( + totalStats: Statistic, + owner: Bytes, + amount: i32 +): Statistic { + if (amount > 0) { + return totalStats; + } + + let ownersArray = totalStats.totalFakeGotchiOwnersArray; + let index = ownersArray.indexOf(owner); + if (index != -1) { + ownersArray.splice(index, 1); + totalStats.totalFakeGotchiOwnersArray = ownersArray; + totalStats.totalFakeGotchiOwners = ownersArray.length; + } + + return totalStats; +} diff --git a/src/fetch/erc1155.ts b/src/fetch/erc1155.ts new file mode 100644 index 0000000..bcbe730 --- /dev/null +++ b/src/fetch/erc1155.ts @@ -0,0 +1,41 @@ +import { Address, BigInt } from "@graphprotocol/graph-ts"; + +import { + User, + FakeGotchiCardBalance, +} from "../../generated/schema"; + +import { constants } from "@amxx/graphprotocol-utils"; + +export function replaceURI(uri: string, identifier: BigInt): string { + return uri.replaceAll( + "{id}", + identifier + .toHex() + .slice(2) + .padStart(64, "0") + ); +} + +export function fetchFakeGotchiCardBalance( + token: BigInt, + account: User | null, + contract: Address +): FakeGotchiCardBalance { + let id = token.toString() + .concat("/") + .concat(account ? account.id.toString() : "totalSupply"); + let balance = FakeGotchiCardBalance.load(id); + + if (balance == null) { + balance = new FakeGotchiCardBalance(id); + balance.contract = contract; + balance.token = token; + balance.account = account ? account.id : null; + balance.value = constants.BIGDECIMAL_ZERO; + balance.valueExact = constants.BIGINT_ZERO; + balance.save(); + } + + return balance as FakeGotchiCardBalance; +} diff --git a/src/fetch/erc165.ts b/src/fetch/erc165.ts new file mode 100644 index 0000000..41d3bb3 --- /dev/null +++ b/src/fetch/erc165.ts @@ -0,0 +1,13 @@ +import { ethereum, Bytes } from '@graphprotocol/graph-ts' + +export function supportsInterface(contract: ethereum.SmartContract, interfaceId: String, expected: boolean = true): boolean { + let result = ethereum.call(new ethereum.SmartContractCall( + contract._name, // '', + contract._address, // address, + 'supportsInterface', // '', + 'supportsInterface(bytes4):(bool)', + [ethereum.Value.fromFixedBytes(Bytes.fromHexString(interfaceId) as Bytes)] + )) + + return result != null && (result as Array)[0].toBoolean() == expected +} diff --git a/src/fetch/erc721.ts b/src/fetch/erc721.ts new file mode 100644 index 0000000..2764ab1 --- /dev/null +++ b/src/fetch/erc721.ts @@ -0,0 +1,55 @@ +import { + Address, + BigInt, + Bytes, + JSONValue, + TypedMap, + log +} from "@graphprotocol/graph-ts"; + +import { + User, + FakeGotchiNFTToken, +} from "../../generated/schema"; + +import { constants } from "@amxx/graphprotocol-utils"; + +import { IERC721 } from "../../generated/FAKEGotchisNFTDiamond/IERC721"; +import { getOrCreateUser } from "../utils/helpers/diamond"; + +export function fetchFakeGotchiNFTToken( + contract: Address, + identifier: BigInt +): FakeGotchiNFTToken { + let id = contract + .toHex() + .concat("/") + .concat(identifier.toHex()); + let token = FakeGotchiNFTToken.load(id); + + if (token == null) { + token = new FakeGotchiNFTToken(id); + token.contract = contract; + token.identifier = identifier; + token.approval = getOrCreateUser(constants.ADDRESS_ZERO.toHex()).id; + + let erc721 = IERC721.bind(Address.fromBytes(contract)); + let try_tokenURI = erc721.try_tokenURI(identifier); + token.uri = try_tokenURI.reverted ? "" : try_tokenURI.value; + } + + + return token as FakeGotchiNFTToken; +} + +export function getFakeGotchiNFTToken( + contract: Address, + identifier: BigInt +): FakeGotchiNFTToken | null { + let id = contract + .toHex() + .concat("/") + .concat(identifier.toHex()); + let token = FakeGotchiNFTToken.load(id); + return token; +} \ No newline at end of file diff --git a/src/helper/entities.ts b/src/helper/entities.ts new file mode 100644 index 0000000..df10b5c --- /dev/null +++ b/src/helper/entities.ts @@ -0,0 +1,104 @@ +import { Address, BigInt, Bytes, ethereum } from "@graphprotocol/graph-ts"; +import { Transfer } from "../../generated/FAKEGotchisNFTDiamond/IERC721"; +import { + FakeGotchiHolder, + FakeGotchiStatistic, + Statistic +} from "../../generated/schema"; +import { ADDRESS_BURN, ADDRESS_DEAD, ADDRESS_ZERO, BIGINT_ZERO } from "../utils/constants"; + +// export function getOrCreateCard(id: BigInt): Card + +export function getOrCreateStats(): Statistic { + let stat = Statistic.load("0"); + if (!stat) { + stat = new Statistic("0"); + stat.burnedCards = 0; + stat.burnedNFTs = 0; + stat.totalNFTs = 0; + stat.totalFakeGotchiOwners = 0; + stat.totalFakeGotchiPieces = 0; + stat.totalNFTsArray = "{}"; + stat.totalFakeGotchiOwnersArray = new Array(); + stat.tokenIdCounter = 0; + stat.totalEditionsCirculating = 0; + stat.totalEditionsMinted = 0; + stat.totalEditionsCirculatingArray = "{}"; + + stat.portalsBought = BIGINT_ZERO; + stat.portalsOpened = BIGINT_ZERO; + stat.aavegotchisClaimed = BIGINT_ZERO; + stat.erc721ActiveListingCount = BIGINT_ZERO; + stat.erc1155ActiveListingCount = BIGINT_ZERO; + stat.erc721TotalVolume = BIGINT_ZERO; + stat.erc1155TotalVolume = BIGINT_ZERO; + + //new + stat.totalWearablesVolume = BIGINT_ZERO; + stat.totalConsumablesVolume = BIGINT_ZERO; + stat.totalTicketsVolume = BIGINT_ZERO; + + stat.aavegotchisBorrowed = BIGINT_ZERO; + stat.aavegotchisSacrificed = BIGINT_ZERO; + } + + return stat; +} + +export function getOrCreateFakeGotchiStatistic(metadataId: string): FakeGotchiStatistic { + let stat = FakeGotchiStatistic.load(metadataId); + if (!stat) { + stat = new FakeGotchiStatistic(metadataId); + stat.burned = 0; + stat.metadata = metadataId; + stat.amountHolder = 0; + stat.totalSupply = 0; + stat.tokenIds = new Array(); + } + + return stat; +} + +export function getFakeGotchiHolder( + holderAddress: Address, + metadataId: string +): FakeGotchiHolder { + let id = holderAddress.toHexString() + "-" + metadataId; + let holder = FakeGotchiHolder.load(id); + if (!holder) { + holder = new FakeGotchiHolder(id); + holder.amount = 0; + holder.holder = holderAddress.toHexString(); + holder.fakeGotchiStats = metadataId; + } + + return holder; +} + +export function isMint(event: Transfer): boolean { + let from = event.params._from; + + if ([ADDRESS_ZERO, ADDRESS_BURN].indexOf(from) !== -1) { + return true; + } + + return false; +} + +export function isBurn(event: Transfer): boolean { + let to = event.params._to; + + if ([ADDRESS_ZERO, ADDRESS_BURN, ADDRESS_DEAD].indexOf(to) !== -1) { + return true; + } + + return false; +} + +export function isTransfer(event: Transfer): boolean { + if (!isBurn(event) && !isMint(event)) { + return true; + } + + return false; +} diff --git a/src/helper/json.ts b/src/helper/json.ts new file mode 100644 index 0000000..a083fcc --- /dev/null +++ b/src/helper/json.ts @@ -0,0 +1,27 @@ +import { + BigInt, + json, + JSONValueKind, + JSONValue, + log +} from "@graphprotocol/graph-ts"; +import { TypedMap } from "@graphprotocol/graph-ts"; + +export function createJsonFromJSONObject( + obj: TypedMap +): string { + let newString = "{"; + for (let i = 0; i < obj.entries.length; i++) { + let key = obj.entries[i].key; + let value = obj.entries[i].value; + + if (i != 0) { + newString += ","; + } + + newString += `"${key.toString()}":${value.toBigInt().toString()}`; + } + newString += "}"; + + return newString; +} diff --git a/src/mappings/diamond.ts b/src/mappings/diamond.ts index 48031b3..2735ef2 100644 --- a/src/mappings/diamond.ts +++ b/src/mappings/diamond.ts @@ -493,6 +493,7 @@ export function handleERC721ListingAdd(event: ERC721ListingAdd): void { event.params.erc721TokenId.toString(), event )!; + gotchi.locked = true; listing.collateral = gotchi.collateral; gotchi.activeListing = event.params.listingId; gotchi.save(); @@ -593,6 +594,7 @@ export function handleERC721ExecutedListing( historicalPrices.push(event.params.priceInWei); gotchi.historicalPrices = historicalPrices; gotchi.activeListing = null; + gotchi.locked = false; gotchi.save(); } else if (event.params.category == BigInt.fromI32(4)) { let listing = getOrCreateERC721Listing( @@ -652,6 +654,7 @@ export function handleERC721ListingCancelled( } else if (listing.category.equals(BigInt.fromI32(3))) { let gotchi = getOrCreateAavegotchi(listing.tokenId.toString(), event)!; gotchi.activeListing = null; + gotchi.locked = false; gotchi.save(); } else if (listing.category.equals(BigInt.fromI32(4))) { let parcel = getOrCreateParcel( @@ -684,6 +687,7 @@ export function handleERC721ListingRemoved(event: ERC721ListingRemoved): void { } else if (listing.category.equals(BigInt.fromI32(3))) { let gotchi = getOrCreateAavegotchi(listing.tokenId.toString(), event)!; gotchi.activeListing = null; + gotchi.locked = false; gotchi.save(); } else if (listing.category.equals(BigInt.fromI32(4))) { let parcel = getOrCreateParcel( diff --git a/src/mappings/fakeGotchisCard.ts b/src/mappings/fakeGotchisCard.ts new file mode 100644 index 0000000..894f0d6 --- /dev/null +++ b/src/mappings/fakeGotchisCard.ts @@ -0,0 +1,109 @@ +import { ethereum, BigInt, Address } from "@graphprotocol/graph-ts"; + +import { + User, + Generation, +} from "../../generated/schema"; + +import { + ApprovalForAll as ApprovalForAllEvent, + TransferBatch as TransferBatchEvent, + TransferSingle as TransferSingleEvent, + URI as URIEvent, + NewSeriesStarted as NewSeriesStartedEvent, + NewSeriesStarted, +} from "../../generated/FAKEGotchisCardDiamond/IERC1155"; + +import { + constants, + decimals, + events, + transactions, +} from "@amxx/graphprotocol-utils"; + +import { + fetchFakeGotchiCardBalance, + replaceURI, +} from "../fetch/erc1155"; +import { getOrCreateUser } from "../utils/helpers/diamond"; + +function registerTransfer( + event: ethereum.Event, + suffix: string, + contract: Address, + from: User, + to: User, + id: BigInt, + value: BigInt +): void { + if (from.id == constants.ADDRESS_ZERO.toHexString()) { + let totalSupply = fetchFakeGotchiCardBalance(id, null, contract); + totalSupply.valueExact = totalSupply.valueExact.plus(value); + totalSupply.value = decimals.toDecimals(totalSupply.valueExact); + totalSupply.save(); + } else { + let balance = fetchFakeGotchiCardBalance(id, from, contract); + balance.valueExact = balance.valueExact.minus(value); + balance.value = decimals.toDecimals(balance.valueExact); + balance.save(); + } + + if (to.id == constants.ADDRESS_ZERO.toHexString()) { + let totalSupply = fetchFakeGotchiCardBalance(id, null, contract); + totalSupply.valueExact = totalSupply.valueExact.minus(value); + totalSupply.value = decimals.toDecimals(totalSupply.valueExact); + totalSupply.save(); + } else { + let balance = fetchFakeGotchiCardBalance(id, to, contract); + balance.valueExact = balance.valueExact.plus(value); + balance.value = decimals.toDecimals(balance.valueExact); + balance.save(); + + } +} + +export function handleTransferSingle(event: TransferSingleEvent): void { + let from = getOrCreateUser(event.params._from.toHex()); + let to = getOrCreateUser(event.params._to.toHex()); + + registerTransfer( + event, + "", + event.address, + from, + to, + event.params._id, + event.params._value + ); +} + +export function handleTransferBatch(event: TransferBatchEvent): void { + let from = getOrCreateUser(event.params._from.toHex()); + let to = getOrCreateUser(event.params._to.toHex()); + + let ids = event.params._ids; + let values = event.params._values; + + // If this equality doesn't hold (some devs actually don't follox the ERC specifications) then we just can't make + // sens of what is happening. Don't try to make something out of stupid code, and just throw the event. This + // contract doesn't follow the standard anyway. + if (ids.length == values.length) { + for (let i = 0; i < ids.length; ++i) { + registerTransfer( + event, + "/".concat(i.toString()), + event.address, + from, + to, + ids[i], + values[i] + ); + } + } +} + +export function handleNewSeriesStarted(event: NewSeriesStarted): void { + let series = new Generation(event.params.id.toString()); + series.amount = event.params.amount.toI32(); + series.save(); +} diff --git a/src/mappings/fakeGotchisNFT.ts b/src/mappings/fakeGotchisNFT.ts new file mode 100644 index 0000000..7680a98 --- /dev/null +++ b/src/mappings/fakeGotchisNFT.ts @@ -0,0 +1,226 @@ +import { + FakeGotchiNFTTransfer, + MetadataActionLog, +} from "../../generated/schema"; + +import { + MetadataActionLog as MetadataActionLogEvent, + MetadataLike as MetadataLikeEvent, + Transfer as TransferEvent, + MetadataFlag as MetadataFlagEvent +} from "../../generated/FAKEGotchisNFTDiamond/IERC721"; +import { events, transactions } from "@amxx/graphprotocol-utils"; + +import { + addToOwnersIfNotExists, + removeFromOwnersIfExistsAndBalanceNotZero, + updateAccountStatsFrom, + updateAccountStatsTo, + updateTotalStatsBurn, + updateTotalStatsMint +} from "../fetch/account"; + + +import { + METADATA_STATUS_APPROVED, + METADATA_STATUS_DECLINED, + METADATA_STATUS_PAUSED, + METADATA_STATUS_PENDING +} from "../utils/constants"; + +import { + fetchFakeGotchiNFTToken, +} from "../fetch/erc721"; +import { BigInt } from "@graphprotocol/graph-ts"; +import { + getFakeGotchiHolder, + getOrCreateFakeGotchiStatistic, + getOrCreateStats, + isBurn, + isMint, + isTransfer +} from "../helper/entities"; +import { getOrCreateUser } from "../utils/helpers/diamond"; + +export function handleTransfer(event: TransferEvent): void { + const isMintFlag = isMint(event); + const isBurnFlag = isBurn(event); + const isTransferFlag = isTransfer(event); + + // fetch sender and receiver + let from = getOrCreateUser(event.params._from.toHexString()); + let to = getOrCreateUser(event.params._to.toHexString()); + + // update token owner + let token = fetchFakeGotchiNFTToken(event.address, event.params._tokenId); + token.owner = to.id; + token.save(); + + // create event entity + let ev = new FakeGotchiNFTTransfer(events.id(event)); + ev.transaction = event.transaction.hash; + ev.timestamp = event.block.timestamp; + ev.token = token.id; + ev.from = from.id; + ev.to = to.id; + ev.save(); + + // fetch metadata + let metadata = MetadataActionLog.load(token.metadata!)!; + let nftStats = getOrCreateFakeGotchiStatistic(metadata.id); + + let stats = getOrCreateStats(); + // update account entity + if (isMintFlag || isTransferFlag) { + to = updateAccountStatsTo(to, metadata.id); + to.amountFakeGotchis = to.amountFakeGotchis + 1; + + let receiver = getFakeGotchiHolder(event.params._to, metadata.id); + receiver.amount = receiver.amount + 1; + receiver.save(); + + // nftStats = updateHolderMint(nftStats, event.params._to, 1); + if (receiver.amount == 1) { + nftStats.amountHolder = nftStats.amountHolder + 1; + } + + stats = addToOwnersIfNotExists(stats, event.params._to); + } + + if (isBurnFlag || isTransferFlag) { + from = updateAccountStatsFrom(from, metadata.id); + from.amountFakeGotchis = from.amountFakeGotchis - 1; + + let sender = getFakeGotchiHolder(event.params._from, metadata.id); + sender.amount = sender.amount - 1; + sender.save(); + + if (sender.amount == 0) { + nftStats.amountHolder = nftStats.amountHolder - 1; + } + + stats = removeFromOwnersIfExistsAndBalanceNotZero( + stats, + event.params._from, + from.amountFakeGotchis + ); + } + + if (isMintFlag) { + stats = updateTotalStatsMint(stats, metadata); + + nftStats.totalSupply = nftStats.totalSupply + 1; + let tokens = nftStats.tokenIds; + tokens.push(event.params._tokenId); + nftStats.tokenIds = tokens; + } + + if (isBurnFlag) { + stats = updateTotalStatsBurn(stats, metadata); + + nftStats.burned = nftStats.burned + 1; + nftStats.totalSupply = nftStats.totalSupply - 1; + + let tokens = nftStats.tokenIds; + let index = tokens.indexOf(event.params._tokenId); + tokens.splice(index, 1); + nftStats.tokenIds = tokens; + + token.editions = token.editions - 1; + + metadata.editions = metadata.editions - 1; + } + + nftStats.save(); + metadata.save(); + stats.save(); + to.save(); + from.save(); +} + +export function handleMetadataActionLog(event: MetadataActionLogEvent): void { + let ev = MetadataActionLog.load(event.params.id.toString()); + if (!ev) { + ev = new MetadataActionLog(event.params.id.toString()); + ev.flagCount = 0; + ev.likeCount = 0; + } + let artist = getOrCreateUser(event.params.metaData.artist.toHexString()); + let publisher = getOrCreateUser(event.params.metaData.publisher.toHexString()); + + ev.emitter = event.address.toHexString(); + ev.timestamp = event.block.timestamp; + ev.minted = event.params.metaData.minted; + ev.artist = artist.id; + ev.artistName = event.params.metaData.artistName; + ev.createdAt = event.params.metaData.createdAt; + ev.description = event.params.metaData.description; + ev.externalLink = event.params.metaData.externalLink; + ev.fileHash = event.params.metaData.fileHash; + ev.name = event.params.metaData.name; + ev.publisher = publisher.id; + ev.publisherName = event.params.metaData.publisherName; + ev.royalty = event.params.metaData.royalty; + ev.status = event.params.metaData.status; + ev.editions = event.params.metaData.editions; + ev.fileType = event.params.metaData.fileType; + ev.thumbnailHash = event.params.metaData.thumbnailHash; + ev.thumbnailType = event.params.metaData.thumbnailType; + + ev.save(); + + if (ev.status == METADATA_STATUS_APPROVED) { + // Update Global Stats + let stats = getOrCreateStats(); + stats.totalFakeGotchiPieces = stats.totalFakeGotchiPieces + 1; + + // create tokens tokens and attach metadata + let startId = stats.tokenIdCounter; + stats.tokenIdCounter = stats.tokenIdCounter + ev.editions; + for (let i = 0; i < ev.editions; i++) { + let id = startId + i; + let token = fetchFakeGotchiNFTToken(event.address, BigInt.fromI32(id)); + token.metadata = ev.id; + token.owner = ev.publisher!; + token.contract = event.address; + token.artist = event.params.metaData.artist.toHexString(); + token.artistName = event.params.metaData.artistName; + token.description = event.params.metaData.description; + token.externalLink = event.params.metaData.externalLink; + token.fileHash = event.params.metaData.fileHash; + token.name = event.params.metaData.name; + token.publisher = event.params.metaData.publisher.toHexString(); + token.publisherName = event.params.metaData.publisherName; + token.editions = event.params.metaData.editions; + token.thumbnailHash = event.params.metaData.thumbnailHash; + token.thumbnailType = event.params.metaData.thumbnailType; + token.save(); + } + stats.save(); + } + + artist.save(); + publisher.save(); +} + +export function handleMetadataFlag(event: MetadataFlagEvent): void { + let metadata = MetadataActionLog.load(event.params._id.toString())!; + metadata.flagCount = metadata.flagCount + 1; + if (metadata.flagCount == 10) { + metadata.status = METADATA_STATUS_PAUSED; + } + metadata.save(); + + let flagger = getOrCreateUser(event.params._flaggedBy.toHexString()); + flagger.save(); +} + +export function handleMetadataLike(event: MetadataLikeEvent): void { + let metadata = MetadataActionLog.load(event.params._id.toString())!; + metadata.likeCount = metadata.likeCount + 1; + metadata.save(); + + let liker = getOrCreateUser(event.params._likedBy.toHexString()); + liker.save(); + +} \ No newline at end of file diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 551ce96..9b202ef 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -1,4 +1,4 @@ -import { BigDecimal, BigInt } from "@graphprotocol/graph-ts"; +import { BigDecimal, BigInt, Address } from "@graphprotocol/graph-ts"; import { toDecimal } from "./decimals"; export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; @@ -17,3 +17,22 @@ export let STATUS_OPEN_PORTAL = BigInt.fromI32(2); export let STATUS_AAVEGOTCHI = BigInt.fromI32(3); export let BLOCK_DISABLE_OLD_LENDING_EVENTS = BigInt.fromI32(31313604); + +export const ADDRESS_ZERO = Address.fromString( + "0x0000000000000000000000000000000000000000" +); + +export const ADDRESS_BURN = Address.fromString( + "0xffffffffffffffffffffffffffffffffffffffff" +); + +export const ADDRESS_DEAD = Address.fromString( + "0x000000000000000000000000000000000000dead" +); + +export const METADATA_STATUS_PENDING = 0; +export const METADATA_STATUS_PAUSED = 1; +export const METADATA_STATUS_APPROVED = 2; +export const METADATA_STATUS_DECLINED = 3; + + diff --git a/src/utils/helpers/diamond.ts b/src/utils/helpers/diamond.ts index 0928531..e825f81 100644 --- a/src/utils/helpers/diamond.ts +++ b/src/utils/helpers/diamond.ts @@ -23,6 +23,7 @@ import { ClaimedToken, ERC721BuyOrder, } from "../../../generated/schema"; +import { fetchFakeGotchiNFTToken, getFakeGotchiNFTToken } from "../../fetch/erc721"; import { BIGINT_ZERO, STATUS_AAVEGOTCHI, ZERO_ADDRESS } from "../constants"; import { Address, @@ -103,6 +104,15 @@ export function getOrCreateUser( user = new User(id); user.gotchisLentOut = new Array(); user.gotchisBorrowed = new Array(); + user.fakeGotchis = "{}"; + user.amountFakeGotchis = 0; + + user.currentUniqueFakeGotchisOwned = 0; + user.currentUniqueFakeGotchisOwnedArray = "{}"; + user.totalUniqueFakeGotchisOwned = 0; + user.totalUniqueFakeGotchisOwnedArray = "{}"; + + user.totalFakeGotchisOwnedArray = "{}"; } return user as User; @@ -214,6 +224,21 @@ export function updateERC721ListingInfo( listing.blockCreated = event.block.number; } + let erc721Token = getFakeGotchiNFTToken( + listingInfo.erc721TokenAddress, + listingInfo.erc721TokenId + ); + + if (erc721Token != null) { + listing.fakeGotchi_name = erc721Token.name; + listing.fakeGotchi_publisher = erc721Token.publisher; + listing.fakeGotchi_description = erc721Token.description; + listing.fakeGotchi_artist = erc721Token.artist; + listing.fakeGotchi_artistName = erc721Token.artistName; + listing.fakeGotchi_editions = erc721Token.editions; + listing.fakeGotchi_publisherName = erc721Token.publisherName; + } + if (listing.category.toI32() <= 2) { let portal = getOrCreatePortal( listingInfo.erc721TokenId.toString(), @@ -556,6 +581,18 @@ export function getStatisticEntity(): Statistic { stats.aavegotchisBorrowed = BIGINT_ZERO; stats.aavegotchisSacrificed = BIGINT_ZERO; + stats.burnedCards = 0; + stats.burnedNFTs = 0; + stats.totalNFTs = 0; + stats.totalFakeGotchiOwners = 0; + stats.totalFakeGotchiPieces = 0; + stats.totalNFTsArray = "{}"; + stats.totalFakeGotchiOwnersArray = new Array(); + stats.tokenIdCounter = 0; + stats.totalEditionsCirculating = 0; + stats.totalEditionsMinted = 0; + stats.totalEditionsCirculatingArray = "{}"; + stats.save(); } diff --git a/subgraph.mumbai.yaml b/subgraph.mumbai.yaml index a053da8..6ac7a48 100644 --- a/subgraph.mumbai.yaml +++ b/subgraph.mumbai.yaml @@ -3,7 +3,7 @@ specVersion: 0.0.4 # - grafting # graft: # base: QmV3LtUtUCiD774HXR3D9SJBNgw2VNcXZM9McyMGTfotBQ # Subgraph ID of base subgraph -# block: 39550000 # Block number +# block: 28127642 # Block number description: Aavegotchi Core Mumbai repository: schema: @@ -243,3 +243,57 @@ dataSources: - event: KinshipBurned(uint256,uint256) handler: handleKinshipBurned file: ./src/mappings/diamond.ts + - kind: ethereum/contract + name: FAKEGotchisCardDiamond + network: mumbai + source: + address: "0x118c19F39a4Ad9032B7b7b228A2Cd927d3FddA13" + abi: IERC1155 + startBlock: 28400000 + mapping: + kind: ethereum/events + apiVersion: 0.0.5 + language: wasm/assemblyscript + entities: + - Card + abis: + - name: IERC721 + file: ./abis/diamond_erc721.json + - name: IERC1155 + file: ./abis/diamond_erc1155.json + eventHandlers: + - event: NewSeriesStarted(indexed uint256,indexed uint256) + handler: handleNewSeriesStarted + - event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256) + handler: handleTransferSingle + - event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[]) + handler: handleTransferBatch + file: ./src/mappings/fakeGotchisCard.ts + - kind: ethereum/contract + name: FAKEGotchisNFTDiamond + network: mumbai + source: + address: "0x330088c3372f4F78cF023DF16E1e1564109191dc" + abi: IERC721 + startBlock: 28400000 + mapping: + kind: ethereum/events + apiVersion: 0.0.5 + language: wasm/assemblyscript + entities: + - NFT + abis: + - name: IERC721 + file: ./abis/diamond_erc721.json + - name: IERC1155 + file: ./abis/diamond_erc1155.json + eventHandlers: + - event: Transfer(indexed address,indexed address,indexed uint256) + handler: handleTransfer + - event: MetadataActionLog(indexed uint256,(address,uint16[2],uint16,uint32,uint32,address,uint40,uint8,bool,string,string,string,string,string,string,string,string,string)) + handler: handleMetadataActionLog + - event: MetadataFlag(indexed uint256,address) + handler: handleMetadataFlag + - event: MetadataLike(indexed uint256,address) + handler: handleMetadataLike + file: ./src/mappings/fakeGotchisNFT.ts \ No newline at end of file diff --git a/subgraph.yaml b/subgraph.yaml index 15504e2..c3ce391 100644 --- a/subgraph.yaml +++ b/subgraph.yaml @@ -2,8 +2,8 @@ specVersion: 0.0.4 # features: # - grafting # graft: -# base: QmY6zf3YHfzuYTHFtLkDDMLimkK1fr9pCQbtCppkg24ZW9 # Subgraph ID of base subgraph -# block: 48000000 # Block number +# base: QmP2tR7PzfqCmxK9GmPvmAJnpTaATn6YFbRX77UGw68yHe # Subgraph ID of base subgraph +# block: 34520145 # Block number description: Aavegotchi Core Matic repository: schema: @@ -243,3 +243,57 @@ dataSources: - event: KinshipBurned(uint256,uint256) handler: handleKinshipBurned file: ./src/mappings/diamond.ts + - kind: ethereum/contract + name: FAKEGotchisCardDiamond + network: matic + source: + address: "0x9f6BcC63e86D44c46e85564E9383E650dc0b56D7" + abi: IERC1155 + startBlock: 34520146 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - Card + abis: + - name: IERC721 + file: ./abis/diamond_erc721.json + - name: IERC1155 + file: ./abis/diamond_erc1155.json + eventHandlers: + - event: NewSeriesStarted(indexed uint256,indexed uint256) + handler: handleNewSeriesStarted + - event: TransferSingle(indexed address,indexed address,indexed address,uint256,uint256) + handler: handleTransferSingle + - event: TransferBatch(indexed address,indexed address,indexed address,uint256[],uint256[]) + handler: handleTransferBatch + file: ./src/mappings/fakeGotchisCard.ts + - kind: ethereum/contract + name: FAKEGotchisNFTDiamond + network: matic + source: + address: "0xA4E3513c98b30d4D7cc578d2C328Bd550725D1D0" + abi: IERC721 + startBlock: 34520176 + mapping: + kind: ethereum/events + apiVersion: 0.0.6 + language: wasm/assemblyscript + entities: + - NFT + abis: + - name: IERC721 + file: ./abis/diamond_erc721.json + - name: IERC1155 + file: ./abis/diamond_erc1155.json + eventHandlers: + - event: Transfer(indexed address,indexed address,indexed uint256) + handler: handleTransfer + - event: MetadataActionLog(indexed uint256,(address,uint16[2],uint16,uint32,uint32,address,uint40,uint8,bool,string,string,string,string,string,string,string,string,string)) + handler: handleMetadataActionLog + - event: MetadataFlag(indexed uint256,address) + handler: handleMetadataFlag + - event: MetadataLike(indexed uint256,address) + handler: handleMetadataLike + file: ./src/mappings/fakeGotchisNFT.ts diff --git a/tests/.latest.json b/tests/.latest.json index 1880dc2..85c2dc8 100644 --- a/tests/.latest.json +++ b/tests/.latest.json @@ -1,4 +1,4 @@ { - "version": "0.5.4", - "timestamp": 1697108080727 + "version": "0.6.0", + "timestamp": 1702375664971 } \ No newline at end of file diff --git a/tests/handleERC721ExecutedListing.test.ts b/tests/handleERC721ExecutedListing.test.ts index 38dd74e..fd89735 100644 --- a/tests/handleERC721ExecutedListing.test.ts +++ b/tests/handleERC721ExecutedListing.test.ts @@ -43,7 +43,7 @@ test("handleERC721Listing - should add price to historicalPrices of aavegotchi i gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; @@ -73,7 +73,7 @@ test("handleERC721Listing - should add price to historicalPrices of aavegotchi i listing.cancelled = false; listing.nameLowerCase = "TEST123"; listing.category = BIGINT_ZERO; - listing.erc721TokenAddress = Address.fromString(ZERO_ADDRESS); + listing.erc721TokenAddress = event.params.erc721TokenAddress listing.tokenId = BIGINT_ZERO; listing.seller = Address.fromString(ZERO_ADDRESS); listing.timeCreated = BIGINT_ZERO; @@ -139,7 +139,7 @@ test("handleERC721Listing - should set blockCreated to block number when listing gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; @@ -169,7 +169,7 @@ test("handleERC721Listing - should set blockCreated to block number when listing listing.cancelled = false; listing.nameLowerCase = "TEST123"; listing.category = BIGINT_ZERO; - listing.erc721TokenAddress = Address.fromString(ZERO_ADDRESS); + listing.erc721TokenAddress = event.params.erc721TokenAddress listing.tokenId = BIGINT_ZERO; listing.seller = Address.fromString(ZERO_ADDRESS); listing.timeCreated = BIGINT_ZERO; @@ -201,7 +201,7 @@ test("handleERC721Listing - reorg: should set block created if cancel events hap gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; @@ -231,7 +231,7 @@ test("handleERC721Listing - reorg: should set block created if cancel events hap listing.cancelled = false; listing.nameLowerCase = "TEST123"; listing.category = BIGINT_ZERO; - listing.erc721TokenAddress = Address.fromString(ZERO_ADDRESS); + listing.erc721TokenAddress = Address.fromString("0x86935F11C86623deC8a25696E1C19a8659CbF95d"); listing.tokenId = BIGINT_ZERO; listing.seller = Address.fromString(ZERO_ADDRESS); listing.timeCreated = BIGINT_ZERO; diff --git a/tests/handleERC721ListingAdded.test.ts b/tests/handleERC721ListingAdded.test.ts index 2bc4915..df225ca 100644 --- a/tests/handleERC721ListingAdded.test.ts +++ b/tests/handleERC721ListingAdded.test.ts @@ -29,7 +29,7 @@ test("should add gotchi name lower case if token is an aavegtochi", () => { gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; diff --git a/tests/handleEquip.test.ts b/tests/handleEquip.test.ts index 96b29ce..73563b0 100644 --- a/tests/handleEquip.test.ts +++ b/tests/handleEquip.test.ts @@ -19,7 +19,7 @@ test("should update withSetsRarityScore", () => { gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; diff --git a/tests/handleInteract.test.ts b/tests/handleInteract.test.ts index 697540d..4cb09d3 100644 --- a/tests/handleInteract.test.ts +++ b/tests/handleInteract.test.ts @@ -25,7 +25,7 @@ test("Count as interacted if gotchi is claimed", () => { gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "Test"; diff --git a/tests/handleSetAavegotchiName.test.ts b/tests/handleSetAavegotchiName.test.ts index 0cbf020..085a062 100644 --- a/tests/handleSetAavegotchiName.test.ts +++ b/tests/handleSetAavegotchiName.test.ts @@ -20,7 +20,7 @@ test("should update nameToLower on Listing entity of Aavegotchi", () => { gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; diff --git a/tests/handleSpendSkillpoints.test.ts b/tests/handleSpendSkillpoints.test.ts index 76d1fc7..8627510 100644 --- a/tests/handleSpendSkillpoints.test.ts +++ b/tests/handleSpendSkillpoints.test.ts @@ -18,7 +18,7 @@ test("should update withSetsRarityScore", () => { gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; diff --git a/tests/handleTransfer.test.ts b/tests/handleTransfer.test.ts new file mode 100644 index 0000000..033ab7c --- /dev/null +++ b/tests/handleTransfer.test.ts @@ -0,0 +1,277 @@ +import { + Address, + BigInt, + ethereum, + store, +} from "@graphprotocol/graph-ts"; +import { + describe, + test, + beforeAll, + newMockEvent, + assert, + createMockedFunction, +} from "matchstick-as/assembly/index"; +import { Transfer } from "../generated/FAKEGotchisNFTDiamond/IERC721"; +import { + FakeGotchiNFTToken, + MetadataActionLog, + FakeGotchiHolder, + User, +} from "../generated/schema"; +import { + ADDRESS_DEAD, + ADDRESS_ZERO, + BIGINT_ONE, + BIGINT_ZERO, +} from "../src/utils/constants"; +import { handleTransfer } from "../src/mappings/fakeGotchisNFT"; + +export function createTransferEvent( + from: string, + to: string, + tokenId: i32 +): Transfer { + let mockEvent = newMockEvent(); + let event = new Transfer( + mockEvent.address, + mockEvent.logIndex, + mockEvent.transactionLogIndex, + mockEvent.logType, + mockEvent.block, + mockEvent.transaction, + mockEvent.parameters, + null + ); + event.parameters = new Array(); + let fromAddress = new ethereum.EventParam( + "_from", + ethereum.Value.fromAddress(Address.fromString(from)) + ); + let toAddress = new ethereum.EventParam( + "_to", + ethereum.Value.fromAddress(Address.fromString(to)) + ); + let tokenIdNumber = new ethereum.EventParam( + "_tokenId", + ethereum.Value.fromI32(tokenId) + ); + + event.parameters.push(fromAddress); + event.parameters.push(toAddress); + event.parameters.push(tokenIdNumber); + + return event; +} + +const sender = "0xacb0ba5da1101f204356420f87e1f1047ac65c8c"; +const receiver = "0x46a3a41bd932244dd08186e4c19f1a7e48cbcdf4"; +const tokenId = 1; +const event = createTransferEvent(sender, receiver, tokenId); + +describe("handleTransfer", () => { + beforeAll(() => { + const log = new MetadataActionLog("1"); + log.emitter = sender; + log.timestamp = BIGINT_ZERO; + log.editions = 1; + + const tokenEntityId = event.transaction + .to!.toHex() + .concat("/") + .concat(BIGINT_ONE.toHex()); + const token = new FakeGotchiNFTToken(tokenEntityId); + token.metadata = "1"; + token.contract = ADDRESS_DEAD; + token.identifier = BIGINT_ONE; + token.owner = ADDRESS_DEAD.toHexString(); + token.approval = ADDRESS_ZERO.toHexString(); + token.editions = 0; + + const senderAccount = new User(sender); + senderAccount.totalFakeGotchisOwnedArray = "{}"; + senderAccount.totalUniqueFakeGotchisOwnedArray = "{}"; + senderAccount.totalUniqueFakeGotchisOwned = 0; + senderAccount.currentUniqueFakeGotchisOwned = 0; + senderAccount.currentUniqueFakeGotchisOwnedArray = "{}"; + senderAccount.fakeGotchis = "{}"; + senderAccount.amountFakeGotchis = 0; + senderAccount.gotchisLentOut = new Array(); + senderAccount.gotchisBorrowed = new Array(); + + const holder = new FakeGotchiHolder( + "0x46a3a41bd932244dd08186e4c19f1a7e48cbcdf4-1" + ); + holder.amount = 0; + holder.holder = receiver; + holder.fakeGotchiStats = "1"; + + store.set("MetadataActionLog", "1", log); + store.set("FakeGotchiNFTToken", tokenEntityId, token); + store.set("User", sender, senderAccount); + // store.set("FakeGotchiStatistic", "1", fakeGotchiStats); + store.set( + "FakeGotchiHolder", + "0x46a3a41bd932244dd08186e4c19f1a7e48cbcdf4-1", + holder + ); + + createMockedFunction( + event.transaction.to!, + "name", + "name():(string)" + ).returns([ethereum.Value.fromString("Ghost")]); + + createMockedFunction( + event.transaction.to!, + "symbol", + "symbol():(string)" + ).returns([ethereum.Value.fromString("GHST")]); + + createMockedFunction( + event.transaction.to!, + "tokenURI", + "tokenURI(uint256):(string)" + ) + .withArgs([ethereum.Value.fromUnsignedBigInt(BIGINT_ONE)]) + .returns([ethereum.Value.fromString("https://app.aavegotchi.com")]); + + createMockedFunction( + event.transaction.to!, + "tokenURI", + "tokenURI(uint256):(string)" + ) + .withArgs([ + ethereum.Value.fromUnsignedBigInt(BIGINT_ONE.plus(BIGINT_ONE)), + ]) + .returns([ethereum.Value.fromString("https://app.aavegotchi.com")]); + }); + + test("it should update total, nft and holder stats if tx is mint", () => { + const event = createTransferEvent( + ADDRESS_ZERO.toHexString(), + receiver, + tokenId + ); + handleTransfer(event); + + // total stats + assert.fieldEquals( + "Statistic", + "0", + "totalEditionsCirculating", + "1" + ); + assert.fieldEquals("Statistic", "0", "totalEditionsMinted", "1"); + assert.fieldEquals("Statistic", "0", "totalNFTs", "1"); + assert.fieldEquals("Statistic", "0", "burnedNFTs", "0"); + assert.fieldEquals("Statistic", "0", "totalFakeGotchiOwners", "1"); + + // nft stats + assert.fieldEquals("FakeGotchiStatistic", "1", "burned", "0"); + assert.fieldEquals("FakeGotchiStatistic", "1", "amountHolder", "1"); + assert.fieldEquals("FakeGotchiStatistic", "1", "totalSupply", "1"); + assert.fieldEquals("FakeGotchiStatistic", "1", "metadata", "1"); + assert.fieldEquals("FakeGotchiStatistic", "1", "tokenIds", "[1]"); + + // NFT Holder Stats + let idSender = receiver + "-1"; + assert.fieldEquals("FakeGotchiHolder", idSender, "holder", receiver); + assert.fieldEquals("FakeGotchiHolder", idSender, "amount", "1"); + assert.fieldEquals("FakeGotchiHolder", idSender, "fakeGotchiStats", "1"); + + // account stats + assert.fieldEquals("User", receiver, "totalUniqueFakeGotchisOwned", "1"); + assert.fieldEquals( + "User", + receiver, + "currentUniqueFakeGotchisOwned", + "1" + ); + }); + + test("it should update total, nft and holder stats if tx is transfer", () => { + const event = createTransferEvent(receiver, sender, tokenId); + handleTransfer(event); + + // Total Stats + assert.fieldEquals( + "Statistic", + "0", + "totalEditionsCirculating", + "1" + ); + assert.fieldEquals("Statistic", "0", "totalEditionsMinted", "1"); + assert.fieldEquals("Statistic", "0", "totalNFTs", "1"); + assert.fieldEquals("Statistic", "0", "burnedNFTs", "0"); + assert.fieldEquals("Statistic", "0", "totalFakeGotchiOwners", "1"); + + // NFT Stats + assert.fieldEquals("FakeGotchiStatistic", "1", "burned", "0"); + assert.fieldEquals("FakeGotchiStatistic", "1", "amountHolder", "1"); + assert.fieldEquals("FakeGotchiStatistic", "1", "totalSupply", "1"); + assert.fieldEquals("FakeGotchiStatistic", "1", "metadata", "1"); + assert.fieldEquals("FakeGotchiStatistic", "1", "tokenIds", "[1]"); + + // NFT Holder Stats + let idSender = receiver + "-1"; + assert.fieldEquals("FakeGotchiHolder", idSender, "holder", receiver); + assert.fieldEquals("FakeGotchiHolder", idSender, "amount", "0"); + assert.fieldEquals("FakeGotchiHolder", idSender, "fakeGotchiStats", "1"); + + let idReceiver = sender + "-1"; + assert.fieldEquals("FakeGotchiHolder", idReceiver, "holder", sender); + assert.fieldEquals("FakeGotchiHolder", idReceiver, "amount", "1"); + assert.fieldEquals("FakeGotchiHolder", idReceiver, "fakeGotchiStats", "1"); + + // User + assert.fieldEquals("User", receiver, "totalUniqueFakeGotchisOwned", "1"); + assert.fieldEquals( + "User", + receiver, + "currentUniqueFakeGotchisOwned", + "0" + ); + + assert.fieldEquals("User", sender, "totalUniqueFakeGotchisOwned", "1"); + assert.fieldEquals("User", sender, "currentUniqueFakeGotchisOwned", "1"); + }); + + test("it should update total, nft and holder stats if tx is burn", () => { + const event = createTransferEvent( + sender, + ADDRESS_ZERO.toHexString(), + tokenId + ); + handleTransfer(event); + + // Total Stats + assert.fieldEquals( + "Statistic", + "0", + "totalEditionsCirculating", + "0" + ); + assert.fieldEquals("Statistic", "0", "totalEditionsMinted", "1"); + assert.fieldEquals("Statistic", "0", "totalNFTs", "0"); + assert.fieldEquals("Statistic", "0", "burnedNFTs", "1"); + assert.fieldEquals("Statistic", "0", "totalFakeGotchiOwners", "0"); + + // NFT Stats + assert.fieldEquals("FakeGotchiStatistic", "1", "burned", "1"); + assert.fieldEquals("FakeGotchiStatistic", "1", "amountHolder", "0"); + assert.fieldEquals("FakeGotchiStatistic", "1", "totalSupply", "0"); + assert.fieldEquals("FakeGotchiStatistic", "1", "metadata", "1"); + assert.fieldEquals("FakeGotchiStatistic", "1", "tokenIds", "[]"); + + // NFT Holder Stats + let idSender = sender + "-1"; + assert.fieldEquals("FakeGotchiHolder", idSender, "holder", sender); + assert.fieldEquals("FakeGotchiHolder", idSender, "amount", "0"); + assert.fieldEquals("FakeGotchiHolder", idSender, "fakeGotchiStats", "1"); + + // User + assert.fieldEquals("User", sender, "totalUniqueFakeGotchisOwned", "1"); + assert.fieldEquals("User", sender, "currentUniqueFakeGotchisOwned", "0"); + }); +}); diff --git a/tests/handleTransferERC721.test.ts b/tests/handleTransferERC721.test.ts index 3b16fdf..7701f90 100644 --- a/tests/handleTransferERC721.test.ts +++ b/tests/handleTransferERC721.test.ts @@ -114,7 +114,7 @@ test("handleTransferERC721 - should change owner of aavegotchi entity if token i gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; @@ -217,7 +217,7 @@ test("handleTransferERC721 - should set owner to 0x0 of aavegotchi entity if got gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; gotchi.gotchiId = BIGINT_ONE; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; diff --git a/tests/handleUseConsumable.test.ts b/tests/handleUseConsumable.test.ts index 348ab1c..d1c7475 100644 --- a/tests/handleUseConsumable.test.ts +++ b/tests/handleUseConsumable.test.ts @@ -18,7 +18,7 @@ test("handleUseConsumable - happy case", () => { gotchi.locked = true; gotchi.gotchiId = BIGINT_ONE; gotchi.kinship = BIGINT_ZERO; - gotchi.portal = "1"; + // gotchi.portal = "1"; gotchi.hauntId = BIGINT_ONE; gotchi.name = "Test"; gotchi.nameLowerCase = "test"; diff --git a/yarn.lock b/yarn.lock index d239ba9..07eb9bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,6 +32,14 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" +"@amxx/graphprotocol-utils@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@amxx/graphprotocol-utils/-/graphprotocol-utils-1.1.0.tgz#2e947df618adfc44f620eac8121f6def32f250e7" + integrity sha512-oVHp/EMNyl2c54n+EmTzDweQ3yuHGAyIEesIMYOu+lMBUFRgLDKBhrp9c4XB4zJ6JKs0DsCxuKuN7CIjweIjdg== + dependencies: + "@graphprotocol/graph-ts" "^0.26.0" + yargs "^17.5.1" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13": version "7.22.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" @@ -727,6 +735,13 @@ dependencies: assemblyscript "0.19.10" +"@graphprotocol/graph-ts@^0.26.0": + version "0.26.0" + resolved "https://registry.yarnpkg.com/@graphprotocol/graph-ts/-/graph-ts-0.26.0.tgz#576f995531eebaca4374901aeaff499219e382e8" + integrity sha512-GW/emOJl+35MXgmIxTnUK7dJtPCaB9u5aAwoLVqJ8swogC794O92UrXMVrAJsherUriu+yI9bLMGmNPOIi60jw== + dependencies: + assemblyscript "0.19.10" + "@ipld/dag-cbor@^7.0.0": version "7.0.3" resolved "https://registry.yarnpkg.com/@ipld/dag-cbor/-/dag-cbor-7.0.3.tgz#aa31b28afb11a807c3d627828a344e5521ac4a1e" @@ -1083,6 +1098,19 @@ chalk "^4" fast-levenshtein "^3.0.0" +"@openzeppelin/contracts@^4.6.0": + version "4.9.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.3.tgz#00d7a8cf35a475b160b3f0293a6403c511099364" + integrity sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg== + +"@openzeppelin/subgraphs@^0.1.8": + version "0.1.8" + resolved "https://registry.yarnpkg.com/@openzeppelin/subgraphs/-/subgraphs-0.1.8.tgz#2e4076ecbd6017a7f5e8215b35827c32b06f8d38" + integrity sha512-I7A/m1FZ4Z4m9gttVxsQ6Dt2j53PMug/qj/Jyd4JnkgL4OmdunzsYZbj8dfcBG4nbAeMK3H7V9dKCEqB6PAKHw== + dependencies: + "@amxx/graphprotocol-utils" "^1.1.0" + "@openzeppelin/contracts" "^4.6.0" + "@peculiar/asn1-schema@^2.3.6": version "2.3.6" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" @@ -2133,6 +2161,15 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -6079,7 +6116,7 @@ yargs-parser@^20.2.2: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-parser@^21.0.0: +yargs-parser@^21.0.0, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== @@ -6097,6 +6134,19 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^17.5.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"