diff --git a/README.md b/README.md index f511d544..546a4725 100644 --- a/README.md +++ b/README.md @@ -33,13 +33,19 @@ Therefore, we created Role Based Rewards Distribution system to track contributi Core features are -1. Manage responsibilities and rights on rolls +1. Manage responsibilities and rights on roles 2. Track little contributions with P2P token transfer -3. Determine the rewards rate based on roll and engaged period -4. Distribute rewards quickly to a large number of people +3. Send Thanks Token(*) +4. Determine the rewards rate based on role and engaged period, and Fraction Token +5. Distribute rewards quickly to a large number of people + +(*) In the implementation, what we refer to as a "Thanks Token" may also be called a "Fraction Token." In the application interface, it might appear as "Assist Credit" or "Role Share," depending on the version. However, all of these terms refer to the same concept. These solutions were combined with ideas from [Hats Protocol](https://www.hatsprotocol.xyz/), [Splits](https://splits.org), and [Protocol Guild](https://protocol-guild.readthedocs.io/en/latest/). + + + ## Live [https://toban.xyz](https://toban.xyz/) diff --git a/pkgs/cli/src/abi/bigbang.ts b/pkgs/cli/src/abi/bigbang.ts index 96fde08f..7c830d2c 100644 --- a/pkgs/cli/src/abi/bigbang.ts +++ b/pkgs/cli/src/abi/bigbang.ts @@ -150,6 +150,16 @@ export const BIGBANG_ABI = [ name: "_hatterHatImageURI", type: "string", }, + { + internalType: "string", + name: "_memberHatDetails", + type: "string", + }, + { + internalType: "string", + name: "_memberHatImageURI", + type: "string", + }, { internalType: "address", name: "_trustedForwarder", diff --git a/pkgs/cli/src/modules/bigbang.ts b/pkgs/cli/src/modules/bigbang.ts index 66f54b19..c8bc8f1f 100644 --- a/pkgs/cli/src/modules/bigbang.ts +++ b/pkgs/cli/src/modules/bigbang.ts @@ -18,6 +18,8 @@ export const bigbang = async (params: { topHatImageURI: string; hatterHatDetails: string; hatterHatImageURI: string; + memberHatDetails: string; + memberHatImageURI: string; trustedForwarder: Address; }) => { const stop = startLoading(); @@ -32,6 +34,8 @@ export const bigbang = async (params: { params.topHatImageURI, params.hatterHatDetails, params.hatterHatImageURI, + params.memberHatDetails, + params.memberHatImageURI, params.trustedForwarder, ], }); diff --git a/pkgs/contract/contracts/bigbang/BigBang.sol b/pkgs/contract/contracts/bigbang/BigBang.sol index c54168c5..01689283 100644 --- a/pkgs/contract/contracts/bigbang/BigBang.sol +++ b/pkgs/contract/contracts/bigbang/BigBang.sol @@ -34,6 +34,7 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { address indexed owner, uint256 indexed topHatId, uint256 hatterHatId, + uint256 memberHatId, uint256 operatorHatId, uint256 creatorHatId, uint256 minterHatId, @@ -84,6 +85,8 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { * @param _topHatImageURI The image URI of the topHat. * @param _hatterHatDetails The details of the hatterHat. * @param _hatterHatImageURI The image URI of the hatterHat. + * @param _memberHatDetails The details of the memberHat. + * @param _memberHatImageURI The image URI of the memberHat. * @return topHatId The ID used for navigating to the ProjectTop page after project creation. */ function bigbang( @@ -91,7 +94,9 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { string calldata _topHatDetails, string calldata _topHatImageURI, string calldata _hatterHatDetails, - string calldata _hatterHatImageURI + string calldata _hatterHatImageURI, + string calldata _memberHatDetails, + string calldata _memberHatImageURI ) external returns (uint256) { // 1. TopHatのMint uint256 topHatId = Hats.mintTopHat( @@ -111,7 +116,20 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { _hatterHatImageURI ); - // 3. Create Fixed Roles under TopHat + // 3. Create Member Hat ID + uint256 memberHatId = Hats.createHat( + hatterHatId, + _memberHatDetails, + 99, + 0x0000000000000000000000000000000000004A75, + 0x0000000000000000000000000000000000004A75, + true, + _memberHatImageURI + ); + + Hats.mintHat(memberHatId, _owner); + + // 4. Create Fixed Roles under TopHat uint256 operatorHatId = Hats.createHat( topHatId, _hatterHatDetails, @@ -121,6 +139,7 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { true, _hatterHatImageURI ); + uint256 creatorHatId = Hats.createHat( operatorHatId, _hatterHatDetails, @@ -130,6 +149,7 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { true, _hatterHatImageURI ); + uint256 minterHatId = Hats.createHat( operatorHatId, _hatterHatDetails, @@ -140,7 +160,7 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { _hatterHatImageURI ); - // 4. HatsHatCreatorModuleのデプロイ + // 5. HatsHatCreatorModuleのデプロイ address hatsHatCreatorModule = HatsModuleFactory.createHatsModule( HatsHatCreatorModule_IMPL, topHatId, @@ -149,7 +169,7 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { 0 ); - // 5. HatsTimeFrameModuleのデプロイ + // 6. HatsTimeFrameModuleのデプロイ address hatsTimeFrameModule = HatsModuleFactory.createHatsModule( HatsTimeFrameModule_IMPL, topHatId, @@ -158,7 +178,7 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { 0 ); - // 6. HatsHatFractionTokenModuleのデプロイ + // 7. HatsHatFractionTokenModuleのデプロイ address hatsFractionTokenModule = HatsModuleFactory.createHatsModule( HatsFractionTokenModule_IMPL, topHatId, @@ -167,7 +187,7 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { 0 ); - // 7. HatterHatにHatModuleをMint + // 8. HatterHatにHatModuleをMint uint256[] memory hatIds = new uint256[](2); hatIds[0] = hatterHatId; hatIds[1] = hatterHatId; @@ -178,10 +198,20 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { Hats.batchMintHats(hatIds, modules); - // 8. TopHatIdの権限を_ownerに譲渡 + // 9. TopHatIdの権限を_ownerに譲渡 Hats.transferHat(topHatId, address(this), _owner); - // 9. SplitCreatorをFactoryからデプロイ + // 9. ThanksTokenをFactoryからデプロイ + address thanksToken = IThanksTokenFactory(ThanksTokenFactory) + .createThanksTokenDeterministic( + string(abi.encodePacked("ThanksToken ", _topHatDetails)), + string(abi.encodePacked("THX", topHatId)), + _owner, + 1e18, // デフォルト係数(1.0) + keccak256(abi.encodePacked(topHatId, "0")) + ); + + // 10. SplitCreatorをFactoryからデプロイ address splitCreator = SplitsCreatorFactory .createSplitCreatorDeterministic( topHatId, @@ -189,24 +219,16 @@ contract BigBang is OwnableUpgradeable, UUPSUpgradeable { SplitsFactoryV2, hatsTimeFrameModule, hatsFractionTokenModule, + thanksToken, keccak256(abi.encodePacked(topHatId)) ); - // 10. ThanksTokenをFactoryからデプロイ - address thanksToken = IThanksTokenFactory(ThanksTokenFactory) - .createThanksTokenDeterministic( - string(abi.encodePacked("ThanksToken ", _topHatDetails)), - string(abi.encodePacked("THX", topHatId)), - _owner, - 1e18, // デフォルト係数(1.0) - keccak256(abi.encodePacked(topHatId, "ThanksToken")) - ); - emit Executed( msg.sender, _owner, topHatId, hatterHatId, + memberHatId, operatorHatId, creatorHatId, minterHatId, diff --git a/pkgs/contract/contracts/bigbang/mock/BigBang_Mock_v2.sol b/pkgs/contract/contracts/bigbang/mock/BigBang_Mock_v2.sol index 2c7a5f33..a8b7ab83 100644 --- a/pkgs/contract/contracts/bigbang/mock/BigBang_Mock_v2.sol +++ b/pkgs/contract/contracts/bigbang/mock/BigBang_Mock_v2.sol @@ -5,6 +5,7 @@ import {IHats} from "../../hats/src/Interfaces/IHats.sol"; import {IHatsModuleFactory} from "../IHatsModuleFactory.sol"; import {ISplitsCreatorFactory} from "../../splitscreator/ISplitsCreatorFactory.sol"; import {HatsTimeFrameModule} from "../../hatsmodules/timeframe/HatsTimeFrameModule.sol"; +import {IThanksTokenFactory} from "../../thankstoken/IThanksTokenFactory.sol"; import {HatsHatCreatorModule} from "../../hatsmodules/hatcreator/HatsHatCreatorModule.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; @@ -22,21 +23,26 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { address public HatsHatCreatorModule_IMPL; + address public HatsFractionTokenModule_IMPL; + address public SplitsFactoryV2; - address public FractionToken; + address public ThanksTokenFactory; event Executed( address indexed creator, address indexed owner, uint256 indexed topHatId, uint256 hatterHatId, + uint256 memberHatId, uint256 operatorHatId, uint256 creatorHatId, uint256 minterHatId, address hatsTimeFrameModule, address hatsHatCreatorModule, - address splitCreator + address hatsFractionTokenModule, + address splitCreator, + address thanksToken ); /** @@ -45,9 +51,10 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { * @param _hatsModuleFactory Address of the hats module factory contract. * @param _hatsTimeFrameModule_IMPL Address of the hats time frame module implementation contract. * @param _hatsHatCreatorModule_IMPL Address of the hats hat creator module implementation contract. + * @param _hatsFractionTokenModule_IMPL Address of the fraction token contract. * @param _splitsCreatorFactory Address of the splits creator factory contract. * @param _splitFactoryV2 Address of the split factory V2 contract. - * @param _fractionToken Address of the fraction token contract. + * @param _thanksTokenFactory Address of the thanks token factory contract. */ function initialize( address _initialOwner, @@ -55,18 +62,20 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { address _hatsModuleFactory, address _hatsTimeFrameModule_IMPL, address _hatsHatCreatorModule_IMPL, + address _hatsFractionTokenModule_IMPL, address _splitsCreatorFactory, address _splitFactoryV2, - address _fractionToken + address _thanksTokenFactory ) public initializer { __Ownable_init(_initialOwner); Hats = IHats(_hatsAddress); HatsModuleFactory = IHatsModuleFactory(_hatsModuleFactory); HatsTimeFrameModule_IMPL = _hatsTimeFrameModule_IMPL; HatsHatCreatorModule_IMPL = _hatsHatCreatorModule_IMPL; + HatsFractionTokenModule_IMPL = _hatsFractionTokenModule_IMPL; SplitsCreatorFactory = ISplitsCreatorFactory(_splitsCreatorFactory); SplitsFactoryV2 = _splitFactoryV2; - FractionToken = _fractionToken; + ThanksTokenFactory = _thanksTokenFactory; } /** @@ -83,10 +92,11 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { string calldata _topHatDetails, string calldata _topHatImageURI, string calldata _hatterHatDetails, - string calldata _hatterHatImageURI + string calldata _hatterHatImageURI, + string calldata _memberHatDetails, + string calldata _memberHatImageURI ) external returns (uint256) { // 1. TopHatのMint - uint256 topHatId = Hats.mintTopHat( address(this), // target: Tophat's wearer address. topHatのみがHatterHatを作成できるためTophatを指定する _topHatDetails, @@ -94,7 +104,6 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { ); // 2. HatterHatの作成 - uint256 hatterHatId = Hats.createHat( topHatId, // _admin: The id of the Hat that will control who wears the newly created hat _hatterHatDetails, @@ -105,7 +114,20 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { _hatterHatImageURI ); - // 3. Create Fixed Roles under TopHat + // 3. Create Member Hat ID + uint256 memberHatId = Hats.createHat( + hatterHatId, + _memberHatDetails, + 99, + 0x0000000000000000000000000000000000004A75, + 0x0000000000000000000000000000000000004A75, + true, + _memberHatImageURI + ); + + Hats.mintHat(memberHatId, _owner); + + // 4. Create Fixed Roles under TopHat uint256 operatorHatId = Hats.createHat( topHatId, _hatterHatDetails, @@ -134,7 +156,7 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { _hatterHatImageURI ); - // 4. HatsHatCreatorModuleのデプロイ + // 5. HatsHatCreatorModuleのデプロイ address hatsHatCreatorModule = HatsModuleFactory.createHatsModule( HatsHatCreatorModule_IMPL, topHatId, @@ -143,7 +165,7 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { 0 ); - // 5. HatsTimeFrameModuleのデプロイ + // 6. HatsTimeFrameModuleのデプロイ address hatsTimeFrameModule = HatsModuleFactory.createHatsModule( HatsTimeFrameModule_IMPL, topHatId, @@ -152,7 +174,16 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { 0 ); - // 6. HatterHatにHatModuleをMint + // 6. HatsHatFractionTokenModuleのデプロイ + address hatsFractionTokenModule = HatsModuleFactory.createHatsModule( + HatsFractionTokenModule_IMPL, + topHatId, + "", + abi.encode("", 10_000), + 0 + ); + + // 7. HatterHatにHatModuleをMint uint256[] memory hatIds = new uint256[](2); hatIds[0] = hatterHatId; hatIds[1] = hatterHatId; @@ -163,17 +194,28 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { Hats.batchMintHats(hatIds, modules); - // 7. TopHatIdの権限を_ownerに譲渡 + // 8. TopHatIdの権限を_ownerに譲渡 Hats.transferHat(topHatId, address(this), _owner); - // 8. SplitCreatorをFactoryからデプロイ + // 9. ThanksTokenをFactoryからデプロイ + address thanksToken = IThanksTokenFactory(ThanksTokenFactory) + .createThanksTokenDeterministic( + string(abi.encodePacked("ThanksToken ", _topHatDetails)), + string(abi.encodePacked("THX", topHatId)), + _owner, + 1e18, // デフォルト係数(1.0) + keccak256(abi.encodePacked(topHatId, "ThanksToken")) + ); + + // 10. SplitCreatorをFactoryからデプロイ address splitCreator = SplitsCreatorFactory .createSplitCreatorDeterministic( topHatId, address(Hats), SplitsFactoryV2, hatsTimeFrameModule, - FractionToken, + hatsFractionTokenModule, + thanksToken, keccak256(abi.encodePacked(topHatId)) ); @@ -182,12 +224,15 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { _owner, topHatId, hatterHatId, + memberHatId, operatorHatId, creatorHatId, minterHatId, hatsTimeFrameModule, hatsHatCreatorModule, - splitCreator + hatsFractionTokenModule, + splitCreator, + thanksToken ); return topHatId; @@ -221,19 +266,20 @@ contract BigBang_Mock_v2 is OwnableUpgradeable, UUPSUpgradeable { HatsHatCreatorModule_IMPL = _hatsHatCreatorModuleImpl; } - function setSplitsFactoryV2(address _splitsFactoryV2) external onlyOwner { - SplitsFactoryV2 = _splitsFactoryV2; + function setHatsFractionTokenModuleImpl( + address _hatsFractionTokenModuleImpl + ) external onlyOwner { + HatsFractionTokenModule_IMPL = _hatsFractionTokenModuleImpl; } - function setFractionToken(address _fractionToken) external onlyOwner { - FractionToken = _fractionToken; + function setSplitsFactoryV2(address _splitsFactoryV2) external onlyOwner { + SplitsFactoryV2 = _splitsFactoryV2; } - /** - * 検証用に追加した関数 - */ - function testUpgradeFunction() external pure returns (string memory) { - return "testUpgradeFunction"; + function setThanksTokenFactory( + address _thanksTokenFactory + ) external onlyOwner { + ThanksTokenFactory = _thanksTokenFactory; } function _authorizeUpgrade( diff --git a/pkgs/contract/contracts/splitscreator/ISplitsCreator.sol b/pkgs/contract/contracts/splitscreator/ISplitsCreator.sol index 8ccc63ad..bd594152 100644 --- a/pkgs/contract/contracts/splitscreator/ISplitsCreator.sol +++ b/pkgs/contract/contracts/splitscreator/ISplitsCreator.sol @@ -10,6 +10,13 @@ interface ISplitsCreator { address[] wearers; } + struct WeightsInfo { + uint256 roleWeight; + uint256 thanksTokenWeight; + uint256 thanksTokenReceivedWeight; + uint256 thanksTokenSentWeight; + } + event SplitsCreated( address split, address[] shareHolders, @@ -17,5 +24,5 @@ interface ISplitsCreator { uint256 totalAllocation ); - function create(SplitsInfo[] memory _splitInfos) external returns (address); + function create(SplitsInfo[] memory _splitInfos, WeightsInfo memory _weightsInfo) external returns (address); } diff --git a/pkgs/contract/contracts/splitscreator/ISplitsCreatorFactory.sol b/pkgs/contract/contracts/splitscreator/ISplitsCreatorFactory.sol index 9234d798..05f3c55d 100644 --- a/pkgs/contract/contracts/splitscreator/ISplitsCreatorFactory.sol +++ b/pkgs/contract/contracts/splitscreator/ISplitsCreatorFactory.sol @@ -11,6 +11,7 @@ interface ISplitsCreatorFactory { address _splitFactoryV2, address _hatsTimeFrameModule, address _fractionToken, + address _thanksToken, bytes32 _salt ) external returns (address); } diff --git a/pkgs/contract/contracts/splitscreator/SplitsCreator.sol b/pkgs/contract/contracts/splitscreator/SplitsCreator.sol index 764dde3c..fe51f1f7 100644 --- a/pkgs/contract/contracts/splitscreator/SplitsCreator.sol +++ b/pkgs/contract/contracts/splitscreator/SplitsCreator.sol @@ -1,3 +1,4 @@ +// solhint-disable // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; @@ -6,11 +7,14 @@ import {IHats} from "../hats/src/Interfaces/IHats.sol"; import {ISplitsCreator} from "./ISplitsCreator.sol"; import {ISplitFactoryV2} from "../splits/interfaces/ISplitFactoryV2.sol"; import {SplitV2Lib} from "../splits/libraries/SplitV2.sol"; +import {IThanksToken} from "../thankstoken/IThanksToken.sol"; import {IHatsFractionTokenModule} from "../hatsmodules/fractiontoken/IHatsFractionTokenModule.sol"; import {IHatsTimeFrameModule} from "../hatsmodules/timeframe/IHatsTimeFrameModule.sol"; import {Clone} from "solady/src/utils/Clone.sol"; contract SplitsCreator is ISplitsCreator, Clone { + uint256 private constant PRECISION = 10e8; + function HATS() public pure returns (IHats) { return IHats(_getArgAddress(12)); } @@ -31,19 +35,24 @@ contract SplitsCreator is ISplitsCreator, Clone { return IHatsFractionTokenModule(_getArgAddress(108)); } + function THANKS_TOKEN() public pure returns (IThanksToken) { + return IThanksToken(_getArgAddress(140)); + } + /** * @notice Creates a new split contract based on the provided splits information. * @param _splitsInfo An array of SplitsInfo structs containing details about roles, wearers, and multipliers. * @return The address of the newly created split contract. */ function create( - SplitsInfo[] memory _splitsInfo + SplitsInfo[] memory _splitsInfo, + WeightsInfo memory _weightsInfo ) external returns (address) { ( address[] memory shareHolders, uint256[] memory allocations, uint256 totalAllocation - ) = _calculateAllocations(_splitsInfo); + ) = _calculateAllocations(_splitsInfo, _weightsInfo); require( shareHolders.length > 1, @@ -77,7 +86,8 @@ contract SplitsCreator is ISplitsCreator, Clone { * @return totalAllocation Sum of all allocations. */ function preview( - SplitsInfo[] memory _splitsInfo + SplitsInfo[] memory _splitsInfo, + WeightsInfo memory _weightsInfo ) external view @@ -88,18 +98,140 @@ contract SplitsCreator is ISplitsCreator, Clone { ) { (shareHolders, allocations, totalAllocation) = _calculateAllocations( - _splitsInfo + _splitsInfo, + _weightsInfo ); } /** - * @dev Internal function to calculate allocations for shareholders. + * @dev Internal function to calculate allocations for shareHolders. + * It calculates role-based and thanks-based allocations separately, + * normalizes them, applies weights, and then combines them. * @param _splitsInfo An array of SplitsInfo structs containing details about roles, wearers, and multipliers. + * @param _weightsInfo Struct containing weights for different allocation types. * @return shareHolders An array of shareholder addresses. * @return allocations Corresponding allocations for each shareholder. * @return totalAllocation Sum of all allocations. */ function _calculateAllocations( + SplitsInfo[] memory _splitsInfo, + WeightsInfo memory _weightsInfo + ) + internal + view + returns ( + address[] memory shareHolders, + uint256[] memory allocations, + uint256 totalAllocation + ) + { + address[] memory thanksShareHolders; + uint256[] memory thanksAllocations; + uint256 thanksTotalAllocation; + (thanksShareHolders, thanksAllocations, thanksTotalAllocation) = _calculateThanksAllocations( + _weightsInfo.thanksTokenReceivedWeight, + _weightsInfo.thanksTokenSentWeight + ); + + address[] memory roleShareHolders; + uint256[] memory roleAllocations; + uint256 roleTotalAllocation; + (roleShareHolders, roleAllocations, roleTotalAllocation) = _calculateRoleAllocations(_splitsInfo); + + uint256 numOfThanksShareHolders = 0; + if (_weightsInfo.thanksTokenWeight > 0) { + numOfThanksShareHolders = thanksShareHolders.length; + } + + uint256 numOfRoleShareHolders = 0; + if (_weightsInfo.roleWeight > 0) { + numOfRoleShareHolders = roleShareHolders.length; + } + + uint256 numOfShareHolders = numOfThanksShareHolders + numOfRoleShareHolders; + + shareHolders = new address[](numOfShareHolders); + allocations = new uint256[](numOfShareHolders); + + uint256 weightSum = _weightsInfo.thanksTokenWeight + _weightsInfo.roleWeight; + + totalAllocation = 0; + + for (uint256 i = 0; i < numOfThanksShareHolders; i++) { + shareHolders[i] = thanksShareHolders[i]; + uint256 thanksAllocation = allocations[i] = thanksAllocations[i] * _weightsInfo.thanksTokenWeight * PRECISION / thanksTotalAllocation / weightSum; + allocations[i] = thanksAllocation; + totalAllocation += thanksAllocation; + } + + for (uint256 i = 0; i < numOfRoleShareHolders; i++) { + shareHolders[numOfThanksShareHolders + i] = roleShareHolders[i]; + uint256 roleAllocation = roleAllocations[i] * _weightsInfo.roleWeight * PRECISION / roleTotalAllocation / weightSum; + allocations[numOfThanksShareHolders + i] = roleAllocation; + totalAllocation += roleAllocation; + } + + return (shareHolders, allocations, totalAllocation); + } + + function _calculateThanksAllocations( + uint256 thanksTokenReceivedWeight, + uint256 thanksTokenSentWeight + ) + internal + view + returns ( + address[] memory shareHolders, + uint256[] memory allocations, + uint256 totalAllocation + ) + { + address[] memory thanksParticipants = THANKS_TOKEN().getParticipants(); + uint256 thanksParticipantsCount = thanksParticipants.length; + uint256 totalThanksBalance = 0; + uint256 totalThanksMinted = 0; + + for (uint256 i = 0; i < thanksParticipantsCount; i++) { + uint256 thanksBalance = THANKS_TOKEN().balanceOf(thanksParticipants[i]); + uint256 thanksMinted = THANKS_TOKEN().mintedAmount(thanksParticipants[i]); + + totalThanksBalance += thanksBalance; + totalThanksMinted += thanksMinted; + } + + shareHolders = new address[](thanksParticipantsCount); + allocations = new uint256[](thanksParticipantsCount); + uint256 shareHolderIndex = 0; + + uint256 thanksTokenWeightSum = thanksTokenReceivedWeight + thanksTokenSentWeight; + + if (totalThanksBalance > 0 && totalThanksMinted > 0) { + for (uint256 i = 0; i < thanksParticipantsCount; i++) { + uint256 thanksBalance = THANKS_TOKEN().balanceOf(thanksParticipants[i]); + uint256 thanksMinted = THANKS_TOKEN().mintedAmount(thanksParticipants[i]); + + uint256 thanksScore = + ( + (thanksTokenReceivedWeight * thanksBalance * PRECISION / totalThanksBalance) + + (thanksTokenSentWeight * thanksMinted * PRECISION / totalThanksMinted) + ) / thanksTokenWeightSum; + + shareHolders[shareHolderIndex] = thanksParticipants[i]; + allocations[shareHolderIndex] = thanksScore; + totalAllocation += thanksScore; + shareHolderIndex++; + } + } + + totalAllocation = 0; + for (uint256 i = 0; i < allocations.length; i++) { + totalAllocation += allocations[i]; + } + + return (shareHolders, allocations, totalAllocation); + } + + function _calculateRoleAllocations( SplitsInfo[] memory _splitsInfo ) internal @@ -197,7 +329,7 @@ contract SplitsCreator is ISplitsCreator, Clone { for (uint256 l = 0; l < allocations.length; l++) { if (l >= currentShareHolderIndex && l < shareHolderIndex) { allocations[l] = - (allocations[l] * 10e5) / + (allocations[l] * PRECISION) / fractionTokenSupply; } } diff --git a/pkgs/contract/contracts/splitscreator/SplitsCreatorFactory.sol b/pkgs/contract/contracts/splitscreator/SplitsCreatorFactory.sol index b2bf0bec..02b77236 100644 --- a/pkgs/contract/contracts/splitscreator/SplitsCreatorFactory.sol +++ b/pkgs/contract/contracts/splitscreator/SplitsCreatorFactory.sol @@ -15,7 +15,8 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { uint256 topHatId, address splitFactoryV2, address hatsTimeFrameModule, - address fractionToken + address fractionToken, + address thanksToken ); address public SPLITS_CREATOR_IMPLEMENTATION; @@ -36,6 +37,7 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { address _splitFactoryV2, address _hatsTimeFrameModule, address _fractionToken, + address _thanksToken, bytes32 _salt ) external returns (address splitCreator) { if (_msgSender() != BIG_BANG) { @@ -48,7 +50,8 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { _hats, _splitFactoryV2, _hatsTimeFrameModule, - _fractionToken + _fractionToken, + _thanksToken ), _getSalt( _topHatId, @@ -56,6 +59,7 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { _splitFactoryV2, _hatsTimeFrameModule, _fractionToken, + _thanksToken, _salt ) ); @@ -66,7 +70,8 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { _topHatId, _splitFactoryV2, _hatsTimeFrameModule, - _fractionToken + _fractionToken, + _thanksToken ); } @@ -76,6 +81,7 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { address _splitFactoryV2, address _hatsTimeFrameModule, address _fractionToken, + address _thanksToken, bytes32 _salt ) external view returns (address) { return @@ -85,7 +91,8 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { _hats, _splitFactoryV2, _hatsTimeFrameModule, - _fractionToken + _fractionToken, + _thanksToken ), _getSalt( _topHatId, @@ -93,6 +100,7 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { _splitFactoryV2, _hatsTimeFrameModule, _fractionToken, + _thanksToken, _salt ), address(this) @@ -113,6 +121,7 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { address _splitFactoryV2, address _hatsTimeFrameModule, address _fractionToken, + address _thanksToken, bytes32 _salt ) internal pure returns (bytes32) { return @@ -123,6 +132,7 @@ contract SplitsCreatorFactory is OwnableUpgradeable, UUPSUpgradeable { _splitFactoryV2, _hatsTimeFrameModule, _fractionToken, + _thanksToken, _salt ) ); diff --git a/pkgs/contract/contracts/thankstoken/IThanksToken.sol b/pkgs/contract/contracts/thankstoken/IThanksToken.sol index 716d99d9..499f23a1 100644 --- a/pkgs/contract/contracts/thankstoken/IThanksToken.sol +++ b/pkgs/contract/contracts/thankstoken/IThanksToken.sol @@ -20,7 +20,11 @@ interface IThanksToken is IERC20 { * @param relatedRoles Array of roles related to the sender * @return success Whether the operation was successful */ - function mint(address to, uint256 amount, RelatedRole[] memory relatedRoles) external returns (bool); + function mint( + address to, + uint256 amount, + RelatedRole[] memory relatedRoles + ) external returns (bool); /** * @notice Calculates the total amount that can be minted by an address @@ -28,7 +32,10 @@ interface IThanksToken is IERC20 { * @param relatedRoles Array of roles related to the owner * @return amount The mintable amount */ - function mintableAmount(address owner, RelatedRole[] memory relatedRoles) external view returns (uint256); + function mintableAmount( + address owner, + RelatedRole[] memory relatedRoles + ) external view returns (uint256); /** * @notice Returns the total amount an address has minted @@ -36,24 +43,30 @@ interface IThanksToken is IERC20 { * @return amount The minted amount */ function mintedAmount(address owner) external view returns (uint256); - + /** * @notice Returns the coefficient for an address * @param owner The address to get coefficient for * @return coefficient The address coefficient */ function addressCoefficient(address owner) external view returns (uint256); - + /** * @notice Returns the default coefficient * @return coefficient The default coefficient */ function defaultCoefficient() external view returns (uint256); + /** + * @notice Returns the list of all participants (minters and recipients) + * @return The array of participant addresses + */ + function getParticipants() external view returns (address[] memory); + /** * @notice Emitted when tokens are minted * @param to The recipient of the minted tokens * @param amount The amount of tokens minted */ - event TokensMinted(address indexed to, uint256 amount); + event TokenMinted(address indexed from, address indexed to, uint256 amount); } diff --git a/pkgs/contract/contracts/thankstoken/IThanksTokenFactory.sol b/pkgs/contract/contracts/thankstoken/IThanksTokenFactory.sol index fbd45a94..36ef2aa0 100644 --- a/pkgs/contract/contracts/thankstoken/IThanksTokenFactory.sol +++ b/pkgs/contract/contracts/thankstoken/IThanksTokenFactory.sol @@ -9,7 +9,7 @@ interface IThanksTokenFactory { uint256 defaultCoefficient, bytes32 salt ) external returns (address); - + function createThanksTokenDeterministic( string memory name, string memory symbol, @@ -17,7 +17,7 @@ interface IThanksTokenFactory { uint256 defaultCoefficient, bytes32 salt ) external returns (address); - + function predictThanksTokenAddress( string memory name, string memory symbol, diff --git a/pkgs/contract/contracts/thankstoken/ThanksToken.sol b/pkgs/contract/contracts/thankstoken/ThanksToken.sol index ce74fd36..1eb61427 100644 --- a/pkgs/contract/contracts/thankstoken/ThanksToken.sol +++ b/pkgs/contract/contracts/thankstoken/ThanksToken.sol @@ -5,46 +5,108 @@ import {IThanksToken} from "./IThanksToken.sol"; import {IHats} from "../hats/src/Interfaces/IHats.sol"; import {IHatsFractionTokenModule} from "../hatsmodules/fractiontoken/IHatsFractionTokenModule.sol"; import {IHatsTimeFrameModule} from "../hatsmodules/timeframe/IHatsTimeFrameModule.sol"; -import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; -import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; - -contract ThanksToken is - ERC20Upgradeable, - OwnableUpgradeable, - UUPSUpgradeable, - IThanksToken -{ - IHats private hatsContract; - IHatsFractionTokenModule private fractionToken; - IHatsTimeFrameModule private hatsTimeFrameModule; +import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import {Clone} from "solady/src/utils/Clone.sol"; +contract ThanksToken is Clone, ERC20("", ""), IThanksToken { mapping(address => uint256) private _mintedAmount; mapping(address => uint256) private _addressCoefficient; + address[] private _participants; + mapping(address => bool) private _isParticipant; - uint256 private _defaultCoefficient; uint256 private constant SECONDS_PER_HOUR = 3600; - function initialize( - address _initialOwner, - string memory _name, - string memory _symbol, - address _hatsAddress, - address _fractionTokenAddress, - address _hatsTimeFrameModuleAddress, - uint256 _initialDefaultCoefficient - ) public initializer { - __ERC20_init(_name, _symbol); - __Ownable_init(_initialOwner); - __UUPSUpgradeable_init(); - hatsContract = IHats(_hatsAddress); - fractionToken = IHatsFractionTokenModule(_fractionTokenAddress); - hatsTimeFrameModule = IHatsTimeFrameModule(_hatsTimeFrameModuleAddress); - _defaultCoefficient = _initialDefaultCoefficient > 0 - ? _initialDefaultCoefficient - : 1e18; + // Clone data accessors + // The data is encoded using abi.encode in the following order: + // workspaceOwner, name, symbol, hatsAddress, fractionTokenAddress, + // hatsTimeFrameModuleAddress, defaultCoefficient + + // With abi.encode: + // - offset 0: workspaceOwner (address) - 32 bytes + // - offset 32: offset to name data - 32 bytes + // - offset 64: offset to symbol data - 32 bytes + // - offset 96: hatsAddress (address) - 32 bytes + // - offset 128: fractionTokenAddress (address) - 32 bytes + // - offset 160: hatsTimeFrameModuleAddress (address) - 32 bytes + // - offset 192: defaultCoefficient (uint256) - 32 bytes + // - offset 224+: actual string data + + function WORKSPACE_OWNER() public pure returns (address) { + return _getArgAddress(12); // 12 is the Clone offset } + function HATS() public pure returns (IHats) { + return IHats(_getArgAddress(108)); // 12 + 96 + } + + function FRACTION_TOKEN() public pure returns (IHatsFractionTokenModule) { + return IHatsFractionTokenModule(_getArgAddress(140)); // 12 + 128 + } + + function HATS_TIME_FRAME_MODULE() + public + pure + returns (IHatsTimeFrameModule) + { + return IHatsTimeFrameModule(_getArgAddress(172)); // 12 + 160 + } + + function DEFAULT_COEFFICIENT() public pure returns (uint256) { + uint256 coefficient = _getArgUint256(204); // 12 + 192 + return coefficient > 0 ? coefficient : 1e18; + } + + function NAME() public pure returns (string memory) { + return _getArgString(0); + } + + function SYMBOL() public pure returns (string memory) { + return _getArgString(1); + } + + // Helper function to read dynamic strings from clone args + function _getArgString( + uint256 argIndex + ) internal pure returns (string memory) { + // Calculate offset to the string offset pointer + // Name is at offset 32 (after workspaceOwner), Symbol at offset 64 + uint256 stringPointerOffset = 32 + (argIndex * 32); + + // Read the offset to actual string data + uint256 stringDataOffset = _getArgUint256(stringPointerOffset); + + // Read string length and data + uint256 stringLength = _getArgUint256(stringDataOffset); + + bytes memory data = new bytes(stringLength); + for (uint256 i = 0; i < stringLength; i++) { + data[i] = bytes1(uint8(_getArgUint8(stringDataOffset + 32 + i))); + } + + return string(data); + } + + // Override ERC20 functions to use Clone data + function name() public pure override returns (string memory) { + return NAME(); + } + + function symbol() public pure override returns (string memory) { + return SYMBOL(); + } + + // Constructor is not called in Clone pattern, so we don't need to call ERC20 constructor + + // Owner modifier + modifier onlyOwner() { + require( + msg.sender == WORKSPACE_OWNER(), + "Ownable: caller is not the owner" + ); + _; + } + + // ThanksToken specific functions function mint( address to, uint256 amount, @@ -59,10 +121,19 @@ contract ThanksToken is // Update minted amount _mintedAmount[msg.sender] += amount; - // Mint tokens + // Mint tokens using ERC20's _mint _mint(to, amount); - emit TokensMinted(to, amount); + if (!_isParticipant[msg.sender]) { + _participants.push(msg.sender); + _isParticipant[msg.sender] = true; + } + if (!_isParticipant[to]) { + _participants.push(to); + _isParticipant[to] = true; + } + + emit TokenMinted(msg.sender, to, amount); return true; } @@ -77,13 +148,13 @@ contract ThanksToken is for (uint256 i = 0; i < relatedRoles.length; i++) { RelatedRole memory role = relatedRoles[i]; - uint256 shareBalance = fractionToken.balanceOf( + uint256 shareBalance = FRACTION_TOKEN().balanceOf( owner, role.wearer, role.hatId ); - uint256 shareTotalSupply = fractionToken.totalSupply( + uint256 shareTotalSupply = FRACTION_TOKEN().totalSupply( role.wearer, role.hatId ); @@ -93,7 +164,7 @@ contract ThanksToken is continue; } - uint256 wearingTimeSeconds = hatsTimeFrameModule + uint256 wearingTimeSeconds = HATS_TIME_FRAME_MODULE() .getWearingElapsedTime(role.wearer, role.hatId); uint256 wearingTimeHours = wearingTimeSeconds / 1 hours; @@ -110,7 +181,7 @@ contract ThanksToken is // Apply address coefficient uint256 coefficient = _addressCoefficient[owner] > 0 ? _addressCoefficient[owner] - : _defaultCoefficient; + : DEFAULT_COEFFICIENT(); totalMintable = (totalMintable * coefficient) / 1e18; // Subtract already minted amount @@ -127,14 +198,18 @@ contract ThanksToken is return _mintedAmount[owner]; } + function getParticipants() public view returns (address[] memory) { + return _participants; + } + function addressCoefficient( address owner ) public view override returns (uint256) { return _addressCoefficient[owner]; } - function defaultCoefficient() public view override returns (uint256) { - return _defaultCoefficient; + function defaultCoefficient() public pure override returns (uint256) { + return DEFAULT_COEFFICIENT(); } function setAddressCoefficient( @@ -163,12 +238,6 @@ contract ThanksToken is } } - function setDefaultCoefficient(uint256 coefficient) public onlyOwner { - require(coefficient > 0, "Coefficient must be greater than 0"); - _defaultCoefficient = coefficient; - } - - function _authorizeUpgrade( - address newImplementation - ) internal override onlyOwner {} + // Note: setDefaultCoefficient is not available in Clone pattern + // as DEFAULT_COEFFICIENT is immutable from the clone data } diff --git a/pkgs/contract/contracts/thankstoken/ThanksTokenFactory.sol b/pkgs/contract/contracts/thankstoken/ThanksTokenFactory.sol index c8427e4e..80ef10e5 100644 --- a/pkgs/contract/contracts/thankstoken/ThanksTokenFactory.sol +++ b/pkgs/contract/contracts/thankstoken/ThanksTokenFactory.sol @@ -17,14 +17,14 @@ contract ThanksTokenFactory is address public fractionTokenAddress; address public hatsTimeFrameModuleAddress; address public BIG_BANG; - + event ThanksTokenCreated( - address indexed tokenAddress, - string name, - string symbol, + address indexed tokenAddress, + string name, + string symbol, address workspaceOwner ); - + function initialize( address _initialOwner, address _implementation, @@ -39,7 +39,7 @@ contract ThanksTokenFactory is fractionTokenAddress = _fractionTokenAddress; hatsTimeFrameModuleAddress = _hatsTimeFrameModuleAddress; } - + function createThanksToken( string memory name, string memory symbol, @@ -50,7 +50,7 @@ contract ThanksTokenFactory is if (_msgSender() != BIG_BANG) { revert("ThanksTokenFactory: Only BigBang can call this function"); } - + bytes memory initData = abi.encode( workspaceOwner, name, @@ -60,17 +60,17 @@ contract ThanksTokenFactory is hatsTimeFrameModuleAddress, defaultCoefficient ); - + address proxy = LibClone.clone( IMPLEMENTATION, initData ); - + emit ThanksTokenCreated(proxy, name, symbol, workspaceOwner); - + return proxy; } - + function createThanksTokenDeterministic( string memory name, string memory symbol, @@ -81,7 +81,7 @@ contract ThanksTokenFactory is if (_msgSender() != BIG_BANG) { revert("ThanksTokenFactory: Only BigBang can call this function"); } - + bytes memory initData = abi.encode( workspaceOwner, name, @@ -91,7 +91,7 @@ contract ThanksTokenFactory is hatsTimeFrameModuleAddress, defaultCoefficient ); - + bytes32 saltHash = _getSalt( name, symbol, @@ -99,18 +99,18 @@ contract ThanksTokenFactory is defaultCoefficient, salt ); - + address addr = LibClone.cloneDeterministic( IMPLEMENTATION, initData, saltHash ); - + emit ThanksTokenCreated(addr, name, symbol, workspaceOwner); - + return addr; } - + function predictThanksTokenAddress( string memory name, string memory symbol, @@ -127,7 +127,7 @@ contract ThanksTokenFactory is hatsTimeFrameModuleAddress, defaultCoefficient ); - + bytes32 saltHash = _getSalt( name, symbol, @@ -135,7 +135,7 @@ contract ThanksTokenFactory is defaultCoefficient, salt ); - + return LibClone.predictDeterministicAddress( IMPLEMENTATION, initData, @@ -143,7 +143,7 @@ contract ThanksTokenFactory is address(this) ); } - + function _getSalt( string memory name, string memory symbol, @@ -161,26 +161,26 @@ contract ThanksTokenFactory is ) ); } - + function setImplementation(address _implementation) public onlyOwner { IMPLEMENTATION = _implementation; } - + function setHatsAddress(address _hatsAddress) public onlyOwner { hatsAddress = _hatsAddress; } - + function setFractionTokenAddress(address _fractionTokenAddress) public onlyOwner { fractionTokenAddress = _fractionTokenAddress; } - + function setHatsTimeFrameModuleAddress(address _hatsTimeFrameModuleAddress) public onlyOwner { hatsTimeFrameModuleAddress = _hatsTimeFrameModuleAddress; } - + function setBigBang(address _bigBang) public onlyOwner { BIG_BANG = _bigBang; } - + function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} } diff --git a/pkgs/contract/hardhat.config.ts b/pkgs/contract/hardhat.config.ts index e3b63f07..1657fb57 100644 --- a/pkgs/contract/hardhat.config.ts +++ b/pkgs/contract/hardhat.config.ts @@ -2,6 +2,7 @@ import "@nomicfoundation/hardhat-ethers"; import "@nomicfoundation/hardhat-toolbox-viem"; import "@nomicfoundation/hardhat-viem"; import "@openzeppelin/hardhat-upgrades"; +import "@nomicfoundation/hardhat-verify"; import * as dotenv from "dotenv"; import "hardhat-gas-reporter"; import type { HardhatUserConfig } from "hardhat/config"; diff --git a/pkgs/contract/helpers/deploy/ThanksToken.ts b/pkgs/contract/helpers/deploy/ThanksToken.ts index 283415a2..c721b303 100644 --- a/pkgs/contract/helpers/deploy/ThanksToken.ts +++ b/pkgs/contract/helpers/deploy/ThanksToken.ts @@ -10,18 +10,7 @@ export type ThanksTokenFactory = Awaited< ReturnType >["ThanksTokenFactory"]; -export const deployThanksToken = async ( - params: { - initialOwner: Address; - name: string; - symbol: string; - hatsAddress: Address; - fractionTokenAddress: Address; - hatsTimeFrameModuleAddress: Address; - defaultCoefficient: bigint; - }, - create2DeployerAddress?: string, -) => { +export const deployThanksToken = async (create2DeployerAddress?: string) => { const ThanksTokenFactory = await ethers.getContractFactory("ThanksToken"); const ThanksTokenImplTx = await ThanksTokenFactory.getDeployTransaction(); const ThanksTokenImplAddress = await deployContract_Create2( @@ -32,38 +21,14 @@ export const deployThanksToken = async ( create2DeployerAddress, ); - const ThanksTokenInitData = ThanksTokenFactory.interface.encodeFunctionData( - "initialize", - [ - params.initialOwner, - params.name, - params.symbol, - params.hatsAddress, - params.fractionTokenAddress, - params.hatsTimeFrameModuleAddress, - params.defaultCoefficient, - ], - ); - - const UpgradeableProxy = await ProxyFactory(); - const ThanksTokenProxyTx = await UpgradeableProxy.getDeployTransaction( - ThanksTokenImplAddress, - ThanksTokenInitData, - ); - const ThanksTokenAddress = await deployContract_Create2( - baseSalt, - ThanksTokenProxyTx.data || "0x", - ethers.keccak256(ThanksTokenProxyTx.data), - "ThanksToken", - create2DeployerAddress, - ); - + // ThanksToken is now a Clone implementation, no proxy or initialization needed + // The implementation contract is deployed and will be cloned by the factory const ThanksToken = await viem.getContractAt( "ThanksToken", - ThanksTokenAddress as Address, + ThanksTokenImplAddress as Address, ); - return { ThanksToken, ThanksTokenImplAddress, ThanksTokenInitData }; + return { ThanksToken, ThanksTokenImplAddress, ThanksTokenInitData: "0x" }; }; export const deployThanksTokenFactory = async ( diff --git a/pkgs/contract/outputs/contracts-sepolia.json b/pkgs/contract/outputs/contracts-sepolia.json index 07a461dc..807102bf 100644 --- a/pkgs/contract/outputs/contracts-sepolia.json +++ b/pkgs/contract/outputs/contracts-sepolia.json @@ -3,16 +3,18 @@ "Hats": "0x3bc1A0Ad72417f2d411118085256fC53CBdDd137", "HatsModuleFactory": "0x0a3f85fa597B6a967271286aA0724811acDF5CD9", "PullSplitsFactory": "0x80f1B766817D04870f115fEBbcCADF8DBF75E017", - "BigBang": "\"0x2662b0Dc151bbD9C0e5F1b5bD8674b4eD3E92D0b\"", + "BigBang": "\"0xa60689d4D4d49A587E4eAD4B3C2b8542C56BE10F\"", "FractionToken": "\"0xd6031f9543bEB0963e32CA2AC474de69D0515059\"", - "SplitsCreatorFactory": "\"0x447f22AB169eE89118E03f2f2DCbE8667010340D\"", - "SplitsCreator": "\"0x4BbA4e70437bF162F8EfB8de88E5ECb3C19e11e6\"", - "HatsTimeFrameModule": "\"0xa5449bAe3512a81D63a60E65E525B443a78de3b0\"", - "ProxyAdmin": "\"0xdAEC7C851DA8E9b041e4592fdCF19843Bc1f8bE8\"" + "SplitsCreatorFactory": "\"0xBBe355703d205dd1e0086fa836D01825601C1DDf\"", + "SplitsCreator": "\"0xC0D7B4E0485d71aDA9ffF9365E4e1938F8195dDa\"", + "HatsTimeFrameModule": "\"0xadC508C3BA5eD8b3A6D06e2eC8D17162d2DD6F4f\"", + "ProxyAdmin": "\"0xdAEC7C851DA8E9b041e4592fdCF19843Bc1f8bE8\"", + "ThanksTokenFactory_Implementation": "\"0x769F733Bb8515f31e01b2889192103241B7D2CF4\"", + "ThanksTokenFactory": "\"0x1Efea941D0D524a40EA3590156BbC58BBf8351A2\"" }, "implementations": { "FractionToken_Implementation": "\"0x6d701256205019e40cE02e13D799ed2cd3BBE8e8\"", - "SplitsCreatorFactory_Implementation": "\"0x5850255ed6DC90476eea2739dAc0B2829ac7e825\"", - "BigBang_Implementation": "\"0xe5c4dd13786Acc50228Fe1878709d10ef863503B\"" + "SplitsCreatorFactory_Implementation": "\"0x95394Da0460DCF87fC76F5b868D9251bf9738553\"", + "BigBang_Implementation": "\"0xD7e8626A0553fe14e86e25BD1864544943c9719a\"" } } diff --git a/pkgs/contract/package.json b/pkgs/contract/package.json index 78b27c75..18eda405 100644 --- a/pkgs/contract/package.json +++ b/pkgs/contract/package.json @@ -30,7 +30,6 @@ "@nomicfoundation/hardhat-ignition-viem": "^0.15.0", "@nomicfoundation/hardhat-network-helpers": "^1.0.11", "@nomicfoundation/hardhat-toolbox-viem": "^3.0.0", - "@nomicfoundation/hardhat-verify": "^2.0.0", "@nomicfoundation/hardhat-viem": "^2.0.3", "@nomicfoundation/ignition-core": "^0.15.5", "@openzeppelin/contracts": "^5.0.2", @@ -51,6 +50,7 @@ "viem": "^2.20.1" }, "dependencies": { + "@nomicfoundation/hardhat-verify": "2.1.1", "ethers": "^6.13.4", "jsonfile": "^6.1.0" } diff --git a/pkgs/contract/scripts/deploy/create2.ts b/pkgs/contract/scripts/deploy/create2.ts index e60fa237..96c4602c 100644 --- a/pkgs/contract/scripts/deploy/create2.ts +++ b/pkgs/contract/scripts/deploy/create2.ts @@ -1,8 +1,9 @@ import { ethers, network } from "hardhat"; import type { Address } from "viem"; import { deployBigBang } from "../../helpers/deploy/BigBang"; -import { deployFractionToken } from "../../helpers/deploy/FractionToken"; +// import { deployFractionToken } from "../../helpers/deploy/FractionToken"; import { + deployHatsFractionTokenModule, deployHatsHatCreatorModule, deployHatsTimeFrameModule, } from "../../helpers/deploy/Hats"; @@ -10,6 +11,10 @@ import { deploySplitsCreator, deploySplitsCreatorFactory, } from "../../helpers/deploy/Splits"; +import { + deployThanksToken, + deployThanksTokenFactory, +} from "../../helpers/deploy/ThanksToken"; import { writeContractAddress } from "../../helpers/deploy/contractsJsonHelper"; const deploy = async () => { @@ -17,17 +22,14 @@ const deploy = async () => { "##################################### [Create2 Deploy START] #####################################", ); + const [deployerSigner] = await ethers.getSigners(); + const deployerAddress = await deployerSigner.getAddress(); + // Deploy HatsTimeFrameModule (non-upgradeable) - const { HatsTimeFrameModule } = await deployHatsTimeFrameModule( - "0x0000000000000000000000000000000000000001", - "0.0.0", - ); + const { HatsTimeFrameModule } = await deployHatsTimeFrameModule("0.0.0"); const hatsTimeFrameModuleAddress = HatsTimeFrameModule.address; - const { HatsHatCreatorModule } = await deployHatsHatCreatorModule( - "0x0000000000000000000000000000000000000001", - "0.0.0", - ); // zero address 以外のアドレスを仮に渡す + const { HatsHatCreatorModule } = await deployHatsHatCreatorModule("0.0.0"); // zero address 以外のアドレスを仮に渡す const hatsHatCreatorModuleAddress = HatsHatCreatorModule.address; // Deploy SplitsCreator (non-upgradeable) @@ -37,9 +39,13 @@ const deploy = async () => { // Deploy FractionToken implementation and proxy console.log("Deploying FractionToken..."); - const { FractionToken, FractionTokenImplAddress, FractionTokenInitData } = - await deployFractionToken("", 10000n, process.env.HATS_ADDRESS as Address); - const fractionTokenAddress = FractionToken.address; + // const { FractionToken, FractionTokenImplAddress, FractionTokenInitData } = + // await deployFractionToken("", 10000n, process.env.HATS_ADDRESS as Address); + // const fractionTokenAddress = FractionToken.address; + + const { HatsFractionTokenModule } = + await deployHatsFractionTokenModule("0.0.0"); + const hatsFractionTokenModuleAddress = HatsFractionTokenModule.address; // Deploy SplitsCreatorFactory implementation and proxy console.log("Deploying SplitsCreatorFactory..."); @@ -51,6 +57,25 @@ const deploy = async () => { } = await deploySplitsCreatorFactory(splitsCreatorAddress); const splitsCreatorFactoryAddress = SplitsCreatorFactory.address; + console.log("Deploying ThanksToken..."); + const { ThanksToken } = await deployThanksToken(); + const thanksTokenAddress = ThanksToken.address; + + console.log("Deploying ThanksTokenFactory..."); + + const { + ThanksTokenFactory, + ThanksTokenFactoryImplAddress, + ThanksTokenFactoryInitData, + } = await deployThanksTokenFactory({ + initialOwner: deployerAddress as Address, + implementation: thanksTokenAddress, + hatsAddress: process.env.HATS_ADDRESS as Address, + fractionTokenAddress: hatsFractionTokenModuleAddress, + hatsTimeFrameModuleAddress: hatsTimeFrameModuleAddress, + }); + const thanksTokenFactoryAddress = ThanksTokenFactory.address; + // Deploy BigBang implementation and proxy console.log("Deploying BigBang..."); @@ -60,9 +85,10 @@ const deploy = async () => { .HATS_MODULE_FACTORY_ADDRESS as Address, hatsTimeFrameModule_impl: hatsTimeFrameModuleAddress, hatsHatCreatorModule_impl: hatsHatCreatorModuleAddress, + hatsFractionTokenModule_impl: hatsFractionTokenModuleAddress, splitsCreatorFactoryAddress: splitsCreatorFactoryAddress, splitsFactoryV2Address: process.env.PULL_SPLITS_FACTORY_ADDRESS as Address, - fractionTokenAddress: fractionTokenAddress, + thanksTokenFactoryAddress: thanksTokenFactoryAddress, }); const bigBangAddress = BigBang.address; @@ -73,21 +99,32 @@ const deploy = async () => { ); await SplitsCreatorFactoryContract.setBigBang(bigBangAddress); + // Set bigbang address to thanks token factory + const ThanksTokenFactoryContract = await ethers.getContractAt( + "ThanksTokenFactory", + thanksTokenFactoryAddress, + ); + await ThanksTokenFactoryContract.setBigBang(bigBangAddress); + console.log("Successfully deployed contracts!🎉"); console.log("Verify contract with these commands...\n"); console.log( "HatsTimeframeModule module:\n", - `pnpm contract hardhat verify ${hatsTimeFrameModuleAddress} 0.0.0 0x0000000000000000000000000000000000000001 --network ${network.name}\n`, + `pnpm contract hardhat verify ${hatsTimeFrameModuleAddress} 0.0.0 --network ${network.name}\n`, ); console.log( "HatsHatCreatorModule module:\n", - `pnpm contract hardhat verify ${hatsHatCreatorModuleAddress} 0.0.0 0x0000000000000000000000000000000000000001 --network ${network.name}\n`, + `pnpm contract hardhat verify ${hatsHatCreatorModuleAddress} 0.0.0 --network ${network.name}\n`, ); console.log( - "FractionToken:\n", - `pnpm contract hardhat verify ${FractionTokenImplAddress} --network ${network.name} &&`, - `pnpm contract hardhat verify ${fractionTokenAddress} ${FractionTokenImplAddress} ${FractionTokenInitData} --network ${network.name}\n`, + "HatsFractionTokenModule:\n", + `pnpm contract hardhat verify ${hatsFractionTokenModuleAddress} 0.0.0 --network ${network.name}\n`, + ); + console.log( + "ThanksTokenFactory:\n", + `pnpm contract hardhat verify ${thanksTokenFactoryAddress} --network ${network.name} &&`, + `pnpm contract hardhat verify ${thanksTokenFactoryAddress} ${ThanksTokenFactoryImplAddress} ${ThanksTokenFactoryInitData} --network ${network.name}\n`, ); console.log( "SplitsCreator:\n", @@ -111,6 +148,12 @@ const deploy = async () => { value: hatsTimeFrameModuleAddress, network: network.name, }); + writeContractAddress({ + group: "contracts", + name: "ThanksTokenFactory_Implementation", + value: ThanksTokenFactoryImplAddress, + network: network.name, + }); writeContractAddress({ group: "contracts", name: "SplitsCreator", @@ -119,12 +162,6 @@ const deploy = async () => { }); // Save upgradeable contracts implementations - writeContractAddress({ - group: "implementations", - name: "FractionToken_Implementation", - value: FractionTokenImplAddress, - network: network.name, - }); writeContractAddress({ group: "implementations", name: "SplitsCreatorFactory_Implementation", @@ -141,8 +178,14 @@ const deploy = async () => { // Save upgradeable contracts proxies writeContractAddress({ group: "contracts", - name: "FractionToken", - value: fractionTokenAddress, + name: "HatsTimeFrameModule", + value: hatsTimeFrameModuleAddress, + network: network.name, + }); + writeContractAddress({ + group: "contracts", + name: "ThanksTokenFactory", + value: thanksTokenFactoryAddress, network: network.name, }); writeContractAddress({ diff --git a/pkgs/contract/tasks/BigBang/bigbang.ts b/pkgs/contract/tasks/BigBang/bigbang.ts index cb4bbb04..b8d8d704 100644 --- a/pkgs/contract/tasks/BigBang/bigbang.ts +++ b/pkgs/contract/tasks/BigBang/bigbang.ts @@ -8,6 +8,8 @@ interface BigBangTaskArgs { tophatimageuri: string; hatterhatdetails: string; hatterhatimageuri: string; + memberhatdetails: string; + memberhatimageuri: string; } /** @@ -19,6 +21,8 @@ task("bigbang", "bigbang") .addParam("tophatimageuri", "The image URI of the topHat.") .addParam("hatterhatdetails", "The details of the hatterHat.") .addParam("hatterhatimageuri", "The image URI of the hatterHat.") + .addParam("memberhatdetails", "The details of the memberHat.") + .addParam("memberhatimageuri", "The image URI of the memberHat.") .setAction( async (taskArgs: BigBangTaskArgs, hre: HardhatRuntimeEnvironment) => { console.log( @@ -46,6 +50,8 @@ task("bigbang", "bigbang") taskArgs.tophatimageuri, taskArgs.hatterhatdetails, taskArgs.hatterhatimageuri, + taskArgs.memberhatdetails, + taskArgs.memberhatimageuri, ]); console.log(`tx: ${tx}`); diff --git a/pkgs/contract/test/BigBang.ts b/pkgs/contract/test/BigBang.ts index 4ccd9635..fc618c09 100644 --- a/pkgs/contract/test/BigBang.ts +++ b/pkgs/contract/test/BigBang.ts @@ -97,17 +97,6 @@ describe("BigBang", () => { PushSplitsFactory = _PushSplitsFactory; const { ThanksToken: _ThanksToken } = await deployThanksToken( - { - initialOwner: await address1 - .getAddresses() - .then((addresses) => addresses[0]), - name: "Test Thanks Token", - symbol: "TTT", - hatsAddress: Hats.address, - fractionTokenAddress: HatsFractionTokenModule_IMPL.address, - hatsTimeFrameModuleAddress: HatsTimeFrameModule_IMPL.address, - defaultCoefficient: 1000000000000000000n, // 1.0 in wei - }, Create2Deployer.address, ); ThanksToken_IMPL = _ThanksToken; @@ -181,6 +170,8 @@ describe("BigBang", () => { "tophatURI", "hatterhatDetails", "hatterhatURI", + "memberhatDetails", + "memberhatURI", ], { account: address1.account }, ); @@ -200,6 +191,11 @@ describe("BigBang", () => { expect(decodedLog.args.owner.toLowerCase()).to.be.equal( address1.account?.address!, ); + expect(decodedLog.args.memberHatId).to.be.not.equal(null); + Hats.read.isWearerOfHat([ + decodedLog.args.memberHatId, + BigInt(address1.account?.address!), + ]); console.log(decodedLog.args); } } catch (error) {} @@ -410,6 +406,8 @@ describe("BigBang", () => { // "tophatURI", // "hatterhatDetails", // "hatterhatURI", + // "memberhatDetails", + // "memberhatURI", // ], // { account: address1.account }, // ); diff --git a/pkgs/contract/test/IntegrationTest.ts b/pkgs/contract/test/IntegrationTest.ts index d52f2bcb..0a557bd3 100644 --- a/pkgs/contract/test/IntegrationTest.ts +++ b/pkgs/contract/test/IntegrationTest.ts @@ -62,6 +62,7 @@ describe("IntegrationTest", () => { let HatsHatCreatorModuleByBigBang: HatsHatCreatorModule; let HatsFractionTokenModuleByBigBang: HatsFractionTokenModule; let SplitsCreatorByBigBang: SplitsCreator; + let ThanksTokenByBigBang: ThanksToken; let DeployedPullSplit: Awaited>; let topHatId: bigint; @@ -117,17 +118,6 @@ describe("IntegrationTest", () => { PushSplitsFactory = _PushSplitsFactory; const { ThanksToken: _ThanksToken } = await deployThanksToken( - { - initialOwner: await deployer - .getAddresses() - .then((addresses) => addresses[0]), - name: "Test Thanks Token", - symbol: "TTT", - hatsAddress: Hats.address, - fractionTokenAddress: HatsFractionTokenModule_IMPL.address, - hatsTimeFrameModuleAddress: HatsTimeFrameModule_IMPL.address, - defaultCoefficient: 1000000000000000000n, // 1.0 in wei - }, Create2Deployer.address, ); ThanksToken_IMPL = _ThanksToken; @@ -194,6 +184,8 @@ describe("IntegrationTest", () => { "tophatURI", "hatterhatDetails", "hatterhatURI", + "memberhatDetails", + "memberhatURI", ], { account: deployer.account }, ); @@ -222,6 +214,7 @@ describe("IntegrationTest", () => { const hatsFractionTokenModuleAddress = decodedLog.args.hatsFractionTokenModule; const splitsCreatorAddress = decodedLog.args.splitCreator; + const thanksTokenAddress = decodedLog.args.thanksToken; topHatId = decodedLog.args.topHatId; hatterHatId = decodedLog.args.hatterHatId; @@ -238,6 +231,10 @@ describe("IntegrationTest", () => { "HatsFractionTokenModule", hatsFractionTokenModuleAddress, ); + ThanksTokenByBigBang = await viem.getContractAt( + "ThanksToken", + thanksTokenAddress, + ); SplitsCreatorByBigBang = await viem.getContractAt( "SplitsCreator", @@ -401,6 +398,14 @@ describe("IntegrationTest", () => { expect(balance).to.equal(1000n); }); + it("should ThanksToken", async () => { + const zeroAddressBalance = await ThanksTokenByBigBang.read.balanceOf([ + zeroAddress, + ]); + + console.log("Zero address balance:", zeroAddressBalance); + }); + it("should create PullSplits contract", async () => { // address1とaddress2に50%ずつ配分するSplitを作成 const tx = await SplitsCreatorByBigBang.write.create([ @@ -412,6 +417,12 @@ describe("IntegrationTest", () => { multiplierTop: 1n, }, ], + { + roleWeight: 1n, + thanksTokenWeight: 0n, + thanksTokenReceivedWeight: 95n, + thanksTokenSentWeight: 5n, + }, ]); const receipt = await publicClient.waitForTransactionReceipt({ diff --git a/pkgs/contract/test/SplitsCreator.ts b/pkgs/contract/test/SplitsCreator.ts index 128f84cb..358488a9 100644 --- a/pkgs/contract/test/SplitsCreator.ts +++ b/pkgs/contract/test/SplitsCreator.ts @@ -33,6 +33,12 @@ import { } from "../helpers/deploy/Splits"; import { upgradeSplitsCreatorFacotry } from "../helpers/upgrade/splitsCreatorFactory"; import { sqrt } from "../helpers/util/sqrt"; +import { + type ThanksToken, + type ThanksTokenFactory, + deployThanksToken, + deployThanksTokenFactory, +} from "../helpers/deploy/ThanksToken"; import { Create2Deployer, deployCreate2Deployer, @@ -89,6 +95,7 @@ describe("SplitsCreator Factory", () => { let SplitsCreatorFactory: SplitsCreatorFactory; let SplitsCreator_IMPL: SplitsCreator; let SplitsCreator: SplitsCreator; + let ThanksToken: ThanksToken; let address1: WalletClient; let bigBangAddress: WalletClient; @@ -210,6 +217,74 @@ describe("SplitsCreator Factory", () => { "HatsFractionTokenModule", hatsFractionTokenModuleAddress, ); + + // Deploy ThanksToken even for "without thanks token weight" tests + // because SplitsCreator still calls ThanksToken.getParticipants() + const { ThanksToken: _ThanksToken } = await deployThanksToken( + Create2Deployer.address, + ); + const ThanksToken_IMPL = _ThanksToken; + + // Get the first wallet client to use as deployer + const [deployer] = await viem.getWalletClients(); + + // Deploy ThanksTokenFactory + const { ThanksTokenFactory: _ThanksTokenFactory } = + await deployThanksTokenFactory( + { + initialOwner: deployer.account?.address!, // Use deployer as initial owner + implementation: ThanksToken_IMPL.address, + hatsAddress: Hats.address, + fractionTokenAddress: hatsFractionTokenModuleAddress, + hatsTimeFrameModuleAddress: HatsTimeFrameModule.address, + }, + Create2Deployer.address, + ); + const ThanksTokenFactory = _ThanksTokenFactory; + + // Set BigBang address on ThanksTokenFactory + await ThanksTokenFactory.write.setBigBang([ + bigBangAddress.account?.address!, + ]); + + // Create ThanksToken instance using factory + const createTxHash = + await ThanksTokenFactory.write.createThanksTokenDeterministic( + [ + "Test ThanksToken", + "TTK", + bigBangAddress.account?.address!, + 1000000000000000000n, // 1.0 in wei (default coefficient) + "0x0000000000000000000000000000000000000000000000000000000000000001" as `0x${string}`, + ], + { account: bigBangAddress.account }, + ); + + const createReceipt = await publicClient.waitForTransactionReceipt({ + hash: createTxHash, + }); + + let thanksTokenAddress: Address | undefined; + for (const log of createReceipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: ThanksTokenFactory.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName === "ThanksTokenCreated") { + thanksTokenAddress = decodedLog.args.tokenAddress as Address; + break; + } + } catch (error) {} + } + + if (!thanksTokenAddress) { + throw new Error("ThanksToken address not found in transaction logs"); + } + + // Get the actual ThanksToken clone instance + ThanksToken = await viem.getContractAt("ThanksToken", thanksTokenAddress); }); it("Should deploy SplitsCreatorFactory", async () => { @@ -230,6 +305,7 @@ describe("SplitsCreator Factory", () => { PullSplitsFactory.address, HatsTimeFrameModule.address, HatsFractionTokenModule.address, + ThanksToken.address, keccak256("0x1234"), ]), ).to.be.a("string"); @@ -249,6 +325,7 @@ describe("SplitsCreator Factory", () => { PullSplitsFactory.address, HatsTimeFrameModule.address, HatsFractionTokenModule.address, + ThanksToken.address, keccak256("0x1234"), ]); @@ -259,6 +336,7 @@ describe("SplitsCreator Factory", () => { PullSplitsFactory.address, HatsTimeFrameModule.address, HatsFractionTokenModule.address, + ThanksToken.address, keccak256("0x1234"), ], { account: bigBangAddress.account }, @@ -302,7 +380,7 @@ describe("SplitsCreator Factory", () => { }); }); -describe("CreateSplit", () => { +describe("CreateSplit without thanks token weight", () => { let Create2Deployer: Create2Deployer; let Hats: Hats; let HatsModuleFactory: HatsModuleFactory; @@ -316,6 +394,7 @@ describe("CreateSplit", () => { let SplitsCreatorFactory: SplitsCreatorFactory; let SplitsCreator_IMPL: SplitsCreator; let SplitsCreator: SplitsCreator; + let ThanksToken: ThanksToken; let address1: WalletClient; let address2: WalletClient; @@ -335,6 +414,13 @@ describe("CreateSplit", () => { let publicClient: PublicClient; + const weightsInfo = { + roleWeight: 1n, + thanksTokenWeight: 0n, + thanksTokenReceivedWeight: 95n, + thanksTokenSentWeight: 5n, + }; + before(async () => { const { Create2Deployer: _Create2Deployer } = await deployCreate2Deployer(); Create2Deployer = _Create2Deployer; @@ -476,6 +562,74 @@ describe("CreateSplit", () => { hatsFractionTokenModuleAddress, ); + // Deploy ThanksToken even for "without thanks token weight" tests + // because SplitsCreator still calls ThanksToken.getParticipants() + const { ThanksToken: _ThanksToken } = await deployThanksToken( + Create2Deployer.address, + ); + const ThanksToken_IMPL = _ThanksToken; + + // Get the first wallet client to use as deployer + const [deployer] = await viem.getWalletClients(); + + // Deploy ThanksTokenFactory + const { ThanksTokenFactory: _ThanksTokenFactory } = + await deployThanksTokenFactory( + { + initialOwner: deployer.account?.address!, // Use deployer as initial owner + implementation: ThanksToken_IMPL.address, + hatsAddress: Hats.address, + fractionTokenAddress: hatsFractionTokenModuleAddress, + hatsTimeFrameModuleAddress: HatsTimeFrameModule.address, + }, + Create2Deployer.address, + ); + const ThanksTokenFactory = _ThanksTokenFactory; + + // Set BigBang address on ThanksTokenFactory + await ThanksTokenFactory.write.setBigBang([ + bigBangAddress.account?.address!, + ]); + + // Create ThanksToken instance using factory + const createTxHash = + await ThanksTokenFactory.write.createThanksTokenDeterministic( + [ + "Test ThanksToken", + "TTK", + bigBangAddress.account?.address!, + 1000000000000000000n, // 1.0 in wei (default coefficient) + "0x0000000000000000000000000000000000000000000000000000000000000001" as `0x${string}`, + ], + { account: bigBangAddress.account }, + ); + + const createReceipt = await publicClient.waitForTransactionReceipt({ + hash: createTxHash, + }); + + let thanksTokenAddress: Address | undefined; + for (const log of createReceipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: ThanksTokenFactory.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName === "ThanksTokenCreated") { + thanksTokenAddress = decodedLog.args.tokenAddress as Address; + break; + } + } catch (error) {} + } + + if (!thanksTokenAddress) { + throw new Error("ThanksToken address not found in transaction logs"); + } + + // Get the actual ThanksToken clone instance + ThanksToken = await viem.getContractAt("ThanksToken", thanksTokenAddress); + const { SplitsCreatorFactory: _SplitsCreatorFactory } = await deploySplitsCreatorFactory( SplitsCreator_IMPL.address, @@ -495,6 +649,7 @@ describe("CreateSplit", () => { PullSplitsFactory.address, HatsTimeFrameModule.address, hatsFractionTokenModuleAddress, + ThanksToken.address, keccak256("0x1234"), ], { account: bigBangAddress.account }, @@ -726,6 +881,7 @@ describe("CreateSplit", () => { multiplierTop: 2n, }, ], + weightsInfo, ]); const endWoreTime = await publicClient @@ -750,11 +906,14 @@ describe("CreateSplit", () => { data: log.data, topics: log.topics, }); - if (decodedLog.eventName == "SplitsCreated") + if (decodedLog.eventName == "SplitsCreated") { splitAddress = decodedLog.args.split; - shareHolders = decodedLog.args.shareHolders; - allocations = decodedLog.args.allocations; - totalAllocation = decodedLog.args.totalAllocation; + console; + shareHolders = decodedLog.args.shareHolders; + allocations = decodedLog.args.allocations; + totalAllocation = decodedLog.args.totalAllocation; + console.log("splitsAddress:", splitAddress); + } } catch (error) { shareHolders = []; allocations = []; @@ -762,7 +921,7 @@ describe("CreateSplit", () => { } } - expect(shareHolders.length).to.equal(5); + // expect(shareHolders.length).to.equal(5); const address1Time = endWoreTime - address1WoreTime; const address2Time = endWoreTime - address2WoreTime; @@ -813,23 +972,44 @@ describe("CreateSplit", () => { ]); expect(address3Balance).to.equal(10000n); + console.log("allocations:\n", allocations); + expect(allocations.length).to.equal(5); - expect(allocations[0]).to.equal( - ((address1Balance * 1000000n) / 20000n) * 1n * sqrtAddress1Time, - ); - expect(allocations[1]).to.equal( - ((address4Balance * 1000000n) / 20000n) * 1n * sqrtAddress1Time, - ); - expect(allocations[2]).to.equal( - ((address3_address1Balance * 1000000n) / 20000n) * 1n * sqrtAddress1Time, - ); - expect(allocations[3]).to.equal( - ((address2Balance * 1000000n) / 20000n) * 1n * sqrtAddress2Time, + + const PRECISION = 1000000000n; + + // These are the allocations calculated within _calculateRoleAllocations, + // which are normalized per splitInfo (i.e., per hat). + const roleAllocationsFromContract = [ + // address1 (wearer of hat1) + (address1Balance * 1n * sqrtAddress1Time * PRECISION) / 20000n, + // address4 (recipient of address1) + (address4Balance * 1n * sqrtAddress1Time * PRECISION) / 20000n, + // address3 (recipient of address1) + (address3_address1Balance * 1n * sqrtAddress1Time * PRECISION) / 20000n, + // address2 (wearer of hat1) + (address2Balance * 1n * sqrtAddress2Time * PRECISION) / 20000n, + // address3 (wearer of hat2) + (address3Balance * 2n * sqrtAddress3Time * PRECISION) / 10000n, + ]; + + // Sum of the above allocations, equivalent to `roleTotalAllocation` in SplitsCreator.sol + const roleTotalAllocation = roleAllocationsFromContract.reduce( + (sum, current) => sum + current, + 0n, ); - expect(allocations[4]).to.equal( - ((address3Balance * 1000000n) / 10000n) * 2n * sqrtAddress3Time, + + // Final normalization performed in _calculateAllocations + const expectedAllocations = roleAllocationsFromContract.map( + (alloc) => (alloc * PRECISION) / roleTotalAllocation, ); + expect(allocations[0]).to.equal(expectedAllocations[0]); + expect(allocations[1]).to.equal(expectedAllocations[1]); + expect(allocations[2]).to.equal(expectedAllocations[2]); + expect(allocations[3]).to.equal(expectedAllocations[3]); + expect(allocations[4]).to.equal(expectedAllocations[4]); + await address1.sendTransaction({ account: address1.account!, to: splitAddress, @@ -898,15 +1078,20 @@ describe("CreateSplit", () => { address: address3.account?.address!, }); - expect(Number(afterAddress1Balance) - Number(beforeAddress1Balance)).gt( - 500, - ); - expect(Number(afterAddress2Balance) - Number(beforeAddress2Balance)).gt( - 249, - ); - expect(Number(afterAddress3Balance) - Number(beforeAddress3Balance)).gt( - 249, - ); + const address1Diff = + Number(afterAddress1Balance) - Number(beforeAddress1Balance); + const address2Diff = + Number(afterAddress2Balance) - Number(beforeAddress2Balance); + const address3Diff = + Number(afterAddress3Balance) - Number(beforeAddress3Balance); + + console.log("Address1Diff:", address1Diff); + console.log("Address2Diff:", address2Diff); + console.log("Address3Diff:", address3Diff); + + expect(address1Diff).gt(500); + expect(address2Diff).gt(249); + expect(address3Diff).gt(249); }); it("should preview allocations correctly", async () => { @@ -925,12 +1110,32 @@ describe("CreateSplit", () => { }, ]; - const previewResult = await SplitsCreator.read.preview([splitsInfo]); + const previewResult = await SplitsCreator.read.preview([ + splitsInfo, + weightsInfo, + ]); const shareHolders = previewResult[0]; const allocations = previewResult[1]; const totalAllocation = previewResult[2]; + // Create a map to aggregate allocations by address + const aggregatedAllocations = new Map(); + + for (let i = 0; i < shareHolders.length; i++) { + const address = shareHolders[i]; + const allocation = allocations[i]; + + if (aggregatedAllocations.has(address)) { + aggregatedAllocations.set( + address, + aggregatedAllocations.get(address)! + allocation, + ); + } else { + aggregatedAllocations.set(address, allocation); + } + } + const endWoreTime = await publicClient .getBlock({ blockTag: "latest", @@ -977,23 +1182,42 @@ describe("CreateSplit", () => { address3TokenId, ]); - const allocation0 = - ((address1Balance * 1000000n) / 20000n) * 1n * sqrtAddress1Time; - const allocation1 = - ((address4Balance * 1000000n) / 20000n) * 1n * sqrtAddress1Time; - const allocation2 = - ((address2Balance * 1000000n) / 20000n) * 1n * sqrtAddress2Time; - const allocation3 = - ((address3Balance * 1000000n) / 10000n) * 2n * sqrtAddress3Time; - - const expectedAllocations = [ - allocation0, - allocation1, - allocation2, - allocation3, + const PRECISION = 1000000000n; + + // These are the allocations calculated within _calculateRoleAllocations, + // which are normalized per splitInfo (i.e., per hat). + const roleAllocationsFromContract = [ + // address1 (wearer of hat1) + (address1Balance * 1n * sqrtAddress1Time * PRECISION) / 20000n, + // address4 (recipient of address1) + (address4Balance * 1n * sqrtAddress1Time * PRECISION) / 20000n, + // address3 (recipient of address1) + ((await HatsFractionTokenModule.read.balanceOf([ + address3.account?.address!, + address1TokenId, + ])) * + 1n * + sqrtAddress1Time * + PRECISION) / + 20000n, + // address2 (wearer of hat1) + (address2Balance * 1n * sqrtAddress2Time * PRECISION) / 20000n, + // address3 (wearer of hat2) + (address3Balance * 2n * sqrtAddress3Time * PRECISION) / 10000n, ]; - expect(shareHolders.length).to.equal(5); + // Sum of the above allocations, equivalent to `roleTotalAllocation` in SplitsCreator.sol + const roleTotalAllocation = roleAllocationsFromContract.reduce( + (sum, current) => sum + current, + 0n, + ); + + // Final normalization performed in _calculateAllocations + const expectedAllocations = roleAllocationsFromContract.map( + (alloc) => (alloc * PRECISION) / roleTotalAllocation, + ); + + // expect(shareHolders.length).to.equal(5); const expectedShareHolders = [ address1.account?.address!, @@ -1024,7 +1248,1201 @@ describe("CreateSplit", () => { expect(allocations[0]).to.equal(expectedAllocations[0]); expect(allocations[1]).to.equal(expectedAllocations[1]); - expect(allocations[3]).to.equal(expectedAllocations[2]); - expect(allocations[4]).to.equal(expectedAllocations[3]); + expect(allocations[2]).to.equal(expectedAllocations[2]); + expect(allocations[3]).to.equal(expectedAllocations[3]); + expect(allocations[4]).to.equal(expectedAllocations[4]); + }); +}); + +describe("CreateSplit with thanks token weight", () => { + let Create2Deployer: Create2Deployer; + let Hats: Hats; + let HatsModuleFactory: HatsModuleFactory; + let HatsTimeFrameModule_IMPL: HatsTimeFrameModule; + let HatsTimeFrameModule: HatsTimeFrameModule; + let HatsFractionTokenModule_IMPL: HatsFractionTokenModule; + let HatsFractionTokenModule: HatsFractionTokenModule; + let SplitsWarehouse: SplitsWarehouse; + let PullSplitsFactory: PullSplitsFactory; + let PushSplitsFactory: PushSplitsFactory; + let SplitsCreatorFactory: SplitsCreatorFactory; + let SplitsCreator_IMPL: SplitsCreator; + let SplitsCreator: SplitsCreator; + let ThanksToken: ThanksToken; + + let address1: WalletClient; + let address2: WalletClient; + let address3: WalletClient; + let address4: WalletClient; + let bigBangAddress: WalletClient; + + let topHatId: bigint; + let hatterHatId: bigint; + let hat1_id: bigint; + let hat2_id: bigint; + + let address1WoreTime: bigint; + let address2WoreTime: bigint; + let address3WoreTime: bigint; + const address1_additional_woreTime = 2592000; + + let publicClient: PublicClient; + + const weightsInfo = { + roleWeight: 1n, + thanksTokenWeight: 1n, + thanksTokenReceivedWeight: 95n, + thanksTokenSentWeight: 5n, + }; + + before(async () => { + const { Create2Deployer: _Create2Deployer } = await deployCreate2Deployer(); + Create2Deployer = _Create2Deployer; + + const { Hats: _Hats } = await deployHatsProtocol(); + Hats = _Hats; + + const { HatsModuleFactory: _HatsModuleFactory } = + await deployHatsModuleFactory(Hats.address); + HatsModuleFactory = _HatsModuleFactory; + + const { HatsTimeFrameModule: _HatsTimeFrameModule } = + await deployHatsTimeFrameModule("0.0.0", Create2Deployer.address); + HatsTimeFrameModule_IMPL = _HatsTimeFrameModule; + + const { + SplitsWarehouse: _SplitsWarehouse, + PullSplitsFactory: _PullSplitsFactory, + PushSplitsFactory: _PushSplitsFactory, + } = await deploySplitsProtocol(); + + SplitsWarehouse = _SplitsWarehouse; + PullSplitsFactory = _PullSplitsFactory; + PushSplitsFactory = _PushSplitsFactory; + + const { SplitsCreator: _SplitsCreator } = await deploySplitsCreator( + Create2Deployer.address, + ); + SplitsCreator_IMPL = _SplitsCreator; + + [address1, address2, address3, address4, bigBangAddress] = + await viem.getWalletClients(); + + publicClient = await viem.getPublicClient(); + + let txHash = await Hats.write.mintTopHat([ + address1.account?.address!, + "Description", + "https://test.com/tophat.png", + ]); + + // Wait for the transaction receipt + let receipt = await publicClient.waitForTransactionReceipt({ + hash: txHash, + }); + + // Extract the TopHat ID from the logs + let topHatId: bigint | undefined = undefined; + for (const log of receipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: Hats.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName === "HatCreated") { + topHatId = decodedLog.args.id; + break; // TopHat will be the first hat created + } + } catch (error) { + // Handle any errors that occur during decoding + console.error("Error decoding log:", error); + throw error; // Continue to the next log if decoding fails + } + } + + // Operator Tobanを作成 + let operatorTobanId = await createHat( + Hats, + publicClient, + topHatId!, + "OperatorToban", + ); + + // Assign Operator Toban to address1 + await Hats.write.mintHat([operatorTobanId, address1.account?.address!]); + + let timeFrameTobanId = await createHat( + Hats, + publicClient, + operatorTobanId, + "TimeFrameToban", + ); + + const { HatsFractionTokenModule: _HatsFractionTokenModule_IMPL } = + await deployHatsFractionTokenModule("0.0.0", Create2Deployer.address); + HatsFractionTokenModule_IMPL = _HatsFractionTokenModule_IMPL; + + const timeFrameInitData = encodeAbiParameters( + [{ type: "uint256" }], + [timeFrameTobanId], + ); + + await HatsModuleFactory.write.createHatsModule([ + HatsTimeFrameModule_IMPL.address, + topHatId!, + "0x", + timeFrameInitData, + BigInt(0), + ]); + + const hatsTimeFrameModuleAddress = + await HatsModuleFactory.read.getHatsModuleAddress([ + HatsTimeFrameModule_IMPL.address, + topHatId!, + "0x", + BigInt(0), + ]); + + HatsTimeFrameModule = await viem.getContractAt( + "HatsTimeFrameModule", + hatsTimeFrameModuleAddress, + ); + + // Deploy HatsFractionTokenModule + const fractionTokenInitData = encodeAbiParameters( + [{ type: "string" }, { type: "uint256" }], + ["https://example.com/fraction-token", 10000n], + ); + + await HatsModuleFactory.write.createHatsModule([ + HatsFractionTokenModule_IMPL.address, + topHatId!, + "0x", + fractionTokenInitData, + BigInt(1), + ]); + + const hatsFractionTokenModuleAddress = + await HatsModuleFactory.read.getHatsModuleAddress([ + HatsFractionTokenModule_IMPL.address, + topHatId!, + "0x", + BigInt(1), + ]); + + HatsFractionTokenModule = await viem.getContractAt( + "HatsFractionTokenModule", + hatsFractionTokenModuleAddress, + ); + + // Deploy ThanksToken even for "without thanks token weight" tests + // because SplitsCreator still calls ThanksToken.getParticipants() + const { ThanksToken: _ThanksToken } = await deployThanksToken( + Create2Deployer.address, + ); + const ThanksToken_IMPL = _ThanksToken; + + // Get the first wallet client to use as deployer + const [deployer] = await viem.getWalletClients(); + + // Deploy ThanksTokenFactory + const { ThanksTokenFactory: _ThanksTokenFactory } = + await deployThanksTokenFactory( + { + initialOwner: deployer.account?.address!, // Use deployer as initial owner + implementation: ThanksToken_IMPL.address, + hatsAddress: Hats.address, + fractionTokenAddress: hatsFractionTokenModuleAddress, + hatsTimeFrameModuleAddress: HatsTimeFrameModule.address, + }, + Create2Deployer.address, + ); + const ThanksTokenFactory = _ThanksTokenFactory; + + // Set BigBang address on ThanksTokenFactory + await ThanksTokenFactory.write.setBigBang([ + bigBangAddress.account?.address!, + ]); + + // Create ThanksToken instance using factory + const createTxHash = + await ThanksTokenFactory.write.createThanksTokenDeterministic( + [ + "Test ThanksToken", + "TTK", + bigBangAddress.account?.address!, + 1000000000000000000n, // 1.0 in wei (default coefficient) + "0x0000000000000000000000000000000000000000000000000000000000000001" as `0x${string}`, + ], + { account: bigBangAddress.account }, + ); + + const createReceipt = await publicClient.waitForTransactionReceipt({ + hash: createTxHash, + }); + + let thanksTokenAddress: Address | undefined; + for (const log of createReceipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: ThanksTokenFactory.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName === "ThanksTokenCreated") { + thanksTokenAddress = decodedLog.args.tokenAddress as Address; + break; + } + } catch (error) {} + } + + if (!thanksTokenAddress) { + throw new Error("ThanksToken address not found in transaction logs"); + } + + // Get the actual ThanksToken clone instance + ThanksToken = await viem.getContractAt("ThanksToken", thanksTokenAddress); + + const { SplitsCreatorFactory: _SplitsCreatorFactory } = + await deploySplitsCreatorFactory( + SplitsCreator_IMPL.address, + Create2Deployer.address, + ); + + SplitsCreatorFactory = _SplitsCreatorFactory; + + await SplitsCreatorFactory.write.setBigBang([ + bigBangAddress.account?.address!, + ]); + + txHash = await SplitsCreatorFactory.write.createSplitCreatorDeterministic( + [ + topHatId!, + Hats.address, + PullSplitsFactory.address, + HatsTimeFrameModule.address, + hatsFractionTokenModuleAddress, + ThanksToken.address, + keccak256("0x1234"), + ], + { account: bigBangAddress.account }, + ); + + receipt = await publicClient.waitForTransactionReceipt({ + hash: txHash, + }); + + for (const log of receipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: SplitsCreatorFactory.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName == "SplitCreatorCreated") { + SplitsCreator = await viem.getContractAt( + "SplitsCreator", + decodedLog.args.splitCreator, + ); + } + } catch (error) {} + } + + txHash = await Hats.write.createHat([ + topHatId!, + "hatterHat", + 3, + "0x0000000000000000000000000000000000004a75", + "0x0000000000000000000000000000000000004a75", + true, + "https://test.com/hat_image.png", + ]); + + receipt = await publicClient.waitForTransactionReceipt({ + hash: txHash, + }); + + for (const log of receipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: Hats.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName == "HatCreated") + hatterHatId = decodedLog.args.id; + } catch (error) {} + } + + txHash = await Hats.write.createHat([ + hatterHatId, + "role1", + 10, + "0x0000000000000000000000000000000000004a75", + "0x0000000000000000000000000000000000004a75", + true, + "https://test.com/hat_image.png", + ]); + + receipt = await publicClient.waitForTransactionReceipt({ + hash: txHash, + }); + + for (const log of receipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: Hats.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName == "HatCreated") hat1_id = decodedLog.args.id; + } catch (error) {} + } + + txHash = await Hats.write.createHat([ + hatterHatId, + "role2", + 10, + "0x0000000000000000000000000000000000004a75", + "0x0000000000000000000000000000000000004a75", + true, + "https://test.com/hat_image.png", + ]); + + receipt = await publicClient.waitForTransactionReceipt({ + hash: txHash, + }); + + for (const log of receipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: Hats.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName == "HatCreated") hat2_id = decodedLog.args.id; + } catch (error) {} + } + + await Hats.write.mintHat([hatterHatId, HatsTimeFrameModule.address]); + + await HatsTimeFrameModule.write.mintHat([ + hat1_id, + address1.account?.address!, + 0n, + ]); + + address1WoreTime = await publicClient + .getBlock({ + blockTag: "latest", + }) + .then((block) => block.timestamp); + + await time.increase(address1_additional_woreTime); + + await HatsTimeFrameModule.write.mintHat([ + hat1_id, + address2.account?.address!, + 0n, + ]); + + address2WoreTime = await publicClient + .getBlock({ + blockTag: "latest", + }) + .then((block) => block.timestamp); + + await HatsTimeFrameModule.write.mintHat([ + hat2_id, + address3.account?.address!, + 0n, + ]); + + address3WoreTime = await publicClient + .getBlock({ + blockTag: "latest", + }) + .then((block) => block.timestamp); + + await HatsFractionTokenModule.write.mintInitialSupply([ + hat1_id, + address1.account?.address!, + 0n, + ]); + await HatsFractionTokenModule.write.mintInitialSupply([ + hat1_id, + address2.account?.address!, + 0n, + ]); + await HatsFractionTokenModule.write.mintInitialSupply([ + hat2_id, + address3.account?.address!, + 0n, + ]); + + const tokenId = await HatsFractionTokenModule.read.getTokenId([ + hat1_id, + address1.account?.address!, + ]); + await HatsFractionTokenModule.write.safeTransferFrom( + [ + address1.account?.address!, + address4.account?.address!, + tokenId, + 3000n, + "0x", + ], + { + account: address1.account!, + }, + ); + await HatsFractionTokenModule.write.safeTransferFrom( + [ + address1.account?.address!, + address3.account?.address!, + tokenId, + 1000n, + "0x", + ], + { + account: address1.account!, + }, + ); + + const address1Balance = await HatsFractionTokenModule.read.balanceOf([ + address1.account?.address!, + tokenId, + ]); + expect(address1Balance).to.equal(6000n); + + // address2のbalance + const address2TokenId = await HatsFractionTokenModule.read.getTokenId([ + hat1_id, + address2.account?.address!, + ]); + const address2Balance = await HatsFractionTokenModule.read.balanceOf([ + address2.account?.address!, + address2TokenId, + ]); + expect(address2Balance).to.equal(10000n); + + // address3のbalance + const address3TokenId = await HatsFractionTokenModule.read.getTokenId([ + hat2_id, + address3.account?.address!, + ]); + const address3Balance = await HatsFractionTokenModule.read.balanceOf([ + address3.account?.address!, + address3TokenId, + ]); + expect(address3Balance).to.equal(10000n); + }); + it("should setup ThanksToken correctly before testing splits", async () => { + // Check if ThanksToken is already initialized (not zero address) + if (ThanksToken.address === zeroAddress) { + // First, create ThanksToken using the factory + const { ThanksToken: _ThanksToken } = await deployThanksToken( + Create2Deployer.address, + ); + const ThanksToken_IMPL = _ThanksToken; + + // Get the first wallet client to use as deployer + const [deployer] = await viem.getWalletClients(); + + // Deploy ThanksTokenFactory + const { ThanksTokenFactory: _ThanksTokenFactory } = + await deployThanksTokenFactory( + { + initialOwner: deployer.account?.address!, // Use deployer as initial owner + implementation: ThanksToken_IMPL.address, + hatsAddress: Hats.address, + fractionTokenAddress: HatsFractionTokenModule.address, + hatsTimeFrameModuleAddress: HatsTimeFrameModule.address, + }, + Create2Deployer.address, + ); + const ThanksTokenFactory = _ThanksTokenFactory; + + // Set BigBang address on ThanksTokenFactory + await ThanksTokenFactory.write.setBigBang([ + bigBangAddress.account?.address!, + ]); + + // Create ThanksToken instance using factory + const createTxHash = + await ThanksTokenFactory.write.createThanksTokenDeterministic( + [ + "Test ThanksToken", + "TTK", + bigBangAddress.account?.address!, + 10000000000000000000n, // 10.0 in wei (higher coefficient for testing) + "0x0000000000000000000000000000000000000000000000000000000000000001" as `0x${string}`, + ], + { account: bigBangAddress.account }, + ); + + const createReceipt = await publicClient.waitForTransactionReceipt({ + hash: createTxHash, + }); + + let thanksTokenAddress: Address | undefined; + for (const log of createReceipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: ThanksTokenFactory.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName === "ThanksTokenCreated") { + thanksTokenAddress = decodedLog.args.tokenAddress as Address; + break; + } + } catch (error) {} + } + + if (!thanksTokenAddress) { + throw new Error("ThanksToken address not found in transaction logs"); + } + + // Get the actual ThanksToken clone instance + ThanksToken = await viem.getContractAt("ThanksToken", thanksTokenAddress); + + // Now update SplitsCreator to use the actual ThanksToken address + const txHash = + await SplitsCreatorFactory.write.createSplitCreatorDeterministic( + [ + topHatId!, + Hats.address, + PullSplitsFactory.address, + HatsTimeFrameModule.address, + HatsFractionTokenModule.address, + ThanksToken.address, // Now using actual ThanksToken address + keccak256( + encodeAbiParameters( + [{ type: "string" }], + ["0x1234" + ThanksToken.address], + ), + ), // Different salt to create new instance + ], + { account: bigBangAddress.account }, + ); + + const receipt = await publicClient.waitForTransactionReceipt({ + hash: txHash, + }); + + for (const log of receipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: SplitsCreatorFactory.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName == "SplitCreatorCreated") { + SplitsCreator = await viem.getContractAt( + "SplitsCreator", + decodedLog.args.splitCreator, + ); + } + } catch (error) {} + } + } + + // Setup address coefficients for testing + await ThanksToken.write.setAddressCoefficients( + [ + [ + address1.account?.address!, + address2.account?.address!, + address3.account?.address!, + ], + [10000000000000000000n, 10000000000000000000n, 10000000000000000000n], // 10.0 coefficient for all + ], + { account: bigBangAddress.account }, + ); + + // Ensure all addresses have hats and shares for ThanksToken minting + const isWearingHat1 = await Hats.read.balanceOf([ + address1.account?.address!, + hat1_id, + ]); + + if (isWearingHat1 === 0n) { + await HatsTimeFrameModule.write.mintHat([ + hat1_id, + address1.account?.address!, + BigInt(Math.floor(Date.now() / 1000) - 3600 * 10), // Wearing for 10 hours + ]); + } + + const isWearingHat2 = await Hats.read.balanceOf([ + address2.account?.address!, + hat1_id, + ]); + + if (isWearingHat2 === 0n) { + await HatsTimeFrameModule.write.mintHat([ + hat1_id, + address2.account?.address!, + BigInt(Math.floor(Date.now() / 1000) - 3600 * 5), // Wearing for 5 hours + ]); + } + + // Ensure fraction tokens are minted + const fractionBalance1 = await HatsFractionTokenModule.read.balanceOf([ + address1.account?.address!, + address1.account?.address!, + hat1_id, + ]); + + if (fractionBalance1 === 0n) { + await HatsFractionTokenModule.write + .mintInitialSupply([hat1_id, address1.account?.address!, 0n], { + account: bigBangAddress.account, + }) + .catch(() => {}); + } + + const fractionBalance2 = await HatsFractionTokenModule.read.balanceOf([ + address2.account?.address!, + address2.account?.address!, + hat1_id, + ]); + + if (fractionBalance2 === 0n) { + await HatsFractionTokenModule.write + .mintInitialSupply([hat1_id, address2.account?.address!, 0n], { + account: bigBangAddress.account, + }) + .catch(() => {}); + } + + // Now perform ThanksToken minting between addresses + const relatedRoles1 = [ + { + hatId: hat1_id, + wearer: address1.account?.address!, + }, + ]; + + const relatedRoles2 = [ + { + hatId: hat1_id, + wearer: address2.account?.address!, + }, + ]; + + // address1 mints ThanksToken to address2 + const mintableAmount1 = await ThanksToken.read.mintableAmount([ + address1.account?.address!, + relatedRoles1, + ]); + + expect(Number(mintableAmount1)).to.be.greaterThan(0); + + await ThanksToken.write.mint( + [address2.account?.address!, mintableAmount1 / 2n, relatedRoles1], + { account: address1.account }, + ); + + // address2 mints ThanksToken to address3 + const mintableAmount2 = await ThanksToken.read.mintableAmount([ + address2.account?.address!, + relatedRoles2, + ]); + + expect(Number(mintableAmount2)).to.be.greaterThan(0); + + await ThanksToken.write.mint( + [address3.account?.address!, mintableAmount2 / 2n, relatedRoles2], + { account: address2.account }, + ); + + // Check balances + const balance1 = await ThanksToken.read.balanceOf([ + address1.account?.address!, + ]); + const balance2 = await ThanksToken.read.balanceOf([ + address2.account?.address!, + ]); + const balance3 = await ThanksToken.read.balanceOf([ + address3.account?.address!, + ]); + + console.log("ThanksToken balances after minting:"); + console.log("Address1:", balance1); + console.log("Address2:", balance2); + console.log("Address3:", balance3); + + expect(Number(balance2)).to.be.greaterThan(0); + expect(Number(balance3)).to.be.greaterThan(0); + }); + + it("should create a split", async () => { + const txHash = await SplitsCreator.write.create([ + [ + { + hatId: hat1_id, + wearers: [address1.account?.address!, address2.account?.address!], + multiplierBottom: 1n, + multiplierTop: 1n, + }, + { + hatId: hat2_id, + wearers: [address3.account?.address!], + multiplierBottom: 1n, + multiplierTop: 2n, + }, + ], + weightsInfo, + ]); + + const endWoreTime = await publicClient + .getBlock({ + blockTag: "latest", + }) + .then((block) => block.timestamp); + + const receipt = await publicClient.waitForTransactionReceipt({ + hash: txHash, + }); + + let splitAddress!: Address; + let shareHolders!: readonly Address[]; + let allocations!: readonly bigint[]; + let totalAllocation!: bigint; + + for (const log of receipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: SplitsCreator.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName == "SplitsCreated") { + splitAddress = decodedLog.args.split; + console.log("splitsAddress:", splitAddress); + shareHolders = decodedLog.args.shareHolders; + allocations = decodedLog.args.allocations; + totalAllocation = decodedLog.args.totalAllocation; + } + } catch (error) { + shareHolders = []; + allocations = []; + totalAllocation = 0n; + } + } + + // expect(shareHolders.length).to.equal(5); + + const address1Time = endWoreTime - address1WoreTime; + const address2Time = endWoreTime - address2WoreTime; + const address3Time = endWoreTime - address3WoreTime; + + const sqrtAddress1Time = sqrt(address1Time); + const sqrtAddress2Time = sqrt(address2Time); + const sqrtAddress3Time = sqrt(address3Time); + + const address1TokenId = await HatsFractionTokenModule.read.getTokenId([ + hat1_id, + address1.account?.address!, + ]); + const address1Balance = await HatsFractionTokenModule.read.balanceOf([ + address1.account?.address!, + address1TokenId, + ]); + expect(address1Balance).to.equal(6000n); + + const address3_address1Balance = + await HatsFractionTokenModule.read.balanceOf([ + address3.account?.address!, + address1TokenId, + ]); + + const address4Balance = await HatsFractionTokenModule.read.balanceOf([ + address4.account?.address!, + address1TokenId, + ]); + + const address2TokenId = await HatsFractionTokenModule.read.getTokenId([ + hat1_id, + address2.account?.address!, + ]); + const address2Balance = await HatsFractionTokenModule.read.balanceOf([ + address2.account?.address!, + address2TokenId, + ]); + expect(address2Balance).to.equal(10000n); + + const address3TokenId = await HatsFractionTokenModule.read.getTokenId([ + hat2_id, + address3.account?.address!, + ]); + const address3Balance = await HatsFractionTokenModule.read.balanceOf([ + address3.account?.address!, + address3TokenId, + ]); + expect(address3Balance).to.equal(10000n); + + expect(allocations.length).to.equal(8); + + const PRECISION = 1000000000n; + + const { thanksTokenReceivedWeight, thanksTokenSentWeight } = weightsInfo; + + const thanksParticipants = await ThanksToken.read.getParticipants(); + let totalThanksBalance = 0n; + let totalThanksMinted = 0n; + for (const p of thanksParticipants) { + totalThanksBalance += await ThanksToken.read.balanceOf([p]); + totalThanksMinted += await ThanksToken.read.mintedAmount([p]); + } + + const thanksTokenWeightSum = + thanksTokenReceivedWeight + thanksTokenSentWeight; + + // Calculate thanks-based allocations + const thanksAllocations: { [key: string]: bigint } = {}; + let thanksTotalAllocation = 0n; + for (const p of thanksParticipants) { + const balance = await ThanksToken.read.balanceOf([p]); + const minted = await ThanksToken.read.mintedAmount([p]); + const score = + (thanksTokenReceivedWeight * balance * PRECISION) / totalThanksBalance + + (thanksTokenSentWeight * minted * PRECISION) / totalThanksMinted; + thanksAllocations[p] = score / thanksTokenWeightSum; + thanksTotalAllocation += thanksAllocations[p]; + } + + // hat1 is for address1 and address2. Its fraction token supply is 20000. + const hat1Supply = 20000n; + // hat2 is for address3. Its fraction token supply is 10000. + const hat2Supply = 10000n; + + // Calculate role-based allocations + const roleAllocations = [ + (address1Balance * 1n * sqrtAddress1Time * PRECISION) / hat1Supply, + (address4Balance * 1n * sqrtAddress1Time * PRECISION) / hat1Supply, + (address3_address1Balance * 1n * sqrtAddress1Time * PRECISION) / + hat1Supply, + (address2Balance * 1n * sqrtAddress2Time * PRECISION) / hat1Supply, + (address3Balance * 2n * sqrtAddress3Time * PRECISION) / hat2Supply, + ]; + + // Sum of the above allocations, equivalent to `roleTotalAllocation` in SplitsCreator.sol + const roleTotalAllocation = roleAllocations.reduce( + (sum, current) => sum + current, + 0n, + ); + + // Combine allocations with weights + const weightSum = weightsInfo.roleWeight + weightsInfo.thanksTokenWeight; + + const expectedThanksAllocations = []; + for (const p of thanksParticipants) { + expectedThanksAllocations.push( + (thanksAllocations[p] * weightsInfo.thanksTokenWeight * PRECISION) / + thanksTotalAllocation / + weightSum, + ); + } + const expectedRoleAllocations = roleAllocations.map( + (alloc) => + (alloc * weightsInfo.roleWeight * PRECISION) / + roleTotalAllocation / + weightSum, + ); + + const expectedAllocations = [ + ...expectedThanksAllocations, + ...expectedRoleAllocations, + ]; + + expect(allocations[0]).to.equal(expectedAllocations[0]); + expect(allocations[1]).to.equal(expectedAllocations[1]); + expect(allocations[2]).to.equal(expectedAllocations[2]); + expect(allocations[3]).to.equal(expectedAllocations[3]); + expect(allocations[4]).to.equal(expectedAllocations[4]); + expect(allocations[5]).to.equal(expectedAllocations[5]); + expect(allocations[6]).to.equal(expectedAllocations[6]); + expect(allocations[7]).to.equal(expectedAllocations[7]); + + await address1.sendTransaction({ + account: address1.account!, + to: splitAddress, + value: parseEther("1000"), + chain: undefined, + }); + + const beforeAddress1Balance = await publicClient.getBalance({ + address: address1.account?.address!, + }); + const beforeAddress2Balance = await publicClient.getBalance({ + address: address2.account?.address!, + }); + const beforeAddress3Balance = await publicClient.getBalance({ + address: address3.account?.address!, + }); + + const Split = await viem.getContractAt("PullSplit", splitAddress); + await Split.write.distribute([ + { + recipients: shareHolders, + allocations: allocations, + totalAllocation: totalAllocation, + distributionIncentive: 0, + }, + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + address1.account?.address!, + ] as any); + + // withdrawを実行 + await SplitsWarehouse.write.withdraw( + [ + address1.account?.address!, + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + ], + { + account: address1.account!, + }, + ); + await SplitsWarehouse.write.withdraw( + [ + address2.account?.address!, + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + ], + { + account: address2.account!, + }, + ); + await SplitsWarehouse.write.withdraw( + [ + address3.account?.address!, + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + ], + { + account: address3.account!, + }, + ); + + const afterAddress1Balance = await publicClient.getBalance({ + address: address1.account?.address!, + }); + const afterAddress2Balance = await publicClient.getBalance({ + address: address2.account?.address!, + }); + const afterAddress3Balance = await publicClient.getBalance({ + address: address3.account?.address!, + }); + + const address1Diff = + Number(afterAddress1Balance) - Number(beforeAddress1Balance); + const address2Diff = + Number(afterAddress2Balance) - Number(beforeAddress2Balance); + const address3Diff = + Number(afterAddress3Balance) - Number(beforeAddress3Balance); + + console.log("Address1Diff:", address1Diff); + console.log("Address2Diff:", address2Diff); + console.log("Address3Diff:", address3Diff); + + expect(address1Diff).gt(500); + expect(address2Diff).gt(249); + expect(address3Diff).gt(249); + }); + + it("should preview allocations correctly", async () => { + const splitsInfo = [ + { + hatId: hat1_id, + wearers: [address1.account?.address!, address2.account?.address!], + multiplierBottom: 1n, + multiplierTop: 1n, + }, + { + hatId: hat2_id, + wearers: [address3.account?.address!], + multiplierBottom: 1n, + multiplierTop: 2n, + }, + ]; + + const previewResult = await SplitsCreator.read.preview([ + splitsInfo, + weightsInfo, + ]); + + const shareHolders = previewResult[0]; + const allocations = previewResult[1]; + const totalAllocation = previewResult[2]; + + const endWoreTime = await publicClient + .getBlock({ + blockTag: "latest", + }) + .then((block) => block.timestamp); + + const address1Time = BigInt(endWoreTime - address1WoreTime); + const address2Time = BigInt(endWoreTime - address2WoreTime); + const address3Time = BigInt(endWoreTime - address3WoreTime); + + const sqrtAddress1Time = sqrt(address1Time); + const sqrtAddress2Time = sqrt(address2Time); + const sqrtAddress3Time = sqrt(address3Time); + + const address1TokenId = await HatsFractionTokenModule.read.getTokenId([ + hat1_id, + address1.account?.address!, + ]); + const address1Balance = await HatsFractionTokenModule.read.balanceOf([ + address1.account?.address!, + address1TokenId, + ]); + + const address4Balance = await HatsFractionTokenModule.read.balanceOf([ + address4.account?.address!, + address1TokenId, + ]); + + const address2TokenId = await HatsFractionTokenModule.read.getTokenId([ + hat1_id, + address2.account?.address!, + ]); + const address2Balance = await HatsFractionTokenModule.read.balanceOf([ + address2.account?.address!, + address2TokenId, + ]); + + const address3TokenId = await HatsFractionTokenModule.read.getTokenId([ + hat2_id, + address3.account?.address!, + ]); + const address3Balance = await HatsFractionTokenModule.read.balanceOf([ + address3.account?.address!, + address3TokenId, + ]); + + const PRECISION = 1000000000n; + + const { thanksTokenReceivedWeight, thanksTokenSentWeight } = weightsInfo; + + const thanksParticipants = await ThanksToken.read.getParticipants(); + let totalThanksBalance = 0n; + let totalThanksMinted = 0n; + for (const p of thanksParticipants) { + totalThanksBalance += await ThanksToken.read.balanceOf([p]); + totalThanksMinted += await ThanksToken.read.mintedAmount([p]); + } + + const thanksTokenWeightSum = + thanksTokenReceivedWeight + thanksTokenSentWeight; + + // Calculate thanks-based allocations + const thanksAllocations: { [key: string]: bigint } = {}; + let thanksTotalAllocation = 0n; + for (const p of thanksParticipants) { + const balance = await ThanksToken.read.balanceOf([p]); + const minted = await ThanksToken.read.mintedAmount([p]); + const score = + (thanksTokenReceivedWeight * balance * PRECISION) / totalThanksBalance + + (thanksTokenSentWeight * minted * PRECISION) / totalThanksMinted; + thanksAllocations[p] = score / thanksTokenWeightSum; + thanksTotalAllocation += thanksAllocations[p]; + } + + // hat1 is for address1 and address2. Its fraction token supply is 20000. + const hat1Supply = 20000n; + // hat2 is for address3. Its fraction token supply is 10000. + const hat2Supply = 10000n; + + const address3_address1Balance = + await HatsFractionTokenModule.read.balanceOf([ + address3.account?.address!, + address1TokenId, + ]); + + // Calculate role-based allocations + const roleAllocations = [ + (address1Balance * 1n * sqrtAddress1Time * PRECISION) / hat1Supply, + (address4Balance * 1n * sqrtAddress1Time * PRECISION) / hat1Supply, + (address3_address1Balance * 1n * sqrtAddress1Time * PRECISION) / + hat1Supply, + (address2Balance * 1n * sqrtAddress2Time * PRECISION) / hat1Supply, + (address3Balance * 2n * sqrtAddress3Time * PRECISION) / hat2Supply, + ]; + const roleTotalAllocation = roleAllocations.reduce((a, b) => a + b, 0n); + + // Combine allocations with weights + const weightSum = weightsInfo.roleWeight + weightsInfo.thanksTokenWeight; + + const expectedThanksAllocations = []; + for (const p of thanksParticipants) { + expectedThanksAllocations.push( + (thanksAllocations[p] * weightsInfo.thanksTokenWeight * PRECISION) / + thanksTotalAllocation / + weightSum, + ); + } + const expectedRoleAllocations = roleAllocations.map( + (alloc) => + (alloc * weightsInfo.roleWeight * PRECISION) / + roleTotalAllocation / + weightSum, + ); + + const expectedAllocations = [ + ...expectedThanksAllocations, + ...expectedRoleAllocations, + ]; + + // expect(shareHolders.length).to.equal(5); + + const expectedShareHolders = [ + address1.account?.address!, // thanks token + address2.account?.address!, + address3.account?.address!, + address1.account?.address!, // role share + address4.account?.address!, + address3.account?.address!, + address2.account?.address!, + address3.account?.address!, + ]; + + // Convert addresses to lowercase before comparing + expect(shareHolders[0].toLowerCase()).to.equal( + expectedShareHolders[0].toLowerCase(), + ); + expect(shareHolders[1].toLowerCase()).to.equal( + expectedShareHolders[1].toLowerCase(), + ); + expect(shareHolders[2].toLowerCase()).to.equal( + expectedShareHolders[2].toLowerCase(), + ); + expect(shareHolders[3].toLowerCase()).to.equal( + expectedShareHolders[3].toLowerCase(), + ); + expect(shareHolders[4].toLowerCase()).to.equal( + expectedShareHolders[4].toLowerCase(), + ); + expect(shareHolders[5].toLowerCase()).to.equal( + expectedShareHolders[5].toLowerCase(), + ); + expect(shareHolders[6].toLowerCase()).to.equal( + expectedShareHolders[6].toLowerCase(), + ); + expect(shareHolders[7].toLowerCase()).to.equal( + expectedShareHolders[7].toLowerCase(), + ); + expect(allocations.length).to.equal(8); + + expect(allocations[0]).to.equal(expectedAllocations[0]); + expect(allocations[1]).to.equal(expectedAllocations[1]); + expect(allocations[2]).to.equal(expectedAllocations[2]); + expect(allocations[3]).to.equal(expectedAllocations[3]); + expect(allocations[4]).to.equal(expectedAllocations[4]); + expect(allocations[5]).to.equal(expectedAllocations[5]); + expect(allocations[6]).to.equal(expectedAllocations[6]); + expect(allocations[7]).to.equal(expectedAllocations[7]); }); }); diff --git a/pkgs/contract/test/ThanksToken.ts b/pkgs/contract/test/ThanksToken.ts index 3cd9828d..88894f11 100644 --- a/pkgs/contract/test/ThanksToken.ts +++ b/pkgs/contract/test/ThanksToken.ts @@ -66,6 +66,10 @@ const createHat = async ( }; describe("ThanksToken", () => { + const tokenName = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~あいうえお"; + const tokenSymbol = "ALL-CHARS-シンボル"; + let Create2Deployer: Create2Deployer; let Hats: Hats; let HatsModuleFactory: HatsModuleFactory; @@ -212,17 +216,6 @@ describe("ThanksToken", () => { ); const { ThanksToken: _ThanksToken } = await deployThanksToken( - { - initialOwner: await deployer - .getAddresses() - .then((addresses) => addresses[0]), - name: "Test Thanks Token", - symbol: "TTT", - hatsAddress: Hats.address, - fractionTokenAddress: HatsFractionTokenModule.address, - hatsTimeFrameModuleAddress: HatsTimeFrameModule.address, - defaultCoefficient: 1000000000000000000n, // 1.0 in wei - }, Create2Deployer.address, ); DeployedThanksToken = _ThanksToken; @@ -242,6 +235,48 @@ describe("ThanksToken", () => { ); ThanksTokenFactory = _ThanksTokenFactory; + // Set BigBang address on ThanksTokenFactory (temporarily set deployer for testing) + await ThanksTokenFactory.write.setBigBang([deployerAddress]); + + // Create ThanksToken instance using factory + const createTxHash = + await ThanksTokenFactory.write.createThanksTokenDeterministic([ + tokenName, + tokenSymbol, + deployerAddress, + 1000000000000000000n, // 1.0 in wei + "0x0000000000000000000000000000000000000000000000000000000000000001" as `0x${string}`, + ]); + + const createReceipt = await publicClient.waitForTransactionReceipt({ + hash: createTxHash, + }); + + let thanksTokenAddress: Address | undefined; + for (const log of createReceipt.logs) { + try { + const decodedLog = decodeEventLog({ + abi: ThanksTokenFactory.abi, + data: log.data, + topics: log.topics, + }); + if (decodedLog.eventName === "ThanksTokenCreated") { + thanksTokenAddress = decodedLog.args.tokenAddress as Address; + break; + } + } catch (error) {} + } + + if (!thanksTokenAddress) { + throw new Error("ThanksToken address not found in transaction logs"); + } + + // Get the actual ThanksToken clone instance + DeployedThanksToken = await viem.getContractAt( + "ThanksToken", + thanksTokenAddress, + ); + let txHash2 = await Hats.write.createHat([ topHatId, "Hatter Hat", @@ -306,11 +341,11 @@ describe("ThanksToken", () => { it("should initialize with correct name, symbol and owner", async () => { const name = await DeployedThanksToken.read.name(); const symbol = await DeployedThanksToken.read.symbol(); - const owner = await DeployedThanksToken.read.owner(); + const owner = await DeployedThanksToken.read.WORKSPACE_OWNER(); const deployerAddress = validateAddress(deployer); - expect(name).to.equal("Test Thanks Token"); - expect(symbol).to.equal("TTT"); + expect(name).to.equal(tokenName); + expect(symbol).to.equal(tokenSymbol); expect(owner.toLowerCase()).to.equal(deployerAddress.toLowerCase()); }); @@ -672,5 +707,66 @@ describe("ThanksToken", () => { expect(error.message).to.include("Amount exceeds mintable amount"); } }); + + it("should track participants correctly", async () => { + // Note: previous tests have already minted from address1 to address2. + // So, participants should already include both. + let participants = await DeployedThanksToken.read.getParticipants(); + expect(participants.map((p) => p.toLowerCase())).to.have.members([ + address1Validated.toLowerCase(), + address2Validated.toLowerCase(), + ]); + + // Increase time to accrue more mintable amount for address1 + await time.increase(3600 * 5); // 5 hours + + const relatedRoles = [ + { + hatId, + wearer: address1Validated, + }, + ]; + + const mintableAmount = await DeployedThanksToken.read.mintableAmount([ + address1Validated, + relatedRoles, + ]); + + // Mint from address1 to address3, who is a new participant + await DeployedThanksToken.write.mint( + [address3Validated, mintableAmount, relatedRoles], + { account: address1.account }, + ); + + const newParticipants = await DeployedThanksToken.read.getParticipants(); + expect(newParticipants).to.have.lengthOf(3); + expect(newParticipants.map((p) => p.toLowerCase())).to.have.members([ + address1Validated.toLowerCase(), + address2Validated.toLowerCase(), + address3Validated.toLowerCase(), + ]); + + // Mint again to an existing participant (address2) to ensure no duplicates are added + await time.increase(3600 * 5); // 5 more hours + const mintableAmount2 = await DeployedThanksToken.read.mintableAmount([ + address1Validated, + relatedRoles, + ]); + + expect(mintableAmount2 > 0n).to.be.true; + + await DeployedThanksToken.write.mint( + [address2Validated, mintableAmount2, relatedRoles], + { account: address1.account }, + ); + + const finalList = await DeployedThanksToken.read.getParticipants(); + expect(finalList).to.have.lengthOf(3); + expect(finalList.map((p) => p.toLowerCase())).to.have.members([ + address1Validated.toLowerCase(), + address2Validated.toLowerCase(), + address3Validated.toLowerCase(), + ]); + }); }); }); diff --git a/pkgs/frontend/app/components/assistcredit/History.tsx b/pkgs/frontend/app/components/assistcredit/History.tsx index 2a877def..b8308396 100644 --- a/pkgs/frontend/app/components/assistcredit/History.tsx +++ b/pkgs/frontend/app/components/assistcredit/History.tsx @@ -1,16 +1,17 @@ import { Box, Flex, Grid, Text, VStack } from "@chakra-ui/react"; import { Link } from "@remix-run/react"; -import { OrderDirection, TransferFractionToken_OrderBy } from "gql/graphql"; import type { GetTransferFractionTokensQuery } from "gql/graphql"; +import { OrderDirection, TransferFractionToken_OrderBy } from "gql/graphql"; import { useNamesByAddresses } from "hooks/useENS"; import { useGetTransferFractionTokens } from "hooks/useFractionToken"; import { useGetHat } from "hooks/useHats"; -import { type FC, useMemo } from "react"; +import { type FC, useMemo, useState } from "react"; import type { HatsDetailSchama } from "types/hats"; import { ipfs2https } from "utils/ipfs"; import { abbreviateAddress } from "utils/wallet"; import { HatsListItemParser } from "../common/HatsListItemParser"; import { UserIcon } from "../icon/UserIcon"; +import DateRangePicker from "../ui/daterangepicker"; interface Props { treeId: string; @@ -153,6 +154,13 @@ const AssistCreditItem: FC = ({ * ワークスペース全体のアシストクレジット履歴を表示するコンポーネント */ export const AssistCreditHistory: FC = ({ treeId, limit }) => { + const [dateRange, setDateRange] = useState<{ from: Date; to: Date }>(() => { + const to = new Date(); + const from = new Date(); + from.setDate(to.getDate() - 30); + return { from, to }; + }); + const { data } = useGetTransferFractionTokens({ where: { workspaceId: treeId, @@ -160,10 +168,24 @@ export const AssistCreditHistory: FC = ({ treeId, limit }) => { orderBy: TransferFractionToken_OrderBy.BlockTimestamp, orderDirection: OrderDirection.Desc, first: limit, + dateRange: { + startDate: Math.floor(dateRange.from.getTime() / 1000).toString(), + endDate: Math.floor(dateRange.to.getTime() / 1000).toString(), + }, }); return ( + + setDateRange({ + from: values.range.from as Date, + to: values.range.to as Date, + }) + } + initialDateFrom={dateRange.from} + initialDateTo={dateRange.to} + /> {data?.transferFractionTokens.map((token) => ( void; + initialDateFrom?: Date; + initialDateTo?: Date; +} + +/** + * DateRangePicker Component + * @param param0 + * @returns + */ +const DateRangePicker = ({ + onUpdate, + initialDateFrom, + initialDateTo, +}: DateRangePickerProps) => { + const [range, setRange] = useState<{ + from: Date | undefined; + to: Date | undefined; + }>({ + from: initialDateFrom, + to: initialDateTo, + }); + + const handleSelect: SelectRangeEventHandler = (newRange) => { + setRange(newRange || { from: undefined, to: undefined }); + onUpdate({ range: newRange || { from: undefined, to: undefined } }); + }; + + let footer =

Please pick the first day.

; + if (range?.from) { + if (!range.to) { + footer =

{format(range.from, "PPP")} – Please pick the last day.

; + } else if (range.to) { + footer = ( +

+ {format(range.from, "PPP")} – {format(range.to, "PPP")} +

+ ); + } + } + + return ( + + ); +}; + +export default DateRangePicker; diff --git a/pkgs/frontend/codegen.ts b/pkgs/frontend/codegen.ts index 758d98e4..89df3902 100644 --- a/pkgs/frontend/codegen.ts +++ b/pkgs/frontend/codegen.ts @@ -3,8 +3,8 @@ import type { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { overwrite: true, schema: - "https://api.goldsky.com/api/public/project_cm4r39viziqcd01wo6y96c1r6/subgraphs/toban-sepolia/1.0.1/gn", - documents: ["./**/*.tsx", "./**/*.ts"], + "https://api.goldsky.com/api/public/project_cm9v3lkp35fui01yx8k3k0xxj/subgraphs/toban-sepolia/1.0.3/gn", + documents: ["./**/*.tsx", "./**/*.ts", "!./node_modules/**/*"], generates: { "./gql/": { preset: "client", diff --git a/pkgs/frontend/gql/fragment-masking.ts b/pkgs/frontend/gql/fragment-masking.ts index e0885f28..aca71b13 100644 --- a/pkgs/frontend/gql/fragment-masking.ts +++ b/pkgs/frontend/gql/fragment-masking.ts @@ -1,20 +1,16 @@ -// @ts-nocheck - /* eslint-disable */ -import { - ResultOf, - DocumentTypeDecoration, - TypedDocumentNode, -} from "@graphql-typed-document-node/core"; -import { FragmentDefinitionNode } from "graphql"; -import { Incremental } from "./graphql"; +import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core'; +import { FragmentDefinitionNode } from 'graphql'; +import { Incremental } from './graphql'; + -export type FragmentType< - TDocumentType extends DocumentTypeDecoration, -> = TDocumentType extends DocumentTypeDecoration - ? [TType] extends [{ " $fragmentName"?: infer TKey }] +export type FragmentType> = TDocumentType extends DocumentTypeDecoration< + infer TType, + any +> + ? [TType] extends [{ ' $fragmentName'?: infer TKey }] ? TKey extends string - ? { " $fragmentRefs"?: { [key in TKey]: TType } } + ? { ' $fragmentRefs'?: { [key in TKey]: TType } } : never : never : never; @@ -22,91 +18,70 @@ export type FragmentType< // return non-nullable if `fragmentType` is non-nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: FragmentType>, + fragmentType: FragmentType> ): TType; // return nullable if `fragmentType` is undefined export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: FragmentType> | undefined, + fragmentType: FragmentType> | undefined ): TType | undefined; // return nullable if `fragmentType` is nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: FragmentType> | null, + fragmentType: FragmentType> | null ): TType | null; // return nullable if `fragmentType` is nullable or undefined export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: - | FragmentType> - | null - | undefined, + fragmentType: FragmentType> | null | undefined ): TType | null | undefined; // return array of non-nullable if `fragmentType` is array of non-nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: Array>>, + fragmentType: Array>> ): Array; // return array of nullable if `fragmentType` is array of nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: - | Array>> - | null - | undefined, + fragmentType: Array>> | null | undefined ): Array | null | undefined; // return readonly array of non-nullable if `fragmentType` is array of non-nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: ReadonlyArray>>, + fragmentType: ReadonlyArray>> ): ReadonlyArray; // return readonly array of nullable if `fragmentType` is array of nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: - | ReadonlyArray>> - | null - | undefined, + fragmentType: ReadonlyArray>> | null | undefined ): ReadonlyArray | null | undefined; export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: - | FragmentType> - | Array>> - | ReadonlyArray>> - | null - | undefined, + fragmentType: FragmentType> | Array>> | ReadonlyArray>> | null | undefined ): TType | Array | ReadonlyArray | null | undefined { return fragmentType as any; } + export function makeFragmentData< F extends DocumentTypeDecoration, - FT extends ResultOf, + FT extends ResultOf >(data: FT, _fragment: F): FragmentType { return data as FragmentType; } export function isFragmentReady( queryNode: DocumentTypeDecoration, fragmentNode: TypedDocumentNode, - data: - | FragmentType, any>> - | null - | undefined, + data: FragmentType, any>> | null | undefined ): data is FragmentType { - const deferredFields = ( - queryNode as { - __meta__?: { deferredFields: Record }; - } - ).__meta__?.deferredFields; + const deferredFields = (queryNode as { __meta__?: { deferredFields: Record } }).__meta__ + ?.deferredFields; if (!deferredFields) return true; - const fragDef = fragmentNode.definitions[0] as - | FragmentDefinitionNode - | undefined; + const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined; const fragName = fragDef?.name?.value; const fields = (fragName && deferredFields[fragName]) || []; - return fields.length > 0 && fields.every((field) => data && field in data); + return fields.length > 0 && fields.every(field => data && field in data); } diff --git a/pkgs/frontend/gql/gql.ts b/pkgs/frontend/gql/gql.ts index 506be4ea..5765d8f9 100644 --- a/pkgs/frontend/gql/gql.ts +++ b/pkgs/frontend/gql/gql.ts @@ -1,8 +1,6 @@ -// @ts-nocheck - /* eslint-disable */ -import * as types from "./graphql"; -import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core"; +import * as types from './graphql'; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; /** * Map of all GraphQL operations in the project. @@ -16,14 +14,10 @@ import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/ * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size */ const documents = { - "\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n": - types.GetTransferFractionTokensDocument, - "\n query BalanceOfFractionTokens($where: BalanceOfFractionToken_filter = {}, $orderBy: BalanceOfFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 100) {\n balanceOfFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n tokenId\n balance\n owner\n workspaceId\n hatId\n id\n updatedAt\n wearer\n }\n }\n": - types.BalanceOfFractionTokensDocument, - "\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule {\n id\n }\n hatsHatCreatorModule {\n id\n }\n blockTimestamp\n blockNumber\n }\n }\n": - types.GetWorkspacesDocument, - "\n query GetWorkspace($workspaceId: ID!, $hatsHatCreatorModuleAuthority_filter: HatsHatCreatorModuleAuthority_filter, $hatsTimeFrameModuleAuthority_filter: HatsTimeFrameModuleAuthority_filter) {\n workspace(id: $workspaceId) {\n blockNumber\n blockTimestamp\n creator\n hatterHatId\n id\n splitCreator\n topHatId\n hatsHatCreatorModule {\n id\n authorities(where: $hatsHatCreatorModuleAuthority_filter) {\n address\n authorised\n blockNumber\n blockTimestamp\n id\n workspaceId\n }\n }\n hatsTimeFrameModule {\n id\n authorities(where: $hatsTimeFrameModuleAuthority_filter) {\n address\n authorised\n blockNumber\n blockTimestamp\n id\n workspaceId\n }\n }\n }\n }\n": - types.GetWorkspaceDocument, + "\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n id\n to\n tokenId\n workspaceId\n from\n blockTimestamp\n blockNumber\n amount\n }\n }\n": types.GetTransferFractionTokensDocument, + "\n query BalanceOfFractionTokens($where: BalanceOfFractionToken_filter = {}, $orderBy: BalanceOfFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 100) {\n balanceOfFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n tokenId\n balance\n owner\n workspaceId\n hatId\n id\n updatedAt\n wearer\n }\n }\n": types.BalanceOfFractionTokensDocument, + "\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n id\n minterHatId\n operatorHatId\n owner\n splitCreator\n topHatId\n hatterHatId\n hatsTimeFrameModule\n hatsHatCreatorModule\n creator\n creatorHatId\n blockTimestamp\n blockNumber\n hatsFractionTokenModule {\n id\n }\n thanksToken {\n id\n }\n }\n }\n": types.GetWorkspacesDocument, + "\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n id\n minterHatId\n operatorHatId\n owner\n splitCreator\n topHatId\n hatterHatId\n hatsTimeFrameModule\n hatsHatCreatorModule\n creator\n creatorHatId\n blockTimestamp\n blockNumber\n hatsFractionTokenModule {\n id\n }\n thanksToken {\n id\n }\n }\n }\n": types.GetWorkspaceDocument, }; /** @@ -43,31 +37,22 @@ export function graphql(source: string): unknown; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql( - source: "\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n", -): (typeof documents)["\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n"]; +export function graphql(source: "\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n id\n to\n tokenId\n workspaceId\n from\n blockTimestamp\n blockNumber\n amount\n }\n }\n"): (typeof documents)["\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n id\n to\n tokenId\n workspaceId\n from\n blockTimestamp\n blockNumber\n amount\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql( - source: "\n query BalanceOfFractionTokens($where: BalanceOfFractionToken_filter = {}, $orderBy: BalanceOfFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 100) {\n balanceOfFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n tokenId\n balance\n owner\n workspaceId\n hatId\n id\n updatedAt\n wearer\n }\n }\n", -): (typeof documents)["\n query BalanceOfFractionTokens($where: BalanceOfFractionToken_filter = {}, $orderBy: BalanceOfFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 100) {\n balanceOfFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n tokenId\n balance\n owner\n workspaceId\n hatId\n id\n updatedAt\n wearer\n }\n }\n"]; +export function graphql(source: "\n query BalanceOfFractionTokens($where: BalanceOfFractionToken_filter = {}, $orderBy: BalanceOfFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 100) {\n balanceOfFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n tokenId\n balance\n owner\n workspaceId\n hatId\n id\n updatedAt\n wearer\n }\n }\n"): (typeof documents)["\n query BalanceOfFractionTokens($where: BalanceOfFractionToken_filter = {}, $orderBy: BalanceOfFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 100) {\n balanceOfFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) {\n tokenId\n balance\n owner\n workspaceId\n hatId\n id\n updatedAt\n wearer\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql( - source: "\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule {\n id\n }\n hatsHatCreatorModule {\n id\n }\n blockTimestamp\n blockNumber\n }\n }\n", -): (typeof documents)["\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule {\n id\n }\n hatsHatCreatorModule {\n id\n }\n blockTimestamp\n blockNumber\n }\n }\n"]; +export function graphql(source: "\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n id\n minterHatId\n operatorHatId\n owner\n splitCreator\n topHatId\n hatterHatId\n hatsTimeFrameModule\n hatsHatCreatorModule\n creator\n creatorHatId\n blockTimestamp\n blockNumber\n hatsFractionTokenModule {\n id\n }\n thanksToken {\n id\n }\n }\n }\n"): (typeof documents)["\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n id\n minterHatId\n operatorHatId\n owner\n splitCreator\n topHatId\n hatterHatId\n hatsTimeFrameModule\n hatsHatCreatorModule\n creator\n creatorHatId\n blockTimestamp\n blockNumber\n hatsFractionTokenModule {\n id\n }\n thanksToken {\n id\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql( - source: "\n query GetWorkspace($workspaceId: ID!, $hatsHatCreatorModuleAuthority_filter: HatsHatCreatorModuleAuthority_filter, $hatsTimeFrameModuleAuthority_filter: HatsTimeFrameModuleAuthority_filter) {\n workspace(id: $workspaceId) {\n blockNumber\n blockTimestamp\n creator\n hatterHatId\n id\n splitCreator\n topHatId\n hatsHatCreatorModule {\n id\n authorities(where: $hatsHatCreatorModuleAuthority_filter) {\n address\n authorised\n blockNumber\n blockTimestamp\n id\n workspaceId\n }\n }\n hatsTimeFrameModule {\n id\n authorities(where: $hatsTimeFrameModuleAuthority_filter) {\n address\n authorised\n blockNumber\n blockTimestamp\n id\n workspaceId\n }\n }\n }\n }\n", -): (typeof documents)["\n query GetWorkspace($workspaceId: ID!, $hatsHatCreatorModuleAuthority_filter: HatsHatCreatorModuleAuthority_filter, $hatsTimeFrameModuleAuthority_filter: HatsTimeFrameModuleAuthority_filter) {\n workspace(id: $workspaceId) {\n blockNumber\n blockTimestamp\n creator\n hatterHatId\n id\n splitCreator\n topHatId\n hatsHatCreatorModule {\n id\n authorities(where: $hatsHatCreatorModuleAuthority_filter) {\n address\n authorised\n blockNumber\n blockTimestamp\n id\n workspaceId\n }\n }\n hatsTimeFrameModule {\n id\n authorities(where: $hatsTimeFrameModuleAuthority_filter) {\n address\n authorised\n blockNumber\n blockTimestamp\n id\n workspaceId\n }\n }\n }\n }\n"]; +export function graphql(source: "\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n id\n minterHatId\n operatorHatId\n owner\n splitCreator\n topHatId\n hatterHatId\n hatsTimeFrameModule\n hatsHatCreatorModule\n creator\n creatorHatId\n blockTimestamp\n blockNumber\n hatsFractionTokenModule {\n id\n }\n thanksToken {\n id\n }\n }\n }\n"): (typeof documents)["\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n id\n minterHatId\n operatorHatId\n owner\n splitCreator\n topHatId\n hatterHatId\n hatsTimeFrameModule\n hatsHatCreatorModule\n creator\n creatorHatId\n blockTimestamp\n blockNumber\n hatsFractionTokenModule {\n id\n }\n thanksToken {\n id\n }\n }\n }\n"]; export function graphql(source: string) { return (documents as any)[source] ?? {}; } -export type DocumentType> = - TDocumentNode extends DocumentNode ? TType : never; +export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never; \ No newline at end of file diff --git a/pkgs/frontend/gql/graphql.schema.json b/pkgs/frontend/gql/graphql.schema.json deleted file mode 100644 index 1642bb7d..00000000 --- a/pkgs/frontend/gql/graphql.schema.json +++ /dev/null @@ -1,6183 +0,0 @@ -{ - "__schema": { - "queryType": { - "name": "Query", - "kind": "OBJECT" - }, - "mutationType": null, - "subscriptionType": { - "name": "Subscription", - "kind": "OBJECT" - }, - "types": [ - { - "kind": "ENUM", - "name": "Aggregation_interval", - "description": null, - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "day", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hour", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "BigDecimal", - "description": null, - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "BigInt", - "description": null, - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "BlockChangedFilter", - "description": null, - "isOneOf": false, - "fields": null, - "inputFields": [ - { - "name": "number_gte", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "description": null, - "isOneOf": false, - "fields": null, - "inputFields": [ - { - "name": "hash", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Bytes", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "number", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "number_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Boolean", - "description": "The `Boolean` scalar type represents `true` or `false`.", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Bytes", - "description": null, - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Float", - "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "ID", - "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "InitializedFractionToken", - "description": null, - "isOneOf": null, - "fields": [ - { - "name": "hatId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "InitializedFractionToken_filter", - "description": null, - "isOneOf": false, - "fields": null, - "inputFields": [ - { - "name": "_change_block", - "description": "Filter for the block changed event.", - "type": { - "kind": "INPUT_OBJECT", - "name": "BlockChangedFilter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "and", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "InitializedFractionToken_filter", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "or", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "InitializedFractionToken_filter", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "InitializedFractionToken_orderBy", - "description": null, - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "hatId", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Int8", - "description": "8 bytes signed integer\n", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "OrderDirection", - "description": "Defines the order direction, either ascending or descending", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "asc", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "desc", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "isOneOf": null, - "fields": [ - { - "name": "_meta", - "description": "Access to subgraph metadata", - "args": [ - { - "name": "block", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "_Meta_", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "initializedFractionToken", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "InitializedFractionToken", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "initializedFractionTokens", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "100", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderBy", - "description": null, - "type": { - "kind": "ENUM", - "name": "InitializedFractionToken_orderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderDirection", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderDirection", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "skip", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "InitializedFractionToken_filter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "InitializedFractionToken", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "transferFractionToken", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "TransferFractionToken", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "transferFractionTokens", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "100", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderBy", - "description": null, - "type": { - "kind": "ENUM", - "name": "TransferFractionToken_orderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderDirection", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderDirection", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "skip", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "TransferFractionToken_filter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TransferFractionToken", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspace", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "Workspace", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaces", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "100", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderBy", - "description": null, - "type": { - "kind": "ENUM", - "name": "Workspace_orderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderDirection", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderDirection", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "skip", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "Workspace_filter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Workspace", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "String", - "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Subscription", - "description": null, - "isOneOf": null, - "fields": [ - { - "name": "_meta", - "description": "Access to subgraph metadata", - "args": [ - { - "name": "block", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "_Meta_", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "initializedFractionToken", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "InitializedFractionToken", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "initializedFractionTokens", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "100", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderBy", - "description": null, - "type": { - "kind": "ENUM", - "name": "InitializedFractionToken_orderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderDirection", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderDirection", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "skip", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "InitializedFractionToken_filter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "InitializedFractionToken", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "transferFractionToken", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "TransferFractionToken", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "transferFractionTokens", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "100", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderBy", - "description": null, - "type": { - "kind": "ENUM", - "name": "TransferFractionToken_orderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderDirection", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderDirection", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "skip", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "TransferFractionToken_filter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TransferFractionToken", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspace", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "Workspace", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaces", - "description": null, - "args": [ - { - "name": "block", - "description": "The block at which the query should be executed. Can either be a `{ hash: Bytes }` value containing a block hash, a `{ number: Int }` containing the block number, or a `{ number_gte: Int }` containing the minimum block number. In the case of `number_gte`, the query will be executed on the latest block only if the subgraph has progressed to or past the minimum block number. Defaults to the latest block when omitted.", - "type": { - "kind": "INPUT_OBJECT", - "name": "Block_height", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "100", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderBy", - "description": null, - "type": { - "kind": "ENUM", - "name": "Workspace_orderBy", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "orderDirection", - "description": null, - "type": { - "kind": "ENUM", - "name": "OrderDirection", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "skip", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": "0", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subgraphError", - "description": "Set to `allow` to receive data even if the subgraph has skipped over errors while syncing.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "ofType": null - } - }, - "defaultValue": "deny", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "Workspace_filter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Workspace", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Timestamp", - "description": "A string representation of microseconds UNIX timestamp (16 digits)\n", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "TransferFractionToken", - "description": null, - "isOneOf": null, - "fields": [ - { - "name": "amount", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "TransferFractionToken_filter", - "description": null, - "isOneOf": false, - "fields": null, - "inputFields": [ - { - "name": "_change_block", - "description": "Filter for the block changed event.", - "type": { - "kind": "INPUT_OBJECT", - "name": "BlockChangedFilter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "amount", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "amount_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "amount_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "amount_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "amount_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "amount_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "amount_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "amount_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "and", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TransferFractionToken_filter", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_not_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_not_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_not_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_not_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_not_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_not_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "or", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TransferFractionToken_filter", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_not_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_not_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_not_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_not_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_not_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_not_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_not_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "TransferFractionToken_orderBy", - "description": null, - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "amount", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "from", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatId", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "to", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tokenId", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "wearer", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "workspaceId", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Workspace", - "description": null, - "isOneOf": null, - "fields": [ - { - "name": "creator", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "Workspace_filter", - "description": null, - "isOneOf": false, - "fields": null, - "inputFields": [ - { - "name": "_change_block", - "description": "Filter for the block changed event.", - "type": { - "kind": "INPUT_OBJECT", - "name": "BlockChangedFilter", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "and", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "Workspace_filter", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_not_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_not_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_not_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_not_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_not_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_not_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creator_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_not_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_not_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_not_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_not_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_not_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_not_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "or", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "Workspace_filter", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_not_contains", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_not_contains_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_not_ends_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_not_ends_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_not_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_not_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_starts_with", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator_starts_with_nocase", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId_gt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId_gte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId_lt", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId_lte", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId_not", - "description": null, - "type": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId_not_in", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "BigInt", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "Workspace_orderBy", - "description": null, - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "creator", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatsTimeFrameModule", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hatterHatId", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "splitCreator", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "topHatId", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "_Block_", - "description": null, - "isOneOf": null, - "fields": [ - { - "name": "hash", - "description": "The hash of the block", - "args": [], - "type": { - "kind": "SCALAR", - "name": "Bytes", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "number", - "description": "The block number", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "parentHash", - "description": "The hash of the parent block", - "args": [], - "type": { - "kind": "SCALAR", - "name": "Bytes", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "timestamp", - "description": "Integer representation of the timestamp stored in blocks for the chain", - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "_Meta_", - "description": "The type for the top-level _meta field", - "isOneOf": null, - "fields": [ - { - "name": "block", - "description": "Information about a specific subgraph block. The hash of the block\nwill be null if the _meta field has a block constraint that asks for\na block number. It will be filled if the _meta field has no block constraint\nand therefore asks for the latest block\n", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "_Block_", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deployment", - "description": "The deployment ID", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hasIndexingErrors", - "description": "If `true`, the subgraph encountered indexing errors at some past block", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "_SubgraphErrorPolicy_", - "description": null, - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "allow", - "description": "Data will be returned even if the subgraph has indexing errors", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deny", - "description": "If the subgraph has indexing errors, data will be omitted. The default.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - "isOneOf": null, - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isRepeatable", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "locations", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__DirectiveLocation", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "QUERY", - "description": "Location adjacent to a query operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "MUTATION", - "description": "Location adjacent to a mutation operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SUBSCRIPTION", - "description": "Location adjacent to a subscription operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD", - "description": "Location adjacent to a field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_DEFINITION", - "description": "Location adjacent to a fragment definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_SPREAD", - "description": "Location adjacent to a fragment spread.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INLINE_FRAGMENT", - "description": "Location adjacent to an inline fragment.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "VARIABLE_DEFINITION", - "description": "Location adjacent to a variable definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCHEMA", - "description": "Location adjacent to a schema definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCALAR", - "description": "Location adjacent to a scalar definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Location adjacent to an object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD_DEFINITION", - "description": "Location adjacent to a field definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ARGUMENT_DEFINITION", - "description": "Location adjacent to an argument definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Location adjacent to an interface definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Location adjacent to a union definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Location adjacent to an enum definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM_VALUE", - "description": "Location adjacent to an enum value definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Location adjacent to an input object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_FIELD_DEFINITION", - "description": "Location adjacent to an input object field definition.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", - "isOneOf": null, - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", - "isOneOf": null, - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "args", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", - "isOneOf": null, - "fields": [ - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "type", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "defaultValue", - "description": "A GraphQL-formatted string representing the default value for this input value.", - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isDeprecated", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deprecationReason", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", - "isOneOf": null, - "fields": [ - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "types", - "description": "A list of all types supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "queryType", - "description": "The type that query operations will be rooted at.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "directives", - "description": "A list of all directives supported by this server.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Directive", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", - "isOneOf": null, - "fields": [ - { - "name": "kind", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__TypeKind", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "specifiedByURL", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "fields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Field", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "interfaces", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "possibleTypes", - "description": null, - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "enumValues", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__EnumValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "inputFields", - "description": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false", - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ofType", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isOneOf", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "__TypeKind", - "description": "An enum describing what kind of type a given `__Type` is.", - "isOneOf": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "SCALAR", - "description": "Indicates this type is a scalar.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Indicates this type is a union. `possibleTypes` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Indicates this type is an enum. `enumValues` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Indicates this type is an input object. `inputFields` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LIST", - "description": "Indicates this type is a list. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "NON_NULL", - "description": "Indicates this type is a non-null. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - } - ], - "directives": [ - { - "name": "derivedFrom", - "description": "creates a virtual field on the entity that may be queried but cannot be set manually through the mappings API.", - "isRepeatable": false, - "locations": ["FIELD_DEFINITION"], - "args": [ - { - "name": "field", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "entity", - "description": "Marks the GraphQL type as indexable entity. Each type that should be an entity is required to be annotated with this directive.", - "isRepeatable": false, - "locations": ["OBJECT"], - "args": [] - }, - { - "name": "include", - "description": null, - "isRepeatable": false, - "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], - "args": [ - { - "name": "if", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "skip", - "description": null, - "isRepeatable": false, - "locations": ["FIELD", "FRAGMENT_SPREAD", "INLINE_FRAGMENT"], - "args": [ - { - "name": "if", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "name": "subgraphId", - "description": "Defined a Subgraph ID for an object type", - "isRepeatable": false, - "locations": ["OBJECT"], - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - } - ] - } -} diff --git a/pkgs/frontend/gql/graphql.ts b/pkgs/frontend/gql/graphql.ts index d84d91d4..d319bc0e 100644 --- a/pkgs/frontend/gql/graphql.ts +++ b/pkgs/frontend/gql/graphql.ts @@ -1,1245 +1,1773 @@ -// @ts-nocheck - /* eslint-disable */ -import { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core"; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; export type Maybe = T | null; export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - BigDecimal: { input: any; output: any }; - BigInt: { input: any; output: any }; - Bytes: { input: any; output: any }; + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + BigDecimal: { input: any; output: any; } + BigInt: { input: any; output: any; } + Bytes: { input: any; output: any; } /** * 8 bytes signed integer * */ - Int8: { input: any; output: any }; + Int8: { input: any; output: any; } /** * A string representation of microseconds UNIX timestamp (16 digits) * */ - Timestamp: { input: any; output: any }; + Timestamp: { input: any; output: any; } }; export enum Aggregation_Interval { - Day = "day", - Hour = "hour", + Day = 'day', + Hour = 'hour' +} + +export type AmountOfMintThanksToken = { + __typename?: 'AmountOfMintThanksToken'; + amount: Scalars['BigInt']['output']; + id: Scalars['ID']['output']; + sender: Scalars['String']['output']; + thanksToken: ThanksToken; + updatedAt: Scalars['BigInt']['output']; + workspaceId: Scalars['ID']['output']; +}; + +export type AmountOfMintThanksToken_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; + and?: InputMaybe>>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + sender?: InputMaybe; + sender_contains?: InputMaybe; + sender_contains_nocase?: InputMaybe; + sender_ends_with?: InputMaybe; + sender_ends_with_nocase?: InputMaybe; + sender_gt?: InputMaybe; + sender_gte?: InputMaybe; + sender_in?: InputMaybe>; + sender_lt?: InputMaybe; + sender_lte?: InputMaybe; + sender_not?: InputMaybe; + sender_not_contains?: InputMaybe; + sender_not_contains_nocase?: InputMaybe; + sender_not_ends_with?: InputMaybe; + sender_not_ends_with_nocase?: InputMaybe; + sender_not_in?: InputMaybe>; + sender_not_starts_with?: InputMaybe; + sender_not_starts_with_nocase?: InputMaybe; + sender_starts_with?: InputMaybe; + sender_starts_with_nocase?: InputMaybe; + thanksToken?: InputMaybe; + thanksToken_?: InputMaybe; + thanksToken_contains?: InputMaybe; + thanksToken_contains_nocase?: InputMaybe; + thanksToken_ends_with?: InputMaybe; + thanksToken_ends_with_nocase?: InputMaybe; + thanksToken_gt?: InputMaybe; + thanksToken_gte?: InputMaybe; + thanksToken_in?: InputMaybe>; + thanksToken_lt?: InputMaybe; + thanksToken_lte?: InputMaybe; + thanksToken_not?: InputMaybe; + thanksToken_not_contains?: InputMaybe; + thanksToken_not_contains_nocase?: InputMaybe; + thanksToken_not_ends_with?: InputMaybe; + thanksToken_not_ends_with_nocase?: InputMaybe; + thanksToken_not_in?: InputMaybe>; + thanksToken_not_starts_with?: InputMaybe; + thanksToken_not_starts_with_nocase?: InputMaybe; + thanksToken_starts_with?: InputMaybe; + thanksToken_starts_with_nocase?: InputMaybe; + updatedAt?: InputMaybe; + updatedAt_gt?: InputMaybe; + updatedAt_gte?: InputMaybe; + updatedAt_in?: InputMaybe>; + updatedAt_lt?: InputMaybe; + updatedAt_lte?: InputMaybe; + updatedAt_not?: InputMaybe; + updatedAt_not_in?: InputMaybe>; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; +}; + +export enum AmountOfMintThanksToken_OrderBy { + Amount = 'amount', + Id = 'id', + Sender = 'sender', + ThanksToken = 'thanksToken', + ThanksTokenId = 'thanksToken__id', + ThanksTokenWorkspaceId = 'thanksToken__workspaceId', + UpdatedAt = 'updatedAt', + WorkspaceId = 'workspaceId' } export type BalanceOfFractionToken = { - __typename?: "BalanceOfFractionToken"; - balance: Scalars["BigInt"]["output"]; - hatId?: Maybe; - id: Scalars["ID"]["output"]; - owner: Scalars["String"]["output"]; - tokenId: Scalars["BigInt"]["output"]; - updatedAt: Scalars["BigInt"]["output"]; - wearer?: Maybe; - workspaceId?: Maybe; + __typename?: 'BalanceOfFractionToken'; + balance: Scalars['BigInt']['output']; + hatId: Scalars['BigInt']['output']; + hatsFractionTokenModule: HatsFractionTokenModule; + id: Scalars['ID']['output']; + owner: Scalars['String']['output']; + tokenId: Scalars['BigInt']['output']; + updatedAt: Scalars['BigInt']['output']; + wearer: Scalars['String']['output']; + workspaceId: Scalars['ID']['output']; }; export type BalanceOfFractionToken_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; - balance?: InputMaybe; - balance_gt?: InputMaybe; - balance_gte?: InputMaybe; - balance_in?: InputMaybe>; - balance_lt?: InputMaybe; - balance_lte?: InputMaybe; - balance_not?: InputMaybe; - balance_not_in?: InputMaybe>; - hatId?: InputMaybe; - hatId_gt?: InputMaybe; - hatId_gte?: InputMaybe; - hatId_in?: InputMaybe>; - hatId_lt?: InputMaybe; - hatId_lte?: InputMaybe; - hatId_not?: InputMaybe; - hatId_not_in?: InputMaybe>; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; + balance?: InputMaybe; + balance_gt?: InputMaybe; + balance_gte?: InputMaybe; + balance_in?: InputMaybe>; + balance_lt?: InputMaybe; + balance_lte?: InputMaybe; + balance_not?: InputMaybe; + balance_not_in?: InputMaybe>; + hatId?: InputMaybe; + hatId_gt?: InputMaybe; + hatId_gte?: InputMaybe; + hatId_in?: InputMaybe>; + hatId_lt?: InputMaybe; + hatId_lte?: InputMaybe; + hatId_not?: InputMaybe; + hatId_not_in?: InputMaybe>; + hatsFractionTokenModule?: InputMaybe; + hatsFractionTokenModule_?: InputMaybe; + hatsFractionTokenModule_contains?: InputMaybe; + hatsFractionTokenModule_contains_nocase?: InputMaybe; + hatsFractionTokenModule_ends_with?: InputMaybe; + hatsFractionTokenModule_ends_with_nocase?: InputMaybe; + hatsFractionTokenModule_gt?: InputMaybe; + hatsFractionTokenModule_gte?: InputMaybe; + hatsFractionTokenModule_in?: InputMaybe>; + hatsFractionTokenModule_lt?: InputMaybe; + hatsFractionTokenModule_lte?: InputMaybe; + hatsFractionTokenModule_not?: InputMaybe; + hatsFractionTokenModule_not_contains?: InputMaybe; + hatsFractionTokenModule_not_contains_nocase?: InputMaybe; + hatsFractionTokenModule_not_ends_with?: InputMaybe; + hatsFractionTokenModule_not_ends_with_nocase?: InputMaybe; + hatsFractionTokenModule_not_in?: InputMaybe>; + hatsFractionTokenModule_not_starts_with?: InputMaybe; + hatsFractionTokenModule_not_starts_with_nocase?: InputMaybe; + hatsFractionTokenModule_starts_with?: InputMaybe; + hatsFractionTokenModule_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; or?: InputMaybe>>; - owner?: InputMaybe; - owner_contains?: InputMaybe; - owner_contains_nocase?: InputMaybe; - owner_ends_with?: InputMaybe; - owner_ends_with_nocase?: InputMaybe; - owner_gt?: InputMaybe; - owner_gte?: InputMaybe; - owner_in?: InputMaybe>; - owner_lt?: InputMaybe; - owner_lte?: InputMaybe; - owner_not?: InputMaybe; - owner_not_contains?: InputMaybe; - owner_not_contains_nocase?: InputMaybe; - owner_not_ends_with?: InputMaybe; - owner_not_ends_with_nocase?: InputMaybe; - owner_not_in?: InputMaybe>; - owner_not_starts_with?: InputMaybe; - owner_not_starts_with_nocase?: InputMaybe; - owner_starts_with?: InputMaybe; - owner_starts_with_nocase?: InputMaybe; - tokenId?: InputMaybe; - tokenId_gt?: InputMaybe; - tokenId_gte?: InputMaybe; - tokenId_in?: InputMaybe>; - tokenId_lt?: InputMaybe; - tokenId_lte?: InputMaybe; - tokenId_not?: InputMaybe; - tokenId_not_in?: InputMaybe>; - updatedAt?: InputMaybe; - updatedAt_gt?: InputMaybe; - updatedAt_gte?: InputMaybe; - updatedAt_in?: InputMaybe>; - updatedAt_lt?: InputMaybe; - updatedAt_lte?: InputMaybe; - updatedAt_not?: InputMaybe; - updatedAt_not_in?: InputMaybe>; - wearer?: InputMaybe; - wearer_contains?: InputMaybe; - wearer_contains_nocase?: InputMaybe; - wearer_ends_with?: InputMaybe; - wearer_ends_with_nocase?: InputMaybe; - wearer_gt?: InputMaybe; - wearer_gte?: InputMaybe; - wearer_in?: InputMaybe>; - wearer_lt?: InputMaybe; - wearer_lte?: InputMaybe; - wearer_not?: InputMaybe; - wearer_not_contains?: InputMaybe; - wearer_not_contains_nocase?: InputMaybe; - wearer_not_ends_with?: InputMaybe; - wearer_not_ends_with_nocase?: InputMaybe; - wearer_not_in?: InputMaybe>; - wearer_not_starts_with?: InputMaybe; - wearer_not_starts_with_nocase?: InputMaybe; - wearer_starts_with?: InputMaybe; - wearer_starts_with_nocase?: InputMaybe; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; + owner?: InputMaybe; + owner_contains?: InputMaybe; + owner_contains_nocase?: InputMaybe; + owner_ends_with?: InputMaybe; + owner_ends_with_nocase?: InputMaybe; + owner_gt?: InputMaybe; + owner_gte?: InputMaybe; + owner_in?: InputMaybe>; + owner_lt?: InputMaybe; + owner_lte?: InputMaybe; + owner_not?: InputMaybe; + owner_not_contains?: InputMaybe; + owner_not_contains_nocase?: InputMaybe; + owner_not_ends_with?: InputMaybe; + owner_not_ends_with_nocase?: InputMaybe; + owner_not_in?: InputMaybe>; + owner_not_starts_with?: InputMaybe; + owner_not_starts_with_nocase?: InputMaybe; + owner_starts_with?: InputMaybe; + owner_starts_with_nocase?: InputMaybe; + tokenId?: InputMaybe; + tokenId_gt?: InputMaybe; + tokenId_gte?: InputMaybe; + tokenId_in?: InputMaybe>; + tokenId_lt?: InputMaybe; + tokenId_lte?: InputMaybe; + tokenId_not?: InputMaybe; + tokenId_not_in?: InputMaybe>; + updatedAt?: InputMaybe; + updatedAt_gt?: InputMaybe; + updatedAt_gte?: InputMaybe; + updatedAt_in?: InputMaybe>; + updatedAt_lt?: InputMaybe; + updatedAt_lte?: InputMaybe; + updatedAt_not?: InputMaybe; + updatedAt_not_in?: InputMaybe>; + wearer?: InputMaybe; + wearer_contains?: InputMaybe; + wearer_contains_nocase?: InputMaybe; + wearer_ends_with?: InputMaybe; + wearer_ends_with_nocase?: InputMaybe; + wearer_gt?: InputMaybe; + wearer_gte?: InputMaybe; + wearer_in?: InputMaybe>; + wearer_lt?: InputMaybe; + wearer_lte?: InputMaybe; + wearer_not?: InputMaybe; + wearer_not_contains?: InputMaybe; + wearer_not_contains_nocase?: InputMaybe; + wearer_not_ends_with?: InputMaybe; + wearer_not_ends_with_nocase?: InputMaybe; + wearer_not_in?: InputMaybe>; + wearer_not_starts_with?: InputMaybe; + wearer_not_starts_with_nocase?: InputMaybe; + wearer_starts_with?: InputMaybe; + wearer_starts_with_nocase?: InputMaybe; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; }; export enum BalanceOfFractionToken_OrderBy { - Balance = "balance", - HatId = "hatId", - Id = "id", - Owner = "owner", - TokenId = "tokenId", - UpdatedAt = "updatedAt", - Wearer = "wearer", - WorkspaceId = "workspaceId", + Balance = 'balance', + HatId = 'hatId', + HatsFractionTokenModule = 'hatsFractionTokenModule', + HatsFractionTokenModuleId = 'hatsFractionTokenModule__id', + HatsFractionTokenModuleWorkspaceId = 'hatsFractionTokenModule__workspaceId', + Id = 'id', + Owner = 'owner', + TokenId = 'tokenId', + UpdatedAt = 'updatedAt', + Wearer = 'wearer', + WorkspaceId = 'workspaceId' } -export type BlockChangedFilter = { - number_gte: Scalars["Int"]["input"]; +export type BalanceOfThanksToken = { + __typename?: 'BalanceOfThanksToken'; + balance: Scalars['BigInt']['output']; + id: Scalars['ID']['output']; + owner: Scalars['String']['output']; + thanksToken: ThanksToken; + updatedAt: Scalars['BigInt']['output']; + workspaceId: Scalars['ID']['output']; }; -export type Block_Height = { - hash?: InputMaybe; - number?: InputMaybe; - number_gte?: InputMaybe; -}; +export type BalanceOfThanksToken_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + balance?: InputMaybe; + balance_gt?: InputMaybe; + balance_gte?: InputMaybe; + balance_in?: InputMaybe>; + balance_lt?: InputMaybe; + balance_lte?: InputMaybe; + balance_not?: InputMaybe; + balance_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + owner?: InputMaybe; + owner_contains?: InputMaybe; + owner_contains_nocase?: InputMaybe; + owner_ends_with?: InputMaybe; + owner_ends_with_nocase?: InputMaybe; + owner_gt?: InputMaybe; + owner_gte?: InputMaybe; + owner_in?: InputMaybe>; + owner_lt?: InputMaybe; + owner_lte?: InputMaybe; + owner_not?: InputMaybe; + owner_not_contains?: InputMaybe; + owner_not_contains_nocase?: InputMaybe; + owner_not_ends_with?: InputMaybe; + owner_not_ends_with_nocase?: InputMaybe; + owner_not_in?: InputMaybe>; + owner_not_starts_with?: InputMaybe; + owner_not_starts_with_nocase?: InputMaybe; + owner_starts_with?: InputMaybe; + owner_starts_with_nocase?: InputMaybe; + thanksToken?: InputMaybe; + thanksToken_?: InputMaybe; + thanksToken_contains?: InputMaybe; + thanksToken_contains_nocase?: InputMaybe; + thanksToken_ends_with?: InputMaybe; + thanksToken_ends_with_nocase?: InputMaybe; + thanksToken_gt?: InputMaybe; + thanksToken_gte?: InputMaybe; + thanksToken_in?: InputMaybe>; + thanksToken_lt?: InputMaybe; + thanksToken_lte?: InputMaybe; + thanksToken_not?: InputMaybe; + thanksToken_not_contains?: InputMaybe; + thanksToken_not_contains_nocase?: InputMaybe; + thanksToken_not_ends_with?: InputMaybe; + thanksToken_not_ends_with_nocase?: InputMaybe; + thanksToken_not_in?: InputMaybe>; + thanksToken_not_starts_with?: InputMaybe; + thanksToken_not_starts_with_nocase?: InputMaybe; + thanksToken_starts_with?: InputMaybe; + thanksToken_starts_with_nocase?: InputMaybe; + updatedAt?: InputMaybe; + updatedAt_gt?: InputMaybe; + updatedAt_gte?: InputMaybe; + updatedAt_in?: InputMaybe>; + updatedAt_lt?: InputMaybe; + updatedAt_lte?: InputMaybe; + updatedAt_not?: InputMaybe; + updatedAt_not_in?: InputMaybe>; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; +}; + +export enum BalanceOfThanksToken_OrderBy { + Balance = 'balance', + Id = 'id', + Owner = 'owner', + ThanksToken = 'thanksToken', + ThanksTokenId = 'thanksToken__id', + ThanksTokenWorkspaceId = 'thanksToken__workspaceId', + UpdatedAt = 'updatedAt', + WorkspaceId = 'workspaceId' +} -export type HatsHatCreatorModule = { - __typename?: "HatsHatCreatorModule"; - authorities: Array; - id: Scalars["ID"]["output"]; - workspaceId: Scalars["ID"]["output"]; +export type BlockChangedFilter = { + number_gte: Scalars['Int']['input']; }; -export type HatsHatCreatorModuleAuthoritiesArgs = { - first?: InputMaybe; - orderBy?: InputMaybe; - orderDirection?: InputMaybe; - skip?: InputMaybe; - where?: InputMaybe; +export type Block_Height = { + hash?: InputMaybe; + number?: InputMaybe; + number_gte?: InputMaybe; }; -export type HatsHatCreatorModuleAuthority = { - __typename?: "HatsHatCreatorModuleAuthority"; - address: Scalars["String"]["output"]; - authorised: Scalars["Boolean"]["output"]; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - hatsHatCreatorModule: HatsHatCreatorModule; - id: Scalars["ID"]["output"]; - workspaceId: Scalars["ID"]["output"]; +export type HatsFractionTokenModule = { + __typename?: 'HatsFractionTokenModule'; + balances: Array; + id: Scalars['ID']['output']; + initializedTokens: Array; + transfers: Array; + workspaceId: Scalars['ID']['output']; }; -export type HatsHatCreatorModuleAuthority_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe; - address?: InputMaybe; - address_contains?: InputMaybe; - address_contains_nocase?: InputMaybe; - address_ends_with?: InputMaybe; - address_ends_with_nocase?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_contains?: InputMaybe; - address_not_contains_nocase?: InputMaybe; - address_not_ends_with?: InputMaybe; - address_not_ends_with_nocase?: InputMaybe; - address_not_in?: InputMaybe>; - address_not_starts_with?: InputMaybe; - address_not_starts_with_nocase?: InputMaybe; - address_starts_with?: InputMaybe; - address_starts_with_nocase?: InputMaybe; - and?: InputMaybe>>; - authorised?: InputMaybe; - authorised_in?: InputMaybe>; - authorised_not?: InputMaybe; - authorised_not_in?: InputMaybe>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe>; - hatsHatCreatorModule?: InputMaybe; - hatsHatCreatorModule_?: InputMaybe; - hatsHatCreatorModule_contains?: InputMaybe; - hatsHatCreatorModule_contains_nocase?: InputMaybe; - hatsHatCreatorModule_ends_with?: InputMaybe; - hatsHatCreatorModule_ends_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsHatCreatorModule_gt?: InputMaybe; - hatsHatCreatorModule_gte?: InputMaybe; - hatsHatCreatorModule_in?: InputMaybe>; - hatsHatCreatorModule_lt?: InputMaybe; - hatsHatCreatorModule_lte?: InputMaybe; - hatsHatCreatorModule_not?: InputMaybe; - hatsHatCreatorModule_not_contains?: InputMaybe; - hatsHatCreatorModule_not_contains_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsHatCreatorModule_not_ends_with?: InputMaybe; - hatsHatCreatorModule_not_ends_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsHatCreatorModule_not_in?: InputMaybe>; - hatsHatCreatorModule_not_starts_with?: InputMaybe; - hatsHatCreatorModule_not_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsHatCreatorModule_starts_with?: InputMaybe; - hatsHatCreatorModule_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; - or?: InputMaybe>>; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; -}; - -export enum HatsHatCreatorModuleAuthority_OrderBy { - Address = "address", - Authorised = "authorised", - BlockNumber = "blockNumber", - BlockTimestamp = "blockTimestamp", - HatsHatCreatorModule = "hatsHatCreatorModule", - HatsHatCreatorModuleId = "hatsHatCreatorModule__id", - HatsHatCreatorModuleWorkspaceId = "hatsHatCreatorModule__workspaceId", - Id = "id", - WorkspaceId = "workspaceId", -} - -export type HatsHatCreatorModule_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe; - and?: InputMaybe>>; - authorities_?: InputMaybe; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; - or?: InputMaybe>>; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; -}; - -export enum HatsHatCreatorModule_OrderBy { - Authorities = "authorities", - Id = "id", - WorkspaceId = "workspaceId", -} -export type HatsTimeFrameModule = { - __typename?: "HatsTimeFrameModule"; - authorities: Array; - id: Scalars["ID"]["output"]; - workspaceId: Scalars["ID"]["output"]; +export type HatsFractionTokenModuleBalancesArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }; -export type HatsTimeFrameModuleAuthoritiesArgs = { - first?: InputMaybe; - orderBy?: InputMaybe; + +export type HatsFractionTokenModuleInitializedTokensArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; - where?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; }; -export type HatsTimeFrameModuleAuthority = { - __typename?: "HatsTimeFrameModuleAuthority"; - address: Scalars["String"]["output"]; - authorised: Scalars["Boolean"]["output"]; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - hatsTimeFrameModule: HatsTimeFrameModule; - id: Scalars["ID"]["output"]; - workspaceId: Scalars["ID"]["output"]; -}; -export type HatsTimeFrameModuleAuthority_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe; - address?: InputMaybe; - address_contains?: InputMaybe; - address_contains_nocase?: InputMaybe; - address_ends_with?: InputMaybe; - address_ends_with_nocase?: InputMaybe; - address_gt?: InputMaybe; - address_gte?: InputMaybe; - address_in?: InputMaybe>; - address_lt?: InputMaybe; - address_lte?: InputMaybe; - address_not?: InputMaybe; - address_not_contains?: InputMaybe; - address_not_contains_nocase?: InputMaybe; - address_not_ends_with?: InputMaybe; - address_not_ends_with_nocase?: InputMaybe; - address_not_in?: InputMaybe>; - address_not_starts_with?: InputMaybe; - address_not_starts_with_nocase?: InputMaybe; - address_starts_with?: InputMaybe; - address_starts_with_nocase?: InputMaybe; - and?: InputMaybe>>; - authorised?: InputMaybe; - authorised_in?: InputMaybe>; - authorised_not?: InputMaybe; - authorised_not_in?: InputMaybe>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe>; - hatsTimeFrameModule?: InputMaybe; - hatsTimeFrameModule_?: InputMaybe; - hatsTimeFrameModule_contains?: InputMaybe; - hatsTimeFrameModule_contains_nocase?: InputMaybe; - hatsTimeFrameModule_ends_with?: InputMaybe; - hatsTimeFrameModule_ends_with_nocase?: InputMaybe; - hatsTimeFrameModule_gt?: InputMaybe; - hatsTimeFrameModule_gte?: InputMaybe; - hatsTimeFrameModule_in?: InputMaybe>; - hatsTimeFrameModule_lt?: InputMaybe; - hatsTimeFrameModule_lte?: InputMaybe; - hatsTimeFrameModule_not?: InputMaybe; - hatsTimeFrameModule_not_contains?: InputMaybe; - hatsTimeFrameModule_not_contains_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_not_ends_with?: InputMaybe; - hatsTimeFrameModule_not_ends_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_not_in?: InputMaybe>; - hatsTimeFrameModule_not_starts_with?: InputMaybe; - hatsTimeFrameModule_not_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_starts_with?: InputMaybe; - hatsTimeFrameModule_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; - or?: InputMaybe>>; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; -}; - -export enum HatsTimeFrameModuleAuthority_OrderBy { - Address = "address", - Authorised = "authorised", - BlockNumber = "blockNumber", - BlockTimestamp = "blockTimestamp", - HatsTimeFrameModule = "hatsTimeFrameModule", - HatsTimeFrameModuleId = "hatsTimeFrameModule__id", - HatsTimeFrameModuleWorkspaceId = "hatsTimeFrameModule__workspaceId", - Id = "id", - WorkspaceId = "workspaceId", -} +export type HatsFractionTokenModuleTransfersArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; -export type HatsTimeFrameModule_Filter = { +export type HatsFractionTokenModule_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; - and?: InputMaybe>>; - authorities_?: InputMaybe; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; - or?: InputMaybe>>; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; -}; - -export enum HatsTimeFrameModule_OrderBy { - Authorities = "authorities", - Id = "id", - WorkspaceId = "workspaceId", + and?: InputMaybe>>; + balances_?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + initializedTokens_?: InputMaybe; + or?: InputMaybe>>; + transfers_?: InputMaybe; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; +}; + +export enum HatsFractionTokenModule_OrderBy { + Balances = 'balances', + Id = 'id', + InitializedTokens = 'initializedTokens', + Transfers = 'transfers', + WorkspaceId = 'workspaceId' } export type InitializedFractionToken = { - __typename?: "InitializedFractionToken"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - hatId: Scalars["BigInt"]["output"]; - id: Scalars["ID"]["output"]; - wearer: Scalars["String"]["output"]; - workspaceId: Scalars["ID"]["output"]; + __typename?: 'InitializedFractionToken'; + blockNumber: Scalars['BigInt']['output']; + blockTimestamp: Scalars['BigInt']['output']; + hatId: Scalars['BigInt']['output']; + hatsFractionTokenModule: HatsFractionTokenModule; + id: Scalars['ID']['output']; + tokenId: Scalars['BigInt']['output']; + wearer: Scalars['String']['output']; + workspaceId: Scalars['ID']['output']; }; export type InitializedFractionToken_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe>; - hatId?: InputMaybe; - hatId_gt?: InputMaybe; - hatId_gte?: InputMaybe; - hatId_in?: InputMaybe>; - hatId_lt?: InputMaybe; - hatId_lte?: InputMaybe; - hatId_not?: InputMaybe; - hatId_not_in?: InputMaybe>; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; + blockNumber?: InputMaybe; + blockNumber_gt?: InputMaybe; + blockNumber_gte?: InputMaybe; + blockNumber_in?: InputMaybe>; + blockNumber_lt?: InputMaybe; + blockNumber_lte?: InputMaybe; + blockNumber_not?: InputMaybe; + blockNumber_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + hatId?: InputMaybe; + hatId_gt?: InputMaybe; + hatId_gte?: InputMaybe; + hatId_in?: InputMaybe>; + hatId_lt?: InputMaybe; + hatId_lte?: InputMaybe; + hatId_not?: InputMaybe; + hatId_not_in?: InputMaybe>; + hatsFractionTokenModule?: InputMaybe; + hatsFractionTokenModule_?: InputMaybe; + hatsFractionTokenModule_contains?: InputMaybe; + hatsFractionTokenModule_contains_nocase?: InputMaybe; + hatsFractionTokenModule_ends_with?: InputMaybe; + hatsFractionTokenModule_ends_with_nocase?: InputMaybe; + hatsFractionTokenModule_gt?: InputMaybe; + hatsFractionTokenModule_gte?: InputMaybe; + hatsFractionTokenModule_in?: InputMaybe>; + hatsFractionTokenModule_lt?: InputMaybe; + hatsFractionTokenModule_lte?: InputMaybe; + hatsFractionTokenModule_not?: InputMaybe; + hatsFractionTokenModule_not_contains?: InputMaybe; + hatsFractionTokenModule_not_contains_nocase?: InputMaybe; + hatsFractionTokenModule_not_ends_with?: InputMaybe; + hatsFractionTokenModule_not_ends_with_nocase?: InputMaybe; + hatsFractionTokenModule_not_in?: InputMaybe>; + hatsFractionTokenModule_not_starts_with?: InputMaybe; + hatsFractionTokenModule_not_starts_with_nocase?: InputMaybe; + hatsFractionTokenModule_starts_with?: InputMaybe; + hatsFractionTokenModule_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; or?: InputMaybe>>; - wearer?: InputMaybe; - wearer_contains?: InputMaybe; - wearer_contains_nocase?: InputMaybe; - wearer_ends_with?: InputMaybe; - wearer_ends_with_nocase?: InputMaybe; - wearer_gt?: InputMaybe; - wearer_gte?: InputMaybe; - wearer_in?: InputMaybe>; - wearer_lt?: InputMaybe; - wearer_lte?: InputMaybe; - wearer_not?: InputMaybe; - wearer_not_contains?: InputMaybe; - wearer_not_contains_nocase?: InputMaybe; - wearer_not_ends_with?: InputMaybe; - wearer_not_ends_with_nocase?: InputMaybe; - wearer_not_in?: InputMaybe>; - wearer_not_starts_with?: InputMaybe; - wearer_not_starts_with_nocase?: InputMaybe; - wearer_starts_with?: InputMaybe; - wearer_starts_with_nocase?: InputMaybe; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; + tokenId?: InputMaybe; + tokenId_gt?: InputMaybe; + tokenId_gte?: InputMaybe; + tokenId_in?: InputMaybe>; + tokenId_lt?: InputMaybe; + tokenId_lte?: InputMaybe; + tokenId_not?: InputMaybe; + tokenId_not_in?: InputMaybe>; + wearer?: InputMaybe; + wearer_contains?: InputMaybe; + wearer_contains_nocase?: InputMaybe; + wearer_ends_with?: InputMaybe; + wearer_ends_with_nocase?: InputMaybe; + wearer_gt?: InputMaybe; + wearer_gte?: InputMaybe; + wearer_in?: InputMaybe>; + wearer_lt?: InputMaybe; + wearer_lte?: InputMaybe; + wearer_not?: InputMaybe; + wearer_not_contains?: InputMaybe; + wearer_not_contains_nocase?: InputMaybe; + wearer_not_ends_with?: InputMaybe; + wearer_not_ends_with_nocase?: InputMaybe; + wearer_not_in?: InputMaybe>; + wearer_not_starts_with?: InputMaybe; + wearer_not_starts_with_nocase?: InputMaybe; + wearer_starts_with?: InputMaybe; + wearer_starts_with_nocase?: InputMaybe; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; }; export enum InitializedFractionToken_OrderBy { - BlockNumber = "blockNumber", - BlockTimestamp = "blockTimestamp", - HatId = "hatId", - Id = "id", - Wearer = "wearer", - WorkspaceId = "workspaceId", + BlockNumber = 'blockNumber', + BlockTimestamp = 'blockTimestamp', + HatId = 'hatId', + HatsFractionTokenModule = 'hatsFractionTokenModule', + HatsFractionTokenModuleId = 'hatsFractionTokenModule__id', + HatsFractionTokenModuleWorkspaceId = 'hatsFractionTokenModule__workspaceId', + Id = 'id', + TokenId = 'tokenId', + Wearer = 'wearer', + WorkspaceId = 'workspaceId' +} + +export type MintThanksToken = { + __typename?: 'MintThanksToken'; + amount: Scalars['BigInt']['output']; + blockNumber: Scalars['BigInt']['output']; + blockTimestamp: Scalars['BigInt']['output']; + from: Scalars['String']['output']; + id: Scalars['ID']['output']; + thanksToken: ThanksToken; + to: Scalars['String']['output']; + workspaceId: Scalars['ID']['output']; +}; + +export type MintThanksToken_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; + and?: InputMaybe>>; + blockNumber?: InputMaybe; + blockNumber_gt?: InputMaybe; + blockNumber_gte?: InputMaybe; + blockNumber_in?: InputMaybe>; + blockNumber_lt?: InputMaybe; + blockNumber_lte?: InputMaybe; + blockNumber_not?: InputMaybe; + blockNumber_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + from?: InputMaybe; + from_contains?: InputMaybe; + from_contains_nocase?: InputMaybe; + from_ends_with?: InputMaybe; + from_ends_with_nocase?: InputMaybe; + from_gt?: InputMaybe; + from_gte?: InputMaybe; + from_in?: InputMaybe>; + from_lt?: InputMaybe; + from_lte?: InputMaybe; + from_not?: InputMaybe; + from_not_contains?: InputMaybe; + from_not_contains_nocase?: InputMaybe; + from_not_ends_with?: InputMaybe; + from_not_ends_with_nocase?: InputMaybe; + from_not_in?: InputMaybe>; + from_not_starts_with?: InputMaybe; + from_not_starts_with_nocase?: InputMaybe; + from_starts_with?: InputMaybe; + from_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + thanksToken?: InputMaybe; + thanksToken_?: InputMaybe; + thanksToken_contains?: InputMaybe; + thanksToken_contains_nocase?: InputMaybe; + thanksToken_ends_with?: InputMaybe; + thanksToken_ends_with_nocase?: InputMaybe; + thanksToken_gt?: InputMaybe; + thanksToken_gte?: InputMaybe; + thanksToken_in?: InputMaybe>; + thanksToken_lt?: InputMaybe; + thanksToken_lte?: InputMaybe; + thanksToken_not?: InputMaybe; + thanksToken_not_contains?: InputMaybe; + thanksToken_not_contains_nocase?: InputMaybe; + thanksToken_not_ends_with?: InputMaybe; + thanksToken_not_ends_with_nocase?: InputMaybe; + thanksToken_not_in?: InputMaybe>; + thanksToken_not_starts_with?: InputMaybe; + thanksToken_not_starts_with_nocase?: InputMaybe; + thanksToken_starts_with?: InputMaybe; + thanksToken_starts_with_nocase?: InputMaybe; + to?: InputMaybe; + to_contains?: InputMaybe; + to_contains_nocase?: InputMaybe; + to_ends_with?: InputMaybe; + to_ends_with_nocase?: InputMaybe; + to_gt?: InputMaybe; + to_gte?: InputMaybe; + to_in?: InputMaybe>; + to_lt?: InputMaybe; + to_lte?: InputMaybe; + to_not?: InputMaybe; + to_not_contains?: InputMaybe; + to_not_contains_nocase?: InputMaybe; + to_not_ends_with?: InputMaybe; + to_not_ends_with_nocase?: InputMaybe; + to_not_in?: InputMaybe>; + to_not_starts_with?: InputMaybe; + to_not_starts_with_nocase?: InputMaybe; + to_starts_with?: InputMaybe; + to_starts_with_nocase?: InputMaybe; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; +}; + +export enum MintThanksToken_OrderBy { + Amount = 'amount', + BlockNumber = 'blockNumber', + BlockTimestamp = 'blockTimestamp', + From = 'from', + Id = 'id', + ThanksToken = 'thanksToken', + ThanksTokenId = 'thanksToken__id', + ThanksTokenWorkspaceId = 'thanksToken__workspaceId', + To = 'to', + WorkspaceId = 'workspaceId' } /** Defines the order direction, either ascending or descending */ export enum OrderDirection { - Asc = "asc", - Desc = "desc", + Asc = 'asc', + Desc = 'desc' } export type Query = { - __typename?: "Query"; + __typename?: 'Query'; /** Access to subgraph metadata */ _meta?: Maybe<_Meta_>; + amountOfMintThanksToken?: Maybe; + amountOfMintThanksTokens: Array; balanceOfFractionToken?: Maybe; balanceOfFractionTokens: Array; - hatsHatCreatorModule?: Maybe; - hatsHatCreatorModuleAuthorities: Array; - hatsHatCreatorModuleAuthority?: Maybe; - hatsHatCreatorModules: Array; - hatsTimeFrameModule?: Maybe; - hatsTimeFrameModuleAuthorities: Array; - hatsTimeFrameModuleAuthority?: Maybe; - hatsTimeFrameModules: Array; + balanceOfThanksToken?: Maybe; + balanceOfThanksTokens: Array; + hatsFractionTokenModule?: Maybe; + hatsFractionTokenModules: Array; initializedFractionToken?: Maybe; initializedFractionTokens: Array; + mintThanksToken?: Maybe; + mintThanksTokens: Array; + thanksToken?: Maybe; + thanksTokens: Array; transferFractionToken?: Maybe; transferFractionTokens: Array; + transferThanksToken?: Maybe; + transferThanksTokens: Array; workspace?: Maybe; workspaces: Array; }; + export type Query_MetaArgs = { block?: InputMaybe; }; + +export type QueryAmountOfMintThanksTokenArgs = { + block?: InputMaybe; + id: Scalars['ID']['input']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryAmountOfMintThanksTokensArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + + export type QueryBalanceOfFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type QueryBalanceOfFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; -export type QueryHatsHatCreatorModuleArgs = { + +export type QueryBalanceOfThanksTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type QueryHatsHatCreatorModuleAuthoritiesArgs = { + +export type QueryBalanceOfThanksTokensArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; -export type QueryHatsHatCreatorModuleAuthorityArgs = { + +export type QueryHatsFractionTokenModuleArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type QueryHatsHatCreatorModulesArgs = { + +export type QueryHatsFractionTokenModulesArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; -export type QueryHatsTimeFrameModuleArgs = { + +export type QueryInitializedFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type QueryHatsTimeFrameModuleAuthoritiesArgs = { + +export type QueryInitializedFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; -export type QueryHatsTimeFrameModuleAuthorityArgs = { + +export type QueryMintThanksTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type QueryHatsTimeFrameModulesArgs = { + +export type QueryMintThanksTokensArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; -export type QueryInitializedFractionTokenArgs = { + +export type QueryThanksTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type QueryInitializedFractionTokensArgs = { + +export type QueryThanksTokensArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; + export type QueryTransferFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type QueryTransferFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; + +export type QueryTransferThanksTokenArgs = { + block?: InputMaybe; + id: Scalars['ID']['input']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type QueryTransferThanksTokensArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + + export type QueryWorkspaceArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type QueryWorkspacesArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type Subscription = { - __typename?: "Subscription"; + __typename?: 'Subscription'; /** Access to subgraph metadata */ _meta?: Maybe<_Meta_>; + amountOfMintThanksToken?: Maybe; + amountOfMintThanksTokens: Array; balanceOfFractionToken?: Maybe; balanceOfFractionTokens: Array; - hatsHatCreatorModule?: Maybe; - hatsHatCreatorModuleAuthorities: Array; - hatsHatCreatorModuleAuthority?: Maybe; - hatsHatCreatorModules: Array; - hatsTimeFrameModule?: Maybe; - hatsTimeFrameModuleAuthorities: Array; - hatsTimeFrameModuleAuthority?: Maybe; - hatsTimeFrameModules: Array; + balanceOfThanksToken?: Maybe; + balanceOfThanksTokens: Array; + hatsFractionTokenModule?: Maybe; + hatsFractionTokenModules: Array; initializedFractionToken?: Maybe; initializedFractionTokens: Array; + mintThanksToken?: Maybe; + mintThanksTokens: Array; + thanksToken?: Maybe; + thanksTokens: Array; transferFractionToken?: Maybe; transferFractionTokens: Array; + transferThanksToken?: Maybe; + transferThanksTokens: Array; workspace?: Maybe; workspaces: Array; }; + export type Subscription_MetaArgs = { block?: InputMaybe; }; + +export type SubscriptionAmountOfMintThanksTokenArgs = { + block?: InputMaybe; + id: Scalars['ID']['input']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionAmountOfMintThanksTokensArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + + export type SubscriptionBalanceOfFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type SubscriptionBalanceOfFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; -export type SubscriptionHatsHatCreatorModuleArgs = { + +export type SubscriptionBalanceOfThanksTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type SubscriptionHatsHatCreatorModuleAuthoritiesArgs = { + +export type SubscriptionBalanceOfThanksTokensArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; -export type SubscriptionHatsHatCreatorModuleAuthorityArgs = { + +export type SubscriptionHatsFractionTokenModuleArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type SubscriptionHatsHatCreatorModulesArgs = { + +export type SubscriptionHatsFractionTokenModulesArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; -export type SubscriptionHatsTimeFrameModuleArgs = { + +export type SubscriptionInitializedFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type SubscriptionHatsTimeFrameModuleAuthoritiesArgs = { + +export type SubscriptionInitializedFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; -export type SubscriptionHatsTimeFrameModuleAuthorityArgs = { + +export type SubscriptionMintThanksTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type SubscriptionHatsTimeFrameModulesArgs = { + +export type SubscriptionMintThanksTokensArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; -export type SubscriptionInitializedFractionTokenArgs = { + +export type SubscriptionThanksTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; -export type SubscriptionInitializedFractionTokensArgs = { + +export type SubscriptionThanksTokensArgs = { block?: InputMaybe; - first?: InputMaybe; - orderBy?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; - where?: InputMaybe; + where?: InputMaybe; }; + export type SubscriptionTransferFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type SubscriptionTransferFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; + +export type SubscriptionTransferThanksTokenArgs = { + block?: InputMaybe; + id: Scalars['ID']['input']; + subgraphError?: _SubgraphErrorPolicy_; +}; + + +export type SubscriptionTransferThanksTokensArgs = { + block?: InputMaybe; + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + subgraphError?: _SubgraphErrorPolicy_; + where?: InputMaybe; +}; + + export type SubscriptionWorkspaceArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type SubscriptionWorkspacesArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; +export type ThanksToken = { + __typename?: 'ThanksToken'; + balances: Array; + id: Scalars['ID']['output']; + mintAmounts: Array; + mints: Array; + transfers: Array; + workspaceId: Scalars['ID']['output']; +}; + + +export type ThanksTokenBalancesArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + + +export type ThanksTokenMintAmountsArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + + +export type ThanksTokenMintsArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + + +export type ThanksTokenTransfersArgs = { + first?: InputMaybe; + orderBy?: InputMaybe; + orderDirection?: InputMaybe; + skip?: InputMaybe; + where?: InputMaybe; +}; + +export type ThanksToken_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + and?: InputMaybe>>; + balances_?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + mintAmounts_?: InputMaybe; + mints_?: InputMaybe; + or?: InputMaybe>>; + transfers_?: InputMaybe; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; +}; + +export enum ThanksToken_OrderBy { + Balances = 'balances', + Id = 'id', + MintAmounts = 'mintAmounts', + Mints = 'mints', + Transfers = 'transfers', + WorkspaceId = 'workspaceId' +} + export type TransferFractionToken = { - __typename?: "TransferFractionToken"; - amount: Scalars["BigInt"]["output"]; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - from: Scalars["String"]["output"]; - hatId?: Maybe; - id: Scalars["ID"]["output"]; - to: Scalars["String"]["output"]; - tokenId: Scalars["BigInt"]["output"]; - wearer?: Maybe; - workspaceId?: Maybe; + __typename?: 'TransferFractionToken'; + amount: Scalars['BigInt']['output']; + blockNumber: Scalars['BigInt']['output']; + blockTimestamp: Scalars['BigInt']['output']; + from: Scalars['String']['output']; + hatsFractionTokenModule: HatsFractionTokenModule; + id: Scalars['ID']['output']; + to: Scalars['String']['output']; + tokenId: Scalars['BigInt']['output']; + workspaceId: Scalars['ID']['output']; }; export type TransferFractionToken_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; - amount?: InputMaybe; - amount_gt?: InputMaybe; - amount_gte?: InputMaybe; - amount_in?: InputMaybe>; - amount_lt?: InputMaybe; - amount_lte?: InputMaybe; - amount_not?: InputMaybe; - amount_not_in?: InputMaybe>; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; and?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe>; - from?: InputMaybe; - from_contains?: InputMaybe; - from_contains_nocase?: InputMaybe; - from_ends_with?: InputMaybe; - from_ends_with_nocase?: InputMaybe; - from_gt?: InputMaybe; - from_gte?: InputMaybe; - from_in?: InputMaybe>; - from_lt?: InputMaybe; - from_lte?: InputMaybe; - from_not?: InputMaybe; - from_not_contains?: InputMaybe; - from_not_contains_nocase?: InputMaybe; - from_not_ends_with?: InputMaybe; - from_not_ends_with_nocase?: InputMaybe; - from_not_in?: InputMaybe>; - from_not_starts_with?: InputMaybe; - from_not_starts_with_nocase?: InputMaybe; - from_starts_with?: InputMaybe; - from_starts_with_nocase?: InputMaybe; - hatId?: InputMaybe; - hatId_gt?: InputMaybe; - hatId_gte?: InputMaybe; - hatId_in?: InputMaybe>; - hatId_lt?: InputMaybe; - hatId_lte?: InputMaybe; - hatId_not?: InputMaybe; - hatId_not_in?: InputMaybe>; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; + blockNumber?: InputMaybe; + blockNumber_gt?: InputMaybe; + blockNumber_gte?: InputMaybe; + blockNumber_in?: InputMaybe>; + blockNumber_lt?: InputMaybe; + blockNumber_lte?: InputMaybe; + blockNumber_not?: InputMaybe; + blockNumber_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + from?: InputMaybe; + from_contains?: InputMaybe; + from_contains_nocase?: InputMaybe; + from_ends_with?: InputMaybe; + from_ends_with_nocase?: InputMaybe; + from_gt?: InputMaybe; + from_gte?: InputMaybe; + from_in?: InputMaybe>; + from_lt?: InputMaybe; + from_lte?: InputMaybe; + from_not?: InputMaybe; + from_not_contains?: InputMaybe; + from_not_contains_nocase?: InputMaybe; + from_not_ends_with?: InputMaybe; + from_not_ends_with_nocase?: InputMaybe; + from_not_in?: InputMaybe>; + from_not_starts_with?: InputMaybe; + from_not_starts_with_nocase?: InputMaybe; + from_starts_with?: InputMaybe; + from_starts_with_nocase?: InputMaybe; + hatsFractionTokenModule?: InputMaybe; + hatsFractionTokenModule_?: InputMaybe; + hatsFractionTokenModule_contains?: InputMaybe; + hatsFractionTokenModule_contains_nocase?: InputMaybe; + hatsFractionTokenModule_ends_with?: InputMaybe; + hatsFractionTokenModule_ends_with_nocase?: InputMaybe; + hatsFractionTokenModule_gt?: InputMaybe; + hatsFractionTokenModule_gte?: InputMaybe; + hatsFractionTokenModule_in?: InputMaybe>; + hatsFractionTokenModule_lt?: InputMaybe; + hatsFractionTokenModule_lte?: InputMaybe; + hatsFractionTokenModule_not?: InputMaybe; + hatsFractionTokenModule_not_contains?: InputMaybe; + hatsFractionTokenModule_not_contains_nocase?: InputMaybe; + hatsFractionTokenModule_not_ends_with?: InputMaybe; + hatsFractionTokenModule_not_ends_with_nocase?: InputMaybe; + hatsFractionTokenModule_not_in?: InputMaybe>; + hatsFractionTokenModule_not_starts_with?: InputMaybe; + hatsFractionTokenModule_not_starts_with_nocase?: InputMaybe; + hatsFractionTokenModule_starts_with?: InputMaybe; + hatsFractionTokenModule_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; or?: InputMaybe>>; - to?: InputMaybe; - to_contains?: InputMaybe; - to_contains_nocase?: InputMaybe; - to_ends_with?: InputMaybe; - to_ends_with_nocase?: InputMaybe; - to_gt?: InputMaybe; - to_gte?: InputMaybe; - to_in?: InputMaybe>; - to_lt?: InputMaybe; - to_lte?: InputMaybe; - to_not?: InputMaybe; - to_not_contains?: InputMaybe; - to_not_contains_nocase?: InputMaybe; - to_not_ends_with?: InputMaybe; - to_not_ends_with_nocase?: InputMaybe; - to_not_in?: InputMaybe>; - to_not_starts_with?: InputMaybe; - to_not_starts_with_nocase?: InputMaybe; - to_starts_with?: InputMaybe; - to_starts_with_nocase?: InputMaybe; - tokenId?: InputMaybe; - tokenId_gt?: InputMaybe; - tokenId_gte?: InputMaybe; - tokenId_in?: InputMaybe>; - tokenId_lt?: InputMaybe; - tokenId_lte?: InputMaybe; - tokenId_not?: InputMaybe; - tokenId_not_in?: InputMaybe>; - wearer?: InputMaybe; - wearer_contains?: InputMaybe; - wearer_contains_nocase?: InputMaybe; - wearer_ends_with?: InputMaybe; - wearer_ends_with_nocase?: InputMaybe; - wearer_gt?: InputMaybe; - wearer_gte?: InputMaybe; - wearer_in?: InputMaybe>; - wearer_lt?: InputMaybe; - wearer_lte?: InputMaybe; - wearer_not?: InputMaybe; - wearer_not_contains?: InputMaybe; - wearer_not_contains_nocase?: InputMaybe; - wearer_not_ends_with?: InputMaybe; - wearer_not_ends_with_nocase?: InputMaybe; - wearer_not_in?: InputMaybe>; - wearer_not_starts_with?: InputMaybe; - wearer_not_starts_with_nocase?: InputMaybe; - wearer_starts_with?: InputMaybe; - wearer_starts_with_nocase?: InputMaybe; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; + to?: InputMaybe; + to_contains?: InputMaybe; + to_contains_nocase?: InputMaybe; + to_ends_with?: InputMaybe; + to_ends_with_nocase?: InputMaybe; + to_gt?: InputMaybe; + to_gte?: InputMaybe; + to_in?: InputMaybe>; + to_lt?: InputMaybe; + to_lte?: InputMaybe; + to_not?: InputMaybe; + to_not_contains?: InputMaybe; + to_not_contains_nocase?: InputMaybe; + to_not_ends_with?: InputMaybe; + to_not_ends_with_nocase?: InputMaybe; + to_not_in?: InputMaybe>; + to_not_starts_with?: InputMaybe; + to_not_starts_with_nocase?: InputMaybe; + to_starts_with?: InputMaybe; + to_starts_with_nocase?: InputMaybe; + tokenId?: InputMaybe; + tokenId_gt?: InputMaybe; + tokenId_gte?: InputMaybe; + tokenId_in?: InputMaybe>; + tokenId_lt?: InputMaybe; + tokenId_lte?: InputMaybe; + tokenId_not?: InputMaybe; + tokenId_not_in?: InputMaybe>; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; }; export enum TransferFractionToken_OrderBy { - Amount = "amount", - BlockNumber = "blockNumber", - BlockTimestamp = "blockTimestamp", - From = "from", - HatId = "hatId", - Id = "id", - To = "to", - TokenId = "tokenId", - Wearer = "wearer", - WorkspaceId = "workspaceId", + Amount = 'amount', + BlockNumber = 'blockNumber', + BlockTimestamp = 'blockTimestamp', + From = 'from', + HatsFractionTokenModule = 'hatsFractionTokenModule', + HatsFractionTokenModuleId = 'hatsFractionTokenModule__id', + HatsFractionTokenModuleWorkspaceId = 'hatsFractionTokenModule__workspaceId', + Id = 'id', + To = 'to', + TokenId = 'tokenId', + WorkspaceId = 'workspaceId' +} + +export type TransferThanksToken = { + __typename?: 'TransferThanksToken'; + amount: Scalars['BigInt']['output']; + blockNumber: Scalars['BigInt']['output']; + blockTimestamp: Scalars['BigInt']['output']; + from: Scalars['String']['output']; + id: Scalars['ID']['output']; + thanksToken: ThanksToken; + to: Scalars['String']['output']; + workspaceId: Scalars['ID']['output']; +}; + +export type TransferThanksToken_Filter = { + /** Filter for the block changed event. */ + _change_block?: InputMaybe; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; + and?: InputMaybe>>; + blockNumber?: InputMaybe; + blockNumber_gt?: InputMaybe; + blockNumber_gte?: InputMaybe; + blockNumber_in?: InputMaybe>; + blockNumber_lt?: InputMaybe; + blockNumber_lte?: InputMaybe; + blockNumber_not?: InputMaybe; + blockNumber_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + from?: InputMaybe; + from_contains?: InputMaybe; + from_contains_nocase?: InputMaybe; + from_ends_with?: InputMaybe; + from_ends_with_nocase?: InputMaybe; + from_gt?: InputMaybe; + from_gte?: InputMaybe; + from_in?: InputMaybe>; + from_lt?: InputMaybe; + from_lte?: InputMaybe; + from_not?: InputMaybe; + from_not_contains?: InputMaybe; + from_not_contains_nocase?: InputMaybe; + from_not_ends_with?: InputMaybe; + from_not_ends_with_nocase?: InputMaybe; + from_not_in?: InputMaybe>; + from_not_starts_with?: InputMaybe; + from_not_starts_with_nocase?: InputMaybe; + from_starts_with?: InputMaybe; + from_starts_with_nocase?: InputMaybe; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + or?: InputMaybe>>; + thanksToken?: InputMaybe; + thanksToken_?: InputMaybe; + thanksToken_contains?: InputMaybe; + thanksToken_contains_nocase?: InputMaybe; + thanksToken_ends_with?: InputMaybe; + thanksToken_ends_with_nocase?: InputMaybe; + thanksToken_gt?: InputMaybe; + thanksToken_gte?: InputMaybe; + thanksToken_in?: InputMaybe>; + thanksToken_lt?: InputMaybe; + thanksToken_lte?: InputMaybe; + thanksToken_not?: InputMaybe; + thanksToken_not_contains?: InputMaybe; + thanksToken_not_contains_nocase?: InputMaybe; + thanksToken_not_ends_with?: InputMaybe; + thanksToken_not_ends_with_nocase?: InputMaybe; + thanksToken_not_in?: InputMaybe>; + thanksToken_not_starts_with?: InputMaybe; + thanksToken_not_starts_with_nocase?: InputMaybe; + thanksToken_starts_with?: InputMaybe; + thanksToken_starts_with_nocase?: InputMaybe; + to?: InputMaybe; + to_contains?: InputMaybe; + to_contains_nocase?: InputMaybe; + to_ends_with?: InputMaybe; + to_ends_with_nocase?: InputMaybe; + to_gt?: InputMaybe; + to_gte?: InputMaybe; + to_in?: InputMaybe>; + to_lt?: InputMaybe; + to_lte?: InputMaybe; + to_not?: InputMaybe; + to_not_contains?: InputMaybe; + to_not_contains_nocase?: InputMaybe; + to_not_ends_with?: InputMaybe; + to_not_ends_with_nocase?: InputMaybe; + to_not_in?: InputMaybe>; + to_not_starts_with?: InputMaybe; + to_not_starts_with_nocase?: InputMaybe; + to_starts_with?: InputMaybe; + to_starts_with_nocase?: InputMaybe; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; +}; + +export enum TransferThanksToken_OrderBy { + Amount = 'amount', + BlockNumber = 'blockNumber', + BlockTimestamp = 'blockTimestamp', + From = 'from', + Id = 'id', + ThanksToken = 'thanksToken', + ThanksTokenId = 'thanksToken__id', + ThanksTokenWorkspaceId = 'thanksToken__workspaceId', + To = 'to', + WorkspaceId = 'workspaceId' } export type Workspace = { - __typename?: "Workspace"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - creator: Scalars["String"]["output"]; - hatsHatCreatorModule?: Maybe; - hatsTimeFrameModule?: Maybe; - hatterHatId: Scalars["BigInt"]["output"]; - id: Scalars["ID"]["output"]; - splitCreator: Scalars["String"]["output"]; - topHatId: Scalars["BigInt"]["output"]; + __typename?: 'Workspace'; + blockNumber: Scalars['BigInt']['output']; + blockTimestamp: Scalars['BigInt']['output']; + creator: Scalars['String']['output']; + creatorHatId: Scalars['BigInt']['output']; + hatsFractionTokenModule?: Maybe; + hatsHatCreatorModule: Scalars['String']['output']; + hatsTimeFrameModule: Scalars['String']['output']; + hatterHatId: Scalars['BigInt']['output']; + id: Scalars['ID']['output']; + minterHatId: Scalars['BigInt']['output']; + operatorHatId: Scalars['BigInt']['output']; + owner: Scalars['String']['output']; + splitCreator: Scalars['String']['output']; + thanksToken: ThanksToken; + topHatId: Scalars['BigInt']['output']; }; export type Workspace_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe>; - creator?: InputMaybe; - creator_contains?: InputMaybe; - creator_contains_nocase?: InputMaybe; - creator_ends_with?: InputMaybe; - creator_ends_with_nocase?: InputMaybe; - creator_gt?: InputMaybe; - creator_gte?: InputMaybe; - creator_in?: InputMaybe>; - creator_lt?: InputMaybe; - creator_lte?: InputMaybe; - creator_not?: InputMaybe; - creator_not_contains?: InputMaybe; - creator_not_contains_nocase?: InputMaybe; - creator_not_ends_with?: InputMaybe; - creator_not_ends_with_nocase?: InputMaybe; - creator_not_in?: InputMaybe>; - creator_not_starts_with?: InputMaybe; - creator_not_starts_with_nocase?: InputMaybe; - creator_starts_with?: InputMaybe; - creator_starts_with_nocase?: InputMaybe; - hatsHatCreatorModule?: InputMaybe; - hatsHatCreatorModule_?: InputMaybe; - hatsHatCreatorModule_contains?: InputMaybe; - hatsHatCreatorModule_contains_nocase?: InputMaybe; - hatsHatCreatorModule_ends_with?: InputMaybe; - hatsHatCreatorModule_ends_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsHatCreatorModule_gt?: InputMaybe; - hatsHatCreatorModule_gte?: InputMaybe; - hatsHatCreatorModule_in?: InputMaybe>; - hatsHatCreatorModule_lt?: InputMaybe; - hatsHatCreatorModule_lte?: InputMaybe; - hatsHatCreatorModule_not?: InputMaybe; - hatsHatCreatorModule_not_contains?: InputMaybe; - hatsHatCreatorModule_not_contains_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsHatCreatorModule_not_ends_with?: InputMaybe; - hatsHatCreatorModule_not_ends_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsHatCreatorModule_not_in?: InputMaybe>; - hatsHatCreatorModule_not_starts_with?: InputMaybe; - hatsHatCreatorModule_not_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsHatCreatorModule_starts_with?: InputMaybe; - hatsHatCreatorModule_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule?: InputMaybe; - hatsTimeFrameModule_?: InputMaybe; - hatsTimeFrameModule_contains?: InputMaybe; - hatsTimeFrameModule_contains_nocase?: InputMaybe; - hatsTimeFrameModule_ends_with?: InputMaybe; - hatsTimeFrameModule_ends_with_nocase?: InputMaybe; - hatsTimeFrameModule_gt?: InputMaybe; - hatsTimeFrameModule_gte?: InputMaybe; - hatsTimeFrameModule_in?: InputMaybe>; - hatsTimeFrameModule_lt?: InputMaybe; - hatsTimeFrameModule_lte?: InputMaybe; - hatsTimeFrameModule_not?: InputMaybe; - hatsTimeFrameModule_not_contains?: InputMaybe; - hatsTimeFrameModule_not_contains_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_not_ends_with?: InputMaybe; - hatsTimeFrameModule_not_ends_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_not_in?: InputMaybe>; - hatsTimeFrameModule_not_starts_with?: InputMaybe; - hatsTimeFrameModule_not_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_starts_with?: InputMaybe; - hatsTimeFrameModule_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatterHatId?: InputMaybe; - hatterHatId_gt?: InputMaybe; - hatterHatId_gte?: InputMaybe; - hatterHatId_in?: InputMaybe>; - hatterHatId_lt?: InputMaybe; - hatterHatId_lte?: InputMaybe; - hatterHatId_not?: InputMaybe; - hatterHatId_not_in?: InputMaybe>; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; + blockNumber?: InputMaybe; + blockNumber_gt?: InputMaybe; + blockNumber_gte?: InputMaybe; + blockNumber_in?: InputMaybe>; + blockNumber_lt?: InputMaybe; + blockNumber_lte?: InputMaybe; + blockNumber_not?: InputMaybe; + blockNumber_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + creator?: InputMaybe; + creatorHatId?: InputMaybe; + creatorHatId_gt?: InputMaybe; + creatorHatId_gte?: InputMaybe; + creatorHatId_in?: InputMaybe>; + creatorHatId_lt?: InputMaybe; + creatorHatId_lte?: InputMaybe; + creatorHatId_not?: InputMaybe; + creatorHatId_not_in?: InputMaybe>; + creator_contains?: InputMaybe; + creator_contains_nocase?: InputMaybe; + creator_ends_with?: InputMaybe; + creator_ends_with_nocase?: InputMaybe; + creator_gt?: InputMaybe; + creator_gte?: InputMaybe; + creator_in?: InputMaybe>; + creator_lt?: InputMaybe; + creator_lte?: InputMaybe; + creator_not?: InputMaybe; + creator_not_contains?: InputMaybe; + creator_not_contains_nocase?: InputMaybe; + creator_not_ends_with?: InputMaybe; + creator_not_ends_with_nocase?: InputMaybe; + creator_not_in?: InputMaybe>; + creator_not_starts_with?: InputMaybe; + creator_not_starts_with_nocase?: InputMaybe; + creator_starts_with?: InputMaybe; + creator_starts_with_nocase?: InputMaybe; + hatsFractionTokenModule?: InputMaybe; + hatsFractionTokenModule_?: InputMaybe; + hatsFractionTokenModule_contains?: InputMaybe; + hatsFractionTokenModule_contains_nocase?: InputMaybe; + hatsFractionTokenModule_ends_with?: InputMaybe; + hatsFractionTokenModule_ends_with_nocase?: InputMaybe; + hatsFractionTokenModule_gt?: InputMaybe; + hatsFractionTokenModule_gte?: InputMaybe; + hatsFractionTokenModule_in?: InputMaybe>; + hatsFractionTokenModule_lt?: InputMaybe; + hatsFractionTokenModule_lte?: InputMaybe; + hatsFractionTokenModule_not?: InputMaybe; + hatsFractionTokenModule_not_contains?: InputMaybe; + hatsFractionTokenModule_not_contains_nocase?: InputMaybe; + hatsFractionTokenModule_not_ends_with?: InputMaybe; + hatsFractionTokenModule_not_ends_with_nocase?: InputMaybe; + hatsFractionTokenModule_not_in?: InputMaybe>; + hatsFractionTokenModule_not_starts_with?: InputMaybe; + hatsFractionTokenModule_not_starts_with_nocase?: InputMaybe; + hatsFractionTokenModule_starts_with?: InputMaybe; + hatsFractionTokenModule_starts_with_nocase?: InputMaybe; + hatsHatCreatorModule?: InputMaybe; + hatsHatCreatorModule_contains?: InputMaybe; + hatsHatCreatorModule_contains_nocase?: InputMaybe; + hatsHatCreatorModule_ends_with?: InputMaybe; + hatsHatCreatorModule_ends_with_nocase?: InputMaybe; + hatsHatCreatorModule_gt?: InputMaybe; + hatsHatCreatorModule_gte?: InputMaybe; + hatsHatCreatorModule_in?: InputMaybe>; + hatsHatCreatorModule_lt?: InputMaybe; + hatsHatCreatorModule_lte?: InputMaybe; + hatsHatCreatorModule_not?: InputMaybe; + hatsHatCreatorModule_not_contains?: InputMaybe; + hatsHatCreatorModule_not_contains_nocase?: InputMaybe; + hatsHatCreatorModule_not_ends_with?: InputMaybe; + hatsHatCreatorModule_not_ends_with_nocase?: InputMaybe; + hatsHatCreatorModule_not_in?: InputMaybe>; + hatsHatCreatorModule_not_starts_with?: InputMaybe; + hatsHatCreatorModule_not_starts_with_nocase?: InputMaybe; + hatsHatCreatorModule_starts_with?: InputMaybe; + hatsHatCreatorModule_starts_with_nocase?: InputMaybe; + hatsTimeFrameModule?: InputMaybe; + hatsTimeFrameModule_contains?: InputMaybe; + hatsTimeFrameModule_contains_nocase?: InputMaybe; + hatsTimeFrameModule_ends_with?: InputMaybe; + hatsTimeFrameModule_ends_with_nocase?: InputMaybe; + hatsTimeFrameModule_gt?: InputMaybe; + hatsTimeFrameModule_gte?: InputMaybe; + hatsTimeFrameModule_in?: InputMaybe>; + hatsTimeFrameModule_lt?: InputMaybe; + hatsTimeFrameModule_lte?: InputMaybe; + hatsTimeFrameModule_not?: InputMaybe; + hatsTimeFrameModule_not_contains?: InputMaybe; + hatsTimeFrameModule_not_contains_nocase?: InputMaybe; + hatsTimeFrameModule_not_ends_with?: InputMaybe; + hatsTimeFrameModule_not_ends_with_nocase?: InputMaybe; + hatsTimeFrameModule_not_in?: InputMaybe>; + hatsTimeFrameModule_not_starts_with?: InputMaybe; + hatsTimeFrameModule_not_starts_with_nocase?: InputMaybe; + hatsTimeFrameModule_starts_with?: InputMaybe; + hatsTimeFrameModule_starts_with_nocase?: InputMaybe; + hatterHatId?: InputMaybe; + hatterHatId_gt?: InputMaybe; + hatterHatId_gte?: InputMaybe; + hatterHatId_in?: InputMaybe>; + hatterHatId_lt?: InputMaybe; + hatterHatId_lte?: InputMaybe; + hatterHatId_not?: InputMaybe; + hatterHatId_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; + minterHatId?: InputMaybe; + minterHatId_gt?: InputMaybe; + minterHatId_gte?: InputMaybe; + minterHatId_in?: InputMaybe>; + minterHatId_lt?: InputMaybe; + minterHatId_lte?: InputMaybe; + minterHatId_not?: InputMaybe; + minterHatId_not_in?: InputMaybe>; + operatorHatId?: InputMaybe; + operatorHatId_gt?: InputMaybe; + operatorHatId_gte?: InputMaybe; + operatorHatId_in?: InputMaybe>; + operatorHatId_lt?: InputMaybe; + operatorHatId_lte?: InputMaybe; + operatorHatId_not?: InputMaybe; + operatorHatId_not_in?: InputMaybe>; or?: InputMaybe>>; - splitCreator?: InputMaybe; - splitCreator_contains?: InputMaybe; - splitCreator_contains_nocase?: InputMaybe; - splitCreator_ends_with?: InputMaybe; - splitCreator_ends_with_nocase?: InputMaybe; - splitCreator_gt?: InputMaybe; - splitCreator_gte?: InputMaybe; - splitCreator_in?: InputMaybe>; - splitCreator_lt?: InputMaybe; - splitCreator_lte?: InputMaybe; - splitCreator_not?: InputMaybe; - splitCreator_not_contains?: InputMaybe; - splitCreator_not_contains_nocase?: InputMaybe; - splitCreator_not_ends_with?: InputMaybe; - splitCreator_not_ends_with_nocase?: InputMaybe; - splitCreator_not_in?: InputMaybe>; - splitCreator_not_starts_with?: InputMaybe; - splitCreator_not_starts_with_nocase?: InputMaybe; - splitCreator_starts_with?: InputMaybe; - splitCreator_starts_with_nocase?: InputMaybe; - topHatId?: InputMaybe; - topHatId_gt?: InputMaybe; - topHatId_gte?: InputMaybe; - topHatId_in?: InputMaybe>; - topHatId_lt?: InputMaybe; - topHatId_lte?: InputMaybe; - topHatId_not?: InputMaybe; - topHatId_not_in?: InputMaybe>; + owner?: InputMaybe; + owner_contains?: InputMaybe; + owner_contains_nocase?: InputMaybe; + owner_ends_with?: InputMaybe; + owner_ends_with_nocase?: InputMaybe; + owner_gt?: InputMaybe; + owner_gte?: InputMaybe; + owner_in?: InputMaybe>; + owner_lt?: InputMaybe; + owner_lte?: InputMaybe; + owner_not?: InputMaybe; + owner_not_contains?: InputMaybe; + owner_not_contains_nocase?: InputMaybe; + owner_not_ends_with?: InputMaybe; + owner_not_ends_with_nocase?: InputMaybe; + owner_not_in?: InputMaybe>; + owner_not_starts_with?: InputMaybe; + owner_not_starts_with_nocase?: InputMaybe; + owner_starts_with?: InputMaybe; + owner_starts_with_nocase?: InputMaybe; + splitCreator?: InputMaybe; + splitCreator_contains?: InputMaybe; + splitCreator_contains_nocase?: InputMaybe; + splitCreator_ends_with?: InputMaybe; + splitCreator_ends_with_nocase?: InputMaybe; + splitCreator_gt?: InputMaybe; + splitCreator_gte?: InputMaybe; + splitCreator_in?: InputMaybe>; + splitCreator_lt?: InputMaybe; + splitCreator_lte?: InputMaybe; + splitCreator_not?: InputMaybe; + splitCreator_not_contains?: InputMaybe; + splitCreator_not_contains_nocase?: InputMaybe; + splitCreator_not_ends_with?: InputMaybe; + splitCreator_not_ends_with_nocase?: InputMaybe; + splitCreator_not_in?: InputMaybe>; + splitCreator_not_starts_with?: InputMaybe; + splitCreator_not_starts_with_nocase?: InputMaybe; + splitCreator_starts_with?: InputMaybe; + splitCreator_starts_with_nocase?: InputMaybe; + thanksToken?: InputMaybe; + thanksToken_?: InputMaybe; + thanksToken_contains?: InputMaybe; + thanksToken_contains_nocase?: InputMaybe; + thanksToken_ends_with?: InputMaybe; + thanksToken_ends_with_nocase?: InputMaybe; + thanksToken_gt?: InputMaybe; + thanksToken_gte?: InputMaybe; + thanksToken_in?: InputMaybe>; + thanksToken_lt?: InputMaybe; + thanksToken_lte?: InputMaybe; + thanksToken_not?: InputMaybe; + thanksToken_not_contains?: InputMaybe; + thanksToken_not_contains_nocase?: InputMaybe; + thanksToken_not_ends_with?: InputMaybe; + thanksToken_not_ends_with_nocase?: InputMaybe; + thanksToken_not_in?: InputMaybe>; + thanksToken_not_starts_with?: InputMaybe; + thanksToken_not_starts_with_nocase?: InputMaybe; + thanksToken_starts_with?: InputMaybe; + thanksToken_starts_with_nocase?: InputMaybe; + topHatId?: InputMaybe; + topHatId_gt?: InputMaybe; + topHatId_gte?: InputMaybe; + topHatId_in?: InputMaybe>; + topHatId_lt?: InputMaybe; + topHatId_lte?: InputMaybe; + topHatId_not?: InputMaybe; + topHatId_not_in?: InputMaybe>; }; export enum Workspace_OrderBy { - BlockNumber = "blockNumber", - BlockTimestamp = "blockTimestamp", - Creator = "creator", - HatsHatCreatorModule = "hatsHatCreatorModule", - HatsHatCreatorModuleId = "hatsHatCreatorModule__id", - HatsHatCreatorModuleWorkspaceId = "hatsHatCreatorModule__workspaceId", - HatsTimeFrameModule = "hatsTimeFrameModule", - HatsTimeFrameModuleId = "hatsTimeFrameModule__id", - HatsTimeFrameModuleWorkspaceId = "hatsTimeFrameModule__workspaceId", - HatterHatId = "hatterHatId", - Id = "id", - SplitCreator = "splitCreator", - TopHatId = "topHatId", + BlockNumber = 'blockNumber', + BlockTimestamp = 'blockTimestamp', + Creator = 'creator', + CreatorHatId = 'creatorHatId', + HatsFractionTokenModule = 'hatsFractionTokenModule', + HatsFractionTokenModuleId = 'hatsFractionTokenModule__id', + HatsFractionTokenModuleWorkspaceId = 'hatsFractionTokenModule__workspaceId', + HatsHatCreatorModule = 'hatsHatCreatorModule', + HatsTimeFrameModule = 'hatsTimeFrameModule', + HatterHatId = 'hatterHatId', + Id = 'id', + MinterHatId = 'minterHatId', + OperatorHatId = 'operatorHatId', + Owner = 'owner', + SplitCreator = 'splitCreator', + ThanksToken = 'thanksToken', + ThanksTokenId = 'thanksToken__id', + ThanksTokenWorkspaceId = 'thanksToken__workspaceId', + TopHatId = 'topHatId' } export type _Block_ = { - __typename?: "_Block_"; + __typename?: '_Block_'; /** The hash of the block */ - hash?: Maybe; + hash?: Maybe; /** The block number */ - number: Scalars["Int"]["output"]; + number: Scalars['Int']['output']; /** The hash of the parent block */ - parentHash?: Maybe; + parentHash?: Maybe; /** Integer representation of the timestamp stored in blocks for the chain */ - timestamp?: Maybe; + timestamp?: Maybe; }; /** The type for the top-level _meta field */ export type _Meta_ = { - __typename?: "_Meta_"; + __typename?: '_Meta_'; /** * Information about a specific subgraph block. The hash of the block * will be null if the _meta field has a block constraint that asks for @@ -1249,654 +1777,54 @@ export type _Meta_ = { */ block: _Block_; /** The deployment ID */ - deployment: Scalars["String"]["output"]; + deployment: Scalars['String']['output']; /** If `true`, the subgraph encountered indexing errors at some past block */ - hasIndexingErrors: Scalars["Boolean"]["output"]; + hasIndexingErrors: Scalars['Boolean']['output']; }; export enum _SubgraphErrorPolicy_ { /** Data will be returned even if the subgraph has indexing errors */ - Allow = "allow", + Allow = 'allow', /** If the subgraph has indexing errors, data will be omitted. The default. */ - Deny = "deny", + Deny = 'deny' } export type GetTransferFractionTokensQueryVariables = Exact<{ where?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; }>; -export type GetTransferFractionTokensQuery = { - __typename?: "Query"; - transferFractionTokens: Array<{ - __typename?: "TransferFractionToken"; - amount: any; - from: string; - to: string; - tokenId: any; - blockNumber: any; - blockTimestamp: any; - hatId?: any | null; - id: string; - wearer?: string | null; - workspaceId?: string | null; - }>; -}; + +export type GetTransferFractionTokensQuery = { __typename?: 'Query', transferFractionTokens: Array<{ __typename?: 'TransferFractionToken', id: string, to: string, tokenId: any, workspaceId: string, from: string, blockTimestamp: any, blockNumber: any, amount: any }> }; export type BalanceOfFractionTokensQueryVariables = Exact<{ where?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; }>; -export type BalanceOfFractionTokensQuery = { - __typename?: "Query"; - balanceOfFractionTokens: Array<{ - __typename?: "BalanceOfFractionToken"; - tokenId: any; - balance: any; - owner: string; - workspaceId?: string | null; - hatId?: any | null; - id: string; - updatedAt: any; - wearer?: string | null; - }>; -}; + +export type BalanceOfFractionTokensQuery = { __typename?: 'Query', balanceOfFractionTokens: Array<{ __typename?: 'BalanceOfFractionToken', tokenId: any, balance: any, owner: string, workspaceId: string, hatId: any, id: string, updatedAt: any, wearer: string }> }; export type GetWorkspacesQueryVariables = Exact<{ where?: InputMaybe; }>; -export type GetWorkspacesQuery = { - __typename?: "Query"; - workspaces: Array<{ - __typename?: "Workspace"; - creator: string; - topHatId: any; - splitCreator: string; - id: string; - hatterHatId: any; - blockTimestamp: any; - blockNumber: any; - hatsTimeFrameModule?: { - __typename?: "HatsTimeFrameModule"; - id: string; - } | null; - hatsHatCreatorModule?: { - __typename?: "HatsHatCreatorModule"; - id: string; - } | null; - }>; -}; + +export type GetWorkspacesQuery = { __typename?: 'Query', workspaces: Array<{ __typename?: 'Workspace', id: string, minterHatId: any, operatorHatId: any, owner: string, splitCreator: string, topHatId: any, hatterHatId: any, hatsTimeFrameModule: string, hatsHatCreatorModule: string, creator: string, creatorHatId: any, blockTimestamp: any, blockNumber: any, hatsFractionTokenModule?: { __typename?: 'HatsFractionTokenModule', id: string } | null, thanksToken: { __typename?: 'ThanksToken', id: string } }> }; export type GetWorkspaceQueryVariables = Exact<{ - workspaceId: Scalars["ID"]["input"]; - hatsHatCreatorModuleAuthority_filter?: InputMaybe; - hatsTimeFrameModuleAuthority_filter?: InputMaybe; + workspaceId: Scalars['ID']['input']; }>; -export type GetWorkspaceQuery = { - __typename?: "Query"; - workspace?: { - __typename?: "Workspace"; - blockNumber: any; - blockTimestamp: any; - creator: string; - hatterHatId: any; - id: string; - splitCreator: string; - topHatId: any; - hatsHatCreatorModule?: { - __typename?: "HatsHatCreatorModule"; - id: string; - authorities: Array<{ - __typename?: "HatsHatCreatorModuleAuthority"; - address: string; - authorised: boolean; - blockNumber: any; - blockTimestamp: any; - id: string; - workspaceId: string; - }>; - } | null; - hatsTimeFrameModule?: { - __typename?: "HatsTimeFrameModule"; - id: string; - authorities: Array<{ - __typename?: "HatsTimeFrameModuleAuthority"; - address: string; - authorised: boolean; - blockNumber: any; - blockTimestamp: any; - id: string; - workspaceId: string; - }>; - } | null; - } | null; -}; - -export const GetTransferFractionTokensDocument = { - kind: "Document", - definitions: [ - { - kind: "OperationDefinition", - operation: "query", - name: { kind: "Name", value: "GetTransferFractionTokens" }, - variableDefinitions: [ - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "TransferFractionToken_filter" }, - }, - defaultValue: { kind: "ObjectValue", fields: [] }, - }, - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "orderBy" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "TransferFractionToken_orderBy" }, - }, - }, - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "orderDirection" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "OrderDirection" }, - }, - defaultValue: { kind: "EnumValue", value: "asc" }, - }, - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "first" }, - }, - type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, - defaultValue: { kind: "IntValue", value: "10" }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "transferFractionTokens" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "where" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - }, - { - kind: "Argument", - name: { kind: "Name", value: "orderBy" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "orderBy" }, - }, - }, - { - kind: "Argument", - name: { kind: "Name", value: "orderDirection" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "orderDirection" }, - }, - }, - { - kind: "Argument", - name: { kind: "Name", value: "first" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "first" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "amount" } }, - { kind: "Field", name: { kind: "Name", value: "from" } }, - { kind: "Field", name: { kind: "Name", value: "to" } }, - { kind: "Field", name: { kind: "Name", value: "tokenId" } }, - { kind: "Field", name: { kind: "Name", value: "blockNumber" } }, - { - kind: "Field", - name: { kind: "Name", value: "blockTimestamp" }, - }, - { kind: "Field", name: { kind: "Name", value: "hatId" } }, - { kind: "Field", name: { kind: "Name", value: "id" } }, - { kind: "Field", name: { kind: "Name", value: "wearer" } }, - { kind: "Field", name: { kind: "Name", value: "workspaceId" } }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode< - GetTransferFractionTokensQuery, - GetTransferFractionTokensQueryVariables ->; -export const BalanceOfFractionTokensDocument = { - kind: "Document", - definitions: [ - { - kind: "OperationDefinition", - operation: "query", - name: { kind: "Name", value: "BalanceOfFractionTokens" }, - variableDefinitions: [ - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "BalanceOfFractionToken_filter" }, - }, - defaultValue: { kind: "ObjectValue", fields: [] }, - }, - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "orderBy" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "BalanceOfFractionToken_orderBy" }, - }, - }, - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "orderDirection" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "OrderDirection" }, - }, - defaultValue: { kind: "EnumValue", value: "asc" }, - }, - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "first" }, - }, - type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, - defaultValue: { kind: "IntValue", value: "100" }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "balanceOfFractionTokens" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "where" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - }, - { - kind: "Argument", - name: { kind: "Name", value: "orderBy" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "orderBy" }, - }, - }, - { - kind: "Argument", - name: { kind: "Name", value: "orderDirection" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "orderDirection" }, - }, - }, - { - kind: "Argument", - name: { kind: "Name", value: "first" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "first" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "tokenId" } }, - { kind: "Field", name: { kind: "Name", value: "balance" } }, - { kind: "Field", name: { kind: "Name", value: "owner" } }, - { kind: "Field", name: { kind: "Name", value: "workspaceId" } }, - { kind: "Field", name: { kind: "Name", value: "hatId" } }, - { kind: "Field", name: { kind: "Name", value: "id" } }, - { kind: "Field", name: { kind: "Name", value: "updatedAt" } }, - { kind: "Field", name: { kind: "Name", value: "wearer" } }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode< - BalanceOfFractionTokensQuery, - BalanceOfFractionTokensQueryVariables ->; -export const GetWorkspacesDocument = { - kind: "Document", - definitions: [ - { - kind: "OperationDefinition", - operation: "query", - name: { kind: "Name", value: "GetWorkspaces" }, - variableDefinitions: [ - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "Workspace_filter" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "workspaces" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "where" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "creator" } }, - { kind: "Field", name: { kind: "Name", value: "topHatId" } }, - { - kind: "Field", - name: { kind: "Name", value: "splitCreator" }, - }, - { kind: "Field", name: { kind: "Name", value: "id" } }, - { kind: "Field", name: { kind: "Name", value: "hatterHatId" } }, - { - kind: "Field", - name: { kind: "Name", value: "hatsTimeFrameModule" }, - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "id" } }, - ], - }, - }, - { - kind: "Field", - name: { kind: "Name", value: "hatsHatCreatorModule" }, - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "id" } }, - ], - }, - }, - { - kind: "Field", - name: { kind: "Name", value: "blockTimestamp" }, - }, - { kind: "Field", name: { kind: "Name", value: "blockNumber" } }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode; -export const GetWorkspaceDocument = { - kind: "Document", - definitions: [ - { - kind: "OperationDefinition", - operation: "query", - name: { kind: "Name", value: "GetWorkspace" }, - variableDefinitions: [ - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "workspaceId" }, - }, - type: { - kind: "NonNullType", - type: { kind: "NamedType", name: { kind: "Name", value: "ID" } }, - }, - }, - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { - kind: "Name", - value: "hatsHatCreatorModuleAuthority_filter", - }, - }, - type: { - kind: "NamedType", - name: { - kind: "Name", - value: "HatsHatCreatorModuleAuthority_filter", - }, - }, - }, - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { - kind: "Name", - value: "hatsTimeFrameModuleAuthority_filter", - }, - }, - type: { - kind: "NamedType", - name: { - kind: "Name", - value: "HatsTimeFrameModuleAuthority_filter", - }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "workspace" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "id" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "workspaceId" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "blockNumber" } }, - { - kind: "Field", - name: { kind: "Name", value: "blockTimestamp" }, - }, - { kind: "Field", name: { kind: "Name", value: "creator" } }, - { kind: "Field", name: { kind: "Name", value: "hatterHatId" } }, - { kind: "Field", name: { kind: "Name", value: "id" } }, - { - kind: "Field", - name: { kind: "Name", value: "splitCreator" }, - }, - { kind: "Field", name: { kind: "Name", value: "topHatId" } }, - { - kind: "Field", - name: { kind: "Name", value: "hatsHatCreatorModule" }, - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "id" } }, - { - kind: "Field", - name: { kind: "Name", value: "authorities" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "where" }, - value: { - kind: "Variable", - name: { - kind: "Name", - value: "hatsHatCreatorModuleAuthority_filter", - }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "address" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "authorised" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "blockNumber" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "blockTimestamp" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "id" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "workspaceId" }, - }, - ], - }, - }, - ], - }, - }, - { - kind: "Field", - name: { kind: "Name", value: "hatsTimeFrameModule" }, - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "id" } }, - { - kind: "Field", - name: { kind: "Name", value: "authorities" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "where" }, - value: { - kind: "Variable", - name: { - kind: "Name", - value: "hatsTimeFrameModuleAuthority_filter", - }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "address" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "authorised" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "blockNumber" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "blockTimestamp" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "id" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "workspaceId" }, - }, - ], - }, - }, - ], - }, - }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode; + +export type GetWorkspaceQuery = { __typename?: 'Query', workspace?: { __typename?: 'Workspace', id: string, minterHatId: any, operatorHatId: any, owner: string, splitCreator: string, topHatId: any, hatterHatId: any, hatsTimeFrameModule: string, hatsHatCreatorModule: string, creator: string, creatorHatId: any, blockTimestamp: any, blockNumber: any, hatsFractionTokenModule?: { __typename?: 'HatsFractionTokenModule', id: string } | null, thanksToken: { __typename?: 'ThanksToken', id: string } } | null }; + + +export const GetTransferFractionTokensDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTransferFractionTokens"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"TransferFractionToken_filter"}},"defaultValue":{"kind":"ObjectValue","fields":[]}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"TransferFractionToken_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderDirection"}},"defaultValue":{"kind":"EnumValue","value":"asc"}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}},"defaultValue":{"kind":"IntValue","value":"10"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"transferFractionTokens"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"to"}},{"kind":"Field","name":{"kind":"Name","value":"tokenId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"blockTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"blockNumber"}},{"kind":"Field","name":{"kind":"Name","value":"amount"}}]}}]}}]} as unknown as DocumentNode; +export const BalanceOfFractionTokensDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"BalanceOfFractionTokens"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"BalanceOfFractionToken_filter"}},"defaultValue":{"kind":"ObjectValue","fields":[]}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"BalanceOfFractionToken_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"OrderDirection"}},"defaultValue":{"kind":"EnumValue","value":"asc"}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}},"defaultValue":{"kind":"IntValue","value":"100"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"balanceOfFractionTokens"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderDirection"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderDirection"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tokenId"}},{"kind":"Field","name":{"kind":"Name","value":"balance"}},{"kind":"Field","name":{"kind":"Name","value":"owner"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"hatId"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"wearer"}}]}}]}}]} as unknown as DocumentNode; +export const GetWorkspacesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspaces"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace_filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaces"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"minterHatId"}},{"kind":"Field","name":{"kind":"Name","value":"operatorHatId"}},{"kind":"Field","name":{"kind":"Name","value":"owner"}},{"kind":"Field","name":{"kind":"Name","value":"splitCreator"}},{"kind":"Field","name":{"kind":"Name","value":"topHatId"}},{"kind":"Field","name":{"kind":"Name","value":"hatterHatId"}},{"kind":"Field","name":{"kind":"Name","value":"hatsTimeFrameModule"}},{"kind":"Field","name":{"kind":"Name","value":"hatsHatCreatorModule"}},{"kind":"Field","name":{"kind":"Name","value":"creator"}},{"kind":"Field","name":{"kind":"Name","value":"creatorHatId"}},{"kind":"Field","name":{"kind":"Name","value":"blockTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"blockNumber"}},{"kind":"Field","name":{"kind":"Name","value":"hatsFractionTokenModule"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thanksToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]} as unknown as DocumentNode; +export const GetWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspace"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"minterHatId"}},{"kind":"Field","name":{"kind":"Name","value":"operatorHatId"}},{"kind":"Field","name":{"kind":"Name","value":"owner"}},{"kind":"Field","name":{"kind":"Name","value":"splitCreator"}},{"kind":"Field","name":{"kind":"Name","value":"topHatId"}},{"kind":"Field","name":{"kind":"Name","value":"hatterHatId"}},{"kind":"Field","name":{"kind":"Name","value":"hatsTimeFrameModule"}},{"kind":"Field","name":{"kind":"Name","value":"hatsHatCreatorModule"}},{"kind":"Field","name":{"kind":"Name","value":"creator"}},{"kind":"Field","name":{"kind":"Name","value":"creatorHatId"}},{"kind":"Field","name":{"kind":"Name","value":"blockTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"blockNumber"}},{"kind":"Field","name":{"kind":"Name","value":"hatsFractionTokenModule"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thanksToken"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/pkgs/frontend/hooks/useFractionToken.ts b/pkgs/frontend/hooks/useFractionToken.ts index a578a849..83512d05 100644 --- a/pkgs/frontend/hooks/useFractionToken.ts +++ b/pkgs/frontend/hooks/useFractionToken.ts @@ -500,16 +500,14 @@ export const useTransferFractionToken = (hatId: bigint, wearer: Address) => { const queryGetTransferFractionTokens = gql(` query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, $orderDirection: OrderDirection = asc, $first: Int = 10) { transferFractionTokens(where: $where, orderBy: $orderBy, orderDirection: $orderDirection, first: $first) { - amount - from + id to tokenId - blockNumber - blockTimestamp - hatId - id - wearer workspaceId + from + blockTimestamp + blockNumber + amount } } `); @@ -519,13 +517,26 @@ export const useGetTransferFractionTokens = (params: { orderBy?: TransferFractionToken_OrderBy; orderDirection?: OrderDirection; first?: number; + // 期間指定パラメータ + dateRange?: { + startDate?: string; + endDate?: string; + }; }) => { const result = useQuery< GetTransferFractionTokensQuery, GetTransferFractionTokensQueryVariables >(queryGetTransferFractionTokens, { variables: { - where: params.where, + where: { + ...params.where, + ...(params.dateRange?.startDate && { + blockTimestamp_gte: params.dateRange.startDate, + }), + ...(params.dateRange?.endDate && { + blockTimestamp_lte: params.dateRange.endDate, + }), + }, orderBy: params.orderBy, orderDirection: params.orderDirection, first: params.first, diff --git a/pkgs/frontend/hooks/useWorkspace.ts b/pkgs/frontend/hooks/useWorkspace.ts index 70a25c55..d3752be9 100644 --- a/pkgs/frontend/hooks/useWorkspace.ts +++ b/pkgs/frontend/hooks/useWorkspace.ts @@ -3,78 +3,66 @@ import { useQuery } from "@apollo/client/react/hooks"; import type { GetWorkspaceQuery, GetWorkspaceQueryVariables, - HatsHatCreatorModuleAuthority_Filter, - HatsTimeFrameModuleAuthority_Filter, } from "gql/graphql"; const queryGetWorkspaces = gql(` query GetWorkspaces($where: Workspace_filter) { workspaces(where: $where) { - creator - topHatId - splitCreator id + minterHatId + operatorHatId + owner + splitCreator + topHatId hatterHatId - hatsTimeFrameModule { + hatsTimeFrameModule + hatsHatCreatorModule + creator + creatorHatId + blockTimestamp + blockNumber + hatsFractionTokenModule { id } - hatsHatCreatorModule { + thanksToken { id } - blockTimestamp - blockNumber } } `); const queryGetWorkspace = gql(` - query GetWorkspace($workspaceId: ID!, $hatsHatCreatorModuleAuthority_filter: HatsHatCreatorModuleAuthority_filter, $hatsTimeFrameModuleAuthority_filter: HatsTimeFrameModuleAuthority_filter) { + query GetWorkspace($workspaceId: ID!) { workspace(id: $workspaceId) { - blockNumber - blockTimestamp - creator - hatterHatId id + minterHatId + operatorHatId + owner splitCreator topHatId - hatsHatCreatorModule { + hatterHatId + hatsTimeFrameModule + hatsHatCreatorModule + creator + creatorHatId + blockTimestamp + blockNumber + hatsFractionTokenModule { id - authorities(where: $hatsHatCreatorModuleAuthority_filter) { - address - authorised - blockNumber - blockTimestamp - id - workspaceId - } } - hatsTimeFrameModule { + thanksToken { id - authorities(where: $hatsTimeFrameModuleAuthority_filter) { - address - authorised - blockNumber - blockTimestamp - id - workspaceId - } } } } `); -export const useGetWorkspace = ( - workspaceId?: string, - hatsHatCreatorModuleAuthority_filter?: HatsHatCreatorModuleAuthority_Filter, - hatsTimeFrameModuleAuthority_filter?: HatsTimeFrameModuleAuthority_Filter, -) => { +export const useGetWorkspace = (workspaceId?: string) => { const result = useQuery( queryGetWorkspace, { variables: { workspaceId: workspaceId ?? "", - hatsHatCreatorModuleAuthority_filter, - hatsTimeFrameModuleAuthority_filter, }, }, ); diff --git a/pkgs/frontend/package.json b/pkgs/frontend/package.json index 7e5bf432..7d869fd7 100644 --- a/pkgs/frontend/package.json +++ b/pkgs/frontend/package.json @@ -34,7 +34,9 @@ "axios": "^1.7.9", "chart.js": "^4.4.8", "chartjs-chart-treemap": "^3.1.0", + "date-fns": "^4.1.0", "dayjs": "^1.11.13", + "dayzed": "^3.2.3", "framer-motion": "^12.5.0", "graphql": "^16.10.0", "isbot": "^5.1.11", @@ -44,6 +46,7 @@ "pinata": "^2.0.1", "react": "^18.3.1", "react-chartjs-2": "^5.3.0", + "react-day-picker": "^9.9.0", "react-dom": "^18.3.1", "react-hook-form": "^7.54.2", "react-icons": "^5.4.0", diff --git a/pkgs/subgraph/abis/BigBang.json b/pkgs/subgraph/abis/BigBang.json index 6579f263..6e23046d 100644 --- a/pkgs/subgraph/abis/BigBang.json +++ b/pkgs/subgraph/abis/BigBang.json @@ -106,6 +106,30 @@ "name": "hatterHatId", "type": "uint256" }, + { + "indexed": false, + "internalType": "uint256", + "name": "memberHatId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "operatorHatId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "creatorHatId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minterHatId", + "type": "uint256" + }, { "indexed": false, "internalType": "address", @@ -118,11 +142,23 @@ "name": "hatsHatCreatorModule", "type": "address" }, + { + "indexed": false, + "internalType": "address", + "name": "hatsFractionTokenModule", + "type": "address" + }, { "indexed": false, "internalType": "address", "name": "splitCreator", "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "thanksToken", + "type": "address" } ], "name": "Executed", @@ -175,10 +211,10 @@ }, { "inputs": [], - "name": "FractionToken", + "name": "Hats", "outputs": [ { - "internalType": "address", + "internalType": "contract IHats", "name": "", "type": "address" } @@ -188,10 +224,10 @@ }, { "inputs": [], - "name": "Hats", + "name": "HatsFractionTokenModule_IMPL", "outputs": [ { - "internalType": "contract IHats", + "internalType": "address", "name": "", "type": "address" } @@ -264,6 +300,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "ThanksTokenFactory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "UPGRADE_INTERFACE_VERSION", @@ -303,6 +352,16 @@ "internalType": "string", "name": "_hatterHatImageURI", "type": "string" + }, + { + "internalType": "string", + "name": "_memberHatDetails", + "type": "string" + }, + { + "internalType": "string", + "name": "_memberHatImageURI", + "type": "string" } ], "name": "bigbang", @@ -343,6 +402,11 @@ "name": "_hatsHatCreatorModule_IMPL", "type": "address" }, + { + "internalType": "address", + "name": "_hatsFractionTokenModule_IMPL", + "type": "address" + }, { "internalType": "address", "name": "_splitsCreatorFactory", @@ -355,7 +419,7 @@ }, { "internalType": "address", - "name": "_fractionToken", + "name": "_thanksTokenFactory", "type": "address" } ], @@ -401,11 +465,11 @@ "inputs": [ { "internalType": "address", - "name": "_fractionToken", + "name": "_hats", "type": "address" } ], - "name": "setFractionToken", + "name": "setHats", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -414,11 +478,11 @@ "inputs": [ { "internalType": "address", - "name": "_hats", + "name": "_hatsFractionTokenModuleImpl", "type": "address" } ], - "name": "setHats", + "name": "setHatsFractionTokenModuleImpl", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -488,6 +552,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_thanksTokenFactory", + "type": "address" + } + ], + "name": "setThanksTokenFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { diff --git a/pkgs/subgraph/abis/FractionToken.json b/pkgs/subgraph/abis/HatsFractionTokenModule.json similarity index 81% rename from pkgs/subgraph/abis/FractionToken.json rename to pkgs/subgraph/abis/HatsFractionTokenModule.json index b88b19d2..36bc9f9a 100644 --- a/pkgs/subgraph/abis/FractionToken.json +++ b/pkgs/subgraph/abis/HatsFractionTokenModule.json @@ -2,12 +2,27 @@ { "inputs": [ { - "internalType": "address", - "name": "target", - "type": "address" + "internalType": "string", + "name": "_version", + "type": "string" } ], - "name": "AddressEmptyCode", + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ArrayLengthMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotHatAdminOrWearer", + "type": "error" + }, + { + "inputs": [], + "name": "CannotTransferAllTokens", "type": "error" }, { @@ -113,24 +128,18 @@ "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "ERC1967InvalidImplementation", + "inputs": [], + "name": "HatIdMustBeTopHat", "type": "error" }, { "inputs": [], - "name": "ERC1967NonPayable", + "name": "InitialSupplyNotMinted", "type": "error" }, { "inputs": [], - "name": "FailedCall", + "name": "InvalidHatIdForDomain", "type": "error" }, { @@ -144,42 +153,50 @@ "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", + "inputs": [], + "name": "TokenAlreadyMinted", "type": "error" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", + "inputs": [], + "name": "TokenSupplyExceedsMax", "type": "error" }, { "inputs": [], - "name": "UUPSUnauthorizedCallContext", + "name": "WearerDoesNotHaveHat", "type": "error" }, { + "anonymous": false, "inputs": [ { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" + "indexed": true, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "wearer", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "UUPSUnsupportedProxiableUUID", - "type": "error" + "name": "AdditionalMint", + "type": "event" }, { "anonymous": false, @@ -209,6 +226,12 @@ { "anonymous": false, "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + }, { "indexed": true, "internalType": "address", @@ -218,13 +241,13 @@ { "indexed": true, "internalType": "uint256", - "name": "hatId", + "name": "tokenId", "type": "uint256" }, { - "indexed": true, + "indexed": false, "internalType": "uint256", - "name": "tokenId", + "name": "amount", "type": "uint256" } ], @@ -244,23 +267,54 @@ "name": "Initialized", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldSupply", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newSupply", + "type": "uint256" + } + ], + "name": "TokenSupplyUpdated", + "type": "event" + }, { "anonymous": false, "inputs": [ { "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" + "internalType": "uint256", + "name": "hatId", + "type": "uint256" }, { "indexed": true, "internalType": "address", - "name": "newOwner", + "name": "wearer", "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "OwnershipTransferred", + "name": "TokensBurned", "type": "event" }, { @@ -357,39 +411,52 @@ "type": "event" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "DEFAULT_TOKEN_SUPPLY", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "implementation", + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "HATS", + "outputs": [ + { + "internalType": "contract IHats", + "name": "", "type": "address" } ], - "name": "Upgraded", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { "inputs": [], - "name": "TOKEN_SUPPLY", + "name": "IMPLEMENTATION", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { "inputs": [], - "name": "UPGRADE_INTERFACE_VERSION", + "name": "MAX_SUPPLY_PER_ROLE_USER", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "stateMutability": "view", @@ -423,17 +490,17 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "_account", "type": "address" }, { "internalType": "address", - "name": "wearer", + "name": "_wearer", "type": "address" }, { "internalType": "uint256", - "name": "hatId", + "name": "_hatId", "type": "uint256" } ], @@ -452,17 +519,17 @@ "inputs": [ { "internalType": "address[]", - "name": "accounts", + "name": "_accounts", "type": "address[]" }, { "internalType": "address[]", - "name": "wearers", + "name": "_wearers", "type": "address[]" }, { "internalType": "uint256[]", - "name": "hatIds", + "name": "_hatIds", "type": "uint256[]" } ], @@ -504,23 +571,46 @@ { "inputs": [ { - "internalType": "address", - "name": "from", - "type": "address" + "internalType": "uint256[]", + "name": "_hatIds", + "type": "uint256[]" }, { - "internalType": "address", - "name": "wearer", - "type": "address" + "internalType": "address[]", + "name": "_wearers", + "type": "address[]" }, + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "batchMintInitialSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "hatId", + "name": "_hatId", "type": "uint256" }, + { + "internalType": "address", + "name": "_wearer", + "type": "address" + }, + { + "internalType": "address", + "name": "_target", + "type": "address" + }, { "internalType": "uint256", - "name": "value", + "name": "_amount", "type": "uint256" } ], @@ -548,16 +638,29 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "getDomain", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { "internalType": "uint256", - "name": "hatId", + "name": "_hatId", "type": "uint256" }, { "internalType": "address", - "name": "account", + "name": "_wearer", "type": "address" } ], @@ -592,31 +695,16 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "_initialOwner", - "type": "address" - }, + "inputs": [], + "name": "hatId", + "outputs": [ { "internalType": "uint256", - "name": "_tokenSupply", + "name": "", "type": "uint256" - }, - { - "internalType": "address", - "name": "_hatsAddress", - "type": "address" - }, - { - "internalType": "string", - "name": "_uri", - "type": "string" } ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { @@ -647,17 +735,17 @@ "inputs": [ { "internalType": "uint256", - "name": "hatId", + "name": "_hatId", "type": "uint256" }, { "internalType": "address", - "name": "account", + "name": "_wearer", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], @@ -670,17 +758,17 @@ "inputs": [ { "internalType": "uint256", - "name": "hatId", + "name": "_hatId", "type": "uint256" }, { "internalType": "address", - "name": "account", + "name": "_wearer", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], @@ -689,83 +777,31 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" - } - ], - "name": "multicall", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { "internalType": "address", - "name": "from", + "name": "_from", "type": "address" }, { "internalType": "address", - "name": "to", + "name": "_to", "type": "address" }, { "internalType": "uint256[]", - "name": "tokenIds", + "name": "_ids", "type": "uint256[]" }, { "internalType": "uint256[]", - "name": "amounts", + "name": "_amounts", "type": "uint256[]" }, { "internalType": "bytes", - "name": "data", + "name": "_data", "type": "bytes" } ], @@ -778,27 +814,27 @@ "inputs": [ { "internalType": "address", - "name": "from", + "name": "_from", "type": "address" }, { "internalType": "address", - "name": "to", + "name": "_to", "type": "address" }, { "internalType": "uint256", - "name": "tokenId", + "name": "_id", "type": "uint256" }, { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" }, { "internalType": "bytes", - "name": "data", + "name": "_data", "type": "bytes" } ], @@ -825,6 +861,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_initData", + "type": "bytes" + } + ], + "name": "setUp", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -861,12 +910,12 @@ "inputs": [ { "internalType": "address", - "name": "wearer", + "name": "_wearer", "type": "address" }, { "internalType": "uint256", - "name": "hatId", + "name": "_hatId", "type": "uint256" } ], @@ -903,43 +952,38 @@ { "inputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, + "name": "uri", + "outputs": [ { - "internalType": "bytes", - "name": "data", - "type": "bytes" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "upgradeToAndCall", - "outputs": [], - "stateMutability": "payable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "version", + "outputs": [ { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "uri", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "version_", "outputs": [ { "internalType": "string", diff --git a/pkgs/subgraph/abis/HatsHatCreatorModule.json b/pkgs/subgraph/abis/HatsHatCreatorModule.json deleted file mode 100644 index 89cb7017..00000000 --- a/pkgs/subgraph/abis/HatsHatCreatorModule.json +++ /dev/null @@ -1,332 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "_version", - "type": "string" - }, - { - "internalType": "address", - "name": "_tmpOwner", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "authority", - "type": "address" - } - ], - "name": "CreateHatAuthorityGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "authority", - "type": "address" - } - ], - "name": "CreateHatAuthorityRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "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" - }, - { - "inputs": [], - "name": "HATS", - "outputs": [ - { - "internalType": "contract IHats", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "IMPLEMENTATION", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_admin", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_details", - "type": "string" - }, - { - "internalType": "uint32", - "name": "_maxSupply", - "type": "uint32" - }, - { - "internalType": "address", - "name": "_eligibility", - "type": "address" - }, - { - "internalType": "address", - "name": "_toggle", - "type": "address" - }, - { - "internalType": "bool", - "name": "_mutable", - "type": "bool" - }, - { - "internalType": "string", - "name": "_imageURI", - "type": "string" - } - ], - "name": "createHat", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "createHatAuthorities", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authority", - "type": "address" - } - ], - "name": "grantCreateHatAuthority", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authority", - "type": "address" - } - ], - "name": "hasCreateHatAuthority", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "hatId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "authority", - "type": "address" - } - ], - "name": "revokeCreateHatAuthority", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_initData", - "type": "bytes" - } - ], - "name": "setUp", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version_", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/pkgs/subgraph/abis/HatsTimeFrameModule.json b/pkgs/subgraph/abis/ThanksToken.json similarity index 66% rename from pkgs/subgraph/abis/HatsTimeFrameModule.json rename to pkgs/subgraph/abis/ThanksToken.json index 51e4075d..6f4c36a7 100644 --- a/pkgs/subgraph/abis/HatsTimeFrameModule.json +++ b/pkgs/subgraph/abis/ThanksToken.json @@ -1,94 +1,113 @@ [ { "inputs": [ - { - "internalType": "string", - "name": "_version", - "type": "string" - }, { "internalType": "address", - "name": "_tmpOwner", + "name": "spender", "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" } ], - "stateMutability": "nonpayable", - "type": "constructor" + "name": "ERC20InsufficientAllowance", + "type": "error" }, { - "inputs": [], - "name": "InvalidInitialization", + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", "type": "error" }, { - "inputs": [], - "name": "NotInitializing", + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", "type": "error" }, { "inputs": [ { "internalType": "address", - "name": "owner", + "name": "receiver", "type": "address" } ], - "name": "OwnableInvalidOwner", + "name": "ERC20InvalidReceiver", "type": "error" }, { "inputs": [ { "internalType": "address", - "name": "account", + "name": "sender", "type": "address" } ], - "name": "OwnableUnauthorizedAccount", + "name": "ERC20InvalidSender", "type": "error" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "uint256", - "name": "hatId", - "type": "uint256" - }, - { - "indexed": true, "internalType": "address", - "name": "wearer", + "name": "spender", "type": "address" } ], - "name": "HatDeactivated", - "type": "event" + "name": "ERC20InvalidSpender", + "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, - "internalType": "uint256", - "name": "hatId", - "type": "uint256" + "internalType": "address", + "name": "owner", + "type": "address" }, { "indexed": true, "internalType": "address", - "name": "wearer", + "name": "spender", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "timestamp", + "name": "value", "type": "uint256" } ], - "name": "HatMinted", + "name": "Approval", "type": "event" }, { @@ -96,18 +115,24 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", - "name": "hatId", - "type": "uint256" + "internalType": "address", + "name": "from", + "type": "address" }, { "indexed": true, "internalType": "address", - "name": "wearer", + "name": "to", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "HatReactivated", + "name": "TokenMinted", "type": "event" }, { @@ -115,86 +140,86 @@ "inputs": [ { "indexed": true, - "internalType": "uint256", - "name": "hatId", - "type": "uint256" + "internalType": "address", + "name": "from", + "type": "address" }, { "indexed": true, "internalType": "address", - "name": "wearer", + "name": "to", "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "HatRenounced", + "name": "Transfer", "type": "event" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "DEFAULT_COEFFICIENT", + "outputs": [ { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "Initialized", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "FRACTION_TOKEN", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "authority", + "internalType": "contract IHatsFractionTokenModule", + "name": "", "type": "address" } ], - "name": "OperationAuthorityGranted", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "HATS", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "authority", + "internalType": "contract IHats", + "name": "", "type": "address" } ], - "name": "OperationAuthorityRevoked", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, + "inputs": [], + "name": "HATS_TIME_FRAME_MODULE", + "outputs": [ { - "indexed": true, - "internalType": "address", - "name": "newOwner", + "internalType": "contract IHatsTimeFrameModule", + "name": "", "type": "address" } ], - "name": "OwnershipTransferred", - "type": "event" + "stateMutability": "pure", + "type": "function" }, { "inputs": [], - "name": "HATS", + "name": "NAME", "outputs": [ { - "internalType": "contract IHats", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "pure", @@ -202,49 +227,39 @@ }, { "inputs": [], - "name": "IMPLEMENTATION", + "name": "SYMBOL", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "pure", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "hatId", - "type": "uint256" - }, + "inputs": [], + "name": "WORKSPACE_OWNER", + "outputs": [ { "internalType": "address", - "name": "wearer", + "name": "", "type": "address" } ], - "name": "deactivate", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, { "internalType": "address", - "name": "", + "name": "owner", "type": "address" } ], - "name": "deactivatedTime", + "name": "addressCoefficient", "outputs": [ { "internalType": "uint256", @@ -259,16 +274,16 @@ "inputs": [ { "internalType": "address", - "name": "wearer", + "name": "owner", "type": "address" }, { - "internalType": "uint256", - "name": "hatId", - "type": "uint256" + "internalType": "address", + "name": "spender", + "type": "address" } ], - "name": "getWearingElapsedTime", + "name": "allowance", "outputs": [ { "internalType": "uint256", @@ -283,53 +298,53 @@ "inputs": [ { "internalType": "address", - "name": "wearer", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "hatId", + "name": "value", "type": "uint256" } ], - "name": "getWoreTime", + "name": "approve", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "authority", + "name": "account", "type": "address" } ], - "name": "grantOperationAuthority", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "balanceOf", + "outputs": [ { - "internalType": "address", - "name": "authority", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "hasOperationAuthority", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", "outputs": [ { - "internalType": "bool", + "internalType": "uint8", "name": "", - "type": "bool" + "type": "uint8" } ], "stateMutability": "view", @@ -337,7 +352,7 @@ }, { "inputs": [], - "name": "hatId", + "name": "defaultCoefficient", "outputs": [ { "internalType": "uint256", @@ -348,20 +363,50 @@ "stateMutability": "pure", "type": "function" }, + { + "inputs": [], + "name": "getParticipants", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" }, { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isActive", + "components": [ + { + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "wearer", + "type": "address" + } + ], + "internalType": "struct IThanksToken.RelatedRole[]", + "name": "relatedRoles", + "type": "tuple[]" + } + ], + "name": "mint", "outputs": [ { "internalType": "bool", @@ -369,46 +414,59 @@ "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "hatId", - "type": "uint256" - }, { "internalType": "address", - "name": "wearer", + "name": "owner", "type": "address" }, + { + "components": [ + { + "internalType": "uint256", + "name": "hatId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "wearer", + "type": "address" + } + ], + "internalType": "struct IThanksToken.RelatedRole[]", + "name": "relatedRoles", + "type": "tuple[]" + } + ], + "name": "mintableAmount", + "outputs": [ { "internalType": "uint256", - "name": "time", + "name": "", "type": "uint256" } ], - "name": "mintHat", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "", + "name": "owner", "type": "address" } ], - "name": "operationAuthorities", + "name": "mintedAmount", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -416,56 +474,31 @@ }, { "inputs": [], - "name": "owner", + "name": "name", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], - "stateMutability": "view", + "stateMutability": "pure", "type": "function" }, { "inputs": [ - { - "internalType": "uint256", - "name": "hatId", - "type": "uint256" - }, { "internalType": "address", - "name": "wearer", + "name": "userAddress", "type": "address" - } - ], - "name": "reactivate", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "uint256", - "name": "hatId", + "name": "coefficient", "type": "uint256" - }, - { - "internalType": "address", - "name": "wearer", - "type": "address" } ], - "name": "renounce", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", + "name": "setAddressCoefficient", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -473,43 +506,37 @@ { "inputs": [ { - "internalType": "address", - "name": "authority", - "type": "address" + "internalType": "address[]", + "name": "userAddresses", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "coefficients", + "type": "uint256[]" } ], - "name": "revokeOperationAuthority", + "name": "setAddressCoefficients", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "symbol", + "outputs": [ { - "internalType": "bytes", - "name": "_initData", - "type": "bytes" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "setUp", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "pure", "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "totalActiveTime", + "inputs": [], + "name": "totalSupply", "outputs": [ { "internalType": "uint256", @@ -524,63 +551,53 @@ "inputs": [ { "internalType": "address", - "name": "newOwner", + "name": "to", "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "version", - "outputs": [ + }, { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "version_", + "name": "transfer", "outputs": [ { - "internalType": "string", + "internalType": "bool", "name": "", - "type": "string" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "", - "type": "uint256" + "internalType": "address", + "name": "from", + "type": "address" }, { "internalType": "address", - "name": "", + "name": "to", "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" } ], - "name": "woreTime", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" } ] diff --git a/pkgs/subgraph/config/base.json b/pkgs/subgraph/config/base.json index a156a130..2302388b 100644 --- a/pkgs/subgraph/config/base.json +++ b/pkgs/subgraph/config/base.json @@ -9,60 +9,40 @@ "entities": [{ "name": "Executed" }], "handlers": [ { - "event": "Executed(indexed address,indexed address,indexed uint256,uint256,address,address,address)", + "event": "Executed(indexed address,indexed address,indexed uint256,uint256,uint256,uint256,uint256,address,address,address,address,address)", "handler": "handleExecuted" } ] }, { - "address": "0xBe3eC807B3062bfbADDa16c05C060d223F727fa3", - "file": "FractionToken", - "mappingFile": "fractionTokenMapping", - "entities": [{ "name": "InitialMint" }, { "name": "TransferSignle" }], + "address": "", + "file": "ThanksToken", + "mappingFile": "thanksTokenMapping", + "entities": [{ "name": "TokenMinted" }, { "name": "Transfer" }], "handlers": [ { - "event": "InitialMint(indexed address,indexed uint256,indexed uint256)", - "handler": "handleInitialMint" + "event": "TokenMinted(indexed address,uint256,uint256)", + "handler": "handleTokenMinted" }, { - "event": "TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)", - "handler": "handleTransferSingle" + "event": "Transfer(indexed address,indexed address,uint256)", + "handler": "handleTransfer" } ] } ], "hatsModuleContracts": [ { - "file": "HatsHatCreatorModule", - "entities": [ - { "name": "CreateHatAuthorityGranted" }, - { "name": "CreateHatAuthorityRevoked" } - ], - "handlers": [ - { - "event": "CreateHatAuthorityGranted(indexed address)", - "handler": "handleCreateHatAuthorityGranted" - }, - { - "event": "CreateHatAuthorityRevoked(indexed address)", - "handler": "handleCreateHatAuthorityRevoked" - } - ] - }, - { - "file": "HatsTimeFrameModule", - "entities": [ - { "name": "OperationAuthorityGranted" }, - { "name": "OperationAuthorityRevoked" } - ], + "file": "HatsFractionTokenModule", + "entities": [{ "name": "InitialMint" }, { "name": "TransferSignle" }], "handlers": [ { - "event": "OperationAuthorityGranted(indexed address)", - "handler": "handleOperationAuthorityGranted" + "event": "InitialMint(indexed address,indexed uint256,indexed uint256)", + "handler": "handleInitialMint" }, { - "event": "OperationAuthorityRevoked(indexed address)", - "handler": "handleOperationAuthorityRevoked" + "event": "TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)", + "handler": "handleTransferSingle" } ] } diff --git a/pkgs/subgraph/config/sepolia.json b/pkgs/subgraph/config/sepolia.json index 4cd82284..6b13dcd9 100644 --- a/pkgs/subgraph/config/sepolia.json +++ b/pkgs/subgraph/config/sepolia.json @@ -1,68 +1,48 @@ { "network": "sepolia", - "startBlock": 7578217, + "startBlock": 9010696, "contracts": [ { - "address": "0x2662b0Dc151bbD9C0e5F1b5bD8674b4eD3E92D0b", + "address": "0xa60689d4D4d49A587E4eAD4B3C2b8542C56BE10F", "file": "BigBang", "mappingFile": "bigbangMapping", "entities": [{ "name": "Executed" }], "handlers": [ { - "event": "Executed(indexed address,indexed address,indexed uint256,uint256,address,address,address)", + "event": "Executed(indexed address,indexed address,indexed uint256,uint256,uint256,uint256,uint256,uint256,address,address,address,address,address)", "handler": "handleExecuted" } ] - }, - { - "address": "0xd6031f9543bEB0963e32CA2AC474de69D0515059", - "file": "FractionToken", - "mappingFile": "fractionTokenMapping", - "entities": [{ "name": "InitialMint" }, { "name": "TransferSignle" }], - "handlers": [ - { - "event": "InitialMint(indexed address,indexed uint256,indexed uint256)", - "handler": "handleInitialMint" - }, - { - "event": "TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)", - "handler": "handleTransferSingle" - } - ] } ], - "hatsModuleContracts": [ + "templatesContracts": [ { - "file": "HatsHatCreatorModule", - "entities": [ - { "name": "CreateHatAuthorityGranted" }, - { "name": "CreateHatAuthorityRevoked" } - ], + "file": "HatsFractionTokenModule", + "mappingFile": "hatsModuleMapping", + "entities": [{ "name": "InitialMint" }, { "name": "TransferSignle" }], "handlers": [ { - "event": "CreateHatAuthorityGranted(indexed address)", - "handler": "handleCreateHatAuthorityGranted" + "event": "InitialMint(indexed uint256,indexed address,indexed uint256,uint256)", + "handler": "handleRoleShareInitialMint" }, { - "event": "CreateHatAuthorityRevoked(indexed address)", - "handler": "handleCreateHatAuthorityRevoked" + "event": "TransferSingle(indexed address,indexed address,indexed address,uint256,uint256)", + "handler": "handleRoleShareTransferSingle" } ] }, { - "file": "HatsTimeFrameModule", - "entities": [ - { "name": "OperationAuthorityGranted" }, - { "name": "OperationAuthorityRevoked" } - ], + "file": "ThanksToken", + "mappingFile": "thanksTokenMapping", + "entities": [{ "name": "TokenMinted" }, { "name": "Transfer" }], "handlers": [ { - "event": "OperationAuthorityGranted(indexed address)", - "handler": "handleOperationAuthorityGranted" + "event": "TokenMinted(indexed address,indexed address,uint256)", + "handler": "handleTokenMinted" }, { - "event": "OperationAuthorityRevoked(indexed address)", - "handler": "handleOperationAuthorityRevoked" + "event": "Transfer(indexed address,indexed address,uint256)", + "handler": "handleTransfer" } ] } diff --git a/pkgs/subgraph/package.json b/pkgs/subgraph/package.json index b6b2f3a9..ef0adee7 100644 --- a/pkgs/subgraph/package.json +++ b/pkgs/subgraph/package.json @@ -9,9 +9,9 @@ "codegen": "graph codegen", "build": "graph build", "prepare:sepolia": "mustache config/sepolia.json subgraph.template.yaml > subgraph.yaml", - "deploy:sepolia": "goldsky subgraph deploy toban-sepolia/1.0.2 --path .", - "update:sepolia": "goldsky subgraph update toban-sepolia/1.0.1", - "delete:sepolia": "goldsky subgraph delete toban-sepolia/1.0.1", + "deploy:sepolia": "goldsky subgraph deploy toban-sepolia/1.0.3 --path .", + "update:sepolia": "goldsky subgraph update toban-sepolia/1.0.2", + "delete:sepolia": "goldsky subgraph delete toban-sepolia/1.0.2", "prepare:base": "mustache config/base.json subgraph.template.yaml > subgraph.yaml", "deploy:base": "goldsky subgraph deploy toban-base/0.0.0 --path .", "update:base": "goldsky subgraph update toban-base/0.0.0", diff --git a/pkgs/subgraph/schema.graphql b/pkgs/subgraph/schema.graphql index ff8d44d4..178bc3ed 100644 --- a/pkgs/subgraph/schema.graphql +++ b/pkgs/subgraph/schema.graphql @@ -1,78 +1,112 @@ type Workspace @entity { id: ID! creator: String! + owner: String! topHatId: BigInt! hatterHatId: BigInt! - hatsTimeFrameModule: HatsTimeFrameModule - hatsHatCreatorModule: HatsHatCreatorModule + operatorHatId: BigInt! + creatorHatId: BigInt! + minterHatId: BigInt! + hatsTimeFrameModule: String! + hatsHatCreatorModule: String! + hatsFractionTokenModule: HatsFractionTokenModule + thanksToken: ThanksToken! splitCreator: String! blockTimestamp: BigInt! blockNumber: BigInt! } -type HatsTimeFrameModule @entity { +type HatsFractionTokenModule @entity { id: ID! workspaceId: ID! - authorities: [HatsTimeFrameModuleAuthority!]! - @derivedFrom(field: "hatsTimeFrameModule") + initializedTokens: [InitializedFractionToken!]! + @derivedFrom(field: "hatsFractionTokenModule") + transfers: [TransferFractionToken!]! + @derivedFrom(field: "hatsFractionTokenModule") + balances: [BalanceOfFractionToken!]! + @derivedFrom(field: "hatsFractionTokenModule") } -type HatsTimeFrameModuleAuthority @entity { +type InitializedFractionToken @entity { id: ID! + hatsFractionTokenModule: HatsFractionTokenModule! + tokenId: BigInt! + hatId: BigInt! + wearer: String! workspaceId: ID! - hatsTimeFrameModule: HatsTimeFrameModule! - address: String! - authorised: Boolean! blockTimestamp: BigInt! blockNumber: BigInt! } -type HatsHatCreatorModule @entity { +type TransferFractionToken @entity { id: ID! + hatsFractionTokenModule: HatsFractionTokenModule! + from: String! + to: String! + tokenId: BigInt! + amount: BigInt! workspaceId: ID! - authorities: [HatsHatCreatorModuleAuthority!]! - @derivedFrom(field: "hatsHatCreatorModule") + blockTimestamp: BigInt! + blockNumber: BigInt! } -type HatsHatCreatorModuleAuthority @entity { +type BalanceOfFractionToken @entity { id: ID! + hatsFractionTokenModule: HatsFractionTokenModule! + owner: String! + tokenId: BigInt! + balance: BigInt! workspaceId: ID! - hatsHatCreatorModule: HatsHatCreatorModule! - address: String! - authorised: Boolean! - blockTimestamp: BigInt! - blockNumber: BigInt! + hatId: BigInt! + wearer: String! + updatedAt: BigInt! } -type InitializedFractionToken @entity { +type ThanksToken @entity { id: ID! workspaceId: ID! - wearer: String! - hatId: BigInt! + mints: [MintThanksToken!]! @derivedFrom(field: "thanksToken") + transfers: [TransferThanksToken!]! @derivedFrom(field: "thanksToken") + mintAmounts: [AmountOfMintThanksToken!]! @derivedFrom(field: "thanksToken") + balances: [BalanceOfThanksToken!]! @derivedFrom(field: "thanksToken") +} + +type MintThanksToken @entity { + id: ID! + thanksToken: ThanksToken! + from: String! + to: String! + amount: BigInt! + workspaceId: ID! blockTimestamp: BigInt! blockNumber: BigInt! } -type TransferFractionToken @entity { +type TransferThanksToken @entity { id: ID! + thanksToken: ThanksToken! from: String! to: String! - tokenId: BigInt! amount: BigInt! - workspaceId: ID - hatId: BigInt - wearer: String + workspaceId: ID! blockTimestamp: BigInt! blockNumber: BigInt! } -type BalanceOfFractionToken @entity { +type AmountOfMintThanksToken @entity { + id: ID! + thanksToken: ThanksToken! + sender: String! + amount: BigInt! + workspaceId: ID! + updatedAt: BigInt! +} + +type BalanceOfThanksToken @entity { id: ID! + thanksToken: ThanksToken! owner: String! - tokenId: BigInt! balance: BigInt! - workspaceId: ID - hatId: BigInt - wearer: String + workspaceId: ID! updatedAt: BigInt! } diff --git a/pkgs/subgraph/src/bigbangMapping.ts b/pkgs/subgraph/src/bigbangMapping.ts index f39aa480..c284ba1a 100644 --- a/pkgs/subgraph/src/bigbangMapping.ts +++ b/pkgs/subgraph/src/bigbangMapping.ts @@ -1,13 +1,9 @@ import { Executed } from "../generated/BigBang/BigBang"; import { - HatsHatCreatorModule, - HatsTimeFrameModule, + HatsFractionTokenModule, + ThanksToken, Workspace, } from "../generated/schema"; -import { - HatsHatCreatorModule as HatsHatCreatorModuleTemplate, - HatsTimeFrameModule as HatsTimeFrameModuleTemplate, -} from "../generated/templates"; import { hatIdToTreeId } from "./helper/hat"; export function handleExecuted(ev: Executed): void { @@ -16,30 +12,29 @@ export function handleExecuted(ev: Executed): void { workspace.topHatId = ev.params.topHatId; workspace.creator = ev.params.creator.toHex(); + workspace.owner = ev.params.owner.toHex(); workspace.topHatId = ev.params.topHatId; workspace.hatterHatId = ev.params.hatterHatId; + workspace.operatorHatId = ev.params.operatorHatId; + workspace.creatorHatId = ev.params.creatorHatId; + workspace.minterHatId = ev.params.minterHatId; workspace.hatsTimeFrameModule = ev.params.hatsTimeFrameModule.toHex(); workspace.hatsHatCreatorModule = ev.params.hatsHatCreatorModule.toHex(); + workspace.hatsFractionTokenModule = ev.params.hatsFractionTokenModule.toHex(); + workspace.thanksToken = ev.params.thanksToken.toHex(); workspace.splitCreator = ev.params.splitCreator.toHex(); workspace.blockTimestamp = ev.block.timestamp; workspace.blockNumber = ev.block.number; workspace.save(); - // Create new index from template for HatsModules - const newHatsHatCreatorModule = new HatsHatCreatorModule( - ev.params.hatsHatCreatorModule.toHex(), - ); - newHatsHatCreatorModule.workspaceId = treeId; - newHatsHatCreatorModule.save(); - - HatsHatCreatorModuleTemplate.create(ev.params.hatsHatCreatorModule); - - const newHatsTimeFrameModule = new HatsTimeFrameModule( - ev.params.hatsTimeFrameModule.toHex(), + const newHatsFractionTokenModule = new HatsFractionTokenModule( + ev.params.hatsFractionTokenModule.toHex(), ); - newHatsTimeFrameModule.workspaceId = treeId; - newHatsTimeFrameModule.save(); + newHatsFractionTokenModule.workspaceId = treeId; + newHatsFractionTokenModule.save(); - HatsTimeFrameModuleTemplate.create(ev.params.hatsTimeFrameModule); + const newThanksToken = new ThanksToken(ev.params.thanksToken.toHex()); + newThanksToken.workspaceId = treeId; + newThanksToken.save(); } diff --git a/pkgs/subgraph/src/hatsModuleMapping.ts b/pkgs/subgraph/src/hatsModuleMapping.ts index e201ec2d..9cb714b1 100644 --- a/pkgs/subgraph/src/hatsModuleMapping.ts +++ b/pkgs/subgraph/src/hatsModuleMapping.ts @@ -1,126 +1,110 @@ +import { Address, BigInt as GraphBigInt } from "@graphprotocol/graph-ts"; import { - HatsHatCreatorModule, - HatsHatCreatorModuleAuthority, - HatsTimeFrameModule, - HatsTimeFrameModuleAuthority, + BalanceOfFractionToken, + HatsFractionTokenModule, + InitializedFractionToken, + TransferFractionToken, } from "../generated/schema"; import { - CreateHatAuthorityGranted, - CreateHatAuthorityRevoked, -} from "../generated/templates/HatsHatCreatorModule/HatsHatCreatorModule"; -import { - OperationAuthorityGranted, - OperationAuthorityRevoked, -} from "../generated/templates/HatsTimeFrameModule/HatsTimeFrameModule"; + InitialMint, + TransferSingle, +} from "../generated/templates/HatsFractionTokenModule/HatsFractionTokenModule"; -export function handleOperationAuthorityGranted( - ev: OperationAuthorityGranted, -): void { - const module = HatsTimeFrameModule.load(ev.address.toHex()); +export function handleRoleShareInitialMint(ev: InitialMint): void { + const module = HatsFractionTokenModule.load(ev.address.toHex()); + const id = `${ev.address.toHex()}-${ev.params.tokenId.toHexString()}`; if (module === null) { return; } - let authority = HatsTimeFrameModuleAuthority.load( - `${ev.address.toHex()}-${ev.params.authority.toHexString()}`, - ); - if (authority) { - authority.authorised = true; - } else { - authority = new HatsTimeFrameModuleAuthority( - `${ev.address.toHex()}-${ev.params.authority.toHexString()}`, - ); - authority.workspaceId = module.workspaceId; - authority.hatsTimeFrameModule = module.id; - authority.address = ev.params.authority.toHex(); - authority.authorised = true; - authority.blockNumber = ev.block.number; - authority.blockTimestamp = ev.block.timestamp; - } - authority.save(); + let initializedEvent = InitializedFractionToken.load(id); + if (initializedEvent) return; + + initializedEvent = new InitializedFractionToken(id); + initializedEvent.hatsFractionTokenModule = module.id; + initializedEvent.tokenId = ev.params.tokenId; + initializedEvent.hatId = ev.params.hatId; + initializedEvent.wearer = ev.params.wearer.toHex(); + initializedEvent.workspaceId = module.workspaceId; + initializedEvent.blockTimestamp = ev.block.timestamp; + initializedEvent.blockNumber = ev.block.number; + + initializedEvent.save(); } -export function handleOperationAuthorityRevoked( - ev: OperationAuthorityRevoked, -): void { - const module = HatsTimeFrameModule.load(ev.address.toHex()); +export function handleRoleShareTransferSingle(ev: TransferSingle): void { + const module = HatsFractionTokenModule.load(ev.address.toHex()); + const id = `${ev.address.toHex()}-${ev.params.id.toHexString()}`; + const initializedRoleShare = InitializedFractionToken.load(id); - if (module === null) { + if (initializedRoleShare === null || module === null) { return; } - let authority = HatsTimeFrameModuleAuthority.load( - `${ev.address.toHex()}-${ev.params.authority.toHexString()}`, + let transfer = TransferFractionToken.load( + `${ev.address.toHex()}-${ev.params.id.toHexString()}-${ev.params.to.toHexString()}-${ev.params.from.toHexString()}-${ev.block.number}`, ); - if (authority) { - authority.authorised = false; - } else { - authority = new HatsTimeFrameModuleAuthority( - `${ev.address.toHex()}-${ev.params.authority.toHexString()}`, - ); - authority.workspaceId = module.workspaceId; - authority.hatsTimeFrameModule = module.id; - authority.address = ev.params.authority.toHex(); - authority.authorised = false; - authority.blockNumber = ev.block.number; - authority.blockTimestamp = ev.block.timestamp; - } - authority.save(); -} - -export function handleCreateHatAuthorityGranted( - ev: CreateHatAuthorityGranted, -): void { - const module = HatsHatCreatorModule.load(ev.address.toHex()); + if (transfer) return; + transfer = new TransferFractionToken( + `${ev.address.toHex()}-${ev.params.id.toHexString()}-${ev.params.to.toHexString()}-${ev.params.from.toHexString()}-${ev.block.number}`, + ); + transfer.hatsFractionTokenModule = module.id; + transfer.from = ev.params.from.toHex(); + transfer.to = ev.params.to.toHex(); + transfer.tokenId = ev.params.id; + transfer.amount = ev.params.value; + transfer.workspaceId = module.workspaceId; + transfer.blockTimestamp = ev.block.timestamp; + transfer.blockNumber = ev.block.number; - if (module === null) { - return; - } + updateBalance( + ev.params.id, + ev.params.from, + ev.params.value.neg(), + initializedRoleShare, + ev.block.timestamp, + ); - let authority = HatsHatCreatorModuleAuthority.load( - `${ev.address.toHex()}-${ev.params.authority.toHexString()}`, + updateBalance( + ev.params.id, + ev.params.to, + ev.params.value, + initializedRoleShare, + ev.block.timestamp, ); - if (authority) { - authority.authorised = true; - } else { - authority = new HatsHatCreatorModuleAuthority( - `${ev.address.toHex()}-${ev.params.authority.toHexString()}`, - ); - authority.workspaceId = module.workspaceId; - authority.hatsHatCreatorModule = module.id; - authority.address = ev.params.authority.toHex(); - authority.authorised = true; - authority.blockNumber = ev.block.number; - authority.blockTimestamp = ev.block.timestamp; - } - authority.save(); + + transfer.save(); } -export function handleCreateHatAuthorityRevoked( - ev: CreateHatAuthorityRevoked, +function updateBalance( + tokenId: GraphBigInt, + account: Address, + amount: GraphBigInt, + initializedRoleShare: InitializedFractionToken, + timestamp: GraphBigInt, ): void { - const module = HatsHatCreatorModule.load(ev.address.toHex()); + let balance = BalanceOfFractionToken.load( + `${initializedRoleShare.id}-${tokenId.toHex()}-${account.toHex()}`, + ); + if (balance) { + balance.balance = balance.balance.plus(amount); + balance.updatedAt = timestamp; + } else if (account.toHex() !== "0x0000000000000000000000000000000000000000") { + balance = new BalanceOfFractionToken(`${tokenId}${account.toHex()}`); + balance.owner = account.toHex(); + balance.tokenId = tokenId; + balance.balance = amount; + balance.updatedAt = timestamp; + } - if (module === null) { - return; + if (balance && initializedRoleShare) { + balance.workspaceId = initializedRoleShare.workspaceId; + balance.hatId = initializedRoleShare.hatId; + balance.wearer = initializedRoleShare.wearer; } - let authority = HatsHatCreatorModuleAuthority.load( - `${ev.address.toHex()}-${ev.params.authority.toHexString()}`, - ); - if (authority) { - authority.authorised = false; - } else { - authority = new HatsHatCreatorModuleAuthority( - `${ev.address.toHex()}-${ev.params.authority.toHexString()}`, - ); - authority.workspaceId = module.workspaceId; - authority.hatsHatCreatorModule = module.id; - authority.address = ev.params.authority.toHex(); - authority.authorised = false; - authority.blockNumber = ev.block.number; - authority.blockTimestamp = ev.block.timestamp; + if (balance) { + balance.save(); } - authority.save(); } diff --git a/pkgs/subgraph/src/thanksTokenMapping.ts b/pkgs/subgraph/src/thanksTokenMapping.ts new file mode 100644 index 00000000..2e38ee75 --- /dev/null +++ b/pkgs/subgraph/src/thanksTokenMapping.ts @@ -0,0 +1,119 @@ +// MintThanksToken +// AmountOfMintThanksToken +// TransferThanksToken +// BalanceOfThanksToken + +import { Address, BigInt as GraphBigInt } from "@graphprotocol/graph-ts"; +import { + AmountOfMintThanksToken, + BalanceOfThanksToken, + MintThanksToken, + ThanksToken, + TransferThanksToken, +} from "../generated/schema"; +import { + TokenMinted, + Transfer, +} from "../generated/templates/ThanksToken/ThanksToken"; + +export function handleTokenMinted(ev: TokenMinted): void { + const thanksToken = ThanksToken.load(ev.address.toHex()); + + if (thanksToken === null) { + return; + } + + let tokenMinted = MintThanksToken.load( + `${ev.params.from.toHex()}-${ev.params.to.toHex()}-${ev.block.number}`, + ); + if (tokenMinted) return; + + tokenMinted = new MintThanksToken( + `${ev.params.from.toHex()}-${ev.params.to.toHex()}-${ev.block.number}`, + ); + tokenMinted.thanksToken = thanksToken.id; + tokenMinted.from = ev.params.from.toHex(); + tokenMinted.to = ev.params.to.toHex(); + tokenMinted.amount = ev.params.amount; + tokenMinted.workspaceId = thanksToken.workspaceId; + tokenMinted.blockTimestamp = ev.block.timestamp; + tokenMinted.blockNumber = ev.block.number; + + tokenMinted.save(); + + let amountOfMint = AmountOfMintThanksToken.load( + `${thanksToken.id}-${ev.params.from.toHex()}`, + ); + if (amountOfMint) { + amountOfMint.amount = amountOfMint.amount.plus(ev.params.amount); + amountOfMint.updatedAt = ev.block.timestamp; + } else { + amountOfMint = new AmountOfMintThanksToken( + `${thanksToken.id}-${ev.params.from.toHex()}`, + ); + amountOfMint.thanksToken = thanksToken.id; + amountOfMint.sender = ev.params.from.toHex(); + amountOfMint.amount = ev.params.amount; + amountOfMint.workspaceId = thanksToken.workspaceId; + amountOfMint.updatedAt = ev.block.timestamp; + } +} + +export function handleTransfer(ev: Transfer): void { + const thanksToken = ThanksToken.load(ev.address.toHex()); + + if (thanksToken === null) { + return; + } + + let transfer = TransferThanksToken.load( + `${ev.address.toHex()}-${ev.params.from.toHex()}-${ev.params.to.toHex()}-${ev.params.value.toString()}-${ev.block.number}`, + ); + if (transfer) return; + + transfer = new TransferThanksToken( + `${ev.address.toHex()}-${ev.params.from.toHex()}-${ev.params.to.toHex()}-${ev.params.value.toString()}-${ev.block.number}`, + ); + transfer.thanksToken = thanksToken.id; + transfer.from = ev.params.from.toHex(); + transfer.to = ev.params.to.toHex(); + transfer.amount = ev.params.value; + transfer.workspaceId = thanksToken.workspaceId; + transfer.blockTimestamp = ev.block.timestamp; + transfer.blockNumber = ev.block.number; + transfer.save(); + + updateBalance( + thanksToken, + ev.params.from, + ev.params.value.neg(), + ev.block.timestamp, + ); + updateBalance(thanksToken, ev.params.to, ev.params.value, ev.block.timestamp); +} + +function updateBalance( + thanksToken: ThanksToken, + account: Address, + amount: GraphBigInt, + timestamp: GraphBigInt, +): void { + let balance = BalanceOfThanksToken.load( + `${thanksToken.id}-${account.toHex()}`, + ); + if (balance) { + balance.balance = balance.balance.plus(amount); + balance.updatedAt = timestamp; + } else if (account.toHex() !== "0x0000000000000000000000000000000000000000") { + balance = new BalanceOfThanksToken(`${thanksToken.id}-${account.toHex()}`); + balance.thanksToken = thanksToken.id; + balance.owner = account.toHex(); + balance.balance = amount; + balance.workspaceId = thanksToken.workspaceId; + balance.updatedAt = timestamp; + } + + if (balance) { + balance.save(); + } +} diff --git a/pkgs/subgraph/subgraph.template.yaml b/pkgs/subgraph/subgraph.template.yaml index 92c3ff60..73d91ed6 100644 --- a/pkgs/subgraph/subgraph.template.yaml +++ b/pkgs/subgraph/subgraph.template.yaml @@ -31,7 +31,7 @@ dataSources: file: ./src/{{mappingFile}}.ts {{/contracts}} templates: - {{#hatsModuleContracts}} + {{#templatesContracts}} - kind: ethereum/contract name: {{ file }} network: {{ network }} @@ -53,5 +53,5 @@ templates: - event: {{event}} handler: {{handler}} {{/handlers}} - file: ./src/hatsModuleMapping.ts - {{/hatsModuleContracts}} + file: ./src/{{mappingFile}}.ts + {{/templatesContracts}} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 093905f8..e748035b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,6 +54,9 @@ importers: pkgs/contract: dependencies: + '@nomicfoundation/hardhat-verify': + specifier: 2.1.1 + version: 2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) ethers: specifier: ^6.13.4 version: 6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10) @@ -66,19 +69,16 @@ importers: version: 3.0.8(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@nomicfoundation/hardhat-ignition': specifier: ^0.15.5 - version: 0.15.11(@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + version: 0.15.11(@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) '@nomicfoundation/hardhat-ignition-viem': specifier: ^0.15.0 - version: 0.15.11(@nomicfoundation/hardhat-ignition@0.15.11(@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/hardhat-viem@2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34))(@nomicfoundation/ignition-core@0.15.11(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34)) + version: 0.15.11(@nomicfoundation/hardhat-ignition@0.15.11(@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/hardhat-viem@2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34))(@nomicfoundation/ignition-core@0.15.11(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34)) '@nomicfoundation/hardhat-network-helpers': specifier: ^1.0.11 version: 1.0.12(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@nomicfoundation/hardhat-toolbox-viem': specifier: ^3.0.0 - version: 3.0.0(pj5oo5nbfynrcg5zxxur3r5v2m) - '@nomicfoundation/hardhat-verify': - specifier: ^2.0.0 - version: 2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) + version: 3.0.0(hlhasphkbpm4zpu4pjrdmcqq4q) '@nomicfoundation/hardhat-viem': specifier: ^2.0.3 version: 2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34) @@ -93,7 +93,7 @@ importers: version: 5.0.2(@openzeppelin/contracts@5.3.0) '@openzeppelin/hardhat-upgrades': specifier: ^3.5.0 - version: 3.9.0(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(encoding@0.1.13)(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) + version: 3.9.0(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(encoding@0.1.13)(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@types/chai': specifier: ^4.2.0 version: 4.3.20 @@ -184,7 +184,7 @@ importers: version: 4.1.3(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34)) '@apollo/client': specifier: ^3.12.4 - version: 3.13.8(@types/react@18.3.23)(graphql-ws@6.0.5(crossws@0.3.5)(graphql@16.11.0)(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 3.13.8(@types/react@18.3.23)(graphql-ws@6.0.5(crossws@0.3.5)(graphql@16.11.0)(ws@8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@chakra-ui/react': specifier: ^3.15.0 version: 3.19.1(@emotion/react@11.14.0(@types/react@18.3.23)(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -230,9 +230,15 @@ importers: chartjs-chart-treemap: specifier: ^3.1.0 version: 3.1.0(chart.js@4.4.9) + date-fns: + specifier: ^4.1.0 + version: 4.1.0 dayjs: specifier: ^1.11.13 version: 1.11.13 + dayzed: + specifier: ^3.2.3 + version: 3.2.3(prop-types@15.8.1)(react@18.3.1) framer-motion: specifier: ^12.5.0 version: 12.15.0(@emotion/is-prop-valid@1.3.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -260,6 +266,9 @@ importers: react-chartjs-2: specifier: ^5.3.0 version: 5.3.0(chart.js@4.4.9)(react@18.3.1) + react-day-picker: + specifier: ^9.9.0 + version: 9.9.0(react@18.3.1) react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) @@ -1371,6 +1380,9 @@ packages: '@cypress/xvfb@1.2.4': resolution: {integrity: sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==} + '@date-fns/tz@1.4.1': + resolution: {integrity: sha512-P5LUNhtbj6YfI3iJjw5EL9eUAG6OitD0W3fWQcpQjDRc/QIsL0tRNuO1PcDvPccWL1fSTXXdE1ds+l95DV/OFA==} + '@depay/solana-web3.js@1.98.2': resolution: {integrity: sha512-O7SvHsZ6HGXlzSmjhj7mj0B/VvQQn8mzm/xKQ0SUrEUJVxg9zKFBlwIvxCtgf+IOrWlBJi6VqXRu7UznWvfrCA==} @@ -2995,10 +3007,10 @@ packages: typescript: ^5.0.4 viem: ^2.7.6 - '@nomicfoundation/hardhat-verify@2.0.14': - resolution: {integrity: sha512-z3iVF1WYZHzcdMMUuureFpSAfcnlfJbJx3faOnGrOYg6PRTki1Ut9JAuRccnFzMHf1AmTEoSUpWcyvBCoxL5Rg==} + '@nomicfoundation/hardhat-verify@2.1.1': + resolution: {integrity: sha512-K1plXIS42xSHDJZRkrE2TZikqxp9T4y6jUMUNI/imLgN5uCcEQokmfU0DlyP9zzHncYK92HlT5IWP35UVCLrPw==} peerDependencies: - hardhat: ^2.24.1 + hardhat: ^2.26.0 '@nomicfoundation/hardhat-viem@2.0.6': resolution: {integrity: sha512-Pl5pvYK5VYKflfoUk4fVBESqKMNBtAIGPIT4j+Q8KNFueAe1vB2PsbRESeNJyW5YLL9pqKaD1RVqLmgIa1yvDg==} @@ -6151,12 +6163,28 @@ packages: dataloader@2.2.3: resolution: {integrity: sha512-y2krtASINtPFS1rSDjacrFgn1dcUuoREVabwlOGOe4SdxenREqwjwjElAdwvbGM7kgZz9a3KVicWR7vcz8rnzA==} + date-fns-jalali@4.1.0-0: + resolution: {integrity: sha512-hTIP/z+t+qKwBDcmmsnmjWTduxCg+5KfdqWQvb2X/8C9+knYY6epN/pfxdDuyVlSVeFz0sM5eEfwIUQ70U4ckg==} + + date-fns@2.30.0: + resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} + engines: {node: '>=0.11'} + + date-fns@4.1.0: + resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==} + dateformat@4.6.3: resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} dayjs@1.11.13: resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} + dayzed@3.2.3: + resolution: {integrity: sha512-qXTIKs+R6ydWwNo+X1wu3lUptyRSGoyY+ZzRcQSM0zUlaG+/Ei+bFjqbQm1T2oJ+WKNkTHURBcGsxnx9N+9kfA==} + peerDependencies: + prop-types: ^15 + react: ^16.8 || ^17.0 || ^18.0 + death@1.1.0: resolution: {integrity: sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==} @@ -10499,6 +10527,12 @@ packages: chart.js: ^4.1.1 react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-day-picker@9.9.0: + resolution: {integrity: sha512-NtkJbuX6cl/VaGNb3sVVhmMA6LSMnL5G3xNL+61IyoZj0mUZFWTg4hmj7PHjIQ8MXN9dHWhUHFoJWG6y60DKSg==} + engines: {node: '>=18'} + peerDependencies: + react: '>=16.8.0' + react-dev-utils@12.0.1: resolution: {integrity: sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==} engines: {node: '>=14'} @@ -11241,6 +11275,7 @@ packages: source-map@0.8.0-beta.0: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} + deprecated: The work that was done in this beta branch won't be included in future versions space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} @@ -12928,7 +12963,7 @@ snapshots: '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 - '@apollo/client@3.13.8(@types/react@18.3.23)(graphql-ws@6.0.5(crossws@0.3.5)(graphql@16.11.0)(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@apollo/client@3.13.8(@types/react@18.3.23)(graphql-ws@6.0.5(crossws@0.3.5)(graphql@16.11.0)(ws@8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)))(graphql@16.11.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.11.0) '@wry/caches': 1.0.1 @@ -12945,7 +12980,7 @@ snapshots: tslib: 2.8.1 zen-observable-ts: 1.2.5 optionalDependencies: - graphql-ws: 6.0.5(crossws@0.3.5)(graphql@16.11.0)(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + graphql-ws: 6.0.5(crossws@0.3.5)(graphql@16.11.0)(ws@8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) transitivePeerDependencies: @@ -14299,6 +14334,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@date-fns/tz@1.4.1': {} + '@depay/solana-web3.js@1.98.2': dependencies: bs58: 5.0.0 @@ -15855,7 +15892,7 @@ snapshots: binary-install-raw: 0.0.13(debug@4.3.4) chalk: 3.0.0 chokidar: 3.5.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 docker-compose: 0.23.19 dockerode: 2.5.8 fs-extra: 9.1.0 @@ -16822,17 +16859,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@nomicfoundation/hardhat-ignition-viem@0.15.11(@nomicfoundation/hardhat-ignition@0.15.11(@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/hardhat-viem@2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34))(@nomicfoundation/ignition-core@0.15.11(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))': + '@nomicfoundation/hardhat-ignition-viem@0.15.11(@nomicfoundation/hardhat-ignition@0.15.11(@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/hardhat-viem@2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34))(@nomicfoundation/ignition-core@0.15.11(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))': dependencies: - '@nomicfoundation/hardhat-ignition': 0.15.11(@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) + '@nomicfoundation/hardhat-ignition': 0.15.11(@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10) '@nomicfoundation/hardhat-viem': 2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34) '@nomicfoundation/ignition-core': 0.15.11(bufferutil@4.0.9)(utf-8-validate@5.0.10) hardhat: 2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) viem: 2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34) - '@nomicfoundation/hardhat-ignition@0.15.11(@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': + '@nomicfoundation/hardhat-ignition@0.15.11(@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10)': dependencies: - '@nomicfoundation/hardhat-verify': 2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-verify': 2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@nomicfoundation/ignition-core': 0.15.11(bufferutil@4.0.9)(utf-8-validate@5.0.10) '@nomicfoundation/ignition-ui': 0.15.11 chalk: 4.1.2 @@ -16851,11 +16888,11 @@ snapshots: ethereumjs-util: 7.1.5 hardhat: 2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) - '@nomicfoundation/hardhat-toolbox-viem@3.0.0(pj5oo5nbfynrcg5zxxur3r5v2m)': + '@nomicfoundation/hardhat-toolbox-viem@3.0.0(hlhasphkbpm4zpu4pjrdmcqq4q)': dependencies: - '@nomicfoundation/hardhat-ignition-viem': 0.15.11(@nomicfoundation/hardhat-ignition@0.15.11(@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/hardhat-viem@2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34))(@nomicfoundation/ignition-core@0.15.11(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34)) + '@nomicfoundation/hardhat-ignition-viem': 0.15.11(@nomicfoundation/hardhat-ignition@0.15.11(@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(bufferutil@4.0.9)(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(utf-8-validate@5.0.10))(@nomicfoundation/hardhat-viem@2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34))(@nomicfoundation/ignition-core@0.15.11(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34)) '@nomicfoundation/hardhat-network-helpers': 1.0.12(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) - '@nomicfoundation/hardhat-verify': 2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-verify': 2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@nomicfoundation/hardhat-viem': 2.0.6(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(viem@2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34))(zod@3.25.34) '@types/chai': 4.3.20 '@types/chai-as-promised': 7.1.8 @@ -16870,7 +16907,7 @@ snapshots: typescript: 5.6.3 viem: 2.30.5(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.25.34) - '@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': + '@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': dependencies: '@ethersproject/abi': 5.8.0 '@ethersproject/address': 5.8.0 @@ -16990,7 +17027,7 @@ snapshots: chalk: 4.1.2 clean-stack: 3.0.1 cli-progress: 3.12.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.1(supports-color@8.1.1) ejs: 3.1.10 fs-extra: 9.1.0 get-package-type: 0.1.0 @@ -17002,7 +17039,7 @@ snapshots: natural-orderby: 2.0.3 object-treeify: 1.1.33 password-prompt: 1.1.3 - semver: 7.4.0 + semver: 7.7.2 string-width: 4.2.3 strip-ansi: 6.0.1 supports-color: 8.1.1 @@ -17053,7 +17090,7 @@ snapshots: - debug - encoding - '@openzeppelin/hardhat-upgrades@3.9.0(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-verify@2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(encoding@0.1.13)(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': + '@openzeppelin/hardhat-upgrades@3.9.0(@nomicfoundation/hardhat-ethers@3.0.8(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(@nomicfoundation/hardhat-verify@2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)))(encoding@0.1.13)(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10))': dependencies: '@nomicfoundation/hardhat-ethers': 3.0.8(ethers@6.14.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) '@openzeppelin/defender-sdk-base-client': 2.6.0(encoding@0.1.13) @@ -17068,7 +17105,7 @@ snapshots: proper-lockfile: 4.1.2 undici: 6.21.3 optionalDependencies: - '@nomicfoundation/hardhat-verify': 2.0.14(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) + '@nomicfoundation/hardhat-verify': 2.1.1(hardhat@2.24.1(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@22.15.24)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)) transitivePeerDependencies: - aws-crt - encoding @@ -21791,10 +21828,25 @@ snapshots: dataloader@2.2.3: {} + date-fns-jalali@4.1.0-0: {} + + date-fns@2.30.0: + dependencies: + '@babel/runtime': 7.27.3 + + date-fns@4.1.0: {} + dateformat@4.6.3: {} dayjs@1.11.13: {} + dayzed@3.2.3(prop-types@15.8.1)(react@18.3.1): + dependencies: + '@babel/runtime': 7.27.3 + date-fns: 2.30.0 + prop-types: 15.8.1 + react: 18.3.1 + death@1.1.0: {} debounce@1.2.1: {} @@ -21809,11 +21861,9 @@ snapshots: optionalDependencies: supports-color: 8.1.1 - debug@4.3.4(supports-color@8.1.1): + debug@4.3.4: dependencies: ms: 2.1.2 - optionalDependencies: - supports-color: 8.1.1 debug@4.4.1(supports-color@8.1.1): dependencies: @@ -21948,7 +21998,7 @@ snapshots: dns-over-http-resolver@1.2.3(node-fetch@2.7.0(encoding@0.1.13)): dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.1(supports-color@8.1.1) native-fetch: 3.0.0(node-fetch@2.7.0(encoding@0.1.13)) receptacle: 1.3.2 transitivePeerDependencies: @@ -23096,7 +23146,7 @@ snapshots: follow-redirects@1.15.9(debug@4.3.4): optionalDependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 follow-redirects@1.15.9(debug@4.4.1): optionalDependencies: @@ -23551,14 +23601,6 @@ snapshots: graphql: 16.11.0 tslib: 2.8.1 - graphql-ws@6.0.5(crossws@0.3.5)(graphql@16.11.0)(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)): - dependencies: - graphql: 16.11.0 - optionalDependencies: - crossws: 0.3.5 - ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) - optional: true - graphql-ws@6.0.5(crossws@0.3.5)(graphql@16.11.0)(ws@8.18.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)): dependencies: graphql: 16.11.0 @@ -24206,7 +24248,7 @@ snapshots: any-signal: 2.1.2 blob-to-it: 1.0.4 browser-readablestream-to-it: 1.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.1(supports-color@8.1.1) err-code: 3.0.1 ipfs-core-types: 0.9.0(node-fetch@2.7.0(encoding@0.1.13)) ipfs-unixfs: 6.0.9 @@ -24235,7 +24277,7 @@ snapshots: '@ipld/dag-pb': 2.1.18 abort-controller: 3.0.0 any-signal: 2.1.2 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.4.1(supports-color@8.1.1) err-code: 3.0.1 ipfs-core-types: 0.9.0(node-fetch@2.7.0(encoding@0.1.13)) ipfs-core-utils: 0.13.0(encoding@0.1.13)(node-fetch@2.7.0(encoding@0.1.13)) @@ -27333,6 +27375,13 @@ snapshots: chart.js: 4.4.9 react: 18.3.1 + react-day-picker@9.9.0(react@18.3.1): + dependencies: + '@date-fns/tz': 1.4.1 + date-fns: 4.1.0 + date-fns-jalali: 4.1.0-0 + react: 18.3.1 + react-dev-utils@12.0.1(eslint@8.57.1)(typescript@5.6.3)(webpack@5.99.9): dependencies: '@babel/code-frame': 7.27.1