UNPKG

@lyncworld/lootbox-evm-sdk

Version:

Lootbox EVM SDK for ethers v5

1,988 lines (1,983 loc) 396 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { ChainIdentifier: () => ChainIdentifier, ERC1155Abi: () => ERC1155_default, ERC1155__factory: () => ERC1155__factory, ERC20Abi: () => ERC20_default, ERC20__factory: () => ERC20__factory, ERC721Abi: () => ERC721_default, ERC721__factory: () => ERC721__factory, ILootBox__factory: () => ILootBox__factory, ItemType: () => ItemType, LBErrorCodes: () => LBErrorCodes, LootBoxControllerAbi: () => LootBoxController_default, LootBoxController__factory: () => LootBoxController__factory, LootBoxERC2771Abi: () => LootBoxERC2771_default, LootBoxERC2771__factory: () => LootBoxERC2771__factory, LootBoxError: () => LootBoxError, LootBoxInfoAbi: () => LootBoxInfo_default, LootBoxInfo__factory: () => LootBoxInfo__factory, LootBoxInteractionAbi: () => LootBoxInteraction_default, LootBoxInteraction__factory: () => LootBoxInteraction__factory, LootBoxManagerAbi: () => LootBoxManager_default, LootBoxManager__factory: () => LootBoxManager__factory, LootBoxMulticallAbi: () => LootBoxMulticall_default, LootBoxMulticall__factory: () => LootBoxMulticall__factory, LootBoxOwnershipAbi: () => LootBoxOwnership_default, LootBoxOwnership__factory: () => LootBoxOwnership__factory, LootBoxRngRouterAbi: () => LootBoxRngRouter_default, LootBoxRngRouter__factory: () => LootBoxRngRouter__factory, LyncLootBox: () => LyncLootBox, LyncLootBoxCreator: () => LyncLootBoxCreator, LyncLootBoxMulticall: () => LyncLootBoxMulticall, factories: () => factories_exports, generateMerkleTreeProof: () => generateMerkleTreeProof, generateMerkleTreeRoot: () => generateMerkleTreeRoot, subgraph_item_addresses: () => subgraph_item_addresses, subgraph_items: () => subgraph_items, subgraph_rewards: () => subgraph_rewards, verifyMerkleTreeProofOffChain: () => verifyMerkleTreeProofOffChain }); module.exports = __toCommonJS(src_exports); // abis/ERC20.json var ERC20_default = [ { type: "constructor", inputs: [ { name: "_trustedForwarder", type: "address", internalType: "address" } ], stateMutability: "nonpayable" }, { type: "function", name: "UPGRADE_INTERFACE_VERSION", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "allowance", inputs: [ { name: "owner", type: "address", internalType: "address" }, { name: "spender", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [ { name: "spender", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "balanceOf", inputs: [ { name: "account", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "decimals", inputs: [], outputs: [{ name: "", type: "uint8", internalType: "uint8" }], stateMutability: "view" }, { type: "function", name: "initialize", inputs: [ { name: "_name", type: "string", internalType: "string" }, { name: "_symbol", type: "string", internalType: "string" }, { name: "_lootboxAddress", type: "address", internalType: "address" }, { name: "_owner", type: "address", internalType: "address" }, { name: "_tf", type: "address", internalType: "address" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "isTrustedForwarder", inputs: [ { name: "forwarder", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "lootboxAddress", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "lootboxMint", inputs: [ { name: "to", type: "address", internalType: "address" }, { name: "amount", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "mint", inputs: [ { name: "to", type: "address", internalType: "address" }, { name: "amount", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "proxiableUUID", inputs: [], outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], stateMutability: "view" }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "transfer", inputs: [ { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferFrom", inputs: [ { name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "value", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "nonpayable" }, { type: "function", name: "transferOwnership", inputs: [ { name: "newOwner", type: "address", internalType: "address" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "trustedForwarder", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "upgradeToAndCall", inputs: [ { name: "newImplementation", type: "address", internalType: "address" }, { name: "data", type: "bytes", internalType: "bytes" } ], outputs: [], stateMutability: "payable" }, { type: "event", name: "Approval", inputs: [ { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "spender", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "Initialized", inputs: [ { name: "version", type: "uint64", indexed: false, internalType: "uint64" } ], anonymous: false }, { type: "event", name: "OwnershipTransferred", inputs: [ { name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "event", name: "Transfer", inputs: [ { name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "Upgraded", inputs: [ { name: "implementation", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "error", name: "AddressEmptyCode", inputs: [ { name: "target", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1967InvalidImplementation", inputs: [ { name: "implementation", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1967NonPayable", inputs: [] }, { type: "error", name: "ERC20InsufficientAllowance", inputs: [ { name: "spender", type: "address", internalType: "address" }, { name: "allowance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "ERC20InsufficientBalance", inputs: [ { name: "sender", type: "address", internalType: "address" }, { name: "balance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "ERC20InvalidApprover", inputs: [ { name: "approver", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC20InvalidReceiver", inputs: [ { name: "receiver", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC20InvalidSender", inputs: [ { name: "sender", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC20InvalidSpender", inputs: [ { name: "spender", type: "address", internalType: "address" } ] }, { type: "error", name: "FailedInnerCall", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "NotInitializing", inputs: [] }, { type: "error", name: "OwnableInvalidOwner", inputs: [ { name: "owner", type: "address", internalType: "address" } ] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [ { name: "account", type: "address", internalType: "address" } ] }, { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, { type: "error", name: "UUPSUnsupportedProxiableUUID", inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }] } ]; // abis/ERC721.json var ERC721_default = [ { type: "constructor", inputs: [ { name: "_trustedForwarder", type: "address", internalType: "address" } ], stateMutability: "nonpayable" }, { type: "function", name: "UPGRADE_INTERFACE_VERSION", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "approve", inputs: [ { name: "to", type: "address", internalType: "address" }, { name: "tokenId", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "balanceOf", inputs: [ { name: "owner", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "baseURI", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "getApproved", inputs: [ { name: "tokenId", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "initialize", inputs: [ { name: "_name", type: "string", internalType: "string" }, { name: "_symbol", type: "string", internalType: "string" }, { name: "baseuri", type: "string", internalType: "string" }, { name: "_lootboxAddress", type: "address", internalType: "address" }, { name: "_disallowedTokenIdStart", type: "uint256", internalType: "uint256" }, { name: "_disallowedTokenIdEnd", type: "uint256", internalType: "uint256" }, { name: "_disallowedTokenIds", type: "uint256[]", internalType: "uint256[]" }, { name: "_owner", type: "address", internalType: "address" }, { name: "_tf", type: "address", internalType: "address" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "isApprovedForAll", inputs: [ { name: "owner", type: "address", internalType: "address" }, { name: "operator", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isTokenIdDisallowed", inputs: [ { name: "_tokenId", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isTrustedForwarder", inputs: [ { name: "forwarder", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "lootboxAddress", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "lootboxMint", inputs: [ { name: "_to", type: "address", internalType: "address" }, { name: "_tokenId", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "mintNFT", inputs: [ { name: "_to", type: "address", internalType: "address" }, { name: "_tokenId", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "ownerOf", inputs: [ { name: "tokenId", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "proxiableUUID", inputs: [], outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], stateMutability: "view" }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "safeTransferFrom", inputs: [ { name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "tokenId", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "safeTransferFrom", inputs: [ { name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "tokenId", type: "uint256", internalType: "uint256" }, { name: "data", type: "bytes", internalType: "bytes" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setApprovalForAll", inputs: [ { name: "operator", type: "address", internalType: "address" }, { name: "approved", type: "bool", internalType: "bool" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "supportsInterface", inputs: [ { name: "interfaceId", type: "bytes4", internalType: "bytes4" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "tokenURI", inputs: [ { name: "tokenId", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "transferFrom", inputs: [ { name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "tokenId", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "transferOwnership", inputs: [ { name: "newOwner", type: "address", internalType: "address" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "trustedForwarder", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "upgradeToAndCall", inputs: [ { name: "newImplementation", type: "address", internalType: "address" }, { name: "data", type: "bytes", internalType: "bytes" } ], outputs: [], stateMutability: "payable" }, { type: "event", name: "Approval", inputs: [ { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "approved", type: "address", indexed: true, internalType: "address" }, { name: "tokenId", type: "uint256", indexed: true, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "ApprovalForAll", inputs: [ { name: "owner", type: "address", indexed: true, internalType: "address" }, { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "approved", type: "bool", indexed: false, internalType: "bool" } ], anonymous: false }, { type: "event", name: "Initialized", inputs: [ { name: "version", type: "uint64", indexed: false, internalType: "uint64" } ], anonymous: false }, { type: "event", name: "OwnershipTransferred", inputs: [ { name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "event", name: "Transfer", inputs: [ { name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "tokenId", type: "uint256", indexed: true, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "Upgraded", inputs: [ { name: "implementation", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "error", name: "AddressEmptyCode", inputs: [ { name: "target", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1967InvalidImplementation", inputs: [ { name: "implementation", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1967NonPayable", inputs: [] }, { type: "error", name: "ERC721IncorrectOwner", inputs: [ { name: "sender", type: "address", internalType: "address" }, { name: "tokenId", type: "uint256", internalType: "uint256" }, { name: "owner", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC721InsufficientApproval", inputs: [ { name: "operator", type: "address", internalType: "address" }, { name: "tokenId", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "ERC721InvalidApprover", inputs: [ { name: "approver", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC721InvalidOperator", inputs: [ { name: "operator", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC721InvalidOwner", inputs: [ { name: "owner", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC721InvalidReceiver", inputs: [ { name: "receiver", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC721InvalidSender", inputs: [ { name: "sender", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC721NonexistentToken", inputs: [ { name: "tokenId", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "FailedInnerCall", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "NotInitializing", inputs: [] }, { type: "error", name: "OwnableInvalidOwner", inputs: [ { name: "owner", type: "address", internalType: "address" } ] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [ { name: "account", type: "address", internalType: "address" } ] }, { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, { type: "error", name: "UUPSUnsupportedProxiableUUID", inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }] } ]; // abis/ERC1155.json var ERC1155_default = [ { type: "constructor", inputs: [ { name: "_trustedForwarder", type: "address", internalType: "address" } ], stateMutability: "nonpayable" }, { type: "function", name: "UPGRADE_INTERFACE_VERSION", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "balanceOf", inputs: [ { name: "account", type: "address", internalType: "address" }, { name: "id", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "balanceOfBatch", inputs: [ { name: "accounts", type: "address[]", internalType: "address[]" }, { name: "ids", type: "uint256[]", internalType: "uint256[]" } ], outputs: [ { name: "", type: "uint256[]", internalType: "uint256[]" } ], stateMutability: "view" }, { type: "function", name: "baseURI", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "exists", inputs: [{ name: "id", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "initialize", inputs: [ { name: "_name", type: "string", internalType: "string" }, { name: "_symbol", type: "string", internalType: "string" }, { name: "_baseuri", type: "string", internalType: "string" }, { name: "_lootboxAddress", type: "address", internalType: "address" }, { name: "_owner", type: "address", internalType: "address" }, { name: "_tf", type: "address", internalType: "address" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "isApprovedForAll", inputs: [ { name: "account", type: "address", internalType: "address" }, { name: "operator", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isTrustedForwarder", inputs: [ { name: "forwarder", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "lootboxAddress", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "lootboxMint", inputs: [ { name: "account", type: "address", internalType: "address" }, { name: "_tokenId", type: "uint256", internalType: "uint256" }, { name: "amount", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "mintNFT", inputs: [ { name: "account", type: "address", internalType: "address" }, { name: "_tokenId", type: "uint256", internalType: "uint256" }, { name: "amount", type: "uint256", internalType: "uint256" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "name", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "owner", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "proxiableUUID", inputs: [], outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], stateMutability: "view" }, { type: "function", name: "renounceOwnership", inputs: [], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "safeBatchTransferFrom", inputs: [ { name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "ids", type: "uint256[]", internalType: "uint256[]" }, { name: "values", type: "uint256[]", internalType: "uint256[]" }, { name: "data", type: "bytes", internalType: "bytes" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "safeTransferFrom", inputs: [ { name: "from", type: "address", internalType: "address" }, { name: "to", type: "address", internalType: "address" }, { name: "id", type: "uint256", internalType: "uint256" }, { name: "value", type: "uint256", internalType: "uint256" }, { name: "data", type: "bytes", internalType: "bytes" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "setApprovalForAll", inputs: [ { name: "operator", type: "address", internalType: "address" }, { name: "approved", type: "bool", internalType: "bool" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "supportsInterface", inputs: [ { name: "interfaceId", type: "bytes4", internalType: "bytes4" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "symbol", inputs: [], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "tf", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "totalSupply", inputs: [{ name: "id", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "transferOwnership", inputs: [ { name: "newOwner", type: "address", internalType: "address" } ], outputs: [], stateMutability: "nonpayable" }, { type: "function", name: "trustedForwarder", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "upgradeToAndCall", inputs: [ { name: "newImplementation", type: "address", internalType: "address" }, { name: "data", type: "bytes", internalType: "bytes" } ], outputs: [], stateMutability: "payable" }, { type: "function", name: "uri", inputs: [ { name: "_tokenId", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "event", name: "ApprovalForAll", inputs: [ { name: "account", type: "address", indexed: true, internalType: "address" }, { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "approved", type: "bool", indexed: false, internalType: "bool" } ], anonymous: false }, { type: "event", name: "Initialized", inputs: [ { name: "version", type: "uint64", indexed: false, internalType: "uint64" } ], anonymous: false }, { type: "event", name: "OwnershipTransferred", inputs: [ { name: "previousOwner", type: "address", indexed: true, internalType: "address" }, { name: "newOwner", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "event", name: "TransferBatch", inputs: [ { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "ids", type: "uint256[]", indexed: false, internalType: "uint256[]" }, { name: "values", type: "uint256[]", indexed: false, internalType: "uint256[]" } ], anonymous: false }, { type: "event", name: "TransferSingle", inputs: [ { name: "operator", type: "address", indexed: true, internalType: "address" }, { name: "from", type: "address", indexed: true, internalType: "address" }, { name: "to", type: "address", indexed: true, internalType: "address" }, { name: "id", type: "uint256", indexed: false, internalType: "uint256" }, { name: "value", type: "uint256", indexed: false, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "URI", inputs: [ { name: "value", type: "string", indexed: false, internalType: "string" }, { name: "id", type: "uint256", indexed: true, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "Upgraded", inputs: [ { name: "implementation", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "error", name: "AddressEmptyCode", inputs: [ { name: "target", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1155InsufficientBalance", inputs: [ { name: "sender", type: "address", internalType: "address" }, { name: "balance", type: "uint256", internalType: "uint256" }, { name: "needed", type: "uint256", internalType: "uint256" }, { name: "tokenId", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "ERC1155InvalidApprover", inputs: [ { name: "approver", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1155InvalidArrayLength", inputs: [ { name: "idsLength", type: "uint256", internalType: "uint256" }, { name: "valuesLength", type: "uint256", internalType: "uint256" } ] }, { type: "error", name: "ERC1155InvalidOperator", inputs: [ { name: "operator", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1155InvalidReceiver", inputs: [ { name: "receiver", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1155InvalidSender", inputs: [ { name: "sender", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1155MissingApprovalForAll", inputs: [ { name: "operator", type: "address", internalType: "address" }, { name: "owner", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1967InvalidImplementation", inputs: [ { name: "implementation", type: "address", internalType: "address" } ] }, { type: "error", name: "ERC1967NonPayable", inputs: [] }, { type: "error", name: "FailedInnerCall", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "NotInitializing", inputs: [] }, { type: "error", name: "OwnableInvalidOwner", inputs: [ { name: "owner", type: "address", internalType: "address" } ] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [ { name: "account", type: "address", internalType: "address" } ] }, { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, { type: "error", name: "UUPSUnsupportedProxiableUUID", inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }] } ]; // abis/lootbox-facets/LootBoxInfo.json var LootBoxInfo_default = [ { type: "function", name: "active", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "baseURI", inputs: [ { name: "addr", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "string", internalType: "string" }], stateMutability: "view" }, { type: "function", name: "canClaim", inputs: [ { name: "_addr", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "chain", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "erc1155_implementation", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "erc20_implementation", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "erc721_implementation", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "getMerkleData", inputs: [{ name: "idx", type: "uint256", internalType: "uint256" }], outputs: [ { name: "", type: "bytes32", internalType: "bytes32" }, { name: "", type: "uint256", internalType: "uint256" } ], stateMutability: "view" }, { type: "function", name: "getRemainingOpensForAddress", inputs: [ { name: "_addr", type: "address", internalType: "address" }, { name: "merkleProof", type: "bytes32[]", internalType: "bytes32[]" } ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "getRemainingOpensForAddressAndIdx", inputs: [ { name: "_addr", type: "address", internalType: "address" }, { name: "merkleProof", type: "bytes32[]", internalType: "bytes32[]" }, { name: "_idx", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "isCreatedContract", inputs: [ { name: "addr", type: "address", internalType: "address" } ], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "isEmpty", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "itemAddresses", inputs: [{ name: "idx", type: "uint256", internalType: "uint256" }], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "lootboxCreator", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "lootboxManager", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "lootboxRngRouter", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "multicall", inputs: [], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "openAllowed", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "openerReqIds", inputs: [ { name: "_addr", type: "address", internalType: "address" } ], outputs: [ { name: "", type: "uint256[]", internalType: "uint256[]" } ], stateMutability: "view" }, { type: "function", name: "opensForAll", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "permanentlyStopped", inputs: [], outputs: [{ name: "", type: "bool", internalType: "bool" }], stateMutability: "view" }, { type: "function", name: "pickedTokens", inputs: [ { name: "_addr", type: "address", internalType: "address" }, { name: "idx", type: "uint256", internalType: "uint256" } ], outputs: [ { name: "", type: "tuple", internalType: "struct ILootBox.PickedToken", components: [ { name: "itemContractAddress", type: "address", internalType: "address" }, { name: "tokenType", type: "uint8", internalType: "enum ILootBox.ItemType" }, { name: "tokenId", type: "uint256", internalType: "uint256" }, { name: "tokenAmount", type: "uint256", internalType: "uint256" } ] } ], stateMutability: "view" }, { type: "function", name: "ptrERC1155", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "ptrERC20", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "ptrERC721", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "function", name: "reqIdToRequester", inputs: [ { name: "reqId", type: "uint256", internalType: "uint256" } ], outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view" }, { type: "function", name: "totalMerkleRoots", inputs: [], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view" }, { type: "event", name: "ItemRemoved", inputs: [ { name: "addr", type: "address", indexed: true, internalType: "address" } ], anonymous: false }, { type: "event", name: "Item_ERC1155_Updated", inputs: [ { name: "contractAddress", type: "address", indexed: true, internalType: "address" }, { name: "tokenReceiver", type: "address", indexed: true, internalType: "address" }, { name: "tokenIdsSent", type: "uint256[]", indexed: false, internalType: "uint256[]" }, { name: "tokenAmountsSent", type: "uint256[]", indexed: false, internalType: "uint256[]" } ], anonymous: false }, { type: "event", name: "Item_ERC20_Updated", inputs: [ { name: "contractAddress", type: "address", indexed: true, internalType: "address" }, { name: "tokenReceiver", type: "address", indexed: true, internalType: "address" }, { name: "tokenAmountSent", type: "uint256", indexed: false, internalType: "uint256" } ], anonymous: false }, { type: "event", name: "Item_ERC721_Updated", inputs: [ { name: "contractAddress", type: "address", indexed: true, internalType: "address" }, { name: "tokenReceiver", type: "address", indexed: true, internalType: "address" }, { name: "tokenIdsSent", type: "uint256[]", indexed: false, internalType: "uint256[]" } ], anonymous: false }, { type: "event", name: "ItemsAdded", inputs: [ { name: "erc20Items", type: "tuple[]", indexed: false, internalType: "struct ILootBox.Item_ERC20[]", components: [ { name: "contractAddress", type: "address", internalType: "address" }, { name: "pickRange", type: "tuple", internalType: "struct ILootBox.Range", components: [ { name: "start", type: "uint256", internalType: "uint256" }, { name: "end", type: "uint256", internalType: "uint256" } ] }, { name: "tokenAmount", type: "uint256", internalType: "uint256" }, { name: "name", type: "string", internalType: "string" }, { name: "symbol", type: "string", internalType: "string" } ] }, { name: "erc721Items", type: "tuple[]", indexed: false, internalType: "struct ILootBox.Item_ERC721[]", components: [ { name: "contractAddress", type: "address", internalType: "address" }, { name: "pickRange", type: "tuple", internalType: "struct ILootBox.Range", components: [ { name: "start", type: "uint256", internalType: "uint256" }, { name: "end", type: "uint256", internalType: "uint256" } ] }, { name: "inputTokenIdRange", type: "tuple", internalType: "struct ILootBox.Range", components: [ { name: "start", type: "uint256", internalType: "uint256" }, { name: "end", type: "uint256", internalType: "uint256" } ] }, { name: "inputTokenIds", type: "uint256[]", internalType: "uint256[]" }, { name: "uriBase", type: "string", internalType: "string" }, { name: "name", type: "string", internalType: "string" }, { name: "symbol", type: "string", internalType: "string" } ] }, { name: "erc1155Items", type: "tuple[]", indexed: false, internalType: "struct ILootBox.Item_ERC1155[]", components: [ { name: "contractAddress", type: "address", internalType: "address" }, { name: "pickRange", type: "tuple", internalType: "struct ILootBox.Range", components: [ { name: "start", type: "uint256", internalType: "uint256" }, { name: "end", type: "uint256", internalType: "uint256" } ] }, { name: "inputTokenIdRange", type: "tuple", internalType: "struct ILootBox.Range", components: [ { name: "start", type: "uint256", internalType: "uint256" }, { name: "end", type: "uint256", internalType: "uint256" } ] }, { name: "inputTokenAmountFixed", type: "uint256", internalType: "uint256" }, { name: "amountPickRangeFixed", type: "tuple", internalType: "struct ILootBox.Range", components: [ { name: "start", type: "uint256", internalType: "uint256" }, { name: "end", type: "uint256", internalType: "uint256" } ] }, { name: "inputTokenIds", type: "uint256[]", internalType: "uint256[]" }, { name: "inputTokenAmounts", type: "uint256[]", internalType: "uint256[]" }, { name: "amountPickRanges", type: "tuple[]", internalType: "struct ILootBox.Range[]", components: [ { name: "start", type: "uint256", internalType: "uint256" }, { name: "end", type: "uint256", internalType: "uint256" } ] }, { name: "uriBase", type: "string", internalType: "string" }, { name: "name", type: "string", internalType: "string" }, { name: "symbol", type: "string", internalType: "string" } ] } ], anonymous: false }, { type: "event", name: "LootBoxActivated", inputs: [], anonymous: false }, { type: "event", name: "LootBoxClaimed", inputs: [ { name: "claimer", type: "address", indexed: true, internalType: "address" }, { name: "pickedTokens", type: "tuple[]", indexed: false, internalType: "struct ILootBox.PickedToken[]", components: [ { name: "itemContractAddress", type: "address", internalType: "address" }, { name: "tokenType", type: "uint8", internalType: "enum ILootBox.ItemType" }, { name: "tokenId", type: "uint256", internalType: "uint256" }, { name: "tokenAmount", type: "uint256", internalType: "uint256" } ] } ], an