From 59aba766de2ae1057f006d5230aafe34bb71a61f Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Mon, 6 May 2024 10:57:53 +0200 Subject: [PATCH 01/12] chore: removes mention of APP_NOT_ALLOWED broadcasst error reason --- .../src/use-cases/transactions/BroadcastingError.ts | 2 ++ .../adapters/__tests__/MomokaRelayer.spec.ts | 4 ---- .../adapters/__tests__/OnChainRelayer.spec.ts | 4 ---- .../adapters/__tests__/OpenActionGateway.spec.ts | 6 ------ .../__tests__/CreateMomokaCommentGateway.spec.ts | 6 ------ .../__tests__/CreateMomokaMirrorGateway.spec.ts | 6 ------ .../__tests__/CreateMomokaPostGateway.spec.ts | 6 ------ .../__tests__/CreateMomokaQuoteGateway.spec.ts | 6 ------ .../__tests__/CreateOnChainCommentGateway.spec.ts | 6 ------ .../__tests__/CreateOnChainMirrorGateway.spec.ts | 6 ------ .../__tests__/CreateOnChainPostGateway.spec.ts | 6 ------ .../__tests__/CreateOnChainQuoteGateway.spec.ts | 6 ------ packages/react/src/transactions/adapters/relayer.ts | 4 ---- .../src/transactions/publications/useCreateComment.ts | 7 ------- .../src/transactions/publications/useCreateMirror.ts | 8 -------- .../src/transactions/publications/useCreatePost.ts | 7 ------- .../src/transactions/publications/useCreateQuote.ts | 7 ------- .../publications/useOptimisticCreatePost.ts | 1 - packages/react/src/transactions/useBlockProfiles.ts | 10 +--------- packages/react/src/transactions/useFollow.ts | 8 -------- packages/react/src/transactions/useLinkHandle.ts | 9 --------- packages/react/src/transactions/useOpenAction/types.ts | 1 - .../src/transactions/useOpenAction/useOpenAction.ts | 7 ------- .../react/src/transactions/useSetProfileMetadata.ts | 8 -------- packages/react/src/transactions/useUnblockProfiles.ts | 9 --------- packages/react/src/transactions/useUnfollow.ts | 10 ---------- packages/react/src/transactions/useUnlinkHandle.ts | 9 --------- .../react/src/transactions/useUpdateFollowPolicy.ts | 9 --------- .../react/src/transactions/useUpdateProfileManagers.ts | 9 --------- 29 files changed, 3 insertions(+), 184 deletions(-) diff --git a/packages/domain/src/use-cases/transactions/BroadcastingError.ts b/packages/domain/src/use-cases/transactions/BroadcastingError.ts index a1adf860df..292d49cabf 100644 --- a/packages/domain/src/use-cases/transactions/BroadcastingError.ts +++ b/packages/domain/src/use-cases/transactions/BroadcastingError.ts @@ -7,6 +7,8 @@ export type RequestFallback = AnyTransactionRequestModel; export enum BroadcastingErrorReason { /** * The app is not whitelisted to use gasless transactions. + * + * @deprecated This error reason is not longer used and will be removed in the future. */ APP_NOT_ALLOWED = 'APP_NOT_ALLOWED', /** diff --git a/packages/react/src/transactions/adapters/__tests__/MomokaRelayer.spec.ts b/packages/react/src/transactions/adapters/__tests__/MomokaRelayer.spec.ts index a46c9e7392..efab211f44 100644 --- a/packages/react/src/transactions/adapters/__tests__/MomokaRelayer.spec.ts +++ b/packages/react/src/transactions/adapters/__tests__/MomokaRelayer.spec.ts @@ -67,10 +67,6 @@ describe(`Given an instance of the ${MomokaRelayer.name}`, () => { }); describe.only.each([ - { - broadcastResult: mockRelayErrorFragment(RelayErrorReasonType.AppNotAllowed), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { broadcastResult: mockRelayErrorFragment(RelayErrorReasonType.NotSponsored), reason: BroadcastingErrorReason.NOT_SPONSORED, diff --git a/packages/react/src/transactions/adapters/__tests__/OnChainRelayer.spec.ts b/packages/react/src/transactions/adapters/__tests__/OnChainRelayer.spec.ts index 7398ec3684..d4f2017ef8 100644 --- a/packages/react/src/transactions/adapters/__tests__/OnChainRelayer.spec.ts +++ b/packages/react/src/transactions/adapters/__tests__/OnChainRelayer.spec.ts @@ -63,10 +63,6 @@ describe(`Given an instance of the ${OnChainRelayer.name}`, () => { }); describe.only.each([ - { - broadcastResult: mockRelayErrorFragment(RelayErrorReasonType.AppNotAllowed), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { broadcastResult: mockRelayErrorFragment(RelayErrorReasonType.NotSponsored), reason: BroadcastingErrorReason.NOT_SPONSORED, diff --git a/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts b/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts index e7fffd8ed2..08399207ec 100644 --- a/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts +++ b/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts @@ -380,12 +380,6 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { describe(`when creating any ${NativeTransaction.name}`, () => { describe.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaCommentGateway.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaCommentGateway.spec.ts index fb9d87e132..e7ff390d0d 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaCommentGateway.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaCommentGateway.spec.ts @@ -86,12 +86,6 @@ describe(`Given an instance of ${CreateMomokaCommentGateway.name}`, () => { }); it.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaMirrorGateway.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaMirrorGateway.spec.ts index d8646af25c..279d94971b 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaMirrorGateway.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaMirrorGateway.spec.ts @@ -84,12 +84,6 @@ describe(`Given an instance of ${CreateMomokaMirrorGateway.name}`, () => { }); it.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaPostGateway.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaPostGateway.spec.ts index 5c8be9e6df..d9f38878d6 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaPostGateway.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaPostGateway.spec.ts @@ -84,12 +84,6 @@ describe(`Given an instance of ${CreateMomokaPostGateway.name}`, () => { }); it.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaQuoteGateway.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaQuoteGateway.spec.ts index 9c237262fc..5b09cb17c6 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaQuoteGateway.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/CreateMomokaQuoteGateway.spec.ts @@ -86,12 +86,6 @@ describe(`Given an instance of ${CreateMomokaQuoteGateway.name}`, () => { }); it.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainCommentGateway.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainCommentGateway.spec.ts index 289fbe38d5..a24c1ad465 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainCommentGateway.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainCommentGateway.spec.ts @@ -151,12 +151,6 @@ describe(`Given an instance of ${CreateOnChainCommentGateway.name}`, () => { }); it.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainMirrorGateway.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainMirrorGateway.spec.ts index 6767cfe41c..4ef11e0182 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainMirrorGateway.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainMirrorGateway.spec.ts @@ -130,12 +130,6 @@ describe(`Given an instance of ${CreateOnChainMirrorGateway.name}`, () => { }); it.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainPostGateway.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainPostGateway.spec.ts index 63ad725579..826f43a043 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainPostGateway.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainPostGateway.spec.ts @@ -150,12 +150,6 @@ describe(`Given an instance of ${CreateOnChainPostGateway.name}`, () => { }); it.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainQuoteGateway.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainQuoteGateway.spec.ts index 39354fdd3e..a67df11966 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainQuoteGateway.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/CreateOnChainQuoteGateway.spec.ts @@ -151,12 +151,6 @@ describe(`Given an instance of ${CreateOnChainQuoteGateway.name}`, () => { }); it.each([ - { - relayError: mockLensProfileManagerRelayError( - LensProfileManagerRelayErrorReasonType.AppNotAllowed, - ), - reason: BroadcastingErrorReason.APP_NOT_ALLOWED, - }, { relayError: mockLensProfileManagerRelayError( LensProfileManagerRelayErrorReasonType.NoLensManagerEnabled, diff --git a/packages/react/src/transactions/adapters/relayer.ts b/packages/react/src/transactions/adapters/relayer.ts index a02ca48631..eb6815ae9f 100644 --- a/packages/react/src/transactions/adapters/relayer.ts +++ b/packages/react/src/transactions/adapters/relayer.ts @@ -15,10 +15,6 @@ export function handleRelayError( _?: unknown, ): Failure { switch (error.reason) { - case RelayErrorReasonType.AppNotAllowed: - case LensProfileManagerRelayErrorReasonType.AppNotAllowed: - return failure(new BroadcastingError(BroadcastingErrorReason.APP_NOT_ALLOWED)); - case RelayErrorReasonType.RateLimited: case LensProfileManagerRelayErrorReasonType.RateLimited: return failure(new BroadcastingError(BroadcastingErrorReason.RATE_LIMITED)); diff --git a/packages/react/src/transactions/publications/useCreateComment.ts b/packages/react/src/transactions/publications/useCreateComment.ts index 704f72edf3..84117f90a2 100644 --- a/packages/react/src/transactions/publications/useCreateComment.ts +++ b/packages/react/src/transactions/publications/useCreateComment.ts @@ -75,7 +75,6 @@ export type CreateCommentArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -407,7 +406,6 @@ export type CreateCommentArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -440,11 +438,6 @@ export type CreateCommentArgs = { * } * ``` * - * We omitted the handling of the {@link BroadcastingErrorReason.APP_NOT_ALLOWED} error because it's usually - * something that builder will face when deploying their app to production using the Production Lens API. - * - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * * ## Momoka comments * * For a comment to be hosted on Momoka it must meet the following criteria: diff --git a/packages/react/src/transactions/publications/useCreateMirror.ts b/packages/react/src/transactions/publications/useCreateMirror.ts index 5273d00729..af7e02970b 100644 --- a/packages/react/src/transactions/publications/useCreateMirror.ts +++ b/packages/react/src/transactions/publications/useCreateMirror.ts @@ -53,7 +53,6 @@ export type CreateMirrorArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -194,7 +193,6 @@ export type CreateMirrorArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -224,12 +222,6 @@ export type CreateMirrorArgs = { * } * ``` * - * We omitted the handling of the {@link BroadcastingErrorReason.APP_NOT_ALLOWED} error because it's usually - * something that builder will face when deploying their app to production using the Production Lens API. - * - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * * @category Publications * @group Hooks */ diff --git a/packages/react/src/transactions/publications/useCreatePost.ts b/packages/react/src/transactions/publications/useCreatePost.ts index c243aca4cb..c932c9ee4b 100644 --- a/packages/react/src/transactions/publications/useCreatePost.ts +++ b/packages/react/src/transactions/publications/useCreatePost.ts @@ -56,7 +56,6 @@ export type CreatePostArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -375,7 +374,6 @@ export type CreatePostArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -406,11 +404,6 @@ export type CreatePostArgs = { * } * ``` * - * We omitted the handling of the {@link BroadcastingErrorReason.APP_NOT_ALLOWED} error because it's usually - * something that builder will face when deploying their app to production using the Production Lens API. - * - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * * ## Momoka posts * * For a post to be hosted on Momoka it must meet the following criteria: diff --git a/packages/react/src/transactions/publications/useCreateQuote.ts b/packages/react/src/transactions/publications/useCreateQuote.ts index 04b1ca18a5..0d5447062a 100644 --- a/packages/react/src/transactions/publications/useCreateQuote.ts +++ b/packages/react/src/transactions/publications/useCreateQuote.ts @@ -75,7 +75,6 @@ export type CreateQuoteArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -385,7 +384,6 @@ export type CreateQuoteArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -418,11 +416,6 @@ export type CreateQuoteArgs = { * } * ``` * - * We omitted the handling of the {@link BroadcastingErrorReason.APP_NOT_ALLOWED} error because it's usually - * something that builder will face when deploying their app to production using the Production Lens API. - * - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * * ## Create an app-specific quote * * You can create a comment that is specific to an app by defining the `appId` when creating the comment metadata. diff --git a/packages/react/src/transactions/publications/useOptimisticCreatePost.ts b/packages/react/src/transactions/publications/useOptimisticCreatePost.ts index 171b271265..6364053735 100644 --- a/packages/react/src/transactions/publications/useOptimisticCreatePost.ts +++ b/packages/react/src/transactions/publications/useOptimisticCreatePost.ts @@ -58,7 +58,6 @@ export type OptimisticCreatePostArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. diff --git a/packages/react/src/transactions/useBlockProfiles.ts b/packages/react/src/transactions/useBlockProfiles.ts index e886118935..023aaa004c 100644 --- a/packages/react/src/transactions/useBlockProfiles.ts +++ b/packages/react/src/transactions/useBlockProfiles.ts @@ -33,7 +33,7 @@ export type BlockProfileArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions + * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -193,7 +193,6 @@ export type BlockProfileArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -224,13 +223,6 @@ export type BlockProfileArgs = { * } * } * ``` - * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * */ export function useBlockProfiles(): UseDeferredTask< AsyncTransactionResult, diff --git a/packages/react/src/transactions/useFollow.ts b/packages/react/src/transactions/useFollow.ts index 2b4bd4b72c..e5910292ee 100644 --- a/packages/react/src/transactions/useFollow.ts +++ b/packages/react/src/transactions/useFollow.ts @@ -107,7 +107,6 @@ export type FollowArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -260,7 +259,6 @@ export type FollowArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -284,12 +282,6 @@ export type FollowArgs = { * } * ``` * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * * @category Profiles * @group Hooks */ diff --git a/packages/react/src/transactions/useLinkHandle.ts b/packages/react/src/transactions/useLinkHandle.ts index a5dbed113f..681ed665cb 100644 --- a/packages/react/src/transactions/useLinkHandle.ts +++ b/packages/react/src/transactions/useLinkHandle.ts @@ -28,7 +28,6 @@ export type LinkHandleArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -172,7 +171,6 @@ export type LinkHandleArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -203,13 +201,6 @@ export type LinkHandleArgs = { * } * } * ``` - * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * */ export function useLinkHandle(): UseDeferredTask< AsyncTransactionResult, diff --git a/packages/react/src/transactions/useOpenAction/types.ts b/packages/react/src/transactions/useOpenAction/types.ts index 9d6badfb84..626efa97ed 100644 --- a/packages/react/src/transactions/useOpenAction/types.ts +++ b/packages/react/src/transactions/useOpenAction/types.ts @@ -85,7 +85,6 @@ export type OpenActionArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. diff --git a/packages/react/src/transactions/useOpenAction/useOpenAction.ts b/packages/react/src/transactions/useOpenAction/useOpenAction.ts index 7ee41c0036..6e086157d2 100644 --- a/packages/react/src/transactions/useOpenAction/useOpenAction.ts +++ b/packages/react/src/transactions/useOpenAction/useOpenAction.ts @@ -215,7 +215,6 @@ export type OpenActionAsyncResult = AsyncTransactionResult; * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -239,12 +238,6 @@ export type OpenActionAsyncResult = AsyncTransactionResult; * } * ``` * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * * @category Publications * @group Hooks */ diff --git a/packages/react/src/transactions/useSetProfileMetadata.ts b/packages/react/src/transactions/useSetProfileMetadata.ts index ef3f357778..835e467b01 100644 --- a/packages/react/src/transactions/useSetProfileMetadata.ts +++ b/packages/react/src/transactions/useSetProfileMetadata.ts @@ -28,7 +28,6 @@ export type UseSetProfileMetadataArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -178,7 +177,6 @@ export type UseSetProfileMetadataArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -211,12 +209,6 @@ export type UseSetProfileMetadataArgs = { * } * ``` * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * * @category Profiles * @group Hooks */ diff --git a/packages/react/src/transactions/useUnblockProfiles.ts b/packages/react/src/transactions/useUnblockProfiles.ts index cdd8056fcd..a93da599e5 100644 --- a/packages/react/src/transactions/useUnblockProfiles.ts +++ b/packages/react/src/transactions/useUnblockProfiles.ts @@ -32,7 +32,6 @@ export type UnblockProfileArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -192,7 +191,6 @@ export type UnblockProfileArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -223,13 +221,6 @@ export type UnblockProfileArgs = { * } * } * ``` - * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * */ export function useUnblockProfiles(): UseDeferredTask< AsyncTransactionResult, diff --git a/packages/react/src/transactions/useUnfollow.ts b/packages/react/src/transactions/useUnfollow.ts index 6b9903e614..1a2e9d0d1d 100644 --- a/packages/react/src/transactions/useUnfollow.ts +++ b/packages/react/src/transactions/useUnfollow.ts @@ -35,7 +35,6 @@ export type UnfollowArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -179,7 +178,6 @@ export type UnfollowArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -210,14 +208,6 @@ export type UnfollowArgs = { * } * } * ``` - * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * - * */ export function useUnfollow(): UseDeferredTask< UnfollowAsyncResult, diff --git a/packages/react/src/transactions/useUnlinkHandle.ts b/packages/react/src/transactions/useUnlinkHandle.ts index 140b4ebccd..d3807777e0 100644 --- a/packages/react/src/transactions/useUnlinkHandle.ts +++ b/packages/react/src/transactions/useUnlinkHandle.ts @@ -28,7 +28,6 @@ export type UnlinkHandleArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -172,7 +171,6 @@ export type UnlinkHandleArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -203,13 +201,6 @@ export type UnlinkHandleArgs = { * } * } * ``` - * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * */ export function useUnlinkHandle(): UseDeferredTask< AsyncTransactionResult, diff --git a/packages/react/src/transactions/useUpdateFollowPolicy.ts b/packages/react/src/transactions/useUpdateFollowPolicy.ts index fb5b0f9fb0..cebd55469f 100644 --- a/packages/react/src/transactions/useUpdateFollowPolicy.ts +++ b/packages/react/src/transactions/useUpdateFollowPolicy.ts @@ -32,7 +32,6 @@ export type UpdateFollowPolicyArgs = { * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -121,7 +120,6 @@ export type UpdateFollowPolicyArgs = { * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -157,13 +155,6 @@ export type UpdateFollowPolicyArgs = { * } * } * ``` - * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * */ export function useUpdateFollowPolicy(): UseDeferredTask< void, diff --git a/packages/react/src/transactions/useUpdateProfileManagers.ts b/packages/react/src/transactions/useUpdateProfileManagers.ts index 0744b9e4fb..d4e1ad1543 100644 --- a/packages/react/src/transactions/useUpdateProfileManagers.ts +++ b/packages/react/src/transactions/useUpdateProfileManagers.ts @@ -36,7 +36,6 @@ export type UpdateProfileManagersArgs = AtLeastOneOf<{ * See {@link BroadcastingError} with: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * If not specified, or `true`, the hook will attempt a Sponsored Transaction. * Set it to `false` to force it to use a Self-Funded Transaction. @@ -156,7 +155,6 @@ export type UpdateProfileManagersArgs = AtLeastOneOf<{ * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored * - {@link BroadcastingErrorReason.RATE_LIMITED} - the profile reached the rate limit - * - {@link BroadcastingErrorReason.APP_NOT_ALLOWED} - the app is not whitelisted for gasless transactions * * In those cases you can retry the transaction as self-funded like in the following example: * @@ -185,13 +183,6 @@ export type UpdateProfileManagersArgs = AtLeastOneOf<{ * } * } * ``` - * - * In this example we omitted {@link BroadcastingErrorReason.APP_NOT_ALLOWED} as it's not normally a problem per-se. - * It just requires the app to apply for whitelisting. See https://docs.lens.xyz/docs/gasless-and-signless#whitelisting-your-app. - * - * You can still include it in your fallback logic if you want to. For example to unblock testing your app from a domain that is not the - * whitelisted one (e.g. localhost). - * * @category Profiles * @group Hooks */ From 7272721bf06869792c4b9f3d83fee13ab3f59e10 Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Mon, 6 May 2024 13:24:45 +0200 Subject: [PATCH 02/12] feat: support new Shared Revenue Collect module --- .changeset/weak-hairs-tan.md | 10 + .../src/discovery/UseExplorePublications.tsx | 56 +- .../src/apollo/cache/transactions.ts | 12 +- .../src/lens/__helpers__/fragments.ts | 9 + .../src/lens/graphql/fragments.graphql | 30 + .../src/lens/graphql/generated.ts | 3623 +++++++++++++++++ .../src/lens/utils/CollectModuleSettings.ts | 181 +- .../utils/__tests__/token-allowance.spec.ts | 156 - packages/api-bindings/src/lens/utils/index.ts | 1 - .../src/lens/utils/token-allowance.ts | 82 - .../src/abi/PublicActProxy.json | 452 +- .../src/types/PublicActProxy.ts | 150 +- packages/client/codegen-api.yml | 4 +- .../client/src/graphql/fragments.generated.ts | 1144 +++++- packages/client/src/graphql/fragments.graphql | 30 + .../client/src/graphql/types.generated.ts | 30 + packages/client/src/graphql/types.ts | 4 + .../explore/graphql/explore.generated.ts | 107 + .../submodules/feed/graphql/feed.generated.ts | 535 +++ .../graphql/notifications.generated.ts | 749 ++++ .../graphql/publication.generated.ts | 214 + .../publication/helpers/openActions.ts | 46 +- .../bookmarks/graphql/bookmarks.generated.ts | 107 + .../revenue/graphql/revenue.generated.ts | 321 ++ .../search/graphql/search.generated.ts | 107 + .../src/use-cases/profile/LinkHandle.ts | 3 +- .../src/use-cases/profile/UnfollowProfile.ts | 1 + .../profile/UpdateProfileManagers.ts | 1 + .../src/use-cases/publications/OpenAction.ts | 39 +- .../publications/OpenActionConfig.ts | 77 +- .../publications/__helpers__/mocks.ts | 18 + packages/gated-content/codegen.yml | 1 + .../src/graphql/__helpers__/mocks.ts | 1 + .../gated-content/src/graphql/generated.ts | 800 +++- packages/react/src/environments.ts | 8 +- .../adapters/AbstractContractCallGateway.ts | 2 +- .../CreateProfileTransactionGateway.ts | 3 +- .../adapters/OpenActionGateway.ts | 115 +- .../__tests__/OpenActionGateway.spec.ts | 69 +- .../resolveOpenActionModuleInput.spec.ts | 19 + .../resolveOpenActionModuleInput.ts | 38 + .../adapters/schemas/publications.ts | 28 + .../__tests__/token-allowance.spec.ts | 173 + .../transactions/useApproveModule/index.ts | 1 + .../useApproveModule/token-allowance.ts | 144 + .../useApproveModule.ts | 38 +- .../__tests__/createOpenActionRequest.spec.ts | 17 + .../useOpenAction/createOpenActionRequest.ts | 35 +- .../src/transactions/useOpenAction/types.ts | 21 +- .../useOpenAction/useOpenAction.ts | 127 +- packages/shared-kernel/src/crypto/Asset.ts | 16 + 51 files changed, 9292 insertions(+), 663 deletions(-) create mode 100644 .changeset/weak-hairs-tan.md delete mode 100644 packages/api-bindings/src/lens/utils/__tests__/token-allowance.spec.ts delete mode 100644 packages/api-bindings/src/lens/utils/token-allowance.ts create mode 100644 packages/react/src/transactions/useApproveModule/__tests__/token-allowance.spec.ts create mode 100644 packages/react/src/transactions/useApproveModule/index.ts create mode 100644 packages/react/src/transactions/useApproveModule/token-allowance.ts rename packages/react/src/transactions/{ => useApproveModule}/useApproveModule.ts (82%) diff --git a/.changeset/weak-hairs-tan.md b/.changeset/weak-hairs-tan.md new file mode 100644 index 0000000000..149bc48974 --- /dev/null +++ b/.changeset/weak-hairs-tan.md @@ -0,0 +1,10 @@ +--- +"@lens-protocol/client": minor +"@lens-protocol/react-native": minor +"@lens-protocol/react-web": minor +"@lens-protocol/react": minor +"@lens-protocol/api-bindings": patch +"@lens-protocol/domain": patch +--- + +**feat:** support new Shared Revenue Collect module diff --git a/examples/web/src/discovery/UseExplorePublications.tsx b/examples/web/src/discovery/UseExplorePublications.tsx index 0718a26452..3a75b52395 100644 --- a/examples/web/src/discovery/UseExplorePublications.tsx +++ b/examples/web/src/discovery/UseExplorePublications.tsx @@ -1,6 +1,8 @@ import { + CollectFee, ExplorePublication, ExplorePublicationsOrderByType, + MultirecipientCollectFee, isMultirecipientCollectFee, resolveCollectPolicy, useExplorePublications, @@ -10,7 +12,31 @@ import { PublicationCard } from '../components/cards'; import { ErrorMessage } from '../components/error/ErrorMessage'; import { Loading } from '../components/loading/Loading'; import { useInfiniteScroll } from '../hooks/useInfiniteScroll'; -import { formatAmount, formatFiatAmount } from '../utils/formatAmount'; +import { formatAmount } from '../utils/formatAmount'; + +export function formatCollectFee({ amount, rate }: CollectFee | MultirecipientCollectFee) { + if (rate) { + const fiat = amount.convert(rate); + return `${formatAmount(amount)} (${formatAmount(fiat)})`; + } + return formatAmount(amount); +} + +export function CollectFeeDetails({ fee }: { fee: CollectFee | MultirecipientCollectFee }) { + return ( +
+

{`Paid collect: ${formatCollectFee(fee)}`}

+ + {fee.referralFee > 0 &&
{`Referral fee: ${fee.referralFee}%`}
} + + {isMultirecipientCollectFee(fee) ? ( +

{`Recipients: ${fee.recipients.map((r) => r.recipient).join(', ')}`}

+ ) : ( +

{`Recipient: ${fee.recipient}`}

+ )} +
+ ); +} function PublicationCollectPolicy({ publication }: { publication: ExplorePublication }) { const policy = resolveCollectPolicy(publication); @@ -19,25 +45,15 @@ function PublicationCollectPolicy({ publication }: { publication: ExplorePublica return (
- {policy.followerOnly === true &&
Only followers can collect
} - {policy.collectLimit &&
{`Collect limit: ${policy.collectLimit}`}
} - {policy.endsAt &&
{`Ends at: ${policy.endsAt}`}
} - {!policy.fee ? ( -
Free collect
- ) : ( - <> -
{`Paid collect: ${formatAmount(policy.fee.amount)} (${formatFiatAmount( - policy.fee.amount, - policy.fee.rate, - )})`}
- {policy.fee.referralFee > 0 &&
{`Referral fee: ${policy.fee.referralFee}%`}
} - {!isMultirecipientCollectFee(policy.fee) ? ( -
{`Recipient: ${policy.fee.recipient}`}
- ) : ( -
{`Recipients: ${policy.fee.recipients.map((r) => r.recipient).join(', ')}`}
- )} - - )} + {policy.followerOnly === true &&

Only followers can collect

} + + {policy.collectLimit &&

{`Collect limit: ${policy.collectLimit}`}

} + + {policy.endsAt &&

{`Ends at: ${policy.endsAt}`}

} + + {policy.fee === null &&

Free collect

} + + {policy.fee && }
); } diff --git a/packages/api-bindings/src/apollo/cache/transactions.ts b/packages/api-bindings/src/apollo/cache/transactions.ts index c38650d3ae..4e74cc7a5e 100644 --- a/packages/api-bindings/src/apollo/cache/transactions.ts +++ b/packages/api-bindings/src/apollo/cache/transactions.ts @@ -13,11 +13,11 @@ import { UnlinkHandleRequest, } from '@lens-protocol/domain/use-cases/profile'; import { - OpenActionRequest, - AllOpenActionType, CreateQuoteRequest, CreateMirrorRequest, CreateCommentRequest, + CollectRequest, + isCollectRequest, } from '@lens-protocol/domain/use-cases/publications'; import { AnyTransactionRequest } from '@lens-protocol/domain/use-cases/transactions'; @@ -68,14 +68,10 @@ export function useRecentTransactionsVar() { function isCollectTransaction( transaction: TransactionState, -): transaction is TransactionState { +): transaction is TransactionState { return ( transaction.request.kind === TransactionKind.ACT_ON_PUBLICATION && - [ - AllOpenActionType.LEGACY_COLLECT, - AllOpenActionType.SIMPLE_COLLECT, - AllOpenActionType.MULTIRECIPIENT_COLLECT, - ].includes(transaction.request.type) + isCollectRequest(transaction.request) ); } diff --git a/packages/api-bindings/src/lens/__helpers__/fragments.ts b/packages/api-bindings/src/lens/__helpers__/fragments.ts index c9b0dca689..b2319bc869 100644 --- a/packages/api-bindings/src/lens/__helpers__/fragments.ts +++ b/packages/api-bindings/src/lens/__helpers__/fragments.ts @@ -490,6 +490,15 @@ export function mockSimpleCollectOpenActionSettingsFragment( }); } +export function mockProtocolSharedRevenueCollectOpenActionSettingsFragment( + overrides?: Partial, +) { + return mock({ + ...overrides, + __typename: 'ProtocolSharedRevenueCollectOpenActionSettings', + }); +} + export function mockMultirecipientFeeCollectOpenActionSettingsFragment( overrides?: Partial, ) { diff --git a/packages/api-bindings/src/lens/graphql/fragments.graphql b/packages/api-bindings/src/lens/graphql/fragments.graphql index 3dade1cc70..e22cfd1679 100644 --- a/packages/api-bindings/src/lens/graphql/fragments.graphql +++ b/packages/api-bindings/src/lens/graphql/fragments.graphql @@ -469,6 +469,24 @@ fragment SimpleCollectOpenActionSettings on SimpleCollectOpenActionSettings { endsAt } +fragment ProtocolSharedRevenueCollectOpenActionSettings on ProtocolSharedRevenueCollectOpenActionSettings { + __typename + type + contract { + ...NetworkAddress + } + collectNft + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimit + endsAt + creatorClient +} + # purposefully renamed Recipient to have a better narrative fragment Recipient on RecipientDataOutput { # __typename not include to hide RecipientDataOutput not needed anyway here @@ -720,6 +738,9 @@ fragment PublicationOperations on PublicationOperations { fragment PublicationMetadataLitEncryption on PublicationMetadataLitEncryption { __typename encryptionKey + accessControlContract { + ...NetworkAddress + } accessCondition { ...RootCondition } @@ -1639,6 +1660,9 @@ fragment Post on Post { ... on MultirecipientFeeCollectOpenActionSettings { ...MultirecipientFeeCollectOpenActionSettings } + ... on ProtocolSharedRevenueCollectOpenActionSettings { + ...ProtocolSharedRevenueCollectOpenActionSettings + } ... on SimpleCollectOpenActionSettings { ...SimpleCollectOpenActionSettings } @@ -1778,6 +1802,9 @@ fragment CommentFields on Comment { ... on MultirecipientFeeCollectOpenActionSettings { ...MultirecipientFeeCollectOpenActionSettings } + ... on ProtocolSharedRevenueCollectOpenActionSettings { + ...ProtocolSharedRevenueCollectOpenActionSettings + } ... on SimpleCollectOpenActionSettings { ...SimpleCollectOpenActionSettings } @@ -1961,6 +1988,9 @@ fragment QuoteFields on Quote { ... on MultirecipientFeeCollectOpenActionSettings { ...MultirecipientFeeCollectOpenActionSettings } + ... on ProtocolSharedRevenueCollectOpenActionSettings { + ...ProtocolSharedRevenueCollectOpenActionSettings + } ... on SimpleCollectOpenActionSettings { ...SimpleCollectOpenActionSettings } diff --git a/packages/api-bindings/src/lens/graphql/generated.ts b/packages/api-bindings/src/lens/graphql/generated.ts index 4503e3b6f1..f9a0f7cf8a 100644 --- a/packages/api-bindings/src/lens/graphql/generated.ts +++ b/packages/api-bindings/src/lens/graphql/generated.ts @@ -73,6 +73,7 @@ export type Scalars = { export type ActOnOpenActionInput = { multirecipientCollectOpenAction?: InputMaybe; + protocolSharedRevenueCollectOpenAction?: InputMaybe; simpleCollectOpenAction?: InputMaybe; unknownOpenAction?: InputMaybe; }; @@ -191,6 +192,7 @@ export enum ClaimableTokenType { export type CollectActionModuleInput = { multirecipientCollectOpenAction?: InputMaybe; + protocolSharedRevenueCollectOpenAction?: InputMaybe; simpleCollectOpenAction?: InputMaybe; }; @@ -808,6 +810,13 @@ export enum MetadataAttributeType { String = 'STRING', } +export type ModDisputeReportRequest = { + reason: Scalars['String']; + reportedProfileId?: InputMaybe; + reportedPublicationId?: InputMaybe; + reporter: Scalars['ProfileId']; +}; + export type ModExplorePublicationRequest = { cursor?: InputMaybe; limit?: InputMaybe; @@ -828,6 +837,13 @@ export type ModExplorePublicationsWhere = { since?: InputMaybe; }; +export type ModReportsRequest = { + cursor?: InputMaybe; + forProfile?: InputMaybe; + forPublication?: InputMaybe; + limit?: InputMaybe; +}; + export type ModuleCurrencyApproval = { followModule?: InputMaybe; openActionModule?: InputMaybe; @@ -1156,6 +1172,7 @@ export enum OpenActionModuleType { LegacySimpleCollectModule = 'LegacySimpleCollectModule', LegacyTimedFeeCollectModule = 'LegacyTimedFeeCollectModule', MultirecipientFeeCollectOpenActionModule = 'MultirecipientFeeCollectOpenActionModule', + ProtocolSharedRevenueCollectOpenActionModule = 'ProtocolSharedRevenueCollectOpenActionModule', SimpleCollectOpenActionModule = 'SimpleCollectOpenActionModule', UnknownOpenActionModule = 'UnknownOpenActionModule', } @@ -1437,6 +1454,18 @@ export type ProfilesRequestWhere = { whoQuotedPublication?: InputMaybe; }; +export type ProtocolSharedRevenueCollectModuleInput = { + amount?: InputMaybe; + collectLimit?: InputMaybe; + /** The wallet of a client app to share revenues alongside the recipient and the protocol. Optional. */ + creatorClient?: InputMaybe; + currentCollects?: Scalars['Float']; + endsAt?: InputMaybe; + followerOnly: Scalars['Boolean']; + recipient?: InputMaybe; + referralFee?: InputMaybe; +}; + export type PublicationBookmarkRequest = { on: Scalars['PublicationId']; }; @@ -1575,6 +1604,7 @@ export enum PublicationReportingIllegalSubreason { AnimalAbuse = 'ANIMAL_ABUSE', DirectThreat = 'DIRECT_THREAT', HumanAbuse = 'HUMAN_ABUSE', + Plagiarism = 'PLAGIARISM', ThreatIndividual = 'THREAT_INDIVIDUAL', Violence = 'VIOLENCE', } @@ -2527,6 +2557,20 @@ export type SimpleCollectOpenActionSettings = { amount: Amount; }; +export type ProtocolSharedRevenueCollectOpenActionSettings = { + __typename: 'ProtocolSharedRevenueCollectOpenActionSettings'; + type: OpenActionModuleType; + collectNft: EvmAddress | null; + recipient: EvmAddress; + referralFee: number; + followerOnly: boolean; + collectLimit: string | null; + endsAt: string | null; + creatorClient: EvmAddress | null; + contract: NetworkAddress; + amount: Amount; +}; + export type Recipient = { recipient: EvmAddress; split: number }; export type MultirecipientFeeCollectOpenActionSettings = { @@ -2715,6 +2759,7 @@ export type PublicationMetadataLitEncryption = { __typename: 'PublicationMetadataLitEncryption'; encryptionKey: ContentEncryptionKey; encryptedPaths: Array; + accessControlContract: NetworkAddress; accessCondition: RootCondition; }; @@ -3218,6 +3263,7 @@ export type Post = { | LegacySimpleCollectModuleSettings | LegacyTimedFeeCollectModuleSettings | MultirecipientFeeCollectOpenActionSettings + | ProtocolSharedRevenueCollectOpenActionSettings | SimpleCollectOpenActionSettings | UnknownOpenActionModuleSettings >; @@ -3272,6 +3318,7 @@ export type CommentFields = { | LegacySimpleCollectModuleSettings | LegacyTimedFeeCollectModuleSettings | MultirecipientFeeCollectOpenActionSettings + | ProtocolSharedRevenueCollectOpenActionSettings | SimpleCollectOpenActionSettings | UnknownOpenActionModuleSettings >; @@ -3345,6 +3392,7 @@ export type QuoteFields = { | LegacySimpleCollectModuleSettings | LegacyTimedFeeCollectModuleSettings | MultirecipientFeeCollectOpenActionSettings + | ProtocolSharedRevenueCollectOpenActionSettings | SimpleCollectOpenActionSettings | UnknownOpenActionModuleSettings >; @@ -10443,6 +10491,16 @@ export const FragmentPublicationMetadataLitEncryption = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -12401,6 +12459,16 @@ export const FragmentAudioMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -13592,6 +13660,16 @@ export const FragmentVideoMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -14782,6 +14860,16 @@ export const FragmentImageMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -15959,6 +16047,16 @@ export const FragmentArticleMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -17167,6 +17265,16 @@ export const FragmentEventMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -18358,6 +18466,16 @@ export const FragmentLinkMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -19535,6 +19653,16 @@ export const FragmentEmbedMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -20722,6 +20850,16 @@ export const FragmentCheckingInMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -21669,6 +21807,16 @@ export const FragmentTextOnlyMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -22736,6 +22884,16 @@ export const FragmentThreeDMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -23928,6 +24086,16 @@ export const FragmentStoryMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -25107,6 +25275,16 @@ export const FragmentTransactionMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -26284,6 +26462,16 @@ export const FragmentMintMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -27463,6 +27651,16 @@ export const FragmentSpaceMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -28645,6 +28843,16 @@ export const FragmentLiveStreamMetadataV3 = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -30886,6 +31094,166 @@ export const FragmentMultirecipientFeeCollectOpenActionSettings = /*#__PURE__*/ }, ], } as unknown as DocumentNode; +export const FragmentProtocolSharedRevenueCollectOpenActionSettings = /*#__PURE__*/ { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'Erc20' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Erc20' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'symbol' } }, + { kind: 'Field', name: { kind: 'Name', value: 'decimals' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'FiatAmount' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'FiatAmount' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'asset' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Fiat' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'value' } }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'Fiat' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Fiat' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'symbol' } }, + { kind: 'Field', name: { kind: 'Name', value: 'decimals' } }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'Amount' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Amount' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'asset' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Erc20' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'value' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'rate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'request' }, + value: { + kind: 'ObjectValue', + fields: [ + { + kind: 'ObjectField', + name: { kind: 'Name', value: 'for' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'fxRateFor' } }, + }, + ], + }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'FiatAmount' } }], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'NetworkAddress' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'NetworkAddress' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'address' } }, + { kind: 'Field', name: { kind: 'Name', value: 'chainId' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; export const FragmentSimpleCollectOpenActionSettings = /*#__PURE__*/ { kind: 'Document', definitions: [ @@ -31909,6 +32277,25 @@ export const FragmentPost = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -33471,6 +33858,46 @@ export const FragmentPost = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -34098,6 +34525,16 @@ export const FragmentPost = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -37219,6 +37656,25 @@ export const FragmentQuoteFields = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -38789,6 +39245,46 @@ export const FragmentQuoteFields = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -39416,6 +39912,16 @@ export const FragmentQuoteFields = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -42565,6 +43071,25 @@ export const FragmentCommentFields = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -44162,6 +44687,46 @@ export const FragmentCommentFields = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -44789,6 +45354,16 @@ export const FragmentCommentFields = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -47951,6 +48526,25 @@ export const FragmentCommentFields = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -48546,6 +49140,25 @@ export const FragmentCommentFields = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -50208,6 +50821,46 @@ export const FragmentQuote = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -50835,6 +51488,16 @@ export const FragmentQuote = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -53997,6 +54660,25 @@ export const FragmentQuote = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -54620,6 +55302,25 @@ export const FragmentQuote = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -55250,6 +55951,25 @@ export const FragmentQuote = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -56878,6 +57598,46 @@ export const FragmentExplorePublication = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -57505,6 +58265,16 @@ export const FragmentExplorePublication = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -60667,6 +61437,25 @@ export const FragmentExplorePublication = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -61290,6 +62079,25 @@ export const FragmentExplorePublication = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -61920,6 +62728,25 @@ export const FragmentExplorePublication = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -63652,6 +64479,46 @@ export const FragmentComment = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -64279,6 +65146,16 @@ export const FragmentComment = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -67441,6 +68318,25 @@ export const FragmentComment = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -68064,6 +68960,25 @@ export const FragmentComment = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -68694,6 +69609,25 @@ export const FragmentComment = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -70372,6 +71306,46 @@ export const FragmentMirror = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -70999,6 +71973,16 @@ export const FragmentMirror = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -74161,6 +75145,25 @@ export const FragmentMirror = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -74784,6 +75787,25 @@ export const FragmentMirror = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -75484,6 +76506,25 @@ export const FragmentMirror = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -78216,6 +79257,46 @@ export const FragmentFeedItem = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -78843,6 +79924,16 @@ export const FragmentFeedItem = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -82005,6 +83096,25 @@ export const FragmentFeedItem = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -82628,6 +83738,25 @@ export const FragmentFeedItem = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -83404,6 +84533,25 @@ export const FragmentFeedItem = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -85092,6 +86240,46 @@ export const FragmentFeedHighlight = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -85719,6 +86907,16 @@ export const FragmentFeedHighlight = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -88881,6 +90079,25 @@ export const FragmentFeedHighlight = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -89504,6 +90721,25 @@ export const FragmentFeedHighlight = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -90134,6 +91370,25 @@ export const FragmentFeedHighlight = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -93856,6 +95111,46 @@ export const FragmentOpenActionPaidAction = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -94483,6 +95778,16 @@ export const FragmentOpenActionPaidAction = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -97645,6 +98950,25 @@ export const FragmentOpenActionPaidAction = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -98268,6 +99592,25 @@ export const FragmentOpenActionPaidAction = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -98968,6 +100311,25 @@ export const FragmentOpenActionPaidAction = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -100690,6 +102052,46 @@ export const FragmentAnyPublicationInternal = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -101317,6 +102719,16 @@ export const FragmentAnyPublicationInternal = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -104479,6 +105891,25 @@ export const FragmentAnyPublicationInternal = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -105102,6 +106533,25 @@ export const FragmentAnyPublicationInternal = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -105878,6 +107328,25 @@ export const FragmentAnyPublicationInternal = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -109953,6 +111422,46 @@ export const FragmentReactionNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -110580,6 +112089,16 @@ export const FragmentReactionNotification = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -113742,6 +115261,25 @@ export const FragmentReactionNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -114365,6 +115903,25 @@ export const FragmentReactionNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -115065,6 +116622,25 @@ export const FragmentReactionNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -116789,6 +118365,46 @@ export const FragmentCommentNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -117416,6 +119032,16 @@ export const FragmentCommentNotification = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -120578,6 +122204,25 @@ export const FragmentCommentNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -121201,6 +122846,25 @@ export const FragmentCommentNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -121901,6 +123565,25 @@ export const FragmentCommentNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -124538,6 +126221,46 @@ export const FragmentMirrorNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -125165,6 +126888,16 @@ export const FragmentMirrorNotification = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -128327,6 +130060,25 @@ export const FragmentMirrorNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -128950,6 +130702,25 @@ export const FragmentMirrorNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -129650,6 +131421,25 @@ export const FragmentMirrorNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -131353,6 +133143,46 @@ export const FragmentQuoteNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -131980,6 +133810,16 @@ export const FragmentQuoteNotification = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -135142,6 +136982,25 @@ export const FragmentQuoteNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -135765,6 +137624,25 @@ export const FragmentQuoteNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -136395,6 +138273,25 @@ export const FragmentQuoteNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -139306,6 +141203,46 @@ export const FragmentActedNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -140007,6 +141944,16 @@ export const FragmentActedNotification = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -143169,6 +145116,25 @@ export const FragmentActedNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -143792,6 +145758,25 @@ export const FragmentActedNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -144568,6 +146553,25 @@ export const FragmentActedNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -147284,6 +149288,46 @@ export const FragmentMentionNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -147911,6 +149955,16 @@ export const FragmentMentionNotification = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -151073,6 +153127,25 @@ export const FragmentMentionNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -151696,6 +153769,25 @@ export const FragmentMentionNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -152396,6 +154488,25 @@ export const FragmentMentionNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -154159,6 +156270,46 @@ export const FragmentNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -154860,6 +157011,16 @@ export const FragmentNotification = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -158022,6 +160183,25 @@ export const FragmentNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -158645,6 +160825,25 @@ export const FragmentNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -159421,6 +161620,25 @@ export const FragmentNotification = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -164750,6 +166968,46 @@ export const FragmentPublicationRevenue = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -165377,6 +167635,16 @@ export const FragmentPublicationRevenue = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -168539,6 +170807,25 @@ export const FragmentPublicationRevenue = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -169162,6 +171449,25 @@ export const FragmentPublicationRevenue = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -169938,6 +172244,25 @@ export const FragmentPublicationRevenue = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -172804,6 +175129,46 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -173431,6 +175796,16 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -176593,6 +178968,25 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -177216,6 +179610,25 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -177846,6 +180259,25 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -180966,6 +183398,46 @@ export const FeedDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -181593,6 +184065,16 @@ export const FeedDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -184755,6 +187237,25 @@ export const FeedDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -185378,6 +187879,25 @@ export const FeedDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -186154,6 +188674,25 @@ export const FeedDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -188038,6 +190577,46 @@ export const FeedHighlightsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -188665,6 +191244,16 @@ export const FeedHighlightsDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -191827,6 +194416,25 @@ export const FeedHighlightsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -192450,6 +195058,25 @@ export const FeedHighlightsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -193080,6 +195707,25 @@ export const FeedHighlightsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -195099,6 +197745,46 @@ export const LatestPaidActionsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -195726,6 +198412,16 @@ export const LatestPaidActionsDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -198888,6 +201584,25 @@ export const LatestPaidActionsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -199511,6 +202226,25 @@ export const LatestPaidActionsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -200211,6 +202945,25 @@ export const LatestPaidActionsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -204152,6 +206905,46 @@ export const NotificationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -204853,6 +207646,16 @@ export const NotificationsDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -208015,6 +210818,25 @@ export const NotificationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -208638,6 +211460,25 @@ export const NotificationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -209414,6 +212255,25 @@ export const NotificationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -224469,6 +227329,46 @@ export const PublicationDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -225096,6 +227996,16 @@ export const PublicationDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -228258,6 +231168,25 @@ export const PublicationDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -228881,6 +231810,25 @@ export const PublicationDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -229657,6 +232605,25 @@ export const PublicationDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -231567,6 +234534,46 @@ export const PublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -232194,6 +235201,16 @@ export const PublicationsDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -235356,6 +238373,25 @@ export const PublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -235979,6 +239015,25 @@ export const PublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -236755,6 +239810,25 @@ export const PublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -238892,6 +241966,46 @@ export const PublicationBookmarksDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -239519,6 +242633,16 @@ export const PublicationBookmarksDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -242681,6 +245805,25 @@ export const PublicationBookmarksDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -243304,6 +246447,25 @@ export const PublicationBookmarksDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -244080,6 +247242,25 @@ export const PublicationBookmarksDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -250881,6 +254062,46 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -251508,6 +254729,16 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -254670,6 +257901,25 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -255293,6 +258543,25 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -256069,6 +259338,25 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -257977,6 +261265,46 @@ export const RevenueFromPublicationDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -258604,6 +261932,16 @@ export const RevenueFromPublicationDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -261766,6 +265104,25 @@ export const RevenueFromPublicationDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -262389,6 +265746,25 @@ export const RevenueFromPublicationDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -263165,6 +266541,25 @@ export const RevenueFromPublicationDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -265409,6 +268804,46 @@ export const SearchPublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'Recipient' }, @@ -266036,6 +269471,16 @@ export const SearchPublicationsDocument = /*#__PURE__*/ { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -269198,6 +272643,25 @@ export const SearchPublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -269821,6 +273285,25 @@ export const SearchPublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -270521,6 +274004,25 @@ export const SearchPublicationsDocument = /*#__PURE__*/ { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -276553,6 +280055,29 @@ export type DidReactOnPublicationResultFieldPolicy = { publicationId?: FieldPolicy | FieldReadFunction; result?: FieldPolicy | FieldReadFunction; }; +export type DisputedReportKeySpecifier = ( + | 'createdAt' + | 'disputeReason' + | 'disputer' + | 'reportAdditionalInfo' + | 'reportReason' + | 'reportSubreason' + | 'reportedProfile' + | 'reportedPublication' + | 'reporter' + | DisputedReportKeySpecifier +)[]; +export type DisputedReportFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction; + disputeReason?: FieldPolicy | FieldReadFunction; + disputer?: FieldPolicy | FieldReadFunction; + reportAdditionalInfo?: FieldPolicy | FieldReadFunction; + reportReason?: FieldPolicy | FieldReadFunction; + reportSubreason?: FieldPolicy | FieldReadFunction; + reportedProfile?: FieldPolicy | FieldReadFunction; + reportedPublication?: FieldPolicy | FieldReadFunction; + reporter?: FieldPolicy | FieldReadFunction; +}; export type EIP712TypedDataDomainKeySpecifier = ( | 'chainId' | 'name' @@ -277423,6 +280948,25 @@ export type ModFollowerResultFieldPolicy = { follower?: FieldPolicy | FieldReadFunction; following?: FieldPolicy | FieldReadFunction; }; +export type ModReportKeySpecifier = ( + | 'additionalInfo' + | 'createdAt' + | 'reason' + | 'reportedProfile' + | 'reportedPublication' + | 'reporter' + | 'subreason' + | ModReportKeySpecifier +)[]; +export type ModReportFieldPolicy = { + additionalInfo?: FieldPolicy | FieldReadFunction; + createdAt?: FieldPolicy | FieldReadFunction; + reason?: FieldPolicy | FieldReadFunction; + reportedProfile?: FieldPolicy | FieldReadFunction; + reportedPublication?: FieldPolicy | FieldReadFunction; + reporter?: FieldPolicy | FieldReadFunction; + subreason?: FieldPolicy | FieldReadFunction; +}; export type ModuleInfoKeySpecifier = ('name' | 'type' | ModuleInfoKeySpecifier)[]; export type ModuleInfoFieldPolicy = { name?: FieldPolicy | FieldReadFunction; @@ -277659,6 +281203,7 @@ export type MutationKeySpecifier = ( | 'linkHandleToProfile' | 'mirrorOnMomoka' | 'mirrorOnchain' + | 'modDisputeReport' | 'nftOwnershipChallenge' | 'peerToPeerRecommend' | 'peerToPeerUnrecommend' @@ -277749,6 +281294,7 @@ export type MutationFieldPolicy = { linkHandleToProfile?: FieldPolicy | FieldReadFunction; mirrorOnMomoka?: FieldPolicy | FieldReadFunction; mirrorOnchain?: FieldPolicy | FieldReadFunction; + modDisputeReport?: FieldPolicy | FieldReadFunction; nftOwnershipChallenge?: FieldPolicy | FieldReadFunction; peerToPeerRecommend?: FieldPolicy | FieldReadFunction; peerToPeerUnrecommend?: FieldPolicy | FieldReadFunction; @@ -277954,6 +281500,15 @@ export type PaginatedCurrenciesResultFieldPolicy = { items?: FieldPolicy | FieldReadFunction; pageInfo?: FieldPolicy | FieldReadFunction; }; +export type PaginatedDisputedReportsKeySpecifier = ( + | 'items' + | 'pageInfo' + | PaginatedDisputedReportsKeySpecifier +)[]; +export type PaginatedDisputedReportsFieldPolicy = { + items?: FieldPolicy | FieldReadFunction; + pageInfo?: FieldPolicy | FieldReadFunction; +}; export type PaginatedExplorePublicationResultKeySpecifier = ( | 'items' | 'pageInfo' @@ -278008,6 +281563,15 @@ export type PaginatedModFollowersResultFieldPolicy = { items?: FieldPolicy | FieldReadFunction; pageInfo?: FieldPolicy | FieldReadFunction; }; +export type PaginatedModReportsKeySpecifier = ( + | 'items' + | 'pageInfo' + | PaginatedModReportsKeySpecifier +)[]; +export type PaginatedModReportsFieldPolicy = { + items?: FieldPolicy | FieldReadFunction; + pageInfo?: FieldPolicy | FieldReadFunction; +}; export type PaginatedNftCollectionsResultKeySpecifier = ( | 'items' | 'pageInfo' @@ -278486,6 +282050,31 @@ export type ProfilesManagedResultFieldPolicy = { address?: FieldPolicy | FieldReadFunction; isLensManager?: FieldPolicy | FieldReadFunction; }; +export type ProtocolSharedRevenueCollectOpenActionSettingsKeySpecifier = ( + | 'amount' + | 'collectLimit' + | 'collectNft' + | 'contract' + | 'creatorClient' + | 'endsAt' + | 'followerOnly' + | 'recipient' + | 'referralFee' + | 'type' + | ProtocolSharedRevenueCollectOpenActionSettingsKeySpecifier +)[]; +export type ProtocolSharedRevenueCollectOpenActionSettingsFieldPolicy = { + amount?: FieldPolicy | FieldReadFunction; + collectLimit?: FieldPolicy | FieldReadFunction; + collectNft?: FieldPolicy | FieldReadFunction; + contract?: FieldPolicy | FieldReadFunction; + creatorClient?: FieldPolicy | FieldReadFunction; + endsAt?: FieldPolicy | FieldReadFunction; + followerOnly?: FieldPolicy | FieldReadFunction; + recipient?: FieldPolicy | FieldReadFunction; + referralFee?: FieldPolicy | FieldReadFunction; + type?: FieldPolicy | FieldReadFunction; +}; export type PublicationMarketplaceMetadataAttributeKeySpecifier = ( | 'displayType' | 'traitType' @@ -278674,8 +282263,10 @@ export type QueryKeySpecifier = ( | 'lensAPIOwnedEOAs' | 'lensProtocolVersion' | 'lensTransactionStatus' + | 'modDisputedReports' | 'modExplorePublications' | 'modFollowers' + | 'modLatestReports' | 'moduleMetadata' | 'momokaSubmitters' | 'momokaSummary' @@ -278766,8 +282357,10 @@ export type QueryFieldPolicy = { lensAPIOwnedEOAs?: FieldPolicy | FieldReadFunction; lensProtocolVersion?: FieldPolicy | FieldReadFunction; lensTransactionStatus?: FieldPolicy | FieldReadFunction; + modDisputedReports?: FieldPolicy | FieldReadFunction; modExplorePublications?: FieldPolicy | FieldReadFunction; modFollowers?: FieldPolicy | FieldReadFunction; + modLatestReports?: FieldPolicy | FieldReadFunction; moduleMetadata?: FieldPolicy | FieldReadFunction; momokaSubmitters?: FieldPolicy | FieldReadFunction; momokaSummary?: FieldPolicy | FieldReadFunction; @@ -280077,6 +283670,10 @@ export type StrictTypedTypePolicies = { | (() => undefined | DidReactOnPublicationResultKeySpecifier); fields?: DidReactOnPublicationResultFieldPolicy; }; + DisputedReport?: Omit & { + keyFields?: false | DisputedReportKeySpecifier | (() => undefined | DisputedReportKeySpecifier); + fields?: DisputedReportFieldPolicy; + }; EIP712TypedDataDomain?: Omit & { keyFields?: | false @@ -280473,6 +284070,10 @@ export type StrictTypedTypePolicies = { | (() => undefined | ModFollowerResultKeySpecifier); fields?: ModFollowerResultFieldPolicy; }; + ModReport?: Omit & { + keyFields?: false | ModReportKeySpecifier | (() => undefined | ModReportKeySpecifier); + fields?: ModReportFieldPolicy; + }; ModuleInfo?: Omit & { keyFields?: false | ModuleInfoKeySpecifier | (() => undefined | ModuleInfoKeySpecifier); fields?: ModuleInfoFieldPolicy; @@ -280654,6 +284255,13 @@ export type StrictTypedTypePolicies = { | (() => undefined | PaginatedCurrenciesResultKeySpecifier); fields?: PaginatedCurrenciesResultFieldPolicy; }; + PaginatedDisputedReports?: Omit & { + keyFields?: + | false + | PaginatedDisputedReportsKeySpecifier + | (() => undefined | PaginatedDisputedReportsKeySpecifier); + fields?: PaginatedDisputedReportsFieldPolicy; + }; PaginatedExplorePublicationResult?: Omit & { keyFields?: | false @@ -280696,6 +284304,13 @@ export type StrictTypedTypePolicies = { | (() => undefined | PaginatedModFollowersResultKeySpecifier); fields?: PaginatedModFollowersResultFieldPolicy; }; + PaginatedModReports?: Omit & { + keyFields?: + | false + | PaginatedModReportsKeySpecifier + | (() => undefined | PaginatedModReportsKeySpecifier); + fields?: PaginatedModReportsFieldPolicy; + }; PaginatedNftCollectionsResult?: Omit & { keyFields?: | false @@ -280930,6 +284545,13 @@ export type StrictTypedTypePolicies = { | (() => undefined | ProfilesManagedResultKeySpecifier); fields?: ProfilesManagedResultFieldPolicy; }; + ProtocolSharedRevenueCollectOpenActionSettings?: Omit & { + keyFields?: + | false + | ProtocolSharedRevenueCollectOpenActionSettingsKeySpecifier + | (() => undefined | ProtocolSharedRevenueCollectOpenActionSettingsKeySpecifier); + fields?: ProtocolSharedRevenueCollectOpenActionSettingsFieldPolicy; + }; PublicationMarketplaceMetadataAttribute?: Omit & { keyFields?: | false @@ -281289,6 +284911,7 @@ const result: PossibleTypesResultData = { 'LegacySimpleCollectModuleSettings', 'LegacyTimedFeeCollectModuleSettings', 'MultirecipientFeeCollectOpenActionSettings', + 'ProtocolSharedRevenueCollectOpenActionSettings', 'SimpleCollectOpenActionSettings', 'UnknownOpenActionModuleSettings', ], diff --git a/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts b/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts index 98580acb89..2ff196e2a0 100644 --- a/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts +++ b/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts @@ -1,21 +1,31 @@ -import { Erc20Amount, EvmAddress, FiatAmount } from '@lens-protocol/shared-kernel'; +import { + Amount, + ChainType, + Erc20Amount, + EvmAddress, + FiatAmount, + erc20, +} from '@lens-protocol/shared-kernel'; import * as gql from '../graphql/generated'; import { OpenActionModuleSettings, PrimaryPublication } from '../publication'; import { erc20Amount, fiatAmount } from './amount'; -export type CollectModuleSettings = +export type LegacyCollectModuleSettings = | gql.LegacyAaveFeeCollectModuleSettings | gql.LegacyErc4626FeeCollectModuleSettings | gql.LegacyFeeCollectModuleSettings + | gql.LegacyFreeCollectModuleSettings | gql.LegacyLimitedFeeCollectModuleSettings | gql.LegacyLimitedTimedFeeCollectModuleSettings | gql.LegacyMultirecipientFeeCollectModuleSettings - | gql.LegacyTimedFeeCollectModuleSettings | gql.LegacySimpleCollectModuleSettings - | gql.LegacyFreeCollectModuleSettings - | gql.MultirecipientFeeCollectOpenActionSettings - | gql.SimpleCollectOpenActionSettings; + | gql.LegacyTimedFeeCollectModuleSettings; + +export type CollectModuleSettings = Exclude< + OpenActionModuleSettings, + gql.UnknownOpenActionModuleSettings | gql.LegacyRevertCollectModuleSettings +>; const ModulesWithKnownCollectCapability: Record = { LegacyAaveFeeCollectModuleSettings: true, @@ -29,6 +39,7 @@ const ModulesWithKnownCollectCapability: Record, +): CollectFee | MultirecipientCollectFee | null { + const amount = erc20Amount(module.amount); - if (erc20.isZero()) return undefined; + if (amount.isZero()) return null; const shared = { - amount: erc20, + amount, rate: module.amount.rate ? fiatAmount(module.amount.rate) : undefined, referralFee: module.referralFee, }; @@ -130,6 +202,27 @@ function buildCollectFee( }; } +function buildMintFee( + module: gql.ProtocolSharedRevenueCollectOpenActionSettings, +): SharedMintFee | null { + // TODO replace with data from `module` once available + const bonsai = erc20({ + address: '0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c', + chainType: ChainType.POLYGON, + decimals: 18, + name: 'BONSAI', + symbol: 'BONSAI', + }); + const amount = Amount.erc20(bonsai, 10); + + if (amount.isZero()) return null; + + return { + amount, + creatorClient: module.creatorClient, + }; +} + /** * Resolve API's {@link OpenActionModuleSettings} to more user friendly {@link CollectPolicy}. * @@ -141,7 +234,6 @@ export function resolveCollectPolicy(collectable: PrimaryPublication): CollectPo if (!module) return null; - const fee = buildCollectFee(module); const shared = { followerOnly: module.followerOnly, contract: module.contract, @@ -149,56 +241,73 @@ export function resolveCollectPolicy(collectable: PrimaryPublication): CollectPo switch (module.__typename) { case 'LegacyAaveFeeCollectModuleSettings': - case 'LegacyERC4626FeeCollectModuleSettings': { + case 'LegacyERC4626FeeCollectModuleSettings': return { ...shared, collectNft: null, collectLimit: module.collectLimit, endsAt: module.endsAt, - fee, + fee: buildCollectFee(module), }; - } + case 'LegacyLimitedFeeCollectModuleSettings': - case 'LegacyLimitedTimedFeeCollectModuleSettings': { + case 'LegacyLimitedTimedFeeCollectModuleSettings': return { ...shared, collectNft: module.collectNft, collectLimit: module.collectLimit, endsAt: null, - fee, + fee: buildCollectFee(module), }; - } + case 'LegacyFeeCollectModuleSettings': - case 'LegacyTimedFeeCollectModuleSettings': { + case 'LegacyTimedFeeCollectModuleSettings': return { ...shared, collectNft: module.collectNft, collectLimit: null, endsAt: null, - fee, + fee: buildCollectFee(module), }; - } + case 'LegacyFreeCollectModuleSettings': return { ...shared, collectNft: module.collectNft, collectLimit: null, endsAt: null, + fee: null, }; + case 'LegacyMultirecipientFeeCollectModuleSettings': case 'MultirecipientFeeCollectOpenActionSettings': + return { + ...shared, + collectNft: module.collectNft, + collectLimit: module.collectLimit, + endsAt: module.endsAt, + fee: buildCollectFee(module), + }; + case 'LegacySimpleCollectModuleSettings': - case 'SimpleCollectOpenActionSettings': { + case 'SimpleCollectOpenActionSettings': return { ...shared, collectNft: module.collectNft, collectLimit: module.collectLimit, endsAt: module.endsAt, - fee, + fee: buildCollectFee(module), }; - } - default: - return null; + case 'ProtocolSharedRevenueCollectOpenActionSettings': { + return { + ...shared, + collectNft: module.collectNft, + collectLimit: module.collectLimit, + endsAt: module.endsAt, + fee: buildCollectFee(module), + mintFee: buildMintFee(module), + }; + } } } diff --git a/packages/api-bindings/src/lens/utils/__tests__/token-allowance.spec.ts b/packages/api-bindings/src/lens/utils/__tests__/token-allowance.spec.ts deleted file mode 100644 index 6d2059e266..0000000000 --- a/packages/api-bindings/src/lens/utils/__tests__/token-allowance.spec.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { TransactionKind } from '@lens-protocol/domain/entities'; -import { - TokenAllowanceLimit, - TokenAllowanceRequest, -} from '@lens-protocol/domain/use-cases/transactions'; -import { mockDaiAmount, mockEvmAddress } from '@lens-protocol/shared-kernel/mocks'; - -import { - mockAmountFragmentFrom, - mockCommentFragment, - mockFeeFollowModuleSettingsFragment, - mockLegacyAaveFeeCollectModuleSettingsFragment, - mockLegacyErc4626FeeCollectModuleSettingsFragment, - mockLegacyFeeCollectModuleSettingsFragment, - mockLegacyLimitedFeeCollectModuleSettingsFragment, - mockLegacyLimitedTimedFeeCollectModuleSettingsFragment, - mockLegacyMultirecipientFeeCollectModuleSettingsFragment, - mockLegacySimpleCollectModuleSettingsFragment, - mockLegacyTimedFeeCollectModuleSettingsFragment, - mockMirrorFragment, - mockMultirecipientFeeCollectOpenActionSettingsFragment, - mockNetworkAddressFragment, - mockPostFragment, - mockProfileFragment, - mockQuoteFragment, - mockSimpleCollectOpenActionSettingsFragment, -} from '../../__helpers__'; -import { AnyPublication } from '../../publication'; -import { CollectModuleSettings } from '../CollectModuleSettings'; -import { resolveTokenAllowanceRequest } from '../token-allowance'; - -const amount = mockDaiAmount(42); -const spender = mockEvmAddress(); - -function assertExpectedTokenAllowanceRequest(request: TokenAllowanceRequest) { - expect(request).toEqual({ - kind: TransactionKind.APPROVE_MODULE, - amount, - limit: TokenAllowanceLimit.EXACT, - spender, - }); -} - -describe(`Given the ${resolveTokenAllowanceRequest.name} helper`, () => { - describe(`when the item is a Profile`, () => { - const item = mockProfileFragment({ - followModule: mockFeeFollowModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - }); - - describe('configured with FeeFollowModuleSettings', () => { - it('should return the expected TokenAllowanceRequest', () => { - const request = resolveTokenAllowanceRequest(item, TokenAllowanceLimit.EXACT); - - assertExpectedTokenAllowanceRequest(request); - }); - }); - }); - - describe.each<{ - name: string; - mockPublicationWith: (settings: CollectModuleSettings) => AnyPublication; - }>([ - { - name: 'Post', - mockPublicationWith: (settings) => - mockPostFragment({ - openActionModules: [settings], - }), - }, - { - name: 'Comment', - mockPublicationWith: (settings) => - mockCommentFragment({ - openActionModules: [settings], - }), - }, - { - name: 'Quote', - mockPublicationWith: (settings) => - mockQuoteFragment({ - openActionModules: [settings], - }), - }, - { - name: 'Mirror for a Post', - mockPublicationWith: (settings) => - mockMirrorFragment({ - mirrorOn: mockPostFragment({ - openActionModules: [settings], - }), - }), - }, - ])(`when the item is a $name`, ({ mockPublicationWith }) => { - describe.each([ - mockSimpleCollectOpenActionSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockMultirecipientFeeCollectOpenActionSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockLegacyFeeCollectModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockLegacyLimitedFeeCollectModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockLegacyLimitedTimedFeeCollectModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockLegacyTimedFeeCollectModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockLegacyMultirecipientFeeCollectModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockLegacySimpleCollectModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockLegacyErc4626FeeCollectModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - - mockLegacyAaveFeeCollectModuleSettingsFragment({ - amount: mockAmountFragmentFrom(amount), - contract: mockNetworkAddressFragment({ address: spender }), - }), - ])('configured with $__typename', (settings) => { - it('should return the expected TokenAllowanceRequest', () => { - const item = mockPublicationWith(settings); - const request = resolveTokenAllowanceRequest(item, TokenAllowanceLimit.EXACT); - - assertExpectedTokenAllowanceRequest(request); - }); - }); - }); -}); diff --git a/packages/api-bindings/src/lens/utils/index.ts b/packages/api-bindings/src/lens/utils/index.ts index 5152632150..50329158be 100644 --- a/packages/api-bindings/src/lens/utils/index.ts +++ b/packages/api-bindings/src/lens/utils/index.ts @@ -2,5 +2,4 @@ export * from './amount'; export * from './CollectModuleSettings'; export * from './omitTypename'; export * from './publication'; -export * from './token-allowance'; export * from './types'; diff --git a/packages/api-bindings/src/lens/utils/token-allowance.ts b/packages/api-bindings/src/lens/utils/token-allowance.ts deleted file mode 100644 index 4ba723bd2e..0000000000 --- a/packages/api-bindings/src/lens/utils/token-allowance.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { TransactionKind } from '@lens-protocol/domain/entities'; -import { - TokenAllowanceLimit, - TokenAllowanceRequest, -} from '@lens-protocol/domain/use-cases/transactions'; -import { assertNever, invariant, never } from '@lens-protocol/shared-kernel'; - -import { Profile } from '../graphql/generated'; -import { AnyPublication, PrimaryPublication } from '../publication'; -import { findCollectModuleSettings } from './CollectModuleSettings'; -import { erc20Amount } from './amount'; - -function resolveTokenAllowanceRequestForCollect( - publication: PrimaryPublication, - limit: TokenAllowanceLimit, -): TokenAllowanceRequest { - const module = findCollectModuleSettings(publication); - - invariant(module, `Publication ${publication.id} has no collect module`); - - switch (module.__typename) { - case 'LegacyAaveFeeCollectModuleSettings': - case 'LegacyERC4626FeeCollectModuleSettings': - case 'LegacyFeeCollectModuleSettings': - case 'LegacyLimitedFeeCollectModuleSettings': - case 'LegacyLimitedTimedFeeCollectModuleSettings': - case 'LegacyMultirecipientFeeCollectModuleSettings': - case 'LegacySimpleCollectModuleSettings': - case 'LegacyTimedFeeCollectModuleSettings': - case 'MultirecipientFeeCollectOpenActionSettings': - case 'SimpleCollectOpenActionSettings': - return { - kind: TransactionKind.APPROVE_MODULE, - amount: erc20Amount(module.amount), - limit, - spender: module.contract.address, - }; - - default: - never(`Unsupported collect module type ${module.__typename}`); - } -} - -function resolveTokenAllowanceRequestForFollow( - profile: Profile, - limit: TokenAllowanceLimit, -): TokenAllowanceRequest { - invariant(profile.followModule, `Profile ${profile.id} has no follow module`); - - switch (profile.followModule.__typename) { - case 'FeeFollowModuleSettings': - return { - kind: TransactionKind.APPROVE_MODULE, - amount: erc20Amount(profile.followModule.amount), - limit, - spender: profile.followModule.contract.address, - }; - default: - never(`Unsupported follow module type ${profile.followModule.__typename}`); - } -} - -export function resolveTokenAllowanceRequest( - item: AnyPublication | Profile, - limit: TokenAllowanceLimit, -): TokenAllowanceRequest { - switch (item.__typename) { - case 'Mirror': - return resolveTokenAllowanceRequestForCollect(item.mirrorOn, limit); - - case 'Comment': - case 'Post': - case 'Quote': - return resolveTokenAllowanceRequestForCollect(item, limit); - - case 'Profile': - return resolveTokenAllowanceRequestForFollow(item, limit); - - default: - assertNever(item); - } -} diff --git a/packages/blockchain-bindings/src/abi/PublicActProxy.json b/packages/blockchain-bindings/src/abi/PublicActProxy.json index 4b44d7900b..c388925d37 100644 --- a/packages/blockchain-bindings/src/abi/PublicActProxy.json +++ b/packages/blockchain-bindings/src/abi/PublicActProxy.json @@ -1,109 +1,433 @@ [ { + "type": "constructor", "inputs": [ - { "internalType": "address", "name": "lensHub", "type": "address" }, - { "internalType": "address", "name": "collectPublicationAction", "type": "address" } + { + "name": "lensHub", + "type": "address", + "internalType": "address" + }, + { + "name": "collectPublicationAction", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "COLLECT_PUBLICATION_ACTION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract CollectPublicationAction" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "HUB", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ILensHub" + } ], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "view" }, { - "inputs": [{ "internalType": "uint8", "name": "increment", "type": "uint8" }], + "type": "function", "name": "incrementNonce", + "inputs": [ + { + "name": "increment", + "type": "uint8", + "internalType": "uint8" + } + ], "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { - "inputs": [], + "type": "function", "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "pure", - "type": "function" + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" }, { - "inputs": [{ "internalType": "address", "name": "signer", "type": "address" }], + "type": "function", "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" + "inputs": [ + { + "name": "signer", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" }, { + "type": "function", + "name": "publicCollect", "inputs": [ { - "components": [ - { "internalType": "uint256", "name": "publicationActedProfileId", "type": "uint256" }, - { "internalType": "uint256", "name": "publicationActedId", "type": "uint256" }, - { "internalType": "uint256", "name": "actorProfileId", "type": "uint256" }, - { "internalType": "uint256[]", "name": "referrerProfileIds", "type": "uint256[]" }, - { "internalType": "uint256[]", "name": "referrerPubIds", "type": "uint256[]" }, - { "internalType": "address", "name": "actionModuleAddress", "type": "address" }, - { "internalType": "bytes", "name": "actionModuleData", "type": "bytes" } - ], - "internalType": "struct Types.PublicationActionParams", "name": "publicationActionParams", - "type": "tuple" + "type": "tuple", + "internalType": "struct Types.PublicationActionParams", + "components": [ + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] } ], - "name": "publicCollect", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "publicCollectWithSig", "inputs": [ { - "components": [ - { "internalType": "uint256", "name": "publicationActedProfileId", "type": "uint256" }, - { "internalType": "uint256", "name": "publicationActedId", "type": "uint256" }, - { "internalType": "uint256", "name": "actorProfileId", "type": "uint256" }, - { "internalType": "uint256[]", "name": "referrerProfileIds", "type": "uint256[]" }, - { "internalType": "uint256[]", "name": "referrerPubIds", "type": "uint256[]" }, - { "internalType": "address", "name": "actionModuleAddress", "type": "address" }, - { "internalType": "bytes", "name": "actionModuleData", "type": "bytes" } - ], - "internalType": "struct Types.PublicationActionParams", "name": "publicationActionParams", - "type": "tuple" + "type": "tuple", + "internalType": "struct Types.PublicationActionParams", + "components": [ + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] }, { - "components": [ - { "internalType": "address", "name": "signer", "type": "address" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" } - ], - "internalType": "struct Types.EIP712Signature", "name": "signature", - "type": "tuple" + "type": "tuple", + "internalType": "struct Types.EIP712Signature", + "components": [ + { + "name": "signer", + "type": "address", + "internalType": "address" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ] } ], - "name": "publicCollectWithSig", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "publicFreeAct", "inputs": [ { + "name": "publicationActionParams", + "type": "tuple", + "internalType": "struct Types.PublicationActionParams", "components": [ - { "internalType": "uint256", "name": "publicationActedProfileId", "type": "uint256" }, - { "internalType": "uint256", "name": "publicationActedId", "type": "uint256" }, - { "internalType": "uint256", "name": "actorProfileId", "type": "uint256" }, - { "internalType": "uint256[]", "name": "referrerProfileIds", "type": "uint256[]" }, - { "internalType": "uint256[]", "name": "referrerPubIds", "type": "uint256[]" }, - { "internalType": "address", "name": "actionModuleAddress", "type": "address" }, - { "internalType": "bytes", "name": "actionModuleData", "type": "bytes" } - ], + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "publicPaidAct", + "inputs": [ + { + "name": "publicationActionParams", + "type": "tuple", "internalType": "struct Types.PublicationActionParams", + "components": [ + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "currency", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "approveTo", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "publicPaidActWithSig", + "inputs": [ + { "name": "publicationActionParams", - "type": "tuple" + "type": "tuple", + "internalType": "struct Types.PublicationActionParams", + "components": [ + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "currency", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "approveTo", + "type": "address", + "internalType": "address" + }, + { + "name": "signature", + "type": "tuple", + "internalType": "struct Types.EIP712Signature", + "components": [ + { + "name": "signer", + "type": "address", + "internalType": "address" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ] } ], - "name": "publicFreeAct", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" } ] diff --git a/packages/blockchain-bindings/src/types/PublicActProxy.ts b/packages/blockchain-bindings/src/types/PublicActProxy.ts index 10d47fd4c2..9f2661ed13 100644 --- a/packages/blockchain-bindings/src/types/PublicActProxy.ts +++ b/packages/blockchain-bindings/src/types/PublicActProxy.ts @@ -1,8 +1,6 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -import type { FunctionFragment, Result } from '@ethersproject/abi'; -import type { Listener, Provider } from '@ethersproject/providers'; import type { BaseContract, BigNumber, @@ -15,12 +13,14 @@ import type { Signer, utils, } from 'ethers'; +import type { FunctionFragment, Result } from '@ethersproject/abi'; +import type { Listener, Provider } from '@ethersproject/providers'; import type { - OnEvent, - PromiseOrValue, - TypedEvent, TypedEventFilter, + TypedEvent, TypedListener, + OnEvent, + PromiseOrValue, } from './common'; export declare namespace Types { @@ -71,24 +71,34 @@ export declare namespace Types { export interface PublicActProxyInterface extends utils.Interface { functions: { + 'COLLECT_PUBLICATION_ACTION()': FunctionFragment; + 'HUB()': FunctionFragment; 'incrementNonce(uint8)': FunctionFragment; 'name()': FunctionFragment; 'nonces(address)': FunctionFragment; 'publicCollect((uint256,uint256,uint256,uint256[],uint256[],address,bytes))': FunctionFragment; 'publicCollectWithSig((uint256,uint256,uint256,uint256[],uint256[],address,bytes),(address,uint8,bytes32,bytes32,uint256))': FunctionFragment; 'publicFreeAct((uint256,uint256,uint256,uint256[],uint256[],address,bytes))': FunctionFragment; + 'publicPaidAct((uint256,uint256,uint256,uint256[],uint256[],address,bytes),address,uint256,address)': FunctionFragment; + 'publicPaidActWithSig((uint256,uint256,uint256,uint256[],uint256[],address,bytes),address,uint256,address,(address,uint8,bytes32,bytes32,uint256))': FunctionFragment; }; getFunction( nameOrSignatureOrTopic: + | 'COLLECT_PUBLICATION_ACTION' + | 'HUB' | 'incrementNonce' | 'name' | 'nonces' | 'publicCollect' | 'publicCollectWithSig' - | 'publicFreeAct', + | 'publicFreeAct' + | 'publicPaidAct' + | 'publicPaidActWithSig', ): FunctionFragment; + encodeFunctionData(functionFragment: 'COLLECT_PUBLICATION_ACTION', values?: undefined): string; + encodeFunctionData(functionFragment: 'HUB', values?: undefined): string; encodeFunctionData( functionFragment: 'incrementNonce', values: [PromiseOrValue], @@ -107,13 +117,36 @@ export interface PublicActProxyInterface extends utils.Interface { functionFragment: 'publicFreeAct', values: [Types.PublicationActionParamsStruct], ): string; + encodeFunctionData( + functionFragment: 'publicPaidAct', + values: [ + Types.PublicationActionParamsStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'publicPaidActWithSig', + values: [ + Types.PublicationActionParamsStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + Types.EIP712SignatureStruct, + ], + ): string; + decodeFunctionResult(functionFragment: 'COLLECT_PUBLICATION_ACTION', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'HUB', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'incrementNonce', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'nonces', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'publicCollect', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'publicCollectWithSig', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'publicFreeAct', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'publicPaidAct', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'publicPaidActWithSig', data: BytesLike): Result; events: {}; } @@ -143,6 +176,10 @@ export interface PublicActProxy extends BaseContract { removeListener: OnEvent; functions: { + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise<[string]>; + + HUB(overrides?: CallOverrides): Promise<[string]>; + incrementNonce( increment: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -167,8 +204,29 @@ export interface PublicActProxy extends BaseContract { publicationActionParams: Types.PublicationActionParamsStruct, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; }; + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise; + + HUB(overrides?: CallOverrides): Promise; + incrementNonce( increment: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -194,7 +252,28 @@ export interface PublicActProxy extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + callStatic: { + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise; + + HUB(overrides?: CallOverrides): Promise; + incrementNonce( increment: PromiseOrValue, overrides?: CallOverrides, @@ -219,11 +298,32 @@ export interface PublicActProxy extends BaseContract { publicationActionParams: Types.PublicationActionParamsStruct, overrides?: CallOverrides, ): Promise; + + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: CallOverrides, + ): Promise; }; filters: {}; estimateGas: { + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise; + + HUB(overrides?: CallOverrides): Promise; + incrementNonce( increment: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -248,9 +348,30 @@ export interface PublicActProxy extends BaseContract { publicationActionParams: Types.PublicationActionParamsStruct, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; }; populateTransaction: { + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise; + + HUB(overrides?: CallOverrides): Promise; + incrementNonce( increment: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -278,5 +399,22 @@ export interface PublicActProxy extends BaseContract { publicationActionParams: Types.PublicationActionParamsStruct, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; }; } diff --git a/packages/client/codegen-api.yml b/packages/client/codegen-api.yml index c665f8f385..fe924d0046 100644 --- a/packages/client/codegen-api.yml +++ b/packages/client/codegen-api.yml @@ -56,8 +56,8 @@ config: schema: # - https://api-amoy.lens-v2.crtlkey.com/ # staging - - https://api-v2-amoy.lens.dev/ # testnet - # - http://localhost:4000/ + # - https://api-v2-amoy.lens.dev/ # testnet + - http://localhost:4000/ documents: - src/**/*.graphql generates: diff --git a/packages/client/src/graphql/fragments.generated.ts b/packages/client/src/graphql/fragments.generated.ts index a5827d5551..8f12556934 100644 --- a/packages/client/src/graphql/fragments.generated.ts +++ b/packages/client/src/graphql/fragments.generated.ts @@ -285,6 +285,20 @@ export type SimpleCollectOpenActionSettingsFragment = { amount: AmountFragment; }; +export type ProtocolSharedRevenueCollectOpenActionSettingsFragment = { + __typename: 'ProtocolSharedRevenueCollectOpenActionSettings'; + type: Types.OpenActionModuleType; + collectNft: string | null; + recipient: string; + referralFee: number; + followerOnly: boolean; + collectLimit: string | null; + endsAt: string | null; + creatorClient: string | null; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + export type MultirecipientFeeCollectOpenActionSettingsFragment = { __typename: 'MultirecipientFeeCollectOpenActionSettings'; type: Types.OpenActionModuleType; @@ -479,6 +493,7 @@ export type PublicationMetadataLitEncryptionFragment = { __typename: 'PublicationMetadataLitEncryption'; encryptionKey: string; encryptedPaths: Array; + accessControlContract: NetworkAddressFragment; accessCondition: RootConditionFragment; }; @@ -1078,6 +1093,7 @@ export type PostFragment = { | LegacySimpleCollectModuleSettingsFragment | LegacyTimedFeeCollectModuleSettingsFragment | MultirecipientFeeCollectOpenActionSettingsFragment + | ProtocolSharedRevenueCollectOpenActionSettingsFragment | SimpleCollectOpenActionSettingsFragment | UnknownOpenActionModuleSettingsFragment >; @@ -1131,6 +1147,7 @@ export type CommentBaseFragment = { | LegacySimpleCollectModuleSettingsFragment | LegacyTimedFeeCollectModuleSettingsFragment | MultirecipientFeeCollectOpenActionSettingsFragment + | ProtocolSharedRevenueCollectOpenActionSettingsFragment | SimpleCollectOpenActionSettingsFragment | UnknownOpenActionModuleSettingsFragment >; @@ -1203,6 +1220,7 @@ export type QuoteBaseFragment = { | LegacySimpleCollectModuleSettingsFragment | LegacyTimedFeeCollectModuleSettingsFragment | MultirecipientFeeCollectOpenActionSettingsFragment + | ProtocolSharedRevenueCollectOpenActionSettingsFragment | SimpleCollectOpenActionSettingsFragment | UnknownOpenActionModuleSettingsFragment >; @@ -5962,6 +5980,16 @@ export const PublicationMetadataLitEncryptionFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -8010,6 +8038,16 @@ export const AudioMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -9261,6 +9299,16 @@ export const VideoMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -10511,6 +10559,16 @@ export const ImageMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -11748,6 +11806,16 @@ export const ArticleMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -13016,6 +13084,16 @@ export const EventMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -14267,6 +14345,16 @@ export const LinkMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -15504,6 +15592,16 @@ export const EmbedMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -16751,6 +16849,16 @@ export const CheckingInMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -17752,6 +17860,16 @@ export const TextOnlyMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -18915,6 +19033,16 @@ export const ThreeDMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -20167,6 +20295,16 @@ export const StoryMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -21406,6 +21544,16 @@ export const TransactionMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -22643,6 +22791,16 @@ export const MintMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -23882,6 +24040,16 @@ export const SpaceMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -25124,6 +25292,16 @@ export const LiveStreamMetadataV3FragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -27426,15 +27604,15 @@ export const MultirecipientFeeCollectOpenActionSettingsFragmentDoc = { }, ], } as unknown as DocumentNode; -export const SimpleCollectOpenActionSettingsFragmentDoc = { +export const ProtocolSharedRevenueCollectOpenActionSettingsFragmentDoc = { kind: 'Document', definitions: [ { kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, typeCondition: { kind: 'NamedType', - name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, }, selectionSet: { kind: 'SelectionSet', @@ -27465,6 +27643,7 @@ export const SimpleCollectOpenActionSettingsFragmentDoc = { { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, ], }, }, @@ -27591,139 +27770,304 @@ export const SimpleCollectOpenActionSettingsFragmentDoc = { }, ], } as unknown as DocumentNode; -export const UnknownOpenActionModuleSettingsFragmentDoc = { - kind: 'Document', - definitions: [ - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'UnknownOpenActionModuleSettings' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'UnknownOpenActionModuleSettings' }, - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, - { kind: 'Field', name: { kind: 'Name', value: 'type' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'contract' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, - ], - }, - }, - { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, - { kind: 'Field', name: { kind: 'Name', value: 'initializeCalldata' } }, - { kind: 'Field', name: { kind: 'Name', value: 'initializeResultData' } }, - { kind: 'Field', name: { kind: 'Name', value: 'signlessApproved' } }, - { kind: 'Field', name: { kind: 'Name', value: 'sponsoredApproved' } }, - { kind: 'Field', name: { kind: 'Name', value: 'verified' } }, - ], - }, - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'NetworkAddress' }, - typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'NetworkAddress' } }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, - { kind: 'Field', name: { kind: 'Name', value: 'address' } }, - { kind: 'Field', name: { kind: 'Name', value: 'chainId' } }, - ], - }, - }, - ], -} as unknown as DocumentNode; -export const FollowOnlyReferenceModuleSettingsFragmentDoc = { - kind: 'Document', - definitions: [ - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'FollowOnlyReferenceModuleSettings' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'FollowOnlyReferenceModuleSettings' }, - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'contract' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, - ], - }, - }, - ], - }, - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'NetworkAddress' }, - typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'NetworkAddress' } }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, - { kind: 'Field', name: { kind: 'Name', value: 'address' } }, - { kind: 'Field', name: { kind: 'Name', value: 'chainId' } }, - ], - }, - }, - ], -} as unknown as DocumentNode; -export const LegacyFollowOnlyReferenceModuleSettingsFragmentDoc = { - kind: 'Document', - definitions: [ - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'LegacyFollowOnlyReferenceModuleSettings' }, - typeCondition: { - kind: 'NamedType', - name: { kind: 'Name', value: 'LegacyFollowOnlyReferenceModuleSettings' }, - }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'contract' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, - ], - }, - }, - ], - }, - }, - { - kind: 'FragmentDefinition', - name: { kind: 'Name', value: 'NetworkAddress' }, - typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'NetworkAddress' } }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, - { kind: 'Field', name: { kind: 'Name', value: 'address' } }, - { kind: 'Field', name: { kind: 'Name', value: 'chainId' } }, - ], - }, - }, - ], -} as unknown as DocumentNode; +export const SimpleCollectOpenActionSettingsFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'Erc20' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Erc20' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'symbol' } }, + { kind: 'Field', name: { kind: 'Name', value: 'decimals' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'FiatAmount' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'FiatAmount' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'asset' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Fiat' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'value' } }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'Fiat' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Fiat' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'name' } }, + { kind: 'Field', name: { kind: 'Name', value: 'symbol' } }, + { kind: 'Field', name: { kind: 'Name', value: 'decimals' } }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'Amount' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'Amount' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'asset' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Erc20' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'value' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'rate' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'request' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'rateRequest' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'FiatAmount' } }], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'asFiat' }, + arguments: [ + { + kind: 'Argument', + name: { kind: 'Name', value: 'request' }, + value: { kind: 'Variable', name: { kind: 'Name', value: 'rateRequest' } }, + }, + ], + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'FiatAmount' } }], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'NetworkAddress' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'NetworkAddress' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'address' } }, + { kind: 'Field', name: { kind: 'Name', value: 'chainId' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const UnknownOpenActionModuleSettingsFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'UnknownOpenActionModuleSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'UnknownOpenActionModuleSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { kind: 'Field', name: { kind: 'Name', value: 'initializeCalldata' } }, + { kind: 'Field', name: { kind: 'Name', value: 'initializeResultData' } }, + { kind: 'Field', name: { kind: 'Name', value: 'signlessApproved' } }, + { kind: 'Field', name: { kind: 'Name', value: 'sponsoredApproved' } }, + { kind: 'Field', name: { kind: 'Name', value: 'verified' } }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'NetworkAddress' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'NetworkAddress' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'address' } }, + { kind: 'Field', name: { kind: 'Name', value: 'chainId' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const FollowOnlyReferenceModuleSettingsFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'FollowOnlyReferenceModuleSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'FollowOnlyReferenceModuleSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'NetworkAddress' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'NetworkAddress' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'address' } }, + { kind: 'Field', name: { kind: 'Name', value: 'chainId' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; +export const LegacyFollowOnlyReferenceModuleSettingsFragmentDoc = { + kind: 'Document', + definitions: [ + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'LegacyFollowOnlyReferenceModuleSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'LegacyFollowOnlyReferenceModuleSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + ], + }, + }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'NetworkAddress' }, + typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'NetworkAddress' } }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'address' } }, + { kind: 'Field', name: { kind: 'Name', value: 'chainId' } }, + ], + }, + }, + ], +} as unknown as DocumentNode; export const DegreesOfSeparationReferenceModuleSettingsFragmentDoc = { kind: 'Document', definitions: [ @@ -28426,6 +28770,25 @@ export const PostFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -29957,6 +30320,46 @@ export const PostFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'MultirecipientFeeCollectOpenActionSettings' }, @@ -30708,6 +31111,16 @@ export const PostFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -33899,6 +34312,25 @@ export const CommentBaseFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -35392,6 +35824,46 @@ export const CommentBaseFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'MultirecipientFeeCollectOpenActionSettings' }, @@ -36143,6 +36615,16 @@ export const CommentBaseFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -39227,6 +39709,25 @@ export const QuoteBaseFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -40720,6 +41221,46 @@ export const QuoteBaseFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'MultirecipientFeeCollectOpenActionSettings' }, @@ -41471,6 +42012,16 @@ export const QuoteBaseFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -45585,6 +46136,46 @@ export const CommentFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'MultirecipientFeeCollectOpenActionSettings' }, @@ -46336,6 +46927,16 @@ export const CommentFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -49538,6 +50139,25 @@ export const CommentFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -50134,6 +50754,25 @@ export const CommentFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -50718,6 +51357,25 @@ export const CommentFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -52319,6 +52977,46 @@ export const QuoteFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'MultirecipientFeeCollectOpenActionSettings' }, @@ -53070,6 +53768,16 @@ export const QuoteFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -56272,6 +56980,25 @@ export const QuoteFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -56868,6 +57595,25 @@ export const QuoteFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -57452,6 +58198,25 @@ export const QuoteFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -59053,6 +59818,46 @@ export const MirrorFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'MultirecipientFeeCollectOpenActionSettings' }, @@ -59804,6 +60609,16 @@ export const MirrorFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -63006,6 +63821,25 @@ export const MirrorFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -63602,6 +64436,25 @@ export const MirrorFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -64280,6 +65133,25 @@ export const MirrorFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { diff --git a/packages/client/src/graphql/fragments.graphql b/packages/client/src/graphql/fragments.graphql index 095cdb3b99..a9e44ef4b1 100644 --- a/packages/client/src/graphql/fragments.graphql +++ b/packages/client/src/graphql/fragments.graphql @@ -444,6 +444,24 @@ fragment SimpleCollectOpenActionSettings on SimpleCollectOpenActionSettings { endsAt } +fragment ProtocolSharedRevenueCollectOpenActionSettings on ProtocolSharedRevenueCollectOpenActionSettings { + __typename + type + contract { + ...NetworkAddress + } + collectNft + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimit + endsAt + creatorClient +} + fragment MultirecipientFeeCollectOpenActionSettings on MultirecipientFeeCollectOpenActionSettings { __typename type @@ -694,6 +712,9 @@ fragment PublicationOperations on PublicationOperations { fragment PublicationMetadataLitEncryption on PublicationMetadataLitEncryption { __typename encryptionKey + accessControlContract { + ...NetworkAddress + } accessCondition { ...RootCondition } @@ -1616,6 +1637,9 @@ fragment Post on Post { ... on MultirecipientFeeCollectOpenActionSettings { ...MultirecipientFeeCollectOpenActionSettings } + ... on ProtocolSharedRevenueCollectOpenActionSettings { + ...ProtocolSharedRevenueCollectOpenActionSettings + } ... on SimpleCollectOpenActionSettings { ...SimpleCollectOpenActionSettings } @@ -1747,6 +1771,9 @@ fragment CommentBase on Comment { ... on MultirecipientFeeCollectOpenActionSettings { ...MultirecipientFeeCollectOpenActionSettings } + ... on ProtocolSharedRevenueCollectOpenActionSettings { + ...ProtocolSharedRevenueCollectOpenActionSettings + } ... on SimpleCollectOpenActionSettings { ...SimpleCollectOpenActionSettings } @@ -1929,6 +1956,9 @@ fragment QuoteBase on Quote { ... on MultirecipientFeeCollectOpenActionSettings { ...MultirecipientFeeCollectOpenActionSettings } + ... on ProtocolSharedRevenueCollectOpenActionSettings { + ...ProtocolSharedRevenueCollectOpenActionSettings + } ... on SimpleCollectOpenActionSettings { ...SimpleCollectOpenActionSettings } diff --git a/packages/client/src/graphql/types.generated.ts b/packages/client/src/graphql/types.generated.ts index 1119795f04..1d3e80d272 100644 --- a/packages/client/src/graphql/types.generated.ts +++ b/packages/client/src/graphql/types.generated.ts @@ -63,6 +63,7 @@ export type Scalars = { export type ActOnOpenActionInput = { multirecipientCollectOpenAction?: InputMaybe; + protocolSharedRevenueCollectOpenAction?: InputMaybe; simpleCollectOpenAction?: InputMaybe; unknownOpenAction?: InputMaybe; }; @@ -181,6 +182,7 @@ export enum ClaimableTokenType { export type CollectActionModuleInput = { multirecipientCollectOpenAction?: InputMaybe; + protocolSharedRevenueCollectOpenAction?: InputMaybe; simpleCollectOpenAction?: InputMaybe; }; @@ -798,6 +800,13 @@ export enum MetadataAttributeType { String = 'STRING', } +export type ModDisputeReportRequest = { + reason: Scalars['String']['input']; + reportedProfileId?: InputMaybe; + reportedPublicationId?: InputMaybe; + reporter: Scalars['ProfileId']['input']; +}; + export type ModExplorePublicationRequest = { cursor?: InputMaybe; limit?: InputMaybe; @@ -818,6 +827,13 @@ export type ModExplorePublicationsWhere = { since?: InputMaybe; }; +export type ModReportsRequest = { + cursor?: InputMaybe; + forProfile?: InputMaybe; + forPublication?: InputMaybe; + limit?: InputMaybe; +}; + export type ModuleCurrencyApproval = { followModule?: InputMaybe; openActionModule?: InputMaybe; @@ -1146,6 +1162,7 @@ export enum OpenActionModuleType { LegacySimpleCollectModule = 'LegacySimpleCollectModule', LegacyTimedFeeCollectModule = 'LegacyTimedFeeCollectModule', MultirecipientFeeCollectOpenActionModule = 'MultirecipientFeeCollectOpenActionModule', + ProtocolSharedRevenueCollectOpenActionModule = 'ProtocolSharedRevenueCollectOpenActionModule', SimpleCollectOpenActionModule = 'SimpleCollectOpenActionModule', UnknownOpenActionModule = 'UnknownOpenActionModule', } @@ -1427,6 +1444,18 @@ export type ProfilesRequestWhere = { whoQuotedPublication?: InputMaybe; }; +export type ProtocolSharedRevenueCollectModuleInput = { + amount?: InputMaybe; + collectLimit?: InputMaybe; + /** The wallet of a client app to share revenues alongside the recipient and the protocol. Optional. */ + creatorClient?: InputMaybe; + currentCollects?: Scalars['Float']['input']; + endsAt?: InputMaybe; + followerOnly: Scalars['Boolean']['input']; + recipient?: InputMaybe; + referralFee?: InputMaybe; +}; + export type PublicationBookmarkRequest = { on: Scalars['PublicationId']['input']; }; @@ -1565,6 +1594,7 @@ export enum PublicationReportingIllegalSubreason { AnimalAbuse = 'ANIMAL_ABUSE', DirectThreat = 'DIRECT_THREAT', HumanAbuse = 'HUMAN_ABUSE', + Plagiarism = 'PLAGIARISM', ThreatIndividual = 'THREAT_INDIVIDUAL', Violence = 'VIOLENCE', } diff --git a/packages/client/src/graphql/types.ts b/packages/client/src/graphql/types.ts index e4d7bda46e..bf737cf554 100644 --- a/packages/client/src/graphql/types.ts +++ b/packages/client/src/graphql/types.ts @@ -33,6 +33,10 @@ export type AnyPublicationFragment = export type PrimaryPublicationFragment = PostFragment | CommentFragment | QuoteFragment; +export type OpenActionModuleFragment = NonNullable< + PrimaryPublicationFragment['openActionModules'] +>[number]; + export type PublicationMetadataFragment = | ArticleMetadataV3Fragment | AudioMetadataV3Fragment diff --git a/packages/client/src/submodules/explore/graphql/explore.generated.ts b/packages/client/src/submodules/explore/graphql/explore.generated.ts index 1e661290c3..6aa6aaa724 100644 --- a/packages/client/src/submodules/explore/graphql/explore.generated.ts +++ b/packages/client/src/submodules/explore/graphql/explore.generated.ts @@ -707,6 +707,25 @@ export const ExplorePublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -2436,6 +2455,16 @@ export const ExplorePublicationsDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -5493,6 +5522,46 @@ export const ExplorePublicationsDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -6250,6 +6319,25 @@ export const ExplorePublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -6835,6 +6923,25 @@ export const ExplorePublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { diff --git a/packages/client/src/submodules/feed/graphql/feed.generated.ts b/packages/client/src/submodules/feed/graphql/feed.generated.ts index 908e7233a6..bc7dfea1ae 100644 --- a/packages/client/src/submodules/feed/graphql/feed.generated.ts +++ b/packages/client/src/submodules/feed/graphql/feed.generated.ts @@ -2514,6 +2514,25 @@ export const FeedItemFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -3336,6 +3355,16 @@ export const FeedItemFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -6393,6 +6422,46 @@ export const FeedItemFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -7169,6 +7238,25 @@ export const FeedItemFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -7753,6 +7841,25 @@ export const FeedItemFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -11392,6 +11499,25 @@ export const OpenActionPaidActionFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -12214,6 +12340,16 @@ export const OpenActionPaidActionFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -15271,6 +15407,46 @@ export const OpenActionPaidActionFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -16047,6 +16223,25 @@ export const OpenActionPaidActionFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -16631,6 +16826,25 @@ export const OpenActionPaidActionFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -18474,6 +18688,25 @@ export const FeedDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -19296,6 +19529,16 @@ export const FeedDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -22353,6 +22596,46 @@ export const FeedDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -23129,6 +23412,25 @@ export const FeedDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -23713,6 +24015,25 @@ export const FeedDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -25572,6 +25893,25 @@ export const FeedHighlightsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -26394,6 +26734,16 @@ export const FeedHighlightsDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -29451,6 +29801,46 @@ export const FeedHighlightsDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -30133,6 +30523,25 @@ export const FeedHighlightsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -30717,6 +31126,25 @@ export const FeedHighlightsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -32634,6 +33062,25 @@ export const LatestPaidActionsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -33456,6 +33903,16 @@ export const LatestPaidActionsDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -36513,6 +36970,46 @@ export const LatestPaidActionsDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -37289,6 +37786,25 @@ export const LatestPaidActionsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -37873,6 +38389,25 @@ export const LatestPaidActionsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { diff --git a/packages/client/src/submodules/notifications/graphql/notifications.generated.ts b/packages/client/src/submodules/notifications/graphql/notifications.generated.ts index 72e16b2246..2ac63bf6e2 100644 --- a/packages/client/src/submodules/notifications/graphql/notifications.generated.ts +++ b/packages/client/src/submodules/notifications/graphql/notifications.generated.ts @@ -1558,6 +1558,25 @@ export const ReactionNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -2380,6 +2399,16 @@ export const ReactionNotificationFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -5437,6 +5466,46 @@ export const ReactionNotificationFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -6213,6 +6282,25 @@ export const ReactionNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -6797,6 +6885,25 @@ export const ReactionNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -8406,6 +8513,25 @@ export const CommentNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -9228,6 +9354,16 @@ export const CommentNotificationFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -12285,6 +12421,46 @@ export const CommentNotificationFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -13061,6 +13237,25 @@ export const CommentNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -13645,6 +13840,25 @@ export const CommentNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -15228,6 +15442,25 @@ export const MirrorNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -16050,6 +16283,16 @@ export const MirrorNotificationFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -19107,6 +19350,46 @@ export const MirrorNotificationFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -19883,6 +20166,25 @@ export const MirrorNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -20467,6 +20769,25 @@ export const MirrorNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -22076,6 +22397,25 @@ export const QuoteNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -22898,6 +23238,16 @@ export const QuoteNotificationFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -25955,6 +26305,46 @@ export const QuoteNotificationFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -26637,6 +27027,25 @@ export const QuoteNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -27221,6 +27630,25 @@ export const QuoteNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -29923,6 +30351,25 @@ export const ActedNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -30745,6 +31192,16 @@ export const ActedNotificationFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -33802,6 +34259,46 @@ export const ActedNotificationFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -34578,6 +35075,25 @@ export const ActedNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -35162,6 +35678,25 @@ export const ActedNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -37808,6 +38343,25 @@ export const MentionNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -38630,6 +39184,16 @@ export const MentionNotificationFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -41687,6 +42251,46 @@ export const MentionNotificationFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -42463,6 +43067,25 @@ export const MentionNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -43047,6 +43670,25 @@ export const MentionNotificationFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -45263,6 +45905,25 @@ export const NotificationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -46085,6 +46746,16 @@ export const NotificationsDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -49142,6 +49813,46 @@ export const NotificationsDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -49918,6 +50629,25 @@ export const NotificationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -50502,6 +51232,25 @@ export const NotificationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { diff --git a/packages/client/src/submodules/publication/graphql/publication.generated.ts b/packages/client/src/submodules/publication/graphql/publication.generated.ts index 52a02d0a46..8433419839 100644 --- a/packages/client/src/submodules/publication/graphql/publication.generated.ts +++ b/packages/client/src/submodules/publication/graphql/publication.generated.ts @@ -2135,6 +2135,25 @@ export const PublicationDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -3864,6 +3883,16 @@ export const PublicationDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -6921,6 +6950,46 @@ export const PublicationDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -7773,6 +7842,25 @@ export const PublicationDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -8357,6 +8445,25 @@ export const PublicationDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -9247,6 +9354,25 @@ export const PublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -10976,6 +11102,16 @@ export const PublicationsDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -14033,6 +14169,46 @@ export const PublicationsDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -14885,6 +15061,25 @@ export const PublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -15469,6 +15664,25 @@ export const PublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { diff --git a/packages/client/src/submodules/publication/helpers/openActions.ts b/packages/client/src/submodules/publication/helpers/openActions.ts index 0a7b49195f..7027315c7d 100644 --- a/packages/client/src/submodules/publication/helpers/openActions.ts +++ b/packages/client/src/submodules/publication/helpers/openActions.ts @@ -1,45 +1,9 @@ -import { - LegacyAaveFeeCollectModuleSettingsFragment, - LegacyErc4626FeeCollectModuleSettingsFragment, - LegacyFeeCollectModuleSettingsFragment, - LegacyFreeCollectModuleSettingsFragment, - LegacyLimitedFeeCollectModuleSettingsFragment, - LegacyLimitedTimedFeeCollectModuleSettingsFragment, - LegacyMultirecipientFeeCollectModuleSettingsFragment, - LegacyRevertCollectModuleSettingsFragment, - LegacySimpleCollectModuleSettingsFragment, - LegacyTimedFeeCollectModuleSettingsFragment, - MultirecipientFeeCollectOpenActionSettingsFragment, - SimpleCollectOpenActionSettingsFragment, - UnknownOpenActionModuleSettingsFragment, -} from '../../../graphql/fragments.generated'; +import { OpenActionModuleFragment } from '../../../graphql'; -export type OpenActionModuleFragment = - | LegacyAaveFeeCollectModuleSettingsFragment - | LegacyErc4626FeeCollectModuleSettingsFragment - | LegacyFeeCollectModuleSettingsFragment - | LegacyFreeCollectModuleSettingsFragment - | LegacyLimitedFeeCollectModuleSettingsFragment - | LegacyLimitedTimedFeeCollectModuleSettingsFragment - | LegacyMultirecipientFeeCollectModuleSettingsFragment - | LegacyRevertCollectModuleSettingsFragment - | LegacySimpleCollectModuleSettingsFragment - | LegacyTimedFeeCollectModuleSettingsFragment - | MultirecipientFeeCollectOpenActionSettingsFragment - | SimpleCollectOpenActionSettingsFragment - | UnknownOpenActionModuleSettingsFragment; - -export type OpenActionModuleWithReferralFeeFragment = - | LegacyAaveFeeCollectModuleSettingsFragment - | LegacyErc4626FeeCollectModuleSettingsFragment - | LegacyFeeCollectModuleSettingsFragment - | LegacyLimitedFeeCollectModuleSettingsFragment - | LegacyLimitedTimedFeeCollectModuleSettingsFragment - | LegacyMultirecipientFeeCollectModuleSettingsFragment - | LegacySimpleCollectModuleSettingsFragment - | LegacyTimedFeeCollectModuleSettingsFragment - | MultirecipientFeeCollectOpenActionSettingsFragment - | SimpleCollectOpenActionSettingsFragment; +export type OpenActionModuleWithReferralFeeFragment = Extract< + OpenActionModuleFragment, + { referralFee: number } +>; export function isOpenActionModuleWithReferralFee( module: OpenActionModuleFragment, diff --git a/packages/client/src/submodules/publication/submodules/bookmarks/graphql/bookmarks.generated.ts b/packages/client/src/submodules/publication/submodules/bookmarks/graphql/bookmarks.generated.ts index 57ccf920eb..efcb81b410 100644 --- a/packages/client/src/submodules/publication/submodules/bookmarks/graphql/bookmarks.generated.ts +++ b/packages/client/src/submodules/publication/submodules/bookmarks/graphql/bookmarks.generated.ts @@ -737,6 +737,25 @@ export const PublicationBookmarksDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -2466,6 +2485,16 @@ export const PublicationBookmarksDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -5523,6 +5552,46 @@ export const PublicationBookmarksDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -6299,6 +6368,25 @@ export const PublicationBookmarksDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -6883,6 +6971,25 @@ export const PublicationBookmarksDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { diff --git a/packages/client/src/submodules/revenue/graphql/revenue.generated.ts b/packages/client/src/submodules/revenue/graphql/revenue.generated.ts index bdd3c5bcb5..81215790eb 100644 --- a/packages/client/src/submodules/revenue/graphql/revenue.generated.ts +++ b/packages/client/src/submodules/revenue/graphql/revenue.generated.ts @@ -893,6 +893,25 @@ export const PublicationRevenueFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -2501,6 +2520,16 @@ export const PublicationRevenueFragmentDoc = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -5558,6 +5587,46 @@ export const PublicationRevenueFragmentDoc = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -6410,6 +6479,25 @@ export const PublicationRevenueFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -6994,6 +7082,25 @@ export const PublicationRevenueFragmentDoc = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -8048,6 +8155,25 @@ export const RevenueFromPublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -9656,6 +9782,16 @@ export const RevenueFromPublicationsDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -12713,6 +12849,46 @@ export const RevenueFromPublicationsDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -13565,6 +13741,25 @@ export const RevenueFromPublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -14149,6 +14344,25 @@ export const RevenueFromPublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -15190,6 +15404,25 @@ export const RevenueFromPublicationDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -16798,6 +17031,16 @@ export const RevenueFromPublicationDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -19855,6 +20098,46 @@ export const RevenueFromPublicationDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -20707,6 +20990,25 @@ export const RevenueFromPublicationDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -21291,6 +21593,25 @@ export const RevenueFromPublicationDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { diff --git a/packages/client/src/submodules/search/graphql/search.generated.ts b/packages/client/src/submodules/search/graphql/search.generated.ts index f2ad745158..04d2090c12 100644 --- a/packages/client/src/submodules/search/graphql/search.generated.ts +++ b/packages/client/src/submodules/search/graphql/search.generated.ts @@ -723,6 +723,25 @@ export const SearchPublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -2452,6 +2471,16 @@ export const SearchPublicationsDocument = { selections: [ { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, { kind: 'Field', name: { kind: 'Name', value: 'encryptionKey' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'accessControlContract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'accessCondition' }, @@ -5509,6 +5538,46 @@ export const SearchPublicationsDocument = { ], }, }, + { + kind: 'FragmentDefinition', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: '__typename' } }, + { kind: 'Field', name: { kind: 'Name', value: 'type' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'contract' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'FragmentSpread', name: { kind: 'Name', value: 'NetworkAddress' } }, + ], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'collectNft' } }, + { + kind: 'Field', + name: { kind: 'Name', value: 'amount' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, + { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, + { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, + { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, + { kind: 'Field', name: { kind: 'Name', value: 'collectLimit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'endsAt' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorClient' } }, + ], + }, + }, { kind: 'FragmentDefinition', name: { kind: 'Name', value: 'SimpleCollectOpenActionSettings' }, @@ -6285,6 +6354,25 @@ export const SearchPublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { @@ -6869,6 +6957,25 @@ export const SearchPublicationsDocument = { ], }, }, + { + kind: 'InlineFragment', + typeCondition: { + kind: 'NamedType', + name: { kind: 'Name', value: 'ProtocolSharedRevenueCollectOpenActionSettings' }, + }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { + kind: 'FragmentSpread', + name: { + kind: 'Name', + value: 'ProtocolSharedRevenueCollectOpenActionSettings', + }, + }, + ], + }, + }, { kind: 'InlineFragment', typeCondition: { diff --git a/packages/domain/src/use-cases/profile/LinkHandle.ts b/packages/domain/src/use-cases/profile/LinkHandle.ts index 0279995e32..8aab4c1e96 100644 --- a/packages/domain/src/use-cases/profile/LinkHandle.ts +++ b/packages/domain/src/use-cases/profile/LinkHandle.ts @@ -5,7 +5,7 @@ import { SponsorshipReady } from '../transactions/SponsorshipReady'; export type LinkHandleRequest = { fullHandle: string; - profileId: ProfileId; + profileId: ProfileId; // TODO remove, seems not used kind: TransactionKind.LINK_HANDLE; signless: boolean; sponsored: boolean; @@ -22,6 +22,7 @@ export class LinkHandle extends SponsorshipReady { protected override async charged(request: LinkHandleRequest): Promise { await this.paidExecution.execute(request); } + protected override async sponsored(request: LinkHandleRequest): Promise { await this.delegableExecution.execute(request); } diff --git a/packages/domain/src/use-cases/profile/UnfollowProfile.ts b/packages/domain/src/use-cases/profile/UnfollowProfile.ts index 45017de624..d21e9600b6 100644 --- a/packages/domain/src/use-cases/profile/UnfollowProfile.ts +++ b/packages/domain/src/use-cases/profile/UnfollowProfile.ts @@ -21,6 +21,7 @@ export class UnfollowProfile extends SponsorshipReady { protected override async charged(request: UnfollowRequest): Promise { await this.paidExecution.execute(request); } + protected override async sponsored(request: UnfollowRequest): Promise { await this.delegableExecution.execute(request); } diff --git a/packages/domain/src/use-cases/profile/UpdateProfileManagers.ts b/packages/domain/src/use-cases/profile/UpdateProfileManagers.ts index 1ebd80a4ce..f53050d6e1 100644 --- a/packages/domain/src/use-cases/profile/UpdateProfileManagers.ts +++ b/packages/domain/src/use-cases/profile/UpdateProfileManagers.ts @@ -24,6 +24,7 @@ export class UpdateProfileManagers extends SponsorshipReady { await this.paidExecution.execute(request); } + protected override async sponsored(request: UpdateProfileManagersRequest): Promise { await this.sponsoredExecution.execute(request); } diff --git a/packages/domain/src/use-cases/publications/OpenAction.ts b/packages/domain/src/use-cases/publications/OpenAction.ts index b715782f1b..c83cfd2ae4 100644 --- a/packages/domain/src/use-cases/publications/OpenAction.ts +++ b/packages/domain/src/use-cases/publications/OpenAction.ts @@ -21,8 +21,9 @@ import { Referrers } from './Referrers'; export enum AllOpenActionType { LEGACY_COLLECT = 'LEGACY_COLLECT', - SIMPLE_COLLECT = 'SIMPLE_COLLECT', MULTIRECIPIENT_COLLECT = 'MULTIRECIPIENT_COLLECT', + SHARED_REVENUE_COLLECT = 'SHARED_REVENUE_COLLECT', + SIMPLE_COLLECT = 'SIMPLE_COLLECT', UNKNOWN_OPEN_ACTION = 'UNKNOWN_OPEN_ACTION', } @@ -31,6 +32,11 @@ export type CollectFee = { contractAddress: EvmAddress; }; +export type SharedMintFee = { + amount: Amount; + executorClient?: EvmAddress; +}; + export type LegacyCollectRequest = { kind: TransactionKind.ACT_ON_PUBLICATION; type: AllOpenActionType.LEGACY_COLLECT; @@ -48,6 +54,7 @@ export type MultirecipientCollectRequest = { publicationId: PublicationId; referrers?: Referrers; fee: CollectFee; + collectModule: EvmAddress; public: boolean; signless: boolean; sponsored: boolean; @@ -59,6 +66,21 @@ export type SimpleCollectRequest = { publicationId: PublicationId; referrers?: Referrers; fee?: CollectFee; + collectModule: EvmAddress; + public: boolean; + signless: boolean; + sponsored: boolean; +}; + +export type SharedRevenueCollectRequest = { + kind: TransactionKind.ACT_ON_PUBLICATION; + type: AllOpenActionType.SHARED_REVENUE_COLLECT; + publicationId: PublicationId; + referrers?: Referrers; + fee?: CollectFee; + mintFee?: SharedMintFee; + executorClient?: EvmAddress; + collectModule: EvmAddress; public: boolean; signless: boolean; sponsored: boolean; @@ -71,6 +93,7 @@ export type UnknownActionRequest = { address: EvmAddress; data: Data; referrers?: Referrers; + amount?: Amount; public: boolean; signless: boolean; sponsored: boolean; @@ -79,6 +102,7 @@ export type UnknownActionRequest = { export type CollectRequest = | LegacyCollectRequest | MultirecipientCollectRequest + | SharedRevenueCollectRequest | SimpleCollectRequest; export type OpenActionRequest = CollectRequest | UnknownActionRequest; @@ -88,18 +112,25 @@ export type DelegableOpenActionRequest = | SimpleCollectRequest | UnknownActionRequest; -function isCollectRequest(request: OpenActionRequest): request is CollectRequest { +export function isCollectRequest(request: OpenActionRequest): request is CollectRequest { return [ AllOpenActionType.LEGACY_COLLECT, - AllOpenActionType.SIMPLE_COLLECT, AllOpenActionType.MULTIRECIPIENT_COLLECT, + AllOpenActionType.SHARED_REVENUE_COLLECT, + AllOpenActionType.SIMPLE_COLLECT, ].includes(request.type); } +export function isUnknownActionRequest( + request: OpenActionRequest, +): request is UnknownActionRequest { + return request.type === AllOpenActionType.UNKNOWN_OPEN_ACTION; +} + export type PaidCollectRequest = CollectRequest & { fee: CollectFee }; export function isPaidCollectRequest(request: OpenActionRequest): request is PaidCollectRequest { - return isCollectRequest(request) && request.fee !== undefined; + return isCollectRequest(request) && 'fee' in request && request.fee !== undefined; } function isPublicOpenActionRequest( diff --git a/packages/domain/src/use-cases/publications/OpenActionConfig.ts b/packages/domain/src/use-cases/publications/OpenActionConfig.ts index e1de1d0212..741f26b43b 100644 --- a/packages/domain/src/use-cases/publications/OpenActionConfig.ts +++ b/packages/domain/src/use-cases/publications/OpenActionConfig.ts @@ -1,5 +1,7 @@ import { Data, Erc20Amount, EvmAddress } from '@lens-protocol/shared-kernel'; +import { AllOpenActionType } from './OpenAction'; + export type RecipientWithSplit = { /** * The recipient of the collect fee split. @@ -14,11 +16,20 @@ export type RecipientWithSplit = { }; export enum OpenActionType { - SIMPLE_COLLECT = 'SIMPLE_COLLECT', - MULTIRECIPIENT_COLLECT = 'MULTIRECIPIENT_COLLECT', - UNKNOWN_OPEN_ACTION = 'UNKNOWN_OPEN_ACTION', + MULTIRECIPIENT_COLLECT = AllOpenActionType.MULTIRECIPIENT_COLLECT, + SHARED_REVENUE_COLLECT = AllOpenActionType.SHARED_REVENUE_COLLECT, + /** + * @deprecated As part of [LIP-23](https://github.com/lens-protocol/LIPs/pull/51) the 'free collect' + * will evolve into shared revenue model. Over time this option will be deprecated and removed + * from gasless support in the Lens API. Use {@link OpenActionType.SHARED_REVENUE_COLLECT} instead. + */ + SIMPLE_COLLECT = AllOpenActionType.SIMPLE_COLLECT, + UNKNOWN_OPEN_ACTION = AllOpenActionType.UNKNOWN_OPEN_ACTION, } +/** + * @deprecated Use {@link SharedRevenueCollectActionConfig} instead. + */ export type SimpleCollectActionConfig = { type: OpenActionType.SIMPLE_COLLECT; /** @@ -62,6 +73,61 @@ export type SimpleCollectActionConfig = { endsAt?: Date; }; +/** + * A [LIP-23](https://github.com/lens-protocol/LIPs/pull/51) compliant collect action configuration. + */ +export type SharedRevenueCollectActionConfig = { + type: OpenActionType.SHARED_REVENUE_COLLECT; + /** + * The maximum number of NFT to mint. + * + * @defaultValue no limit + */ + collectLimit?: number; + /** + * Whether only followers can collect. + */ + followerOnly: boolean; + /** + * The date when the collect ends. + * + * @defaultValue no end date + */ + endsAt?: Date; +} & ( + | { + /** + * The collect fee amount. + * + * Use {@link Amount.erc20} with instances {@link Erc20} to create an instance of this type. + */ + amount: Erc20Amount; + /** + * The referral reward as a percentage. + * + * This is the maximum referral fee percentage that can be used to reward the referrer. + * The referrers are determined by the FE app used when this simple collect open action is executed. + * + * Number between 1-100 with up to 2 decimals of precision (e.g. 10.5 for 10.5%) + * + * @defaultValue no referral reward + */ + referralFee?: number; + /** + * The recipient of the collect fee. + */ + recipient?: EvmAddress; + } + | { + /** + * The creator app address. + * + * If not set, the share for the creator app will be given to the creator of the publication. + */ + creatorClient?: EvmAddress; + } +); + export type MultirecipientCollectActionConfig = { type: OpenActionType.MULTIRECIPIENT_COLLECT; /** @@ -103,7 +169,10 @@ export type MultirecipientCollectActionConfig = { endsAt?: Date; }; -export type CollectActionConfig = SimpleCollectActionConfig | MultirecipientCollectActionConfig; +export type CollectActionConfig = + | SimpleCollectActionConfig + | MultirecipientCollectActionConfig + | SharedRevenueCollectActionConfig; export type UnknownOpenActionConfig = { type: OpenActionType.UNKNOWN_OPEN_ACTION; diff --git a/packages/domain/src/use-cases/publications/__helpers__/mocks.ts b/packages/domain/src/use-cases/publications/__helpers__/mocks.ts index e559ec7f25..14763c3c4b 100644 --- a/packages/domain/src/use-cases/publications/__helpers__/mocks.ts +++ b/packages/domain/src/use-cases/publications/__helpers__/mocks.ts @@ -14,6 +14,7 @@ import { CollectFee, LegacyCollectRequest, MultirecipientCollectRequest, + SharedRevenueCollectRequest, SimpleCollectRequest, UnknownActionRequest, } from '../OpenAction'; @@ -149,6 +150,21 @@ export function mockLegacyCollectRequest( }; } +export function mockSharedRevenueCollectRequest( + overrides?: Partial, +): SharedRevenueCollectRequest { + return { + publicationId: mockPublicationId(), + public: false, + signless: true, + sponsored: true, + collectModule: mockEvmAddress(), + ...overrides, + type: AllOpenActionType.SHARED_REVENUE_COLLECT, + kind: TransactionKind.ACT_ON_PUBLICATION, + }; +} + export function mockSimpleCollectRequest( overrides?: Partial, ): SimpleCollectRequest { @@ -157,6 +173,7 @@ export function mockSimpleCollectRequest( public: false, signless: true, sponsored: true, + collectModule: mockEvmAddress(), ...overrides, type: AllOpenActionType.SIMPLE_COLLECT, kind: TransactionKind.ACT_ON_PUBLICATION, @@ -172,6 +189,7 @@ export function mockMultirecipientCollectRequest( public: false, signless: true, sponsored: true, + collectModule: mockEvmAddress(), ...overrides, type: AllOpenActionType.MULTIRECIPIENT_COLLECT, kind: TransactionKind.ACT_ON_PUBLICATION, diff --git a/packages/gated-content/codegen.yml b/packages/gated-content/codegen.yml index f45ac57009..fcdab06973 100644 --- a/packages/gated-content/codegen.yml +++ b/packages/gated-content/codegen.yml @@ -11,6 +11,7 @@ config: field: false strictScalars: true scalars: + ABIJson: string AppId: string BlockchainData: string BroadcastId: string diff --git a/packages/gated-content/src/graphql/__helpers__/mocks.ts b/packages/gated-content/src/graphql/__helpers__/mocks.ts index d24bbf5b9c..0c1734a678 100644 --- a/packages/gated-content/src/graphql/__helpers__/mocks.ts +++ b/packages/gated-content/src/graphql/__helpers__/mocks.ts @@ -141,6 +141,7 @@ export function mockPublicationMetadataLitEncryption( ): PublicationMetadataLitEncryption { return { accessCondition: mockRootCondition(), + accessControlContract: mockNetworkAddress(), encryptionKey: faker.datatype.hexadecimal({ length: 368 }), encryptedPaths: [], ...overrides, diff --git a/packages/gated-content/src/graphql/generated.ts b/packages/gated-content/src/graphql/generated.ts index fe1ce08caf..70d7cbf677 100644 --- a/packages/gated-content/src/graphql/generated.ts +++ b/packages/gated-content/src/graphql/generated.ts @@ -10,6 +10,7 @@ export type Scalars = { Boolean: boolean; Int: number; Float: number; + ABIJson: string; AppId: string; BlockchainData: string; BroadcastId: string; @@ -55,6 +56,7 @@ export type Scalars = { export type ActOnOpenActionInput = { readonly multirecipientCollectOpenAction?: InputMaybe; + readonly protocolSharedRevenueCollectOpenAction?: InputMaybe; readonly simpleCollectOpenAction?: InputMaybe; readonly unknownOpenAction?: InputMaybe; }; @@ -107,13 +109,20 @@ export type AlreadyInvitedCheckRequest = { export type Amount = { readonly __typename: 'Amount'; + /** This is the total value of the amount in the fiat currency */ + readonly asFiat?: Maybe; /** The asset */ readonly asset: Asset; + /** This is the most recent snapshotted 1:1 conversion rate between the asset and the requested fiat currency */ readonly rate?: Maybe; /** Floating point number as string (e.g. 42.009837). It could have the entire precision of the Asset or be truncated to the last significant decimal. */ readonly value: Scalars['String']; }; +export type AmountAsFiatArgs = { + request: RateRequest; +}; + export type AmountRateArgs = { request: RateRequest; }; @@ -229,6 +238,8 @@ export type AuthenticationResult = { readonly __typename: 'AuthenticationResult'; /** The access token */ readonly accessToken: Scalars['Jwt']; + /** The identity token */ + readonly identityToken: Scalars['Jwt']; /** The refresh token */ readonly refreshToken: Scalars['Jwt']; }; @@ -335,14 +346,28 @@ export type ClaimProfileWithHandleRequest = { export type ClaimProfileWithHandleResult = ClaimProfileWithHandleErrorResult | RelaySuccess; +export type ClaimTokensRequest = { + readonly for: ClaimableTokenType; +}; + export type ClaimableProfilesResult = { readonly __typename: 'ClaimableProfilesResult'; readonly canMintProfileWithFreeTextHandle: Scalars['Boolean']; readonly reserved: ReadonlyArray; }; +export enum ClaimableTokenType { + Bonsai = 'BONSAI', +} + +export type ClaimableTokensResult = { + readonly __typename: 'ClaimableTokensResult'; + readonly bonsai: Amount; +}; + export type CollectActionModuleInput = { readonly multirecipientCollectOpenAction?: InputMaybe; + readonly protocolSharedRevenueCollectOpenAction?: InputMaybe; readonly simpleCollectOpenAction?: InputMaybe; }; @@ -375,6 +400,8 @@ export type Comment = { readonly createdAt: Scalars['DateTime']; readonly firstComment?: Maybe; readonly hashtagsMentioned: ReadonlyArray; + /** Signifies whether this comment has been hidden by the author of its parent publication */ + readonly hiddenByAuthor: Scalars['Boolean']; readonly id: Scalars['PublicationId']; readonly isEncrypted: Scalars['Boolean']; readonly isHidden: Scalars['Boolean']; @@ -563,6 +590,61 @@ export type CreateFollowEip712TypedDataValue = { readonly nonce: Scalars['Nonce']; }; +export type CreateFrameEip712TypedData = { + readonly __typename: 'CreateFrameEIP712TypedData'; + /** The typed data domain */ + readonly domain: Eip712TypedDataDomain; + /** The types */ + readonly types: CreateFrameEip712TypedDataTypes; + /** The values */ + readonly value: CreateFrameEip712TypedDataValue; +}; + +export type CreateFrameEip712TypedDataInput = { + /** The typed data domain */ + readonly domain: Eip712TypedDataDomainInput; + /** The types */ + readonly types: CreateFrameEip712TypedDataTypesInput; + /** The values */ + readonly value: CreateFrameEip712TypedDataValueInput; +}; + +export type CreateFrameEip712TypedDataTypes = { + readonly __typename: 'CreateFrameEIP712TypedDataTypes'; + readonly FrameData: ReadonlyArray; +}; + +export type CreateFrameEip712TypedDataTypesInput = { + readonly FrameData: ReadonlyArray; +}; + +export type CreateFrameEip712TypedDataValue = { + readonly __typename: 'CreateFrameEIP712TypedDataValue'; + readonly actionResponse: Scalars['String']; + readonly buttonIndex: Scalars['Int']; + readonly deadline: Scalars['UnixTimestamp']; + readonly inputText: Scalars['String']; + readonly profileId: Scalars['ProfileId']; + readonly pubId: Scalars['PublicationId']; + /** The EIP-721 spec version, must be 1.0.0 */ + readonly specVersion: Scalars['String']; + readonly state: Scalars['String']; + readonly url: Scalars['URI']; +}; + +export type CreateFrameEip712TypedDataValueInput = { + readonly actionResponse: Scalars['String']; + readonly buttonIndex: Scalars['Int']; + readonly deadline: Scalars['UnixTimestamp']; + readonly inputText: Scalars['String']; + readonly profileId: Scalars['ProfileId']; + readonly pubId: Scalars['PublicationId']; + /** The EIP-721 spec version, must be 1.0.0 */ + readonly specVersion: Scalars['String']; + readonly state: Scalars['String']; + readonly url: Scalars['URI']; +}; + export type CreateLegacyCollectBroadcastItemResult = { readonly __typename: 'CreateLegacyCollectBroadcastItemResult'; /** The date the broadcast item expiries */ @@ -1198,10 +1280,40 @@ export type DegreesOfSeparationReferenceModuleSettings = { readonly type: ReferenceModuleType; }; +export type DidReactOnPublicationPublicationIdAndProfileId = { + readonly profileId: Scalars['ProfileId']; + readonly publicationId: Scalars['PublicationId']; +}; + +export type DidReactOnPublicationRequest = { + readonly for: ReadonlyArray; + readonly where?: InputMaybe; +}; + +export type DidReactOnPublicationResult = { + readonly __typename: 'DidReactOnPublicationResult'; + readonly profileId: Scalars['ProfileId']; + readonly publicationId: Scalars['PublicationId']; + readonly result: Scalars['Boolean']; +}; + export type DismissRecommendedProfilesRequest = { readonly dismiss: ReadonlyArray; }; +export type DisputedReport = { + readonly __typename: 'DisputedReport'; + readonly createdAt: Scalars['DateTime']; + readonly disputeReason: Scalars['String']; + readonly disputer: Profile; + readonly reportAdditionalInfo: Scalars['String']; + readonly reportReason: Scalars['String']; + readonly reportSubreason: Scalars['String']; + readonly reportedProfile: Profile; + readonly reportedPublication?: Maybe; + readonly reporter: Profile; +}; + /** The eip 712 typed data domain */ export type Eip712TypedDataDomain = { readonly __typename: 'EIP712TypedDataDomain'; @@ -1215,6 +1327,17 @@ export type Eip712TypedDataDomain = { readonly version: Scalars['String']; }; +export type Eip712TypedDataDomainInput = { + /** The chainId */ + readonly chainId: Scalars['ChainId']; + /** The name of the typed data domain */ + readonly name: Scalars['String']; + /** The verifying contract */ + readonly verifyingContract: Scalars['EvmAddress']; + /** The version */ + readonly version: Scalars['String']; +}; + /** The eip 712 typed data field */ export type Eip712TypedDataField = { readonly __typename: 'EIP712TypedDataField'; @@ -1224,6 +1347,13 @@ export type Eip712TypedDataField = { readonly type: Scalars['String']; }; +export type Eip712TypedDataFieldInput = { + /** The name of the typed data field */ + readonly name: Scalars['String']; + /** The type of the typed data field */ + readonly type: Scalars['String']; +}; + export type EmbedMetadataV3 = { readonly __typename: 'EmbedMetadataV3'; readonly appId?: Maybe; @@ -1392,6 +1522,7 @@ export enum ExplorePublicationsOrderByType { TopCommented = 'TOP_COMMENTED', TopMirrored = 'TOP_MIRRORED', TopQuoted = 'TOP_QUOTED', + TopReacted = 'TOP_REACTED', } export type ExplorePublicationsWhere = { @@ -1459,6 +1590,7 @@ export type FeedRequest = { }; export type FeedWhere = { + readonly customFilters?: InputMaybe>; readonly feedEventItemTypes?: InputMaybe>; readonly for?: InputMaybe; readonly metadata?: InputMaybe; @@ -1492,7 +1624,7 @@ export type FollowLensManager = { readonly profileId: Scalars['ProfileId']; }; -/** The lens manager will only support FREE follow modules, if you want your unknown module allowed to be signless please contact us */ +/** The lens manager will only support follow modules which are verified here - https://github.com/lens-protocol/verified-modules/blob/master/follow-modules.json */ export type FollowLensManagerModuleRedeemInput = { readonly unknownFollowModule?: InputMaybe; }; @@ -1536,6 +1668,12 @@ export type FollowOnlyReferenceModuleSettings = { readonly type: ReferenceModuleType; }; +export type FollowPaidAction = { + readonly __typename: 'FollowPaidAction'; + readonly followed: Profile; + readonly latestActed: ReadonlyArray; +}; + export type FollowRequest = { readonly follow: ReadonlyArray; }; @@ -1569,14 +1707,68 @@ export type FollowersRequest = { readonly cursor?: InputMaybe; readonly limit?: InputMaybe; readonly of: Scalars['ProfileId']; + /** The order by which to sort the profiles - note if your looking at your own followers it always be DESC */ + readonly orderBy?: InputMaybe; }; export type FollowingRequest = { readonly cursor?: InputMaybe; readonly for: Scalars['ProfileId']; readonly limit?: InputMaybe; + /** The order by which to sort the profiles - note if your looking at your own following it always be DESC */ + readonly orderBy?: InputMaybe; +}; + +export type FrameEip712Request = { + readonly actionResponse: Scalars['String']; + readonly buttonIndex: Scalars['Int']; + readonly deadline: Scalars['UnixTimestamp']; + readonly inputText: Scalars['String']; + readonly profileId: Scalars['ProfileId']; + readonly pubId: Scalars['PublicationId']; + /** The EIP-721 spec version, must be 1.0.0 */ + readonly specVersion: Scalars['String']; + readonly state: Scalars['String']; + readonly url: Scalars['URI']; +}; + +export type FrameLensManagerEip712Request = { + readonly actionResponse: Scalars['String']; + readonly buttonIndex: Scalars['Int']; + readonly inputText: Scalars['String']; + readonly profileId: Scalars['ProfileId']; + readonly pubId: Scalars['PublicationId']; + /** The EIP-721 spec version, must be 1.0.0 */ + readonly specVersion: Scalars['String']; + readonly state: Scalars['String']; + readonly url: Scalars['URI']; +}; + +export type FrameLensManagerSignatureResult = { + readonly __typename: 'FrameLensManagerSignatureResult'; + /** The signature */ + readonly signature: Scalars['Signature']; + /** The typed data signed */ + readonly signedTypedData: CreateFrameEip712TypedData; +}; + +export type FrameVerifySignature = { + /** The identity token */ + readonly identityToken: Scalars['Jwt']; + /** The signature */ + readonly signature: Scalars['Signature']; + /** The typed data signed */ + readonly signedTypedData: CreateFrameEip712TypedDataInput; }; +export enum FrameVerifySignatureResult { + DeadlineExpired = 'DEADLINE_EXPIRED', + IdentityCannotUseProfile = 'IDENTITY_CANNOT_USE_PROFILE', + IdentityUnauthorized = 'IDENTITY_UNAUTHORIZED', + SignerAddressCannotUseProfile = 'SIGNER_ADDRESS_CANNOT_USE_PROFILE', + Verified = 'VERIFIED', +} + export type FraudReasonInput = { readonly reason: PublicationReportingReason; readonly subreason: PublicationReportingFraudSubreason; @@ -1604,6 +1796,18 @@ export type GeoLocation = { readonly rawURI: Scalars['EncryptableURI']; }; +export type GetModuleMetadataResult = { + readonly __typename: 'GetModuleMetadataResult'; + readonly metadata: ModuleMetadata; + readonly moduleType: ModuleType; + /** True if the module can be signedless and use lens manager without a signature */ + readonly signlessApproved: Scalars['Boolean']; + /** True if the module can be sponsored through gasless so the user does not need to pay for gas */ + readonly sponsoredApproved: Scalars['Boolean']; + /** True if the module is deemed as safe */ + readonly verified: Scalars['Boolean']; +}; + export type GetProfileMetadataArgs = { /** The app id to query the profile's metadata */ readonly appId?: InputMaybe; @@ -1611,10 +1815,17 @@ export type GetProfileMetadataArgs = { readonly useFallback?: InputMaybe; }; +export type HandleGuardianResult = { + readonly __typename: 'HandleGuardianResult'; + readonly cooldownEndsOn?: Maybe; + readonly protected: Scalars['Boolean']; +}; + export type HandleInfo = { readonly __typename: 'HandleInfo'; /** The full handle - namespace/localname */ readonly fullHandle: Scalars['Handle']; + readonly guardian: HandleGuardianResult; /** The handle nft token id */ readonly id: Scalars['TokenId']; /** If null its not linked to anything */ @@ -1636,10 +1847,38 @@ export type HandleLinkedTo = { readonly nftTokenId: Scalars['TokenId']; }; +export type HandleToAddressRequest = { + /** The full handle - namespace/localname */ + readonly handle: Scalars['Handle']; +}; + +export enum HiddenCommentsType { + HiddenOnly = 'HIDDEN_ONLY', + Hide = 'HIDE', + Show = 'SHOW', +} + +export type HideCommentRequest = { + /** The comment to hide. It has to be under a publication made by the user making the request. If already hidden, nothing will happen. */ + readonly for: Scalars['PublicationId']; +}; + +export type HideManagedProfileRequest = { + /** The profile to hide */ + readonly profileId: Scalars['ProfileId']; +}; + export type HidePublicationRequest = { readonly for: Scalars['PublicationId']; }; +export type IphResult = { + readonly __typename: 'IPHResult'; + readonly h?: Maybe; + readonly hda: Scalars['Boolean']; + readonly hs: Scalars['Boolean']; +}; + export type IdKitPhoneVerifyWebhookRequest = { readonly sharedSecret: Scalars['String']; readonly worldcoin?: InputMaybe; @@ -1727,6 +1966,19 @@ export type InternalAllowedDomainsRequest = { readonly secret: Scalars['String']; }; +export type InternalBoostProfileRequest = { + readonly h?: InputMaybe; + readonly p?: InputMaybe; + readonly s: Scalars['Int']; + readonly secret: Scalars['String']; +}; + +export type InternalBoostScoreRequest = { + readonly h?: InputMaybe; + readonly p?: InputMaybe; + readonly secret: Scalars['String']; +}; + export type InternalClaimRequest = { readonly address: Scalars['EvmAddress']; readonly freeTextHandle?: InputMaybe; @@ -1762,6 +2014,12 @@ export type InternalInvitesRequest = { readonly secret: Scalars['String']; }; +export type InternalMintHandleAndProfileRequest = { + readonly a: Scalars['EvmAddress']; + readonly h: Scalars['String']; + readonly secret: Scalars['String']; +}; + export type InternalNftIndexRequest = { readonly n: ReadonlyArray; readonly secret: Scalars['String']; @@ -1772,6 +2030,11 @@ export type InternalNftVerifyRequest = { readonly secret: Scalars['String']; }; +export type InternalPaymentHandleInfoRequest = { + readonly p: Scalars['String']; + readonly secret: Scalars['String']; +}; + export type InternalProfileStatusRequest = { readonly hhh: Scalars['String']; readonly secret: Scalars['String']; @@ -1783,6 +2046,14 @@ export type InternalRemoveCuratedTagRequest = { readonly ttt: Scalars['String']; }; +export type InternalUpdateModuleOptionsRequest = { + readonly i: Scalars['EvmAddress']; + readonly lma?: InputMaybe; + readonly secret: Scalars['String']; + readonly t: ModuleType; + readonly v?: InputMaybe; +}; + export type InternalUpdateProfileStatusRequest = { readonly dd: Scalars['Boolean']; readonly hhh: Scalars['String']; @@ -1796,6 +2067,8 @@ export type InviteRequest = { export type InvitedResult = { readonly __typename: 'InvitedResult'; + readonly addressInvited: Scalars['EvmAddress']; + /** @deprecated Profiles hand out invites on Lens V2 so this is unnecessary information. Will always be the dead address. */ readonly by: Scalars['EvmAddress']; readonly profileMinted?: Maybe; readonly when: Scalars['DateTime']; @@ -1819,6 +2092,28 @@ export type LastLoggedInProfileRequest = { readonly for: Scalars['EvmAddress']; }; +export type LatestActed = { + readonly __typename: 'LatestActed'; + readonly actedAt: Scalars['DateTime']; + readonly profile: Profile; + readonly txHash: Scalars['TxHash']; +}; + +export type LatestPaidActionsFilter = { + readonly openActionFilters?: InputMaybe>; + readonly openActionPublicationMetadataFilters?: InputMaybe; +}; + +export type LatestPaidActionsResult = { + readonly __typename: 'LatestPaidActionsResult'; + readonly items: ReadonlyArray; + readonly pageInfo: PaginatedResultInfo; +}; + +export type LatestPaidActionsWhere = { + readonly customFilters?: InputMaybe>; +}; + export type LegacyAaveFeeCollectModuleSettings = { readonly __typename: 'LegacyAaveFeeCollectModuleSettings'; /** The collect module amount info */ @@ -2024,11 +2319,6 @@ export enum LensProfileManagerRelayErrorReasonType { export type LensProfileManagerRelayResult = LensProfileManagerRelayError | RelaySuccess; -export enum LensProtocolVersion { - V1 = 'V1', - V2 = 'V2', -} - export enum LensTransactionFailureType { MetadataError = 'METADATA_ERROR', Reverted = 'REVERTED', @@ -2110,6 +2400,13 @@ export type LiveStreamMetadataV3 = { readonly title: Scalars['String']; }; +/** Managed profile visibility type */ +export enum ManagedProfileVisibility { + All = 'ALL', + HiddenOnly = 'HIDDEN_ONLY', + NoneHidden = 'NONE_HIDDEN', +} + export type MarketplaceMetadata = { readonly __typename: 'MarketplaceMetadata'; readonly animationUrl?: Maybe; @@ -2196,6 +2493,58 @@ export type MirrorNotification = { export type MirrorablePublication = Comment | Post | Quote; +export type ModDisputeReportRequest = { + readonly reason: Scalars['String']; + readonly reportedProfileId?: InputMaybe; + readonly reportedPublicationId?: InputMaybe; + readonly reporter: Scalars['ProfileId']; +}; + +export type ModExplorePublicationRequest = { + readonly cursor?: InputMaybe; + readonly limit?: InputMaybe; + readonly orderBy: ExplorePublicationsOrderByType; + readonly where?: InputMaybe; +}; + +export enum ModExplorePublicationType { + Comment = 'COMMENT', + Post = 'POST', + Quote = 'QUOTE', +} + +export type ModExplorePublicationsWhere = { + readonly customFilters?: InputMaybe>; + readonly metadata?: InputMaybe; + readonly publicationTypes?: InputMaybe>; + readonly since?: InputMaybe; +}; + +export type ModFollowerResult = { + readonly __typename: 'ModFollowerResult'; + readonly createdAt: Scalars['DateTime']; + readonly follower: Profile; + readonly following: Profile; +}; + +export type ModReport = { + readonly __typename: 'ModReport'; + readonly additionalInfo?: Maybe; + readonly createdAt: Scalars['DateTime']; + readonly reason: Scalars['String']; + readonly reportedProfile: Profile; + readonly reportedPublication?: Maybe; + readonly reporter: Profile; + readonly subreason: Scalars['String']; +}; + +export type ModReportsRequest = { + readonly cursor?: InputMaybe; + readonly forProfile?: InputMaybe; + readonly forPublication?: InputMaybe; + readonly limit?: InputMaybe; +}; + export type ModuleCurrencyApproval = { readonly followModule?: InputMaybe; readonly openActionModule?: InputMaybe; @@ -2211,6 +2560,28 @@ export type ModuleInfo = { readonly type: Scalars['String']; }; +export type ModuleMetadata = { + readonly __typename: 'ModuleMetadata'; + readonly attributes: ReadonlyArray; + readonly authors: ReadonlyArray; + readonly description: Scalars['String']; + readonly initializeCalldataABI: Scalars['ABIJson']; + readonly initializeResultDataABI?: Maybe; + readonly name: Scalars['String']; + readonly processCalldataABI: Scalars['ABIJson']; + readonly title: Scalars['String']; +}; + +export type ModuleMetadataRequest = { + readonly implementation: Scalars['EvmAddress']; +}; + +export enum ModuleType { + Follow = 'FOLLOW', + OpenAction = 'OPEN_ACTION', + Reference = 'REFERENCE', +} + export type MomokaCommentRequest = { readonly commentOn: Scalars['PublicationId']; readonly contentURI: Scalars['URI']; @@ -2340,6 +2711,7 @@ export enum MomokaValidatorError { PotentialReorg = 'POTENTIAL_REORG', PublicationNonceInvalid = 'PUBLICATION_NONCE_INVALID', PublicationNoneDa = 'PUBLICATION_NONE_DA', + PublicationNotRecognized = 'PUBLICATION_NOT_RECOGNIZED', PublicationNoPointer = 'PUBLICATION_NO_POINTER', PublicationSignerNotAllowed = 'PUBLICATION_SIGNER_NOT_ALLOWED', SimulationFailed = 'SIMULATION_FAILED', @@ -2433,23 +2805,33 @@ export type Mutation = { readonly deleteNftGallery?: Maybe; readonly dismissRecommendedProfiles?: Maybe; readonly follow: LensProfileManagerRelayResult; + /** Hides a comment that exists under a publication made by the author. If already hidden, does nothing. */ + readonly hideComment?: Maybe; + /** Hide a managed profile from your managed profiles list. */ + readonly hideManagedProfile?: Maybe; readonly hidePublication?: Maybe; readonly idKitPhoneVerifyWebhook: IdKitPhoneVerifyWebhookResultStatusType; readonly internalAddCuratedTag?: Maybe; readonly internalAddInvites?: Maybe; readonly internalAllowDomain?: Maybe; + readonly internalBoostProfile: Scalars['Int']; readonly internalClaim?: Maybe; readonly internalCuratedUpdate?: Maybe; + readonly internalMintHandleAndProfile: Scalars['TxHash']; readonly internalNftIndex?: Maybe; readonly internalNftVerify?: Maybe; readonly internalRemoveCuratedTag?: Maybe; + readonly internalUpdateModuleOptions?: Maybe; readonly internalUpdateProfileStatus?: Maybe; readonly invite?: Maybe; readonly legacyCollect: LensProfileManagerRelayResult; readonly linkHandleToProfile: LensProfileManagerRelayResult; readonly mirrorOnMomoka: RelayMomokaResult; readonly mirrorOnchain: LensProfileManagerRelayResult; + readonly modDisputeReport?: Maybe; readonly nftOwnershipChallenge: NftOwnershipChallengeResult; + readonly peerToPeerRecommend?: Maybe; + readonly peerToPeerUnrecommend?: Maybe; readonly postOnMomoka: RelayMomokaResult; readonly postOnchain: LensProfileManagerRelayResult; readonly quoteOnMomoka: RelayMomokaResult; @@ -2459,14 +2841,20 @@ export type Mutation = { readonly removeProfileInterests?: Maybe; readonly removePublicationBookmark?: Maybe; readonly removeReaction?: Maybe; + readonly reportProfile?: Maybe; readonly reportPublication?: Maybe; readonly revokeAuthentication?: Maybe; readonly setDefaultProfile?: Maybe; readonly setFollowModule: LensProfileManagerRelayResult; readonly setProfileMetadata: LensProfileManagerRelayResult; + readonly signFrameAction: FrameLensManagerSignatureResult; readonly unblock: LensProfileManagerRelayResult; readonly undoPublicationNotInterested?: Maybe; readonly unfollow: LensProfileManagerRelayResult; + /** Unhides a hidden comment under a publication made by the author. If not hidden, does nothing. */ + readonly unhideComment?: Maybe; + /** Unhide an already hidden managed profile from your managed profiles list. */ + readonly unhideManagedProfile?: Maybe; readonly unlinkHandleFromProfile: LensProfileManagerRelayResult; readonly updateNftGalleryInfo?: Maybe; readonly updateNftGalleryItems?: Maybe; @@ -2637,6 +3025,14 @@ export type MutationFollowArgs = { request: FollowLensManagerRequest; }; +export type MutationHideCommentArgs = { + request: HideCommentRequest; +}; + +export type MutationHideManagedProfileArgs = { + request: HideManagedProfileRequest; +}; + export type MutationHidePublicationArgs = { request: HidePublicationRequest; }; @@ -2657,6 +3053,10 @@ export type MutationInternalAllowDomainArgs = { request: InternalAllowDomainRequest; }; +export type MutationInternalBoostProfileArgs = { + request: InternalBoostProfileRequest; +}; + export type MutationInternalClaimArgs = { request: InternalClaimRequest; }; @@ -2665,6 +3065,10 @@ export type MutationInternalCuratedUpdateArgs = { request: InternalCuratedUpdateRequest; }; +export type MutationInternalMintHandleAndProfileArgs = { + request: InternalMintHandleAndProfileRequest; +}; + export type MutationInternalNftIndexArgs = { request: InternalNftIndexRequest; }; @@ -2677,6 +3081,10 @@ export type MutationInternalRemoveCuratedTagArgs = { request: InternalRemoveCuratedTagRequest; }; +export type MutationInternalUpdateModuleOptionsArgs = { + request: InternalUpdateModuleOptionsRequest; +}; + export type MutationInternalUpdateProfileStatusArgs = { request: InternalUpdateProfileStatusRequest; }; @@ -2701,10 +3109,22 @@ export type MutationMirrorOnchainArgs = { request: OnchainMirrorRequest; }; +export type MutationModDisputeReportArgs = { + request: ModDisputeReportRequest; +}; + export type MutationNftOwnershipChallengeArgs = { request: NftOwnershipChallengeRequest; }; +export type MutationPeerToPeerRecommendArgs = { + request: PeerToPeerRecommendRequest; +}; + +export type MutationPeerToPeerUnrecommendArgs = { + request: PeerToPeerRecommendRequest; +}; + export type MutationPostOnMomokaArgs = { request: MomokaPostRequest; }; @@ -2741,6 +3161,10 @@ export type MutationRemoveReactionArgs = { request: ReactionRequest; }; +export type MutationReportProfileArgs = { + request: ReportProfileRequest; +}; + export type MutationReportPublicationArgs = { request: ReportPublicationRequest; }; @@ -2761,6 +3185,10 @@ export type MutationSetProfileMetadataArgs = { request: OnchainSetProfileMetadataRequest; }; +export type MutationSignFrameActionArgs = { + request: FrameLensManagerEip712Request; +}; + export type MutationUnblockArgs = { request: UnblockRequest; }; @@ -2773,6 +3201,14 @@ export type MutationUnfollowArgs = { request: UnfollowRequest; }; +export type MutationUnhideCommentArgs = { + request: UnhideCommentRequest; +}; + +export type MutationUnhideManagedProfileArgs = { + request: UnhideManagedProfileRequest; +}; + export type MutationUnlinkHandleFromProfileArgs = { request: UnlinkHandleFromProfileRequest; }; @@ -2797,6 +3233,8 @@ export type MutualFollowersRequest = { readonly cursor?: InputMaybe; readonly limit?: InputMaybe; readonly observer: Scalars['ProfileId']; + /** The order by which to sort the profiles */ + readonly orderBy?: InputMaybe; readonly viewing: Scalars['ProfileId']; }; @@ -2836,10 +3274,10 @@ export type Nfi = { export type Nft = { readonly __typename: 'Nft'; readonly collection: NftCollection; - readonly contentURI: Scalars['URI']; + readonly contentURI?: Maybe; readonly contract: NetworkAddress; readonly contractType: NftContractType; - readonly metadata: NftMetadata; + readonly metadata?: Maybe; readonly owner: Owner; readonly tokenId: Scalars['TokenId']; readonly totalSupply: Scalars['String']; @@ -3032,6 +3470,8 @@ export type Notification = export type NotificationRequest = { readonly cursor?: InputMaybe; + /** The order by which to sort the profiles on follows, reactions, actions and mirrors */ + readonly orderBy?: InputMaybe; readonly where?: InputMaybe; }; @@ -3050,6 +3490,7 @@ export type NotificationWhere = { readonly highSignalFilter?: InputMaybe; readonly notificationTypes?: InputMaybe>; readonly publishedOn?: InputMaybe>; + readonly timeBasedAggregation?: InputMaybe; }; export type OnchainCommentRequest = { @@ -3118,6 +3559,7 @@ export type OpenActionModule = | LegacySimpleCollectModuleSettings | LegacyTimedFeeCollectModuleSettings | MultirecipientFeeCollectOpenActionSettings + | ProtocolSharedRevenueCollectOpenActionSettings | SimpleCollectOpenActionSettings | UnknownOpenActionModuleSettings; @@ -3138,10 +3580,17 @@ export enum OpenActionModuleType { LegacySimpleCollectModule = 'LegacySimpleCollectModule', LegacyTimedFeeCollectModule = 'LegacyTimedFeeCollectModule', MultirecipientFeeCollectOpenActionModule = 'MultirecipientFeeCollectOpenActionModule', + ProtocolSharedRevenueCollectOpenActionModule = 'ProtocolSharedRevenueCollectOpenActionModule', SimpleCollectOpenActionModule = 'SimpleCollectOpenActionModule', UnknownOpenActionModule = 'UnknownOpenActionModule', } +export type OpenActionPaidAction = { + readonly __typename: 'OpenActionPaidAction'; + readonly actedOn: PrimaryPublication; + readonly latestActed: ReadonlyArray; +}; + export type OpenActionProfileActed = { readonly __typename: 'OpenActionProfileActed'; readonly actedAt: Scalars['DateTime']; @@ -3187,6 +3636,12 @@ export type PaginatedCurrenciesResult = { readonly pageInfo: PaginatedResultInfo; }; +export type PaginatedDisputedReports = { + readonly __typename: 'PaginatedDisputedReports'; + readonly items: ReadonlyArray; + readonly pageInfo: PaginatedResultInfo; +}; + export type PaginatedExplorePublicationResult = { readonly __typename: 'PaginatedExplorePublicationResult'; readonly items: ReadonlyArray; @@ -3211,6 +3666,24 @@ export type PaginatedHandlesResult = { readonly pageInfo: PaginatedResultInfo; }; +export type PaginatedModExplorePublicationResult = { + readonly __typename: 'PaginatedModExplorePublicationResult'; + readonly items: ReadonlyArray; + readonly pageInfo: PaginatedResultInfo; +}; + +export type PaginatedModFollowersResult = { + readonly __typename: 'PaginatedModFollowersResult'; + readonly items: ReadonlyArray; + readonly pageInfo: PaginatedResultInfo; +}; + +export type PaginatedModReports = { + readonly __typename: 'PaginatedModReports'; + readonly items: ReadonlyArray; + readonly pageInfo: PaginatedResultInfo; +}; + /** Nft collections paginated result */ export type PaginatedNftCollectionsResult = { readonly __typename: 'PaginatedNftCollectionsResult'; @@ -3301,6 +3774,11 @@ export type PaginatedPublicationsTagsResult = { readonly pageInfo: PaginatedResultInfo; }; +export type PaginatedRequest = { + readonly cursor?: InputMaybe; + readonly limit?: InputMaybe; +}; + /** The paginated result info */ export type PaginatedResultInfo = { readonly __typename: 'PaginatedResultInfo'; @@ -3328,6 +3806,13 @@ export type PaginatedWhoReactedResult = { readonly pageInfo: PaginatedResultInfo; }; +export type PaidAction = FollowPaidAction | OpenActionPaidAction; + +export type PeerToPeerRecommendRequest = { + /** The profile to recommend */ + readonly profileId: Scalars['ProfileId']; +}; + export type PhysicalAddress = { readonly __typename: 'PhysicalAddress'; /** The country name component. */ @@ -3412,7 +3897,7 @@ export type PopularNftCollectionsRequest = { /** Include only verified collections */ readonly onlyVerified?: InputMaybe; /** The ordering of Nft collection owners. Defaults to Total Lens Profile owners */ - readonly orderBy?: InputMaybe; + readonly orderBy?: PopularNftCollectionsOrder; }; export type Post = { @@ -3471,6 +3956,8 @@ export type Profile = { readonly operations: ProfileOperations; /** Who owns the profile */ readonly ownedBy: NetworkAddress; + /** If the profile has been recommended by the authenticated user */ + readonly peerToPeerRecommendedByMe: Scalars['Boolean']; /** If the profile has got signless enabled */ readonly signless: Scalars['Boolean']; /** If lens API will sponsor this persons for gasless experience, note they can have signless on but sponsor false which means it be rejected */ @@ -3524,6 +4011,11 @@ export enum ProfileActionHistoryType { UnlinkHandle = 'UNLINK_HANDLE', } +export type ProfileFraudReasonInput = { + readonly reason: ProfileReportingReason; + readonly subreason: ProfileReportingFraudSubreason; +}; + export type ProfileGuardianResult = { readonly __typename: 'ProfileGuardianResult'; readonly cooldownEndsOn?: Maybe; @@ -3699,6 +4191,26 @@ export type ProfileRecommendationsRequest = { readonly shuffle?: InputMaybe; }; +export enum ProfileReportingFraudSubreason { + Impersonation = 'IMPERSONATION', + SomethingElse = 'SOMETHING_ELSE', +} + +export enum ProfileReportingReason { + Fraud = 'FRAUD', + Spam = 'SPAM', +} + +export type ProfileReportingReasonInput = { + readonly fraudReason?: InputMaybe; + readonly spamReason?: InputMaybe; +}; + +export enum ProfileReportingSpamSubreason { + Repetitive = 'REPETITIVE', + SomethingElse = 'SOMETHING_ELSE', +} + export type ProfileRequest = { /** The handle for profile you want to fetch - namespace/localname */ readonly forHandle?: InputMaybe; @@ -3709,6 +4221,8 @@ export type ProfileRequest = { export type ProfileSearchRequest = { readonly cursor?: InputMaybe; readonly limit?: InputMaybe; + /** The order by which to sort the profiles */ + readonly orderBy?: InputMaybe; /** Query for the profile search */ readonly query: Scalars['String']; /** Filtering criteria for profile search */ @@ -3720,6 +4234,11 @@ export type ProfileSearchWhere = { readonly customFilters?: InputMaybe>; }; +export type ProfileSpamReasonInput = { + readonly reason: ProfileReportingReason; + readonly subreason: ProfileReportingSpamSubreason; +}; + /** The Profile Stats */ export type ProfileStats = { readonly __typename: 'ProfileStats'; @@ -3728,6 +4247,8 @@ export type ProfileStats = { readonly followers: Scalars['Int']; readonly following: Scalars['Int']; readonly id: Scalars['ProfileId']; + /** The profile classifier score of this profile relative to others on Lens. It is a % out of 100. */ + readonly lensClassifierScore?: Maybe; readonly mirrors: Scalars['Int']; readonly posts: Scalars['Int']; readonly publications: Scalars['Int']; @@ -3756,6 +4277,7 @@ export type ProfileStatsReactionsArgs = { export type ProfileStatsArg = { readonly customFilters?: InputMaybe>; readonly forApps?: InputMaybe>; + readonly hiddenComments?: InputMaybe; }; export type ProfileStatsCountOpenActionArgs = { @@ -3776,6 +4298,7 @@ export type ProfilesManagedRequest = { readonly cursor?: InputMaybe; /** The Ethereum address for which to retrieve managed profiles */ readonly for: Scalars['EvmAddress']; + readonly hiddenFilter?: InputMaybe; readonly includeOwned?: InputMaybe; readonly limit?: InputMaybe; }; @@ -3786,9 +4309,16 @@ export type ProfilesManagedResult = { readonly isLensManager: Scalars['Boolean']; }; +export enum ProfilesOrderBy { + Default = 'DEFAULT', + ProfileClassifier = 'PROFILE_CLASSIFIER', +} + export type ProfilesRequest = { readonly cursor?: InputMaybe; readonly limit?: InputMaybe; + /** The order by which to sort the profiles */ + readonly orderBy?: InputMaybe; /** The where clause to use to filter on what you are looking for */ readonly where: ProfilesRequestWhere; }; @@ -3808,6 +4338,40 @@ export type ProfilesRequestWhere = { readonly whoQuotedPublication?: InputMaybe; }; +export type ProtocolSharedRevenueCollectModuleInput = { + readonly amount?: InputMaybe; + readonly collectLimit?: InputMaybe; + /** The wallet of a client app to share revenues alongside the recipient and the protocol. Optional. */ + readonly creatorClient?: InputMaybe; + readonly currentCollects?: Scalars['Float']; + readonly endsAt?: InputMaybe; + readonly followerOnly: Scalars['Boolean']; + readonly recipient?: InputMaybe; + readonly referralFee?: InputMaybe; +}; + +export type ProtocolSharedRevenueCollectOpenActionSettings = { + readonly __typename: 'ProtocolSharedRevenueCollectOpenActionSettings'; + /** The collect module amount info. `Amount.value = 0` in case of free collects. */ + readonly amount: Amount; + /** The maximum number of collects for this publication. */ + readonly collectLimit?: Maybe; + /** The collect nft address - only deployed on first collect */ + readonly collectNft?: Maybe; + readonly contract: NetworkAddress; + /** If supplied, this is the app that will receive a split of the shared revenue together with the recipient as well as the protocol */ + readonly creatorClient?: Maybe; + /** The end timestamp after which collecting is impossible. */ + readonly endsAt?: Maybe; + /** True if only followers of publisher may collect the post. */ + readonly followerOnly: Scalars['Boolean']; + /** The collect module recipient address */ + readonly recipient: Scalars['EvmAddress']; + /** The collect module referral fee */ + readonly referralFee: Scalars['Float']; + readonly type: OpenActionModuleType; +}; + export type PublicationBookmarkRequest = { readonly on: Scalars['PublicationId']; }; @@ -3823,6 +4387,8 @@ export type PublicationBookmarksWhere = { }; export type PublicationCommentOn = { + /** You can use this enum to show, hide or show only hidden comments */ + readonly hiddenComments?: InputMaybe; readonly id: Scalars['PublicationId']; readonly ranking?: InputMaybe; }; @@ -3917,6 +4483,7 @@ export enum PublicationMetadataLicenseType { export type PublicationMetadataLitEncryption = { readonly __typename: 'PublicationMetadataLitEncryption'; readonly accessCondition: RootCondition; + readonly accessControlContract: NetworkAddress; readonly encryptedPaths: ReadonlyArray; readonly encryptionKey: Scalars['ContentEncryptionKey']; }; @@ -4050,6 +4617,7 @@ export enum PublicationReportingIllegalSubreason { AnimalAbuse = 'ANIMAL_ABUSE', DirectThreat = 'DIRECT_THREAT', HumanAbuse = 'HUMAN_ABUSE', + Plagiarism = 'PLAGIARISM', ThreatIndividual = 'THREAT_INDIVIDUAL', Violence = 'VIOLENCE', } @@ -4099,6 +4667,7 @@ export type PublicationSearchWhere = { readonly customFilters?: InputMaybe>; readonly metadata?: InputMaybe; readonly publicationTypes?: InputMaybe>; + readonly withOpenActions?: InputMaybe>; }; export type PublicationStats = { @@ -4126,6 +4695,7 @@ export type PublicationStatsCountOpenActionArgs = { export type PublicationStatsInput = { readonly customFilters?: InputMaybe>; + readonly hiddenComments?: InputMaybe; /** Filter the returned stats on apps and 1 of the following filters: tags, contentWarning, mainContentFocus, locale */ readonly metadata?: InputMaybe; }; @@ -4180,16 +4750,21 @@ export type PublicationsWhere = { export type Query = { readonly __typename: 'Query'; readonly approvedAuthentications: PaginatedApprovedAuthenticationResult; + /** note here if your using a wallet JWT token it will get the allowance of the public proxy contract if its supported if not throw as profiles act not wallets */ readonly approvedModuleAllowanceAmount: ReadonlyArray; readonly canClaim: ReadonlyArray; readonly challenge: AuthChallengeResult; + readonly claimTokens: LensProfileManagerRelayResult; readonly claimableProfiles: ClaimableProfilesResult; readonly claimableStatus: ClaimProfileStatusType; + readonly claimableTokens: ClaimableTokensResult; + readonly createFrameTypedData: CreateFrameEip712TypedData; /** Get all enabled currencies */ readonly currencies: PaginatedCurrenciesResult; readonly currentSession: ApprovedAuthentication; /** Get the default profile for a given EvmAddress. If no default is explicitly set, you will get the oldest profile owned by the address. */ readonly defaultProfile?: Maybe; + readonly didReactOnPublication: ReadonlyArray; readonly exploreProfiles: PaginatedProfileResult; readonly explorePublications: PaginatedExplorePublicationResult; readonly feed: PaginatedFeedResult; @@ -4198,18 +4773,29 @@ export type Query = { readonly followStatusBulk: ReadonlyArray; readonly followers: PaginatedProfileResult; readonly following: PaginatedProfileResult; + readonly generateLensAPIRelayAddress: Scalars['EvmAddress']; + /** note here if your using a wallet JWT token it will approve to the public proxy contract if its supported if not throw as profiles act not wallets */ readonly generateModuleCurrencyApprovalData: GenerateModuleCurrencyApprovalResult; + readonly handleToAddress?: Maybe; readonly internalAllowedDomains: ReadonlyArray; + readonly internalBoostScore?: Maybe; readonly internalClaimStatus?: Maybe; readonly internalCuratedHandles: ReadonlyArray; readonly internalCuratedTags: ReadonlyArray; readonly internalInvites: Scalars['Int']; + readonly internalPaymentHandleInfo?: Maybe; readonly internalProfileStatus: PrfResult; readonly invitedProfiles: ReadonlyArray; readonly lastLoggedInProfile?: Maybe; + readonly latestPaidActions: LatestPaidActionsResult; readonly lensAPIOwnedEOAs: ReadonlyArray; - readonly lensProtocolVersion: LensProtocolVersion; + readonly lensProtocolVersion: Scalars['String']; readonly lensTransactionStatus?: Maybe; + readonly modDisputedReports: PaginatedDisputedReports; + readonly modExplorePublications: PaginatedModExplorePublicationResult; + readonly modFollowers: PaginatedModFollowersResult; + readonly modLatestReports: PaginatedModReports; + readonly moduleMetadata?: Maybe; readonly momokaSubmitters: MomokaSubmittersResult; readonly momokaSummary: MomokaSummaryResult; readonly momokaTransaction?: Maybe; @@ -4255,9 +4841,11 @@ export type Query = { readonly supportedOpenActionModules: PaginatedSupportedModules; readonly supportedReferenceModules: PaginatedSupportedModules; readonly txIdToTxHash?: Maybe; + readonly userRateLimit: UserCurrentRateLimitResult; readonly userSigNonces: UserSigNonces; readonly validatePublicationMetadata: PublicationValidateMetadataResult; readonly verify: Scalars['Boolean']; + readonly verifyFrameSignature: FrameVerifySignatureResult; readonly whoActedOnPublication: PaginatedProfileResult; /** The list of profiles that the logged in profile has blocked */ readonly whoHaveBlocked: PaginatedProfileResult; @@ -4280,6 +4868,14 @@ export type QueryChallengeArgs = { request: ChallengeRequest; }; +export type QueryClaimTokensArgs = { + request: ClaimTokensRequest; +}; + +export type QueryCreateFrameTypedDataArgs = { + request: FrameEip712Request; +}; + export type QueryCurrenciesArgs = { request: PaginatedOffsetRequest; }; @@ -4288,6 +4884,10 @@ export type QueryDefaultProfileArgs = { request: DefaultProfileRequest; }; +export type QueryDidReactOnPublicationArgs = { + request: DidReactOnPublicationRequest; +}; + export type QueryExploreProfilesArgs = { request: ExploreProfilesRequest; }; @@ -4324,10 +4924,18 @@ export type QueryGenerateModuleCurrencyApprovalDataArgs = { request: GenerateModuleCurrencyApprovalDataRequest; }; +export type QueryHandleToAddressArgs = { + request: HandleToAddressRequest; +}; + export type QueryInternalAllowedDomainsArgs = { request: InternalAllowedDomainsRequest; }; +export type QueryInternalBoostScoreArgs = { + request: InternalBoostScoreRequest; +}; + export type QueryInternalClaimStatusArgs = { request: InternalClaimStatusRequest; }; @@ -4344,6 +4952,10 @@ export type QueryInternalInvitesArgs = { request: InternalInvitesRequest; }; +export type QueryInternalPaymentHandleInfoArgs = { + request: InternalPaymentHandleInfoRequest; +}; + export type QueryInternalProfileStatusArgs = { request: InternalProfileStatusRequest; }; @@ -4352,10 +4964,36 @@ export type QueryLastLoggedInProfileArgs = { request: LastLoggedInProfileRequest; }; +export type QueryLatestPaidActionsArgs = { + filter?: InputMaybe; + request?: InputMaybe; + where?: InputMaybe; +}; + export type QueryLensTransactionStatusArgs = { request: LensTransactionStatusRequest; }; +export type QueryModDisputedReportsArgs = { + request: PaginatedRequest; +}; + +export type QueryModExplorePublicationsArgs = { + request: ModExplorePublicationRequest; +}; + +export type QueryModFollowersArgs = { + request: PaginatedRequest; +}; + +export type QueryModLatestReportsArgs = { + request: ModReportsRequest; +}; + +export type QueryModuleMetadataArgs = { + request: ModuleMetadataRequest; +}; + export type QueryMomokaTransactionArgs = { request: MomokaTransactionRequest; }; @@ -4496,6 +5134,10 @@ export type QueryTxIdToTxHashArgs = { for: Scalars['TxId']; }; +export type QueryUserRateLimitArgs = { + request: UserCurrentRateLimitRequest; +}; + export type QueryValidatePublicationMetadataArgs = { request: ValidatePublicationMetadataRequest; }; @@ -4504,6 +5146,10 @@ export type QueryVerifyArgs = { request: VerifyRequest; }; +export type QueryVerifyFrameSignatureArgs = { + request: FrameVerifySignature; +}; + export type QueryWhoActedOnPublicationArgs = { request: WhoActedOnPublicationRequest; }; @@ -4571,6 +5217,8 @@ export type ReactionNotification = { }; export type ReactionRequest = { + /** The ID of the app that the reaction was made from. */ + readonly app?: InputMaybe; readonly for: Scalars['PublicationId']; readonly reaction: PublicationReactionType; }; @@ -4659,6 +5307,17 @@ export type RelayResult = RelayError | RelaySuccess; export enum RelayRoleKey { CreateProfile = 'CREATE_PROFILE', + CreateProfileWithHandleUsingCredits_1 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_1', + CreateProfileWithHandleUsingCredits_2 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_2', + CreateProfileWithHandleUsingCredits_3 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_3', + CreateProfileWithHandleUsingCredits_4 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_4', + CreateProfileWithHandleUsingCredits_5 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_5', + CreateProfileWithHandleUsingCredits_6 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_6', + CreateProfileWithHandleUsingCredits_7 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_7', + CreateProfileWithHandleUsingCredits_8 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_8', + CreateProfileWithHandleUsingCredits_9 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_9', + CreateProfileWithHandleUsingCredits_10 = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_10', + CreateProfileWithHandleUsingCreditsUnderCharLimit = 'CREATE_PROFILE_WITH_HANDLE_USING_CREDITS_UNDER_CHAR_LIMIT', LensManager_1 = 'LENS_MANAGER_1', LensManager_2 = 'LENS_MANAGER_2', LensManager_3 = 'LENS_MANAGER_3', @@ -4669,6 +5328,26 @@ export enum RelayRoleKey { LensManager_8 = 'LENS_MANAGER_8', LensManager_9 = 'LENS_MANAGER_9', LensManager_10 = 'LENS_MANAGER_10', + LensManager_11 = 'LENS_MANAGER_11', + LensManager_12 = 'LENS_MANAGER_12', + LensManager_13 = 'LENS_MANAGER_13', + LensManager_14 = 'LENS_MANAGER_14', + LensManager_15 = 'LENS_MANAGER_15', + LensManager_16 = 'LENS_MANAGER_16', + LensManager_17 = 'LENS_MANAGER_17', + LensManager_18 = 'LENS_MANAGER_18', + LensManager_19 = 'LENS_MANAGER_19', + LensManager_20 = 'LENS_MANAGER_20', + LensManager_21 = 'LENS_MANAGER_21', + LensManager_22 = 'LENS_MANAGER_22', + LensManager_23 = 'LENS_MANAGER_23', + LensManager_24 = 'LENS_MANAGER_24', + LensManager_25 = 'LENS_MANAGER_25', + LensManager_26 = 'LENS_MANAGER_26', + LensManager_27 = 'LENS_MANAGER_27', + LensManager_28 = 'LENS_MANAGER_28', + LensManager_29 = 'LENS_MANAGER_29', + LensManager_30 = 'LENS_MANAGER_30', WithSig_1 = 'WITH_SIG_1', WithSig_2 = 'WITH_SIG_2', WithSig_3 = 'WITH_SIG_3', @@ -4679,6 +5358,16 @@ export enum RelayRoleKey { WithSig_8 = 'WITH_SIG_8', WithSig_9 = 'WITH_SIG_9', WithSig_10 = 'WITH_SIG_10', + WithSig_11 = 'WITH_SIG_11', + WithSig_12 = 'WITH_SIG_12', + WithSig_13 = 'WITH_SIG_13', + WithSig_14 = 'WITH_SIG_14', + WithSig_15 = 'WITH_SIG_15', + WithSig_16 = 'WITH_SIG_16', + WithSig_17 = 'WITH_SIG_17', + WithSig_18 = 'WITH_SIG_18', + WithSig_19 = 'WITH_SIG_19', + WithSig_20 = 'WITH_SIG_20', } export type RelaySuccess = { @@ -4687,6 +5376,12 @@ export type RelaySuccess = { readonly txId: Scalars['TxId']; }; +export type ReportProfileRequest = { + readonly additionalComments?: InputMaybe; + readonly for: Scalars['ProfileId']; + readonly reason: ProfileReportingReasonInput; +}; + export type ReportPublicationRequest = { readonly additionalComments?: InputMaybe; readonly for: Scalars['PublicationId']; @@ -4898,6 +5593,7 @@ export type SupportedModulesRequest = { readonly cursor?: InputMaybe; readonly includeUnknown?: InputMaybe; readonly limit?: InputMaybe; + readonly onlyVerified?: InputMaybe; }; export type SybilDotOrgIdentity = { @@ -5018,6 +5714,16 @@ export type UnfollowRequest = { readonly unfollow: ReadonlyArray; }; +export type UnhideCommentRequest = { + /** The comment to unhide. It has to be under a publication made by the user making the request. If already visible, nothing will happen. */ + readonly for: Scalars['PublicationId']; +}; + +export type UnhideManagedProfileRequest = { + /** The profile to unhide */ + readonly profileId: Scalars['ProfileId']; +}; + export type UnknownFollowModuleInput = { readonly address: Scalars['EvmAddress']; readonly data: Scalars['BlockchainData']; @@ -5031,9 +5737,22 @@ export type UnknownFollowModuleRedeemInput = { export type UnknownFollowModuleSettings = { readonly __typename: 'UnknownFollowModuleSettings'; readonly contract: NetworkAddress; - /** The data used to setup the module which you can decode with your known ABI */ + /** + * The data used to setup the module which you can decode with your known ABI + * @deprecated Use initializeResultData instead + */ readonly followModuleReturnData?: Maybe; + /** The data used to setup the module */ + readonly initializeCalldata?: Maybe; + /** The data returned from the init module */ + readonly initializeResultData?: Maybe; + /** True if the module can be signedless and use lens manager without a signature */ + readonly signlessApproved: Scalars['Boolean']; + /** True if the module can be sponsored through gasless so the user does not need to pay for gas */ + readonly sponsoredApproved: Scalars['Boolean']; readonly type: FollowModuleType; + /** True if the module is deemed as safe */ + readonly verified: Scalars['Boolean']; }; export type UnknownOpenActionActRedeemInput = { @@ -5051,9 +5770,22 @@ export type UnknownOpenActionModuleSettings = { /** The collect nft address - only deployed on first collect and if its a collectable open action */ readonly collectNft?: Maybe; readonly contract: NetworkAddress; - /** The data used to setup the module which you can decode with your known ABI */ + /** The data used to setup the module */ + readonly initializeCalldata?: Maybe; + /** The data returned from the init module */ + readonly initializeResultData?: Maybe; + /** + * The data returned from the init module + * @deprecated Use initializeResultData instead + */ readonly openActionModuleReturnData?: Maybe; + /** True if the module can be signedless and use lens manager without a signature */ + readonly signlessApproved: Scalars['Boolean']; + /** True if the module can be sponsored through gasless so the user does not need to pay for gas */ + readonly sponsoredApproved: Scalars['Boolean']; readonly type: OpenActionModuleType; + /** True if the module is deemed as safe */ + readonly verified: Scalars['Boolean']; }; export type UnknownOpenActionResult = { @@ -5071,9 +5803,22 @@ export type UnknownReferenceModuleInput = { export type UnknownReferenceModuleSettings = { readonly __typename: 'UnknownReferenceModuleSettings'; readonly contract: NetworkAddress; - /** The data used to setup the module which you can decode with your known ABI */ + /** The data used to setup the module */ + readonly initializeCalldata?: Maybe; + /** The data returned from the init module */ + readonly initializeResultData?: Maybe; + /** + * The data used to setup the module which you can decode with your known ABI + * @deprecated Use initializeResultData instead + */ readonly referenceModuleReturnData?: Maybe; + /** True if the module can be signedless and use lens manager without a signature */ + readonly signlessApproved: Scalars['Boolean']; + /** True if the module can be sponsored through gasless so the user does not need to pay for gas */ + readonly sponsoredApproved: Scalars['Boolean']; readonly type: ReferenceModuleType; + /** True if the module is deemed as safe */ + readonly verified: Scalars['Boolean']; }; export type UnknownSupportedModule = { @@ -5087,6 +5832,27 @@ export type UnlinkHandleFromProfileRequest = { readonly handle: Scalars['Handle']; }; +export type UserCurrentRateLimit = { + readonly __typename: 'UserCurrentRateLimit'; + readonly dayAllowance: Scalars['Int']; + readonly dayAllowanceLeft: Scalars['Int']; + readonly dayAllowanceUsed: Scalars['Int']; + readonly hourAllowance: Scalars['Int']; + readonly hourAllowanceLeft: Scalars['Int']; + readonly hourAllowanceUsed: Scalars['Int']; +}; + +export type UserCurrentRateLimitRequest = { + readonly profileId?: InputMaybe; + readonly userAddress: Scalars['EvmAddress']; +}; + +export type UserCurrentRateLimitResult = { + readonly __typename: 'UserCurrentRateLimitResult'; + readonly momoka: UserCurrentRateLimit; + readonly onchain: UserCurrentRateLimit; +}; + export type UserPoapsQueryRequest = { readonly cursor?: InputMaybe; readonly for: Scalars['ProfileId']; @@ -5107,7 +5873,9 @@ export type ValidatePublicationMetadataRequest = { export type VerifyRequest = { /** The access token to verify */ - readonly accessToken: Scalars['Jwt']; + readonly accessToken?: InputMaybe; + /** The identity token to verify */ + readonly identityToken?: InputMaybe; }; export type Video = { @@ -5146,6 +5914,8 @@ export type WhoActedOnPublicationRequest = { readonly cursor?: InputMaybe; readonly limit?: InputMaybe; readonly on: Scalars['PublicationId']; + /** The order by which to sort the profiles */ + readonly orderBy?: InputMaybe; readonly where?: InputMaybe; }; @@ -5162,6 +5932,8 @@ export type WhoReactedPublicationRequest = { readonly cursor?: InputMaybe; readonly for: Scalars['PublicationId']; readonly limit?: InputMaybe; + /** The order by which to sort the profiles */ + readonly orderBy?: InputMaybe; readonly where?: InputMaybe; }; diff --git a/packages/react/src/environments.ts b/packages/react/src/environments.ts index 38ff9196f2..865225b8ec 100644 --- a/packages/react/src/environments.ts +++ b/packages/react/src/environments.ts @@ -1,4 +1,4 @@ -import { ChainType, URL } from '@lens-protocol/shared-kernel'; +import { ChainType, EvmAddress, URL } from '@lens-protocol/shared-kernel'; import { ChainConfigRegistry, amoy, goerli, mainnet, polygon } from './chains'; @@ -31,7 +31,8 @@ export type EnvironmentConfig = { chains: ChainConfigRegistry; timings: TransactionObserverTimings; contracts: { - permissionlessCreator: string; + permissionlessCreator: EvmAddress; + publicActProxy: EvmAddress; }; handleResolver: ProfileHandleResolver; }; @@ -59,6 +60,7 @@ export const production: EnvironmentConfig = { }, contracts: { permissionlessCreator: '0x0b5e6100243f793e480DE6088dE6bA70aA9f3872', + publicActProxy: '0x53582b1b7BE71622E7386D736b6baf87749B7a2B', }, handleResolver: (localName) => `lens/${localName}`, }; @@ -86,6 +88,7 @@ export const development: EnvironmentConfig = { }, contracts: { permissionlessCreator: '0x36440da1D98FF46637f0b98AAA082bc77977B49B', + publicActProxy: '0x77706372deCeb81D49422F9115680B4873722AF1', }, handleResolver: (localName) => `lens/${localName}`, }; @@ -107,6 +110,7 @@ export const staging: EnvironmentConfig = { }, contracts: { permissionlessCreator: '0x36440da1D98FF46637f0b98AAA082bc77977B49B', + publicActProxy: '0x77706372deCeb81D49422F9115680B4873722AF1', }, handleResolver: (localName) => `lens/${localName}`, }; diff --git a/packages/react/src/transactions/adapters/AbstractContractCallGateway.ts b/packages/react/src/transactions/adapters/AbstractContractCallGateway.ts index 7cecf77d56..a8f924741e 100644 --- a/packages/react/src/transactions/adapters/AbstractContractCallGateway.ts +++ b/packages/react/src/transactions/adapters/AbstractContractCallGateway.ts @@ -57,7 +57,7 @@ export abstract class AbstractContractCallGateway> { + ): Promise> { const provider = await this.providerFactory.createProvider({ chainType: ChainType.POLYGON, }); diff --git a/packages/react/src/transactions/adapters/CreateProfileTransactionGateway.ts b/packages/react/src/transactions/adapters/CreateProfileTransactionGateway.ts index 8214052d94..f22733264b 100644 --- a/packages/react/src/transactions/adapters/CreateProfileTransactionGateway.ts +++ b/packages/react/src/transactions/adapters/CreateProfileTransactionGateway.ts @@ -1,3 +1,4 @@ +import { AddressZero } from '@ethersproject/constants'; import { JsonRpcProvider } from '@ethersproject/providers'; import { GenerateLensApiRelayAddressData, @@ -35,7 +36,7 @@ export class CreateProfileTransactionGateway extends AbstractContractCallGateway const encodedData = contract.interface.encodeFunctionData('createProfileWithHandle', [ { to: request.to, - followModule: '0x0000000000000000000000000000000000000000', + followModule: AddressZero, followModuleInitData: '0x', }, request.localName, diff --git a/packages/react/src/transactions/adapters/OpenActionGateway.ts b/packages/react/src/transactions/adapters/OpenActionGateway.ts index dc0b4bb736..0b7f3e5ce8 100644 --- a/packages/react/src/transactions/adapters/OpenActionGateway.ts +++ b/packages/react/src/transactions/adapters/OpenActionGateway.ts @@ -16,17 +16,22 @@ import { AllOpenActionType, DelegableOpenActionRequest, LegacyCollectRequest, - MultirecipientCollectRequest, OpenActionRequest, - SimpleCollectRequest, - UnknownActionRequest, + isUnknownActionRequest, } from '@lens-protocol/domain/use-cases/publications'; import { BroadcastingError, IDelegatedTransactionGateway, ISignedOnChainGateway, } from '@lens-protocol/domain/use-cases/transactions'; -import { ChainType, Data, PromiseResult, success } from '@lens-protocol/shared-kernel'; +import { + ChainType, + Data, + Erc20Amount, + PromiseResult, + never, + success, +} from '@lens-protocol/shared-kernel'; import { v4 } from 'uuid'; import { RequiredConfig } from '../../config'; @@ -37,10 +42,9 @@ import { ITransactionFactory } from './ITransactionFactory'; import { resolveOnchainReferrers } from './referrals'; import { handleRelayError } from './relayer'; -type NewOpenActionRequest = - | SimpleCollectRequest - | MultirecipientCollectRequest - | UnknownActionRequest; +type NewOpenActionRequest = Exclude; + +type NewDelegableOpenActionRequest = Exclude; export class OpenActionGateway extends AbstractContractCallGateway @@ -148,9 +152,9 @@ export class OpenActionGateway } private async relayActOnOpenActionRequestWithProfileManager( - request: SimpleCollectRequest | UnknownActionRequest, + request: NewDelegableOpenActionRequest, ): PromiseResult { - const input = this.resolveActOnOpenActionRequest(request); + const input = this.resolveActOnOpenActionLensManagerRequest(request); const { data } = await this.apolloClient.mutate({ mutation: ActOnOpenActionDocument, @@ -189,6 +193,23 @@ export class OpenActionGateway private resolveActOnOpenActionRequest(request: NewOpenActionRequest): gql.ActOnOpenActionRequest { switch (request.type) { + case AllOpenActionType.MULTIRECIPIENT_COLLECT: + return { + for: request.publicationId, + actOn: { + multirecipientCollectOpenAction: true, + }, + referrers: resolveOnchainReferrers(request.referrers), + }; + case AllOpenActionType.SHARED_REVENUE_COLLECT: + // TODO handle executor client address + return { + for: request.publicationId, + actOn: { + protocolSharedRevenueCollectOpenAction: true, + }, + referrers: resolveOnchainReferrers(request.referrers), + }; case AllOpenActionType.SIMPLE_COLLECT: return { for: request.publicationId, @@ -197,11 +218,29 @@ export class OpenActionGateway }, referrers: resolveOnchainReferrers(request.referrers), }; - case AllOpenActionType.MULTIRECIPIENT_COLLECT: + case AllOpenActionType.UNKNOWN_OPEN_ACTION: return { for: request.publicationId, actOn: { - multirecipientCollectOpenAction: true, + unknownOpenAction: { + address: request.address, + data: request.data, + }, + }, + referrers: resolveOnchainReferrers(request.referrers), + }; + } + } + + private resolveActOnOpenActionLensManagerRequest( + request: NewDelegableOpenActionRequest, + ): gql.ActOnOpenActionLensManagerRequest { + switch (request.type) { + case AllOpenActionType.SIMPLE_COLLECT: + return { + for: request.publicationId, + actOn: { + simpleCollectOpenAction: true, }, referrers: resolveOnchainReferrers(request.referrers), }; @@ -298,13 +337,21 @@ export class OpenActionGateway request: NewOpenActionRequest, result: gql.CreateActOnOpenActionBroadcastItemResult, ): ContractCallDetails { - if ( - request.type == AllOpenActionType.UNKNOWN_OPEN_ACTION || - (request.type == AllOpenActionType.SIMPLE_COLLECT && !request.fee) - ) { - return this.createPublicFreeActCallDetails(result); + switch (request.type) { + case AllOpenActionType.SIMPLE_COLLECT: + case AllOpenActionType.SHARED_REVENUE_COLLECT: + if (!request.fee) { + return this.createPublicFreeActCallDetails(result); + } + break; + + case AllOpenActionType.UNKNOWN_OPEN_ACTION: + if (!request.amount) { + return this.createPublicFreeActCallDetails(result); + } + break; } - return this.createPublicCollectCallDetails(result); + return this.createPublicPaidActCallDetails(request, result); } private createPublicFreeActCallDetails( @@ -328,11 +375,36 @@ export class OpenActionGateway }; } - private createPublicCollectCallDetails( + private resolvePublicPaidActAmount(request: NewOpenActionRequest): Erc20Amount { + switch (request.type) { + case AllOpenActionType.MULTIRECIPIENT_COLLECT: + return request.fee.amount; + + case AllOpenActionType.UNKNOWN_OPEN_ACTION: + return request.amount ?? never(); + + case AllOpenActionType.SIMPLE_COLLECT: + return request.fee?.amount ?? never(); + + case AllOpenActionType.SHARED_REVENUE_COLLECT: + return ( + request.fee?.amount ?? + request.mintFee?.amount ?? + never('Invalid UnknownActionRequest, missing fee and mintFee') + ); + + default: + never(); + } + } + + private createPublicPaidActCallDetails( + request: NewOpenActionRequest, result: gql.CreateActOnOpenActionBroadcastItemResult, ): ContractCallDetails { + const amount = this.resolvePublicPaidActAmount(request); const contract = publicActProxy(result.typedData.domain.verifyingContract); - const encodedData = contract.interface.encodeFunctionData('publicCollect', [ + const encodedData = contract.interface.encodeFunctionData('publicPaidAct', [ { publicationActedProfileId: result.typedData.message.publicationActedProfileId, publicationActedId: result.typedData.message.publicationActedId, @@ -342,6 +414,9 @@ export class OpenActionGateway actionModuleAddress: result.typedData.message.actionModuleAddress, actionModuleData: result.typedData.message.actionModuleData, }, + amount.asset.address, + amount.toBigDecimal().toHexadecimal(), + isUnknownActionRequest(request) ? contract.address : request.collectModule, ]); return { contractAddress: result.typedData.domain.verifyingContract, diff --git a/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts b/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts index 08399207ec..858b97d101 100644 --- a/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts +++ b/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts @@ -18,11 +18,13 @@ import { } from '@lens-protocol/api-bindings/mocks'; import { NativeTransaction, UnsignedTransaction } from '@lens-protocol/domain/entities'; import { + mockCollectFee, mockLegacyCollectRequest, mockMultirecipientCollectRequest, mockNonce, mockProfileId, mockPublicationId, + mockSharedRevenueCollectRequest, mockSimpleCollectRequest, mockUnknownActionRequest, mockWallet, @@ -134,6 +136,32 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { return { data, response }; }, }, + { + name: 'SharedRevenueCollectRequest', + request: mockSharedRevenueCollectRequest({ publicationId, referrers }), + setupMocks: (nonce?: number) => { + const data = mockCreateActOnOpenActionTypedDataData({ nonce }); + const response = mockCreateActOnOpenActionTypedDataResponse({ + variables: { + request: { + for: publicationId, + actOn: { + protocolSharedRevenueCollectOpenAction: true, + }, + referrers: expectedOnChainReferrers, + }, + options: nonce + ? { + overrideSigNonce: nonce, + } + : undefined, + }, + data, + }); + + return { data, response }; + }, + }, { name: 'MultirecipientCollectRequest', request: mockMultirecipientCollectRequest({ publicationId, referrers }), @@ -249,6 +277,22 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { data: mockCreateActOnOpenActionTypedDataData(), }), }, + { + name: 'SharedRevenueCollectRequest', + request: mockSharedRevenueCollectRequest({ publicationId, referrers }), + response: mockCreateActOnOpenActionTypedDataResponse({ + variables: { + request: { + for: publicationId, + actOn: { + protocolSharedRevenueCollectOpenAction: true, + }, + referrers: expectedOnChainReferrers, + }, + }, + data: mockCreateActOnOpenActionTypedDataData(), + }), + }, { name: 'MultirecipientCollectRequest', request: mockMultirecipientCollectRequest({ publicationId, referrers }), @@ -444,6 +488,24 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { }, referrers: expectedOnChainReferrers, }, + expectedMethodHash: '0xc0cc2190', // publicFreeAct + }, + { + name: 'SharedRevenueCollectRequest', + request: mockSharedRevenueCollectRequest({ + publicationId, + referrers, + public: true, + fee: mockCollectFee(), + }), + expectedRequest: { + for: publicationId, + actOn: { + protocolSharedRevenueCollectOpenAction: true, + }, + referrers: expectedOnChainReferrers, + }, + expectedMethodHash: '0x9648337c', // publicPaidAct }, { name: 'MultirecipientCollectRequest', @@ -455,6 +517,7 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { }, referrers: expectedOnChainReferrers, }, + expectedMethodHash: '0x9648337c', // publicPaidAct }, { name: 'UnknownActionRequest', @@ -473,10 +536,11 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { }, }, }, + expectedMethodHash: '0xc0cc2190', // publicFreeAct }, ])( `when creating ${UnsignedTransaction.name}<$name> for a Public Act Proxy call`, - ({ request, expectedRequest }) => { + ({ request, expectedRequest, expectedMethodHash }) => { const wallet = mockWallet(); const data = mockCreateActOnOpenActionTypedDataData(); @@ -496,6 +560,9 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { const unsignedTransaction = await gateway.createUnsignedTransaction(request, wallet); expect(unsignedTransaction).toBeInstanceOf(UnsignedContractCallTransaction); + expect(unsignedTransaction.transactionRequest.data).toEqual( + expect.stringContaining(expectedMethodHash), + ); }); }, ); diff --git a/packages/react/src/transactions/adapters/publications/__tests__/resolveOpenActionModuleInput.spec.ts b/packages/react/src/transactions/adapters/publications/__tests__/resolveOpenActionModuleInput.spec.ts index 47fd340179..06e6496042 100644 --- a/packages/react/src/transactions/adapters/publications/__tests__/resolveOpenActionModuleInput.spec.ts +++ b/packages/react/src/transactions/adapters/publications/__tests__/resolveOpenActionModuleInput.spec.ts @@ -41,6 +41,25 @@ describe(`Given the ${resolveOpenActionModuleInput.name} function`, () => { }, }, }, + { + config: { + type: OpenActionType.SHARED_REVENUE_COLLECT, + collectLimit: 10, + followerOnly: true, + endsAt, + creatorClient: address1, + }, + expected: { + collectOpenAction: { + protocolSharedRevenueCollectOpenAction: { + collectLimit: '10', + endsAt: endsAt.toISOString(), + followerOnly: true, + creatorClient: address1, + }, + }, + }, + }, { config: { type: OpenActionType.MULTIRECIPIENT_COLLECT, diff --git a/packages/react/src/transactions/adapters/publications/resolveOpenActionModuleInput.ts b/packages/react/src/transactions/adapters/publications/resolveOpenActionModuleInput.ts index 81f845b644..8db11f5a4f 100644 --- a/packages/react/src/transactions/adapters/publications/resolveOpenActionModuleInput.ts +++ b/packages/react/src/transactions/adapters/publications/resolveOpenActionModuleInput.ts @@ -27,6 +27,44 @@ export function resolveOpenActionModuleInput(config: OpenActionConfig): OpenActi }, }; + case OpenActionType.SHARED_REVENUE_COLLECT: + if ('amount' in config) { + return { + collectOpenAction: { + protocolSharedRevenueCollectOpenAction: { + amount: { + currency: config.amount.asset.address, + value: config.amount.toSignificantDigits(), + }, + + referralFee: config.referralFee, + + recipient: config.recipient ?? null, + + collectLimit: config.collectLimit?.toString() ?? null, + + endsAt: config.endsAt?.toISOString() ?? null, + + followerOnly: config.followerOnly, + }, + }, + }; + } + + return { + collectOpenAction: { + protocolSharedRevenueCollectOpenAction: { + collectLimit: config.collectLimit?.toString() ?? null, + + endsAt: config.endsAt?.toISOString() ?? null, + + followerOnly: config.followerOnly, + + creatorClient: config.creatorClient, + }, + }, + }; + case OpenActionType.MULTIRECIPIENT_COLLECT: return { collectOpenAction: { diff --git a/packages/react/src/transactions/adapters/schemas/publications.ts b/packages/react/src/transactions/adapters/schemas/publications.ts index f102d813f0..f78e265063 100644 --- a/packages/react/src/transactions/adapters/schemas/publications.ts +++ b/packages/react/src/transactions/adapters/schemas/publications.ts @@ -31,6 +31,17 @@ const RecipientWithSplitSchema: z.ZodType { @@ -189,16 +201,30 @@ export const SimpleCollectRequestSchema = BaseCollectRequestSchema.extend({ publicationId: PublicationIdSchema, referrers: ReferrersSchema.optional(), fee: CollectFeeSchema.optional(), + collectModule: EvmAddressSchema, public: z.boolean(), signless: z.boolean(), sponsored: z.boolean(), }); +export const SharedRevenueCollectRequestSchema = BaseCollectRequestSchema.extend({ + type: z.literal(AllOpenActionType.SHARED_REVENUE_COLLECT), + publicationId: PublicationIdSchema, + referrers: ReferrersSchema.optional(), + fee: CollectFeeSchema.optional(), + collectModule: EvmAddressSchema, + public: z.boolean(), + signless: z.boolean(), + sponsored: z.boolean(), + executorClient: EvmAddressSchema.optional(), +}); + export const MultirecipientCollectRequestSchema = BaseCollectRequestSchema.extend({ type: z.literal(AllOpenActionType.MULTIRECIPIENT_COLLECT), publicationId: PublicationIdSchema, referrers: ReferrersSchema.optional(), fee: CollectFeeSchema, + collectModule: EvmAddressSchema, public: z.boolean(), signless: z.boolean(), sponsored: z.boolean(), @@ -210,6 +236,7 @@ export const UnknownActionRequestSchema = BaseCollectRequestSchema.extend({ address: EvmAddressSchema, data: DataSchema, referrers: ReferrersSchema.optional(), + amount: Erc20AmountSchema.optional(), public: z.boolean(), signless: z.boolean(), sponsored: z.boolean(), @@ -220,5 +247,6 @@ export const OpenActionRequestSchema: z.ZodType { + describe(`when invoking the ${resolveTokenAllowanceRequestForFollow.name} function`, () => { + const profile = mockProfileFragment({ + followModule: mockFeeFollowModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + }); + + describe('configured with FeeFollowModuleSettings', () => { + it('should return the expected TokenAllowanceRequest', () => { + const request = resolveTokenAllowanceRequestForFollow(profile, TokenAllowanceLimit.EXACT); + + assertExpectedTokenAllowanceRequest(request); + }); + }); + }); + + describe.each<{ + name: string; + mockPublicationWith: (settings: CollectModuleSettings) => AnyPublication; + }>([ + { + name: 'Post', + mockPublicationWith: (settings) => + mockPostFragment({ + openActionModules: [settings], + }), + }, + { + name: 'Comment', + mockPublicationWith: (settings) => + mockCommentFragment({ + openActionModules: [settings], + }), + }, + { + name: 'Quote', + mockPublicationWith: (settings) => + mockQuoteFragment({ + openActionModules: [settings], + }), + }, + { + name: 'Mirror for a Post', + mockPublicationWith: (settings) => + mockMirrorFragment({ + mirrorOn: mockPostFragment({ + openActionModules: [settings], + }), + }), + }, + ])( + `when invoking the ${resolveTokenAllowanceRequestForCollect.name} function on a $name`, + ({ mockPublicationWith }) => { + describe.each([ + mockSimpleCollectOpenActionSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockMultirecipientFeeCollectOpenActionSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockLegacyFeeCollectModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockLegacyLimitedFeeCollectModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockLegacyLimitedTimedFeeCollectModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockLegacyTimedFeeCollectModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockLegacyMultirecipientFeeCollectModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockLegacySimpleCollectModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockLegacyErc4626FeeCollectModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockLegacyAaveFeeCollectModuleSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + + mockProtocolSharedRevenueCollectOpenActionSettingsFragment({ + amount: mockAmountFragmentFrom(amount), + contract: mockNetworkAddressFragment({ address: spender }), + }), + ])('configured with $__typename', (settings) => { + it('should return the expected TokenAllowanceRequest', () => { + const publication = mockPublicationWith(settings); + const request = resolveTokenAllowanceRequestForCollect({ + publication, + limit: TokenAllowanceLimit.EXACT, + sessionType: SessionType.WithProfile, + publicActProxy: mockEvmAddress(), + }); + + assertExpectedTokenAllowanceRequest(request); + }); + }); + }, + ); +}); diff --git a/packages/react/src/transactions/useApproveModule/index.ts b/packages/react/src/transactions/useApproveModule/index.ts new file mode 100644 index 0000000000..4eb042ef83 --- /dev/null +++ b/packages/react/src/transactions/useApproveModule/index.ts @@ -0,0 +1 @@ +export * from './useApproveModule'; diff --git a/packages/react/src/transactions/useApproveModule/token-allowance.ts b/packages/react/src/transactions/useApproveModule/token-allowance.ts new file mode 100644 index 0000000000..6f5fd5ec44 --- /dev/null +++ b/packages/react/src/transactions/useApproveModule/token-allowance.ts @@ -0,0 +1,144 @@ +import { + AnyPublication, + Profile, + ProtocolSharedRevenueCollectOpenActionSettings, + erc20Amount, + findCollectModuleSettings, + isMirrorPublication, +} from '@lens-protocol/api-bindings'; +import { TransactionKind } from '@lens-protocol/domain/entities'; +import { + TokenAllowanceLimit, + TokenAllowanceRequest, +} from '@lens-protocol/domain/use-cases/transactions'; +import { + Amount, + ChainType, + Erc20Amount, + EvmAddress, + erc20, + invariant, + never, +} from '@lens-protocol/shared-kernel'; + +import { SessionType } from '../../authentication'; + +function createTokenAllowanceRequest( + args: Omit, +): TokenAllowanceRequest { + return { + ...args, + kind: TransactionKind.APPROVE_MODULE, + }; +} + +function buildMintFeeAmount(_module: ProtocolSharedRevenueCollectOpenActionSettings): Erc20Amount { + // TODO replace with data from `_module` once available + const bonsai = erc20({ + address: '0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c', + chainType: ChainType.POLYGON, + decimals: 18, + name: 'BONSAI', + symbol: 'BONSAI', + }); + return Amount.erc20(bonsai, 10); +} + +export type ResolveTokenAllowanceRequestForCollectArgs = { + publicActProxy: EvmAddress; + limit: TokenAllowanceLimit; + publication: AnyPublication; + sessionType: SessionType.JustWallet | SessionType.WithProfile; +}; + +export function resolveTokenAllowanceRequestForCollect({ + limit, + publicActProxy, + publication, + sessionType, +}: ResolveTokenAllowanceRequestForCollectArgs): TokenAllowanceRequest { + if (isMirrorPublication(publication)) { + return resolveTokenAllowanceRequestForCollect({ + publication: publication.mirrorOn, + limit, + publicActProxy, + sessionType, + }); + } + + const module = findCollectModuleSettings(publication); + + invariant(module, `Publication ${publication.id} has no collect module`); + + switch (module.__typename) { + case 'LegacyAaveFeeCollectModuleSettings': + case 'LegacyERC4626FeeCollectModuleSettings': + case 'LegacyFeeCollectModuleSettings': + case 'LegacyLimitedFeeCollectModuleSettings': + case 'LegacyLimitedTimedFeeCollectModuleSettings': + case 'LegacyMultirecipientFeeCollectModuleSettings': + case 'LegacySimpleCollectModuleSettings': + case 'LegacyTimedFeeCollectModuleSettings': + return createTokenAllowanceRequest({ + amount: erc20Amount(module.amount), + limit, + spender: module.contract.address, + }); + + case 'MultirecipientFeeCollectOpenActionSettings': + case 'SimpleCollectOpenActionSettings': + case 'ProtocolSharedRevenueCollectOpenActionSettings': { + const spender = + sessionType === SessionType.JustWallet ? publicActProxy : module.contract.address; + + switch (module.__typename) { + case 'MultirecipientFeeCollectOpenActionSettings': + case 'SimpleCollectOpenActionSettings': + return createTokenAllowanceRequest({ + amount: erc20Amount(module.amount), + limit, + spender, + }); + + case 'ProtocolSharedRevenueCollectOpenActionSettings': { + const collectAmount = erc20Amount(module.amount); + + if (collectAmount.isZero()) { + return createTokenAllowanceRequest({ + amount: buildMintFeeAmount(module), + limit, + spender, + }); + } + + return createTokenAllowanceRequest({ + amount: collectAmount, + limit, + spender, + }); + } + } + } + } + + never(`Unsupported collect module type ${module.__typename}`); +} + +export function resolveTokenAllowanceRequestForFollow( + profile: Profile, + limit: TokenAllowanceLimit, +): TokenAllowanceRequest { + invariant(profile.followModule, `Profile ${profile.id} has no follow module`); + + switch (profile.followModule.__typename) { + case 'FeeFollowModuleSettings': + return createTokenAllowanceRequest({ + amount: erc20Amount(profile.followModule.amount), + limit, + spender: profile.followModule.contract.address, + }); + + default: + never(`Unsupported follow module type ${profile.followModule.__typename}`); + } +} diff --git a/packages/react/src/transactions/useApproveModule.ts b/packages/react/src/transactions/useApproveModule/useApproveModule.ts similarity index 82% rename from packages/react/src/transactions/useApproveModule.ts rename to packages/react/src/transactions/useApproveModule/useApproveModule.ts index e27b5135a1..cec297f4c6 100644 --- a/packages/react/src/transactions/useApproveModule.ts +++ b/packages/react/src/transactions/useApproveModule/useApproveModule.ts @@ -1,4 +1,4 @@ -import { AnyPublication, Profile, resolveTokenAllowanceRequest } from '@lens-protocol/api-bindings'; +import { AnyPublication, Profile } from '@lens-protocol/api-bindings'; import { InsufficientGasError, PendingSigningRequestError, @@ -7,9 +7,16 @@ import { WalletConnectionError, } from '@lens-protocol/domain/entities'; import { TokenAllowanceLimit } from '@lens-protocol/domain/use-cases/transactions'; +import { invariant } from '@lens-protocol/shared-kernel'; -import { useDeferredTask, UseDeferredTask } from '../helpers/tasks'; -import { useTokenAllowanceController } from './adapters/useTokenAllowanceController'; +import { useSession } from '../../authentication'; +import { useDeferredTask, UseDeferredTask } from '../../helpers/tasks'; +import { useSharedDependencies } from '../../shared'; +import { useTokenAllowanceController } from '../adapters/useTokenAllowanceController'; +import { + resolveTokenAllowanceRequestForCollect, + resolveTokenAllowanceRequestForFollow, +} from './token-allowance'; export { TokenAllowanceLimit }; @@ -215,9 +222,10 @@ export type ApproveModuleArgs = { * * @category Modules * @group Hooks + * @param args - {@link UseApproveModuleArgs} */ export function useApproveModule( - args: UseApproveModuleArgs = { limit: TokenAllowanceLimit.EXACT }, + { limit }: UseApproveModuleArgs = { limit: TokenAllowanceLimit.EXACT }, ): UseDeferredTask< void, | InsufficientGasError @@ -227,10 +235,30 @@ export function useApproveModule( | WalletConnectionError, ApproveModuleArgs > { + const { config } = useSharedDependencies(); + const { data: session } = useSession(); const increaseAllowance = useTokenAllowanceController(); + const resolveTokenAllowanceRequest = (on: AnyPublication | Profile) => { + if (on.__typename === 'Profile') { + return resolveTokenAllowanceRequestForFollow(on, limit); + } + + invariant( + session?.authenticated, + 'User must be authenticated to allow to approve the correct contract', + ); + + return resolveTokenAllowanceRequestForCollect({ + publication: on, + limit, + sessionType: session.type, + publicActProxy: config.environment.contracts.publicActProxy, + }); + }; + return useDeferredTask(async ({ on }) => { - const request = resolveTokenAllowanceRequest(on, args.limit); + const request = resolveTokenAllowanceRequest(on); return increaseAllowance(request); }); diff --git a/packages/react/src/transactions/useOpenAction/__tests__/createOpenActionRequest.spec.ts b/packages/react/src/transactions/useOpenAction/__tests__/createOpenActionRequest.spec.ts index 4d99e0ed1b..fa9bd9447c 100644 --- a/packages/react/src/transactions/useOpenAction/__tests__/createOpenActionRequest.spec.ts +++ b/packages/react/src/transactions/useOpenAction/__tests__/createOpenActionRequest.spec.ts @@ -8,6 +8,7 @@ import { mockNetworkAddressFragment, mockPostFragment, mockProfileFragment, + mockProtocolSharedRevenueCollectOpenActionSettingsFragment, mockSimpleCollectOpenActionSettingsFragment, mockUnknownOpenActionModuleSettingsFragment, } from '@lens-protocol/api-bindings/mocks'; @@ -160,6 +161,22 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { }, expectedRequest: 'SimpleCollectRequest', }, + { + settings: mockProtocolSharedRevenueCollectOpenActionSettingsFragment({ + amount: mockAmountFragmentFrom(fee), + contract: mockNetworkAddressFragment({ + address: aContractAddress, + }), + }), + expected: { + type: AllOpenActionType.SHARED_REVENUE_COLLECT, + fee: { + amount: fee, + contractAddress: aContractAddress, + }, + }, + expectedRequest: 'SharedRevenueCollectRequest', + }, { settings: mockMultirecipientFeeCollectOpenActionSettingsFragment({ amount: mockAmountFragmentFrom(fee), diff --git a/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts b/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts index 2e49c9f164..cc941dd38f 100644 --- a/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts +++ b/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-case-declarations */ import { AnyPublication, OpenActionModuleSettings, @@ -87,7 +86,7 @@ function resolveCollectRequestFor( sponsored, }; - case 'SimpleCollectOpenActionSettings': + case 'SimpleCollectOpenActionSettings': { const amount = erc20Amount(settings.amount); return { @@ -103,10 +102,12 @@ function resolveCollectRequestFor( amount, contractAddress: settings.contract.address, }, + collectModule: settings.contract.address, public: session.type === SessionType.JustWallet, signless, sponsored, }; + } case 'MultirecipientFeeCollectOpenActionSettings': return { @@ -120,11 +121,36 @@ function resolveCollectRequestFor( amount: erc20Amount(settings.amount), contractAddress: settings.contract.address, }, + collectModule: settings.contract.address, public: session.type === SessionType.JustWallet, signless, sponsored, }; + case 'ProtocolSharedRevenueCollectOpenActionSettings': { + const amount = erc20Amount(settings.amount); + + return { + kind: TransactionKind.ACT_ON_PUBLICATION, + type: AllOpenActionType.SHARED_REVENUE_COLLECT, + publicationId: collectable.id, + referrers: + params.referrers ?? + (args.publication !== collectable ? [args.publication.id] : undefined), + fee: amount.isZero() + ? undefined + : { + amount, + contractAddress: settings.contract.address, + }, + collectModule: settings.contract.address, + executorClient: params.executorClient, + public: session.type === SessionType.JustWallet, + signless, + sponsored, + }; + } + default: never(`The publication ${collectable.id} is not collectable`); } @@ -136,7 +162,7 @@ function isUnknownOpenActionModuleSettings( return settings.__typename === 'UnknownOpenActionModuleSettings'; } -function resolveExecutionDynamics( +function resolveExecutionMode( args: RequiredOpenActionArgs, session: ProfileSession | WalletOnlySession, settings: UnknownOpenActionModuleSettings, @@ -188,8 +214,9 @@ function resolveUnknownRequestFor( address: settings.contract.address, data: params.data as Data, referrers: params.referrers, + amount: params.amount, - ...resolveExecutionDynamics(args, session, settings), + ...resolveExecutionMode(args, session, settings), }; } diff --git a/packages/react/src/transactions/useOpenAction/types.ts b/packages/react/src/transactions/useOpenAction/types.ts index 626efa97ed..191793d2c5 100644 --- a/packages/react/src/transactions/useOpenAction/types.ts +++ b/packages/react/src/transactions/useOpenAction/types.ts @@ -1,6 +1,6 @@ import { AnyPublication } from '@lens-protocol/api-bindings'; import { ProfileId, PublicationId } from '@lens-protocol/domain/entities'; -import { EvmAddress } from '@lens-protocol/shared-kernel'; +import { Erc20Amount, EvmAddress } from '@lens-protocol/shared-kernel'; /** * The category of Open Actions to perform on a given publication. @@ -33,6 +33,12 @@ export type UnknownActionParams = { * The usage of referrers is determined by the specific Open Action module. */ referrers?: ReadonlyArray; + /** + * The amount to be used by the Unknown Open Action. + * + * Use {@link Amount.erc20} with instances {@link Erc20} to create an instance of this type. + */ + amount?: Erc20Amount; }; /** @@ -52,6 +58,19 @@ export type CollectParams = { * @defaultValue if the publication is a Mirror the Mirror ID, empty otherwise. */ referrers?: ReadonlyArray; + + /** + * The executor app address. + * + * This field is evaluated only when the Publication's collect settings utilize + * the `ProtocolSharedRevenueMinFeeMintModule`, and no collect fee has been set. + * + * In the case above, the executor app will receive their share of the mint fee as per + * Lens Protocol shared revenue settings. + * + * If not set, the share for the executor app will be given to the creator of the publication. + */ + executorClient?: EvmAddress; }; /** diff --git a/packages/react/src/transactions/useOpenAction/useOpenAction.ts b/packages/react/src/transactions/useOpenAction/useOpenAction.ts index 6e086157d2..10eea4ac31 100644 --- a/packages/react/src/transactions/useOpenAction/useOpenAction.ts +++ b/packages/react/src/transactions/useOpenAction/useOpenAction.ts @@ -40,7 +40,7 @@ export type OpenActionAsyncResult = AsyncTransactionResult; * }); * ``` * - * ## Collect a publication + * ## Collect a Publication * * You can use the `useOpenAction` hook to collect a publication. * @@ -58,7 +58,76 @@ export type OpenActionAsyncResult = AsyncTransactionResult; * * It supports seamlessly new collect Open Action modules as well as legacy collect modules. * - * ## Failure scenarios + * ## Collect Referrers + * + * When collecting a publication using the new SimpleCollectOpenAction or MultirecipientFeeCollectOpenAction + * you can specify a list of referrer Publication and/or Profile IDs. + * + * ```ts + * const { execute, error, loading } = useOpenAction({ + * action: { + * kind: OpenActionKind.COLLECT, + * referrers: [ + * publicationId, + * profileId, + * ], + * }, + * }); + * ``` + * + * The referrers will split the referral reward of any collect fee paid by the collector. + * + * ## Public Collect + * + * You can use the `useOpenAction` hook to collect a publication with just a wallet. + * First make sure you logged-in via {@link useLogin} with just an EVM address. + * + * Then you can use the `useOpenAction` to collect a publication as mentioned above. + * + * ## Execute Any Open Action + * + * You can use the `useOpenAction` hook to execute any Open Action. + * + * You must know the address of the Open Action module and the data required to execute it. + * + * ```ts + * const { execute, error, loading } = useOpenAction({ + * action: { + * kind: OpenActionKind.UNKNOWN, + * address: '0x...', // the address of the Open Action module + * data: '0x...', // any data needed to execute the Open Action + * } + * }); + * + * const collect = async (publication: AnyPublication) => { + * const result = await execute({ publication }); + * + * // ... + * } + * ``` + * + * In case the Open Action imply the payment of a fee, you need to specify the amount to pay. + * + * ```ts + * const bonsai = erc20({ + * address: '0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c', + * chainType: ChainType.POLYGON, + * decimals: 18, + * name: 'BONSAI', + * symbol: 'BONSAI', + * }); + * + * const { execute, error, loading } = useOpenAction({ + * action: { + * kind: OpenActionKind.UNKNOWN, + * address: '0x...', // the address of the Open Action module + * data: '0x...', // any data needed to execute the Open Action + * amount: Amount.erc20(bonsai, '10'), // the amount to pay + * } + * }); + * ``` + * + * ## Failure Scenarios * * You can handle possible failure scenarios by checking the `result` value. * @@ -108,7 +177,7 @@ export type OpenActionAsyncResult = AsyncTransactionResult; * }; * ``` * - * ## Wait for completion + * ## Wait for Completion * * You can always wait the operation to be fully processed and indexed by Lens API. * @@ -133,55 +202,7 @@ export type OpenActionAsyncResult = AsyncTransactionResult; * }; * ``` * - * ## Collect referrers - * - * When collecting a publication using the new SimpleCollectOpenAction or MultirecipientFeeCollectOpenAction - * you can specify a list of referrer Publication and/or Profile IDs. - * - * ```ts - * const { execute, error, loading } = useOpenAction({ - * action: { - * kind: OpenActionKind.COLLECT, - * referrers: [ - * publicationId, - * profileId, - * ], - * }, - * }); - * ``` - * - * The referrers will split the referral reward of any collect fee paid by the collector. - * - * ## Public collect - * - * You can use the `useOpenAction` hook to collect a publication with just a wallet. - * First make sure you logged-in via {@link useLogin} with just an EVM address. - * - * Then you can use the `useOpenAction` to collect a publication as mentioned above. - * - * ## Custom open action - * - * You can use the `useOpenAction` hook to execute a custom Open Action. - * - * You must know the address of the Open Action module and the data required to execute it. - * - * ```ts - * const { execute, error, loading } = useOpenAction({ - * action: { - * kind: OpenActionKind.UNKNOWN, - * address: '0x...', // the address of the Open Action module - * data: '0x...', // any data needed to execute the Open Action - * } - * }); - * - * const collect = async (publication: AnyPublication) => { - * const result = await execute({ publication }); - * - * // ... - * } - * ``` - * - * ## Self-funded approach + * ## Self-funded Approach * * It just takes a single parameter to disable the sponsorship of the transaction gas costs. * @@ -210,7 +231,7 @@ export type OpenActionAsyncResult = AsyncTransactionResult; * error happens only with self-funded transactions and it means that the wallet does not * have enough funds to pay for the transaction gas costs. * - * ## Self-funded fallback + * ## Self-funded Fallback * * If for some reason the Lens API cannot sponsor the transaction, the hook will fail with a {@link BroadcastingError} with one of the following reasons: * - {@link BroadcastingErrorReason.NOT_SPONSORED} - the profile is not sponsored diff --git a/packages/shared-kernel/src/crypto/Asset.ts b/packages/shared-kernel/src/crypto/Asset.ts index 2c679f77b8..0d3d4e1a35 100644 --- a/packages/shared-kernel/src/crypto/Asset.ts +++ b/packages/shared-kernel/src/crypto/Asset.ts @@ -237,6 +237,22 @@ export function erc20({ name, decimals, symbol, address, chainType }: Erc20Info) return immutable(asset.hash, asset); } +/** + * Bonsai asset factory function. + * + * @param info - {@link Erc20Info} details + * @returns An Erc20 asset instance. + */ +export function bonsai(address: EvmAddress) { + return erc20({ + address, + chainType: ChainType.POLYGON, + decimals: 18, + name: 'BONSAI', + symbol: 'BONSAI', + }); +} + /** * Matic asset provider function. * From 15831211fb9d7fd85a6cbc34c78eedae3298fe4c Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Wed, 15 May 2024 20:42:29 +0200 Subject: [PATCH 03/12] Adopt mintFee and updates node scripts --- examples/node/abi/PublicActProxy.json | 452 +++++++++++++++--- examples/node/contracts/PublicActProxy.ts | 140 +++++- .../factories/PublicActProxy__factory.ts | 296 +++++++++--- .../recipes/openActionWalletOnly.ts | 34 +- .../src/lens/graphql/fragments.graphql | 3 + .../src/lens/graphql/generated.ts | 276 ++++++++++- .../src/lens/utils/CollectModuleSettings.ts | 19 +- .../client/src/graphql/fragments.generated.ts | 154 ++++++ packages/client/src/graphql/fragments.graphql | 9 + .../client/src/graphql/types.generated.ts | 3 +- .../explore/graphql/explore.generated.ts | 21 + .../submodules/feed/graphql/feed.generated.ts | 105 ++++ .../graphql/notifications.generated.ts | 147 ++++++ .../graphql/publication.generated.ts | 42 ++ .../bookmarks/graphql/bookmarks.generated.ts | 21 + .../revenue/graphql/revenue.generated.ts | 63 +++ .../search/graphql/search.generated.ts | 21 + .../useApproveModule/token-allowance.ts | 22 +- .../useOpenAction/createOpenActionRequest.ts | 2 +- packages/shared-kernel/src/crypto/Asset.ts | 16 - 20 files changed, 1646 insertions(+), 200 deletions(-) diff --git a/examples/node/abi/PublicActProxy.json b/examples/node/abi/PublicActProxy.json index 4b44d7900b..c388925d37 100644 --- a/examples/node/abi/PublicActProxy.json +++ b/examples/node/abi/PublicActProxy.json @@ -1,109 +1,433 @@ [ { + "type": "constructor", "inputs": [ - { "internalType": "address", "name": "lensHub", "type": "address" }, - { "internalType": "address", "name": "collectPublicationAction", "type": "address" } + { + "name": "lensHub", + "type": "address", + "internalType": "address" + }, + { + "name": "collectPublicationAction", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "COLLECT_PUBLICATION_ACTION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract CollectPublicationAction" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "HUB", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ILensHub" + } ], - "stateMutability": "nonpayable", - "type": "constructor" + "stateMutability": "view" }, { - "inputs": [{ "internalType": "uint8", "name": "increment", "type": "uint8" }], + "type": "function", "name": "incrementNonce", + "inputs": [ + { + "name": "increment", + "type": "uint8", + "internalType": "uint8" + } + ], "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { - "inputs": [], + "type": "function", "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "stateMutability": "pure", - "type": "function" + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "pure" }, { - "inputs": [{ "internalType": "address", "name": "signer", "type": "address" }], + "type": "function", "name": "nonces", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "stateMutability": "view", - "type": "function" + "inputs": [ + { + "name": "signer", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" }, { + "type": "function", + "name": "publicCollect", "inputs": [ { - "components": [ - { "internalType": "uint256", "name": "publicationActedProfileId", "type": "uint256" }, - { "internalType": "uint256", "name": "publicationActedId", "type": "uint256" }, - { "internalType": "uint256", "name": "actorProfileId", "type": "uint256" }, - { "internalType": "uint256[]", "name": "referrerProfileIds", "type": "uint256[]" }, - { "internalType": "uint256[]", "name": "referrerPubIds", "type": "uint256[]" }, - { "internalType": "address", "name": "actionModuleAddress", "type": "address" }, - { "internalType": "bytes", "name": "actionModuleData", "type": "bytes" } - ], - "internalType": "struct Types.PublicationActionParams", "name": "publicationActionParams", - "type": "tuple" + "type": "tuple", + "internalType": "struct Types.PublicationActionParams", + "components": [ + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] } ], - "name": "publicCollect", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "publicCollectWithSig", "inputs": [ { - "components": [ - { "internalType": "uint256", "name": "publicationActedProfileId", "type": "uint256" }, - { "internalType": "uint256", "name": "publicationActedId", "type": "uint256" }, - { "internalType": "uint256", "name": "actorProfileId", "type": "uint256" }, - { "internalType": "uint256[]", "name": "referrerProfileIds", "type": "uint256[]" }, - { "internalType": "uint256[]", "name": "referrerPubIds", "type": "uint256[]" }, - { "internalType": "address", "name": "actionModuleAddress", "type": "address" }, - { "internalType": "bytes", "name": "actionModuleData", "type": "bytes" } - ], - "internalType": "struct Types.PublicationActionParams", "name": "publicationActionParams", - "type": "tuple" + "type": "tuple", + "internalType": "struct Types.PublicationActionParams", + "components": [ + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] }, { - "components": [ - { "internalType": "address", "name": "signer", "type": "address" }, - { "internalType": "uint8", "name": "v", "type": "uint8" }, - { "internalType": "bytes32", "name": "r", "type": "bytes32" }, - { "internalType": "bytes32", "name": "s", "type": "bytes32" }, - { "internalType": "uint256", "name": "deadline", "type": "uint256" } - ], - "internalType": "struct Types.EIP712Signature", "name": "signature", - "type": "tuple" + "type": "tuple", + "internalType": "struct Types.EIP712Signature", + "components": [ + { + "name": "signer", + "type": "address", + "internalType": "address" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ] } ], - "name": "publicCollectWithSig", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" }, { + "type": "function", + "name": "publicFreeAct", "inputs": [ { + "name": "publicationActionParams", + "type": "tuple", + "internalType": "struct Types.PublicationActionParams", "components": [ - { "internalType": "uint256", "name": "publicationActedProfileId", "type": "uint256" }, - { "internalType": "uint256", "name": "publicationActedId", "type": "uint256" }, - { "internalType": "uint256", "name": "actorProfileId", "type": "uint256" }, - { "internalType": "uint256[]", "name": "referrerProfileIds", "type": "uint256[]" }, - { "internalType": "uint256[]", "name": "referrerPubIds", "type": "uint256[]" }, - { "internalType": "address", "name": "actionModuleAddress", "type": "address" }, - { "internalType": "bytes", "name": "actionModuleData", "type": "bytes" } - ], + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "publicPaidAct", + "inputs": [ + { + "name": "publicationActionParams", + "type": "tuple", "internalType": "struct Types.PublicationActionParams", + "components": [ + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "currency", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "approveTo", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "publicPaidActWithSig", + "inputs": [ + { "name": "publicationActionParams", - "type": "tuple" + "type": "tuple", + "internalType": "struct Types.PublicationActionParams", + "components": [ + { + "name": "publicationActedProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "publicationActedId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "actorProfileId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referrerProfileIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "referrerPubIds", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "actionModuleAddress", + "type": "address", + "internalType": "address" + }, + { + "name": "actionModuleData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "currency", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "approveTo", + "type": "address", + "internalType": "address" + }, + { + "name": "signature", + "type": "tuple", + "internalType": "struct Types.EIP712Signature", + "components": [ + { + "name": "signer", + "type": "address", + "internalType": "address" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ] } ], - "name": "publicFreeAct", "outputs": [], - "stateMutability": "nonpayable", - "type": "function" + "stateMutability": "nonpayable" } ] diff --git a/examples/node/contracts/PublicActProxy.ts b/examples/node/contracts/PublicActProxy.ts index 8c72e38dd3..9f2661ed13 100644 --- a/examples/node/contracts/PublicActProxy.ts +++ b/examples/node/contracts/PublicActProxy.ts @@ -71,24 +71,34 @@ export declare namespace Types { export interface PublicActProxyInterface extends utils.Interface { functions: { + 'COLLECT_PUBLICATION_ACTION()': FunctionFragment; + 'HUB()': FunctionFragment; 'incrementNonce(uint8)': FunctionFragment; 'name()': FunctionFragment; 'nonces(address)': FunctionFragment; 'publicCollect((uint256,uint256,uint256,uint256[],uint256[],address,bytes))': FunctionFragment; 'publicCollectWithSig((uint256,uint256,uint256,uint256[],uint256[],address,bytes),(address,uint8,bytes32,bytes32,uint256))': FunctionFragment; 'publicFreeAct((uint256,uint256,uint256,uint256[],uint256[],address,bytes))': FunctionFragment; + 'publicPaidAct((uint256,uint256,uint256,uint256[],uint256[],address,bytes),address,uint256,address)': FunctionFragment; + 'publicPaidActWithSig((uint256,uint256,uint256,uint256[],uint256[],address,bytes),address,uint256,address,(address,uint8,bytes32,bytes32,uint256))': FunctionFragment; }; getFunction( nameOrSignatureOrTopic: + | 'COLLECT_PUBLICATION_ACTION' + | 'HUB' | 'incrementNonce' | 'name' | 'nonces' | 'publicCollect' | 'publicCollectWithSig' - | 'publicFreeAct', + | 'publicFreeAct' + | 'publicPaidAct' + | 'publicPaidActWithSig', ): FunctionFragment; + encodeFunctionData(functionFragment: 'COLLECT_PUBLICATION_ACTION', values?: undefined): string; + encodeFunctionData(functionFragment: 'HUB', values?: undefined): string; encodeFunctionData( functionFragment: 'incrementNonce', values: [PromiseOrValue], @@ -107,13 +117,36 @@ export interface PublicActProxyInterface extends utils.Interface { functionFragment: 'publicFreeAct', values: [Types.PublicationActionParamsStruct], ): string; + encodeFunctionData( + functionFragment: 'publicPaidAct', + values: [ + Types.PublicationActionParamsStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + ], + ): string; + encodeFunctionData( + functionFragment: 'publicPaidActWithSig', + values: [ + Types.PublicationActionParamsStruct, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + Types.EIP712SignatureStruct, + ], + ): string; + decodeFunctionResult(functionFragment: 'COLLECT_PUBLICATION_ACTION', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'HUB', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'incrementNonce', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'nonces', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'publicCollect', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'publicCollectWithSig', data: BytesLike): Result; decodeFunctionResult(functionFragment: 'publicFreeAct', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'publicPaidAct', data: BytesLike): Result; + decodeFunctionResult(functionFragment: 'publicPaidActWithSig', data: BytesLike): Result; events: {}; } @@ -143,6 +176,10 @@ export interface PublicActProxy extends BaseContract { removeListener: OnEvent; functions: { + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise<[string]>; + + HUB(overrides?: CallOverrides): Promise<[string]>; + incrementNonce( increment: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -167,8 +204,29 @@ export interface PublicActProxy extends BaseContract { publicationActionParams: Types.PublicationActionParamsStruct, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; }; + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise; + + HUB(overrides?: CallOverrides): Promise; + incrementNonce( increment: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -194,7 +252,28 @@ export interface PublicActProxy extends BaseContract { overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + callStatic: { + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise; + + HUB(overrides?: CallOverrides): Promise; + incrementNonce( increment: PromiseOrValue, overrides?: CallOverrides, @@ -219,11 +298,32 @@ export interface PublicActProxy extends BaseContract { publicationActionParams: Types.PublicationActionParamsStruct, overrides?: CallOverrides, ): Promise; + + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: CallOverrides, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: CallOverrides, + ): Promise; }; filters: {}; estimateGas: { + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise; + + HUB(overrides?: CallOverrides): Promise; + incrementNonce( increment: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -248,9 +348,30 @@ export interface PublicActProxy extends BaseContract { publicationActionParams: Types.PublicationActionParamsStruct, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; }; populateTransaction: { + COLLECT_PUBLICATION_ACTION(overrides?: CallOverrides): Promise; + + HUB(overrides?: CallOverrides): Promise; + incrementNonce( increment: PromiseOrValue, overrides?: Overrides & { from?: PromiseOrValue }, @@ -278,5 +399,22 @@ export interface PublicActProxy extends BaseContract { publicationActionParams: Types.PublicationActionParamsStruct, overrides?: Overrides & { from?: PromiseOrValue }, ): Promise; + + publicPaidAct( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; + + publicPaidActWithSig( + publicationActionParams: Types.PublicationActionParamsStruct, + currency: PromiseOrValue, + amount: PromiseOrValue, + approveTo: PromiseOrValue, + signature: Types.EIP712SignatureStruct, + overrides?: Overrides & { from?: PromiseOrValue }, + ): Promise; }; } diff --git a/examples/node/contracts/factories/PublicActProxy__factory.ts b/examples/node/contracts/factories/PublicActProxy__factory.ts index cb2e52efe4..d8e1d0d2ec 100644 --- a/examples/node/contracts/factories/PublicActProxy__factory.ts +++ b/examples/node/contracts/factories/PublicActProxy__factory.ts @@ -8,247 +8,435 @@ import type { PublicActProxy, PublicActProxyInterface } from '../PublicActProxy' const _abi = [ { + type: 'constructor', inputs: [ { - internalType: 'address', name: 'lensHub', type: 'address', + internalType: 'address', }, { - internalType: 'address', name: 'collectPublicationAction', type: 'address', + internalType: 'address', }, ], stateMutability: 'nonpayable', - type: 'constructor', }, { + type: 'function', + name: 'COLLECT_PUBLICATION_ACTION', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract CollectPublicationAction', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'HUB', + inputs: [], + outputs: [ + { + name: '', + type: 'address', + internalType: 'contract ILensHub', + }, + ], + stateMutability: 'view', + }, + { + type: 'function', + name: 'incrementNonce', inputs: [ { - internalType: 'uint8', name: 'increment', type: 'uint8', + internalType: 'uint8', }, ], - name: 'incrementNonce', outputs: [], stateMutability: 'nonpayable', - type: 'function', }, { - inputs: [], + type: 'function', name: 'name', + inputs: [], outputs: [ { - internalType: 'string', name: '', type: 'string', + internalType: 'string', }, ], stateMutability: 'pure', - type: 'function', }, { + type: 'function', + name: 'nonces', inputs: [ { - internalType: 'address', name: 'signer', type: 'address', + internalType: 'address', }, ], - name: 'nonces', outputs: [ { - internalType: 'uint256', name: '', type: 'uint256', + internalType: 'uint256', }, ], stateMutability: 'view', - type: 'function', }, { + type: 'function', + name: 'publicCollect', inputs: [ { + name: 'publicationActionParams', + type: 'tuple', + internalType: 'struct Types.PublicationActionParams', components: [ { - internalType: 'uint256', name: 'publicationActedProfileId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256', name: 'publicationActedId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256', name: 'actorProfileId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256[]', name: 'referrerProfileIds', type: 'uint256[]', + internalType: 'uint256[]', }, { - internalType: 'uint256[]', name: 'referrerPubIds', type: 'uint256[]', + internalType: 'uint256[]', }, { - internalType: 'address', name: 'actionModuleAddress', type: 'address', + internalType: 'address', }, { - internalType: 'bytes', name: 'actionModuleData', type: 'bytes', + internalType: 'bytes', }, ], - internalType: 'struct Types.PublicationActionParams', - name: 'publicationActionParams', - type: 'tuple', }, ], - name: 'publicCollect', outputs: [], stateMutability: 'nonpayable', - type: 'function', }, { + type: 'function', + name: 'publicCollectWithSig', inputs: [ { + name: 'publicationActionParams', + type: 'tuple', + internalType: 'struct Types.PublicationActionParams', components: [ { - internalType: 'uint256', name: 'publicationActedProfileId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256', name: 'publicationActedId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256', name: 'actorProfileId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256[]', name: 'referrerProfileIds', type: 'uint256[]', + internalType: 'uint256[]', }, { - internalType: 'uint256[]', name: 'referrerPubIds', type: 'uint256[]', + internalType: 'uint256[]', }, { - internalType: 'address', name: 'actionModuleAddress', type: 'address', + internalType: 'address', }, { - internalType: 'bytes', name: 'actionModuleData', type: 'bytes', + internalType: 'bytes', }, ], - internalType: 'struct Types.PublicationActionParams', - name: 'publicationActionParams', - type: 'tuple', }, { + name: 'signature', + type: 'tuple', + internalType: 'struct Types.EIP712Signature', components: [ { - internalType: 'address', name: 'signer', type: 'address', + internalType: 'address', }, { - internalType: 'uint8', name: 'v', type: 'uint8', + internalType: 'uint8', }, { - internalType: 'bytes32', name: 'r', type: 'bytes32', + internalType: 'bytes32', }, { - internalType: 'bytes32', name: 's', type: 'bytes32', + internalType: 'bytes32', }, { - internalType: 'uint256', name: 'deadline', type: 'uint256', + internalType: 'uint256', }, ], - internalType: 'struct Types.EIP712Signature', - name: 'signature', - type: 'tuple', }, ], - name: 'publicCollectWithSig', outputs: [], stateMutability: 'nonpayable', - type: 'function', }, { + type: 'function', + name: 'publicFreeAct', inputs: [ { + name: 'publicationActionParams', + type: 'tuple', + internalType: 'struct Types.PublicationActionParams', components: [ { - internalType: 'uint256', name: 'publicationActedProfileId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256', name: 'publicationActedId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256', name: 'actorProfileId', type: 'uint256', + internalType: 'uint256', }, { - internalType: 'uint256[]', name: 'referrerProfileIds', type: 'uint256[]', + internalType: 'uint256[]', }, { - internalType: 'uint256[]', name: 'referrerPubIds', type: 'uint256[]', + internalType: 'uint256[]', }, { - internalType: 'address', name: 'actionModuleAddress', type: 'address', + internalType: 'address', }, { - internalType: 'bytes', name: 'actionModuleData', type: 'bytes', + internalType: 'bytes', }, ], - internalType: 'struct Types.PublicationActionParams', + }, + ], + outputs: [], + stateMutability: 'nonpayable', + }, + { + type: 'function', + name: 'publicPaidAct', + inputs: [ + { name: 'publicationActionParams', type: 'tuple', + internalType: 'struct Types.PublicationActionParams', + components: [ + { + name: 'publicationActedProfileId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'publicationActedId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'actorProfileId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'referrerProfileIds', + type: 'uint256[]', + internalType: 'uint256[]', + }, + { + name: 'referrerPubIds', + type: 'uint256[]', + internalType: 'uint256[]', + }, + { + name: 'actionModuleAddress', + type: 'address', + internalType: 'address', + }, + { + name: 'actionModuleData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + { + name: 'currency', + type: 'address', + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'approveTo', + type: 'address', + internalType: 'address', }, ], - name: 'publicFreeAct', outputs: [], stateMutability: 'nonpayable', + }, + { type: 'function', + name: 'publicPaidActWithSig', + inputs: [ + { + name: 'publicationActionParams', + type: 'tuple', + internalType: 'struct Types.PublicationActionParams', + components: [ + { + name: 'publicationActedProfileId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'publicationActedId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'actorProfileId', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'referrerProfileIds', + type: 'uint256[]', + internalType: 'uint256[]', + }, + { + name: 'referrerPubIds', + type: 'uint256[]', + internalType: 'uint256[]', + }, + { + name: 'actionModuleAddress', + type: 'address', + internalType: 'address', + }, + { + name: 'actionModuleData', + type: 'bytes', + internalType: 'bytes', + }, + ], + }, + { + name: 'currency', + type: 'address', + internalType: 'address', + }, + { + name: 'amount', + type: 'uint256', + internalType: 'uint256', + }, + { + name: 'approveTo', + type: 'address', + internalType: 'address', + }, + { + name: 'signature', + type: 'tuple', + internalType: 'struct Types.EIP712Signature', + components: [ + { + name: 'signer', + type: 'address', + internalType: 'address', + }, + { + name: 'v', + type: 'uint8', + internalType: 'uint8', + }, + { + name: 'r', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 's', + type: 'bytes32', + internalType: 'bytes32', + }, + { + name: 'deadline', + type: 'uint256', + internalType: 'uint256', + }, + ], + }, + ], + outputs: [], + stateMutability: 'nonpayable', }, ] as const; diff --git a/examples/node/scripts/publication/recipes/openActionWalletOnly.ts b/examples/node/scripts/publication/recipes/openActionWalletOnly.ts index 52234eb29c..235bc70861 100644 --- a/examples/node/scripts/publication/recipes/openActionWalletOnly.ts +++ b/examples/node/scripts/publication/recipes/openActionWalletOnly.ts @@ -10,7 +10,7 @@ dotenv.config(); const typedAbi = abi as ethers.ContractInterface; const publicActionProxyAddress = { - development: '0x88c8fa7C470d9d94aDfA40187157917B26A548d3', + development: '0x77706372deCeb81D49422F9115680B4873722AF1', production: '0x53582b1b7BE71622E7386D736b6baf87749B7a2B', }; @@ -52,36 +52,22 @@ async function main() { const { typedData } = resultTypedData.unwrap(); - // sign the typed data - const signedTypedData = await wallet._signTypedData( - typedData.domain, - typedData.types, - typedData.value, - ); - // init publicActProxy contract const publicActProxy = new ethers.Contract( publicActionProxyAddress.development, typedAbi, wallet, ) as PublicActProxy; - - // prepare data for the contract - const { v, r, s } = ethers.utils.splitSignature(signedTypedData); - // submit tx - const tx = await publicActProxy.publicCollectWithSig( - { - publicationActedProfileId: typedData.value.publicationActedProfileId, - publicationActedId: typedData.value.publicationActedId, - actorProfileId: typedData.value.actorProfileId, - referrerProfileIds: typedData.value.referrerProfileIds, - referrerPubIds: typedData.value.referrerPubIds, - actionModuleAddress: typedData.value.actionModuleAddress, - actionModuleData: typedData.value.actionModuleData, - }, - { signer: wallet.address, v, r, s, deadline: typedData.value.deadline }, - ); + const tx = await publicActProxy.publicFreeAct({ + publicationActedProfileId: typedData.value.publicationActedProfileId, + publicationActedId: typedData.value.publicationActedId, + actorProfileId: typedData.value.actorProfileId, + referrerProfileIds: typedData.value.referrerProfileIds, + referrerPubIds: typedData.value.referrerPubIds, + actionModuleAddress: typedData.value.actionModuleAddress, + actionModuleData: typedData.value.actionModuleData, + }); console.log(`Submitted a tx with a hash: `, tx.hash); diff --git a/packages/api-bindings/src/lens/graphql/fragments.graphql b/packages/api-bindings/src/lens/graphql/fragments.graphql index e22cfd1679..c23aa5ba76 100644 --- a/packages/api-bindings/src/lens/graphql/fragments.graphql +++ b/packages/api-bindings/src/lens/graphql/fragments.graphql @@ -479,6 +479,9 @@ fragment ProtocolSharedRevenueCollectOpenActionSettings on ProtocolSharedRevenue amount { ...Amount } + mintFee { + ...Amount + } recipient referralFee followerOnly diff --git a/packages/api-bindings/src/lens/graphql/generated.ts b/packages/api-bindings/src/lens/graphql/generated.ts index f9a0f7cf8a..6931f7871b 100644 --- a/packages/api-bindings/src/lens/graphql/generated.ts +++ b/packages/api-bindings/src/lens/graphql/generated.ts @@ -1459,7 +1459,6 @@ export type ProtocolSharedRevenueCollectModuleInput = { collectLimit?: InputMaybe; /** The wallet of a client app to share revenues alongside the recipient and the protocol. Optional. */ creatorClient?: InputMaybe; - currentCollects?: Scalars['Float']; endsAt?: InputMaybe; followerOnly: Scalars['Boolean']; recipient?: InputMaybe; @@ -1604,7 +1603,7 @@ export enum PublicationReportingIllegalSubreason { AnimalAbuse = 'ANIMAL_ABUSE', DirectThreat = 'DIRECT_THREAT', HumanAbuse = 'HUMAN_ABUSE', - Plagiarism = 'PLAGIARISM', + IntEllEctualProperty = 'INTEllECTUAL_PROPERTY', ThreatIndividual = 'THREAT_INDIVIDUAL', Violence = 'VIOLENCE', } @@ -2569,6 +2568,7 @@ export type ProtocolSharedRevenueCollectOpenActionSettings = { creatorClient: EvmAddress | null; contract: NetworkAddress; amount: Amount; + mintFee: Amount; }; export type Recipient = { recipient: EvmAddress; split: number }; @@ -31128,6 +31128,14 @@ export const FragmentProtocolSharedRevenueCollectOpenActionSettings = /*#__PURE_ selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -33889,6 +33897,14 @@ export const FragmentPost = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -39276,6 +39292,14 @@ export const FragmentQuoteFields = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -44718,6 +44742,14 @@ export const FragmentCommentFields = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -50852,6 +50884,14 @@ export const FragmentQuote = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -57629,6 +57669,14 @@ export const FragmentExplorePublication = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -64510,6 +64558,14 @@ export const FragmentComment = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -71337,6 +71393,14 @@ export const FragmentMirror = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -79288,6 +79352,14 @@ export const FragmentFeedItem = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -86271,6 +86343,14 @@ export const FragmentFeedHighlight = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -95142,6 +95222,14 @@ export const FragmentOpenActionPaidAction = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -102083,6 +102171,14 @@ export const FragmentAnyPublicationInternal = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -111453,6 +111549,14 @@ export const FragmentReactionNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -118396,6 +118500,14 @@ export const FragmentCommentNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -126252,6 +126364,14 @@ export const FragmentMirrorNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -133174,6 +133294,14 @@ export const FragmentQuoteNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -141234,6 +141362,14 @@ export const FragmentActedNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -149319,6 +149455,14 @@ export const FragmentMentionNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -156301,6 +156445,14 @@ export const FragmentNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -166999,6 +167151,14 @@ export const FragmentPublicationRevenue = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -175160,6 +175320,14 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -183429,6 +183597,14 @@ export const FeedDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -190608,6 +190784,14 @@ export const FeedHighlightsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -197776,6 +197960,14 @@ export const LatestPaidActionsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -206936,6 +207128,14 @@ export const NotificationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -227360,6 +227560,14 @@ export const PublicationDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -234565,6 +234773,14 @@ export const PublicationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -241997,6 +242213,14 @@ export const PublicationBookmarksDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -254093,6 +254317,14 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -261296,6 +261528,14 @@ export const RevenueFromPublicationDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -268835,6 +269075,14 @@ export const SearchPublicationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -282056,8 +282304,10 @@ export type ProtocolSharedRevenueCollectOpenActionSettingsKeySpecifier = ( | 'collectNft' | 'contract' | 'creatorClient' + | 'distribution' | 'endsAt' | 'followerOnly' + | 'mintFee' | 'recipient' | 'referralFee' | 'type' @@ -282069,12 +282319,27 @@ export type ProtocolSharedRevenueCollectOpenActionSettingsFieldPolicy = { collectNft?: FieldPolicy | FieldReadFunction; contract?: FieldPolicy | FieldReadFunction; creatorClient?: FieldPolicy | FieldReadFunction; + distribution?: FieldPolicy | FieldReadFunction; endsAt?: FieldPolicy | FieldReadFunction; followerOnly?: FieldPolicy | FieldReadFunction; + mintFee?: FieldPolicy | FieldReadFunction; recipient?: FieldPolicy | FieldReadFunction; referralFee?: FieldPolicy | FieldReadFunction; type?: FieldPolicy | FieldReadFunction; }; +export type ProtocolSharedRevenueDistributionKeySpecifier = ( + | 'creatorClientSplit' + | 'creatorSplit' + | 'executorClientSplit' + | 'protocolSplit' + | ProtocolSharedRevenueDistributionKeySpecifier +)[]; +export type ProtocolSharedRevenueDistributionFieldPolicy = { + creatorClientSplit?: FieldPolicy | FieldReadFunction; + creatorSplit?: FieldPolicy | FieldReadFunction; + executorClientSplit?: FieldPolicy | FieldReadFunction; + protocolSplit?: FieldPolicy | FieldReadFunction; +}; export type PublicationMarketplaceMetadataAttributeKeySpecifier = ( | 'displayType' | 'traitType' @@ -284552,6 +284817,13 @@ export type StrictTypedTypePolicies = { | (() => undefined | ProtocolSharedRevenueCollectOpenActionSettingsKeySpecifier); fields?: ProtocolSharedRevenueCollectOpenActionSettingsFieldPolicy; }; + ProtocolSharedRevenueDistribution?: Omit & { + keyFields?: + | false + | ProtocolSharedRevenueDistributionKeySpecifier + | (() => undefined | ProtocolSharedRevenueDistributionKeySpecifier); + fields?: ProtocolSharedRevenueDistributionFieldPolicy; + }; PublicationMarketplaceMetadataAttribute?: Omit & { keyFields?: | false diff --git a/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts b/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts index 2ff196e2a0..13aa8691f2 100644 --- a/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts +++ b/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts @@ -1,11 +1,4 @@ -import { - Amount, - ChainType, - Erc20Amount, - EvmAddress, - FiatAmount, - erc20, -} from '@lens-protocol/shared-kernel'; +import { Erc20Amount, EvmAddress, FiatAmount } from '@lens-protocol/shared-kernel'; import * as gql from '../graphql/generated'; import { OpenActionModuleSettings, PrimaryPublication } from '../publication'; @@ -205,15 +198,7 @@ function buildCollectFee( function buildMintFee( module: gql.ProtocolSharedRevenueCollectOpenActionSettings, ): SharedMintFee | null { - // TODO replace with data from `module` once available - const bonsai = erc20({ - address: '0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c', - chainType: ChainType.POLYGON, - decimals: 18, - name: 'BONSAI', - symbol: 'BONSAI', - }); - const amount = Amount.erc20(bonsai, 10); + const amount = erc20Amount(module.mintFee); if (amount.isZero()) return null; diff --git a/packages/client/src/graphql/fragments.generated.ts b/packages/client/src/graphql/fragments.generated.ts index 8f12556934..c04f2687aa 100644 --- a/packages/client/src/graphql/fragments.generated.ts +++ b/packages/client/src/graphql/fragments.generated.ts @@ -297,6 +297,13 @@ export type ProtocolSharedRevenueCollectOpenActionSettingsFragment = { creatorClient: string | null; contract: NetworkAddressFragment; amount: AmountFragment; + distribution: { + creatorClientSplit: number; + creatorSplit: number; + executorClientSplit: number; + protocolSplit: number; + }; + mintFee: AmountFragment; }; export type MultirecipientFeeCollectOpenActionSettingsFragment = { @@ -27638,6 +27645,27 @@ export const ProtocolSharedRevenueCollectOpenActionSettingsFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -30351,6 +30379,27 @@ export const PostFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -35855,6 +35904,27 @@ export const CommentBaseFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -41252,6 +41322,27 @@ export const QuoteBaseFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -46167,6 +46258,27 @@ export const CommentFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -53008,6 +53120,27 @@ export const QuoteFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -59849,6 +59982,27 @@ export const MirrorFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/client/src/graphql/fragments.graphql b/packages/client/src/graphql/fragments.graphql index a9e44ef4b1..db005e8766 100644 --- a/packages/client/src/graphql/fragments.graphql +++ b/packages/client/src/graphql/fragments.graphql @@ -454,6 +454,15 @@ fragment ProtocolSharedRevenueCollectOpenActionSettings on ProtocolSharedRevenue amount { ...Amount } + distribution { + creatorClientSplit + creatorSplit + executorClientSplit + protocolSplit + } + mintFee { + ...Amount + } recipient referralFee followerOnly diff --git a/packages/client/src/graphql/types.generated.ts b/packages/client/src/graphql/types.generated.ts index 1d3e80d272..de92ded3df 100644 --- a/packages/client/src/graphql/types.generated.ts +++ b/packages/client/src/graphql/types.generated.ts @@ -1449,7 +1449,6 @@ export type ProtocolSharedRevenueCollectModuleInput = { collectLimit?: InputMaybe; /** The wallet of a client app to share revenues alongside the recipient and the protocol. Optional. */ creatorClient?: InputMaybe; - currentCollects?: Scalars['Float']['input']; endsAt?: InputMaybe; followerOnly: Scalars['Boolean']['input']; recipient?: InputMaybe; @@ -1594,7 +1593,7 @@ export enum PublicationReportingIllegalSubreason { AnimalAbuse = 'ANIMAL_ABUSE', DirectThreat = 'DIRECT_THREAT', HumanAbuse = 'HUMAN_ABUSE', - Plagiarism = 'PLAGIARISM', + IntEllEctualProperty = 'INTEllECTUAL_PROPERTY', ThreatIndividual = 'THREAT_INDIVIDUAL', Violence = 'VIOLENCE', } diff --git a/packages/client/src/submodules/explore/graphql/explore.generated.ts b/packages/client/src/submodules/explore/graphql/explore.generated.ts index 6aa6aaa724..0d3e5741ed 100644 --- a/packages/client/src/submodules/explore/graphql/explore.generated.ts +++ b/packages/client/src/submodules/explore/graphql/explore.generated.ts @@ -5553,6 +5553,27 @@ export const ExplorePublicationsDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/client/src/submodules/feed/graphql/feed.generated.ts b/packages/client/src/submodules/feed/graphql/feed.generated.ts index bc7dfea1ae..02300e7579 100644 --- a/packages/client/src/submodules/feed/graphql/feed.generated.ts +++ b/packages/client/src/submodules/feed/graphql/feed.generated.ts @@ -6453,6 +6453,27 @@ export const FeedItemFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -15438,6 +15459,27 @@ export const OpenActionPaidActionFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -22627,6 +22669,27 @@ export const FeedDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -29832,6 +29895,27 @@ export const FeedHighlightsDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -37001,6 +37085,27 @@ export const LatestPaidActionsDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/client/src/submodules/notifications/graphql/notifications.generated.ts b/packages/client/src/submodules/notifications/graphql/notifications.generated.ts index 2ac63bf6e2..11159f08d3 100644 --- a/packages/client/src/submodules/notifications/graphql/notifications.generated.ts +++ b/packages/client/src/submodules/notifications/graphql/notifications.generated.ts @@ -5497,6 +5497,27 @@ export const ReactionNotificationFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -12452,6 +12473,27 @@ export const CommentNotificationFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -19381,6 +19423,27 @@ export const MirrorNotificationFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -26336,6 +26399,27 @@ export const QuoteNotificationFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -34290,6 +34374,27 @@ export const ActedNotificationFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -42282,6 +42387,27 @@ export const MentionNotificationFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -49844,6 +49970,27 @@ export const NotificationsDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/client/src/submodules/publication/graphql/publication.generated.ts b/packages/client/src/submodules/publication/graphql/publication.generated.ts index 8433419839..d9395c4c9d 100644 --- a/packages/client/src/submodules/publication/graphql/publication.generated.ts +++ b/packages/client/src/submodules/publication/graphql/publication.generated.ts @@ -6981,6 +6981,27 @@ export const PublicationDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -14200,6 +14221,27 @@ export const PublicationsDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/client/src/submodules/publication/submodules/bookmarks/graphql/bookmarks.generated.ts b/packages/client/src/submodules/publication/submodules/bookmarks/graphql/bookmarks.generated.ts index efcb81b410..a508c29178 100644 --- a/packages/client/src/submodules/publication/submodules/bookmarks/graphql/bookmarks.generated.ts +++ b/packages/client/src/submodules/publication/submodules/bookmarks/graphql/bookmarks.generated.ts @@ -5583,6 +5583,27 @@ export const PublicationBookmarksDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/client/src/submodules/revenue/graphql/revenue.generated.ts b/packages/client/src/submodules/revenue/graphql/revenue.generated.ts index 81215790eb..28137039d7 100644 --- a/packages/client/src/submodules/revenue/graphql/revenue.generated.ts +++ b/packages/client/src/submodules/revenue/graphql/revenue.generated.ts @@ -5618,6 +5618,27 @@ export const PublicationRevenueFragmentDoc = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -12880,6 +12901,27 @@ export const RevenueFromPublicationsDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -20129,6 +20171,27 @@ export const RevenueFromPublicationDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/client/src/submodules/search/graphql/search.generated.ts b/packages/client/src/submodules/search/graphql/search.generated.ts index 04d2090c12..cb7a3a9697 100644 --- a/packages/client/src/submodules/search/graphql/search.generated.ts +++ b/packages/client/src/submodules/search/graphql/search.generated.ts @@ -5569,6 +5569,27 @@ export const SearchPublicationsDocument = { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, + { + kind: 'Field', + name: { kind: 'Name', value: 'mintFee' }, + selectionSet: { + kind: 'SelectionSet', + selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/react/src/transactions/useApproveModule/token-allowance.ts b/packages/react/src/transactions/useApproveModule/token-allowance.ts index 6f5fd5ec44..e3b13a8c54 100644 --- a/packages/react/src/transactions/useApproveModule/token-allowance.ts +++ b/packages/react/src/transactions/useApproveModule/token-allowance.ts @@ -11,15 +11,7 @@ import { TokenAllowanceLimit, TokenAllowanceRequest, } from '@lens-protocol/domain/use-cases/transactions'; -import { - Amount, - ChainType, - Erc20Amount, - EvmAddress, - erc20, - invariant, - never, -} from '@lens-protocol/shared-kernel'; +import { Erc20Amount, EvmAddress, invariant, never } from '@lens-protocol/shared-kernel'; import { SessionType } from '../../authentication'; @@ -32,16 +24,8 @@ function createTokenAllowanceRequest( }; } -function buildMintFeeAmount(_module: ProtocolSharedRevenueCollectOpenActionSettings): Erc20Amount { - // TODO replace with data from `_module` once available - const bonsai = erc20({ - address: '0x3d2bD0e15829AA5C362a4144FdF4A1112fa29B5c', - chainType: ChainType.POLYGON, - decimals: 18, - name: 'BONSAI', - symbol: 'BONSAI', - }); - return Amount.erc20(bonsai, 10); +function buildMintFeeAmount(module: ProtocolSharedRevenueCollectOpenActionSettings): Erc20Amount { + return erc20Amount(module.mintFee); } export type ResolveTokenAllowanceRequestForCollectArgs = { diff --git a/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts b/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts index cc941dd38f..5027458e0b 100644 --- a/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts +++ b/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts @@ -205,7 +205,7 @@ function resolveUnknownRequestFor( target.openActionModules?.find( (entry): entry is UnknownOpenActionModuleSettings => isUnknownOpenActionModuleSettings(entry) && entry.contract.address === params.address, - ) ?? never(`Cannot find Open Action settings ${params.address} fro publication ${target.id}`); + ) ?? never(`Cannot find Open Action settings ${params.address} in publication ${target.id}`); return { kind: TransactionKind.ACT_ON_PUBLICATION, diff --git a/packages/shared-kernel/src/crypto/Asset.ts b/packages/shared-kernel/src/crypto/Asset.ts index 0d3d4e1a35..2c679f77b8 100644 --- a/packages/shared-kernel/src/crypto/Asset.ts +++ b/packages/shared-kernel/src/crypto/Asset.ts @@ -237,22 +237,6 @@ export function erc20({ name, decimals, symbol, address, chainType }: Erc20Info) return immutable(asset.hash, asset); } -/** - * Bonsai asset factory function. - * - * @param info - {@link Erc20Info} details - * @returns An Erc20 asset instance. - */ -export function bonsai(address: EvmAddress) { - return erc20({ - address, - chainType: ChainType.POLYGON, - decimals: 18, - name: 'BONSAI', - symbol: 'BONSAI', - }); -} - /** * Matic asset provider function. * From e4e9a0861990f2f155e716f36b10a577cf2fd305 Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Thu, 16 May 2024 16:20:25 +0200 Subject: [PATCH 04/12] Supports protocolSharedRevenueCollectOpenAction input --- packages/api-bindings/src/lens/graphql/generated.ts | 7 ++++++- packages/client/src/graphql/types.generated.ts | 7 ++++++- .../src/transactions/adapters/OpenActionGateway.ts | 5 +++-- .../adapters/__tests__/OpenActionGateway.spec.ts | 13 ++++++++++--- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/packages/api-bindings/src/lens/graphql/generated.ts b/packages/api-bindings/src/lens/graphql/generated.ts index 6931f7871b..a0cce8f55a 100644 --- a/packages/api-bindings/src/lens/graphql/generated.ts +++ b/packages/api-bindings/src/lens/graphql/generated.ts @@ -73,7 +73,7 @@ export type Scalars = { export type ActOnOpenActionInput = { multirecipientCollectOpenAction?: InputMaybe; - protocolSharedRevenueCollectOpenAction?: InputMaybe; + protocolSharedRevenueCollectOpenAction?: InputMaybe; simpleCollectOpenAction?: InputMaybe; unknownOpenAction?: InputMaybe; }; @@ -1454,6 +1454,11 @@ export type ProfilesRequestWhere = { whoQuotedPublication?: InputMaybe; }; +export type ProtocolSharedRevenueActRedeemInput = { + /** The frontend app address that the collector uses */ + executorClient?: InputMaybe; +}; + export type ProtocolSharedRevenueCollectModuleInput = { amount?: InputMaybe; collectLimit?: InputMaybe; diff --git a/packages/client/src/graphql/types.generated.ts b/packages/client/src/graphql/types.generated.ts index de92ded3df..3433c3f5a2 100644 --- a/packages/client/src/graphql/types.generated.ts +++ b/packages/client/src/graphql/types.generated.ts @@ -63,7 +63,7 @@ export type Scalars = { export type ActOnOpenActionInput = { multirecipientCollectOpenAction?: InputMaybe; - protocolSharedRevenueCollectOpenAction?: InputMaybe; + protocolSharedRevenueCollectOpenAction?: InputMaybe; simpleCollectOpenAction?: InputMaybe; unknownOpenAction?: InputMaybe; }; @@ -1444,6 +1444,11 @@ export type ProfilesRequestWhere = { whoQuotedPublication?: InputMaybe; }; +export type ProtocolSharedRevenueActRedeemInput = { + /** The frontend app address that the collector uses */ + executorClient?: InputMaybe; +}; + export type ProtocolSharedRevenueCollectModuleInput = { amount?: InputMaybe; collectLimit?: InputMaybe; diff --git a/packages/react/src/transactions/adapters/OpenActionGateway.ts b/packages/react/src/transactions/adapters/OpenActionGateway.ts index 0b7f3e5ce8..ac65420d1a 100644 --- a/packages/react/src/transactions/adapters/OpenActionGateway.ts +++ b/packages/react/src/transactions/adapters/OpenActionGateway.ts @@ -202,11 +202,12 @@ export class OpenActionGateway referrers: resolveOnchainReferrers(request.referrers), }; case AllOpenActionType.SHARED_REVENUE_COLLECT: - // TODO handle executor client address return { for: request.publicationId, actOn: { - protocolSharedRevenueCollectOpenAction: true, + protocolSharedRevenueCollectOpenAction: { + executorClient: request.executorClient ?? null, + }, }, referrers: resolveOnchainReferrers(request.referrers), }; diff --git a/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts b/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts index 858b97d101..700c822ec5 100644 --- a/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts +++ b/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts @@ -146,7 +146,9 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { request: { for: publicationId, actOn: { - protocolSharedRevenueCollectOpenAction: true, + protocolSharedRevenueCollectOpenAction: { + executorClient: null, + }, }, referrers: expectedOnChainReferrers, }, @@ -285,7 +287,9 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { request: { for: publicationId, actOn: { - protocolSharedRevenueCollectOpenAction: true, + protocolSharedRevenueCollectOpenAction: { + executorClient: null, + }, }, referrers: expectedOnChainReferrers, }, @@ -497,11 +501,14 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { referrers, public: true, fee: mockCollectFee(), + executorClient: '0xAbAe21DD8737DbdCa26A16D6210D9293986800f9', }), expectedRequest: { for: publicationId, actOn: { - protocolSharedRevenueCollectOpenAction: true, + protocolSharedRevenueCollectOpenAction: { + executorClient: '0xAbAe21DD8737DbdCa26A16D6210D9293986800f9', + }, }, referrers: expectedOnChainReferrers, }, From d7593d93fafae333508ef6cf012adc2ee7f712fa Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Thu, 16 May 2024 18:46:52 +0200 Subject: [PATCH 05/12] Verify allowance and balance of mint fee token too --- .../web/src/publications/UseOpenAction.tsx | 2 +- .../src/use-cases/publications/OpenAction.ts | 22 +++++++---- .../publications/__helpers__/mocks.ts | 16 ++++++-- .../publications/__tests__/OpenAction.spec.ts | 39 +++++++++++++++---- .../adapters/OpenActionGateway.ts | 13 ++----- .../__tests__/OpenActionGateway.spec.ts | 7 ++-- .../adapters/schemas/publications.ts | 15 ++++--- .../useOpenAction/createOpenActionRequest.ts | 16 +++++--- 8 files changed, 88 insertions(+), 42 deletions(-) diff --git a/examples/web/src/publications/UseOpenAction.tsx b/examples/web/src/publications/UseOpenAction.tsx index 2b4e779dcf..4fb0b477e3 100644 --- a/examples/web/src/publications/UseOpenAction.tsx +++ b/examples/web/src/publications/UseOpenAction.tsx @@ -117,7 +117,7 @@ export function UseOpenAction() { metadata: uri, actions: [ { - type: OpenActionType.SIMPLE_COLLECT, + type: OpenActionType.SHARED_REVENUE_COLLECT, followerOnly: false, collectLimit: 5, }, diff --git a/packages/domain/src/use-cases/publications/OpenAction.ts b/packages/domain/src/use-cases/publications/OpenAction.ts index c83cfd2ae4..8ae20187fc 100644 --- a/packages/domain/src/use-cases/publications/OpenAction.ts +++ b/packages/domain/src/use-cases/publications/OpenAction.ts @@ -27,13 +27,21 @@ export enum AllOpenActionType { UNKNOWN_OPEN_ACTION = 'UNKNOWN_OPEN_ACTION', } +export enum FeeType { + COLLECT = 'COLLECT', + MINT = 'MINT', +} + export type CollectFee = { + type: FeeType.COLLECT; amount: Amount; contractAddress: EvmAddress; }; -export type SharedMintFee = { +export type MintFee = { + type: FeeType.MINT; amount: Amount; + contractAddress: EvmAddress; executorClient?: EvmAddress; }; @@ -54,7 +62,6 @@ export type MultirecipientCollectRequest = { publicationId: PublicationId; referrers?: Referrers; fee: CollectFee; - collectModule: EvmAddress; public: boolean; signless: boolean; sponsored: boolean; @@ -66,7 +73,6 @@ export type SimpleCollectRequest = { publicationId: PublicationId; referrers?: Referrers; fee?: CollectFee; - collectModule: EvmAddress; public: boolean; signless: boolean; sponsored: boolean; @@ -77,10 +83,7 @@ export type SharedRevenueCollectRequest = { type: AllOpenActionType.SHARED_REVENUE_COLLECT; publicationId: PublicationId; referrers?: Referrers; - fee?: CollectFee; - mintFee?: SharedMintFee; - executorClient?: EvmAddress; - collectModule: EvmAddress; + fee: CollectFee | MintFee; public: boolean; signless: boolean; sponsored: boolean; @@ -127,8 +130,11 @@ export function isUnknownActionRequest( return request.type === AllOpenActionType.UNKNOWN_OPEN_ACTION; } -export type PaidCollectRequest = CollectRequest & { fee: CollectFee }; +type PaidCollectRequest = CollectRequest & { fee: CollectFee | MintFee }; +/** + * @internal + */ export function isPaidCollectRequest(request: OpenActionRequest): request is PaidCollectRequest { return isCollectRequest(request) && 'fee' in request && request.fee !== undefined; } diff --git a/packages/domain/src/use-cases/publications/__helpers__/mocks.ts b/packages/domain/src/use-cases/publications/__helpers__/mocks.ts index 14763c3c4b..d9a227ca5e 100644 --- a/packages/domain/src/use-cases/publications/__helpers__/mocks.ts +++ b/packages/domain/src/use-cases/publications/__helpers__/mocks.ts @@ -12,7 +12,9 @@ import { HidePublicationRequest } from '../HidePublication'; import { AllOpenActionType, CollectFee, + FeeType, LegacyCollectRequest, + MintFee, MultirecipientCollectRequest, SharedRevenueCollectRequest, SimpleCollectRequest, @@ -133,6 +135,16 @@ export function mockCollectFee(overrides?: Partial): CollectFee { amount: mockDaiAmount(1, ChainType.POLYGON), contractAddress: mockEvmAddress(), ...overrides, + type: FeeType.COLLECT, + }; +} + +export function mockMintFee(overrides?: Partial): MintFee { + return { + amount: mockDaiAmount(1, ChainType.POLYGON), + contractAddress: mockEvmAddress(), + ...overrides, + type: FeeType.MINT, }; } @@ -155,10 +167,10 @@ export function mockSharedRevenueCollectRequest( ): SharedRevenueCollectRequest { return { publicationId: mockPublicationId(), + fee: mockMintFee(), public: false, signless: true, sponsored: true, - collectModule: mockEvmAddress(), ...overrides, type: AllOpenActionType.SHARED_REVENUE_COLLECT, kind: TransactionKind.ACT_ON_PUBLICATION, @@ -173,7 +185,6 @@ export function mockSimpleCollectRequest( public: false, signless: true, sponsored: true, - collectModule: mockEvmAddress(), ...overrides, type: AllOpenActionType.SIMPLE_COLLECT, kind: TransactionKind.ACT_ON_PUBLICATION, @@ -189,7 +200,6 @@ export function mockMultirecipientCollectRequest( public: false, signless: true, sponsored: true, - collectModule: mockEvmAddress(), ...overrides, type: AllOpenActionType.MULTIRECIPIENT_COLLECT, kind: TransactionKind.ACT_ON_PUBLICATION, diff --git a/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts b/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts index c716aa05b9..34108fee94 100644 --- a/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts +++ b/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts @@ -21,7 +21,9 @@ import { import { mockCollectFee, mockLegacyCollectRequest, + mockMintFee, mockMultirecipientCollectRequest, + mockSharedRevenueCollectRequest, mockSimpleCollectRequest, mockUnknownActionRequest, } from '../__helpers__/mocks'; @@ -54,7 +56,7 @@ function setupOpenAction({ } describe(`Given the ${OpenAction.name} use-case interactor`, () => { - describe.only.each([ + describe.each([ { description: 'LegacyCollectRequest', request: mockLegacyCollectRequest({ fee: mockCollectFee() }), @@ -63,6 +65,14 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { description: 'SimpleCollectRequest', request: mockSimpleCollectRequest({ fee: mockCollectFee() }), }, + { + description: 'SharedRevenueCollectRequest with mint fee', + request: mockSharedRevenueCollectRequest({ fee: mockMintFee() }), + }, + { + description: 'SharedRevenueCollectRequest with collect fee', + request: mockSharedRevenueCollectRequest({ fee: mockCollectFee() }), + }, { description: 'MultirecipientCollectRequest', request: mockMultirecipientCollectRequest(), @@ -75,7 +85,7 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { description: 'public MultirecipientCollectRequest', request: mockMultirecipientCollectRequest({ public: true }), }, - ])(`when executed with a request that requires a fee`, ({ request, description }) => { + ])(`when executed with a request that involves a fee`, ({ request, description }) => { invariant(isPaidCollectRequest(request), 'Test misconfiguration.'); it(`should check the token availability for ${description}`, async () => { @@ -104,7 +114,7 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { }); }); - describe.only.each([ + describe.each([ { type: 'LegacyCollectRequest', request: mockLegacyCollectRequest({ fee: mockCollectFee() }), @@ -113,11 +123,15 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { type: 'SimpleCollectRequest', request: mockSimpleCollectRequest({ fee: mockCollectFee() }), }, + { + type: 'SharedRevenueCollectRequest with mint fee', + request: mockSharedRevenueCollectRequest(), + }, { type: 'MultirecipientCollectRequest', request: mockMultirecipientCollectRequest(), }, - ])(`when executed with a request that requires a fee`, ({ request, type }) => { + ])(`when executed with a request that involves a fee`, ({ request, type }) => { invariant(isPaidCollectRequest(request), 'Test misconfiguration.'); it(`should support the ${SignedOnChain.name}<${type}> strategy`, async () => { @@ -140,12 +154,17 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { }); }); - describe.only.each([ + describe.each([ { type: 'SimpleCollectRequest', request: mockSimpleCollectRequest({ fee: undefined, public: true }), tokenAvailability: mock(), }, + { + type: 'SharedRevenueCollectRequest', + request: mockSharedRevenueCollectRequest({ public: true }), + tokenAvailability: mockTokeAvailability({ result: success() }), + }, { type: 'UnknownActionRequest', request: mockUnknownActionRequest({ public: true }), @@ -170,7 +189,7 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { }); }); - describe.only.each([ + describe.each([ { type: 'LegacyCollectRequest', request: mockLegacyCollectRequest({ fee: undefined }), @@ -184,7 +203,7 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { request: mockUnknownActionRequest(), }, ])( - `when executed with a request without fee or for which is not possible to determine (e.g. unknown open action)`, + `when executed with a request without fee or for which is not possible to determine if requires a fee (e.g. unknown open action)`, ({ request, type }) => { it(`should support the ${DelegableSigning.name}<${type}> strategy`, async () => { const { openAction, signedExecution, delegableExecution, paidExecution } = @@ -199,7 +218,7 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { }, ); - describe.only.each([ + describe.each([ { type: 'LegacyCollectRequest', request: mockLegacyCollectRequest({ sponsored: false }), @@ -208,6 +227,10 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { type: 'SimpleCollectRequest', request: mockSimpleCollectRequest({ sponsored: false }), }, + { + type: 'SharedRevenueCollectRequest', + request: mockSharedRevenueCollectRequest({ sponsored: false }), + }, { type: 'UnknownActionRequest', request: mockUnknownActionRequest({ sponsored: false }), diff --git a/packages/react/src/transactions/adapters/OpenActionGateway.ts b/packages/react/src/transactions/adapters/OpenActionGateway.ts index ac65420d1a..6334035bb5 100644 --- a/packages/react/src/transactions/adapters/OpenActionGateway.ts +++ b/packages/react/src/transactions/adapters/OpenActionGateway.ts @@ -15,6 +15,7 @@ import { NativeTransaction, Nonce } from '@lens-protocol/domain/entities'; import { AllOpenActionType, DelegableOpenActionRequest, + FeeType, LegacyCollectRequest, OpenActionRequest, isUnknownActionRequest, @@ -206,7 +207,7 @@ export class OpenActionGateway for: request.publicationId, actOn: { protocolSharedRevenueCollectOpenAction: { - executorClient: request.executorClient ?? null, + executorClient: request.fee.type === FeeType.MINT ? request.fee.executorClient : null, }, }, referrers: resolveOnchainReferrers(request.referrers), @@ -379,6 +380,7 @@ export class OpenActionGateway private resolvePublicPaidActAmount(request: NewOpenActionRequest): Erc20Amount { switch (request.type) { case AllOpenActionType.MULTIRECIPIENT_COLLECT: + case AllOpenActionType.SHARED_REVENUE_COLLECT: return request.fee.amount; case AllOpenActionType.UNKNOWN_OPEN_ACTION: @@ -387,13 +389,6 @@ export class OpenActionGateway case AllOpenActionType.SIMPLE_COLLECT: return request.fee?.amount ?? never(); - case AllOpenActionType.SHARED_REVENUE_COLLECT: - return ( - request.fee?.amount ?? - request.mintFee?.amount ?? - never('Invalid UnknownActionRequest, missing fee and mintFee') - ); - default: never(); } @@ -417,7 +412,7 @@ export class OpenActionGateway }, amount.asset.address, amount.toBigDecimal().toHexadecimal(), - isUnknownActionRequest(request) ? contract.address : request.collectModule, + isUnknownActionRequest(request) ? contract.address : request.fee?.contractAddress ?? never(), ]); return { contractAddress: result.typedData.domain.verifyingContract, diff --git a/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts b/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts index 700c822ec5..52bc9a0489 100644 --- a/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts +++ b/packages/react/src/transactions/adapters/__tests__/OpenActionGateway.spec.ts @@ -18,8 +18,8 @@ import { } from '@lens-protocol/api-bindings/mocks'; import { NativeTransaction, UnsignedTransaction } from '@lens-protocol/domain/entities'; import { - mockCollectFee, mockLegacyCollectRequest, + mockMintFee, mockMultirecipientCollectRequest, mockNonce, mockProfileId, @@ -500,8 +500,9 @@ describe(`Given an instance of ${OpenActionGateway.name}`, () => { publicationId, referrers, public: true, - fee: mockCollectFee(), - executorClient: '0xAbAe21DD8737DbdCa26A16D6210D9293986800f9', + fee: mockMintFee({ + executorClient: '0xAbAe21DD8737DbdCa26A16D6210D9293986800f9', + }), }), expectedRequest: { for: publicationId, diff --git a/packages/react/src/transactions/adapters/schemas/publications.ts b/packages/react/src/transactions/adapters/schemas/publications.ts index f78e265063..484fbf217e 100644 --- a/packages/react/src/transactions/adapters/schemas/publications.ts +++ b/packages/react/src/transactions/adapters/schemas/publications.ts @@ -10,6 +10,7 @@ import { RecipientWithSplit, ReferencePolicyType, OpenActionRequest, + FeeType, } from '@lens-protocol/domain/use-cases/publications'; import { UnknownObject } from '@lens-protocol/shared-kernel'; import { z } from 'zod'; @@ -177,10 +178,18 @@ export const CreateMirrorRequestSchema: z.ZodType< }); const CollectFeeSchema = z.object({ + type: z.literal(FeeType.COLLECT), amount: Erc20AmountSchema, contractAddress: EvmAddressSchema, }); +const MintFeeSchema = z.object({ + type: z.literal(FeeType.MINT), + amount: Erc20AmountSchema, + contractAddress: EvmAddressSchema, + executorClient: EvmAddressSchema.optional(), +}); + const BaseCollectRequestSchema = z.object({ kind: z.literal(TransactionKind.ACT_ON_PUBLICATION), publicationId: PublicationIdSchema, @@ -201,7 +210,6 @@ export const SimpleCollectRequestSchema = BaseCollectRequestSchema.extend({ publicationId: PublicationIdSchema, referrers: ReferrersSchema.optional(), fee: CollectFeeSchema.optional(), - collectModule: EvmAddressSchema, public: z.boolean(), signless: z.boolean(), sponsored: z.boolean(), @@ -211,12 +219,10 @@ export const SharedRevenueCollectRequestSchema = BaseCollectRequestSchema.extend type: z.literal(AllOpenActionType.SHARED_REVENUE_COLLECT), publicationId: PublicationIdSchema, referrers: ReferrersSchema.optional(), - fee: CollectFeeSchema.optional(), - collectModule: EvmAddressSchema, + fee: z.discriminatedUnion('type', [CollectFeeSchema, MintFeeSchema]), public: z.boolean(), signless: z.boolean(), sponsored: z.boolean(), - executorClient: EvmAddressSchema.optional(), }); export const MultirecipientCollectRequestSchema = BaseCollectRequestSchema.extend({ @@ -224,7 +230,6 @@ export const MultirecipientCollectRequestSchema = BaseCollectRequestSchema.exten publicationId: PublicationIdSchema, referrers: ReferrersSchema.optional(), fee: CollectFeeSchema, - collectModule: EvmAddressSchema, public: z.boolean(), signless: z.boolean(), sponsored: z.boolean(), diff --git a/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts b/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts index 5027458e0b..89ff76eb86 100644 --- a/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts +++ b/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts @@ -9,6 +9,7 @@ import { TransactionKind } from '@lens-protocol/domain/entities'; import { AllOpenActionType, CollectRequest, + FeeType, OpenActionRequest, UnknownActionRequest, } from '@lens-protocol/domain/use-cases/publications'; @@ -63,6 +64,7 @@ function resolveCollectRequestFor( publicationId: collectable.id, referrer: args.publication !== collectable ? args.publication.id : undefined, fee: { + type: FeeType.COLLECT, amount: erc20Amount(settings.amount), contractAddress: settings.contract.address, }, @@ -99,10 +101,10 @@ function resolveCollectRequestFor( fee: amount.isZero() ? undefined : { + type: FeeType.COLLECT, amount, contractAddress: settings.contract.address, }, - collectModule: settings.contract.address, public: session.type === SessionType.JustWallet, signless, sponsored, @@ -118,10 +120,10 @@ function resolveCollectRequestFor( params.referrers ?? (args.publication !== collectable ? [args.publication.id] : undefined), fee: { + type: FeeType.COLLECT, amount: erc20Amount(settings.amount), contractAddress: settings.contract.address, }, - collectModule: settings.contract.address, public: session.type === SessionType.JustWallet, signless, sponsored, @@ -138,13 +140,17 @@ function resolveCollectRequestFor( params.referrers ?? (args.publication !== collectable ? [args.publication.id] : undefined), fee: amount.isZero() - ? undefined + ? { + type: FeeType.MINT, + amount: erc20Amount(settings.mintFee), + contractAddress: settings.contract.address, + executorClient: params.executorClient, + } : { + type: FeeType.COLLECT, amount, contractAddress: settings.contract.address, }, - collectModule: settings.contract.address, - executorClient: params.executorClient, public: session.type === SessionType.JustWallet, signless, sponsored, From 30a66bdb016d61139308d206dc84e96aa3f530f2 Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Fri, 17 May 2024 12:53:29 +0200 Subject: [PATCH 06/12] Refactors OpenAction use-case --- .../src/use-cases/publications/OpenAction.ts | 26 ++++++------------- .../publications/__tests__/OpenAction.spec.ts | 15 ++++++----- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/packages/domain/src/use-cases/publications/OpenAction.ts b/packages/domain/src/use-cases/publications/OpenAction.ts index 8ae20187fc..58588bb419 100644 --- a/packages/domain/src/use-cases/publications/OpenAction.ts +++ b/packages/domain/src/use-cases/publications/OpenAction.ts @@ -11,7 +11,6 @@ import { DelegableSigning } from '../transactions/DelegableSigning'; import { ITransactionResultPresenter } from '../transactions/ITransactionResultPresenter'; import { PaidTransaction } from '../transactions/PaidTransaction'; import { SignedOnChain } from '../transactions/SignedOnChain'; -import { SponsorshipReady } from '../transactions/SponsorshipReady'; import { InsufficientAllowanceError, InsufficientFundsError, @@ -154,22 +153,16 @@ export type IOpenActionPresenter = ITransactionResultPresenter< | WalletConnectionError >; -export class OpenAction extends SponsorshipReady { +export class OpenAction { constructor( private readonly tokenAvailability: TokenAvailability, private readonly signedExecution: SignedOnChain, private readonly delegableExecution: DelegableSigning, private readonly paidExecution: PaidTransaction, private readonly presenter: IOpenActionPresenter, - ) { - super(); - } - - protected async charged(request: OpenActionRequest): Promise { - await this.paidExecution.execute(request); - } + ) {} - protected async sponsored(request: OpenActionRequest): Promise { + async execute(request: OpenActionRequest): Promise { if (isPaidCollectRequest(request)) { const result = await this.tokenAvailability.checkAvailability({ amount: request.fee.amount, @@ -180,17 +173,14 @@ export class OpenAction extends SponsorshipReady { this.presenter.present(result); return; } + } - if (isPublicOpenActionRequest(request)) { - return this.charged(request); - } - - await this.signedExecution.execute(request); - return; + if (isPublicOpenActionRequest(request) || request.sponsored === false) { + return this.paidExecution.execute(request); } - if (isPublicOpenActionRequest(request)) { - return this.charged(request); + if (isPaidCollectRequest(request)) { + return this.signedExecution.execute(request); } await this.delegableExecution.execute(request); diff --git a/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts b/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts index 34108fee94..12f0860dfc 100644 --- a/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts +++ b/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts @@ -58,11 +58,11 @@ function setupOpenAction({ describe(`Given the ${OpenAction.name} use-case interactor`, () => { describe.each([ { - description: 'LegacyCollectRequest', + description: 'LegacyCollectRequest with collect fee', request: mockLegacyCollectRequest({ fee: mockCollectFee() }), }, { - description: 'SimpleCollectRequest', + description: 'SimpleCollectRequest with collect fee', request: mockSimpleCollectRequest({ fee: mockCollectFee() }), }, { @@ -74,15 +74,15 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { request: mockSharedRevenueCollectRequest({ fee: mockCollectFee() }), }, { - description: 'MultirecipientCollectRequest', + description: 'MultirecipientCollectRequest (implicit collect fee)', request: mockMultirecipientCollectRequest(), }, { - description: 'public SimpleCollectRequest', + description: 'public SimpleCollectRequest with fee', request: mockSimpleCollectRequest({ fee: mockCollectFee(), public: true }), }, { - description: 'public MultirecipientCollectRequest', + description: 'public MultirecipientCollectRequest (implicit collect fee)', request: mockMultirecipientCollectRequest({ public: true }), }, ])(`when executed with a request that involves a fee`, ({ request, description }) => { @@ -243,8 +243,9 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { 'when executed with a request that has the "sponsored" flag set to false', ({ request, type }) => { it(`should support the ${PaidTransaction.name}<${type}> strategy`, async () => { - const { openAction, signedExecution, delegableExecution, paidExecution } = - setupOpenAction(); + const { openAction, signedExecution, delegableExecution, paidExecution } = setupOpenAction({ + tokenAvailability: mockTokeAvailability({ result: success() }), + }); await openAction.execute(request); From 9559eba2bdfb594217d397e72e8c07654de38e43 Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Mon, 20 May 2024 09:28:47 +0200 Subject: [PATCH 07/12] Updates PublicActProxy addresses --- packages/react/src/environments.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react/src/environments.ts b/packages/react/src/environments.ts index 865225b8ec..11299c744a 100644 --- a/packages/react/src/environments.ts +++ b/packages/react/src/environments.ts @@ -60,7 +60,7 @@ export const production: EnvironmentConfig = { }, contracts: { permissionlessCreator: '0x0b5e6100243f793e480DE6088dE6bA70aA9f3872', - publicActProxy: '0x53582b1b7BE71622E7386D736b6baf87749B7a2B', + publicActProxy: '0x358bac99d38609F3D9fB9450Dff87DF65AdD8965', }, handleResolver: (localName) => `lens/${localName}`, }; @@ -88,7 +88,7 @@ export const development: EnvironmentConfig = { }, contracts: { permissionlessCreator: '0x36440da1D98FF46637f0b98AAA082bc77977B49B', - publicActProxy: '0x77706372deCeb81D49422F9115680B4873722AF1', + publicActProxy: '0xfD8671cC32ca785Cb4fb81431CF0Acfe7d4dAa3F', }, handleResolver: (localName) => `lens/${localName}`, }; @@ -110,7 +110,7 @@ export const staging: EnvironmentConfig = { }, contracts: { permissionlessCreator: '0x36440da1D98FF46637f0b98AAA082bc77977B49B', - publicActProxy: '0x77706372deCeb81D49422F9115680B4873722AF1', + publicActProxy: '0xfD8671cC32ca785Cb4fb81431CF0Acfe7d4dAa3F', }, handleResolver: (localName) => `lens/${localName}`, }; From 7c3dea62c795adddcfea0b72f6b65bbbe23e6fc8 Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Mon, 20 May 2024 11:02:30 +0200 Subject: [PATCH 08/12] Improves resolveCollectPolicy --- examples/web/src/components/CollectPolicy.tsx | 88 ++++ examples/web/src/components/cards.tsx | 5 +- .../src/discovery/UseExplorePublications.tsx | 58 +-- .../web/src/publications/UseOpenAction.tsx | 5 +- .../src/lens/graphql/fragments.graphql | 6 + .../src/lens/graphql/generated.ts | 410 ++++++++++++++++++ .../src/lens/utils/CollectModuleSettings.ts | 145 ++++++- packages/react/src/publication/index.ts | 2 + 8 files changed, 645 insertions(+), 74 deletions(-) create mode 100644 examples/web/src/components/CollectPolicy.tsx diff --git a/examples/web/src/components/CollectPolicy.tsx b/examples/web/src/components/CollectPolicy.tsx new file mode 100644 index 0000000000..f4cf0b7b75 --- /dev/null +++ b/examples/web/src/components/CollectPolicy.tsx @@ -0,0 +1,88 @@ +import { + CollectFee, + ExplorePublication, + MintFee, + MultirecipientCollectFee, + isMultirecipientCollectFee, + resolveCollectPolicy, +} from '@lens-protocol/react-web'; + +import { formatAmount } from '../utils/formatAmount'; + +export function formatFee({ amount, rate }: CollectFee | MultirecipientCollectFee | MintFee) { + if (rate) { + const fiat = amount.convert(rate); + return `${formatAmount(amount)} (${formatAmount(fiat)})`; + } + return formatAmount(amount); +} + +export function CollectFeeDetails({ fee }: { fee: CollectFee | MultirecipientCollectFee }) { + return ( +
+ Collect Fee: {formatFee(fee)} +
    + {fee.referralFee > 0 &&
  • Referral fee: {fee.referralFee}%
  • } + + {isMultirecipientCollectFee(fee) ? ( +
    + Recipients: +
      + {fee.recipients.map((r) => ( +
    • + {r.recipient} ({r.split}%) +
    • + ))} +
    +
    + ) : ( +
  • Recipient: {fee.recipient}
  • + )} +
+
+ ); +} + +function MintFeeDetails({ fee }: { fee: MintFee }) { + return ( +
+ Mint fee: {formatFee(fee)} +
    +
  • Creator: {fee.distribution.creatorSplit}%
  • +
  • Creator App: {fee.distribution.creatorClientSplit}%
  • +
  • Executor App: {fee.distribution.executorClientSplit}%
  • +
  • Protocol: {fee.distribution.protocolSplit}%
  • +
+
+ ); +} + +export function CollectCriteria({ publication }: { publication: ExplorePublication }) { + const policy = resolveCollectPolicy(publication); + + if (!policy) return

The publication is not collectable.

; + + return ( +
    + {policy.followerOnly === true &&
  • Only followers can collect
  • } + + {policy.collectLimit &&
  • Collect limit: {policy.collectLimit}
  • } + + {policy.endsAt &&
  • Ends at: {policy.endsAt}
  • } + + {policy.collectFee === null && policy.mintFee === null &&
  • Free collect
  • } + + {policy.collectFee && ( +
  • + +
  • + )} + + {policy.mintFee && ( +
  • + +
  • + )} +
+ ); +} diff --git a/examples/web/src/components/cards.tsx b/examples/web/src/components/cards.tsx index 019774385f..8ae78972bf 100644 --- a/examples/web/src/components/cards.tsx +++ b/examples/web/src/components/cards.tsx @@ -79,7 +79,10 @@ type PublicationCardProps = { export function PublicationCard({ publication, children }: PublicationCardProps) { return ( -
+
-

{`Paid collect: ${formatCollectFee(fee)}`}

- - {fee.referralFee > 0 &&
{`Referral fee: ${fee.referralFee}%`}
} - - {isMultirecipientCollectFee(fee) ? ( -

{`Recipients: ${fee.recipients.map((r) => r.recipient).join(', ')}`}

- ) : ( -

{`Recipient: ${fee.recipient}`}

- )} -
- ); -} - -function PublicationCollectPolicy({ publication }: { publication: ExplorePublication }) { - const policy = resolveCollectPolicy(publication); - - if (!policy) return null; - - return ( -
- {policy.followerOnly === true &&

Only followers can collect

} - - {policy.collectLimit &&

{`Collect limit: ${policy.collectLimit}`}

} - - {policy.endsAt &&

{`Ends at: ${policy.endsAt}`}

} - - {policy.fee === null &&

Free collect

} - - {policy.fee && } -
- ); -} export function UseExplorePublications() { const { @@ -83,7 +31,7 @@ export function UseExplorePublications() {
{publications.map((publication) => ( - + ))} {hasMore &&

Loading more...

} diff --git a/examples/web/src/publications/UseOpenAction.tsx b/examples/web/src/publications/UseOpenAction.tsx index 4fb0b477e3..772350195c 100644 --- a/examples/web/src/publications/UseOpenAction.tsx +++ b/examples/web/src/publications/UseOpenAction.tsx @@ -12,6 +12,7 @@ import { import { useState } from 'react'; import { toast } from 'react-hot-toast'; +import { CollectCriteria } from '../components/CollectPolicy'; import { Logs } from '../components/Logs'; import { RequireProfileSession, RequireWalletSession } from '../components/auth'; import { PublicationCard } from '../components/cards'; @@ -59,7 +60,9 @@ function TestScenario({ id }: { id: PublicationId }) { return (
- + + +

As Lens Profile you can perform:

diff --git a/packages/api-bindings/src/lens/graphql/fragments.graphql b/packages/api-bindings/src/lens/graphql/fragments.graphql index c23aa5ba76..35ac0edfe5 100644 --- a/packages/api-bindings/src/lens/graphql/fragments.graphql +++ b/packages/api-bindings/src/lens/graphql/fragments.graphql @@ -482,6 +482,12 @@ fragment ProtocolSharedRevenueCollectOpenActionSettings on ProtocolSharedRevenue mintFee { ...Amount } + distribution { + creatorClientSplit + creatorSplit + executorClientSplit + protocolSplit + } recipient referralFee followerOnly diff --git a/packages/api-bindings/src/lens/graphql/generated.ts b/packages/api-bindings/src/lens/graphql/generated.ts index a0cce8f55a..d4dda3dbe9 100644 --- a/packages/api-bindings/src/lens/graphql/generated.ts +++ b/packages/api-bindings/src/lens/graphql/generated.ts @@ -208,6 +208,7 @@ export enum CollectOpenActionModuleType { LegacySimpleCollectModule = 'LegacySimpleCollectModule', LegacyTimedFeeCollectModule = 'LegacyTimedFeeCollectModule', MultirecipientFeeCollectOpenActionModule = 'MultirecipientFeeCollectOpenActionModule', + ProtocolSharedRevenueCollectOpenActionModule = 'ProtocolSharedRevenueCollectOpenActionModule', SimpleCollectOpenActionModule = 'SimpleCollectOpenActionModule', UnknownOpenActionModule = 'UnknownOpenActionModule', } @@ -2574,6 +2575,12 @@ export type ProtocolSharedRevenueCollectOpenActionSettings = { contract: NetworkAddress; amount: Amount; mintFee: Amount; + distribution: { + creatorClientSplit: number; + creatorSplit: number; + executorClientSplit: number; + protocolSplit: number; + }; }; export type Recipient = { recipient: EvmAddress; split: number }; @@ -31141,6 +31148,19 @@ export const FragmentProtocolSharedRevenueCollectOpenActionSettings = /*#__PURE_ selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -33910,6 +33930,19 @@ export const FragmentPost = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -39305,6 +39338,19 @@ export const FragmentQuoteFields = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -44755,6 +44801,19 @@ export const FragmentCommentFields = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -50897,6 +50956,19 @@ export const FragmentQuote = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -57682,6 +57754,19 @@ export const FragmentExplorePublication = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -64571,6 +64656,19 @@ export const FragmentComment = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -71406,6 +71504,19 @@ export const FragmentMirror = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -79365,6 +79476,19 @@ export const FragmentFeedItem = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -86356,6 +86480,19 @@ export const FragmentFeedHighlight = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -95235,6 +95372,19 @@ export const FragmentOpenActionPaidAction = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -102184,6 +102334,19 @@ export const FragmentAnyPublicationInternal = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -111562,6 +111725,19 @@ export const FragmentReactionNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -118513,6 +118689,19 @@ export const FragmentCommentNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -126377,6 +126566,19 @@ export const FragmentMirrorNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -133307,6 +133509,19 @@ export const FragmentQuoteNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -141375,6 +141590,19 @@ export const FragmentActedNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -149468,6 +149696,19 @@ export const FragmentMentionNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -156458,6 +156699,19 @@ export const FragmentNotification = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -167164,6 +167418,19 @@ export const FragmentPublicationRevenue = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -175333,6 +175600,19 @@ export const ExplorePublicationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -183610,6 +183890,19 @@ export const FeedDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -190797,6 +191090,19 @@ export const FeedHighlightsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -197973,6 +198279,19 @@ export const LatestPaidActionsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -207141,6 +207460,19 @@ export const NotificationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -227573,6 +227905,19 @@ export const PublicationDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -234786,6 +235131,19 @@ export const PublicationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -242226,6 +242584,19 @@ export const PublicationBookmarksDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -254330,6 +254701,19 @@ export const RevenueFromPublicationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -261541,6 +261925,19 @@ export const RevenueFromPublicationDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, @@ -269088,6 +269485,19 @@ export const SearchPublicationsDocument = /*#__PURE__*/ { selections: [{ kind: 'FragmentSpread', name: { kind: 'Name', value: 'Amount' } }], }, }, + { + kind: 'Field', + name: { kind: 'Name', value: 'distribution' }, + selectionSet: { + kind: 'SelectionSet', + selections: [ + { kind: 'Field', name: { kind: 'Name', value: 'creatorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'creatorSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'executorClientSplit' } }, + { kind: 'Field', name: { kind: 'Name', value: 'protocolSplit' } }, + ], + }, + }, { kind: 'Field', name: { kind: 'Name', value: 'recipient' } }, { kind: 'Field', name: { kind: 'Name', value: 'referralFee' } }, { kind: 'Field', name: { kind: 'Name', value: 'followerOnly' } }, diff --git a/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts b/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts index 13aa8691f2..c7556f291c 100644 --- a/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts +++ b/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts @@ -64,9 +64,23 @@ export function findCollectModuleSettings( * Describes a single recipient collect fee. */ export type CollectFee = { + /** + * The collect fee amount. + */ amount: Erc20Amount; + /** + * The collect fee fiat exchange rate. + */ rate?: FiatAmount; + /** + * The referral fee share. + * + * This is a number between 0 and 100%. + */ referralFee: number; + /** + * The recipient of the fee. + */ recipient: EvmAddress; }; @@ -74,14 +88,68 @@ export type CollectFee = { * Describes a multi recipient collect fee. */ export type MultirecipientCollectFee = { + /** + * The collect fee amount. + */ amount: Erc20Amount; + /** + * The collect fee fiat exchange rate. + */ rate?: FiatAmount; + /** + * The referral fee share. + * + * This is a number between 0 and 100%. + */ referralFee: number; + /** + * The list of recipients and their corresponding shares. + */ recipients: gql.Recipient[]; }; -export type SharedMintFee = { +/** + * The shared mint fee distribution. + */ +export type MintFeeDistribution = { + /** + * The creator app share. + * + * This is a number between 0 and 100%. + */ + creatorClientSplit: number; + /** + * The default share for the publication creator Profile. + * + * This is a number between 0 and 100%. + * + * This could be increased by the creatorClientSplit and + * by the executorClientSplit if the corresponding addresses + * are not specified. + */ + creatorSplit: number; + /** + * The executor app share. + * + * This is a number between 0 and 100%. + */ + executorClientSplit: number; + /** + * The protocol share. + * + * This is a number between 0 and 100%. + */ + protocolSplit: number; +}; + +export type MintFee = { + /** + * The mint fee amount. + */ amount: Erc20Amount; + /** + * The mint fee fiat exchange rate. + */ rate?: FiatAmount; /** * The creator app address. @@ -89,6 +157,10 @@ export type SharedMintFee = { * If not set, the share for the creator app will be given to the creator of the publication. */ creatorClient?: EvmAddress | null; + /** + * The mint fee distribution. + */ + distribution: MintFeeDistribution; }; /** @@ -128,12 +200,17 @@ export type CollectPolicy = { /** * The collect fee, if any. */ + collectFee: CollectFee | MultirecipientCollectFee | null; + /** + * The collect fee, if any. + * + * @deprecated Use `collectFee` instead. + */ fee: CollectFee | MultirecipientCollectFee | null; - /** * Shared revenue mint fee, if any. */ - mintFee?: SharedMintFee | null; + mintFee: MintFee | null; }; function isMultirecipientCollectModuleSettings( @@ -195,9 +272,7 @@ function buildCollectFee( }; } -function buildMintFee( - module: gql.ProtocolSharedRevenueCollectOpenActionSettings, -): SharedMintFee | null { +function buildMintFee(module: gql.ProtocolSharedRevenueCollectOpenActionSettings): MintFee | null { const amount = erc20Amount(module.mintFee); if (amount.isZero()) return null; @@ -205,6 +280,12 @@ function buildMintFee( return { amount, creatorClient: module.creatorClient, + distribution: { + creatorClientSplit: module.distribution.creatorClientSplit / 100, + creatorSplit: module.distribution.creatorSplit / 100, + executorClientSplit: module.distribution.executorClientSplit / 100, + protocolSplit: module.distribution.protocolSplit / 100, + }, }; } @@ -226,71 +307,101 @@ export function resolveCollectPolicy(collectable: PrimaryPublication): CollectPo switch (module.__typename) { case 'LegacyAaveFeeCollectModuleSettings': - case 'LegacyERC4626FeeCollectModuleSettings': + case 'LegacyERC4626FeeCollectModuleSettings': { + const collectFee = buildCollectFee(module); + return { ...shared, + collectFee, collectNft: null, collectLimit: module.collectLimit, endsAt: module.endsAt, - fee: buildCollectFee(module), + fee: collectFee, + mintFee: null, }; + } case 'LegacyLimitedFeeCollectModuleSettings': - case 'LegacyLimitedTimedFeeCollectModuleSettings': + case 'LegacyLimitedTimedFeeCollectModuleSettings': { + const collectFee = buildCollectFee(module); + return { ...shared, + collectFee, collectNft: module.collectNft, collectLimit: module.collectLimit, endsAt: null, - fee: buildCollectFee(module), + fee: collectFee, + mintFee: null, }; + } case 'LegacyFeeCollectModuleSettings': - case 'LegacyTimedFeeCollectModuleSettings': + case 'LegacyTimedFeeCollectModuleSettings': { + const collectFee = buildCollectFee(module); + return { ...shared, + collectFee, collectNft: module.collectNft, collectLimit: null, endsAt: null, - fee: buildCollectFee(module), + fee: collectFee, + mintFee: null, }; + } case 'LegacyFreeCollectModuleSettings': return { ...shared, collectNft: module.collectNft, collectLimit: null, + collectFee: null, endsAt: null, fee: null, + mintFee: null, }; case 'LegacyMultirecipientFeeCollectModuleSettings': - case 'MultirecipientFeeCollectOpenActionSettings': + case 'MultirecipientFeeCollectOpenActionSettings': { + const collectFee = buildCollectFee(module); + return { ...shared, + collectFee, collectNft: module.collectNft, collectLimit: module.collectLimit, endsAt: module.endsAt, - fee: buildCollectFee(module), + fee: collectFee, + mintFee: null, }; + } case 'LegacySimpleCollectModuleSettings': - case 'SimpleCollectOpenActionSettings': + case 'SimpleCollectOpenActionSettings': { + const collectFee = buildCollectFee(module); + return { ...shared, + collectFee, collectNft: module.collectNft, collectLimit: module.collectLimit, endsAt: module.endsAt, - fee: buildCollectFee(module), + fee: collectFee, + mintFee: null, }; + } case 'ProtocolSharedRevenueCollectOpenActionSettings': { + const collectFee = buildCollectFee(module); + return { ...shared, + collectFee, collectNft: module.collectNft, collectLimit: module.collectLimit, endsAt: module.endsAt, - fee: buildCollectFee(module), + fee: collectFee, mintFee: buildMintFee(module), }; } diff --git a/packages/react/src/publication/index.ts b/packages/react/src/publication/index.ts index eefb1c1dcb..8e6016f852 100644 --- a/packages/react/src/publication/index.ts +++ b/packages/react/src/publication/index.ts @@ -117,6 +117,8 @@ export type { CollectPolicy, DegreesOfSeparationReferencePolicy, FollowersOnlyReferencePolicy, + MintFee, + MintFeeDistribution, MultirecipientCollectFee, NoReferencePolicy, ReferenceModule, From cc06ad94a3615a2cb8b1d4be3a3a43c20b256860 Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Mon, 20 May 2024 11:10:31 +0200 Subject: [PATCH 09/12] Fix EPOC value --- .../src/lens/utils/CollectModuleSettings.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts b/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts index c7556f291c..0981078ec1 100644 --- a/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts +++ b/packages/api-bindings/src/lens/utils/CollectModuleSettings.ts @@ -289,6 +289,16 @@ function buildMintFee(module: gql.ProtocolSharedRevenueCollectOpenActionSettings }; } +function resolveEndsAt(datetime: string | null): string | null { + if (!datetime) return null; + + const date = new Date(datetime); + + if (date.getTime() === 0) return null; + + return datetime; +} + /** * Resolve API's {@link OpenActionModuleSettings} to more user friendly {@link CollectPolicy}. * @@ -315,7 +325,7 @@ export function resolveCollectPolicy(collectable: PrimaryPublication): CollectPo collectFee, collectNft: null, collectLimit: module.collectLimit, - endsAt: module.endsAt, + endsAt: resolveEndsAt(module.endsAt), fee: collectFee, mintFee: null, }; @@ -371,7 +381,7 @@ export function resolveCollectPolicy(collectable: PrimaryPublication): CollectPo collectFee, collectNft: module.collectNft, collectLimit: module.collectLimit, - endsAt: module.endsAt, + endsAt: resolveEndsAt(module.endsAt), fee: collectFee, mintFee: null, }; @@ -386,7 +396,7 @@ export function resolveCollectPolicy(collectable: PrimaryPublication): CollectPo collectFee, collectNft: module.collectNft, collectLimit: module.collectLimit, - endsAt: module.endsAt, + endsAt: resolveEndsAt(module.endsAt), fee: collectFee, mintFee: null, }; @@ -400,7 +410,7 @@ export function resolveCollectPolicy(collectable: PrimaryPublication): CollectPo collectFee, collectNft: module.collectNft, collectLimit: module.collectLimit, - endsAt: module.endsAt, + endsAt: resolveEndsAt(module.endsAt), fee: collectFee, mintFee: buildMintFee(module), }; From 3e20b457408f0a9a425aed9afa699ebcfe328b29 Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Mon, 20 May 2024 19:26:51 +0200 Subject: [PATCH 10/12] Ensures correct publicPaidAct amount is used and correct spender --- .../web/src/publications/UseOpenAction.tsx | 78 +++++++++++------- .../src/use-cases/publications/OpenAction.ts | 8 +- .../publications/__helpers__/mocks.ts | 6 +- .../publications/__tests__/OpenAction.spec.ts | 4 +- .../adapters/OpenActionGateway.ts | 7 +- .../adapters/schemas/publications.ts | 6 +- .../transactions/shared/useSponsoredConfig.ts | 10 +-- .../__tests__/createOpenActionRequest.spec.ts | 81 +++++++++++++------ .../useOpenAction/createOpenActionRequest.ts | 39 +++++++-- .../useOpenAction/useOpenAction.ts | 11 ++- 10 files changed, 170 insertions(+), 80 deletions(-) diff --git a/examples/web/src/publications/UseOpenAction.tsx b/examples/web/src/publications/UseOpenAction.tsx index 772350195c..8b48271962 100644 --- a/examples/web/src/publications/UseOpenAction.tsx +++ b/examples/web/src/publications/UseOpenAction.tsx @@ -1,10 +1,12 @@ import { textOnly } from '@lens-protocol/metadata'; import { + InsufficientAllowanceError, isPostPublication, OpenActionKind, OpenActionType, PublicationId, TriStateValue, + useApproveModule, useCreatePost, useOpenAction, usePublication, @@ -24,11 +26,12 @@ import { invariant } from '../utils'; function TestScenario({ id }: { id: PublicationId }) { const { data: publication, loading, error } = usePublication({ forId: id }); - const { execute } = useOpenAction({ + const { execute: act, loading: collecting } = useOpenAction({ action: { kind: OpenActionKind.COLLECT, }, }); + const { execute: approve, loading: approving } = useApproveModule(); if (loading) { return ; @@ -39,9 +42,27 @@ function TestScenario({ id }: { id: PublicationId }) { } const collect = async (sponsored?: boolean) => { - const result = await execute({ publication, sponsored }); + const result = await act({ publication, sponsored }); if (result.isFailure()) { + // requires approval + if (result.error instanceof InsufficientAllowanceError) { + const approval = await approve({ + on: publication, + }); + + if (approval.isFailure()) { + toast.error(approval.error.message); + return; + } + + toast.success('You successfully approved the module'); + + // retry to collect + await collect(sponsored); + return; + } + toast.error(result.error.message); return; } @@ -58,40 +79,35 @@ function TestScenario({ id }: { id: PublicationId }) { invariant(isPostPublication(publication), 'Publication is not a post'); + const disabled = + approving || collecting || publication.operations.canCollect === TriStateValue.No; + return (
+ +
+ +

As Lens Profile you can perform:

+ +   + +
+
+
+ +

As wallet you can perform:

+ +
+
-
- -

As Lens Profile you can perform:

- -   - -
-
-
- -

As wallet you can perform:

- -
-
); } diff --git a/packages/domain/src/use-cases/publications/OpenAction.ts b/packages/domain/src/use-cases/publications/OpenAction.ts index 58588bb419..57aa8cbe6b 100644 --- a/packages/domain/src/use-cases/publications/OpenAction.ts +++ b/packages/domain/src/use-cases/publications/OpenAction.ts @@ -34,13 +34,15 @@ export enum FeeType { export type CollectFee = { type: FeeType.COLLECT; amount: Amount; - contractAddress: EvmAddress; + module: EvmAddress; + spender: EvmAddress; }; export type MintFee = { type: FeeType.MINT; amount: Amount; - contractAddress: EvmAddress; + module: EvmAddress; + spender: EvmAddress; executorClient?: EvmAddress; }; @@ -166,7 +168,7 @@ export class OpenAction { if (isPaidCollectRequest(request)) { const result = await this.tokenAvailability.checkAvailability({ amount: request.fee.amount, - spender: request.fee.contractAddress, + spender: request.fee.spender, }); if (result.isFailure()) { diff --git a/packages/domain/src/use-cases/publications/__helpers__/mocks.ts b/packages/domain/src/use-cases/publications/__helpers__/mocks.ts index d9a227ca5e..4a14da737a 100644 --- a/packages/domain/src/use-cases/publications/__helpers__/mocks.ts +++ b/packages/domain/src/use-cases/publications/__helpers__/mocks.ts @@ -133,7 +133,8 @@ export function mockUnknownReferencePolicyConfig( export function mockCollectFee(overrides?: Partial): CollectFee { return { amount: mockDaiAmount(1, ChainType.POLYGON), - contractAddress: mockEvmAddress(), + module: mockEvmAddress(), + spender: mockEvmAddress(), ...overrides, type: FeeType.COLLECT, }; @@ -142,7 +143,8 @@ export function mockCollectFee(overrides?: Partial): CollectFee { export function mockMintFee(overrides?: Partial): MintFee { return { amount: mockDaiAmount(1, ChainType.POLYGON), - contractAddress: mockEvmAddress(), + module: mockEvmAddress(), + spender: mockEvmAddress(), ...overrides, type: FeeType.MINT, }; diff --git a/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts b/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts index 12f0860dfc..c70dda1c12 100644 --- a/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts +++ b/packages/domain/src/use-cases/publications/__tests__/OpenAction.spec.ts @@ -97,7 +97,7 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { const tokenAvailability = mockTokeAvailability({ request: { amount: request.fee.amount, - spender: request.fee.contractAddress, + spender: request.fee.spender, }, result: failure(error), }); @@ -138,7 +138,7 @@ describe(`Given the ${OpenAction.name} use-case interactor`, () => { const tokenAvailability = mockTokeAvailability({ request: { amount: request.fee.amount, - spender: request.fee.contractAddress, + spender: request.fee.spender, }, result: success(), }); diff --git a/packages/react/src/transactions/adapters/OpenActionGateway.ts b/packages/react/src/transactions/adapters/OpenActionGateway.ts index 6334035bb5..670937fec2 100644 --- a/packages/react/src/transactions/adapters/OpenActionGateway.ts +++ b/packages/react/src/transactions/adapters/OpenActionGateway.ts @@ -26,6 +26,7 @@ import { ISignedOnChainGateway, } from '@lens-protocol/domain/use-cases/transactions'; import { + BigDecimal, ChainType, Data, Erc20Amount, @@ -411,8 +412,10 @@ export class OpenActionGateway actionModuleData: result.typedData.message.actionModuleData, }, amount.asset.address, - amount.toBigDecimal().toHexadecimal(), - isUnknownActionRequest(request) ? contract.address : request.fee?.contractAddress ?? never(), + BigDecimal.rescale(amount.toBigDecimal(), amount.asset.decimals).toHex(), + isUnknownActionRequest(request) + ? contract.address + : request.fee?.module ?? never('Fee is required for publicPaidAct'), ]); return { contractAddress: result.typedData.domain.verifyingContract, diff --git a/packages/react/src/transactions/adapters/schemas/publications.ts b/packages/react/src/transactions/adapters/schemas/publications.ts index 484fbf217e..1dee5bf59b 100644 --- a/packages/react/src/transactions/adapters/schemas/publications.ts +++ b/packages/react/src/transactions/adapters/schemas/publications.ts @@ -180,13 +180,15 @@ export const CreateMirrorRequestSchema: z.ZodType< const CollectFeeSchema = z.object({ type: z.literal(FeeType.COLLECT), amount: Erc20AmountSchema, - contractAddress: EvmAddressSchema, + module: EvmAddressSchema, + spender: EvmAddressSchema, }); const MintFeeSchema = z.object({ type: z.literal(FeeType.MINT), amount: Erc20AmountSchema, - contractAddress: EvmAddressSchema, + module: EvmAddressSchema, + spender: EvmAddressSchema, executorClient: EvmAddressSchema.optional(), }); diff --git a/packages/react/src/transactions/shared/useSponsoredConfig.ts b/packages/react/src/transactions/shared/useSponsoredConfig.ts index 3ccd3a6529..dc2813fab8 100644 --- a/packages/react/src/transactions/shared/useSponsoredConfig.ts +++ b/packages/react/src/transactions/shared/useSponsoredConfig.ts @@ -1,8 +1,6 @@ -import { ProtocolTransactionRequestModel } from '@lens-protocol/domain/entities'; - import { useSharedDependencies } from '../../shared'; -type SponsoredRequest = T & { +type SponsoredEnabled = T & { sponsored: boolean; }; @@ -15,7 +13,9 @@ export function useSponsoredConfig() { /** * Disables the sponsored flag if RequiredConfig says so */ - return function (request: SponsoredRequest) { - return config.sponsored ? request : { ...request, sponsored: false }; + return function (request: T): SponsoredEnabled { + return config.sponsored + ? { ...request, sponsored: request.sponsored ?? true } + : { ...request, sponsored: false }; }; } diff --git a/packages/react/src/transactions/useOpenAction/__tests__/createOpenActionRequest.spec.ts b/packages/react/src/transactions/useOpenAction/__tests__/createOpenActionRequest.spec.ts index fa9bd9447c..b66dbc4391 100644 --- a/packages/react/src/transactions/useOpenAction/__tests__/createOpenActionRequest.spec.ts +++ b/packages/react/src/transactions/useOpenAction/__tests__/createOpenActionRequest.spec.ts @@ -22,6 +22,7 @@ import { mockProfileSession, mockWalletOnlySession, } from '../../../authentication/__helpers__/mocks'; +import { staging } from '../../../environments'; import { createOpenActionRequest } from '../createOpenActionRequest'; import { OpenActionKind } from '../types'; @@ -37,9 +38,10 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { it(`should throw an ${InvariantError.name}`, () => { expect(() => createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.COLLECT }, mockProfileSession(), + staging, ), ).toThrow(InvariantError); }); @@ -57,20 +59,21 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { type: AllOpenActionType.LEGACY_COLLECT, fee: { amount: fee, - contractAddress: aContractAddress, + spender: aContractAddress, }, }, + expectedRequest: 'LegacyCollectRequest', }, { settings: mockLegacyFreeCollectModuleSettingsFragment(), expected: { type: AllOpenActionType.LEGACY_COLLECT, }, + expectedRequest: 'LegacyCollectRequest', }, ])( - `when acting on a publication configured w/ $settings.__typename collect`, - ({ expected, settings }) => { - const expectedRequest = 'LegacyCollectRequest'; + `and a PrimaryPublication configured with the $settings.__typename`, + ({ expected, expectedRequest, settings }) => { const publication = mockPostFragment({ openActionModules: [settings], }); @@ -79,12 +82,13 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { signless: true, }); - describe(`on a PrimaryPublication`, () => { + describe(`when executing the Collect Action`, () => { it(`should support signless & sponsored ${expectedRequest} in a ${SessionType.WithProfile} session`, () => { const result = createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.COLLECT }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -104,6 +108,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { }, { kind: OpenActionKind.COLLECT }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -115,24 +120,26 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { it(`should throw an ${InvariantError.name} if attempted in a ${SessionType.JustWallet} session`, () => { expect(() => createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.COLLECT }, mockWalletOnlySession(), + staging, ), ).toThrow(InvariantError); }); }); - describe(`on a Mirror`, () => { + describe(`when executing the Collect Action on a Mirror for it`, () => { const mirror = mockMirrorFragment({ mirrorOn: publication, }); it(`should use the Mirror ID as the "referrer" for the ${expectedRequest}`, () => { const result = createOpenActionRequest( - { publication: mirror }, + { publication: mirror, sponsored: true }, { kind: OpenActionKind.COLLECT }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -156,7 +163,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { type: AllOpenActionType.SIMPLE_COLLECT, fee: { amount: fee, - contractAddress: aContractAddress, + spender: aContractAddress, }, }, expectedRequest: 'SimpleCollectRequest', @@ -172,7 +179,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { type: AllOpenActionType.SHARED_REVENUE_COLLECT, fee: { amount: fee, - contractAddress: aContractAddress, + spender: aContractAddress, }, }, expectedRequest: 'SharedRevenueCollectRequest', @@ -188,13 +195,13 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { type: AllOpenActionType.MULTIRECIPIENT_COLLECT, fee: { amount: fee, - contractAddress: aContractAddress, + spender: aContractAddress, }, }, expectedRequest: 'MultirecipientCollectRequest', }, ])( - `when acting on a publication configured w/ $settings.__typename`, + `and a PrimaryPublication configured with the $settings.__typename`, ({ expected, expectedRequest, settings }) => { const publication = mockPostFragment({ openActionModules: [settings], @@ -204,13 +211,14 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { signless: true, }); - describe(`on a PrimaryPublication`, () => { + describe(`when executing the Collect Action`, () => { it(`should support signless & sponsored ${expectedRequest} in a ${SessionType.WithProfile} session`, () => { const referrers = [mockPublicationId(), mockProfileId()]; const result = createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.COLLECT, referrers }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -225,9 +233,10 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { it(`should forward the referrers list`, () => { const referrers = [mockPublicationId(), mockProfileId()]; const result = createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.COLLECT, referrers }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -240,6 +249,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { { publication, sponsored: false }, { kind: OpenActionKind.COLLECT }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -251,9 +261,10 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { it(`should support public ${expectedRequest} in a ${SessionType.JustWallet} session`, () => { const referrers = [mockPublicationId(), mockProfileId()]; const result = createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.COLLECT, referrers }, mockWalletOnlySession(), + staging, ); expect(result).toMatchObject({ @@ -267,16 +278,17 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { }); }); - describe(`on a Mirror`, () => { + describe(`when executing the Collect Action on a Mirror`, () => { it(`should use the Mirror ID as default "referrers" for the ${expectedRequest}`, () => { const mirror = mockMirrorFragment({ mirrorOn: publication, }); const result = createOpenActionRequest( - { publication: mirror }, + { publication: mirror, sponsored: true }, { kind: OpenActionKind.COLLECT }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -285,6 +297,23 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { }); }); }); + + describe(`when executing the specific Open Action in a ${SessionType.JustWallet} session`, () => { + it.only(`should specify the PublicActProxy as the fee spender`, () => { + const result = createOpenActionRequest( + { publication, sponsored: true }, + { kind: OpenActionKind.COLLECT }, + mockWalletOnlySession(), + staging, + ); + + expect(result).toMatchObject({ + fee: { + spender: staging.contracts.publicActProxy, + }, + }); + }); + }); }, ); @@ -312,7 +341,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { it(`should forward the referrers list`, () => { const referrers = [mockPublicationId(), mockProfileId()]; const result = createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.UNKNOWN, address: signlessSettings.contract.address, @@ -320,6 +349,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { referrers, }, mockProfileSession(), + staging, ); expect(result).toMatchObject({ @@ -336,13 +366,14 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { it(`should support signless & sponsored ${expectedRequest}`, () => { const result = createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.UNKNOWN, address: signlessSettings.contract.address, data, }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -362,6 +393,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { const result = createOpenActionRequest( { publication, + sponsored: true, }, { kind: OpenActionKind.UNKNOWN, @@ -369,6 +401,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { data, }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -392,6 +425,7 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { data, }, mockProfileSession({ profile }), + staging, ); expect(result).toMatchObject({ @@ -404,13 +438,14 @@ describe(`Given the ${createOpenActionRequest.name} predicate`, () => { describe(`when executing the specific Open Action in a ${SessionType.JustWallet} session`, () => { it(`should support public ${expectedRequest}`, () => { const result = createOpenActionRequest( - { publication }, + { publication, sponsored: true }, { kind: OpenActionKind.UNKNOWN, address: signlessSettings.contract.address, data, }, mockWalletOnlySession(), + staging, ); expect(result).toMatchObject({ diff --git a/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts b/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts index 89ff76eb86..aeffb8f182 100644 --- a/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts +++ b/packages/react/src/transactions/useOpenAction/createOpenActionRequest.ts @@ -1,6 +1,9 @@ import { AnyPublication, + MultirecipientFeeCollectOpenActionSettings, OpenActionModuleSettings, + ProtocolSharedRevenueCollectOpenActionSettings, + SimpleCollectOpenActionSettings, UnknownOpenActionModuleSettings, erc20Amount, findCollectModuleSettings, @@ -16,6 +19,7 @@ import { import { Data, invariant, never } from '@lens-protocol/shared-kernel'; import { ProfileSession, SessionType, WalletOnlySession } from '../../authentication'; +import { EnvironmentConfig } from '../../environments'; import { CollectParams, OpenActionArgs, @@ -30,10 +34,24 @@ function resolveTargetPublication(publication: AnyPublication) { return publication.__typename === 'Mirror' ? publication.mirrorOn : publication; } +function resolveFeeSpender( + session: ProfileSession | WalletOnlySession, + environment: EnvironmentConfig, + settings: + | MultirecipientFeeCollectOpenActionSettings + | ProtocolSharedRevenueCollectOpenActionSettings + | SimpleCollectOpenActionSettings, +) { + return session.type === SessionType.JustWallet + ? environment.contracts.publicActProxy + : settings.contract.address; +} + function resolveCollectRequestFor( args: RequiredOpenActionArgs, params: CollectParams, session: ProfileSession | WalletOnlySession, + environment: EnvironmentConfig, ): CollectRequest { const collectable = resolveTargetPublication(args.publication); const settings = findCollectModuleSettings(collectable); @@ -66,7 +84,8 @@ function resolveCollectRequestFor( fee: { type: FeeType.COLLECT, amount: erc20Amount(settings.amount), - contractAddress: settings.contract.address, + module: settings.contract.address, + spender: settings.contract.address, }, public: false, signless, @@ -103,7 +122,8 @@ function resolveCollectRequestFor( : { type: FeeType.COLLECT, amount, - contractAddress: settings.contract.address, + module: settings.contract.address, + spender: resolveFeeSpender(session, environment, settings), }, public: session.type === SessionType.JustWallet, signless, @@ -122,7 +142,8 @@ function resolveCollectRequestFor( fee: { type: FeeType.COLLECT, amount: erc20Amount(settings.amount), - contractAddress: settings.contract.address, + module: settings.contract.address, + spender: resolveFeeSpender(session, environment, settings), }, public: session.type === SessionType.JustWallet, signless, @@ -131,6 +152,7 @@ function resolveCollectRequestFor( case 'ProtocolSharedRevenueCollectOpenActionSettings': { const amount = erc20Amount(settings.amount); + const spender = resolveFeeSpender(session, environment, settings); return { kind: TransactionKind.ACT_ON_PUBLICATION, @@ -143,13 +165,15 @@ function resolveCollectRequestFor( ? { type: FeeType.MINT, amount: erc20Amount(settings.mintFee), - contractAddress: settings.contract.address, + module: settings.contract.address, + spender, executorClient: params.executorClient, } : { type: FeeType.COLLECT, amount, - contractAddress: settings.contract.address, + module: settings.contract.address, + spender, }, public: session.type === SessionType.JustWallet, signless, @@ -227,14 +251,15 @@ function resolveUnknownRequestFor( } export function createOpenActionRequest( - { publication, sponsored = true }: OpenActionArgs, + { publication, sponsored }: RequiredOpenActionArgs, params: OpenActionParams, session: ProfileSession | WalletOnlySession, + environment: EnvironmentConfig, ): OpenActionRequest { const args = { publication, sponsored }; switch (params.kind) { case OpenActionKind.COLLECT: - return resolveCollectRequestFor(args, params, session); + return resolveCollectRequestFor(args, params, session, environment); case OpenActionKind.UNKNOWN: return resolveUnknownRequestFor(args, params, session); diff --git a/packages/react/src/transactions/useOpenAction/useOpenAction.ts b/packages/react/src/transactions/useOpenAction/useOpenAction.ts index 10eea4ac31..f5c8a2affb 100644 --- a/packages/react/src/transactions/useOpenAction/useOpenAction.ts +++ b/packages/react/src/transactions/useOpenAction/useOpenAction.ts @@ -13,6 +13,7 @@ import { invariant } from '@lens-protocol/shared-kernel'; import { useSession } from '../../authentication'; import { useDeferredTask, UseDeferredTask } from '../../helpers/tasks'; +import { useSharedDependencies } from '../../shared'; import { AsyncTransactionResult } from '../adapters/AsyncTransactionResult'; import { useOpenActionController } from '../adapters/useOpenActionController'; import { useSponsoredConfig } from '../shared/useSponsoredConfig'; @@ -277,7 +278,8 @@ export function useOpenAction( > { const { data: session } = useSession(); const openAction = useOpenActionController(); - const configureRequest = useSponsoredConfig(); + const { config } = useSharedDependencies(); + const configureSponsorship = useSponsoredConfig(); return useDeferredTask(async ({ publication, sponsored = true }: OpenActionArgs) => { invariant( @@ -289,8 +291,11 @@ export function useOpenAction( 'You cannot execute an Open Action on a Momoka publication.', ); - const request = configureRequest( - createOpenActionRequest({ publication, sponsored }, args.action, session), + const request = createOpenActionRequest( + configureSponsorship({ publication, sponsored }), + args.action, + session, + config.environment, ); return openAction(request); From 5309d2ba78a8acc4e274a3985864c4c57dcb955c Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Mon, 20 May 2024 20:32:37 +0200 Subject: [PATCH 11/12] Simplifies use of config.sponsored --- .../src/transactions/shared/useSponsoredConfig.ts | 10 +++++----- .../src/transactions/useOpenAction/useOpenAction.ts | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/react/src/transactions/shared/useSponsoredConfig.ts b/packages/react/src/transactions/shared/useSponsoredConfig.ts index dc2813fab8..3ccd3a6529 100644 --- a/packages/react/src/transactions/shared/useSponsoredConfig.ts +++ b/packages/react/src/transactions/shared/useSponsoredConfig.ts @@ -1,6 +1,8 @@ +import { ProtocolTransactionRequestModel } from '@lens-protocol/domain/entities'; + import { useSharedDependencies } from '../../shared'; -type SponsoredEnabled = T & { +type SponsoredRequest = T & { sponsored: boolean; }; @@ -13,9 +15,7 @@ export function useSponsoredConfig() { /** * Disables the sponsored flag if RequiredConfig says so */ - return function (request: T): SponsoredEnabled { - return config.sponsored - ? { ...request, sponsored: request.sponsored ?? true } - : { ...request, sponsored: false }; + return function (request: SponsoredRequest) { + return config.sponsored ? request : { ...request, sponsored: false }; }; } diff --git a/packages/react/src/transactions/useOpenAction/useOpenAction.ts b/packages/react/src/transactions/useOpenAction/useOpenAction.ts index f5c8a2affb..ca6a153319 100644 --- a/packages/react/src/transactions/useOpenAction/useOpenAction.ts +++ b/packages/react/src/transactions/useOpenAction/useOpenAction.ts @@ -16,7 +16,6 @@ import { useDeferredTask, UseDeferredTask } from '../../helpers/tasks'; import { useSharedDependencies } from '../../shared'; import { AsyncTransactionResult } from '../adapters/AsyncTransactionResult'; import { useOpenActionController } from '../adapters/useOpenActionController'; -import { useSponsoredConfig } from '../shared/useSponsoredConfig'; import { createOpenActionRequest } from './createOpenActionRequest'; import { OpenActionArgs, UseOpenActionArgs } from './types'; @@ -279,7 +278,6 @@ export function useOpenAction( const { data: session } = useSession(); const openAction = useOpenActionController(); const { config } = useSharedDependencies(); - const configureSponsorship = useSponsoredConfig(); return useDeferredTask(async ({ publication, sponsored = true }: OpenActionArgs) => { invariant( @@ -292,7 +290,10 @@ export function useOpenAction( ); const request = createOpenActionRequest( - configureSponsorship({ publication, sponsored }), + { + publication, + sponsored: config.sponsored ? sponsored : true, + }, args.action, session, config.environment, From 9ffcc6decc7b258335ca5331abf8389488b5ebfa Mon Sep 17 00:00:00 2001 From: Cesare Naldi Date: Tue, 21 May 2024 11:51:53 +0200 Subject: [PATCH 12/12] Fix OpenActionGateway tests --- packages/react/src/transactions/adapters/OpenActionGateway.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react/src/transactions/adapters/OpenActionGateway.ts b/packages/react/src/transactions/adapters/OpenActionGateway.ts index 670937fec2..dbe7640e7d 100644 --- a/packages/react/src/transactions/adapters/OpenActionGateway.ts +++ b/packages/react/src/transactions/adapters/OpenActionGateway.ts @@ -208,7 +208,8 @@ export class OpenActionGateway for: request.publicationId, actOn: { protocolSharedRevenueCollectOpenAction: { - executorClient: request.fee.type === FeeType.MINT ? request.fee.executorClient : null, + executorClient: + request.fee.type === FeeType.MINT ? request.fee.executorClient ?? null : null, }, }, referrers: resolveOnchainReferrers(request.referrers),