From 702e8f2792fc7200b77a6c3f2b4a64aec087f8b7 Mon Sep 17 00:00:00 2001 From: MeatDeveloper Date: Fri, 8 Dec 2023 11:53:14 -0300 Subject: [PATCH] fix: build --- .../integration/aave/opengraph-image.tsx | 9 - app/(general)/integration/aave/page.tsx | 79 - .../integration/aave/twitter-image.tsx | 9 - .../integration/arweave/account/edit/page.tsx | 7 - .../integration/arweave/account/page.tsx | 7 - app/(general)/integration/arweave/layout.tsx | 64 - .../integration/arweave/opengraph-image.tsx | 9 - app/(general)/integration/arweave/page.tsx | 7 - .../integration/arweave/posts/[txId]/page.tsx | 10 - .../integration/arweave/posts/new/page.tsx | 7 - .../integration/arweave/posts/page.tsx | 7 - .../integration/arweave/settings/page.tsx | 7 - app/(general)/integration/arweave/sidebar.tsx | 67 - .../integration/arweave/twitter-image.tsx | 9 - .../integration/connext/opengraph-image.tsx | 9 - app/(general)/integration/connext/page.tsx | 69 - .../integration/connext/twitter-image.tsx | 9 - .../defi-llama/opengraph-image.tsx | 9 - app/(general)/integration/defi-llama/page.tsx | 62 - .../integration/defi-llama/twitter-image.tsx | 9 - .../integration/disco/opengraph-image.tsx | 9 - app/(general)/integration/disco/page.tsx | 130 - .../integration/disco/twitter-image.tsx | 9 - .../integration/erc1155/opengraph-image.tsx | 9 - app/(general)/integration/erc1155/page.tsx | 86 - .../integration/erc1155/twitter-image.tsx | 9 - .../erc20/[chainId]/[address]/page.tsx | 24 - .../integration/erc20/opengraph-image.tsx | 9 - app/(general)/integration/erc20/page.tsx | 95 - .../integration/erc20/twitter-image.tsx | 9 - .../integration/erc721/opengraph-image.tsx | 9 - app/(general)/integration/erc721/page.tsx | 80 - .../integration/erc721/twitter-image.tsx | 9 - .../integration/etherscan/opengraph-image.tsx | 9 - app/(general)/integration/etherscan/page.tsx | 93 - .../integration/etherscan/twitter-image.tsx | 9 - .../integration/gelato/opengraph-image.tsx | 9 - app/(general)/integration/gelato/page.tsx | 79 - .../integration/gelato/tasks/[id]/page.tsx | 11 - .../integration/gelato/tasks/create/page.tsx | 24 - .../integration/gelato/tasks/page.tsx | 5 - .../integration/gelato/twitter-image.tsx | 9 - .../gitcoin-passport/dev-guide/page.tsx | 108 - .../integration/gitcoin-passport/layout.tsx | 60 - .../gitcoin-passport/opengraph-image.tsx | 9 - .../integration/gitcoin-passport/page.tsx | 22 - .../gitcoin-passport/score-gated/page.tsx | 46 - .../integration/gitcoin-passport/sidebar.tsx | 50 - .../gitcoin-passport/stamp-gated/page.tsx | 59 - .../gitcoin-passport/twitter-image.tsx | 9 - .../lens-protocol/explore/page.tsx | 13 - .../integration/lens-protocol/layout.tsx | 75 - .../lens-protocol/opengraph-image.tsx | 9 - .../integration/lens-protocol/page.tsx | 5 - .../lens-protocol/profiles/[handle]/page.tsx | 11 - .../profiles/address/[address]/page.tsx | 11 - .../lens-protocol/profiles/page.tsx | 7 - .../lens-protocol/publications/[id]/page.tsx | 13 - .../integration/lens-protocol/search/page.tsx | 17 - .../lens-protocol/twitter-image.tsx | 9 - .../lit-protocol/opengraph-image.tsx | 9 - .../integration/lit-protocol/page.tsx | 86 - .../lit-protocol/twitter-image.tsx | 9 - app/(general)/integration/livepeer/layout.tsx | 83 - .../livepeer/livestream/[streamId]/page.tsx | 74 - .../livepeer/livestream/new/browser/page.tsx | 5 - .../livepeer/livestream/new/obs/page.tsx | 5 - .../livepeer/livestream/new/page.tsx | 5 - .../integration/livepeer/livestream/page.tsx | 50 - .../livepeer/livestream/watch/page.tsx | 5 - .../integration/livepeer/opengraph-image.tsx | 9 - app/(general)/integration/livepeer/page.tsx | 5 - .../integration/livepeer/twitter-image.tsx | 9 - .../livepeer/vod/[playbackId]/page.tsx | 73 - .../integration/livepeer/vod/new/page.tsx | 5 - .../integration/livepeer/vod/page.tsx | 39 - .../integration/livepeer/vod/watch/page.tsx | 5 - .../moralis/api/events/[method]/route.ts | 1 - .../moralis/api/transaction/[method]/route.ts | 1 - .../integration/moralis/opengraph-image.tsx | 9 - app/(general)/integration/moralis/page.tsx | 95 - .../integration/moralis/twitter-image.tsx | 9 - .../integration/openai/opengraph-image.tsx | 9 - app/(general)/integration/openai/page.tsx | 50 - .../integration/openai/twitter-image.tsx | 9 - .../pooltogether-v4/opengraph-image.tsx | 9 - .../integration/pooltogether-v4/page.tsx | 79 - .../pooltogether-v4/twitter-image.tsx | 9 - .../push-protocol/opengraph-image.tsx | 9 - .../integration/push-protocol/page.tsx | 164 - .../push-protocol/twitter-image.tsx | 9 - .../session-keys/opengraph-image.tsx | 9 - .../integration/session-keys/page.tsx | 72 - .../session-keys/twitter-image.tsx | 9 - .../sign-in-with-ethereum/opengraph-image.tsx | 9 - .../sign-in-with-ethereum/page.tsx | 66 - .../sign-in-with-ethereum/twitter-image.tsx | 9 - .../starter/api/hello-world/route.ts | 5 - .../integration/starter/layout-optional.tsx | 50 - .../integration/starter/opengraph-image.tsx | 9 - app/(general)/integration/starter/page.tsx | 92 - .../integration/starter/twitter-image.tsx | 9 - app/(general)/page.tsx | 6 +- app/layout.tsx | 2 - components/app/app-users-table.tsx | 61 - .../blockchain/handle-wallet-events.tsx | 2 - components/blockchain/render-name.tsx | 10 +- components/layout/main-nav.tsx | 7 +- components/layout/mobile-nav.tsx | 9 +- components/layout/page-header.tsx | 2 +- components/shared/example-demos.tsx | 616 --- .../ui/social/og-image-integrations.tsx | 37 +- config/site.ts | 2 +- data/turbo-integrations.ts | 221 - integrations/aave/README.md | 89 - integrations/aave/abis/pool-abi.ts | 1715 -------- .../aave/abis/ui-pool-data-provider-abi.ts | 358 -- .../aave/components/asset-to-borrow-item.tsx | 244 -- .../aave/components/asset-to-supply-item.tsx | 272 -- .../aave/components/borrowed-assets-item.tsx | 393 -- integrations/aave/components/general-info.tsx | 92 - .../aave/components/health-factor.tsx | 16 - .../aave/components/list-assets-to-borrow.tsx | 70 - .../aave/components/list-assets-to-supply.tsx | 72 - .../aave/components/list-borrowed-assets.tsx | 133 - .../aave/components/list-supplied-assets.tsx | 109 - integrations/aave/components/spinner.tsx | 14 - .../aave/components/supplied-assets-item.tsx | 256 -- integrations/aave/generated/aave-wagmi.ts | 3631 ----------------- integrations/aave/hooks/use-aave.ts | 149 - integrations/aave/utils/index.ts | 28 - integrations/aave/utils/market-config.ts | 269 -- integrations/aave/utils/types.ts | 92 - integrations/aave/wagmi.config.ts | 20 - integrations/arweave/README.md | 62 - integrations/arweave/arweave-account.ts | 76 - .../arweave-account/form/controls.ts | 80 - .../components/arweave-account/form/hook.ts | 112 - .../components/arweave-account/form/index.tsx | 123 - .../components/arweave-account/index.tsx | 197 - .../arweave-account/sidebar-preview.tsx | 53 - .../components/connect-arweave-wallet.tsx | 81 - .../arweave/components/fee-estimation.tsx | 28 - .../arweave/components/form-new-post/hook.ts | 138 - .../components/form-new-post/index.tsx | 196 - .../components/form-new-post/list-tags.tsx | 69 - .../components/insufficient-balance-error.tsx | 22 - .../arweave/components/list-posts.tsx | 209 - .../arweave/components/pending-tx.tsx | 77 - integrations/arweave/components/post.tsx | 241 -- integrations/arweave/components/settings.tsx | 20 - integrations/arweave/components/spinner.tsx | 26 - .../arweave/context/arweave-wallet.tsx | 235 -- .../arweave/hooks/use-arweave-wallet.ts | 9 - .../arweave/hooks/use-estimate-tx-fee.ts | 36 - integrations/arweave/hooks/use-get-posts.ts | 72 - integrations/arweave/index.ts | 130 - integrations/arweave/queries/query-post.ts | 48 - integrations/arweave/queries/query-posts.ts | 84 - .../arweave/utils/get-element-component.ts | 13 - integrations/arweave/utils/index.ts | 44 - integrations/arweave/utils/types.ts | 38 - integrations/connext/README.md | 363 -- .../connext/api/approve-if-needed.tsx | 70 - integrations/connext/api/estimated-amount.tsx | 76 - .../connext/api/estimated-relayer-fee.tsx | 49 - integrations/connext/api/latest-transfers.tsx | 34 - integrations/connext/api/xcall.tsx | 109 - integrations/connext/client.ts | 70 - .../components/form-connext-xtransfer.tsx | 666 --- .../connext/components/latest-transfers.tsx | 74 - integrations/connext/components/spinner.tsx | 14 - integrations/connext/components/transfer.tsx | 203 - .../connext/hooks/use-approve-if-needed.ts | 54 - .../connext/hooks/use-estimated-amount.ts | 65 - .../hooks/use-estimated-relayer-fee.ts | 42 - .../connext/hooks/use-latest-transfers.ts | 36 - .../connext/hooks/use-supported-transfer.ts | 26 - integrations/connext/hooks/use-xcall.ts | 77 - integrations/connext/utils/assets/index.ts | 2 - integrations/connext/utils/assets/mainnet.ts | 347 -- integrations/connext/utils/assets/testnet.ts | 154 - integrations/connext/utils/chains/index.ts | 2 - integrations/connext/utils/chains/mainnet.ts | 208 - integrations/connext/utils/chains/testnet.ts | 163 - integrations/connext/utils/constants.ts | 4 - integrations/connext/utils/index.ts | 60 - integrations/connext/utils/types.ts | 53 - integrations/disco/README.md | 71 - .../disco/api/credentials-from-did.ts | 31 - integrations/disco/api/issue-proof-of-hack.ts | 64 - .../disco/api/profile-from-address.ts | 24 - integrations/disco/api/profile-from-did.ts | 31 - integrations/disco/assets/disco-dark.svg | 1 - .../disco/components/disco-profile-basic.tsx | 108 - .../components/disco-profile-credentials.tsx | 84 - .../form-issue-proof-of-hack/controls.ts | 58 - .../form-issue-proof-of-hack/hook.ts | 78 - .../form-issue-proof-of-hack/index.tsx | 125 - integrations/disco/disco-client.ts | 14 - .../use-disco-get-credentials-from-did.ts | 9 - .../use-disco-get-profile-from-address.ts | 13 - .../hooks/use-disco-get-profile-from-did.ts | 9 - .../hooks/use-disco-issue-proof-of-hack.ts | 12 - .../routes/get-credentials-from-did/client.ts | 18 - .../routes/get-credentials-from-did/index.ts | 13 - .../routes/get-profile-from-address/client.ts | 20 - .../routes/get-profile-from-address/index.ts | 17 - .../routes/get-profile-from-did/client.ts | 20 - .../routes/get-profile-from-did/index.ts | 8 - .../routes/issue-proof-of-hack/client.ts | 24 - .../disco/routes/issue-proof-of-hack/index.ts | 23 - integrations/disco/utils/constants.ts | 4 - .../disco/utils/get-element-component.ts | 13 - integrations/disco/utils/types.ts | 163 - integrations/etherscan/README.md | 85 - .../etherscan-account-transactions/client.ts | 17 - .../etherscan-account-transactions/index.ts | 42 - .../etherscan/api/account/transactions.ts | 46 - .../components/transactions-table.tsx | 83 - integrations/etherscan/etherscan.d.ts | 8 - .../use-etherscan-account-transactions.ts | 16 - integrations/etherscan/utils/constants.ts | 115 - .../etherscan/utils/get-chain-id-api-key.ts | 11 - .../etherscan/utils/get-chain-id-api-url.ts | 11 - .../etherscan/utils/get-etherscan-client.ts | 27 - .../etherscan/utils/handle-error-types.ts | 7 - .../utils/handle-etherscan-response.ts | 10 - .../etherscan/utils/is-client-connected.ts | 13 - .../etherscan/utils/is-valid-address.ts | 5 - .../etherscan/utils/is-valid-api-service.ts | 8 - .../utils/is-valid-chain-id-mapping.ts | 8 - .../utils/is-valid-transaction-hash.ts | 5 - .../etherscan/utils/query-etherscan-client.ts | 20 - integrations/etherscan/utils/types.ts | 35 - integrations/gelato/README.md | 140 - .../gelato/components/active-task-preview.tsx | 71 - .../gelato/components/active-tasks.tsx | 86 - .../components/create-task/contract-input.tsx | 139 - .../components/create-task/create-task.tsx | 248 -- .../create-task/execution-values.tsx | 120 - .../components/create-task/function-input.tsx | 91 - .../create-task/hooks/use-wizard.ts | 113 - .../gelato/components/create-task/index.ts | 1 - .../components/create-task/interval-input.tsx | 207 - .../components/create-task/payment-input.tsx | 72 - .../components/create-task/resolver-input.tsx | 45 - .../create-task/restriction-info.tsx | 53 - .../create-task/task-name-input.tsx | 22 - .../components/errors/validation-error.tsx | 5 - integrations/gelato/components/index.tsx | 4 - .../gelato/components/rename-task.tsx | 78 - .../task-view/executing-address.tsx | 44 - .../components/task-view/function-data.tsx | 42 - .../gelato/components/task-view/index.ts | 1 - .../components/task-view/input-values.tsx | 24 - .../components/task-view/interval-values.tsx | 55 - .../components/task-view/payment-info.tsx | 19 - .../components/task-view/resolver-values.tsx | 53 - .../gelato/components/task-view/task-view.tsx | 242 -- integrations/gelato/graphql/codegen.ts | 21 - .../gelato/graphql/graphql/generated/gql.ts | 45 - .../graphql/graphql/generated/graphql.ts | 1615 -------- .../gelato/graphql/graphql/generated/index.ts | 1 - integrations/gelato/graphql/tasks.graphql | 69 - integrations/gelato/hooks/index.ts | 8 - integrations/gelato/hooks/use-abi.ts | 45 - integrations/gelato/hooks/use-active-tasks.ts | 52 - integrations/gelato/hooks/use-automate-sdk.ts | 19 - integrations/gelato/hooks/use-cancel-task.ts | 15 - .../gelato/hooks/use-is-automate-supported.ts | 8 - integrations/gelato/hooks/use-msg-sender.ts | 16 - integrations/gelato/hooks/use-new-task.ts | 16 - integrations/gelato/hooks/use-rename-task.ts | 14 - .../gelato/hooks/use-task-resolver.ts | 23 - integrations/gelato/hooks/use-task.ts | 49 - integrations/gelato/index.ts | 2 - integrations/gelato/utils/constants.ts | 123 - integrations/gelato/utils/helpers.ts | 188 - integrations/gelato/utils/resolverDecoder.ts | 49 - integrations/gelato/utils/types.ts | 65 - integrations/gitcoin-passport/README.md | 62 - .../gitcoin-passport/api/address-score.ts | 36 - .../gitcoin-passport/api/address-stamps.ts | 26 - .../gitcoin-passport/api/signing-message.ts | 20 - .../gitcoin-passport/api/stamps-metadata.ts | 20 - .../gitcoin-passport/api/submit-passport.ts | 48 - .../components/list-stamps.tsx | 148 - .../components/score-gate.tsx | 49 - .../components/stamp-card.tsx | 210 - .../components/stamp-gate.tsx | 50 - .../components/submit-passport-button.tsx | 34 - .../hooks/use-get-address-stamps.ts | 48 - .../gitcoin-passport/hooks/use-get-score.ts | 39 - .../hooks/use-get-stamps-metadata.ts | 29 - .../hooks/use-submit-passport.ts | 89 - .../gitcoin-passport/utils/constants.ts | 3 - integrations/gitcoin-passport/utils/types.ts | 57 - integrations/lens-protocol/README.md | 74 - .../components/auth/is-user-authenticated.tsx | 17 - .../components/auth/login-button.tsx | 44 - .../components/auth/logout-button.tsx | 18 - .../components/auth/not-authenticated-yet.tsx | 8 - .../lens-protocol/components/feed.tsx | 41 - .../components/load-more-button.tsx | 18 - .../lens-protocol/components/navbar.tsx | 116 - .../components/profile/address-profiles.tsx | 35 - .../components/profile/explore-profiles.tsx | 44 - .../profile/follow-unfollow-button.tsx | 117 - .../components/profile/owned-profiles.tsx | 146 - .../components/profile/profile-card.tsx | 86 - .../components/profile/profile-list-modal.tsx | 105 - .../profile/profile-publications.tsx | 69 - .../components/profile/profile-revenue.tsx | 36 - .../components/profile/profile-stats.tsx | 68 - .../components/profile/profile.tsx | 191 - .../components/profile/search-profiles.tsx | 44 - .../publications/actions/button.tsx | 50 - .../publications/actions/comment.tsx | 30 - .../components/publications/actions/index.tsx | 6 - .../components/publications/actions/like.tsx | 96 - .../publications/actions/mirror.tsx | 98 - .../components/publications/commnets.tsx | 46 - .../publications/explore-publications.tsx | 40 - .../publication-actions-and-stats.tsx | 25 - .../publications/publication-card.tsx | 243 -- .../publications/publication-revenue.tsx | 29 - .../components/publications/publication.tsx | 115 - .../publications/search-publications.tsx | 32 - .../components/publications/stats/index.tsx | 69 - .../components/publications/stats/stat.tsx | 33 - .../lens-protocol/hooks/use-create-profile.ts | 23 - integrations/lens-protocol/lens-provider.ts | 7 - integrations/lens-protocol/utils/index.ts | 14 - integrations/lit-protocol/README.md | 58 - integrations/lit-protocol/api/[id].ts | 32 - integrations/lit-protocol/api/encrypt.ts | 58 - integrations/lit-protocol/client.ts | 10 - .../access-control-single-address.tsx | 76 - .../access-control-single-erc721.tsx | 135 - .../access-control-token-group.tsx | 228 -- .../components/access-control/index.ts | 9 - .../components/access-control/types.ts | 8 - .../components/form-lit-decrypt-message.tsx | 147 - .../components/form-lit-encrypt-message.tsx | 258 -- .../lit-protocol/hooks/use-lit-client.ts | 170 - integrations/lit-protocol/utils/config.ts | 25 - integrations/lit-protocol/utils/data-types.ts | 15 - integrations/lit-protocol/utils/types.ts | 18 - integrations/livepeer/README.md | 103 - .../livepeer/assets/default_poster.png | Bin 7345 -> 0 bytes .../livepeer/components/button-share.tsx | 58 - .../livepeer/components/create-stream.tsx | 246 -- .../components/dialog-stop-stream.tsx | 41 - .../components/form-livepeer-api-key.tsx | 131 - .../components/form-livepeer-asset.tsx | 44 - .../components/form-livepeer-stream.tsx | 50 - integrations/livepeer/components/player.tsx | 67 - integrations/livepeer/components/spinner.tsx | 23 - .../livepeer/components/upload-file.tsx | 135 - .../hooks/use-check-livepeer-api-key.ts | 59 - .../livepeer/hooks/use-livepeer-api-key.ts | 18 - integrations/livepeer/livepeer-client.ts | 9 - integrations/livepeer/livepeer-provider.tsx | 38 - integrations/moralis/README.md | 96 - integrations/moralis/api/events.ts | 64 - integrations/moralis/api/transaction.ts | 63 - integrations/moralis/client/index.ts | 20 - .../events/form-get-contract-events.tsx | 115 - .../events/form-get-contract-logs.tsx | 81 - .../moralis/components/events/index.ts | 2 - .../moralis/components/output-data.tsx | 46 - .../moralis/components/starter-header.tsx | 10 - .../form-get-internal-transactions.tsx | 80 - .../form-get-transaction-verbose.tsx | 84 - .../transaction/form-get-transaction.tsx | 82 - .../form-get-wallet-transactions-verbose.tsx | 82 - .../form-get-wallet-transactions.tsx | 83 - .../moralis/components/transaction/index.ts | 5 - integrations/moralis/hooks/events/index.ts | 2 - .../hooks/events/use-get-contract-events.ts | 84 - .../hooks/events/use-get-contract-logs.ts | 73 - .../moralis/hooks/transaction/index.ts | 5 - .../use-get-internal-transactions.ts | 53 - .../use-get-transaction-verbose.ts | 53 - .../hooks/transaction/use-get-transaction.ts | 53 - .../use-get-wallet-transactions-verbose.ts | 53 - .../use-get-wallet-transactions.ts | 53 - integrations/moralis/utils/types.ts | 48 - integrations/openai/README.md | 51 - integrations/openai/api/ask.ts | 27 - .../openai/components/form-openai-prompt.tsx | 125 - .../openai/hooks/use-openai-prompt.ts | 58 - integrations/openai/openai-stream.ts | 102 - integrations/openai/utils/types.ts | 59 - integrations/pooltogether-v4/README.md | 59 - .../abis/yield-source-prize-pool-abi.ts | 844 ---- .../abis/yield-source-prize-pool-bytecode.ts | 2 - .../form-yield-source-prize-pool-deposit.tsx | 216 - .../form-yield-source-prize-pool-withdraw.tsx | 149 - .../generated/pooltogether-v4-wagmi.ts | 1385 ------- .../hooks/use-load-contract-from-chain-id.ts | 10 - .../pooltogether-v4/hooks/use-user-balance.ts | 23 - .../pooltogether-v4/utils/constants.ts | 1 - .../utils/prize-pool-contract-list.ts | 5 - .../utils/ticket-contract-list.ts | 5 - .../utils/usdc-contract-list.ts | 5 - integrations/pooltogether-v4/wagmi.config.ts | 16 - integrations/push-protocol/README.md | 114 - .../push-protocol/components/channel-card.tsx | 106 - .../components/channel-search.tsx | 80 - .../push-protocol/components/chat.tsx | 5 - .../push-protocol/components/index.ts | 8 - .../push-protocol/components/loadable.tsx | 12 - .../components/notification-bell.tsx | 70 - .../components/notification-feed.tsx | 127 - .../components/notification-item.tsx | 45 - .../components/subscribe-button.tsx | 111 - integrations/push-protocol/hooks/index.ts | 9 - .../push-protocol/hooks/use-channel.ts | 44 - integrations/push-protocol/hooks/use-chats.ts | 26 - .../push-protocol/hooks/use-create-user.ts | 13 - .../push-protocol/hooks/use-notifications.ts | 32 - .../hooks/use-search-channels.ts | 30 - .../hooks/use-send-notifications.ts | 12 - .../hooks/use-subscribe-channel.ts | 13 - .../hooks/use-unsubscribe-channel.ts | 13 - .../hooks/use-user-subscriptions.ts | 24 - integrations/push-protocol/index.ts | 5 - integrations/push-protocol/utils/constants.ts | 1 - integrations/push-protocol/utils/helpers.ts | 36 - integrations/push-protocol/utils/types.ts | 41 - integrations/session-keys/README.md | 56 - .../components/create-session-key.tsx | 20 - .../components/delete-all-session-keys.tsx | 19 - .../components/delete-session-key.tsx | 35 - .../components/list-session-keys.tsx | 82 - integrations/session-keys/database.ts | 28 - .../session-keys/hooks/use-session-keys.ts | 149 - integrations/siwe/README.md | 59 - integrations/siwe/actions/siwe-login.ts | 37 - integrations/siwe/actions/siwe-logout.ts | 13 - integrations/siwe/actions/siwe-message.ts | 53 - integrations/siwe/api/index.ts | 9 - integrations/siwe/api/logout.ts | 10 - integrations/siwe/api/nonce.ts | 19 - integrations/siwe/api/verify.ts | 62 - .../siwe/components/button-siwe-login.tsx | 57 - .../siwe/components/button-siwe-logout.tsx | 36 - integrations/siwe/components/is-signed-in.tsx | 17 - .../siwe/components/is-signed-out.tsx | 17 - integrations/starter/README.md | 62 - integrations/starter/abis/starter-abi.ts | 285 -- integrations/starter/client/index.ts | 7 - .../starter/components/starter-header.tsx | 10 - .../starter/generated/starter-wagmi.ts | 381 -- integrations/starter/hooks/use-starter.ts | 9 - integrations/starter/index.ts | 1 - integrations/starter/utils/types.ts | 6 - integrations/starter/wagmi.config.ts | 15 - lib/app/get-app-users.ts | 19 - lib/fonts.ts | 11 - lib/hooks/app/use-get-app-users.ts | 9 - lib/prisma.ts | 3 - lib/session.ts | 29 - next.config.mjs | 3 + prisma/schema.prisma | 26 - 467 files changed, 20 insertions(+), 36205 deletions(-) delete mode 100644 app/(general)/integration/aave/opengraph-image.tsx delete mode 100644 app/(general)/integration/aave/page.tsx delete mode 100644 app/(general)/integration/aave/twitter-image.tsx delete mode 100644 app/(general)/integration/arweave/account/edit/page.tsx delete mode 100644 app/(general)/integration/arweave/account/page.tsx delete mode 100644 app/(general)/integration/arweave/layout.tsx delete mode 100644 app/(general)/integration/arweave/opengraph-image.tsx delete mode 100644 app/(general)/integration/arweave/page.tsx delete mode 100644 app/(general)/integration/arweave/posts/[txId]/page.tsx delete mode 100644 app/(general)/integration/arweave/posts/new/page.tsx delete mode 100644 app/(general)/integration/arweave/posts/page.tsx delete mode 100644 app/(general)/integration/arweave/settings/page.tsx delete mode 100644 app/(general)/integration/arweave/sidebar.tsx delete mode 100644 app/(general)/integration/arweave/twitter-image.tsx delete mode 100644 app/(general)/integration/connext/opengraph-image.tsx delete mode 100644 app/(general)/integration/connext/page.tsx delete mode 100644 app/(general)/integration/connext/twitter-image.tsx delete mode 100644 app/(general)/integration/defi-llama/opengraph-image.tsx delete mode 100644 app/(general)/integration/defi-llama/page.tsx delete mode 100644 app/(general)/integration/defi-llama/twitter-image.tsx delete mode 100644 app/(general)/integration/disco/opengraph-image.tsx delete mode 100644 app/(general)/integration/disco/page.tsx delete mode 100644 app/(general)/integration/disco/twitter-image.tsx delete mode 100644 app/(general)/integration/erc1155/opengraph-image.tsx delete mode 100644 app/(general)/integration/erc1155/page.tsx delete mode 100644 app/(general)/integration/erc1155/twitter-image.tsx delete mode 100644 app/(general)/integration/erc20/[chainId]/[address]/page.tsx delete mode 100644 app/(general)/integration/erc20/opengraph-image.tsx delete mode 100644 app/(general)/integration/erc20/page.tsx delete mode 100644 app/(general)/integration/erc20/twitter-image.tsx delete mode 100644 app/(general)/integration/erc721/opengraph-image.tsx delete mode 100644 app/(general)/integration/erc721/page.tsx delete mode 100644 app/(general)/integration/erc721/twitter-image.tsx delete mode 100644 app/(general)/integration/etherscan/opengraph-image.tsx delete mode 100644 app/(general)/integration/etherscan/page.tsx delete mode 100644 app/(general)/integration/etherscan/twitter-image.tsx delete mode 100644 app/(general)/integration/gelato/opengraph-image.tsx delete mode 100644 app/(general)/integration/gelato/page.tsx delete mode 100644 app/(general)/integration/gelato/tasks/[id]/page.tsx delete mode 100644 app/(general)/integration/gelato/tasks/create/page.tsx delete mode 100644 app/(general)/integration/gelato/tasks/page.tsx delete mode 100644 app/(general)/integration/gelato/twitter-image.tsx delete mode 100644 app/(general)/integration/gitcoin-passport/dev-guide/page.tsx delete mode 100644 app/(general)/integration/gitcoin-passport/layout.tsx delete mode 100644 app/(general)/integration/gitcoin-passport/opengraph-image.tsx delete mode 100644 app/(general)/integration/gitcoin-passport/page.tsx delete mode 100644 app/(general)/integration/gitcoin-passport/score-gated/page.tsx delete mode 100644 app/(general)/integration/gitcoin-passport/sidebar.tsx delete mode 100644 app/(general)/integration/gitcoin-passport/stamp-gated/page.tsx delete mode 100644 app/(general)/integration/gitcoin-passport/twitter-image.tsx delete mode 100644 app/(general)/integration/lens-protocol/explore/page.tsx delete mode 100644 app/(general)/integration/lens-protocol/layout.tsx delete mode 100644 app/(general)/integration/lens-protocol/opengraph-image.tsx delete mode 100644 app/(general)/integration/lens-protocol/page.tsx delete mode 100644 app/(general)/integration/lens-protocol/profiles/[handle]/page.tsx delete mode 100644 app/(general)/integration/lens-protocol/profiles/address/[address]/page.tsx delete mode 100644 app/(general)/integration/lens-protocol/profiles/page.tsx delete mode 100644 app/(general)/integration/lens-protocol/publications/[id]/page.tsx delete mode 100644 app/(general)/integration/lens-protocol/search/page.tsx delete mode 100644 app/(general)/integration/lens-protocol/twitter-image.tsx delete mode 100644 app/(general)/integration/lit-protocol/opengraph-image.tsx delete mode 100644 app/(general)/integration/lit-protocol/page.tsx delete mode 100644 app/(general)/integration/lit-protocol/twitter-image.tsx delete mode 100644 app/(general)/integration/livepeer/layout.tsx delete mode 100644 app/(general)/integration/livepeer/livestream/[streamId]/page.tsx delete mode 100644 app/(general)/integration/livepeer/livestream/new/browser/page.tsx delete mode 100644 app/(general)/integration/livepeer/livestream/new/obs/page.tsx delete mode 100644 app/(general)/integration/livepeer/livestream/new/page.tsx delete mode 100644 app/(general)/integration/livepeer/livestream/page.tsx delete mode 100644 app/(general)/integration/livepeer/livestream/watch/page.tsx delete mode 100644 app/(general)/integration/livepeer/opengraph-image.tsx delete mode 100644 app/(general)/integration/livepeer/page.tsx delete mode 100644 app/(general)/integration/livepeer/twitter-image.tsx delete mode 100644 app/(general)/integration/livepeer/vod/[playbackId]/page.tsx delete mode 100644 app/(general)/integration/livepeer/vod/new/page.tsx delete mode 100644 app/(general)/integration/livepeer/vod/page.tsx delete mode 100644 app/(general)/integration/livepeer/vod/watch/page.tsx delete mode 100644 app/(general)/integration/moralis/api/events/[method]/route.ts delete mode 100644 app/(general)/integration/moralis/api/transaction/[method]/route.ts delete mode 100644 app/(general)/integration/moralis/opengraph-image.tsx delete mode 100644 app/(general)/integration/moralis/page.tsx delete mode 100644 app/(general)/integration/moralis/twitter-image.tsx delete mode 100644 app/(general)/integration/openai/opengraph-image.tsx delete mode 100644 app/(general)/integration/openai/page.tsx delete mode 100644 app/(general)/integration/openai/twitter-image.tsx delete mode 100644 app/(general)/integration/pooltogether-v4/opengraph-image.tsx delete mode 100644 app/(general)/integration/pooltogether-v4/page.tsx delete mode 100644 app/(general)/integration/pooltogether-v4/twitter-image.tsx delete mode 100644 app/(general)/integration/push-protocol/opengraph-image.tsx delete mode 100644 app/(general)/integration/push-protocol/page.tsx delete mode 100644 app/(general)/integration/push-protocol/twitter-image.tsx delete mode 100644 app/(general)/integration/session-keys/opengraph-image.tsx delete mode 100644 app/(general)/integration/session-keys/page.tsx delete mode 100644 app/(general)/integration/session-keys/twitter-image.tsx delete mode 100644 app/(general)/integration/sign-in-with-ethereum/opengraph-image.tsx delete mode 100644 app/(general)/integration/sign-in-with-ethereum/page.tsx delete mode 100644 app/(general)/integration/sign-in-with-ethereum/twitter-image.tsx delete mode 100644 app/(general)/integration/starter/api/hello-world/route.ts delete mode 100644 app/(general)/integration/starter/layout-optional.tsx delete mode 100644 app/(general)/integration/starter/opengraph-image.tsx delete mode 100644 app/(general)/integration/starter/page.tsx delete mode 100644 app/(general)/integration/starter/twitter-image.tsx delete mode 100644 components/app/app-users-table.tsx delete mode 100644 components/shared/example-demos.tsx delete mode 100644 data/turbo-integrations.ts delete mode 100644 integrations/aave/README.md delete mode 100644 integrations/aave/abis/pool-abi.ts delete mode 100644 integrations/aave/abis/ui-pool-data-provider-abi.ts delete mode 100644 integrations/aave/components/asset-to-borrow-item.tsx delete mode 100644 integrations/aave/components/asset-to-supply-item.tsx delete mode 100644 integrations/aave/components/borrowed-assets-item.tsx delete mode 100644 integrations/aave/components/general-info.tsx delete mode 100644 integrations/aave/components/health-factor.tsx delete mode 100644 integrations/aave/components/list-assets-to-borrow.tsx delete mode 100644 integrations/aave/components/list-assets-to-supply.tsx delete mode 100644 integrations/aave/components/list-borrowed-assets.tsx delete mode 100644 integrations/aave/components/list-supplied-assets.tsx delete mode 100644 integrations/aave/components/spinner.tsx delete mode 100644 integrations/aave/components/supplied-assets-item.tsx delete mode 100644 integrations/aave/generated/aave-wagmi.ts delete mode 100644 integrations/aave/hooks/use-aave.ts delete mode 100644 integrations/aave/utils/index.ts delete mode 100644 integrations/aave/utils/market-config.ts delete mode 100644 integrations/aave/utils/types.ts delete mode 100644 integrations/aave/wagmi.config.ts delete mode 100644 integrations/arweave/README.md delete mode 100644 integrations/arweave/arweave-account.ts delete mode 100644 integrations/arweave/components/arweave-account/form/controls.ts delete mode 100644 integrations/arweave/components/arweave-account/form/hook.ts delete mode 100644 integrations/arweave/components/arweave-account/form/index.tsx delete mode 100644 integrations/arweave/components/arweave-account/index.tsx delete mode 100644 integrations/arweave/components/arweave-account/sidebar-preview.tsx delete mode 100644 integrations/arweave/components/connect-arweave-wallet.tsx delete mode 100644 integrations/arweave/components/fee-estimation.tsx delete mode 100644 integrations/arweave/components/form-new-post/hook.ts delete mode 100644 integrations/arweave/components/form-new-post/index.tsx delete mode 100644 integrations/arweave/components/form-new-post/list-tags.tsx delete mode 100644 integrations/arweave/components/insufficient-balance-error.tsx delete mode 100644 integrations/arweave/components/list-posts.tsx delete mode 100644 integrations/arweave/components/pending-tx.tsx delete mode 100644 integrations/arweave/components/post.tsx delete mode 100644 integrations/arweave/components/settings.tsx delete mode 100644 integrations/arweave/components/spinner.tsx delete mode 100644 integrations/arweave/context/arweave-wallet.tsx delete mode 100644 integrations/arweave/hooks/use-arweave-wallet.ts delete mode 100644 integrations/arweave/hooks/use-estimate-tx-fee.ts delete mode 100644 integrations/arweave/hooks/use-get-posts.ts delete mode 100644 integrations/arweave/index.ts delete mode 100644 integrations/arweave/queries/query-post.ts delete mode 100644 integrations/arweave/queries/query-posts.ts delete mode 100644 integrations/arweave/utils/get-element-component.ts delete mode 100644 integrations/arweave/utils/index.ts delete mode 100644 integrations/arweave/utils/types.ts delete mode 100644 integrations/connext/README.md delete mode 100644 integrations/connext/api/approve-if-needed.tsx delete mode 100644 integrations/connext/api/estimated-amount.tsx delete mode 100644 integrations/connext/api/estimated-relayer-fee.tsx delete mode 100644 integrations/connext/api/latest-transfers.tsx delete mode 100644 integrations/connext/api/xcall.tsx delete mode 100644 integrations/connext/client.ts delete mode 100644 integrations/connext/components/form-connext-xtransfer.tsx delete mode 100644 integrations/connext/components/latest-transfers.tsx delete mode 100644 integrations/connext/components/spinner.tsx delete mode 100644 integrations/connext/components/transfer.tsx delete mode 100644 integrations/connext/hooks/use-approve-if-needed.ts delete mode 100644 integrations/connext/hooks/use-estimated-amount.ts delete mode 100644 integrations/connext/hooks/use-estimated-relayer-fee.ts delete mode 100644 integrations/connext/hooks/use-latest-transfers.ts delete mode 100644 integrations/connext/hooks/use-supported-transfer.ts delete mode 100644 integrations/connext/hooks/use-xcall.ts delete mode 100644 integrations/connext/utils/assets/index.ts delete mode 100644 integrations/connext/utils/assets/mainnet.ts delete mode 100644 integrations/connext/utils/assets/testnet.ts delete mode 100644 integrations/connext/utils/chains/index.ts delete mode 100644 integrations/connext/utils/chains/mainnet.ts delete mode 100644 integrations/connext/utils/chains/testnet.ts delete mode 100644 integrations/connext/utils/constants.ts delete mode 100644 integrations/connext/utils/index.ts delete mode 100644 integrations/connext/utils/types.ts delete mode 100644 integrations/disco/README.md delete mode 100644 integrations/disco/api/credentials-from-did.ts delete mode 100644 integrations/disco/api/issue-proof-of-hack.ts delete mode 100644 integrations/disco/api/profile-from-address.ts delete mode 100644 integrations/disco/api/profile-from-did.ts delete mode 100644 integrations/disco/assets/disco-dark.svg delete mode 100644 integrations/disco/components/disco-profile-basic.tsx delete mode 100644 integrations/disco/components/disco-profile-credentials.tsx delete mode 100644 integrations/disco/components/form-issue-proof-of-hack/controls.ts delete mode 100644 integrations/disco/components/form-issue-proof-of-hack/hook.ts delete mode 100644 integrations/disco/components/form-issue-proof-of-hack/index.tsx delete mode 100644 integrations/disco/disco-client.ts delete mode 100644 integrations/disco/hooks/use-disco-get-credentials-from-did.ts delete mode 100644 integrations/disco/hooks/use-disco-get-profile-from-address.ts delete mode 100644 integrations/disco/hooks/use-disco-get-profile-from-did.ts delete mode 100644 integrations/disco/hooks/use-disco-issue-proof-of-hack.ts delete mode 100644 integrations/disco/routes/get-credentials-from-did/client.ts delete mode 100644 integrations/disco/routes/get-credentials-from-did/index.ts delete mode 100644 integrations/disco/routes/get-profile-from-address/client.ts delete mode 100644 integrations/disco/routes/get-profile-from-address/index.ts delete mode 100644 integrations/disco/routes/get-profile-from-did/client.ts delete mode 100644 integrations/disco/routes/get-profile-from-did/index.ts delete mode 100644 integrations/disco/routes/issue-proof-of-hack/client.ts delete mode 100644 integrations/disco/routes/issue-proof-of-hack/index.ts delete mode 100644 integrations/disco/utils/constants.ts delete mode 100644 integrations/disco/utils/get-element-component.ts delete mode 100644 integrations/disco/utils/types.ts delete mode 100644 integrations/etherscan/README.md delete mode 100644 integrations/etherscan/actions/etherscan-account-transactions/client.ts delete mode 100644 integrations/etherscan/actions/etherscan-account-transactions/index.ts delete mode 100644 integrations/etherscan/api/account/transactions.ts delete mode 100644 integrations/etherscan/components/transactions-table.tsx delete mode 100644 integrations/etherscan/etherscan.d.ts delete mode 100644 integrations/etherscan/hooks/use-etherscan-account-transactions.ts delete mode 100644 integrations/etherscan/utils/constants.ts delete mode 100644 integrations/etherscan/utils/get-chain-id-api-key.ts delete mode 100644 integrations/etherscan/utils/get-chain-id-api-url.ts delete mode 100644 integrations/etherscan/utils/get-etherscan-client.ts delete mode 100644 integrations/etherscan/utils/handle-error-types.ts delete mode 100644 integrations/etherscan/utils/handle-etherscan-response.ts delete mode 100644 integrations/etherscan/utils/is-client-connected.ts delete mode 100644 integrations/etherscan/utils/is-valid-address.ts delete mode 100644 integrations/etherscan/utils/is-valid-api-service.ts delete mode 100644 integrations/etherscan/utils/is-valid-chain-id-mapping.ts delete mode 100644 integrations/etherscan/utils/is-valid-transaction-hash.ts delete mode 100644 integrations/etherscan/utils/query-etherscan-client.ts delete mode 100644 integrations/etherscan/utils/types.ts delete mode 100644 integrations/gelato/README.md delete mode 100644 integrations/gelato/components/active-task-preview.tsx delete mode 100644 integrations/gelato/components/active-tasks.tsx delete mode 100644 integrations/gelato/components/create-task/contract-input.tsx delete mode 100644 integrations/gelato/components/create-task/create-task.tsx delete mode 100644 integrations/gelato/components/create-task/execution-values.tsx delete mode 100644 integrations/gelato/components/create-task/function-input.tsx delete mode 100644 integrations/gelato/components/create-task/hooks/use-wizard.ts delete mode 100644 integrations/gelato/components/create-task/index.ts delete mode 100644 integrations/gelato/components/create-task/interval-input.tsx delete mode 100644 integrations/gelato/components/create-task/payment-input.tsx delete mode 100644 integrations/gelato/components/create-task/resolver-input.tsx delete mode 100644 integrations/gelato/components/create-task/restriction-info.tsx delete mode 100644 integrations/gelato/components/create-task/task-name-input.tsx delete mode 100644 integrations/gelato/components/errors/validation-error.tsx delete mode 100644 integrations/gelato/components/index.tsx delete mode 100644 integrations/gelato/components/rename-task.tsx delete mode 100644 integrations/gelato/components/task-view/executing-address.tsx delete mode 100644 integrations/gelato/components/task-view/function-data.tsx delete mode 100644 integrations/gelato/components/task-view/index.ts delete mode 100644 integrations/gelato/components/task-view/input-values.tsx delete mode 100644 integrations/gelato/components/task-view/interval-values.tsx delete mode 100644 integrations/gelato/components/task-view/payment-info.tsx delete mode 100644 integrations/gelato/components/task-view/resolver-values.tsx delete mode 100644 integrations/gelato/components/task-view/task-view.tsx delete mode 100644 integrations/gelato/graphql/codegen.ts delete mode 100644 integrations/gelato/graphql/graphql/generated/gql.ts delete mode 100644 integrations/gelato/graphql/graphql/generated/graphql.ts delete mode 100644 integrations/gelato/graphql/graphql/generated/index.ts delete mode 100644 integrations/gelato/graphql/tasks.graphql delete mode 100644 integrations/gelato/hooks/index.ts delete mode 100644 integrations/gelato/hooks/use-abi.ts delete mode 100644 integrations/gelato/hooks/use-active-tasks.ts delete mode 100644 integrations/gelato/hooks/use-automate-sdk.ts delete mode 100644 integrations/gelato/hooks/use-cancel-task.ts delete mode 100644 integrations/gelato/hooks/use-is-automate-supported.ts delete mode 100644 integrations/gelato/hooks/use-msg-sender.ts delete mode 100644 integrations/gelato/hooks/use-new-task.ts delete mode 100644 integrations/gelato/hooks/use-rename-task.ts delete mode 100644 integrations/gelato/hooks/use-task-resolver.ts delete mode 100644 integrations/gelato/hooks/use-task.ts delete mode 100644 integrations/gelato/index.ts delete mode 100644 integrations/gelato/utils/constants.ts delete mode 100644 integrations/gelato/utils/helpers.ts delete mode 100644 integrations/gelato/utils/resolverDecoder.ts delete mode 100644 integrations/gelato/utils/types.ts delete mode 100644 integrations/gitcoin-passport/README.md delete mode 100644 integrations/gitcoin-passport/api/address-score.ts delete mode 100644 integrations/gitcoin-passport/api/address-stamps.ts delete mode 100644 integrations/gitcoin-passport/api/signing-message.ts delete mode 100644 integrations/gitcoin-passport/api/stamps-metadata.ts delete mode 100644 integrations/gitcoin-passport/api/submit-passport.ts delete mode 100644 integrations/gitcoin-passport/components/list-stamps.tsx delete mode 100644 integrations/gitcoin-passport/components/score-gate.tsx delete mode 100644 integrations/gitcoin-passport/components/stamp-card.tsx delete mode 100644 integrations/gitcoin-passport/components/stamp-gate.tsx delete mode 100644 integrations/gitcoin-passport/components/submit-passport-button.tsx delete mode 100644 integrations/gitcoin-passport/hooks/use-get-address-stamps.ts delete mode 100644 integrations/gitcoin-passport/hooks/use-get-score.ts delete mode 100644 integrations/gitcoin-passport/hooks/use-get-stamps-metadata.ts delete mode 100644 integrations/gitcoin-passport/hooks/use-submit-passport.ts delete mode 100644 integrations/gitcoin-passport/utils/constants.ts delete mode 100644 integrations/gitcoin-passport/utils/types.ts delete mode 100644 integrations/lens-protocol/README.md delete mode 100644 integrations/lens-protocol/components/auth/is-user-authenticated.tsx delete mode 100644 integrations/lens-protocol/components/auth/login-button.tsx delete mode 100644 integrations/lens-protocol/components/auth/logout-button.tsx delete mode 100644 integrations/lens-protocol/components/auth/not-authenticated-yet.tsx delete mode 100644 integrations/lens-protocol/components/feed.tsx delete mode 100644 integrations/lens-protocol/components/load-more-button.tsx delete mode 100644 integrations/lens-protocol/components/navbar.tsx delete mode 100644 integrations/lens-protocol/components/profile/address-profiles.tsx delete mode 100644 integrations/lens-protocol/components/profile/explore-profiles.tsx delete mode 100644 integrations/lens-protocol/components/profile/follow-unfollow-button.tsx delete mode 100644 integrations/lens-protocol/components/profile/owned-profiles.tsx delete mode 100644 integrations/lens-protocol/components/profile/profile-card.tsx delete mode 100644 integrations/lens-protocol/components/profile/profile-list-modal.tsx delete mode 100644 integrations/lens-protocol/components/profile/profile-publications.tsx delete mode 100644 integrations/lens-protocol/components/profile/profile-revenue.tsx delete mode 100644 integrations/lens-protocol/components/profile/profile-stats.tsx delete mode 100644 integrations/lens-protocol/components/profile/profile.tsx delete mode 100644 integrations/lens-protocol/components/profile/search-profiles.tsx delete mode 100644 integrations/lens-protocol/components/publications/actions/button.tsx delete mode 100644 integrations/lens-protocol/components/publications/actions/comment.tsx delete mode 100644 integrations/lens-protocol/components/publications/actions/index.tsx delete mode 100644 integrations/lens-protocol/components/publications/actions/like.tsx delete mode 100644 integrations/lens-protocol/components/publications/actions/mirror.tsx delete mode 100644 integrations/lens-protocol/components/publications/commnets.tsx delete mode 100644 integrations/lens-protocol/components/publications/explore-publications.tsx delete mode 100644 integrations/lens-protocol/components/publications/publication-actions-and-stats.tsx delete mode 100644 integrations/lens-protocol/components/publications/publication-card.tsx delete mode 100644 integrations/lens-protocol/components/publications/publication-revenue.tsx delete mode 100644 integrations/lens-protocol/components/publications/publication.tsx delete mode 100644 integrations/lens-protocol/components/publications/search-publications.tsx delete mode 100644 integrations/lens-protocol/components/publications/stats/index.tsx delete mode 100644 integrations/lens-protocol/components/publications/stats/stat.tsx delete mode 100644 integrations/lens-protocol/hooks/use-create-profile.ts delete mode 100644 integrations/lens-protocol/lens-provider.ts delete mode 100644 integrations/lens-protocol/utils/index.ts delete mode 100644 integrations/lit-protocol/README.md delete mode 100644 integrations/lit-protocol/api/[id].ts delete mode 100644 integrations/lit-protocol/api/encrypt.ts delete mode 100644 integrations/lit-protocol/client.ts delete mode 100644 integrations/lit-protocol/components/access-control/access-control-single-address.tsx delete mode 100644 integrations/lit-protocol/components/access-control/access-control-single-erc721.tsx delete mode 100644 integrations/lit-protocol/components/access-control/access-control-token-group.tsx delete mode 100644 integrations/lit-protocol/components/access-control/index.ts delete mode 100644 integrations/lit-protocol/components/access-control/types.ts delete mode 100644 integrations/lit-protocol/components/form-lit-decrypt-message.tsx delete mode 100644 integrations/lit-protocol/components/form-lit-encrypt-message.tsx delete mode 100644 integrations/lit-protocol/hooks/use-lit-client.ts delete mode 100644 integrations/lit-protocol/utils/config.ts delete mode 100644 integrations/lit-protocol/utils/data-types.ts delete mode 100644 integrations/lit-protocol/utils/types.ts delete mode 100644 integrations/livepeer/README.md delete mode 100644 integrations/livepeer/assets/default_poster.png delete mode 100644 integrations/livepeer/components/button-share.tsx delete mode 100644 integrations/livepeer/components/create-stream.tsx delete mode 100644 integrations/livepeer/components/dialog-stop-stream.tsx delete mode 100644 integrations/livepeer/components/form-livepeer-api-key.tsx delete mode 100644 integrations/livepeer/components/form-livepeer-asset.tsx delete mode 100644 integrations/livepeer/components/form-livepeer-stream.tsx delete mode 100644 integrations/livepeer/components/player.tsx delete mode 100644 integrations/livepeer/components/spinner.tsx delete mode 100644 integrations/livepeer/components/upload-file.tsx delete mode 100644 integrations/livepeer/hooks/use-check-livepeer-api-key.ts delete mode 100644 integrations/livepeer/hooks/use-livepeer-api-key.ts delete mode 100644 integrations/livepeer/livepeer-client.ts delete mode 100644 integrations/livepeer/livepeer-provider.tsx delete mode 100644 integrations/moralis/README.md delete mode 100644 integrations/moralis/api/events.ts delete mode 100644 integrations/moralis/api/transaction.ts delete mode 100644 integrations/moralis/client/index.ts delete mode 100644 integrations/moralis/components/events/form-get-contract-events.tsx delete mode 100644 integrations/moralis/components/events/form-get-contract-logs.tsx delete mode 100644 integrations/moralis/components/events/index.ts delete mode 100644 integrations/moralis/components/output-data.tsx delete mode 100644 integrations/moralis/components/starter-header.tsx delete mode 100644 integrations/moralis/components/transaction/form-get-internal-transactions.tsx delete mode 100644 integrations/moralis/components/transaction/form-get-transaction-verbose.tsx delete mode 100644 integrations/moralis/components/transaction/form-get-transaction.tsx delete mode 100644 integrations/moralis/components/transaction/form-get-wallet-transactions-verbose.tsx delete mode 100644 integrations/moralis/components/transaction/form-get-wallet-transactions.tsx delete mode 100644 integrations/moralis/components/transaction/index.ts delete mode 100644 integrations/moralis/hooks/events/index.ts delete mode 100644 integrations/moralis/hooks/events/use-get-contract-events.ts delete mode 100644 integrations/moralis/hooks/events/use-get-contract-logs.ts delete mode 100644 integrations/moralis/hooks/transaction/index.ts delete mode 100644 integrations/moralis/hooks/transaction/use-get-internal-transactions.ts delete mode 100644 integrations/moralis/hooks/transaction/use-get-transaction-verbose.ts delete mode 100644 integrations/moralis/hooks/transaction/use-get-transaction.ts delete mode 100644 integrations/moralis/hooks/transaction/use-get-wallet-transactions-verbose.ts delete mode 100644 integrations/moralis/hooks/transaction/use-get-wallet-transactions.ts delete mode 100644 integrations/moralis/utils/types.ts delete mode 100644 integrations/openai/README.md delete mode 100644 integrations/openai/api/ask.ts delete mode 100644 integrations/openai/components/form-openai-prompt.tsx delete mode 100644 integrations/openai/hooks/use-openai-prompt.ts delete mode 100644 integrations/openai/openai-stream.ts delete mode 100644 integrations/openai/utils/types.ts delete mode 100644 integrations/pooltogether-v4/README.md delete mode 100644 integrations/pooltogether-v4/abis/yield-source-prize-pool-abi.ts delete mode 100644 integrations/pooltogether-v4/abis/yield-source-prize-pool-bytecode.ts delete mode 100644 integrations/pooltogether-v4/components/form-yield-source-prize-pool-deposit.tsx delete mode 100644 integrations/pooltogether-v4/components/form-yield-source-prize-pool-withdraw.tsx delete mode 100644 integrations/pooltogether-v4/generated/pooltogether-v4-wagmi.ts delete mode 100644 integrations/pooltogether-v4/hooks/use-load-contract-from-chain-id.ts delete mode 100644 integrations/pooltogether-v4/hooks/use-user-balance.ts delete mode 100644 integrations/pooltogether-v4/utils/constants.ts delete mode 100644 integrations/pooltogether-v4/utils/prize-pool-contract-list.ts delete mode 100644 integrations/pooltogether-v4/utils/ticket-contract-list.ts delete mode 100644 integrations/pooltogether-v4/utils/usdc-contract-list.ts delete mode 100644 integrations/pooltogether-v4/wagmi.config.ts delete mode 100644 integrations/push-protocol/README.md delete mode 100644 integrations/push-protocol/components/channel-card.tsx delete mode 100644 integrations/push-protocol/components/channel-search.tsx delete mode 100644 integrations/push-protocol/components/chat.tsx delete mode 100644 integrations/push-protocol/components/index.ts delete mode 100644 integrations/push-protocol/components/loadable.tsx delete mode 100644 integrations/push-protocol/components/notification-bell.tsx delete mode 100644 integrations/push-protocol/components/notification-feed.tsx delete mode 100644 integrations/push-protocol/components/notification-item.tsx delete mode 100644 integrations/push-protocol/components/subscribe-button.tsx delete mode 100644 integrations/push-protocol/hooks/index.ts delete mode 100644 integrations/push-protocol/hooks/use-channel.ts delete mode 100644 integrations/push-protocol/hooks/use-chats.ts delete mode 100644 integrations/push-protocol/hooks/use-create-user.ts delete mode 100644 integrations/push-protocol/hooks/use-notifications.ts delete mode 100644 integrations/push-protocol/hooks/use-search-channels.ts delete mode 100644 integrations/push-protocol/hooks/use-send-notifications.ts delete mode 100644 integrations/push-protocol/hooks/use-subscribe-channel.ts delete mode 100644 integrations/push-protocol/hooks/use-unsubscribe-channel.ts delete mode 100644 integrations/push-protocol/hooks/use-user-subscriptions.ts delete mode 100644 integrations/push-protocol/index.ts delete mode 100644 integrations/push-protocol/utils/constants.ts delete mode 100644 integrations/push-protocol/utils/helpers.ts delete mode 100644 integrations/push-protocol/utils/types.ts delete mode 100644 integrations/session-keys/README.md delete mode 100644 integrations/session-keys/components/create-session-key.tsx delete mode 100644 integrations/session-keys/components/delete-all-session-keys.tsx delete mode 100644 integrations/session-keys/components/delete-session-key.tsx delete mode 100644 integrations/session-keys/components/list-session-keys.tsx delete mode 100644 integrations/session-keys/database.ts delete mode 100644 integrations/session-keys/hooks/use-session-keys.ts delete mode 100644 integrations/siwe/README.md delete mode 100644 integrations/siwe/actions/siwe-login.ts delete mode 100644 integrations/siwe/actions/siwe-logout.ts delete mode 100644 integrations/siwe/actions/siwe-message.ts delete mode 100644 integrations/siwe/api/index.ts delete mode 100644 integrations/siwe/api/logout.ts delete mode 100644 integrations/siwe/api/nonce.ts delete mode 100644 integrations/siwe/api/verify.ts delete mode 100644 integrations/siwe/components/button-siwe-login.tsx delete mode 100644 integrations/siwe/components/button-siwe-logout.tsx delete mode 100644 integrations/siwe/components/is-signed-in.tsx delete mode 100644 integrations/siwe/components/is-signed-out.tsx delete mode 100644 integrations/starter/README.md delete mode 100644 integrations/starter/abis/starter-abi.ts delete mode 100644 integrations/starter/client/index.ts delete mode 100644 integrations/starter/components/starter-header.tsx delete mode 100644 integrations/starter/generated/starter-wagmi.ts delete mode 100644 integrations/starter/hooks/use-starter.ts delete mode 100644 integrations/starter/index.ts delete mode 100644 integrations/starter/utils/types.ts delete mode 100644 integrations/starter/wagmi.config.ts delete mode 100644 lib/app/get-app-users.ts delete mode 100644 lib/fonts.ts delete mode 100644 lib/hooks/app/use-get-app-users.ts delete mode 100644 lib/prisma.ts delete mode 100644 lib/session.ts delete mode 100644 prisma/schema.prisma diff --git a/app/(general)/integration/aave/opengraph-image.tsx b/app/(general)/integration/aave/opengraph-image.tsx deleted file mode 100644 index b2cedc2..0000000 --- a/app/(general)/integration/aave/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("aave") diff --git a/app/(general)/integration/aave/page.tsx b/app/(general)/integration/aave/page.tsx deleted file mode 100644 index 3fcdf8d..0000000 --- a/app/(general)/integration/aave/page.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { siteConfig } from "@/config/site" -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { GeneralInfo } from "@/integrations/aave/components/general-info" -import { ListAssetsToBorrow } from "@/integrations/aave/components/list-assets-to-borrow" -import { ListAssetsToSupply } from "@/integrations/aave/components/list-assets-to-supply" -import { ListBorrowedAssets } from "@/integrations/aave/components/list-borrowed-assets" -import { ListSuppliedAssets } from "@/integrations/aave/components/list-supplied-assets" - -export default function AavePage() { - return ( -
- - - Aave - - Borrow and lend assets seamlessly - - - - - Documentation - - - - - - - - Lend - Borrow - - - - - - - - - - -
-
- - -
-
- - -
-
-
-
- ) -} diff --git a/app/(general)/integration/aave/twitter-image.tsx b/app/(general)/integration/aave/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/aave/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/arweave/account/edit/page.tsx b/app/(general)/integration/arweave/account/edit/page.tsx deleted file mode 100644 index c7a21ac..0000000 --- a/app/(general)/integration/arweave/account/edit/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -"use client" - -import { ArweaveAccountEdit } from "@/integrations/arweave/components/arweave-account/form" - -export default function ArweaveEditAccountPage() { - return -} diff --git a/app/(general)/integration/arweave/account/page.tsx b/app/(general)/integration/arweave/account/page.tsx deleted file mode 100644 index 6bde76d..0000000 --- a/app/(general)/integration/arweave/account/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -"use client" - -import { ArweaveAccount } from "@/integrations/arweave/components/arweave-account" - -export default function ArweaveAccountPage() { - return -} diff --git a/app/(general)/integration/arweave/layout.tsx b/app/(general)/integration/arweave/layout.tsx deleted file mode 100644 index 0de5d9b..0000000 --- a/app/(general)/integration/arweave/layout.tsx +++ /dev/null @@ -1,64 +0,0 @@ -"use client" - -import React from "react" -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" - -import { SideBar } from "./sidebar" - -interface ArweaveLayoutProps { - children?: React.ReactNode -} - -export default function ArweaveLayout({ children }: ArweaveLayoutProps) { - return ( -
- - - Arweave - - Arweave is the first protocol that enables permanent data storage. Its - design allows anyone to preserve data forever with just a single, - one-time fee. - - - - - Documentation - - - - -
- -
- {children} -
-
-
-
- ) -} diff --git a/app/(general)/integration/arweave/opengraph-image.tsx b/app/(general)/integration/arweave/opengraph-image.tsx deleted file mode 100644 index 6b42992..0000000 --- a/app/(general)/integration/arweave/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("arweave") diff --git a/app/(general)/integration/arweave/page.tsx b/app/(general)/integration/arweave/page.tsx deleted file mode 100644 index e589603..0000000 --- a/app/(general)/integration/arweave/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -"use client" - -import { ConnectArweaveWallet } from "@/integrations/arweave/components/connect-arweave-wallet" - -export default function ArweaveHome() { - return -} diff --git a/app/(general)/integration/arweave/posts/[txId]/page.tsx b/app/(general)/integration/arweave/posts/[txId]/page.tsx deleted file mode 100644 index b105d88..0000000 --- a/app/(general)/integration/arweave/posts/[txId]/page.tsx +++ /dev/null @@ -1,10 +0,0 @@ -"use client" - -import { Post } from "@/integrations/arweave/components/post" -import { ArweaveTxId } from "@/integrations/arweave/utils/types" - -export default function ERC20({ params }: { params: { txId: ArweaveTxId } }) { - const { txId } = params - - return -} diff --git a/app/(general)/integration/arweave/posts/new/page.tsx b/app/(general)/integration/arweave/posts/new/page.tsx deleted file mode 100644 index 521976d..0000000 --- a/app/(general)/integration/arweave/posts/new/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -"use client" - -import { FormNewPost } from "@/integrations/arweave/components/form-new-post" - -export default function FormNewPostPage() { - return -} diff --git a/app/(general)/integration/arweave/posts/page.tsx b/app/(general)/integration/arweave/posts/page.tsx deleted file mode 100644 index 0463d19..0000000 --- a/app/(general)/integration/arweave/posts/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -"use client" - -import { ListPosts } from "@/integrations/arweave/components/list-posts" - -export default function ListPostsPage() { - return -} diff --git a/app/(general)/integration/arweave/settings/page.tsx b/app/(general)/integration/arweave/settings/page.tsx deleted file mode 100644 index 99efc04..0000000 --- a/app/(general)/integration/arweave/settings/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -"use client" - -import { ArweaveSettings } from "@/integrations/arweave/components/settings" - -export default function ArweaveSettingsPage() { - return -} diff --git a/app/(general)/integration/arweave/sidebar.tsx b/app/(general)/integration/arweave/sidebar.tsx deleted file mode 100644 index ee40d8d..0000000 --- a/app/(general)/integration/arweave/sidebar.tsx +++ /dev/null @@ -1,67 +0,0 @@ -"use client" - -import Link from "next/link" -import { usePathname } from "next/navigation" -import { turboIntegrations } from "@/data/turbo-integrations" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { LinkComponent } from "@/components/shared/link-component" -import { ArweaveAccountPreview } from "@/integrations/arweave/components/arweave-account/sidebar-preview" - -export const SideBar = () => { - const pathname = usePathname() - - const arweaveBaseUrl = turboIntegrations.arweave.href - return ( - - ) -} diff --git a/app/(general)/integration/arweave/twitter-image.tsx b/app/(general)/integration/arweave/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/arweave/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/connext/opengraph-image.tsx b/app/(general)/integration/connext/opengraph-image.tsx deleted file mode 100644 index 628147d..0000000 --- a/app/(general)/integration/connext/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("connext") diff --git a/app/(general)/integration/connext/page.tsx b/app/(general)/integration/connext/page.tsx deleted file mode 100644 index ad020d0..0000000 --- a/app/(general)/integration/connext/page.tsx +++ /dev/null @@ -1,69 +0,0 @@ -"use client" - -import { useState } from "react" -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { FormConnextXTransfer } from "@/integrations/connext/components/form-connext-xtransfer" -import { LatestTransfers } from "@/integrations/connext/components/latest-transfers" - -export default function ConnextPage() { - const [isMainnet, setIsMainnet] = useState(false) - - return ( -
- - - Connext - - Bridge assets directly from your app - - - - - Documentation - - - - -
-
-
- -
-
- -
-
-
-
- ) -} diff --git a/app/(general)/integration/connext/twitter-image.tsx b/app/(general)/integration/connext/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/connext/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/defi-llama/opengraph-image.tsx b/app/(general)/integration/defi-llama/opengraph-image.tsx deleted file mode 100644 index 7041589..0000000 --- a/app/(general)/integration/defi-llama/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("defiLlama") diff --git a/app/(general)/integration/defi-llama/page.tsx b/app/(general)/integration/defi-llama/page.tsx deleted file mode 100644 index 480603b..0000000 --- a/app/(general)/integration/defi-llama/page.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { - FormChart, - FormCurrentPrice, - FormHistoricalPrice, - FormPercentageChange, -} from "@/integrations/defi-llama/components" - -const integrationData = turboIntegrations.defiLlama - -export default function IntegrationPage() { - return ( -
- - - {integrationData.name} - - {integrationData.description} - - - - - Documentation - - - - -
- - - - -
-
-
- ) -} diff --git a/app/(general)/integration/defi-llama/twitter-image.tsx b/app/(general)/integration/defi-llama/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/defi-llama/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/disco/opengraph-image.tsx b/app/(general)/integration/disco/opengraph-image.tsx deleted file mode 100644 index 28d4e05..0000000 --- a/app/(general)/integration/disco/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("disco") diff --git a/app/(general)/integration/disco/page.tsx b/app/(general)/integration/disco/page.tsx deleted file mode 100644 index cf3863a..0000000 --- a/app/(general)/integration/disco/page.tsx +++ /dev/null @@ -1,130 +0,0 @@ -"use client" - -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" -import { useAccount } from "wagmi" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { Card, CardContent, CardHeader } from "@/components/ui/card" -import { Separator } from "@/components/ui/separator" -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { DiscoProfileBasic } from "@/integrations/disco/components/disco-profile-basic" -import { DiscoProfileCredentials } from "@/integrations/disco/components/disco-profile-credentials" -import { FormCredentialIssuanceProofOfHack } from "@/integrations/disco/components/form-issue-proof-of-hack" -import { ButtonSIWELogin } from "@/integrations/siwe/components/button-siwe-login" -import { IsSignedIn } from "@/integrations/siwe/components/is-signed-in" -import { IsSignedOut } from "@/integrations/siwe/components/is-signed-out" - -export default function DiscoPage() { - const { address } = useAccount() - - return ( -
- - - Disco - - Disco is identity simplified. Giving the tools to consent to how - information is shared and with whom. - - - - - Documentation - - - - - - - Profile - Proof of Hack - - - - -
- - -

Disco Profile

- -
- - - -
- - -

- Disco Verifiable Credentials -

- -
- - - -
-
-
- -
- -

- Accessing the Disco API requires authenticating with an - Ethereum Account. -

-
-
-
- - - -
- - - - - - -
- -

- Accessing the Disco API requires authenticating with an - Ethereum Account. -

-
-
-
- - - -
-
-
-
- ) -} diff --git a/app/(general)/integration/disco/twitter-image.tsx b/app/(general)/integration/disco/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/disco/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/erc1155/opengraph-image.tsx b/app/(general)/integration/erc1155/opengraph-image.tsx deleted file mode 100644 index 269ccd2..0000000 --- a/app/(general)/integration/erc1155/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("erc1155") diff --git a/app/(general)/integration/erc1155/page.tsx b/app/(general)/integration/erc1155/page.tsx deleted file mode 100644 index bf21705..0000000 --- a/app/(general)/integration/erc1155/page.tsx +++ /dev/null @@ -1,86 +0,0 @@ -"use client" - -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { - Erc1155Deploy, - Erc1155DeployTest, - Erc1155Read, - Erc1155WriteApprove, - Erc1155WriteBatchTransfer, - Erc1155WriteMint, - Erc1155WriteTransfer, -} from "@/integrations/erc1155" -import { Erc1155SetTokenStorage } from "@/integrations/erc1155/components/erc1155-set-token-storage" -import { useErc1155TokenStorage } from "@/integrations/erc1155/hooks/use-erc1155-token-storage" - -const integrationData = turboIntegrations.erc1155 - -export default function PageIntegration() { - const [token] = useErc1155TokenStorage() - - return ( -
- - - {integrationData.name} - - {integrationData.description} - - - - - Documentation - - - - - -
- - - - {token && ( - <> - - - - - - - )} -
-
- - - -
-
- ) -} diff --git a/app/(general)/integration/erc1155/twitter-image.tsx b/app/(general)/integration/erc1155/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/erc1155/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/erc20/[chainId]/[address]/page.tsx b/app/(general)/integration/erc20/[chainId]/[address]/page.tsx deleted file mode 100644 index dd8e0c2..0000000 --- a/app/(general)/integration/erc20/[chainId]/[address]/page.tsx +++ /dev/null @@ -1,24 +0,0 @@ -"use client" - -import { Address } from "wagmi" - -import { ERC20Read } from "@/integrations/erc20/components/erc20-read" - -export default function ERC20({ - params, -}: { - params: { address: Address; chainId: string } -}) { - const { address, chainId } = params - - return ( -
- -
- ) -} diff --git a/app/(general)/integration/erc20/opengraph-image.tsx b/app/(general)/integration/erc20/opengraph-image.tsx deleted file mode 100644 index 438b5e4..0000000 --- a/app/(general)/integration/erc20/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("erc20") diff --git a/app/(general)/integration/erc20/page.tsx b/app/(general)/integration/erc20/page.tsx deleted file mode 100644 index 7636468..0000000 --- a/app/(general)/integration/erc20/page.tsx +++ /dev/null @@ -1,95 +0,0 @@ -"use client" - -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { Card, CardContent } from "@/components/ui/card" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { ERC20Deploy } from "@/integrations/erc20/components/erc20-deploy" -import { ERC20Read } from "@/integrations/erc20/components/erc20-read" -import { Erc20SetTokenStorage } from "@/integrations/erc20/components/erc20-set-token-storage" -import { ERC20WriteMint } from "@/integrations/erc20/components/erc20-write-mint" -import { ERC20WriteTransfer } from "@/integrations/erc20/components/erc20-write-transfer" -import { useERC20TokenStorage } from "@/integrations/erc20/hooks/use-erc20-token-storage" - -export default function Erc20Page() { - const [token] = useERC20TokenStorage() - - return ( -
- - - ERC20 - - ERC20 is a standard for fungible tokens on EVM chains - - - - - Documentation - - - - - -
- - - {token && ( - <> - - - - Access the token page where you can update the url - parameters to select which ERC20 token to view - - - View Token Page - - - - - - - - )} -
-
- -
- -
-
-
-
- ) -} diff --git a/app/(general)/integration/erc20/twitter-image.tsx b/app/(general)/integration/erc20/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/erc20/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/erc721/opengraph-image.tsx b/app/(general)/integration/erc721/opengraph-image.tsx deleted file mode 100644 index 7f22bde..0000000 --- a/app/(general)/integration/erc721/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("erc721") diff --git a/app/(general)/integration/erc721/page.tsx b/app/(general)/integration/erc721/page.tsx deleted file mode 100644 index 5c36eb6..0000000 --- a/app/(general)/integration/erc721/page.tsx +++ /dev/null @@ -1,80 +0,0 @@ -"use client" - -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { - ERC721Deploy, - Erc721Read, - Erc721WriteApprove, - Erc721WriteMint, - Erc721WriteTransfer, -} from "@/integrations/erc721" -import { Erc721SetTokenStorage } from "@/integrations/erc721/components/erc721-set-token-storage" -import { useErc721TokenStorage } from "@/integrations/erc721/hooks/use-erc721-token-storage" - -export default function ERC721Page() { - const [token] = useErc721TokenStorage() - - return ( -
- - - ERC721 - - ERC721 is a standard for non-fungible tokens on EVM chains - - - - - Documentation - - - - - -
- - - {token && ( - <> - - - - - - )} -
-
- - - -
-
- ) -} diff --git a/app/(general)/integration/erc721/twitter-image.tsx b/app/(general)/integration/erc721/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/erc721/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/etherscan/opengraph-image.tsx b/app/(general)/integration/etherscan/opengraph-image.tsx deleted file mode 100644 index 5daaa76..0000000 --- a/app/(general)/integration/etherscan/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("etherscan") diff --git a/app/(general)/integration/etherscan/page.tsx b/app/(general)/integration/etherscan/page.tsx deleted file mode 100644 index 1335532..0000000 --- a/app/(general)/integration/etherscan/page.tsx +++ /dev/null @@ -1,93 +0,0 @@ -"use client" - -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" -import { useNetwork } from "wagmi" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { Card, CardContent } from "@/components/ui/card" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import TransactionsTable from "@/integrations/etherscan/components/transactions-table" -import { useEtherscanAccountTransactions } from "@/integrations/etherscan/hooks/use-etherscan-account-transactions" -import { ButtonSIWELogin } from "@/integrations/siwe/components/button-siwe-login" -import { IsSignedIn } from "@/integrations/siwe/components/is-signed-in" -import { IsSignedOut } from "@/integrations/siwe/components/is-signed-out" - -export default function EtherscanPage() { - const { chain } = useNetwork() - const { isLoading, data } = useEtherscanAccountTransactions({ - chainId: chain?.id || 1, - }) - - return ( -
- - - Etherscan - - Etherscan is the leading block explorer and search, API & analytics - platform for Ethereum. - - - - - Documentation - - - - - - -
- {!isLoading && ( - - - - - - )} -
-
- -
- -

- Accessing the Etherscan API requires authenticating with an - Ethereum Account. -

-
-
-
- - - -
-
- ) -} diff --git a/app/(general)/integration/etherscan/twitter-image.tsx b/app/(general)/integration/etherscan/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/etherscan/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/gelato/opengraph-image.tsx b/app/(general)/integration/gelato/opengraph-image.tsx deleted file mode 100644 index 2839be4..0000000 --- a/app/(general)/integration/gelato/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("gelato") diff --git a/app/(general)/integration/gelato/page.tsx b/app/(general)/integration/gelato/page.tsx deleted file mode 100644 index 70f0b45..0000000 --- a/app/(general)/integration/gelato/page.tsx +++ /dev/null @@ -1,79 +0,0 @@ -"use client" - -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { isAutomateSupported } from "@gelatonetwork/automate-sdk" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { ActiveTasks, useIsAutomateSupported } from "@/integrations/gelato" - -export default function GelatoPage() { - const isAutomateSupported = useIsAutomateSupported() - - return ( -
- - - Gelato - - Enabling developers to create augmented smart contracts that are - automated, gasless & off-chain aware - - - - - Documentation - - - - - - - - -
- {isAutomateSupported ? ( - <> -
- - Create Task - -
- - - ) : ( -

Network Not Supported

- )} -
-
-
-
- ) -} diff --git a/app/(general)/integration/gelato/tasks/[id]/page.tsx b/app/(general)/integration/gelato/tasks/[id]/page.tsx deleted file mode 100644 index a1c242c..0000000 --- a/app/(general)/integration/gelato/tasks/[id]/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -"use client" - -import { TaskView } from "@/integrations/gelato" - -export default function PageIntegration({ - params, -}: { - params: { id: string } -}) { - return -} diff --git a/app/(general)/integration/gelato/tasks/create/page.tsx b/app/(general)/integration/gelato/tasks/create/page.tsx deleted file mode 100644 index b8cd73d..0000000 --- a/app/(general)/integration/gelato/tasks/create/page.tsx +++ /dev/null @@ -1,24 +0,0 @@ -"use client" - -import Link from "next/link" -import { FiChevronLeft } from "react-icons/fi" - -import { CreateTask } from "@/integrations/gelato" - -export default function PageIntegration() { - return ( -
-
- - - Cancel - -
-

New Task

- -
- ) -} diff --git a/app/(general)/integration/gelato/tasks/page.tsx b/app/(general)/integration/gelato/tasks/page.tsx deleted file mode 100644 index 1330af5..0000000 --- a/app/(general)/integration/gelato/tasks/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from "next/navigation" - -export default function PageIntegration() { - redirect("/integration/gelato/tasks/create") -} diff --git a/app/(general)/integration/gelato/twitter-image.tsx b/app/(general)/integration/gelato/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/gelato/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/gitcoin-passport/dev-guide/page.tsx b/app/(general)/integration/gitcoin-passport/dev-guide/page.tsx deleted file mode 100644 index a3b6657..0000000 --- a/app/(general)/integration/gitcoin-passport/dev-guide/page.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import { HTMLAttributes } from "react" -import Link from "next/link" -import { LuBook } from "react-icons/lu" -import Markdown from "react-markdown" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" - -const DevReadme = ` -# Dev guide - -The Passport API provides programmatic access to a wallet's Passport score. -Once you have your API key, you need to include it with each request you make to the API. -This allows Gitcoin to identify your app and verify that you are authorized to access the API. - -## Getting Your API Key - -1. **Log in to the developer portal:** Go to [scorer.gitcoin.co](https://www.scorer.gitcoin.co/) and log in to your account by connecting your wallet. -2. **Navigate to the API Keys section:** After logging in, go to the "API Keys" section. -3. **Generate an API key:** Click on the "+ Create a Key" button to generate a unique API key for your account. -4. **Store your API key securely:** Store your API key in a secure place, as it will be used to access the Passport API. - -And finally place your API key in the \`.env\` file under the name \`GITCOIN_PASSPORT_API_KEY\`. - - -## Scorers and Scorer ID - -A Scorer is an individual object with a unique ID that is associated with your account. If you are using the Gitcoin Passport API in multiple applications, you can set up separate communities for each one. This allows you to customize the scoring rules for each application and deduplicate any identical Passport VCs that are submitted to the same application. - -By using communities, you can manage specific parameter settings and log traffic for your Passport-enabled applications. This can help you ensure that the identity verification functionality is working correctly and meets the needs of your stakeholders. - -### Getting your Scorer ID - -1. **Log in to the Developer Portal:** Go to [scorer.gitcoin.co](https://www.scorer.gitcoin.co/) and log in to your account by connecting your wallet. -2. **Navigate to the Communities section:** After logging in, go to the "Communities" section -3. **Create a Scorer:** Click on the "+ Create a Scorer" button and input a Scorer name and description. -4. **Find your Scorer ID:** Click on the newly created Scorer and you will see the Scorer ID in the page URL.\ - Example: \`https://www.scorer.gitcoin.co/dashboard/scorer/scorer_id\` - -And finally place your Scorer ID in the \`.env\` file under the name \`GITCOIN_PASSPORT_SCORER_ID\`. - -` - -export default function PageIntegration() { - return ( - <> - ) => ( -

- ), - h2: ({ ...props }: HTMLAttributes) => ( -

- ), - h3: ({ ...props }: HTMLAttributes) => ( -

- ), - li: ({ ...props }: HTMLAttributes) => ( - <> -
  • - {`${(props as { index: number }).index + 1}. `} - {props.children} -
  • - - ), - p: ({ ...props }: HTMLAttributes) => ( -

    - ), - a: ({ ...props }: HTMLAttributes) => ( - - ), - - code: ({ ...props }: HTMLAttributes) => ( - - ), - }} - > - {DevReadme} - - - - See the full Documentation - - - ) -} diff --git a/app/(general)/integration/gitcoin-passport/layout.tsx b/app/(general)/integration/gitcoin-passport/layout.tsx deleted file mode 100644 index e48579b..0000000 --- a/app/(general)/integration/gitcoin-passport/layout.tsx +++ /dev/null @@ -1,60 +0,0 @@ -"use client" - -import { ReactNode } from "react" -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" - -import { SideBar } from "./sidebar" - -export default function PageIntegration({ children }: { children: ReactNode }) { - return ( -

    - ) -} diff --git a/app/(general)/integration/gitcoin-passport/opengraph-image.tsx b/app/(general)/integration/gitcoin-passport/opengraph-image.tsx deleted file mode 100644 index 5a6a814..0000000 --- a/app/(general)/integration/gitcoin-passport/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("gitcoinPassport") diff --git a/app/(general)/integration/gitcoin-passport/page.tsx b/app/(general)/integration/gitcoin-passport/page.tsx deleted file mode 100644 index e5b60c6..0000000 --- a/app/(general)/integration/gitcoin-passport/page.tsx +++ /dev/null @@ -1,22 +0,0 @@ -"use client" - -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { ListStamps } from "@/integrations/gitcoin-passport/components/list-stamps" - -export default function PageIntegration() { - return ( - <> - - - - -
    -
    You must connect your wallet to be able to see this page
    - -
    -
    - - ) -} diff --git a/app/(general)/integration/gitcoin-passport/score-gated/page.tsx b/app/(general)/integration/gitcoin-passport/score-gated/page.tsx deleted file mode 100644 index d485b05..0000000 --- a/app/(general)/integration/gitcoin-passport/score-gated/page.tsx +++ /dev/null @@ -1,46 +0,0 @@ -"use client" - -import { Card, CardContent, CardTitle } from "@/components/ui/card" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { ScoreGate } from "@/integrations/gitcoin-passport/components/score-gate" - -export default function PageIntegration() { - return ( - <> - -
    - - - - This card has a score gate, which its contents will only be - visible if you have submitted a passport with +10 score - - -
    Congrats! your passport score is above 10!
    -
    -
    -
    - - - - This card has a score gate, which its contents will only be - visible if you have submitted a passport with +30 score - - -
    Congrats! your passport score is above 30, WOW!
    -
    -
    -
    -
    -
    - -
    -
    You must connect your wallet to be able to see this page
    - -
    -
    - - ) -} diff --git a/app/(general)/integration/gitcoin-passport/sidebar.tsx b/app/(general)/integration/gitcoin-passport/sidebar.tsx deleted file mode 100644 index dbcc6e2..0000000 --- a/app/(general)/integration/gitcoin-passport/sidebar.tsx +++ /dev/null @@ -1,50 +0,0 @@ -"use client" - -import Link from "next/link" -import { usePathname } from "next/navigation" -import { turboIntegrations } from "@/data/turbo-integrations" - -import { cn } from "@/lib/utils" - -const gitcoinPassportBaseHref = turboIntegrations.gitcoinPassport.href - -const links = [ - { title: "Passport", href: gitcoinPassportBaseHref }, - { - title: "Score gated demo page", - href: gitcoinPassportBaseHref + "/score-gated", - }, - { - title: "Stamp gated demo page", - href: gitcoinPassportBaseHref + "/stamp-gated", - }, - { title: "Dev guide", href: gitcoinPassportBaseHref + "/dev-guide" }, -] -export const SideBar = () => { - const pathname = usePathname() - - return ( - - ) -} diff --git a/app/(general)/integration/gitcoin-passport/stamp-gated/page.tsx b/app/(general)/integration/gitcoin-passport/stamp-gated/page.tsx deleted file mode 100644 index ebb4296..0000000 --- a/app/(general)/integration/gitcoin-passport/stamp-gated/page.tsx +++ /dev/null @@ -1,59 +0,0 @@ -"use client" - -import { Card, CardContent, CardTitle } from "@/components/ui/card" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { StampGate } from "@/integrations/gitcoin-passport/components/stamp-gate" - -export default function PageIntegration() { - return ( - <> - - - - - This card has a stamp gate, which its contents will only be - visible if you have submitted a passport with the{" "} - - NFT - {" "} - stamp. - - - Congrats! you have the{" "} - - NFT - {" "} - stamp. - - - - - - - This card has a stamp gate, which its contents will only be - visible if you have submitted a passport with the Gitcoin's - - SelfStakingBronze - {" "} - stamp. - - -
    - Congrats! you have the{" "} - NFT stamp. -
    -
    -
    -
    -
    - -
    -
    You must connect your wallet to be able to see this page
    - -
    -
    - - ) -} diff --git a/app/(general)/integration/gitcoin-passport/twitter-image.tsx b/app/(general)/integration/gitcoin-passport/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/gitcoin-passport/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/lens-protocol/explore/page.tsx b/app/(general)/integration/lens-protocol/explore/page.tsx deleted file mode 100644 index e8aa445..0000000 --- a/app/(general)/integration/lens-protocol/explore/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -"use client" - -import { ExploreProfiles } from "@/integrations/lens-protocol/components/profile/explore-profiles" -import { ExplorePublications } from "@/integrations/lens-protocol/components/publications/explore-publications" - -export default function PageIntegration() { - return ( - <> - - - - ) -} diff --git a/app/(general)/integration/lens-protocol/layout.tsx b/app/(general)/integration/lens-protocol/layout.tsx deleted file mode 100644 index 1e851aa..0000000 --- a/app/(general)/integration/lens-protocol/layout.tsx +++ /dev/null @@ -1,75 +0,0 @@ -"use client" - -import { ReactNode } from "react" -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LensProvider } from "@lens-protocol/react-web" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { Navbar } from "@/integrations/lens-protocol/components/navbar" -import { lensProviderConfig } from "@/integrations/lens-protocol/lens-provider" - -export default function LayoutIntegration({ - children, -}: { - children: ReactNode -}) { - return ( - <> - - - - {turboIntegrations.lensProtocol.name} - - - {turboIntegrations.lensProtocol.description} - - - - - Documentation - - - - - - - - - -
    - -
    - {children} -
    -
    -
    -
    -
    - - ) -} diff --git a/app/(general)/integration/lens-protocol/opengraph-image.tsx b/app/(general)/integration/lens-protocol/opengraph-image.tsx deleted file mode 100644 index 657902a..0000000 --- a/app/(general)/integration/lens-protocol/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("lensProtocol") diff --git a/app/(general)/integration/lens-protocol/page.tsx b/app/(general)/integration/lens-protocol/page.tsx deleted file mode 100644 index bbcc659..0000000 --- a/app/(general)/integration/lens-protocol/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from "next/navigation" - -export default function PageIntegration() { - redirect("/integration/lens-protocol/profiles") -} diff --git a/app/(general)/integration/lens-protocol/profiles/[handle]/page.tsx b/app/(general)/integration/lens-protocol/profiles/[handle]/page.tsx deleted file mode 100644 index 539ac4e..0000000 --- a/app/(general)/integration/lens-protocol/profiles/[handle]/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -"use client" - -import { Profile } from "@/integrations/lens-protocol/components/profile/profile" - -export default function PageIntegration({ - params, -}: { - params: { handle: string } -}) { - return -} diff --git a/app/(general)/integration/lens-protocol/profiles/address/[address]/page.tsx b/app/(general)/integration/lens-protocol/profiles/address/[address]/page.tsx deleted file mode 100644 index 8eccd9b..0000000 --- a/app/(general)/integration/lens-protocol/profiles/address/[address]/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -"use client" - -import { AddressProfiles } from "@/integrations/lens-protocol/components/profile/address-profiles" - -export default function PageIntegration({ - params, -}: { - params: { address: string } -}) { - return -} diff --git a/app/(general)/integration/lens-protocol/profiles/page.tsx b/app/(general)/integration/lens-protocol/profiles/page.tsx deleted file mode 100644 index f73d62c..0000000 --- a/app/(general)/integration/lens-protocol/profiles/page.tsx +++ /dev/null @@ -1,7 +0,0 @@ -"use client" - -import { OwnedProfiles } from "@/integrations/lens-protocol/components/profile/owned-profiles" - -export default function PageIntegration() { - return -} diff --git a/app/(general)/integration/lens-protocol/publications/[id]/page.tsx b/app/(general)/integration/lens-protocol/publications/[id]/page.tsx deleted file mode 100644 index a9c16c3..0000000 --- a/app/(general)/integration/lens-protocol/publications/[id]/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -"use client" - -import { PublicationId } from "@lens-protocol/react-web" - -import { Publication } from "@/integrations/lens-protocol/components/publications/publication" - -export default function PageIntegration({ - params, -}: { - params: { id: string } -}) { - return -} diff --git a/app/(general)/integration/lens-protocol/search/page.tsx b/app/(general)/integration/lens-protocol/search/page.tsx deleted file mode 100644 index cf71d56..0000000 --- a/app/(general)/integration/lens-protocol/search/page.tsx +++ /dev/null @@ -1,17 +0,0 @@ -"use client" - -import { useSearchParams } from "next/navigation" - -import { SearchProfiles } from "@/integrations/lens-protocol/components/profile/search-profiles" -import { SearchPublications } from "@/integrations/lens-protocol/components/publications/search-publications" - -export default function PageIntegration() { - const searchParams = useSearchParams() - const query = searchParams.get("q") ?? "" - return ( - <> - - - - ) -} diff --git a/app/(general)/integration/lens-protocol/twitter-image.tsx b/app/(general)/integration/lens-protocol/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/lens-protocol/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/lit-protocol/opengraph-image.tsx b/app/(general)/integration/lit-protocol/opengraph-image.tsx deleted file mode 100644 index bc2be4e..0000000 --- a/app/(general)/integration/lit-protocol/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("litProtocol") diff --git a/app/(general)/integration/lit-protocol/page.tsx b/app/(general)/integration/lit-protocol/page.tsx deleted file mode 100644 index edcf872..0000000 --- a/app/(general)/integration/lit-protocol/page.tsx +++ /dev/null @@ -1,86 +0,0 @@ -"use client" - -import Link from "next/link" -import { useSearchParams } from "next/navigation" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { FormLitDecryptMessage } from "@/integrations/lit-protocol/components/form-lit-decrypt-message" -import { FormLitEncryptMessage } from "@/integrations/lit-protocol/components/form-lit-encrypt-message" - -export default function LitProtocolPage() { - const searchParams = useSearchParams() - const id = searchParams?.get("id") || "" - - return ( -
    - - - Lit Protocol - - Lit is distributed key management for encryption, signing, and - compute. - - - - - Documentation - - - - - - - Share - Unseal - - - - - - -
    - -
    -
    -
    - - - - - -
    - -
    -
    -
    -
    -
    -
    - ) -} diff --git a/app/(general)/integration/lit-protocol/twitter-image.tsx b/app/(general)/integration/lit-protocol/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/lit-protocol/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/livepeer/layout.tsx b/app/(general)/integration/livepeer/layout.tsx deleted file mode 100644 index 5411148..0000000 --- a/app/(general)/integration/livepeer/layout.tsx +++ /dev/null @@ -1,83 +0,0 @@ -"use client" - -import { ReactNode } from "react" -import Link from "next/link" -import { usePathname } from "next/navigation" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { Button, buttonVariants } from "@/components/ui/button" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { LinkComponent } from "@/components/shared/link-component" -import { useLivepeerApiKey } from "@/integrations/livepeer/hooks/use-livepeer-api-key" -import { LivepeerProvider } from "@/integrations/livepeer/livepeer-provider" - -const livestreamPath = "/integration/livepeer/livestream" -const videoOnDemandPath = "/integration/livepeer/vod" - -export default function LayoutIntegration({ - children, -}: { - children: ReactNode -}) { - const pathname = usePathname() - const [livepeerApiKey] = useLivepeerApiKey() - - return ( - -
    - - - Livepeer - - Livepeer is the world's open video infrastructure. - - - - - Documentation - - - - -
    - - - - - - -
    - {children} -
    -
    -
    - ) -} diff --git a/app/(general)/integration/livepeer/livestream/[streamId]/page.tsx b/app/(general)/integration/livepeer/livestream/[streamId]/page.tsx deleted file mode 100644 index 20b6560..0000000 --- a/app/(general)/integration/livepeer/livestream/[streamId]/page.tsx +++ /dev/null @@ -1,74 +0,0 @@ -"use client" - -import { useStream } from "@livepeer/react" - -import { Card, CardContent } from "@/components/ui/card" -import { LinkComponent } from "@/components/shared/link-component" -import { ButtonShare } from "@/integrations/livepeer/components/button-share" -import { FormLivepeerApiKey } from "@/integrations/livepeer/components/form-livepeer-api-key" -import { - PlayerComponent, - PlayerType, -} from "@/integrations/livepeer/components/player" -import { Spinner } from "@/integrations/livepeer/components/spinner" -import { useIsLivepeerApiKeySet } from "@/integrations/livepeer/hooks/use-livepeer-api-key" - -const watchStreamPath = "/integration/livepeer/livestream/watch/" -const streamPath = "/integration/livepeer/livestream/" - -export default function Page({ params }: { params: { streamId: string } }) { - const isLivepeerApiKeySet = useIsLivepeerApiKeySet() - - const SHARE_HREF = streamPath + params.streamId - - const { data: stream, error } = useStream({ - streamId: params.streamId, - }) - - if (error) { - return ( -
    - {!isLivepeerApiKeySet ? ( - - - - - - ) : ( - <> -

    - We are sorry, but your livestream was not found 😓{" "} - {/* 😓 = 😓 */} -

    -

    - Please try again{" "} - - here - -

    - - )} -
    - ) - } - - if (!stream || !stream.playbackId) - return ( -
    - -
    - ) - - return ( - <> - - - - ) -} diff --git a/app/(general)/integration/livepeer/livestream/new/browser/page.tsx b/app/(general)/integration/livepeer/livestream/new/browser/page.tsx deleted file mode 100644 index 87057e0..0000000 --- a/app/(general)/integration/livepeer/livestream/new/browser/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { CreateStream } from "@/integrations/livepeer/components/create-stream" - -export default function PageIntegration() { - return -} diff --git a/app/(general)/integration/livepeer/livestream/new/obs/page.tsx b/app/(general)/integration/livepeer/livestream/new/obs/page.tsx deleted file mode 100644 index 76ab213..0000000 --- a/app/(general)/integration/livepeer/livestream/new/obs/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { CreateStream } from "@/integrations/livepeer/components/create-stream" - -export default function PageIntegration() { - return -} diff --git a/app/(general)/integration/livepeer/livestream/new/page.tsx b/app/(general)/integration/livepeer/livestream/new/page.tsx deleted file mode 100644 index f431b13..0000000 --- a/app/(general)/integration/livepeer/livestream/new/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from "next/navigation" - -export default function PageIntegration() { - redirect("/integration/livepeer/livestream") -} diff --git a/app/(general)/integration/livepeer/livestream/page.tsx b/app/(general)/integration/livepeer/livestream/page.tsx deleted file mode 100644 index ba3b0c7..0000000 --- a/app/(general)/integration/livepeer/livestream/page.tsx +++ /dev/null @@ -1,50 +0,0 @@ -"use client" - -import { Button } from "@/components/ui/button" -import { Card, CardContent, CardHeader } from "@/components/ui/card" -import { LinkComponent } from "@/components/shared/link-component" -import { FormLivepeerApiKey } from "@/integrations/livepeer/components/form-livepeer-api-key" -import { useIsLivepeerApiKeySet } from "@/integrations/livepeer/hooks/use-livepeer-api-key" - -const newStreamObsPath = "/integration/livepeer/livestream/new/obs" -const newStreamBrowserPath = "/integration/livepeer/livestream/new/browser" -const watchStreamPath = "/integration/livepeer/livestream/watch" - -export default function PageIntegration() { - const isLivepeerApiKeySet = useIsLivepeerApiKeySet() - - return ( - - - {!isLivepeerApiKeySet && } - - - - - - - - - - - - ) -} diff --git a/app/(general)/integration/livepeer/livestream/watch/page.tsx b/app/(general)/integration/livepeer/livestream/watch/page.tsx deleted file mode 100644 index e54b256..0000000 --- a/app/(general)/integration/livepeer/livestream/watch/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { FormLivepeerStream } from "@/integrations/livepeer/components/form-livepeer-stream" - -export default function PageIntegration() { - return -} diff --git a/app/(general)/integration/livepeer/opengraph-image.tsx b/app/(general)/integration/livepeer/opengraph-image.tsx deleted file mode 100644 index fc4517f..0000000 --- a/app/(general)/integration/livepeer/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("livepeer") diff --git a/app/(general)/integration/livepeer/page.tsx b/app/(general)/integration/livepeer/page.tsx deleted file mode 100644 index 3f8cb4f..0000000 --- a/app/(general)/integration/livepeer/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from "next/navigation" - -export default function PageIntegration() { - redirect("/integration/livepeer/vod") -} diff --git a/app/(general)/integration/livepeer/twitter-image.tsx b/app/(general)/integration/livepeer/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/livepeer/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/livepeer/vod/[playbackId]/page.tsx b/app/(general)/integration/livepeer/vod/[playbackId]/page.tsx deleted file mode 100644 index 541900f..0000000 --- a/app/(general)/integration/livepeer/vod/[playbackId]/page.tsx +++ /dev/null @@ -1,73 +0,0 @@ -"use client" - -import { usePlaybackInfo } from "@livepeer/react" - -import { Card, CardContent } from "@/components/ui/card" -import { LinkComponent } from "@/components/shared/link-component" -import { ButtonShare } from "@/integrations/livepeer/components/button-share" -import { FormLivepeerApiKey } from "@/integrations/livepeer/components/form-livepeer-api-key" -import { - PlayerComponent, - PlayerType, -} from "@/integrations/livepeer/components/player" -import { Spinner } from "@/integrations/livepeer/components/spinner" -import { useIsLivepeerApiKeySet } from "@/integrations/livepeer/hooks/use-livepeer-api-key" - -const watchVideoPath = "/integration/livepeer/vod/watch/" -const videoPath = "/integration/livepeer/vod/" - -export default function Page({ params }: { params: { playbackId: string } }) { - const { playbackId } = params - const isLivepeerApiKeySet = useIsLivepeerApiKeySet() - - const SHARE_HREF = videoPath + playbackId - - const { data: playbackInfo, error } = usePlaybackInfo(playbackId) - - if (error) { - return ( -
    - {!isLivepeerApiKeySet ? ( - - - - - - ) : ( - <> -

    - We are sorry, but your asset was not found 😓{" "} - {/* 😓 = 😓 */} -

    - -

    - Please try again{" "} - - here - -

    - - )} -
    - ) - } - - if (!playbackInfo) - return ( -
    - -
    - ) - - return ( - <> - - - - ) -} diff --git a/app/(general)/integration/livepeer/vod/new/page.tsx b/app/(general)/integration/livepeer/vod/new/page.tsx deleted file mode 100644 index 78153ef..0000000 --- a/app/(general)/integration/livepeer/vod/new/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { UploadFile } from "@/integrations/livepeer/components/upload-file" - -export default function PageIntegration() { - return -} diff --git a/app/(general)/integration/livepeer/vod/page.tsx b/app/(general)/integration/livepeer/vod/page.tsx deleted file mode 100644 index fcdb83b..0000000 --- a/app/(general)/integration/livepeer/vod/page.tsx +++ /dev/null @@ -1,39 +0,0 @@ -"use client" - -import { Button } from "@/components/ui/button" -import { Card, CardContent, CardHeader } from "@/components/ui/card" -import { LinkComponent } from "@/components/shared/link-component" -import { FormLivepeerApiKey } from "@/integrations/livepeer/components/form-livepeer-api-key" -import { useIsLivepeerApiKeySet } from "@/integrations/livepeer/hooks/use-livepeer-api-key" - -const newVodPath = "/integration/livepeer/vod/new" -const watchVodPath = "/integration/livepeer/vod/watch" - -export default function PageIntegration() { - const isLivepeerApiKeySet = useIsLivepeerApiKeySet() - return ( - - - {!isLivepeerApiKeySet && } - - - - - - - - - ) -} diff --git a/app/(general)/integration/livepeer/vod/watch/page.tsx b/app/(general)/integration/livepeer/vod/watch/page.tsx deleted file mode 100644 index 83a8a78..0000000 --- a/app/(general)/integration/livepeer/vod/watch/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { FormLivepeerAsset } from "@/integrations/livepeer/components/form-livepeer-asset" - -export default function Page() { - return -} diff --git a/app/(general)/integration/moralis/api/events/[method]/route.ts b/app/(general)/integration/moralis/api/events/[method]/route.ts deleted file mode 100644 index e97c8f8..0000000 --- a/app/(general)/integration/moralis/api/events/[method]/route.ts +++ /dev/null @@ -1 +0,0 @@ -export { POST } from "@/integrations/moralis/api/events" diff --git a/app/(general)/integration/moralis/api/transaction/[method]/route.ts b/app/(general)/integration/moralis/api/transaction/[method]/route.ts deleted file mode 100644 index 9e7546a..0000000 --- a/app/(general)/integration/moralis/api/transaction/[method]/route.ts +++ /dev/null @@ -1 +0,0 @@ -export { GET } from "@/integrations/moralis/api/transaction" diff --git a/app/(general)/integration/moralis/opengraph-image.tsx b/app/(general)/integration/moralis/opengraph-image.tsx deleted file mode 100644 index 2a83d61..0000000 --- a/app/(general)/integration/moralis/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("moralis") diff --git a/app/(general)/integration/moralis/page.tsx b/app/(general)/integration/moralis/page.tsx deleted file mode 100644 index dd22649..0000000 --- a/app/(general)/integration/moralis/page.tsx +++ /dev/null @@ -1,95 +0,0 @@ -"use client" - -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { motion } from "framer-motion" -import { LuBook } from "react-icons/lu" - -import { FADE_DOWN_ANIMATION_VARIANTS } from "@/config/design" -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { - FormGetContractEvents, - FormGetContractLogs, -} from "@/integrations/moralis/components/events" -import { - FormGetInternalTransactions, - FormGetTransaction, - FormGetTransactionVerbose, - FormGetWalletTransactions, - FormGetWalletTransactionsVerbose, -} from "@/integrations/moralis/components/transaction" - -export default function MoralisPage() { - return ( -
    - - - Moralis - - Moralis provides a complete end-to-end blockchain application - development platform. - - - - - Documentation - - - - - - - Transaction API - Events API - - - - - - - - - - - - - - - - - - -
    - ) -} diff --git a/app/(general)/integration/moralis/twitter-image.tsx b/app/(general)/integration/moralis/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/moralis/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/openai/opengraph-image.tsx b/app/(general)/integration/openai/opengraph-image.tsx deleted file mode 100644 index 53cb030..0000000 --- a/app/(general)/integration/openai/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("openai") diff --git a/app/(general)/integration/openai/page.tsx b/app/(general)/integration/openai/page.tsx deleted file mode 100644 index 96666f5..0000000 --- a/app/(general)/integration/openai/page.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { FormOpenAIPrompt } from "@/integrations/openai/components/form-openai-prompt" - -export default function OpenAIPage() { - return ( -
    - - - OpenAI - - OpenAI offers AI models designed for advanced natural language - processing. - - - - - Documentation - - - - - - -
    - ) -} diff --git a/app/(general)/integration/openai/twitter-image.tsx b/app/(general)/integration/openai/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/openai/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/pooltogether-v4/opengraph-image.tsx b/app/(general)/integration/pooltogether-v4/opengraph-image.tsx deleted file mode 100644 index a5dc047..0000000 --- a/app/(general)/integration/pooltogether-v4/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("pooltogether_v4") diff --git a/app/(general)/integration/pooltogether-v4/page.tsx b/app/(general)/integration/pooltogether-v4/page.tsx deleted file mode 100644 index 824530b..0000000 --- a/app/(general)/integration/pooltogether-v4/page.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { PoolTogetherFormDeposit } from "@/integrations/pooltogether-v4/components/form-yield-source-prize-pool-deposit" -import { PoolTogetherFormWithdraw } from "@/integrations/pooltogether-v4/components/form-yield-source-prize-pool-withdraw" - -export default function PoolTogetherPage() { - return ( -
    - - - PoolTogether - - PoolTogether is a prize savings protocol, enable you to win by saving. - - - - - Documentation - - - - - - - Deposit - Withdraw - - - - - - -
    - -
    -
    -
    - - - - - -
    - -
    -
    -
    -
    -
    -
    - ) -} diff --git a/app/(general)/integration/pooltogether-v4/twitter-image.tsx b/app/(general)/integration/pooltogether-v4/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/pooltogether-v4/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/push-protocol/opengraph-image.tsx b/app/(general)/integration/push-protocol/opengraph-image.tsx deleted file mode 100644 index b1a1605..0000000 --- a/app/(general)/integration/push-protocol/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("push_protocol") diff --git a/app/(general)/integration/push-protocol/page.tsx b/app/(general)/integration/push-protocol/page.tsx deleted file mode 100644 index 6fa1fbb..0000000 --- a/app/(general)/integration/push-protocol/page.tsx +++ /dev/null @@ -1,164 +0,0 @@ -"use client" - -import { useState } from "react" -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { ApiNotificationType } from "@pushprotocol/restapi" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { Card, CardContent, CardFooter } from "@/components/ui/card" -import { Input } from "@/components/ui/input" -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select" -import { Separator } from "@/components/ui/separator" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { - ChannelCard, - ChannelSearch, - ENV, - getMockedNotification, - NotificationBell, -} from "@/integrations/push-protocol" -import { PUSH_CHANNEL_ADDRESS } from "@/integrations/push-protocol/utils/constants" - -export default function PushProtocolPage() { - const [mockedNotifications, setMockedNotifications] = useState< - ApiNotificationType[] - >([]) - - const [channelAddress, setChannelAddress] = useState(PUSH_CHANNEL_ADDRESS) - const [env, setEnv] = useState(ENV.STAGING) - - // Shows mock notificatins in inbox after subscribing if there is no notifications to show. - const handleSubscribe = () => { - const mockedNotification = getMockedNotification({ env }) - setMockedNotifications([mockedNotification]) - } - - return ( -
    - - - Push Protocol - - Push Protocol is a web3 communication network, enabling cross-chain - notifications and messaging for dapps, wallets, and services. - - - - - Documentation - - - - - - - - -
    -
    - -
    -
    -
    - - -
    -
    - setChannelAddress(e.target.value)} - /> -
    -
    - -
    -
    -
    -
    - handleSubscribe()} - /> -
    -
    -
    - - -

    Channel Preview

    -

    - Preview and subscribe channel -

    -
    -
    -
    -
    - - - - - - -

    Search Channels

    -

    - Search for PUSH channels -

    -
    -
    -
    -
    -
    -
    - ) -} diff --git a/app/(general)/integration/push-protocol/twitter-image.tsx b/app/(general)/integration/push-protocol/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/push-protocol/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/session-keys/opengraph-image.tsx b/app/(general)/integration/session-keys/opengraph-image.tsx deleted file mode 100644 index a219aa9..0000000 --- a/app/(general)/integration/session-keys/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("sessionKeys") diff --git a/app/(general)/integration/session-keys/page.tsx b/app/(general)/integration/session-keys/page.tsx deleted file mode 100644 index 6138f48..0000000 --- a/app/(general)/integration/session-keys/page.tsx +++ /dev/null @@ -1,72 +0,0 @@ -"use client" - -import { useState } from "react" -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" -import { Address } from "viem" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { CreateSessionKey } from "@/integrations/session-keys/components/create-session-key" -import { DeleteAllSessionKeys } from "@/integrations/session-keys/components/delete-all-session-keys" -import { DeleteSessionKey } from "@/integrations/session-keys/components/delete-session-key" -import { ListSessionKeys } from "@/integrations/session-keys/components/list-session-keys" - -export default function SessionKeysPage() { - const [selectedSessionKey, setSelectedSessionKey] = useState
    () - - return ( -
    - - - Session Keys - - Short-lived private keys enable transaction signing and the granting - of temporary smart contract permissions. - - - - - Documentation - - - - -
    - - - -
    -
    - -
    -
    -
    - ) -} diff --git a/app/(general)/integration/session-keys/twitter-image.tsx b/app/(general)/integration/session-keys/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/session-keys/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/sign-in-with-ethereum/opengraph-image.tsx b/app/(general)/integration/sign-in-with-ethereum/opengraph-image.tsx deleted file mode 100644 index 0c48945..0000000 --- a/app/(general)/integration/sign-in-with-ethereum/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("siwe") diff --git a/app/(general)/integration/sign-in-with-ethereum/page.tsx b/app/(general)/integration/sign-in-with-ethereum/page.tsx deleted file mode 100644 index 0ac276e..0000000 --- a/app/(general)/integration/sign-in-with-ethereum/page.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { ButtonSIWELogin } from "@/integrations/siwe/components/button-siwe-login" -import { ButtonSIWELogout } from "@/integrations/siwe/components/button-siwe-logout" -import { IsSignedIn } from "@/integrations/siwe/components/is-signed-in" -import { IsSignedOut } from "@/integrations/siwe/components/is-signed-out" - -export default function SIWEPage() { - return ( -
    - - - SIWE - - Sign-In with Ethereum is Web3 authentication using an Ethereum - account. - - - - - Documentation - - - - - - - - - - - - - - - - -
    - ) -} diff --git a/app/(general)/integration/sign-in-with-ethereum/twitter-image.tsx b/app/(general)/integration/sign-in-with-ethereum/twitter-image.tsx deleted file mode 100644 index 215a2a5..0000000 --- a/app/(general)/integration/sign-in-with-ethereum/twitter-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import Image from "./opengraph-image" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default Image diff --git a/app/(general)/integration/starter/api/hello-world/route.ts b/app/(general)/integration/starter/api/hello-world/route.ts deleted file mode 100644 index 59d1a86..0000000 --- a/app/(general)/integration/starter/api/hello-world/route.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function GET() { - return new Response("Hello, TurboETH!", { - status: 200, - }) -} diff --git a/app/(general)/integration/starter/layout-optional.tsx b/app/(general)/integration/starter/layout-optional.tsx deleted file mode 100644 index 5ee6824..0000000 --- a/app/(general)/integration/starter/layout-optional.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" - -interface IntegrationLayoutProps { - children: React.ReactNode -} - -export default function IntegrationLayout({ - children, -}: IntegrationLayoutProps) { - return ( -
    - - - Starter Template - - Use this template to get started building integrations with TurboETH. - - - - - Documentation - - - - {children} -
    - ) -} diff --git a/app/(general)/integration/starter/opengraph-image.tsx b/app/(general)/integration/starter/opengraph-image.tsx deleted file mode 100644 index 4cd2fd8..0000000 --- a/app/(general)/integration/starter/opengraph-image.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { IntegrationOgImage } from "@/components/ui/social/og-image-integrations" - -export const runtime = "edge" -export const size = { - width: 1200, - height: 630, -} - -export default IntegrationOgImage("starter") diff --git a/app/(general)/integration/starter/page.tsx b/app/(general)/integration/starter/page.tsx deleted file mode 100644 index 18a1db7..0000000 --- a/app/(general)/integration/starter/page.tsx +++ /dev/null @@ -1,92 +0,0 @@ -import Link from "next/link" -import { turboIntegrations } from "@/data/turbo-integrations" -import { LuBook } from "react-icons/lu" - -import { cn } from "@/lib/utils" -import { Button, buttonVariants } from "@/components/ui/button" -import { - Card, - CardContent, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/components/ui/card" -import { Label } from "@/components/ui/label" -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select" -import { Textarea } from "@/components/ui/textarea" -import { - PageHeader, - PageHeaderCTA, - PageHeaderDescription, - PageHeaderHeading, -} from "@/components/layout/page-header" -import { PageSection } from "@/components/layout/page-section" -import { LightDarkImage } from "@/components/shared/light-dark-image" - -export default function IntegrationPage() { - return ( -
    - - - Starter Template - - Use this template to get started building integrations with TurboETH. - - - - - Documentation - - - - - - - Let's BUIDL here! - Jumpstart your next project. - - -
    - - -
    -
    - - -
    - - - )} -
    - ) -} diff --git a/integrations/gelato/components/create-task/create-task.tsx b/integrations/gelato/components/create-task/create-task.tsx deleted file mode 100644 index b7b5c9d..0000000 --- a/integrations/gelato/components/create-task/create-task.tsx +++ /dev/null @@ -1,248 +0,0 @@ -import { useState } from "react" -import { useRouter } from "next/navigation" -import { CreateTaskOptions } from "@gelatonetwork/automate-sdk" -import { ethers } from "ethers" -import moment from "moment" -import { FormProvider, useForm } from "react-hook-form" -import { FaExternalLinkAlt, FaSpinner } from "react-icons/fa" -import { useNetwork } from "wagmi" - -import { useEthersSigner } from "@/lib/hooks/web3/use-ethers-signer" -import { Button } from "@/components/ui/button" - -import { useNewTask } from "../../hooks" -import { useMsgSender } from "../../hooks/use-msg-sender" -import { - getFunctionSignature, - getTotalInterval, - getTransactionUrl, - sortInputsByOrder, -} from "../../utils/helpers" -import { ContractInput } from "./contract-input" -import { ExecutionValues } from "./execution-values" -import { FunctionInput } from "./function-input" -import { useWizard } from "./hooks/use-wizard" -import { IntervalInput } from "./interval-input" -import { PaymentInput } from "./payment-input" -import { ResolverInput } from "./resolver-input" -import { RestrictionInfo } from "./restriction-info" -import { TaskNameInput } from "./task-name-input" - -export type CreateTaskForm = { - contractAddress: string - abi: string - func: string - inputDefinition: "predefined" | "resolver" - predefinedInputs?: { [key: string]: string } - resolverContractAddress: string - resolverAbi: string - resolverFunc: string - resolverInputs?: { [key: string]: string } - timeOption: "exact" | "whenever_possible" - timeInterval: { - days: string - hours: string - minutes: string - seconds: string - } - startTime: string - startImmediately: boolean - payWith: "gelato" | "transaction" - name: string -} - -export function CreateTask() { - const [createTx, setCreateTx] = useState() - const [createTxWaiting, setCreateTxWaiting] = useState(false) - - const form = useForm({ - mode: "all", - defaultValues: { - inputDefinition: "predefined", - timeOption: "exact", - startImmediately: true, - startTime: moment().format("YYYY-MM-DDTHH:mm:ss"), - payWith: "gelato", - }, - }) - - const { chain } = useNetwork() - - const router = useRouter() - - const signer = useEthersSigner() - - const { - isLoading: createTaskIsLoading, - isError: createTaskIsError, - mutateAsync: createTask, - } = useNewTask() - - const { - shouldShowFunction, - shouldShowInputs, - shouldShowRestrictionInfo, - shouldShowIntervalInput, - shouldShowPayment, - shouldShowResolverInputs, - isValid, - } = useWizard(form) - - const { data: dedicatedMsgSender } = useMsgSender() - - const onSubmit = async () => { - const values = form.getValues() - - const contract = new ethers.Contract( - values.contractAddress, - values.abi, - signer - ) - - const { days, hours, minutes, seconds } = values.timeInterval || {} - - let taskData: CreateTaskOptions = { - name: values.name, - execAddress: values.contractAddress, - execSelector: contract.interface.getSighash( - getFunctionSignature(values.abi, values.func) - ), - interval: - shouldShowIntervalInput && values.timeOption === "exact" - ? getTotalInterval(days, hours, minutes, seconds) - : undefined, - startTime: - values.startImmediately || values.timeOption === "whenever_possible" - ? undefined - : moment(values.startTime).unix(), - useTreasury: values.payWith !== "transaction", - dedicatedMsgSender: false, - } - - if (values.inputDefinition === "predefined") { - taskData = { - ...taskData, - execAbi: values.abi, - execData: contract.interface.encodeFunctionData( - values.func, - sortInputsByOrder(values.func, values.abi, values.predefinedInputs) - ), - } - } else { - const resolverContract = new ethers.Contract( - values.resolverContractAddress, - values.resolverAbi, - signer - ) - - taskData = { - ...taskData, - resolverAddress: values.resolverContractAddress, - resolverAbi: values.resolverAbi, - resolverData: resolverContract.interface.encodeFunctionData( - values.resolverFunc, - sortInputsByOrder( - values.resolverFunc, - values.resolverAbi, - values.resolverInputs - ) - ), - } - } - - setCreateTxWaiting(true) - const task = await createTask({ - args: taskData, - }) - - setCreateTx(task.tx) - await task.tx.wait() - setCreateTxWaiting(false) - router.push(`/integration/gelato/tasks/${task.taskId || ""}`) - } - - return ( - -
    -
    -
    -

    Execute

    -
    - - {shouldShowFunction && ( - - )} - {shouldShowInputs && ( - - )} -
    - {shouldShowResolverInputs && } - {shouldShowRestrictionInfo && ( - - )} - {shouldShowIntervalInput && } - {shouldShowPayment && ( - <> - - -
    - -
    - - )} - - {createTx && createTxWaiting && ( -
    -
    -
    Transaction Started
    -
    -
    - {moment(createTx.timestamp).format("ll, HH:mm:ss")} -
    -
    - -
    -
    -
    - )} - {createTaskIsError && ( -
    - Error creating task, please try again -
    - )} -
    - - ) -} diff --git a/integrations/gelato/components/create-task/execution-values.tsx b/integrations/gelato/components/create-task/execution-values.tsx deleted file mode 100644 index b37f6cf..0000000 --- a/integrations/gelato/components/create-task/execution-values.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import { ChangeEvent, useMemo } from "react" -import { Abi } from "abitype" -import { useFormContext } from "react-hook-form" - -import { cn } from "@/lib/utils" - -import { getAbiFunctions, validateInput } from "../../utils/helpers" -import { ValidationError } from "../errors/validation-error" -import { CreateTaskForm } from "./create-task" - -export type ExecutionValuesProps = { - inputFieldName: "predefinedInputs" | "resolverInputs" - funcFieldName: "func" | "resolverFunc" - abiFieldName: "abi" | "resolverAbi" -} - -export function ExecutionValues({ - inputFieldName, - funcFieldName, - abiFieldName, -}: ExecutionValuesProps) { - const { - watch, - setValue, - register, - formState: { errors }, - } = useFormContext() - - const [inputDefinition, func, abi, predefinedInputs] = watch([ - "inputDefinition", - funcFieldName, - abiFieldName, - inputFieldName, - ]) - - const isResolver = funcFieldName === "resolverFunc" - const shouldShowInputs = inputDefinition === "predefined" || isResolver - - const selectedFunctionAbi = useMemo(() => { - if (!abi) return - - try { - return getAbiFunctions(JSON.parse(abi) as Abi).find( - (item) => item.name === func - ) - } catch (e) { - return - } - }, [abi, func]) - - return ( -
    - {!isResolver && ( -
    -
    - - -
    -
    - )} - {shouldShowInputs && selectedFunctionAbi && ( -
    - {selectedFunctionAbi.inputs.map((item, index) => ( -
    - - {item.name && ( - <> - - validateInput( - item.name as string, - value, - selectedFunctionAbi - ), - }, - onChange: (e: ChangeEvent) => { - setValue(inputFieldName, { - ...predefinedInputs, - [item.name as string]: e.target.value, - }) - }, - })} - /> - - - )} -
    - ))} -
    - )} -
    - ) -} diff --git a/integrations/gelato/components/create-task/function-input.tsx b/integrations/gelato/components/create-task/function-input.tsx deleted file mode 100644 index 30b14ef..0000000 --- a/integrations/gelato/components/create-task/function-input.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { useMemo } from "react" -import { Abi } from "abitype" -import { useFormContext } from "react-hook-form" - -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select" - -import { getAbiFunctions } from "../../utils/helpers" -import { CreateTaskForm } from "./create-task" - -export type FunctionInputProps = { - abiFieldName: "abi" | "resolverAbi" - funcFieldName: "func" | "resolverFunc" - inputsFieldName: "predefinedInputs" | "resolverInputs" -} -export function FunctionInput({ - abiFieldName, - funcFieldName, - inputsFieldName, -}: FunctionInputProps) { - const { watch, setValue } = useFormContext() - - const [formAbi] = watch([abiFieldName]) - - const abiFunctions = useMemo(() => { - if (!formAbi) return - - try { - return getAbiFunctions(JSON.parse(formAbi) as Abi) - } catch (e) { - return - } - }, [formAbi]) - - return ( -
    - - -
    - ) -} diff --git a/integrations/gelato/components/create-task/hooks/use-wizard.ts b/integrations/gelato/components/create-task/hooks/use-wizard.ts deleted file mode 100644 index 1e7fca7..0000000 --- a/integrations/gelato/components/create-task/hooks/use-wizard.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { useMemo } from "react" -import { AbiFunction } from "abitype" -import { UseFormReturn } from "react-hook-form" -import { Abi } from "viem" - -import { - getAbiFunctions, - getTotalInterval, - inputsAreFilled, -} from "@/integrations/gelato/utils/helpers" - -import { CreateTaskForm } from "../create-task" - -export const useWizard = (form: UseFormReturn) => { - const { watch } = form - - const [ - contractAddress, - abi, - func, - predefinedInputs, - inputDefinition, - d, - h, - m, - s, - timeOption, - name, - resolverAbi, - resolverFunc, - resolverInputs, - ] = watch([ - "contractAddress", - "abi", - "func", - "predefinedInputs", - "inputDefinition", - "timeInterval.days", - "timeInterval.hours", - "timeInterval.minutes", - "timeInterval.seconds", - "timeOption", - "name", - "resolverAbi", - "resolverFunc", - "resolverInputs", - ]) - - const allPredefinedInputsAreFilled = useMemo(() => { - if (!abi) return - - try { - return inputsAreFilled( - getAbiFunctions(JSON.parse(abi) as Abi).find( - (item) => item.name === func - ) as AbiFunction, - predefinedInputs as NonNullable - ) - } catch (e) { - return false - } - }, [abi, func, predefinedInputs, inputDefinition]) - - const allResolverInputsAreFilled = useMemo(() => { - if (!resolverAbi) return - - try { - return inputsAreFilled( - getAbiFunctions(JSON.parse(resolverAbi) as Abi).find( - (item) => item.name === resolverFunc - ) as AbiFunction, - resolverInputs as NonNullable - ) - } catch (e) { - return false - } - }, [resolverAbi, resolverFunc, resolverInputs]) - - const totalInterval = useMemo( - () => getTotalInterval(d, h, m, s), - [d, h, m, s] - ) - - const shouldShowFunction = !!abi && !!contractAddress - const shouldShowInputs = shouldShowFunction && !!func - const shouldShowResolverInputs = - shouldShowInputs && inputDefinition === "resolver" - const allInputsAreFilled = - inputDefinition === "resolver" - ? allResolverInputsAreFilled - : allPredefinedInputsAreFilled - - const shouldShowRestrictionInfo = shouldShowInputs && !!allInputsAreFilled - const shouldShowIntervalInput = - shouldShowRestrictionInfo && inputDefinition === "predefined" - - const intervalIsValid = shouldShowIntervalInput ? totalInterval >= 25 : true - - const shouldShowPayment = - shouldShowRestrictionInfo && - (intervalIsValid || timeOption == "whenever_possible") - const isValid = shouldShowPayment && !!name - - return { - shouldShowFunction, - shouldShowInputs, - shouldShowResolverInputs, - shouldShowRestrictionInfo, - shouldShowIntervalInput, - shouldShowPayment, - isValid, - } -} diff --git a/integrations/gelato/components/create-task/index.ts b/integrations/gelato/components/create-task/index.ts deleted file mode 100644 index a7f9a70..0000000 --- a/integrations/gelato/components/create-task/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./create-task" diff --git a/integrations/gelato/components/create-task/interval-input.tsx b/integrations/gelato/components/create-task/interval-input.tsx deleted file mode 100644 index c20d9a2..0000000 --- a/integrations/gelato/components/create-task/interval-input.tsx +++ /dev/null @@ -1,207 +0,0 @@ -import { useEffect, useMemo, useState } from "react" -import moment from "moment" -import { useFormContext } from "react-hook-form" - -import { cn } from "@/lib/utils" -import { Switch } from "@/components/ui/switch" - -import { getTotalInterval } from "../../utils/helpers" -import { ValidationError } from "../errors/validation-error" -import { CreateTaskForm } from "./create-task" - -export function IntervalInput() { - const [date, setDate] = useState(Date.now()) - - const { - watch, - setValue, - register, - setError, - clearErrors, - formState: { errors }, - } = useFormContext() - - const [ - timeOption, - days, - hours, - minutes, - seconds, - startImmediately, - startTime, - ] = watch([ - "timeOption", - "timeInterval.days", - "timeInterval.hours", - "timeInterval.minutes", - "timeInterval.seconds", - "startImmediately", - "startTime", - ]) - - const totalInterval = useMemo( - () => getTotalInterval(days, hours, minutes, seconds), - [days, hours, minutes, seconds] - ) - - useEffect(() => { - if (totalInterval < 25) { - setError("timeInterval", { - message: "Please fill a valid interval", - }) - } else { - clearErrors("timeInterval") - } - }, [totalInterval]) - - useEffect(() => { - const timer = setInterval(() => { - setDate(Date.now()) - }, 1000) - - return () => clearInterval(timer) - }, []) - - const firstExecution = useMemo( - () => moment(date).format("ll, HH:mm:ss"), - [date] - ) - const secondExecution = useMemo( - () => moment(date).add(totalInterval, "seconds").format("ll, HH:mm:ss"), - [date] - ) - - return ( -
    -
    -

    When

    -
    -
    -
    -
    - - -
    -
    -
    -
    - {timeOption === "exact" ? ( -
    -
    - Execute a contract at a given interval with a set start time. -
    -
    - -
    - - + - - + - - + - -
    -
    - - -
    - - -
    -
    - setValue("startImmediately", val)} - /> - -
    - {totalInterval > 0 && ( -
    -
    - 1st execution: - - {startImmediately - ? firstExecution - : moment(startTime).format("ll, HH:mm:ss")} - -
    -
    - 2nd execution: - - {startImmediately - ? secondExecution - : moment(startTime) - .add(totalInterval, "seconds") - .format("ll, HH:mm:ss")} - -
    -
    - )} -
    - ) : ( -
    -
    - Gelato will check if the function is executable at every block. -
    -
    - Checking the function will start immediately after the task is - created. Make sure the function can only be executed from time to - time and not always. -
    -
    - )} -
    -
    - ) -} diff --git a/integrations/gelato/components/create-task/payment-input.tsx b/integrations/gelato/components/create-task/payment-input.tsx deleted file mode 100644 index ccf24a5..0000000 --- a/integrations/gelato/components/create-task/payment-input.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import { useFormContext } from "react-hook-form" - -import { cn } from "@/lib/utils" - -import { GELATO_CONSTANTS } from "../../utils/constants" -import { CreateTaskForm } from "./create-task" - -export function PaymentInput() { - const { watch, setValue } = useFormContext() - - const [payWith] = watch(["payWith"]) - - return ( -
    -
    -

    Pay with

    -
    - -
    -
    - Choose how the task should be paid for. The cost of each execution - equals the network fee -
    - -
    -
    - - -
    -
    - {payWith === "transaction" && ( -
    - The fees will be taken from the address of the automated contract.{" "} - - Docs - -
    - )} -
    -
    - ) -} diff --git a/integrations/gelato/components/create-task/resolver-input.tsx b/integrations/gelato/components/create-task/resolver-input.tsx deleted file mode 100644 index c8bac7e..0000000 --- a/integrations/gelato/components/create-task/resolver-input.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import { GELATO_CONSTANTS } from "../../utils/constants" -import { ContractInput } from "./contract-input" -import { ExecutionValues } from "./execution-values" -import { FunctionInput } from "./function-input" - -export function ResolverInput() { - return ( -
    -
    -

    When

    -
    -
    -
    - Resolver Contracts allow you to define arbitrary conditions that - should trigger an execution. -
    - -
    - - - -
    -
    -
    - ) -} diff --git a/integrations/gelato/components/create-task/restriction-info.tsx b/integrations/gelato/components/create-task/restriction-info.tsx deleted file mode 100644 index 5035a63..0000000 --- a/integrations/gelato/components/create-task/restriction-info.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { useMemo, useState } from "react" -import CopyToClipboard from "react-copy-to-clipboard" -import { useFormContext } from "react-hook-form" -import { FaCopy } from "react-icons/fa" - -import { getFunctionSignature, truncateEthAddress } from "../../utils/helpers" -import { CreateTaskForm } from "./create-task" - -export function RestrictionInfo({ - dedicatedMsgSender, -}: { - dedicatedMsgSender?: string -}) { - const [copied, setCopied] = useState(false) - - const { watch } = useFormContext() - - const [abi, func] = watch(["abi", "func"]) - - const functionSignature = useMemo(() => { - if (!abi || !func) return false - - return getFunctionSignature(abi, func) - }, [abi, func]) - - return ( -
    -
    - If the {functionSignature}{" "} - function has access restrictions, whitelist this address as a{" "} - msg.sender -
    - { - setCopied(true) - setTimeout(() => setCopied(false), 3000) - }} - > -
    - {copied ? ( - <>Copied! - ) : ( - <> - {truncateEthAddress(dedicatedMsgSender || "", 20)}{" "} - - - )} -
    -
    -
    - ) -} diff --git a/integrations/gelato/components/create-task/task-name-input.tsx b/integrations/gelato/components/create-task/task-name-input.tsx deleted file mode 100644 index 44f02ef..0000000 --- a/integrations/gelato/components/create-task/task-name-input.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { useFormContext } from "react-hook-form" - -import { CreateTaskForm } from "./create-task" - -export function TaskNameInput() { - const { register } = useFormContext() - - return ( -
    -
    -

    Task name

    -
    -
    - -
    -
    - ) -} diff --git a/integrations/gelato/components/errors/validation-error.tsx b/integrations/gelato/components/errors/validation-error.tsx deleted file mode 100644 index 8fd985d..0000000 --- a/integrations/gelato/components/errors/validation-error.tsx +++ /dev/null @@ -1,5 +0,0 @@ -export function ValidationError({ error }: { error?: string }) { - if (!error) return <> - - return
    × {error}
    -} diff --git a/integrations/gelato/components/index.tsx b/integrations/gelato/components/index.tsx deleted file mode 100644 index bcbb2e9..0000000 --- a/integrations/gelato/components/index.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./active-tasks" -export * from "./create-task" -export * from "./task-view" -export * from "./rename-task" diff --git a/integrations/gelato/components/rename-task.tsx b/integrations/gelato/components/rename-task.tsx deleted file mode 100644 index 0405070..0000000 --- a/integrations/gelato/components/rename-task.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { useForm } from "react-hook-form" -import { FaSpinner } from "react-icons/fa" - -import { Button } from "@/components/ui/button" -import { Card, CardContent } from "@/components/ui/card" - -import { useRenameTask } from "../hooks" -import { ValidationError } from "./errors/validation-error" - -type RenameTaskForm = { - name: string -} - -export function RenameTask({ - taskId, - name, - onSave, -}: { - taskId: string - name: string - onSave: () => void -}) { - const form = useForm({ - defaultValues: { - name, - }, - mode: "all", - }) - - const { mutateAsync: renameTask, isLoading } = useRenameTask() - - const onSubmit = async () => { - const { name } = form.getValues() - - await renameTask({ - taskId, - name, - }) - .catch(() => { - // - }) - .finally(() => onSave()) - } - - return ( - - -
    -
    -
    Rename task
    - - val.length > 3 - ? true - : "Name needs to be min 3 characters long", - }, - })} - className="input max-w-md !rounded-2xl dark:!bg-zinc-700 dark:!text-white" - defaultValue={name} - /> - -
    - - -
    -
    - ) -} diff --git a/integrations/gelato/components/task-view/executing-address.tsx b/integrations/gelato/components/task-view/executing-address.tsx deleted file mode 100644 index 63a045d..0000000 --- a/integrations/gelato/components/task-view/executing-address.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useState } from "react" -import CopyToClipboard from "react-copy-to-clipboard" -import { FaCopy } from "react-icons/fa" - -import { useMsgSender } from "../../hooks/use-msg-sender" -import { truncateEthAddress } from "../../utils/helpers" - -export function ExecutingAddress() { - const [copied, setCopied] = useState(false) - const { data: dedicatedMsgSender } = useMsgSender() - - return ( -
    -
    -

    Executing address

    -
    -
    -

    Your msg.sender

    -

    - { - setCopied(true) - setTimeout(() => setCopied(false), 3000) - }} - > -

    - {copied ? ( - <>Copied! - ) : ( - <> - - {truncateEthAddress(dedicatedMsgSender?.address || "", 20)} - {" "} - - - )} -
    - -

    -
    -
    - ) -} diff --git a/integrations/gelato/components/task-view/function-data.tsx b/integrations/gelato/components/task-view/function-data.tsx deleted file mode 100644 index 5b2ecf4..0000000 --- a/integrations/gelato/components/task-view/function-data.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { getTaskFunctionData } from "../../utils/helpers" - -export type FunctionDataProps = { - functionData: ReturnType -} - -export function FunctionData({ functionData }: FunctionDataProps) { - return ( -
    -
    -

    - Automated Function -

    -

    -

    -
    - {functionData.func.name} - - ( - {functionData.func.inputs.map((input, index) => ( - - - {input.type} - - : - - {input.name} - - {index < functionData.func.inputs.length - 1 && ( - , - )} - - ))} - ) - -
    -
    -

    -
    -
    - ) -} diff --git a/integrations/gelato/components/task-view/index.ts b/integrations/gelato/components/task-view/index.ts deleted file mode 100644 index 9f95995..0000000 --- a/integrations/gelato/components/task-view/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./task-view" diff --git a/integrations/gelato/components/task-view/input-values.tsx b/integrations/gelato/components/task-view/input-values.tsx deleted file mode 100644 index 8ed0ef6..0000000 --- a/integrations/gelato/components/task-view/input-values.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { getTaskFunctionData } from "../../utils/helpers" - -export type InputValuesProps = { - functionData: ReturnType -} - -export function InputValues({ functionData }: InputValuesProps) { - return ( -
    -

    Input Values

    - {functionData.func.inputs.map((item, index) => ( -
    -

    - {item.type} - {item.name} -

    -

    - {String(functionData.data[index])} -

    -
    - ))} -
    - ) -} diff --git a/integrations/gelato/components/task-view/interval-values.tsx b/integrations/gelato/components/task-view/interval-values.tsx deleted file mode 100644 index 069d8a4..0000000 --- a/integrations/gelato/components/task-view/interval-values.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import moment from "moment" - -export type IntervalValuesProps = { - startTime?: string | null - interval?: string | null - createdAt: string -} - -export function IntervalValues({ - startTime, - interval, - createdAt, -}: IntervalValuesProps) { - const nextExecution = parseInt(startTime?.toString() || "") - ? moment(startTime?.toString()) - .add(parseInt(interval as string), "seconds") - .format("ll, HH:mm:ss") - : moment - .unix(parseInt(createdAt)) - .add(parseInt(interval as string), "seconds") - .format("ll, HH:mm:ss") - - return ( -
    -
    -

    When to execute

    -
    - {startTime && interval ? ( - <> -
    -

    Interval

    -

    - {moment - .duration({ seconds: parseInt(interval || "0") }) - .humanize()} -

    -
    -
    -

    - Next Execution -

    -

    {nextExecution}

    -
    - - ) : ( -
    -

    Next execution

    -

    - Will be attempted at the next block -

    -
    - )} -
    - ) -} diff --git a/integrations/gelato/components/task-view/payment-info.tsx b/integrations/gelato/components/task-view/payment-info.tsx deleted file mode 100644 index a087a5d..0000000 --- a/integrations/gelato/components/task-view/payment-info.tsx +++ /dev/null @@ -1,19 +0,0 @@ -export function PaymentInfo({ - useTaskTreasuryFunds, -}: { - useTaskTreasuryFunds: boolean -}) { - return ( -
    -
    -

    Pay with

    -
    -
    -

    Spend

    -

    - {useTaskTreasuryFunds ? "Gelato Balance" : "Contract Funds"} -

    -
    -
    - ) -} diff --git a/integrations/gelato/components/task-view/resolver-values.tsx b/integrations/gelato/components/task-view/resolver-values.tsx deleted file mode 100644 index 185a15b..0000000 --- a/integrations/gelato/components/task-view/resolver-values.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import { getTaskFunctionData } from "../../utils/helpers" -import { InputValues } from "./input-values" - -export type ResolverValuesProps = { - functionData: ReturnType - resolverAddress: string -} - -export function ResolverValues({ - functionData, - resolverAddress, -}: ResolverValuesProps) { - return ( -
    -
    -

    When to execute

    -
    -
    -

    Resolver Address

    -

    {resolverAddress}

    -
    -
    -

    Resolver Function

    -

    -

    -
    - {functionData.func.name} - - ( - {functionData.func.inputs.map((input, index) => ( - - {input.type} - : - - {input.name} - - {index < functionData.func.inputs.length - 1 && ( - , - )} - - ))} - ) - -
    -
    -

    -
    -
    - -
    -
    - ) -} diff --git a/integrations/gelato/components/task-view/task-view.tsx b/integrations/gelato/components/task-view/task-view.tsx deleted file mode 100644 index 67c0987..0000000 --- a/integrations/gelato/components/task-view/task-view.tsx +++ /dev/null @@ -1,242 +0,0 @@ -import { useMemo, useState } from "react" -import Link from "next/link" -import moment from "moment" -import { FaEdit, FaExternalLinkAlt, FaTimesCircle } from "react-icons/fa" -import { FiChevronLeft } from "react-icons/fi" -import { useNetwork } from "wagmi" - -import { useAbi, useTask } from "../../hooks" -import { useTaskResolver } from "../../hooks/use-task-resolver" -import { - formatFee, - getAddressUrl, - getTaskFunctionData, - truncateEthAddress, -} from "../../utils/helpers" -import { decodeModuleArgs } from "../../utils/resolverDecoder" -import { RenameTask } from "../rename-task" -import { ExecutingAddress } from "./executing-address" -import { FunctionData } from "./function-data" -import { InputValues } from "./input-values" -import { IntervalValues } from "./interval-values" -import { PaymentInfo } from "./payment-info" -import { ResolverValues } from "./resolver-values" - -export type TasKViewProps = { - taskId: string -} - -export function TaskView({ taskId }: TasKViewProps) { - const [showRename, setShowRename] = useState(false) - - const { data: taskWithName, isLoading, refetch } = useTask({ taskId }) - const { chain } = useNetwork() - - const { data: abi } = useAbi({ - contractAddress: taskWithName?.task.execAddress as string, - }) - - const { data: taskResolver } = useTaskResolver({ taskId }) - - const { data: resolverAbi } = useAbi({ - contractAddress: taskResolver?.address as string, - }) - - const functionData = useMemo(() => { - if (!taskWithName) return - - const { moduleArgs, modules } = taskWithName.task - - const decodedArgs = decodeModuleArgs( - moduleArgs as string[], - modules as number[] - ) - - if (taskResolver && resolverAbi && taskResolver.address) { - return { - args: decodedArgs, - data: getTaskFunctionData( - taskResolver.address, - resolverAbi, - decodedArgs.resolverData as string - ), - } - } - - if (!abi) return - - return { - args: decodedArgs, - data: getTaskFunctionData( - taskWithName.task.execAddress, - abi, - taskWithName.task.execDataOrSelector as string - ), - } - }, [abi, taskWithName, taskResolver, resolverAbi]) - - const handleRename = () => { - setShowRename(false) - refetch().catch((e) => console.error(e)) - } - - if (isLoading || !taskWithName) { - return ( -
    - ) - } - - const { task, name } = taskWithName - - return ( -
    -
    -
    - - - Back - -
    -
    -
    -

    - {truncateEthAddress(name, 30)} -

    -
    - {showRename ? ( - setShowRename(false)} - /> - ) : ( - setShowRename(true)} - /> - )} -
    -
    - - - {" "} - • {" "} - - {task.status} - -
    -
    - {showRename && ( - handleRename()} - /> - )} -
    - Created By: - - - {truncateEthAddress(task.taskCreator.id, 20)} - - - - - {moment.unix(task.createdAt as number).format("ll, HH:mm:ss")} - -
    -
    - Task ID: {taskId} -
    -
    -
    -
    {task.executionCount}
    -
    Executions
    -
    -
    -
    - ${" "} - {task.feeTotalUsd - ? formatFee(task.feeTotalUsd as string) - : "0.00"} -
    -
    Cost
    -
    -
    -
    -
    -
    -
    -
    -

    Execute

    -
    -
    -

    - Target Contract -

    -

    -

    -

    -
    -
    - {!taskResolver?.address ? ( - <> - {functionData && ( - - )} -
    - {functionData && ( - - )} -
    - - - ) : ( - <> -
    - {functionData && ( - - )} - - )} -
    - -
    - -
    -
    -
    -
    - ) -} diff --git a/integrations/gelato/graphql/codegen.ts b/integrations/gelato/graphql/codegen.ts deleted file mode 100644 index dfdfe43..0000000 --- a/integrations/gelato/graphql/codegen.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { join } from "path" -import { CodegenConfig } from "@graphql-codegen/cli" - -const pth = (path: string) => { - return join(__dirname, path) -} - -const config: CodegenConfig = { - schema: "https://api.thegraph.com/subgraphs/name/gelatodigital/poke-me", - documents: [pth("/tasks.graphql")], - generates: { - [pth("graphql/generated/")]: { - preset: "client", - presetConfig: { - fragmentMasking: false, - }, - }, - }, -} - -export default config diff --git a/integrations/gelato/graphql/graphql/generated/gql.ts b/integrations/gelato/graphql/graphql/generated/gql.ts deleted file mode 100644 index 66452dd..0000000 --- a/integrations/gelato/graphql/graphql/generated/gql.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* eslint-disable */ -import * as types from './graphql' -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' - -/** - * Map of all GraphQL operations in the project. - * - * This map has several performance disadvantages: - * 1. It is not tree-shakeable, so it will include all operations in the project. - * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle. - * 3. It does not support dead code elimination, so it will add unused operations. - * - * Therefore it is highly recommended to use the babel or swc plugin for production. - */ -const documents = { - 'query getAllTaskData($taskCreator: String, $limit: Int, $skip: Int) {\n tasks(\n first: $limit\n skip: $skip\n where: {taskCreator: $taskCreator}\n orderBy: createdAt\n orderDirection: desc\n ) {\n id\n version {\n id\n }\n taskCreator {\n id\n opsProxy\n }\n executionCount\n feeTotalUsd\n feeTotal\n feeToken\n execAddress\n status\n nextExec\n interval\n execDataOrSelector\n resolverAddress\n resolverData\n modules\n moduleArgs\n useTaskTreasuryFunds\n resolverHash\n createdTxHash\n cancelledTxHash\n createdAt\n updatedAt\n }\n}\n\nquery getTask($id: ID!) {\n task(id: $id) {\n id\n version {\n id\n }\n taskCreator {\n id\n opsProxy\n }\n executionCount\n feeTotalUsd\n feeTotal\n feeToken\n execAddress\n status\n nextExec\n interval\n execDataOrSelector\n resolverAddress\n resolverData\n modules\n moduleArgs\n useTaskTreasuryFunds\n resolverHash\n createdTxHash\n cancelledTxHash\n createdAt\n updatedAt\n }\n}': - types.GetAllTaskDataDocument, -} - -/** - * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - * - * - * @example - * ```ts - * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`); - * ``` - * - * The query argument is unknown! - * Please regenerate the types. - */ -export function graphql(source: string): unknown - -/** - * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - */ -export function graphql( - source: 'query getAllTaskData($taskCreator: String, $limit: Int, $skip: Int) {\n tasks(\n first: $limit\n skip: $skip\n where: {taskCreator: $taskCreator}\n orderBy: createdAt\n orderDirection: desc\n ) {\n id\n version {\n id\n }\n taskCreator {\n id\n opsProxy\n }\n executionCount\n feeTotalUsd\n feeTotal\n feeToken\n execAddress\n status\n nextExec\n interval\n execDataOrSelector\n resolverAddress\n resolverData\n modules\n moduleArgs\n useTaskTreasuryFunds\n resolverHash\n createdTxHash\n cancelledTxHash\n createdAt\n updatedAt\n }\n}\n\nquery getTask($id: ID!) {\n task(id: $id) {\n id\n version {\n id\n }\n taskCreator {\n id\n opsProxy\n }\n executionCount\n feeTotalUsd\n feeTotal\n feeToken\n execAddress\n status\n nextExec\n interval\n execDataOrSelector\n resolverAddress\n resolverData\n modules\n moduleArgs\n useTaskTreasuryFunds\n resolverHash\n createdTxHash\n cancelledTxHash\n createdAt\n updatedAt\n }\n}' -): (typeof documents)['query getAllTaskData($taskCreator: String, $limit: Int, $skip: Int) {\n tasks(\n first: $limit\n skip: $skip\n where: {taskCreator: $taskCreator}\n orderBy: createdAt\n orderDirection: desc\n ) {\n id\n version {\n id\n }\n taskCreator {\n id\n opsProxy\n }\n executionCount\n feeTotalUsd\n feeTotal\n feeToken\n execAddress\n status\n nextExec\n interval\n execDataOrSelector\n resolverAddress\n resolverData\n modules\n moduleArgs\n useTaskTreasuryFunds\n resolverHash\n createdTxHash\n cancelledTxHash\n createdAt\n updatedAt\n }\n}\n\nquery getTask($id: ID!) {\n task(id: $id) {\n id\n version {\n id\n }\n taskCreator {\n id\n opsProxy\n }\n executionCount\n feeTotalUsd\n feeTotal\n feeToken\n execAddress\n status\n nextExec\n interval\n execDataOrSelector\n resolverAddress\n resolverData\n modules\n moduleArgs\n useTaskTreasuryFunds\n resolverHash\n createdTxHash\n cancelledTxHash\n createdAt\n updatedAt\n }\n}'] - -export function graphql(source: string) { - return (documents as any)[source] ?? {} -} - -export type DocumentType> = TDocumentNode extends DocumentNode ? TType : never diff --git a/integrations/gelato/graphql/graphql/generated/graphql.ts b/integrations/gelato/graphql/graphql/generated/graphql.ts deleted file mode 100644 index 90d0450..0000000 --- a/integrations/gelato/graphql/graphql/generated/graphql.ts +++ /dev/null @@ -1,1615 +0,0 @@ -/* eslint-disable */ -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' -export type Maybe = T | null -export type InputMaybe = Maybe -export type Exact = { [K in keyof T]: T[K] } -export type MakeOptional = Omit & { [SubKey in K]?: Maybe } -export type MakeMaybe = Omit & { [SubKey in K]: Maybe } -export type MakeEmpty = { [_ in K]?: never } -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never } -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string } - String: { input: string; output: string } - Boolean: { input: boolean; output: boolean } - Int: { input: number; output: number } - Float: { input: number; output: number } - BigDecimal: { input: any; output: any } - BigInt: { input: any; output: any } - Bytes: { input: any; output: any } - /** - * 8 bytes signed integer - * - */ - Int8: { input: any; output: any } -} - -export type Balance = { - __typename?: 'Balance' - balance: Scalars['BigInt']['output'] - id: Scalars['ID']['output'] - paymentToken: PaymentToken - taskCreator: TaskCreator -} - -export type Balance_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe - and?: InputMaybe>> - balance?: InputMaybe - balance_gt?: InputMaybe - balance_gte?: InputMaybe - balance_in?: InputMaybe> - balance_lt?: InputMaybe - balance_lte?: InputMaybe - balance_not?: InputMaybe - balance_not_in?: InputMaybe> - id?: InputMaybe - id_gt?: InputMaybe - id_gte?: InputMaybe - id_in?: InputMaybe> - id_lt?: InputMaybe - id_lte?: InputMaybe - id_not?: InputMaybe - id_not_in?: InputMaybe> - or?: InputMaybe>> - paymentToken?: InputMaybe - paymentToken_?: InputMaybe - paymentToken_contains?: InputMaybe - paymentToken_contains_nocase?: InputMaybe - paymentToken_ends_with?: InputMaybe - paymentToken_ends_with_nocase?: InputMaybe - paymentToken_gt?: InputMaybe - paymentToken_gte?: InputMaybe - paymentToken_in?: InputMaybe> - paymentToken_lt?: InputMaybe - paymentToken_lte?: InputMaybe - paymentToken_not?: InputMaybe - paymentToken_not_contains?: InputMaybe - paymentToken_not_contains_nocase?: InputMaybe - paymentToken_not_ends_with?: InputMaybe - paymentToken_not_ends_with_nocase?: InputMaybe - paymentToken_not_in?: InputMaybe> - paymentToken_not_starts_with?: InputMaybe - paymentToken_not_starts_with_nocase?: InputMaybe - paymentToken_starts_with?: InputMaybe - paymentToken_starts_with_nocase?: InputMaybe - taskCreator?: InputMaybe - taskCreator_?: InputMaybe - taskCreator_contains?: InputMaybe - taskCreator_contains_nocase?: InputMaybe - taskCreator_ends_with?: InputMaybe - taskCreator_ends_with_nocase?: InputMaybe - taskCreator_gt?: InputMaybe - taskCreator_gte?: InputMaybe - taskCreator_in?: InputMaybe> - taskCreator_lt?: InputMaybe - taskCreator_lte?: InputMaybe - taskCreator_not?: InputMaybe - taskCreator_not_contains?: InputMaybe - taskCreator_not_contains_nocase?: InputMaybe - taskCreator_not_ends_with?: InputMaybe - taskCreator_not_ends_with_nocase?: InputMaybe - taskCreator_not_in?: InputMaybe> - taskCreator_not_starts_with?: InputMaybe - taskCreator_not_starts_with_nocase?: InputMaybe - taskCreator_starts_with?: InputMaybe - taskCreator_starts_with_nocase?: InputMaybe -} - -export enum Balance_OrderBy { - Balance = 'balance', - Id = 'id', - PaymentToken = 'paymentToken', - PaymentTokenDecimals = 'paymentToken__decimals', - PaymentTokenId = 'paymentToken__id', - PaymentTokenName = 'paymentToken__name', - PaymentTokenSymbol = 'paymentToken__symbol', - TaskCreator = 'taskCreator', - TaskCreatorId = 'taskCreator__id', - TaskCreatorOpsProxy = 'taskCreator__opsProxy', -} - -export type BlockChangedFilter = { - number_gte: Scalars['Int']['input'] -} - -export type Block_Height = { - hash?: InputMaybe - number?: InputMaybe - number_gte?: InputMaybe -} - -/** Defines the order direction, either ascending or descending */ -export enum OrderDirection { - Asc = 'asc', - Desc = 'desc', -} - -export type PaymentToken = { - __typename?: 'PaymentToken' - decimals: Scalars['BigInt']['output'] - id: Scalars['ID']['output'] - name: Scalars['String']['output'] - symbol: Scalars['String']['output'] -} - -export type PaymentToken_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe - and?: InputMaybe>> - decimals?: InputMaybe - decimals_gt?: InputMaybe - decimals_gte?: InputMaybe - decimals_in?: InputMaybe> - decimals_lt?: InputMaybe - decimals_lte?: InputMaybe - decimals_not?: InputMaybe - decimals_not_in?: InputMaybe> - id?: InputMaybe - id_gt?: InputMaybe - id_gte?: InputMaybe - id_in?: InputMaybe> - id_lt?: InputMaybe - id_lte?: InputMaybe - id_not?: InputMaybe - id_not_in?: InputMaybe> - name?: InputMaybe - name_contains?: InputMaybe - name_contains_nocase?: InputMaybe - name_ends_with?: InputMaybe - name_ends_with_nocase?: InputMaybe - name_gt?: InputMaybe - name_gte?: InputMaybe - name_in?: InputMaybe> - name_lt?: InputMaybe - name_lte?: InputMaybe - name_not?: InputMaybe - name_not_contains?: InputMaybe - name_not_contains_nocase?: InputMaybe - name_not_ends_with?: InputMaybe - name_not_ends_with_nocase?: InputMaybe - name_not_in?: InputMaybe> - name_not_starts_with?: InputMaybe - name_not_starts_with_nocase?: InputMaybe - name_starts_with?: InputMaybe - name_starts_with_nocase?: InputMaybe - or?: InputMaybe>> - symbol?: InputMaybe - symbol_contains?: InputMaybe - symbol_contains_nocase?: InputMaybe - symbol_ends_with?: InputMaybe - symbol_ends_with_nocase?: InputMaybe - symbol_gt?: InputMaybe - symbol_gte?: InputMaybe - symbol_in?: InputMaybe> - symbol_lt?: InputMaybe - symbol_lte?: InputMaybe - symbol_not?: InputMaybe - symbol_not_contains?: InputMaybe - symbol_not_contains_nocase?: InputMaybe - symbol_not_ends_with?: InputMaybe - symbol_not_ends_with_nocase?: InputMaybe - symbol_not_in?: InputMaybe> - symbol_not_starts_with?: InputMaybe - symbol_not_starts_with_nocase?: InputMaybe - symbol_starts_with?: InputMaybe - symbol_starts_with_nocase?: InputMaybe -} - -export enum PaymentToken_OrderBy { - Decimals = 'decimals', - Id = 'id', - Name = 'name', - Symbol = 'symbol', -} - -export type Query = { - __typename?: 'Query' - /** Access to subgraph metadata */ - _meta?: Maybe<_Meta_> - balance?: Maybe - balances: Array - paymentToken?: Maybe - paymentTokens: Array - statusInfo?: Maybe - statusInfos: Array - task?: Maybe - taskCreator?: Maybe - taskCreators: Array - taskExecution?: Maybe - taskExecutions: Array - tasks: Array - transaction?: Maybe - transactions: Array - version?: Maybe - versions: Array -} - -export type Query_MetaArgs = { - block?: InputMaybe -} - -export type QueryBalanceArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type QueryBalancesArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type QueryPaymentTokenArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type QueryPaymentTokensArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type QueryStatusInfoArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type QueryStatusInfosArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type QueryTaskArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type QueryTaskCreatorArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type QueryTaskCreatorsArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type QueryTaskExecutionArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type QueryTaskExecutionsArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type QueryTasksArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type QueryTransactionArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type QueryTransactionsArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type QueryVersionArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type QueryVersionsArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type StatusInfo = { - __typename?: 'StatusInfo' - id: Scalars['ID']['output'] - status: TaskStatus - task: Task - time: Scalars['BigInt']['output'] -} - -export type StatusInfo_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe - and?: InputMaybe>> - id?: InputMaybe - id_gt?: InputMaybe - id_gte?: InputMaybe - id_in?: InputMaybe> - id_lt?: InputMaybe - id_lte?: InputMaybe - id_not?: InputMaybe - id_not_in?: InputMaybe> - or?: InputMaybe>> - status?: InputMaybe - status_in?: InputMaybe> - status_not?: InputMaybe - status_not_in?: InputMaybe> - task?: InputMaybe - task_?: InputMaybe - task_contains?: InputMaybe - task_contains_nocase?: InputMaybe - task_ends_with?: InputMaybe - task_ends_with_nocase?: InputMaybe - task_gt?: InputMaybe - task_gte?: InputMaybe - task_in?: InputMaybe> - task_lt?: InputMaybe - task_lte?: InputMaybe - task_not?: InputMaybe - task_not_contains?: InputMaybe - task_not_contains_nocase?: InputMaybe - task_not_ends_with?: InputMaybe - task_not_ends_with_nocase?: InputMaybe - task_not_in?: InputMaybe> - task_not_starts_with?: InputMaybe - task_not_starts_with_nocase?: InputMaybe - task_starts_with?: InputMaybe - task_starts_with_nocase?: InputMaybe - time?: InputMaybe - time_gt?: InputMaybe - time_gte?: InputMaybe - time_in?: InputMaybe> - time_lt?: InputMaybe - time_lte?: InputMaybe - time_not?: InputMaybe - time_not_in?: InputMaybe> -} - -export enum StatusInfo_OrderBy { - Id = 'id', - Status = 'status', - Task = 'task', - TaskCancelledTxHash = 'task__cancelledTxHash', - TaskCreatedAt = 'task__createdAt', - TaskCreatedTxHash = 'task__createdTxHash', - TaskExecAddress = 'task__execAddress', - TaskExecDataOrSelector = 'task__execDataOrSelector', - TaskExecutionCount = 'task__executionCount', - TaskFeeToken = 'task__feeToken', - TaskFeeTotal = 'task__feeTotal', - TaskFeeTotalUsd = 'task__feeTotalUsd', - TaskId = 'task__id', - TaskInterval = 'task__interval', - TaskNextExec = 'task__nextExec', - TaskResolverAddress = 'task__resolverAddress', - TaskResolverData = 'task__resolverData', - TaskResolverHash = 'task__resolverHash', - TaskStatus = 'task__status', - TaskUpdatedAt = 'task__updatedAt', - TaskUseTaskTreasuryFunds = 'task__useTaskTreasuryFunds', - Time = 'time', -} - -export type Subscription = { - __typename?: 'Subscription' - /** Access to subgraph metadata */ - _meta?: Maybe<_Meta_> - balance?: Maybe - balances: Array - paymentToken?: Maybe - paymentTokens: Array - statusInfo?: Maybe - statusInfos: Array - task?: Maybe - taskCreator?: Maybe - taskCreators: Array - taskExecution?: Maybe - taskExecutions: Array - tasks: Array - transaction?: Maybe - transactions: Array - version?: Maybe - versions: Array -} - -export type Subscription_MetaArgs = { - block?: InputMaybe -} - -export type SubscriptionBalanceArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type SubscriptionBalancesArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type SubscriptionPaymentTokenArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type SubscriptionPaymentTokensArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type SubscriptionStatusInfoArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type SubscriptionStatusInfosArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type SubscriptionTaskArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type SubscriptionTaskCreatorArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type SubscriptionTaskCreatorsArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type SubscriptionTaskExecutionArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type SubscriptionTaskExecutionsArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type SubscriptionTasksArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type SubscriptionTransactionArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type SubscriptionTransactionsArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type SubscriptionVersionArgs = { - block?: InputMaybe - id: Scalars['ID']['input'] - subgraphError?: _SubgraphErrorPolicy_ -} - -export type SubscriptionVersionsArgs = { - block?: InputMaybe - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - subgraphError?: _SubgraphErrorPolicy_ - where?: InputMaybe -} - -export type Task = { - __typename?: 'Task' - cancelledTxHash?: Maybe - createdAt: Scalars['BigInt']['output'] - createdTxHash: Scalars['Bytes']['output'] - execAddress: Scalars['String']['output'] - execDataOrSelector: Scalars['Bytes']['output'] - executionCount?: Maybe - feeToken: Scalars['String']['output'] - feeTotal?: Maybe - feeTotalUsd?: Maybe - id: Scalars['ID']['output'] - interval?: Maybe - moduleArgs?: Maybe> - modules?: Maybe> - nextExec?: Maybe - resolverAddress?: Maybe - resolverData?: Maybe - resolverHash?: Maybe - status: TaskStatus - statusHistory?: Maybe> - taskCreator: TaskCreator - taskExecutions?: Maybe> - updatedAt: Scalars['BigInt']['output'] - useTaskTreasuryFunds: Scalars['Boolean']['output'] - version: Version -} - -export type TaskStatusHistoryArgs = { - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - where?: InputMaybe -} - -export type TaskTaskExecutionsArgs = { - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - where?: InputMaybe -} - -export type TaskCreator = { - __typename?: 'TaskCreator' - balances?: Maybe> - id: Scalars['ID']['output'] - opsProxy?: Maybe - tasks?: Maybe> - transactions?: Maybe> -} - -export type TaskCreatorBalancesArgs = { - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - where?: InputMaybe -} - -export type TaskCreatorTasksArgs = { - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - where?: InputMaybe -} - -export type TaskCreatorTransactionsArgs = { - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - where?: InputMaybe -} - -export type TaskCreator_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe - and?: InputMaybe>> - balances_?: InputMaybe - id?: InputMaybe - id_gt?: InputMaybe - id_gte?: InputMaybe - id_in?: InputMaybe> - id_lt?: InputMaybe - id_lte?: InputMaybe - id_not?: InputMaybe - id_not_in?: InputMaybe> - opsProxy?: InputMaybe - opsProxy_contains?: InputMaybe - opsProxy_contains_nocase?: InputMaybe - opsProxy_ends_with?: InputMaybe - opsProxy_ends_with_nocase?: InputMaybe - opsProxy_gt?: InputMaybe - opsProxy_gte?: InputMaybe - opsProxy_in?: InputMaybe> - opsProxy_lt?: InputMaybe - opsProxy_lte?: InputMaybe - opsProxy_not?: InputMaybe - opsProxy_not_contains?: InputMaybe - opsProxy_not_contains_nocase?: InputMaybe - opsProxy_not_ends_with?: InputMaybe - opsProxy_not_ends_with_nocase?: InputMaybe - opsProxy_not_in?: InputMaybe> - opsProxy_not_starts_with?: InputMaybe - opsProxy_not_starts_with_nocase?: InputMaybe - opsProxy_starts_with?: InputMaybe - opsProxy_starts_with_nocase?: InputMaybe - or?: InputMaybe>> - tasks_?: InputMaybe - transactions_?: InputMaybe -} - -export enum TaskCreator_OrderBy { - Balances = 'balances', - Id = 'id', - OpsProxy = 'opsProxy', - Tasks = 'tasks', - Transactions = 'transactions', -} - -export type TaskExecution = { - __typename?: 'TaskExecution' - execAddress: Scalars['String']['output'] - execData: Scalars['Bytes']['output'] - executedAt: Scalars['BigInt']['output'] - feeToken: PaymentToken - id: Scalars['ID']['output'] - success: Scalars['Boolean']['output'] - task: Task - txFee: Scalars['BigInt']['output'] - txFeeUsd: Scalars['BigInt']['output'] -} - -export type TaskExecution_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe - and?: InputMaybe>> - execAddress?: InputMaybe - execAddress_contains?: InputMaybe - execAddress_contains_nocase?: InputMaybe - execAddress_ends_with?: InputMaybe - execAddress_ends_with_nocase?: InputMaybe - execAddress_gt?: InputMaybe - execAddress_gte?: InputMaybe - execAddress_in?: InputMaybe> - execAddress_lt?: InputMaybe - execAddress_lte?: InputMaybe - execAddress_not?: InputMaybe - execAddress_not_contains?: InputMaybe - execAddress_not_contains_nocase?: InputMaybe - execAddress_not_ends_with?: InputMaybe - execAddress_not_ends_with_nocase?: InputMaybe - execAddress_not_in?: InputMaybe> - execAddress_not_starts_with?: InputMaybe - execAddress_not_starts_with_nocase?: InputMaybe - execAddress_starts_with?: InputMaybe - execAddress_starts_with_nocase?: InputMaybe - execData?: InputMaybe - execData_contains?: InputMaybe - execData_gt?: InputMaybe - execData_gte?: InputMaybe - execData_in?: InputMaybe> - execData_lt?: InputMaybe - execData_lte?: InputMaybe - execData_not?: InputMaybe - execData_not_contains?: InputMaybe - execData_not_in?: InputMaybe> - executedAt?: InputMaybe - executedAt_gt?: InputMaybe - executedAt_gte?: InputMaybe - executedAt_in?: InputMaybe> - executedAt_lt?: InputMaybe - executedAt_lte?: InputMaybe - executedAt_not?: InputMaybe - executedAt_not_in?: InputMaybe> - feeToken?: InputMaybe - feeToken_?: InputMaybe - feeToken_contains?: InputMaybe - feeToken_contains_nocase?: InputMaybe - feeToken_ends_with?: InputMaybe - feeToken_ends_with_nocase?: InputMaybe - feeToken_gt?: InputMaybe - feeToken_gte?: InputMaybe - feeToken_in?: InputMaybe> - feeToken_lt?: InputMaybe - feeToken_lte?: InputMaybe - feeToken_not?: InputMaybe - feeToken_not_contains?: InputMaybe - feeToken_not_contains_nocase?: InputMaybe - feeToken_not_ends_with?: InputMaybe - feeToken_not_ends_with_nocase?: InputMaybe - feeToken_not_in?: InputMaybe> - feeToken_not_starts_with?: InputMaybe - feeToken_not_starts_with_nocase?: InputMaybe - feeToken_starts_with?: InputMaybe - feeToken_starts_with_nocase?: InputMaybe - id?: InputMaybe - id_gt?: InputMaybe - id_gte?: InputMaybe - id_in?: InputMaybe> - id_lt?: InputMaybe - id_lte?: InputMaybe - id_not?: InputMaybe - id_not_in?: InputMaybe> - or?: InputMaybe>> - success?: InputMaybe - success_in?: InputMaybe> - success_not?: InputMaybe - success_not_in?: InputMaybe> - task?: InputMaybe - task_?: InputMaybe - task_contains?: InputMaybe - task_contains_nocase?: InputMaybe - task_ends_with?: InputMaybe - task_ends_with_nocase?: InputMaybe - task_gt?: InputMaybe - task_gte?: InputMaybe - task_in?: InputMaybe> - task_lt?: InputMaybe - task_lte?: InputMaybe - task_not?: InputMaybe - task_not_contains?: InputMaybe - task_not_contains_nocase?: InputMaybe - task_not_ends_with?: InputMaybe - task_not_ends_with_nocase?: InputMaybe - task_not_in?: InputMaybe> - task_not_starts_with?: InputMaybe - task_not_starts_with_nocase?: InputMaybe - task_starts_with?: InputMaybe - task_starts_with_nocase?: InputMaybe - txFee?: InputMaybe - txFeeUsd?: InputMaybe - txFeeUsd_gt?: InputMaybe - txFeeUsd_gte?: InputMaybe - txFeeUsd_in?: InputMaybe> - txFeeUsd_lt?: InputMaybe - txFeeUsd_lte?: InputMaybe - txFeeUsd_not?: InputMaybe - txFeeUsd_not_in?: InputMaybe> - txFee_gt?: InputMaybe - txFee_gte?: InputMaybe - txFee_in?: InputMaybe> - txFee_lt?: InputMaybe - txFee_lte?: InputMaybe - txFee_not?: InputMaybe - txFee_not_in?: InputMaybe> -} - -export enum TaskExecution_OrderBy { - ExecAddress = 'execAddress', - ExecData = 'execData', - ExecutedAt = 'executedAt', - FeeToken = 'feeToken', - FeeTokenDecimals = 'feeToken__decimals', - FeeTokenId = 'feeToken__id', - FeeTokenName = 'feeToken__name', - FeeTokenSymbol = 'feeToken__symbol', - Id = 'id', - Success = 'success', - Task = 'task', - TaskCancelledTxHash = 'task__cancelledTxHash', - TaskCreatedAt = 'task__createdAt', - TaskCreatedTxHash = 'task__createdTxHash', - TaskExecAddress = 'task__execAddress', - TaskExecDataOrSelector = 'task__execDataOrSelector', - TaskExecutionCount = 'task__executionCount', - TaskFeeToken = 'task__feeToken', - TaskFeeTotal = 'task__feeTotal', - TaskFeeTotalUsd = 'task__feeTotalUsd', - TaskId = 'task__id', - TaskInterval = 'task__interval', - TaskNextExec = 'task__nextExec', - TaskResolverAddress = 'task__resolverAddress', - TaskResolverData = 'task__resolverData', - TaskResolverHash = 'task__resolverHash', - TaskStatus = 'task__status', - TaskUpdatedAt = 'task__updatedAt', - TaskUseTaskTreasuryFunds = 'task__useTaskTreasuryFunds', - TxFee = 'txFee', - TxFeeUsd = 'txFeeUsd', -} - -export enum TaskStatus { - Cancelled = 'cancelled', - Ongoing = 'ongoing', -} - -export type Task_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe - and?: InputMaybe>> - cancelledTxHash?: InputMaybe - cancelledTxHash_contains?: InputMaybe - cancelledTxHash_gt?: InputMaybe - cancelledTxHash_gte?: InputMaybe - cancelledTxHash_in?: InputMaybe> - cancelledTxHash_lt?: InputMaybe - cancelledTxHash_lte?: InputMaybe - cancelledTxHash_not?: InputMaybe - cancelledTxHash_not_contains?: InputMaybe - cancelledTxHash_not_in?: InputMaybe> - createdAt?: InputMaybe - createdAt_gt?: InputMaybe - createdAt_gte?: InputMaybe - createdAt_in?: InputMaybe> - createdAt_lt?: InputMaybe - createdAt_lte?: InputMaybe - createdAt_not?: InputMaybe - createdAt_not_in?: InputMaybe> - createdTxHash?: InputMaybe - createdTxHash_contains?: InputMaybe - createdTxHash_gt?: InputMaybe - createdTxHash_gte?: InputMaybe - createdTxHash_in?: InputMaybe> - createdTxHash_lt?: InputMaybe - createdTxHash_lte?: InputMaybe - createdTxHash_not?: InputMaybe - createdTxHash_not_contains?: InputMaybe - createdTxHash_not_in?: InputMaybe> - execAddress?: InputMaybe - execAddress_contains?: InputMaybe - execAddress_contains_nocase?: InputMaybe - execAddress_ends_with?: InputMaybe - execAddress_ends_with_nocase?: InputMaybe - execAddress_gt?: InputMaybe - execAddress_gte?: InputMaybe - execAddress_in?: InputMaybe> - execAddress_lt?: InputMaybe - execAddress_lte?: InputMaybe - execAddress_not?: InputMaybe - execAddress_not_contains?: InputMaybe - execAddress_not_contains_nocase?: InputMaybe - execAddress_not_ends_with?: InputMaybe - execAddress_not_ends_with_nocase?: InputMaybe - execAddress_not_in?: InputMaybe> - execAddress_not_starts_with?: InputMaybe - execAddress_not_starts_with_nocase?: InputMaybe - execAddress_starts_with?: InputMaybe - execAddress_starts_with_nocase?: InputMaybe - execDataOrSelector?: InputMaybe - execDataOrSelector_contains?: InputMaybe - execDataOrSelector_gt?: InputMaybe - execDataOrSelector_gte?: InputMaybe - execDataOrSelector_in?: InputMaybe> - execDataOrSelector_lt?: InputMaybe - execDataOrSelector_lte?: InputMaybe - execDataOrSelector_not?: InputMaybe - execDataOrSelector_not_contains?: InputMaybe - execDataOrSelector_not_in?: InputMaybe> - executionCount?: InputMaybe - executionCount_gt?: InputMaybe - executionCount_gte?: InputMaybe - executionCount_in?: InputMaybe> - executionCount_lt?: InputMaybe - executionCount_lte?: InputMaybe - executionCount_not?: InputMaybe - executionCount_not_in?: InputMaybe> - feeToken?: InputMaybe - feeToken_contains?: InputMaybe - feeToken_contains_nocase?: InputMaybe - feeToken_ends_with?: InputMaybe - feeToken_ends_with_nocase?: InputMaybe - feeToken_gt?: InputMaybe - feeToken_gte?: InputMaybe - feeToken_in?: InputMaybe> - feeToken_lt?: InputMaybe - feeToken_lte?: InputMaybe - feeToken_not?: InputMaybe - feeToken_not_contains?: InputMaybe - feeToken_not_contains_nocase?: InputMaybe - feeToken_not_ends_with?: InputMaybe - feeToken_not_ends_with_nocase?: InputMaybe - feeToken_not_in?: InputMaybe> - feeToken_not_starts_with?: InputMaybe - feeToken_not_starts_with_nocase?: InputMaybe - feeToken_starts_with?: InputMaybe - feeToken_starts_with_nocase?: InputMaybe - feeTotal?: InputMaybe - feeTotalUsd?: InputMaybe - feeTotalUsd_gt?: InputMaybe - feeTotalUsd_gte?: InputMaybe - feeTotalUsd_in?: InputMaybe> - feeTotalUsd_lt?: InputMaybe - feeTotalUsd_lte?: InputMaybe - feeTotalUsd_not?: InputMaybe - feeTotalUsd_not_in?: InputMaybe> - feeTotal_gt?: InputMaybe - feeTotal_gte?: InputMaybe - feeTotal_in?: InputMaybe> - feeTotal_lt?: InputMaybe - feeTotal_lte?: InputMaybe - feeTotal_not?: InputMaybe - feeTotal_not_in?: InputMaybe> - id?: InputMaybe - id_gt?: InputMaybe - id_gte?: InputMaybe - id_in?: InputMaybe> - id_lt?: InputMaybe - id_lte?: InputMaybe - id_not?: InputMaybe - id_not_in?: InputMaybe> - interval?: InputMaybe - interval_gt?: InputMaybe - interval_gte?: InputMaybe - interval_in?: InputMaybe> - interval_lt?: InputMaybe - interval_lte?: InputMaybe - interval_not?: InputMaybe - interval_not_in?: InputMaybe> - moduleArgs?: InputMaybe> - moduleArgs_contains?: InputMaybe> - moduleArgs_contains_nocase?: InputMaybe> - moduleArgs_not?: InputMaybe> - moduleArgs_not_contains?: InputMaybe> - moduleArgs_not_contains_nocase?: InputMaybe> - modules?: InputMaybe> - modules_contains?: InputMaybe> - modules_contains_nocase?: InputMaybe> - modules_not?: InputMaybe> - modules_not_contains?: InputMaybe> - modules_not_contains_nocase?: InputMaybe> - nextExec?: InputMaybe - nextExec_gt?: InputMaybe - nextExec_gte?: InputMaybe - nextExec_in?: InputMaybe> - nextExec_lt?: InputMaybe - nextExec_lte?: InputMaybe - nextExec_not?: InputMaybe - nextExec_not_in?: InputMaybe> - or?: InputMaybe>> - resolverAddress?: InputMaybe - resolverAddress_contains?: InputMaybe - resolverAddress_contains_nocase?: InputMaybe - resolverAddress_ends_with?: InputMaybe - resolverAddress_ends_with_nocase?: InputMaybe - resolverAddress_gt?: InputMaybe - resolverAddress_gte?: InputMaybe - resolverAddress_in?: InputMaybe> - resolverAddress_lt?: InputMaybe - resolverAddress_lte?: InputMaybe - resolverAddress_not?: InputMaybe - resolverAddress_not_contains?: InputMaybe - resolverAddress_not_contains_nocase?: InputMaybe - resolverAddress_not_ends_with?: InputMaybe - resolverAddress_not_ends_with_nocase?: InputMaybe - resolverAddress_not_in?: InputMaybe> - resolverAddress_not_starts_with?: InputMaybe - resolverAddress_not_starts_with_nocase?: InputMaybe - resolverAddress_starts_with?: InputMaybe - resolverAddress_starts_with_nocase?: InputMaybe - resolverData?: InputMaybe - resolverData_contains?: InputMaybe - resolverData_gt?: InputMaybe - resolverData_gte?: InputMaybe - resolverData_in?: InputMaybe> - resolverData_lt?: InputMaybe - resolverData_lte?: InputMaybe - resolverData_not?: InputMaybe - resolverData_not_contains?: InputMaybe - resolverData_not_in?: InputMaybe> - resolverHash?: InputMaybe - resolverHash_contains?: InputMaybe - resolverHash_gt?: InputMaybe - resolverHash_gte?: InputMaybe - resolverHash_in?: InputMaybe> - resolverHash_lt?: InputMaybe - resolverHash_lte?: InputMaybe - resolverHash_not?: InputMaybe - resolverHash_not_contains?: InputMaybe - resolverHash_not_in?: InputMaybe> - status?: InputMaybe - statusHistory_?: InputMaybe - status_in?: InputMaybe> - status_not?: InputMaybe - status_not_in?: InputMaybe> - taskCreator?: InputMaybe - taskCreator_?: InputMaybe - taskCreator_contains?: InputMaybe - taskCreator_contains_nocase?: InputMaybe - taskCreator_ends_with?: InputMaybe - taskCreator_ends_with_nocase?: InputMaybe - taskCreator_gt?: InputMaybe - taskCreator_gte?: InputMaybe - taskCreator_in?: InputMaybe> - taskCreator_lt?: InputMaybe - taskCreator_lte?: InputMaybe - taskCreator_not?: InputMaybe - taskCreator_not_contains?: InputMaybe - taskCreator_not_contains_nocase?: InputMaybe - taskCreator_not_ends_with?: InputMaybe - taskCreator_not_ends_with_nocase?: InputMaybe - taskCreator_not_in?: InputMaybe> - taskCreator_not_starts_with?: InputMaybe - taskCreator_not_starts_with_nocase?: InputMaybe - taskCreator_starts_with?: InputMaybe - taskCreator_starts_with_nocase?: InputMaybe - taskExecutions_?: InputMaybe - updatedAt?: InputMaybe - updatedAt_gt?: InputMaybe - updatedAt_gte?: InputMaybe - updatedAt_in?: InputMaybe> - updatedAt_lt?: InputMaybe - updatedAt_lte?: InputMaybe - updatedAt_not?: InputMaybe - updatedAt_not_in?: InputMaybe> - useTaskTreasuryFunds?: InputMaybe - useTaskTreasuryFunds_in?: InputMaybe> - useTaskTreasuryFunds_not?: InputMaybe - useTaskTreasuryFunds_not_in?: InputMaybe> - version?: InputMaybe - version_?: InputMaybe - version_contains?: InputMaybe - version_contains_nocase?: InputMaybe - version_ends_with?: InputMaybe - version_ends_with_nocase?: InputMaybe - version_gt?: InputMaybe - version_gte?: InputMaybe - version_in?: InputMaybe> - version_lt?: InputMaybe - version_lte?: InputMaybe - version_not?: InputMaybe - version_not_contains?: InputMaybe - version_not_contains_nocase?: InputMaybe - version_not_ends_with?: InputMaybe - version_not_ends_with_nocase?: InputMaybe - version_not_in?: InputMaybe> - version_not_starts_with?: InputMaybe - version_not_starts_with_nocase?: InputMaybe - version_starts_with?: InputMaybe - version_starts_with_nocase?: InputMaybe -} - -export enum Task_OrderBy { - CancelledTxHash = 'cancelledTxHash', - CreatedAt = 'createdAt', - CreatedTxHash = 'createdTxHash', - ExecAddress = 'execAddress', - ExecDataOrSelector = 'execDataOrSelector', - ExecutionCount = 'executionCount', - FeeToken = 'feeToken', - FeeTotal = 'feeTotal', - FeeTotalUsd = 'feeTotalUsd', - Id = 'id', - Interval = 'interval', - ModuleArgs = 'moduleArgs', - Modules = 'modules', - NextExec = 'nextExec', - ResolverAddress = 'resolverAddress', - ResolverData = 'resolverData', - ResolverHash = 'resolverHash', - Status = 'status', - StatusHistory = 'statusHistory', - TaskCreator = 'taskCreator', - TaskCreatorId = 'taskCreator__id', - TaskCreatorOpsProxy = 'taskCreator__opsProxy', - TaskExecutions = 'taskExecutions', - UpdatedAt = 'updatedAt', - UseTaskTreasuryFunds = 'useTaskTreasuryFunds', - Version = 'version', - VersionId = 'version__id', -} - -export type Transaction = { - __typename?: 'Transaction' - amount: Scalars['BigInt']['output'] - id: Scalars['ID']['output'] - idOfTask?: Maybe - paymentToken: PaymentToken - taskCreator: TaskCreator - time: Scalars['BigInt']['output'] - transactionType: TransactionType - txHash: Scalars['String']['output'] -} - -export enum TransactionType { - Deposit = 'deposit', - ExecFailed = 'execFailed', - ExecSuccess = 'execSuccess', - Withdraw = 'withdraw', -} - -export type Transaction_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe - amount?: InputMaybe - amount_gt?: InputMaybe - amount_gte?: InputMaybe - amount_in?: InputMaybe> - amount_lt?: InputMaybe - amount_lte?: InputMaybe - amount_not?: InputMaybe - amount_not_in?: InputMaybe> - and?: InputMaybe>> - id?: InputMaybe - idOfTask?: InputMaybe - idOfTask_contains?: InputMaybe - idOfTask_contains_nocase?: InputMaybe - idOfTask_ends_with?: InputMaybe - idOfTask_ends_with_nocase?: InputMaybe - idOfTask_gt?: InputMaybe - idOfTask_gte?: InputMaybe - idOfTask_in?: InputMaybe> - idOfTask_lt?: InputMaybe - idOfTask_lte?: InputMaybe - idOfTask_not?: InputMaybe - idOfTask_not_contains?: InputMaybe - idOfTask_not_contains_nocase?: InputMaybe - idOfTask_not_ends_with?: InputMaybe - idOfTask_not_ends_with_nocase?: InputMaybe - idOfTask_not_in?: InputMaybe> - idOfTask_not_starts_with?: InputMaybe - idOfTask_not_starts_with_nocase?: InputMaybe - idOfTask_starts_with?: InputMaybe - idOfTask_starts_with_nocase?: InputMaybe - id_gt?: InputMaybe - id_gte?: InputMaybe - id_in?: InputMaybe> - id_lt?: InputMaybe - id_lte?: InputMaybe - id_not?: InputMaybe - id_not_in?: InputMaybe> - or?: InputMaybe>> - paymentToken?: InputMaybe - paymentToken_?: InputMaybe - paymentToken_contains?: InputMaybe - paymentToken_contains_nocase?: InputMaybe - paymentToken_ends_with?: InputMaybe - paymentToken_ends_with_nocase?: InputMaybe - paymentToken_gt?: InputMaybe - paymentToken_gte?: InputMaybe - paymentToken_in?: InputMaybe> - paymentToken_lt?: InputMaybe - paymentToken_lte?: InputMaybe - paymentToken_not?: InputMaybe - paymentToken_not_contains?: InputMaybe - paymentToken_not_contains_nocase?: InputMaybe - paymentToken_not_ends_with?: InputMaybe - paymentToken_not_ends_with_nocase?: InputMaybe - paymentToken_not_in?: InputMaybe> - paymentToken_not_starts_with?: InputMaybe - paymentToken_not_starts_with_nocase?: InputMaybe - paymentToken_starts_with?: InputMaybe - paymentToken_starts_with_nocase?: InputMaybe - taskCreator?: InputMaybe - taskCreator_?: InputMaybe - taskCreator_contains?: InputMaybe - taskCreator_contains_nocase?: InputMaybe - taskCreator_ends_with?: InputMaybe - taskCreator_ends_with_nocase?: InputMaybe - taskCreator_gt?: InputMaybe - taskCreator_gte?: InputMaybe - taskCreator_in?: InputMaybe> - taskCreator_lt?: InputMaybe - taskCreator_lte?: InputMaybe - taskCreator_not?: InputMaybe - taskCreator_not_contains?: InputMaybe - taskCreator_not_contains_nocase?: InputMaybe - taskCreator_not_ends_with?: InputMaybe - taskCreator_not_ends_with_nocase?: InputMaybe - taskCreator_not_in?: InputMaybe> - taskCreator_not_starts_with?: InputMaybe - taskCreator_not_starts_with_nocase?: InputMaybe - taskCreator_starts_with?: InputMaybe - taskCreator_starts_with_nocase?: InputMaybe - time?: InputMaybe - time_gt?: InputMaybe - time_gte?: InputMaybe - time_in?: InputMaybe> - time_lt?: InputMaybe - time_lte?: InputMaybe - time_not?: InputMaybe - time_not_in?: InputMaybe> - transactionType?: InputMaybe - transactionType_in?: InputMaybe> - transactionType_not?: InputMaybe - transactionType_not_in?: InputMaybe> - txHash?: InputMaybe - txHash_contains?: InputMaybe - txHash_contains_nocase?: InputMaybe - txHash_ends_with?: InputMaybe - txHash_ends_with_nocase?: InputMaybe - txHash_gt?: InputMaybe - txHash_gte?: InputMaybe - txHash_in?: InputMaybe> - txHash_lt?: InputMaybe - txHash_lte?: InputMaybe - txHash_not?: InputMaybe - txHash_not_contains?: InputMaybe - txHash_not_contains_nocase?: InputMaybe - txHash_not_ends_with?: InputMaybe - txHash_not_ends_with_nocase?: InputMaybe - txHash_not_in?: InputMaybe> - txHash_not_starts_with?: InputMaybe - txHash_not_starts_with_nocase?: InputMaybe - txHash_starts_with?: InputMaybe - txHash_starts_with_nocase?: InputMaybe -} - -export enum Transaction_OrderBy { - Amount = 'amount', - Id = 'id', - IdOfTask = 'idOfTask', - PaymentToken = 'paymentToken', - PaymentTokenDecimals = 'paymentToken__decimals', - PaymentTokenId = 'paymentToken__id', - PaymentTokenName = 'paymentToken__name', - PaymentTokenSymbol = 'paymentToken__symbol', - TaskCreator = 'taskCreator', - TaskCreatorId = 'taskCreator__id', - TaskCreatorOpsProxy = 'taskCreator__opsProxy', - Time = 'time', - TransactionType = 'transactionType', - TxHash = 'txHash', -} - -export type Version = { - __typename?: 'Version' - id: Scalars['ID']['output'] - tasks?: Maybe> -} - -export type VersionTasksArgs = { - first?: InputMaybe - orderBy?: InputMaybe - orderDirection?: InputMaybe - skip?: InputMaybe - where?: InputMaybe -} - -export type Version_Filter = { - /** Filter for the block changed event. */ - _change_block?: InputMaybe - and?: InputMaybe>> - id?: InputMaybe - id_gt?: InputMaybe - id_gte?: InputMaybe - id_in?: InputMaybe> - id_lt?: InputMaybe - id_lte?: InputMaybe - id_not?: InputMaybe - id_not_in?: InputMaybe> - or?: InputMaybe>> - tasks_?: InputMaybe -} - -export enum Version_OrderBy { - Id = 'id', - Tasks = 'tasks', -} - -export type _Block_ = { - __typename?: '_Block_' - /** The hash of the block */ - hash?: Maybe - /** The block number */ - number: Scalars['Int']['output'] - /** Integer representation of the timestamp stored in blocks for the chain */ - timestamp?: Maybe -} - -/** The type for the top-level _meta field */ -export type _Meta_ = { - __typename?: '_Meta_' - /** - * Information about a specific subgraph block. The hash of the block - * will be null if the _meta field has a block constraint that asks for - * a block number. It will be filled if the _meta field has no block constraint - * and therefore asks for the latest block - * - */ - block: _Block_ - /** The deployment ID */ - deployment: Scalars['String']['output'] - /** If `true`, the subgraph encountered indexing errors at some past block */ - hasIndexingErrors: Scalars['Boolean']['output'] -} - -export enum _SubgraphErrorPolicy_ { - /** Data will be returned even if the subgraph has indexing errors */ - Allow = 'allow', - /** If the subgraph has indexing errors, data will be omitted. The default. */ - Deny = 'deny', -} - -export type GetAllTaskDataQueryVariables = Exact<{ - taskCreator?: InputMaybe - limit?: InputMaybe - skip?: InputMaybe -}> - -export type GetAllTaskDataQuery = { - __typename?: 'Query' - tasks: Array<{ - __typename?: 'Task' - id: string - executionCount?: any | null - feeTotalUsd?: any | null - feeTotal?: any | null - feeToken: string - execAddress: string - status: TaskStatus - nextExec?: any | null - interval?: any | null - execDataOrSelector: any - resolverAddress?: string | null - resolverData?: any | null - modules?: Array | null - moduleArgs?: Array | null - useTaskTreasuryFunds: boolean - resolverHash?: any | null - createdTxHash: any - cancelledTxHash?: any | null - createdAt: any - updatedAt: any - version: { __typename?: 'Version'; id: string } - taskCreator: { __typename?: 'TaskCreator'; id: string; opsProxy?: string | null } - }> -} - -export type GetTaskQueryVariables = Exact<{ - id: Scalars['ID']['input'] -}> - -export type GetTaskQuery = { - __typename?: 'Query' - task?: { - __typename?: 'Task' - id: string - executionCount?: any | null - feeTotalUsd?: any | null - feeTotal?: any | null - feeToken: string - execAddress: string - status: TaskStatus - nextExec?: any | null - interval?: any | null - execDataOrSelector: any - resolverAddress?: string | null - resolverData?: any | null - modules?: Array | null - moduleArgs?: Array | null - useTaskTreasuryFunds: boolean - resolverHash?: any | null - createdTxHash: any - cancelledTxHash?: any | null - createdAt: any - updatedAt: any - version: { __typename?: 'Version'; id: string } - taskCreator: { __typename?: 'TaskCreator'; id: string; opsProxy?: string | null } - } | null -} - -export const GetAllTaskDataDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'getAllTaskData' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'taskCreator' } }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } }, - }, - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'limit' } }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, - }, - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'skip' } }, - type: { kind: 'NamedType', name: { kind: 'Name', value: 'Int' } }, - }, - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'tasks' }, - arguments: [ - { kind: 'Argument', name: { kind: 'Name', value: 'first' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'limit' } } }, - { kind: 'Argument', name: { kind: 'Name', value: 'skip' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'skip' } } }, - { - kind: 'Argument', - name: { kind: 'Name', value: 'where' }, - value: { - kind: 'ObjectValue', - fields: [ - { - kind: 'ObjectField', - name: { kind: 'Name', value: 'taskCreator' }, - value: { kind: 'Variable', name: { kind: 'Name', value: 'taskCreator' } }, - }, - ], - }, - }, - { kind: 'Argument', name: { kind: 'Name', value: 'orderBy' }, value: { kind: 'EnumValue', value: 'createdAt' } }, - { kind: 'Argument', name: { kind: 'Name', value: 'orderDirection' }, value: { kind: 'EnumValue', value: 'desc' } }, - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'version' }, - selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'id' } }] }, - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'taskCreator' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'opsProxy' } }, - ], - }, - }, - { kind: 'Field', name: { kind: 'Name', value: 'executionCount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'feeTotalUsd' } }, - { kind: 'Field', name: { kind: 'Name', value: 'feeTotal' } }, - { kind: 'Field', name: { kind: 'Name', value: 'feeToken' } }, - { kind: 'Field', name: { kind: 'Name', value: 'execAddress' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, - { kind: 'Field', name: { kind: 'Name', value: 'nextExec' } }, - { kind: 'Field', name: { kind: 'Name', value: 'interval' } }, - { kind: 'Field', name: { kind: 'Name', value: 'execDataOrSelector' } }, - { kind: 'Field', name: { kind: 'Name', value: 'resolverAddress' } }, - { kind: 'Field', name: { kind: 'Name', value: 'resolverData' } }, - { kind: 'Field', name: { kind: 'Name', value: 'modules' } }, - { kind: 'Field', name: { kind: 'Name', value: 'moduleArgs' } }, - { kind: 'Field', name: { kind: 'Name', value: 'useTaskTreasuryFunds' } }, - { kind: 'Field', name: { kind: 'Name', value: 'resolverHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'createdTxHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'cancelledTxHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, - { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode -export const GetTaskDocument = { - kind: 'Document', - definitions: [ - { - kind: 'OperationDefinition', - operation: 'query', - name: { kind: 'Name', value: 'getTask' }, - variableDefinitions: [ - { - kind: 'VariableDefinition', - variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } }, - type: { kind: 'NonNullType', type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } } }, - }, - ], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { - kind: 'Field', - name: { kind: 'Name', value: 'task' }, - arguments: [{ kind: 'Argument', name: { kind: 'Name', value: 'id' }, value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } } }], - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { - kind: 'Field', - name: { kind: 'Name', value: 'version' }, - selectionSet: { kind: 'SelectionSet', selections: [{ kind: 'Field', name: { kind: 'Name', value: 'id' } }] }, - }, - { - kind: 'Field', - name: { kind: 'Name', value: 'taskCreator' }, - selectionSet: { - kind: 'SelectionSet', - selections: [ - { kind: 'Field', name: { kind: 'Name', value: 'id' } }, - { kind: 'Field', name: { kind: 'Name', value: 'opsProxy' } }, - ], - }, - }, - { kind: 'Field', name: { kind: 'Name', value: 'executionCount' } }, - { kind: 'Field', name: { kind: 'Name', value: 'feeTotalUsd' } }, - { kind: 'Field', name: { kind: 'Name', value: 'feeTotal' } }, - { kind: 'Field', name: { kind: 'Name', value: 'feeToken' } }, - { kind: 'Field', name: { kind: 'Name', value: 'execAddress' } }, - { kind: 'Field', name: { kind: 'Name', value: 'status' } }, - { kind: 'Field', name: { kind: 'Name', value: 'nextExec' } }, - { kind: 'Field', name: { kind: 'Name', value: 'interval' } }, - { kind: 'Field', name: { kind: 'Name', value: 'execDataOrSelector' } }, - { kind: 'Field', name: { kind: 'Name', value: 'resolverAddress' } }, - { kind: 'Field', name: { kind: 'Name', value: 'resolverData' } }, - { kind: 'Field', name: { kind: 'Name', value: 'modules' } }, - { kind: 'Field', name: { kind: 'Name', value: 'moduleArgs' } }, - { kind: 'Field', name: { kind: 'Name', value: 'useTaskTreasuryFunds' } }, - { kind: 'Field', name: { kind: 'Name', value: 'resolverHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'createdTxHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'cancelledTxHash' } }, - { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } }, - { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode diff --git a/integrations/gelato/graphql/graphql/generated/index.ts b/integrations/gelato/graphql/graphql/generated/index.ts deleted file mode 100644 index 83a2382..0000000 --- a/integrations/gelato/graphql/graphql/generated/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './gql' diff --git a/integrations/gelato/graphql/tasks.graphql b/integrations/gelato/graphql/tasks.graphql deleted file mode 100644 index b3369a0..0000000 --- a/integrations/gelato/graphql/tasks.graphql +++ /dev/null @@ -1,69 +0,0 @@ -query getAllTaskData($taskCreator: String, $limit: Int, $skip: Int) { - tasks( - first: $limit - skip: $skip - where: { taskCreator: $taskCreator } - orderBy: createdAt - orderDirection: desc - ) { - id - version { - id - } - taskCreator { - id - opsProxy - } - executionCount - feeTotalUsd - feeTotal - feeToken - execAddress - status - nextExec - interval - execDataOrSelector - resolverAddress - resolverData - modules - moduleArgs - useTaskTreasuryFunds - resolverHash - createdTxHash - cancelledTxHash - createdAt - updatedAt - } -} - -query getTask($id: ID!) { - task(id: $id) { - id - version { - id - } - taskCreator { - id - opsProxy - } - executionCount - feeTotalUsd - feeTotal - feeToken - execAddress - status - nextExec - interval - execDataOrSelector - resolverAddress - resolverData - modules - moduleArgs - useTaskTreasuryFunds - resolverHash - createdTxHash - cancelledTxHash - createdAt - updatedAt - } -} diff --git a/integrations/gelato/hooks/index.ts b/integrations/gelato/hooks/index.ts deleted file mode 100644 index 68f52ad..0000000 --- a/integrations/gelato/hooks/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * from "./use-active-tasks" -export * from "./use-task" -export * from "./use-abi" -export * from "./use-new-task" -export * from "./use-cancel-task" -export * from "./use-rename-task" -export * from "./use-is-automate-supported" -export * from "./use-automate-sdk" diff --git a/integrations/gelato/hooks/use-abi.ts b/integrations/gelato/hooks/use-abi.ts deleted file mode 100644 index bb2c862..0000000 --- a/integrations/gelato/hooks/use-abi.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { useQuery } from "@tanstack/react-query" -import axios from "axios" -import { isAddress } from "viem" -import { useNetwork } from "wagmi" - -import { GELATO_CONSTANTS } from "../utils/constants" -import { ExplorerFetchAbiResponse } from "../utils/types" - -const abiFetcher = async ({ - contractAddress, - chainId, -}: { - contractAddress: string - chainId: number -}) => { - const { explorerApiUrl, explorerApiKey } = GELATO_CONSTANTS.networks[chainId] - - const response = await axios.get(explorerApiUrl, { - params: { - module: "contract", - action: "getsourcecode", - address: contractAddress, - apikey: explorerApiKey, - }, - }) - JSON.parse(response.data.result[0].ABI) // Make sure abi is valid - return response.data.result[0].ABI -} - -export const useAbi = ({ contractAddress }: { contractAddress: string }) => { - const { chain } = useNetwork() - - return useQuery(["gelato-contract-abi", chain?.id, contractAddress], { - queryFn: () => { - if (!chain?.id || !contractAddress || !isAddress(contractAddress)) { - throw new Error("Invalid Parameters") - } - - return abiFetcher({ contractAddress, chainId: chain.id }) - }, - enabled: !!contractAddress, - retry: 0, - refetchOnWindowFocus: false, - }) -} diff --git a/integrations/gelato/hooks/use-active-tasks.ts b/integrations/gelato/hooks/use-active-tasks.ts deleted file mode 100644 index 4a4e136..0000000 --- a/integrations/gelato/hooks/use-active-tasks.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { useQuery } from "@tanstack/react-query" -import { request } from "graphql-request" -import { useAccount, useNetwork } from "wagmi" - -import { - GetAllTaskDataDocument, - GetAllTaskDataQuery, - GetAllTaskDataQueryVariables, -} from "../graphql/graphql/generated/graphql" -import { GELATO_CONSTANTS } from "../utils/constants" -import { getGqlEndpoint } from "../utils/helpers" -import { FetchActiveTasksProps } from "../utils/types" -import { useGelatoAutomateSdk } from "./use-automate-sdk" - -const fetchActiveTasks = ({ address, gqlEndpoint }: FetchActiveTasksProps) => { - return request({ - url: - `https://api.thegraph.com/subgraphs/name/gelatodigital/poke-me` + - gqlEndpoint, - document: GetAllTaskDataDocument, - variables: { - taskCreator: address?.toLowerCase(), - skip: 0, - limit: 1000, - }, - }) -} - -export const useActiveTasks = () => { - const { chain } = useNetwork() - const { address } = useAccount() - const { automateSdk } = useGelatoAutomateSdk() - - const chainId = chain?.id - - return useQuery(["gelato-tasks", address, automateSdk], { - queryFn: async () => { - if (!chainId || !GELATO_CONSTANTS.networks[chainId] || !address) - throw new Error("Missing Parameters") - - const gqlEndpoint = getGqlEndpoint(chain.id) - - const tasks = await fetchActiveTasks({ address, gqlEndpoint }) - const names = await automateSdk?.getTaskNames( - tasks.tasks.map((task) => task.id) - ) - - return { tasks: tasks.tasks, names } - }, - refetchOnWindowFocus: false, - }) -} diff --git a/integrations/gelato/hooks/use-automate-sdk.ts b/integrations/gelato/hooks/use-automate-sdk.ts deleted file mode 100644 index 553d05d..0000000 --- a/integrations/gelato/hooks/use-automate-sdk.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { useEffect, useState } from "react" -import { AutomateSDK } from "@gelatonetwork/automate-sdk" -import { useNetwork } from "wagmi" - -import { useEthersSigner } from "@/lib/hooks/web3/use-ethers-signer" - -export const useGelatoAutomateSdk = () => { - const [automateSdk, setAutomateSdk] = useState() - - const { chain } = useNetwork() - - const signer = useEthersSigner() - - useEffect(() => { - if (chain?.id && signer) setAutomateSdk(new AutomateSDK(chain.id, signer)) - }, [chain?.id, signer]) - - return { automateSdk, isLoading: !chain?.id || !signer } -} diff --git a/integrations/gelato/hooks/use-cancel-task.ts b/integrations/gelato/hooks/use-cancel-task.ts deleted file mode 100644 index 964670b..0000000 --- a/integrations/gelato/hooks/use-cancel-task.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { useMutation } from "@tanstack/react-query" - -import { UseCancelTaskProps } from "../utils/types" -import { useGelatoAutomateSdk } from "./use-automate-sdk" - -export const useCancelTask = () => { - const { automateSdk } = useGelatoAutomateSdk() - - return useMutation({ - mutationFn: async ({ taskId, overrides }: UseCancelTaskProps) => { - return automateSdk?.cancelTask(taskId, overrides) - }, - retry: 0, - }) -} diff --git a/integrations/gelato/hooks/use-is-automate-supported.ts b/integrations/gelato/hooks/use-is-automate-supported.ts deleted file mode 100644 index 883bf00..0000000 --- a/integrations/gelato/hooks/use-is-automate-supported.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { isAutomateSupported } from "@gelatonetwork/automate-sdk" -import { useNetwork } from "wagmi" - -export const useIsAutomateSupported = () => { - const { chain } = useNetwork() - - return chain?.id ? isAutomateSupported(chain.id) : false -} diff --git a/integrations/gelato/hooks/use-msg-sender.ts b/integrations/gelato/hooks/use-msg-sender.ts deleted file mode 100644 index 91fb096..0000000 --- a/integrations/gelato/hooks/use-msg-sender.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { useQuery } from "@tanstack/react-query" - -import { useGelatoAutomateSdk } from "./use-automate-sdk" - -export const useMsgSender = () => { - const { automateSdk } = useGelatoAutomateSdk() - - return useQuery(["msg-sender", automateSdk], { - queryFn: () => { - return automateSdk?.getDedicatedMsgSender() - }, - refetchOnWindowFocus: false, - retry: 0, - enabled: !!automateSdk, - }) -} diff --git a/integrations/gelato/hooks/use-new-task.ts b/integrations/gelato/hooks/use-new-task.ts deleted file mode 100644 index dce608b..0000000 --- a/integrations/gelato/hooks/use-new-task.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { useMutation } from "@tanstack/react-query" - -import { UseNewTaskProps } from "../utils/types" -import { useGelatoAutomateSdk } from "./use-automate-sdk" - -export const useNewTask = () => { - const { automateSdk } = useGelatoAutomateSdk() - - return useMutation({ - mutationFn: async ({ args, overrides, authToken }: UseNewTaskProps) => { - if (!automateSdk) throw new Error("Sdk not initiated") - - return automateSdk.createTask(args, overrides, authToken) - }, - }) -} diff --git a/integrations/gelato/hooks/use-rename-task.ts b/integrations/gelato/hooks/use-rename-task.ts deleted file mode 100644 index 5e5ed10..0000000 --- a/integrations/gelato/hooks/use-rename-task.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { useMutation } from "@tanstack/react-query" - -import { UseRenameTaskProps } from "../utils/types" -import { useGelatoAutomateSdk } from "./use-automate-sdk" - -export const useRenameTask = () => { - const { automateSdk } = useGelatoAutomateSdk() - - return useMutation({ - mutationFn: async ({ taskId, name, authToken }: UseRenameTaskProps) => { - return await automateSdk?.renameTask(taskId, name, authToken) - }, - }) -} diff --git a/integrations/gelato/hooks/use-task-resolver.ts b/integrations/gelato/hooks/use-task-resolver.ts deleted file mode 100644 index 7f484ff..0000000 --- a/integrations/gelato/hooks/use-task-resolver.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { useQuery } from "@tanstack/react-query" -import axios from "axios" -import { useNetwork } from "wagmi" - -import { FetchResolverResponse } from "../utils/types" - -export const useTaskResolver = ({ taskId }: { taskId: string }) => { - const { chain } = useNetwork() - - return useQuery(["gelato-task-resolver", taskId, chain?.id], { - queryFn: async () => { - const response = await axios.get( - `https://ops-task.fra.gelato.digital/1514007e8336fa99e6fe/api/contracts/${ - chain?.id.toString() as string - }/?taskId=${taskId}&resolver=true` - ) - return response.data - }, - enabled: !!chain?.id && !!taskId, - refetchOnWindowFocus: false, - retry: 0, - }) -} diff --git a/integrations/gelato/hooks/use-task.ts b/integrations/gelato/hooks/use-task.ts deleted file mode 100644 index 4288643..0000000 --- a/integrations/gelato/hooks/use-task.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { useQuery } from "@tanstack/react-query" -import request from "graphql-request" -import { useNetwork } from "wagmi" - -import { - GetTaskDocument, - GetTaskQuery, - GetTaskQueryVariables, -} from "../graphql/graphql/generated/graphql" -import { getGqlEndpoint } from "../utils/helpers" -import { FetchTaskProps } from "../utils/types" -import { useGelatoAutomateSdk } from "./use-automate-sdk" - -const fetchTask = ({ id, gqlEndpoint }: FetchTaskProps) => { - return request({ - url: - `https://api.thegraph.com/subgraphs/name/gelatodigital/poke-me` + - gqlEndpoint, - document: GetTaskDocument, - variables: { - id, - }, - }) -} - -export const useTask = ({ taskId }: { taskId: string }) => { - const { automateSdk } = useGelatoAutomateSdk() - const { chain } = useNetwork() - - return useQuery(["gelato-task", taskId, automateSdk], { - queryFn: async () => { - const taskNames = await automateSdk?.getTaskNames([taskId]) - const task = await fetchTask({ - id: taskId, - gqlEndpoint: getGqlEndpoint(chain?.id as number), - }) - - if (!taskNames?.[0] || !task.task) throw new Error("Error fetching task") - - return { - task: task.task, - name: taskNames[0].name, - } - }, - refetchOnWindowFocus: false, - retry: 0, - enabled: !!automateSdk, - }) -} diff --git a/integrations/gelato/index.ts b/integrations/gelato/index.ts deleted file mode 100644 index f18f992..0000000 --- a/integrations/gelato/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./components" -export * from "./hooks" diff --git a/integrations/gelato/utils/constants.ts b/integrations/gelato/utils/constants.ts deleted file mode 100644 index c9ba748..0000000 --- a/integrations/gelato/utils/constants.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { GelatoConstants } from "./types" - -export const GELATO_CONSTANTS: GelatoConstants = { - subgraphBaseUrl: - "https://api.thegraph.com/subgraphs/name/gelatodigital/poke-me", - docs: { - payment: - "https://docs.gelato.network/developer-services/automate/paying-for-your-transactions", - resolver: - "https://docs.gelato.network/developer-services/automate/guides/custom-logic-triggers", - }, - networks: { - 1: { - graph: "", - contract: "0x25aD59adbe00C2d80c86d01e2E05e1294DA84823", - explorerApiUrl: "https://api.etherscan.io/api", - explorerUrl: "https://etherscan.io", - explorerApiKey: process.env.NEXT_PUBLIC_GELATO_SCAN_KEY_MAINNET as string, - }, - 137: { - graph: "polygon", - contract: "0x527a819db1eb0e34426297b03bae11F2f8B3A19E", - explorerApiUrl: "https://api.polygonscan.com/api", - explorerUrl: "https://polygonscan.com", - explorerApiKey: process.env.NEXT_PUBLIC_GELATO_SCAN_KEY_POLYGON as string, - }, - 250: { - graph: "fantom", - contract: "0x6EDe1597c05A0ca77031cBA43Ab887ccf24cd7e8", - explorerApiUrl: "https://api.ftmscan.com", - explorerUrl: "https://ftmscan.com", - explorerApiKey: process.env.NEXT_PUBLIC_GELATO_SCAN_KEY_FANTOM as string, - }, - 42161: { - graph: "arbitrum", - contract: "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F", - explorerApiUrl: "https://api.arbiscan.io/api", - explorerUrl: "https://arbiscan.io", - explorerApiKey: process.env - .NEXT_PUBLIC_GELATO_SCAN_KEY_ARBITRUM as string, - }, - 43114: { - graph: "avalanche", - contract: "0x8aB6aDbC1fec4F18617C9B889F5cE7F28401B8dB", - explorerApiUrl: "https://api.avascan.info/api", - explorerUrl: "https://avascan.info", - explorerApiKey: process.env - .NEXT_PUBLIC_GELATO_SCAN_KEY_AVALANCHE as string, - }, - 56: { - graph: "bsc", - contract: "0x527a819db1eb0e34426297b03bae11F2f8B3A19E", - explorerApiUrl: "https://api.bscscan.com/api", - explorerUrl: "https://bscscan.com/", - explorerApiKey: process.env.NEXT_PUBLIC_GELATO_SCAN_KEY_BSC as string, - }, - 25: { - graph: "cronos", - contract: "0x86B7e611194978F556007ac1F52D09d114D8f160", - explorerApiUrl: "https://api.cronoscan.com/api", - explorerUrl: "https://cronoscan.com", - explorerApiKey: process.env.NEXT_PUBLIC_GELATO_SCAN_KEY_CRONOS as string, - }, - 100: { - graph: "gnosis-chain", - contract: "0x8aB6aDbC1fec4F18617C9B889F5cE7F28401B8dB", - explorerApiUrl: "https://api.gnosisscan.io/api", - explorerUrl: "https://gnosisscan.io", - explorerApiKey: process.env.NEXT_PUBLIC_GELATO_SCAN_KEY_GNOSIS as string, - }, - 10: { - graph: "optimism", - contract: "0x340759c8346A1E6Ed92035FB8B6ec57cE1D82c2c", - explorerApiUrl: "https://api-optimistic.etherscan.io/api", - explorerUrl: "https://optimistic.etherscan.io/", - explorerApiKey: process.env - .NEXT_PUBLIC_GELATO_SCAN_KEY_OPTIMISM as string, - }, - 1284: { - graph: "moonbeam", - contract: "0x6c3224f9b3feE000A444681d5D45e4532D5BA531", - explorerApiUrl: "https://api-moonbeam.moonscan.io/api", - explorerUrl: "https://moonscan.io", - explorerApiKey: process.env - .NEXT_PUBLIC_GELATO_SCAN_KEY_MOONBEAM as string, - }, - 1285: { - graph: "moonriver", - contract: "0x86B7e611194978F556007ac1F52D09d114D8f160", - explorerApiUrl: "https://api-moonriver.moonscan.io/api", - explorerUrl: "https://moonriver.moonscan.io", - explorerApiKey: process.env - .NEXT_PUBLIC_GELATO_SCAN_KEY_MOONRIVER as string, - }, - 80001: { - testnet: true, - graph: "mumbai", - contract: "0xc1C6805B857Bef1f412519C4A842522431aFed39", - explorerApiUrl: "https://api-mumbai.polygonscan.com/api", - explorerUrl: "https://mumbai.polygonscan.com", - explorerApiKey: - (process.env.NEXT_PUBLIC_GELATO_SCAN_KEY_MUMBAI as string) || - "TTE1XRYPE4MRFH2I18BPRSB172PRNBRPBS", - }, - 421613: { - testnet: true, - graph: "arbitrum-goerli", - contract: "0xa5f9b728ecEB9A1F6FCC89dcc2eFd810bA4Dec41", - explorerApiUrl: "https://api-goerli.arbiscan.io/api", - explorerUrl: "https://goerli.arbiscan.io/", - explorerApiKey: process.env - .NEXT_PUBLIC_GELATO_SCAN_KEY_ARBITRUM_GOERLI as string, - }, - 5: { - testnet: true, - graph: "goerli", - contract: "0xc1C6805B857Bef1f412519C4A842522431aFed39", - explorerApiUrl: "https://goerli.etherscan.io/api", - explorerUrl: "https://goerli.etherscan.io", - explorerApiKey: process.env.NEXT_PUBLIC_GELATO_SCAN_KEY_GOERLI as string, - }, - }, -} diff --git a/integrations/gelato/utils/helpers.ts b/integrations/gelato/utils/helpers.ts deleted file mode 100644 index f82a541..0000000 --- a/integrations/gelato/utils/helpers.ts +++ /dev/null @@ -1,188 +0,0 @@ -import { Abi, AbiFunction } from "abitype" -import { ethers } from "ethers" - -import { GELATO_CONSTANTS } from "./constants" - -export const truncateEthAddress = (address: string, len?: number) => { - len = len || 10 - - if (address.length < 40) return address - return `${address.slice(0, len - 4)}...${address.slice(-4)}` -} - -export const formatFee = (fee: string) => { - return (parseInt(fee) / 1e18).toFixed(2) -} - -export const strLimit = (text: string, count: number) => { - return text.slice(0, count) + (text.length > count ? "..." : "") -} - -export const isValidAbi = (abi: string) => { - try { - JSON.parse(abi) - return true - } catch (e) { - return false - } -} - -export const getAbiFunctions = (abi: Abi) => { - return abi.filter( - (item) => - item.type === "function" && - ["payable", "nonpayable"].indexOf(item.stateMutability) !== -1 - ) as AbiFunction[] -} - -export const isJsonArray = (str: string) => { - try { - const res = JSON.parse(str) - return Array.isArray(res) - } catch (e) { - return false - } -} - -export const validateInput = ( - name: string, - value: string, - selectedFunctionAbi: AbiFunction -) => { - if (value === "") return true - - const inputType = selectedFunctionAbi?.inputs.find( - (item) => item.name === name - )?.type - if (!inputType) return "Invalid Input Type" - - const isArray = inputType.includes("[]") - const isNumeric = inputType.startsWith("uint") || inputType.startsWith("int") - const isAddress = inputType.startsWith("address") - - const errorMessages = { - array: - 'Invalid array - make sure your array is in a correct format, e.g. ["1", "2", "3"].', - address: - 'Invalid address - make sure argument is a correct Ethereum style address, e.g. "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2".', - number: "Invalid number - make sure your integer variable is correct.", - } - - if (isArray) { - if (!isJsonArray(value)) return errorMessages.array - - if (isAddress) { - const isAddressArray = (JSON.parse(value) as string[]).reduce( - (acc, value) => acc && ethers.utils.isAddress(value), - true - ) - - return isAddressArray || errorMessages.address - } - if (isNumeric) { - const isNumericArray = (JSON.parse(value) as string[]).reduce( - (acc, value) => acc && parseInt(value) == (value as unknown), - true - ) - - return isNumericArray || errorMessages.number - } - } - - if (isAddress) return ethers.utils.isAddress(value) || errorMessages.address - if (isNumeric) - return parseInt(value) == (value as unknown) || errorMessages.number - - return true -} - -export const inputsAreFilled = ( - selectedFunctionAbi: AbiFunction, - inputs: { [key: string]: string } -) => { - const functionInputs = selectedFunctionAbi.inputs.map( - (item) => item.name as string - ) - - return functionInputs.reduce((acc, item) => acc && !!inputs[item], true) -} - -export const getFunctionSignature = (abi: string, func: string) => { - const abiFunction = getAbiFunctions(JSON.parse(abi) as Abi).find( - (item) => item.name === func - ) as AbiFunction - - const parameterSignatures = abiFunction.inputs - .map((item) => item.type) - .join(",") - - return `${abiFunction.name}(${parameterSignatures})` -} - -export const getTotalInterval = ( - days: string, - hours: string, - minutes: string, - seconds: string -) => { - const d = parseInt(days) || 0 - const h = parseInt(hours) || 0 - const m = parseInt(minutes) || 0 - const s = parseInt(seconds) || 0 - - return s + m * 60 + h * 60 * 60 + d * 60 * 60 * 24 -} - -export const getTransactionUrl = ( - tx: ethers.ContractTransaction, - chainId: number -) => { - const explorerUrl = GELATO_CONSTANTS.networks[chainId].explorerUrl - - return `${explorerUrl}/tx/${tx.hash}` -} - -export const getAddressUrl = (address: string, chainId: number) => { - const explorerUrl = GELATO_CONSTANTS.networks[chainId].explorerUrl - - return `${explorerUrl}/address/${address}` -} - -export const sortInputsByOrder = ( - func: string, - abi: string, - inputs?: { [key: string]: string } -) => { - const abiFunction = getAbiFunctions(JSON.parse(abi) as Abi).find( - (item) => item.name === func - ) as AbiFunction - - return abiFunction.inputs.map((input) => { - const value = (inputs || {})[input.name as string] - if (input.type.startsWith("bytes")) { - return ethers.utils.toUtf8Bytes(value) - } - return value - }) -} - -export const getGqlEndpoint = (chainId: number) => { - return chainId == 1 ? "" : `-${GELATO_CONSTANTS.networks[chainId].graph}` -} - -export const getTaskFunctionData = ( - contractAddress: string, - abi: string, - execDataOrSelector: string -) => { - const contract = new ethers.Contract(contractAddress, abi) - const functionSignature = execDataOrSelector.slice(0, 10) - - return { - func: contract.interface.getFunction(functionSignature), - data: contract.interface.decodeFunctionData( - functionSignature, - execDataOrSelector - ), - } -} diff --git a/integrations/gelato/utils/resolverDecoder.ts b/integrations/gelato/utils/resolverDecoder.ts deleted file mode 100644 index 0e04b00..0000000 --- a/integrations/gelato/utils/resolverDecoder.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ethers } from "ethers" - -export type DecodedModule = { - resolverAddress: string | null - resolverData: string | null - startTime: string | null - interval: string | null -} - -export const decodeModuleArgs = (args: string[], modules: number[]) => { - let decoded: DecodedModule = { - resolverAddress: null, - resolverData: null, - startTime: null, - interval: null, - } - - // resolver - if (modules.includes(0)) { - const arg = args[modules.indexOf(0)] - const { resolverAddress, resolverData } = decodeResolverArgs(arg) - decoded = { ...decoded, resolverAddress, resolverData } - } - //time - if (modules.includes(1)) { - const arg = args[modules.indexOf(1)] - const { startTime, interval } = decodeTimeArgs(arg) - decoded = { ...decoded, startTime, interval } - } - - return decoded -} - -export const decodeResolverArgs = (arg: string) => { - const [resolverAddress, resolverData] = ethers.utils.defaultAbiCoder.decode( - ["address", "bytes"], - arg - ) - return { resolverAddress, resolverData } -} - -export const decodeTimeArgs = (arg: string) => { - const [startTime, interval] = ethers.utils.defaultAbiCoder.decode( - ["uint128", "uint128"], - arg - ) - - return { startTime, interval } -} diff --git a/integrations/gelato/utils/types.ts b/integrations/gelato/utils/types.ts deleted file mode 100644 index fb185b7..0000000 --- a/integrations/gelato/utils/types.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { CreateTaskOptions } from "@gelatonetwork/automate-sdk" -import { Overrides } from "ethers" - -export type GelatoConstants = { - subgraphBaseUrl: string - docs: { - payment: string - resolver: string - } - networks: { - [key: number]: { - graph: string - contract: string - testnet?: boolean - explorerApiUrl: string - explorerUrl: string - explorerApiKey: string - } - } -} - -export type FetchActiveTasksProps = { - address: string - gqlEndpoint: string -} - -export type FetchTaskProps = { - id: string - gqlEndpoint: string -} - -export type ExplorerFetchAbiResponse = { - message: string - result: { - ABI: string - }[] -} - -export type FetchResolverResponse = { - chainId: string - createdAt: string - id: number - name: string - origin?: string - ownerAddress: string - taskId: string - updatedAt: string - ABI: string - address: string -} - -export type UseNewTaskProps = { - args: CreateTaskOptions - overrides?: Overrides - authToken?: string -} -export type UseCancelTaskProps = { - taskId: string - overrides?: Overrides | undefined -} -export type UseRenameTaskProps = { - taskId: string - name: string - authToken?: string | undefined -} diff --git a/integrations/gitcoin-passport/README.md b/integrations/gitcoin-passport/README.md deleted file mode 100644 index f768a5c..0000000 --- a/integrations/gitcoin-passport/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Dev guide - -### Env variables - -You need to provide two env variables in order to use this integration: - -`GITCOIN_PASSPORT_API_KEY` and `GITCOIN_PASSPORT_SCORER_ID` - -# Getting Access: Scorer ID and API Key - -The Passport API provides programmatic access to a wallet's Passport score. Once you have your API key, you need to include it with each request you make to the API. This allows Gitcoin to identify your app and verify that you are authorized to access the API. - -### Getting Your API Key - -1. **Log in to the developer portal:** Go to [scorer.gitcoin.co](https://www.scorer.gitcoin.co/) and log in to your account by connecting your wallet. -2. **Navigate to the API Keys section:** After logging in, go to the "API Keys" section. -3. **Generate an API key:** Click on the "+ Create a Key" button to generate a unique API key for your account. -4. **Store your API key securely:** Store your API key in a secure place, as it will be used to access the Passport API. - -### Scorers and Scorer ID - -A Scorer is an individual object with a unique ID that is associated with your account. If you are using the Gitcoin Passport API in multiple applications, you can set up separate communities for each one. This allows you to customize the scoring rules for each application and deduplicate any identical Passport VCs that are submitted to the same application. - -By using communities, you can manage specific parameter settings and log traffic for your Passport-enabled applications. This can help you ensure that the identity verification functionality is working correctly and meets the needs of your stakeholders. - -#### Getting your Scorer ID - -1. **Log in to the Developer Portal:** Go to [scorer.gitcoin.co](https://www.scorer.gitcoin.co/) and log in to your account by connecting your wallet. -2. **Navigate to the Communities section:** After logging in, go to the "Communities" section -3. **Create a Scorer:** Click on the "+ Create a Scorer" button and input a Scorer name and description. -4. **Find your Scorer ID:** Click on the newly created Scorer and you will see the Scorer ID in the page URL.\ - Example: `https://www.scorer.gitcoin.co/dashboard/scorer/scorer_id` - -## File Structure - -``` -integrations/gitcoin-passport -├─ api/ -│ ├─ address-score.ts -│ ├─ address-stamps.ts -│ ├─ signing-message.ts -│ ├─ stamps-metadata.ts -│ ├─ submit-passport.ts -├─ components/ -│ ├─ list-stamps.tsx -│ ├─ score-gate.tsx -│ ├─ stamp-card.tsx -│ ├─ stamp-gate.tsx -│ ├─ submit-passport-button.tsx -├─ hooks/ -│ ├─ use-get-address-stamps.ts -│ ├─ use-get-score.ts -│ ├─ use-get-stamps-metadata.ts -│ ├─ use-submit-passport.ts -├─ utils/ -│ ├─ config.ts -│ ├─ data-types.ts -│ ├─ types.ts -├─ constants.ts -├─ types.ts -├─ README.md -``` diff --git a/integrations/gitcoin-passport/api/address-score.ts b/integrations/gitcoin-passport/api/address-score.ts deleted file mode 100644 index 97a247d..0000000 --- a/integrations/gitcoin-passport/api/address-score.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { env } from "@/env.mjs" - -import { GITCOIN_API_BASE_URL } from "../utils/constants" - -export async function GET( - req: Request, - { params }: { params: { address: string } } -) { - if (!env.GITCOIN_PASSPORT_API_KEY) - return new Response( - JSON.stringify({ detail: "Gitcoin passport api key not provided." }), - { - status: 400, - } - ) - - if (!env.GITCOIN_PASSPORT_SCORER_ID) - return new Response( - JSON.stringify({ - detail: "Gitcoin passport scorer (community) id not provided.", - }), - { - status: 400, - } - ) - - return await fetch( - `${GITCOIN_API_BASE_URL}/score/${env.GITCOIN_PASSPORT_SCORER_ID}/${params.address}`, - { - headers: { - "Content-Type": "application/json", - "X-API-Key": env.GITCOIN_PASSPORT_API_KEY, - }, - } - ) -} diff --git a/integrations/gitcoin-passport/api/address-stamps.ts b/integrations/gitcoin-passport/api/address-stamps.ts deleted file mode 100644 index 8a58ba6..0000000 --- a/integrations/gitcoin-passport/api/address-stamps.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { env } from "@/env.mjs" - -import { GITCOIN_API_BASE_URL } from "../utils/constants" - -export async function GET( - req: Request, - { params }: { params: { address: string } } -) { - if (!env.GITCOIN_PASSPORT_API_KEY) - return new Response( - JSON.stringify({ detail: "Gitcoin passport api key not provided." }), - { - status: 400, - } - ) - - return await fetch( - `${GITCOIN_API_BASE_URL}/stamps/${params.address}?include_metadata=true`, - { - headers: { - "Content-Type": "application/json", - "X-API-Key": env.GITCOIN_PASSPORT_API_KEY, - }, - } - ) -} diff --git a/integrations/gitcoin-passport/api/signing-message.ts b/integrations/gitcoin-passport/api/signing-message.ts deleted file mode 100644 index a973684..0000000 --- a/integrations/gitcoin-passport/api/signing-message.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { env } from "@/env.mjs" - -import { GITCOIN_API_BASE_URL } from "../utils/constants" - -export async function GET(req: Request) { - if (!env.GITCOIN_PASSPORT_API_KEY) - return new Response( - JSON.stringify({ detail: "Gitcoin passport api key not provided." }), - { - status: 400, - } - ) - - return await fetch(`${GITCOIN_API_BASE_URL}/signing-message`, { - headers: { - "Content-Type": "application/json", - "X-API-Key": env.GITCOIN_PASSPORT_API_KEY, - }, - }) -} diff --git a/integrations/gitcoin-passport/api/stamps-metadata.ts b/integrations/gitcoin-passport/api/stamps-metadata.ts deleted file mode 100644 index 05bec8f..0000000 --- a/integrations/gitcoin-passport/api/stamps-metadata.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { env } from "@/env.mjs" - -import { GITCOIN_API_BASE_URL } from "../utils/constants" - -export async function GET(req: Request) { - if (!env.GITCOIN_PASSPORT_API_KEY) - return new Response( - JSON.stringify({ detail: "Gitcoin passport api key not provided." }), - { - status: 400, - } - ) - - return await fetch(`${GITCOIN_API_BASE_URL}/stamp-metadata`, { - headers: { - "Content-Type": "application/json", - "X-API-Key": env.GITCOIN_PASSPORT_API_KEY, - }, - }) -} diff --git a/integrations/gitcoin-passport/api/submit-passport.ts b/integrations/gitcoin-passport/api/submit-passport.ts deleted file mode 100644 index 7779077..0000000 --- a/integrations/gitcoin-passport/api/submit-passport.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { env } from "@/env.mjs" -import { z } from "zod" - -import { GITCOIN_API_BASE_URL } from "../utils/constants" - -const submitPassportSchema = z.object({ - address: z.string(), - signature: z.string(), - nonce: z.string(), -}) - -export async function POST(req: Request) { - if (!env.GITCOIN_PASSPORT_API_KEY) - return new Response( - JSON.stringify({ detail: "Gitcoin passport api key not provided." }), - { - status: 400, - } - ) - - if (!env.GITCOIN_PASSPORT_SCORER_ID) - return new Response( - JSON.stringify({ - detail: "Gitcoin passport scorer (community) id not provided.", - }), - { - status: 400, - } - ) - - const { signature, nonce, address } = submitPassportSchema.parse( - await req.json() - ) - - return await fetch(`${GITCOIN_API_BASE_URL}/submit-passport`, { - method: "POST", - headers: { - "Content-Type": "application/json", - "X-API-Key": env.GITCOIN_PASSPORT_API_KEY, - }, - body: JSON.stringify({ - address, - community: env.GITCOIN_PASSPORT_SCORER_ID, - signature, - nonce, - }), - }) -} diff --git a/integrations/gitcoin-passport/components/list-stamps.tsx b/integrations/gitcoin-passport/components/list-stamps.tsx deleted file mode 100644 index 878e591..0000000 --- a/integrations/gitcoin-passport/components/list-stamps.tsx +++ /dev/null @@ -1,148 +0,0 @@ -import moment from "moment" -import { BiInfoCircle } from "react-icons/bi" -import { FiRefreshCcw } from "react-icons/fi" - -import { Skeleton } from "@/components/ui/skeleton" -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "@/components/ui/tooltip" - -import { useGetAddressStamps } from "../hooks/use-get-address-stamps" -import { useGetScore } from "../hooks/use-get-score" -import { useGetStampsMetadata } from "../hooks/use-get-stamps-metadata" -import { HAS_NOT_SUBMITTED_PASSPORT_YET_ERROR } from "../utils/constants" -import { StampCard } from "./stamp-card" -import { SubmitPassportButton } from "./submit-passport-button" - -const SCORE_INFO_TEXT = - "Make sure to hit the Submit Passport button after you claimed any new stamps to update your score." - -export const ListStamps = () => { - const { stamps, isLoading: stampsLoading } = useGetStampsMetadata() - - const { - data: scoreData, - isLoading: scoreLoading, - error: scoreError, - refetch: scoreRefetch, - } = useGetScore() - - const { - stamps: addressStamps, - isLoading: addressStampsLoading, - refetch: addressStampsRefetch, - } = useGetAddressStamps() - - return ( -
    -
    -
    - <> -

    Passport

    -
    - By collecting “stamps” of validation for your identity and online - reputation, you can gain access to the most trustworthy web3 - experiences and maximize your ability to benefit from platforms - like Gitcoin Grants. The more you verify your identity, the more - opportunities you will have to vote and participate across the - web3. -
    - -
    -
    Score:
    - {scoreLoading ? ( - - ) : scoreError ? ( - - {String(scoreError)} - - ) : ( - scoreData?.score && ( - <> - - {parseFloat(scoreData.score).toFixed(2)} - - - - - - - - - {SCORE_INFO_TEXT} - - - - ) - )} -
    - {scoreError && - String(scoreError) === HAS_NOT_SUBMITTED_PASSPORT_YET_ERROR && ( - - This usually means you have not submitted your passport for - scoring yet, please hit the{" "} - Submit Passport for Scoring{" "} - button to calculate your score. - - )} - {scoreData?.last_score_timestamp && ( -
    - - Last submitted at: - - - {scoreData ? ( - moment(scoreData.last_score_timestamp).format( - "HH:mm DD MMM YYYY" - ) - ) : ( - - )} - -
    - )} - -
    -
    -
    -

    All Stamps

    - {!addressStampsLoading && ( - addressStampsRefetch()} - > - - - )} -
    -
    - {stamps - ? stamps.map((stamp) => ( - - )) - : Array(6) - .fill(0) - .map((_, idx) => )} -
    -
    - {SCORE_INFO_TEXT} -
    -
    - ) -} diff --git a/integrations/gitcoin-passport/components/score-gate.tsx b/integrations/gitcoin-passport/components/score-gate.tsx deleted file mode 100644 index 652db6e..0000000 --- a/integrations/gitcoin-passport/components/score-gate.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import Link from "next/link" -import { FaLock } from "react-icons/fa" - -import { Skeleton } from "@/components/ui/skeleton" - -import { useGetScore } from "../hooks/use-get-score" -import { HAS_NOT_SUBMITTED_PASSPORT_YET_ERROR } from "../utils/constants" -import { ScoreGateProps } from "../utils/types" -import { SubmitPassportButton } from "./submit-passport-button" - -export const ScoreGate = ({ score, children, fallback }: ScoreGateProps) => { - const { data, error, isLoading, refetch } = useGetScore() - if (isLoading) return - if (error) - return ( -
    -
    {String(error)}
    - {String(error) === HAS_NOT_SUBMITTED_PASSPORT_YET_ERROR && ( - <> - - This usually means you have not submitted your passport for - scoring yet, please hit the{" "} - Submit Passport for Scoring{" "} - button to calculate your score. - - - - )} -
    - ) - if (data?.score && parseFloat(data.score) >= score) return <>{children} - return ( - <> - {fallback ?? ( -
    - - - You need a passport with the score of{" "} - - {score} - {" "} - or above to view this page. You can get more score by claiming more - stamps here. - -
    - )} - - ) -} diff --git a/integrations/gitcoin-passport/components/stamp-card.tsx b/integrations/gitcoin-passport/components/stamp-card.tsx deleted file mode 100644 index 2d07662..0000000 --- a/integrations/gitcoin-passport/components/stamp-card.tsx +++ /dev/null @@ -1,210 +0,0 @@ -import Image from "next/image" -import { AiOutlineCheck, AiOutlineCheckCircle } from "react-icons/ai" -import { BiInfoCircle } from "react-icons/bi" -import { FaExternalLinkAlt } from "react-icons/fa" -import { FiCircle } from "react-icons/fi" - -import { cn } from "@/lib/utils" -import { Button, buttonVariants } from "@/components/ui/button" -import { - Card, - CardDescription, - CardFooter, - CardHeader, - CardTitle, -} from "@/components/ui/card" -import { - Dialog, - DialogContent, - DialogFooter, - DialogTrigger, -} from "@/components/ui/dialog" -import { Skeleton } from "@/components/ui/skeleton" -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "@/components/ui/tooltip" -import { LinkComponent } from "@/components/shared/link-component" - -import { AddressStamp, StampsMetadataResponse } from "../utils/types" - -// just for the demo -const WhiteLogos = ["Github", "Gitcoin", "Lens", "GuildXYZ"] - -export const StampCard = ({ - stamp, - addressStamps, - addressStampsLoading, - className, -}: { - stamp?: StampsMetadataResponse - addressStamps?: AddressStamp[] - addressStampsLoading?: boolean - className?: string -}) => { - const addressHasStamp = !stamp - ? false - : addressStamps?.find( - (addressStamp) => - addressStamp.provider === stamp.id || - addressStamp.items.includes(stamp.id) - ) - return ( - - -
    - {stamp ? ( - {stamp.id} - ) : ( - - )} -
    - - {stamp ? stamp.name : } - -
    - - {stamp ? ( - stamp.description - ) : ( -
    - - - -
    - )} -
    -
    - {addressStampsLoading || !stamp ? ( - - ) : addressHasStamp ? ( -
    - - Verified -
    - ) : ( - - {stamp.connectMessage} - - - )} -
    - - {stamp ? ( - - - - - -
    -
    - {stamp.id} -
    -
    {stamp.name}
    - - {stamp.description} - - - {stamp.groups.map((group) => ( -
    -
    - {group.name} -
    - {group.stamps.map((groupStamp) => { - const addressClaimedStamp = addressStamps?.find((stamp) => - stamp.items.includes(groupStamp.name) - ) - return ( -
    - {addressClaimedStamp ? ( - - ) : ( - - )} -
    {groupStamp.description}
    - - - - - - - - {groupStamp.name} - - -
    - ) - })} -
    - ))} -
    - - Hover on the - - to see the stamp ID. - - - - {stamp.connectMessage} - - - -
    -
    - ) : ( - - - - )} -
    -
    - ) -} diff --git a/integrations/gitcoin-passport/components/stamp-gate.tsx b/integrations/gitcoin-passport/components/stamp-gate.tsx deleted file mode 100644 index 1792764..0000000 --- a/integrations/gitcoin-passport/components/stamp-gate.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { FaLock } from "react-icons/fa" - -import { Skeleton } from "@/components/ui/skeleton" - -import { useGetAddressStamps } from "../hooks/use-get-address-stamps" -import { useGetStampsMetadata } from "../hooks/use-get-stamps-metadata" -import { StampGateProps } from "../utils/types" -import { StampCard } from "./stamp-card" - -export const StampGate = ({ stampId, children, fallback }: StampGateProps) => { - const { stamps, isLoading, error } = useGetAddressStamps() - const { stamps: allAvailableStamps } = useGetStampsMetadata() - const gateStamp = allAvailableStamps?.find( - (stamp) => - stamp.id === stampId || - stamp.groups.find((stampGroup) => - stampGroup.stamps.find((sgs) => sgs.name === stampId) - ) - ) - if (isLoading) return - if (error) return
    {String(error)}
    - if ( - stamps?.find( - (stamp) => stamp.provider === stampId || stamp.items.includes(stampId) - ) - ) - return <>{children} - return ( - <> - {fallback ?? ( -
    - - - Please claim{" "} - - {stampId} - {" "} - stamp to be able to view this page. - - -
    - )} - - ) -} diff --git a/integrations/gitcoin-passport/components/submit-passport-button.tsx b/integrations/gitcoin-passport/components/submit-passport-button.tsx deleted file mode 100644 index 95c5478..0000000 --- a/integrations/gitcoin-passport/components/submit-passport-button.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { Button } from "@/components/ui/button" - -import { useSubmitPassport } from "../hooks/use-submit-passport" - -export const SubmitPassportButton = ({ - onSuccess, -}: { - onSuccess: () => void -}) => { - const { submitPassport, isLoading } = useSubmitPassport() - return ( -
    -
    -
    Submit Passport for Scoring
    - this is simply a message-signing to verify you are the owner of the - wallet. This operation does not include any fees. once submitted your - passport will be created/updated in this community. hit the submit - button to get your passport score. -
    - -
    - ) -} diff --git a/integrations/gitcoin-passport/hooks/use-get-address-stamps.ts b/integrations/gitcoin-passport/hooks/use-get-address-stamps.ts deleted file mode 100644 index c9f8837..0000000 --- a/integrations/gitcoin-passport/hooks/use-get-address-stamps.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { useCallback, useEffect } from "react" -import { useQuery } from "@tanstack/react-query" -import { useAccount } from "wagmi" - -import { AddressStamp, AddressStampsResponse } from "../utils/types" - -export const useGetAddressStamps = () => { - const { address } = useAccount() - const { - isLoading, - data: stamps, - error, - refetch: refetchQuery, - isRefetching, - } = useQuery({ - refetchOnWindowFocus: false, - queryKey: ["address-stamps", address], - queryFn: async () => { - if (!address) throw new Error("No address provided.") - const response = await fetch(`/api/gitcoin-passport/${address}/stamps`) - const data = (await response.json()) as AddressStampsResponse - if (response.status === 200) { - const userStamps: AddressStamp[] = [] - data.items.forEach((userStamp) => { - const provider = userStamp.metadata.platform.id - const providerObject = userStamps.find( - (userStamp) => userStamp.provider === provider - ) - const stampId = userStamp.credential.credentialSubject.provider - if (providerObject) - providerObject.items = [...providerObject.items, stampId] - userStamps.push({ provider, items: [stampId] }) - }) - return userStamps - } - if (data.detail) throw data.detail - throw new Error(response.statusText) - }, - }) - - const refetch = useCallback(() => void refetchQuery(), [refetchQuery]) - - useEffect(() => { - refetch() - }, [address]) - - return { isLoading: isLoading || isRefetching, error, stamps, refetch } -} diff --git a/integrations/gitcoin-passport/hooks/use-get-score.ts b/integrations/gitcoin-passport/hooks/use-get-score.ts deleted file mode 100644 index 4a33f65..0000000 --- a/integrations/gitcoin-passport/hooks/use-get-score.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { useCallback, useEffect } from "react" -import { useQuery } from "@tanstack/react-query" -import { useAccount } from "wagmi" - -import { AddressScoreResponse } from "../utils/types" - -export const useGetScore = () => { - const { address } = useAccount() - const { - isLoading, - isError, - data, - error, - isRefetching, - refetch: refetchQuery, - } = useQuery({ - refetchOnWindowFocus: false, - - queryKey: ["score", address], - queryFn: async () => { - if (!address) throw new Error("No address provided.") - const response = await fetch(`/api/gitcoin-passport/${address}/score`) - const data = await response.json() - if (response.status === 200) { - return data as AddressScoreResponse - } - if (data.detail) throw data.detail - throw new Error(response.statusText) - }, - }) - - const refetch = useCallback(() => void refetchQuery(), [refetchQuery]) - - useEffect(() => { - refetch() - }, [address]) - - return { isLoading: isLoading || isRefetching, isError, error, data, refetch } -} diff --git a/integrations/gitcoin-passport/hooks/use-get-stamps-metadata.ts b/integrations/gitcoin-passport/hooks/use-get-stamps-metadata.ts deleted file mode 100644 index 0ab5247..0000000 --- a/integrations/gitcoin-passport/hooks/use-get-stamps-metadata.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { useCallback } from "react" -import { useQuery } from "@tanstack/react-query" - -import { StampsMetadataResponse } from "../utils/types" - -export const useGetStampsMetadata = () => { - const { - isLoading, - data: stamps, - error, - refetch: refetchQuery, - } = useQuery({ - refetchOnWindowFocus: false, - queryKey: ["all-stamps"], - queryFn: async () => { - const response = await fetch("/api/gitcoin-passport/stamps-metadata") - const data = await response.json() - if (response.status === 200) { - return data as StampsMetadataResponse[] - } - if (data.detail) throw data.detail - throw new Error(response.statusText) - }, - }) - - const refetch = useCallback(() => void refetchQuery(), [refetchQuery]) - - return { isLoading, error, stamps, refetch } -} diff --git a/integrations/gitcoin-passport/hooks/use-submit-passport.ts b/integrations/gitcoin-passport/hooks/use-submit-passport.ts deleted file mode 100644 index 838e1da..0000000 --- a/integrations/gitcoin-passport/hooks/use-submit-passport.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { useEffect } from "react" -import { useMutation } from "@tanstack/react-query" -import { useAccount } from "wagmi" - -import { useToast } from "@/lib/hooks/use-toast" -import { useEthersSigner } from "@/lib/hooks/web3/use-ethers-signer" - -type SigningMessageResponse = { - message: string - nonce: string -} - -export const useSubmitPassport = () => { - const signer = useEthersSigner() - const { address } = useAccount() - const { toast, dismiss } = useToast() - const handleToast = (err: string) => { - toast({ - title: "Submit failed", - description: err, - }) - - setTimeout(() => { - dismiss() - }, 4200) - } - - const signMessageMutation = useMutation({ - mutationFn: async () => { - const response = await fetch("/api/gitcoin-passport/signing-message") - const data = await response.json() - if (response.status === 200) { - return data as SigningMessageResponse - } - if (data.detail) throw data.detail - throw new Error(response.statusText) - }, - }) - - const submitPassportMutation = useMutation({ - mutationFn: async ({ - signature, - nonce, - }: { - signature: string - nonce: string - }) => { - if (!address) throw new Error("No address provided.") - const response = await fetch("/api/gitcoin-passport/submit-passport", { - method: "POST", - body: JSON.stringify({ - address, - signature, - nonce, - }), - }) - const data = await response.json() - if (response.status === 200) { - return { success: true } - } - if (data.detail) throw data.detail - throw new Error(response.statusText) - }, - }) - - const submitPassport = async () => { - if (!signer) throw new Error("Ethers signer not provided.") - const { message, nonce } = await signMessageMutation.mutateAsync() - const signature = await signer.signMessage(message) - const submitResult = await submitPassportMutation.mutateAsync({ - signature, - nonce, - }) - return submitResult - } - - useEffect(() => { - if (signMessageMutation.error ?? signMessageMutation.error) - handleToast( - String(signMessageMutation.error ?? signMessageMutation.error) - ) - }, [signMessageMutation.error, signMessageMutation.error]) - - return { - submitPassport, - isLoading: - signMessageMutation.isLoading || submitPassportMutation.isLoading, - } -} diff --git a/integrations/gitcoin-passport/utils/constants.ts b/integrations/gitcoin-passport/utils/constants.ts deleted file mode 100644 index a64f4a8..0000000 --- a/integrations/gitcoin-passport/utils/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const GITCOIN_API_BASE_URL = "https://api.scorer.gitcoin.co/registry" -export const HAS_NOT_SUBMITTED_PASSPORT_YET_ERROR = - "Unable to get score for provided scorer." diff --git a/integrations/gitcoin-passport/utils/types.ts b/integrations/gitcoin-passport/utils/types.ts deleted file mode 100644 index 661053c..0000000 --- a/integrations/gitcoin-passport/utils/types.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ReactNode } from "react" - -export type StampId = string - -export type AddressStampsResponse = { - items: Array<{ - credential: { - credentialSubject: { - provider: string - } - } - metadata: { - platform: { - id: StampId - } - } - }> - detail?: string -} - -export type StampsMetadataResponse = { - id: StampId - icon: string - name: string - description: string - connectMessage: string - groups: Array<{ - name: string - stamps: Array<{ - name: StampId - description: string - hash: string - }> - }> -} - -export type AddressScoreResponse = { - score: string - last_score_timestamp: string -} - -export interface ScoreGateProps { - score: number - fallback?: ReactNode - children: ReactNode -} - -export interface StampGateProps { - stampId: StampId - fallback?: ReactNode - children: ReactNode -} - -export type AddressStamp = { - provider: StampId - items: StampId[] -} diff --git a/integrations/lens-protocol/README.md b/integrations/lens-protocol/README.md deleted file mode 100644 index 965c558..0000000 --- a/integrations/lens-protocol/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Lens Protocol - TurboETH Integration - -Integrate TurboETH with the Lens Protocol using the [Lens Protocol SDK](https://github.com/lens-protocol/lens-sdk). This integration aims to enable developers to seamlessly utilize the features of the Lens Protocol. - -## Features - -- Authenticate using a Lens profile -- Generate a testnet Lens profile -- View profiles with browsing and search functionalities -- View publications and comments, also with browsing and search functionalities -- View a profile's feed, posts, and replies -- Display revenue information for a profile or publication -- Like or Mirror a publication -- Follow or Unfollow a profile - -## Components - -- `ProfileCard`: Displays the primary profile information, including the name, handle, picture, and follower/following count. - -- `PublicationCard`: Presents the primary publication details, such as metadata, date, associated profile, and count and list of likes, comments, and mirrors. - -## Hooks - -- `useCreateTestProfile()`: Hook to create a testnet profile. - -## File Structure - -``` -integrations/lens-protocol -├── components -│ ├── auth -│ │ ├── is-user-authenticated.tsx -│ │ ├── login-button.tsx -│ │ ├── logout-button.tsx -│ │ └── not-authenticated-yet.tsx -│ ├── feed.tsx -│ ├── load-more-button.tsx -│ ├── navbar.tsx -│ ├── profile -│ │ ├── address-profiles.tsx -│ │ ├── explore-profiles.tsx -│ │ ├── follow-unfollow-button.tsx -│ │ ├── owned-profiles.tsx -│ │ ├── profile-card.tsx -│ │ ├── profile-list-modal.tsx -│ │ ├── profile-publications.tsx -│ │ ├── profile-revenue.tsx -│ │ ├── profile-stats.tsx -│ │ ├── profile.tsx -│ │ └── search-profiles.tsx -│ └── publications -│ ├── actions -│ │ ├── button.tsx -│ │ ├── comment.tsx -│ │ ├── index.tsx -│ │ ├── like.tsx -│ │ └── mirror.tsx -│ ├── commnets.tsx -│ ├── explore-publications.tsx -│ ├── publication-actions-and-stats.tsx -│ ├── publication-card.tsx -│ ├── publication-revenue.tsx -│ ├── publication.tsx -│ ├── search-publications.tsx -│ └── stats -│ ├── index.tsx -│ └── stat.tsx -├── hooks -│ └── use-create-profile.ts -├── lens-provider.ts -├── utils -│ └── index.ts -├── README.md -``` diff --git a/integrations/lens-protocol/components/auth/is-user-authenticated.tsx b/integrations/lens-protocol/components/auth/is-user-authenticated.tsx deleted file mode 100644 index ca41860..0000000 --- a/integrations/lens-protocol/components/auth/is-user-authenticated.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { ReactNode } from "react" -import { useActiveWallet } from "@lens-protocol/react-web" - -import { Skeleton } from "@/components/ui/skeleton" - -export const IsUserAuthenticated = ({ - children, - showLoading, -}: { - children: ReactNode - showLoading?: boolean -}) => { - const { data: wallet, loading } = useActiveWallet() - if (loading && showLoading) return - if (wallet && children) return <>{children} - return null -} diff --git a/integrations/lens-protocol/components/auth/login-button.tsx b/integrations/lens-protocol/components/auth/login-button.tsx deleted file mode 100644 index 529ace1..0000000 --- a/integrations/lens-protocol/components/auth/login-button.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useEffect } from "react" -import { useWalletLogin } from "@lens-protocol/react-web" -import { useAccount } from "wagmi" - -import { useToast } from "@/lib/hooks/use-toast" -import { Button } from "@/components/ui/button" - -export const LoginButton = () => { - const { execute: login, error: loginError, isPending } = useWalletLogin() - const { address } = useAccount() - const { toast, dismiss } = useToast() - - useEffect(() => { - if (loginError) showErrorToast(String(loginError)) - }, [loginError]) - - const showErrorToast = (loginError: string) => { - toast({ - title: "Login failed", - description: loginError, - }) - - setTimeout(() => { - dismiss() - }, 10000) - } - - const onLoginClick = async () => { - if (!address) return null - await login({ - address, - }) - } - return ( - - ) -} diff --git a/integrations/lens-protocol/components/auth/logout-button.tsx b/integrations/lens-protocol/components/auth/logout-button.tsx deleted file mode 100644 index f89f567..0000000 --- a/integrations/lens-protocol/components/auth/logout-button.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { useWalletLogout } from "@lens-protocol/react-web" - -import { Button } from "@/components/ui/button" - -export const LogoutButton = () => { - const { execute: logout, isPending } = useWalletLogout() - - return ( - - ) -} diff --git a/integrations/lens-protocol/components/auth/not-authenticated-yet.tsx b/integrations/lens-protocol/components/auth/not-authenticated-yet.tsx deleted file mode 100644 index a4021b8..0000000 --- a/integrations/lens-protocol/components/auth/not-authenticated-yet.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { ReactNode } from "react" -import { useActiveWallet } from "@lens-protocol/react-web" - -export const NotAuthenticatedYet = ({ children }: { children: ReactNode }) => { - const { data: wallet } = useActiveWallet() - if (!wallet) return <>{children} - return null -} diff --git a/integrations/lens-protocol/components/feed.tsx b/integrations/lens-protocol/components/feed.tsx deleted file mode 100644 index fbbb407..0000000 --- a/integrations/lens-protocol/components/feed.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { ProfileId, useActiveProfile, useFeed } from "@lens-protocol/react-web" - -import { LoadMoreButton } from "./load-more-button" -import { - PublicationCard, - PublicationCardMode, -} from "./publications/publication-card" - -export const Feed = ({ profileId }: { profileId: ProfileId }) => { - const activeProfile = useActiveProfile() - const { data, loading, hasMore, next } = useFeed({ - observerId: activeProfile?.data?.id ?? undefined, - profileId, - limit: 10, - }) - return ( -
    -

    Feed

    - {data?.map((feedItem) => ( - - ))} - {loading && - Array(5) - .fill(0) - .map((_, index) => ( - - ))} - - {!loading && !data?.length && User feed is empty.} -
    - ) -} diff --git a/integrations/lens-protocol/components/load-more-button.tsx b/integrations/lens-protocol/components/load-more-button.tsx deleted file mode 100644 index 917b141..0000000 --- a/integrations/lens-protocol/components/load-more-button.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { Button } from "@/components/ui/button" - -export const LoadMoreButton = ({ - hasMore, - loading, - onClick, -}: { - hasMore: boolean - loading: boolean - onClick: () => void -}) => - hasMore ? ( -
    - -
    - ) : null diff --git a/integrations/lens-protocol/components/navbar.tsx b/integrations/lens-protocol/components/navbar.tsx deleted file mode 100644 index c4df256..0000000 --- a/integrations/lens-protocol/components/navbar.tsx +++ /dev/null @@ -1,116 +0,0 @@ -import { useCallback, useState } from "react" -import { useRouter } from "next/navigation" -import { useActiveProfile } from "@lens-protocol/react-web" - -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" -import { Button } from "@/components/ui/button" -import { LinkComponent } from "@/components/shared/link-component" - -import { getProfilePictureSrc } from "../utils" -import { IsUserAuthenticated } from "./auth/is-user-authenticated" -import { LoginButton } from "./auth/login-button" -import { LogoutButton } from "./auth/logout-button" -import { NotAuthenticatedYet } from "./auth/not-authenticated-yet" - -export const Navbar = () => { - const [searchQuery, setSearchQuery] = useState("") - const router = useRouter() - const search = useCallback(() => { - router.push(`/integration/lens-protocol/search?q=${searchQuery}`) - }, [searchQuery]) - const { data: activeProfile } = useActiveProfile() - return ( - - ) -} diff --git a/integrations/lens-protocol/components/profile/address-profiles.tsx b/integrations/lens-protocol/components/profile/address-profiles.tsx deleted file mode 100644 index a31b9f2..0000000 --- a/integrations/lens-protocol/components/profile/address-profiles.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { useActiveProfile, useProfilesOwnedBy } from "@lens-protocol/react-web" - -import { LoadMoreButton } from "../load-more-button" -import { ProfileCard } from "./profile-card" - -export const AddressProfiles = ({ address }: { address: string }) => { - const { data: activeProfile } = useActiveProfile() - const { - data: profiles, - loading, - hasMore, - next, - } = useProfilesOwnedBy({ - limit: 10, - address, - observerId: activeProfile?.id, - }) - return ( -
    -

    - {address}Profiles -

    -
    - {profiles?.map((profile) => ( - - ))} - {loading && - Array(4) - .fill(0) - .map((_, index) => )} -
    - -
    - ) -} diff --git a/integrations/lens-protocol/components/profile/explore-profiles.tsx b/integrations/lens-protocol/components/profile/explore-profiles.tsx deleted file mode 100644 index fa05300..0000000 --- a/integrations/lens-protocol/components/profile/explore-profiles.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useRouter } from "next/navigation" -import { useActiveProfile, useExploreProfiles } from "@lens-protocol/react-web" - -import { LoadMoreButton } from "../load-more-button" -import { ProfileCard } from "./profile-card" - -export const ExploreProfiles = () => { - const profile = useActiveProfile() - const { - data: profiles, - loading, - hasMore, - next, - } = useExploreProfiles({ - limit: 10, - observerId: profile?.data?.id ?? undefined, - }) - const router = useRouter() - return ( - <> -
    -

    Profiles

    -
    - {profiles?.map((profile) => ( - - router.push( - `/integration/lens-protocol/profiles/${profile.handle}` - ) - } - /> - ))} - {loading && - Array(4) - .fill(0) - .map((_, index) => )} -
    - -
    - - ) -} diff --git a/integrations/lens-protocol/components/profile/follow-unfollow-button.tsx b/integrations/lens-protocol/components/profile/follow-unfollow-button.tsx deleted file mode 100644 index c1383f2..0000000 --- a/integrations/lens-protocol/components/profile/follow-unfollow-button.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import { useEffect } from "react" -import { - FollowPolicyType, - Profile, - ProfileOwnedByMe, - useActiveProfile, - useFollow, - useProfile, - useUnfollow, -} from "@lens-protocol/react-web" - -import { useToast } from "@/lib/hooks/use-toast" -import { Button } from "@/components/ui/button" - -const UnauthorizedFollowButton = () => { - const { toast, dismiss } = useToast() - const showErrorToast = () => { - toast({ - title: "You need to login first.", - }) - - setTimeout(() => { - dismiss() - }, 10000) - } - return ( - - ) -} - -const AuthorizedFollowUnfollowButton = ({ - profile, - activeProfile, -}: { - profile: Profile - activeProfile: ProfileOwnedByMe -}) => { - const { data: followeeProfile } = useProfile({ - observerId: activeProfile.id, - profileId: profile.id, - }) - const { - execute: follow, - error, - isPending: followLoading, - } = useFollow({ follower: activeProfile, followee: profile }) - const { execute: unfollow, isPending: unfollowLoading } = useUnfollow({ - follower: activeProfile, - followee: profile, - }) - const { toast, dismiss } = useToast() - - useEffect(() => { - if (error) showErrorToast(String(error)) - }, [error]) - - const showErrorToast = (error: string) => { - toast({ - title: "Operation failed", - description: error, - }) - - setTimeout(() => { - dismiss() - }, 10000) - } - if (followeeProfile?.isFollowedByMe) - return ( - - ) - return ( - - ) -} - -export const FollowUnfollowButton = ({ profile }: { profile: Profile }) => { - const { data: activeProfile } = useActiveProfile() - if (!activeProfile) return - if (profile.ownedByMe) return null - return ( - - ) -} diff --git a/integrations/lens-protocol/components/profile/owned-profiles.tsx b/integrations/lens-protocol/components/profile/owned-profiles.tsx deleted file mode 100644 index 38ba561..0000000 --- a/integrations/lens-protocol/components/profile/owned-profiles.tsx +++ /dev/null @@ -1,146 +0,0 @@ -import { turboIntegrations } from "@/data/turbo-integrations" -import { - useActiveProfile, - useActiveProfileSwitch, - useProfilesOwnedByMe, -} from "@lens-protocol/react-web" -import { FaExternalLinkAlt } from "react-icons/fa" - -import { Avatar, AvatarFallback } from "@/components/ui/avatar" -import { Button } from "@/components/ui/button" -import { Card } from "@/components/ui/card" -import { Input } from "@/components/ui/input" -import { LightDarkImage } from "@/components/shared/light-dark-image" -import { LinkComponent } from "@/components/shared/link-component" - -import { useCreateTestProfile } from "../../hooks/use-create-profile" -import { IsUserAuthenticated } from "../auth/is-user-authenticated" -import { LoginButton } from "../auth/login-button" -import { NotAuthenticatedYet } from "../auth/not-authenticated-yet" -import { LoadMoreButton } from "../load-more-button" -import { ProfileCard } from "./profile-card" - -export const OwnedProfiles = () => { - const { - data: profiles, - loading, - hasMore, - next, - } = useProfilesOwnedByMe({ - limit: 10, - }) - const { - onSubmit, - handle, - error, - setHandle, - isPending: isCreating, - } = useCreateTestProfile() - const { data: activeProfile } = useActiveProfile() - const { execute: switchActiveProfile, isPending } = useActiveProfileSwitch() - return ( -
    -

    Owned Profiles

    - -
    - {profiles - ?.filter( - (profile, index, arr) => - arr.findIndex((p) => p.handle === profile.handle) === index - ) - .map((profile) => { - const isProfileSelected = profile.id === activeProfile?.id - return ( - - - - View - -
    - } - /> - ) - })} - {loading && - Array(4) - .fill(0) - .map((_, index) => )} - -
    - - + - -
    -

    - Create a new profile on testnet -

    -
    - setHandle(e.target.value)} - /> - {error && ( -
    - {String(error)} -
    - )} - -
    -
    -
    -
    - - - -
    - Claim a new handle on Lens - -
    - Join the waitlist -
    -
    -
    - - - -
    -
    - You need to login first to be able to see your profiles. -
    - -
    -
    - - ) -} diff --git a/integrations/lens-protocol/components/profile/profile-card.tsx b/integrations/lens-protocol/components/profile/profile-card.tsx deleted file mode 100644 index a504c8b..0000000 --- a/integrations/lens-protocol/components/profile/profile-card.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { ReactNode } from "react" -import { useRouter } from "next/navigation" -import { Profile } from "@lens-protocol/react-web" - -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" -import { Card, CardContent, CardFooter, CardHeader } from "@/components/ui/card" -import { Skeleton } from "@/components/ui/skeleton" - -import { getProfilePictureSrc } from "../../utils" -import { FollowUnfollowButton } from "./follow-unfollow-button" - -export const ProfileCard = ({ - profile, - onClick, - cta, -}: { - profile: Profile | null - onClick?: () => void - cta?: ReactNode -}) => { - const router = useRouter() - return ( - { - e.stopPropagation() - if (onClick) onClick() - else if (profile) - router.push(`/integration/lens-protocol/profiles/${profile.handle}`) - }} - > - - {profile ? ( - - - - {profile.handle.substring(0, 1)} - - - ) : ( - - )} - {profile ? ( - - @{profile.handle} - - ) : ( - - )} - {profile ? ( - - {profile.name ?? profile.handle} - - ) : ( - - )} -
    - {profile ? ( - - {profile.stats.totalFollowers} - Followers - - ) : ( - - )} - {profile ? ( - - {profile.stats.totalFollowing} - Followings - - ) : ( - - )} -
    -
    - - {profile ? ( - - ) : ( - - )} - {cta && cta} - -
    - ) -} diff --git a/integrations/lens-protocol/components/profile/profile-list-modal.tsx b/integrations/lens-protocol/components/profile/profile-list-modal.tsx deleted file mode 100644 index 3888b0b..0000000 --- a/integrations/lens-protocol/components/profile/profile-list-modal.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import { ReactNode } from "react" -import { useRouter } from "next/navigation" -import { Profile } from "@lens-protocol/react-web" - -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" -import { - Dialog, - DialogContent, - DialogHeader, - DialogTrigger, -} from "@/components/ui/dialog" -import { Skeleton } from "@/components/ui/skeleton" - -import { getProfilePictureSrc } from "../../utils" -import { LoadMoreButton } from "../load-more-button" -import { FollowUnfollowButton } from "./follow-unfollow-button" - -const ProfileRow = ({ profile }: { profile: Profile | null }) => { - const router = useRouter() - - return ( -
    -
    { - e.stopPropagation() - if (profile) - router.push(`/integration/lens-protocol/profiles/${profile.handle}`) - }} - > - {profile ? ( - - - - {profile.handle.substring(0, 1)} - - - ) : ( - - )} -
    - {profile ? ( - - {profile.name ?? profile.handle} - - ) : ( - - )} - {profile ? ( - - @{profile.handle} - - ) : ( - - )} -
    -
    - {profile ? ( - - ) : ( - - )} -
    - ) -} - -export const ProfileListModal = ({ - profiles, - trigger, - hasMore, - loading, - title, - next, -}: { - profiles: Profile[] - trigger: ReactNode - hasMore: boolean - loading: boolean - title: string - next: () => void -}) => { - return ( - - {trigger} - - -

    {title}

    -
    -
    - {profiles?.map((profile) => ( - - ))} - {loading && - Array(4) - .fill(0) - .map((_, index) => )} - - {!loading && profiles?.length === 0 && ( - This list is empty. - )} -
    -
    -
    - ) -} diff --git a/integrations/lens-protocol/components/profile/profile-publications.tsx b/integrations/lens-protocol/components/profile/profile-publications.tsx deleted file mode 100644 index 1c70429..0000000 --- a/integrations/lens-protocol/components/profile/profile-publications.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { - Post, - ProfileId, - PublicationTypes, - useActiveProfile, - usePublications, -} from "@lens-protocol/react-web" -import { FaRetweet } from "react-icons/fa" - -import { LoadMoreButton } from "../load-more-button" -import { PublicationCard } from "../publications/publication-card" - -export const ProfilePublications = ({ - profileId, - publicationTypes, - title, -}: { - profileId: ProfileId - publicationTypes: PublicationTypes[] - title: string -}) => { - const { data: activeProfile } = useActiveProfile() - const { - data: publications, - loading, - hasMore, - next, - } = usePublications({ - profileId, - observerId: activeProfile?.id, - publicationTypes, - limit: 10, - }) - return ( -
    -

    {title}

    - {publications?.map((publication) => - publication.__typename === "Mirror" ? ( - <> -
    - - - {publication.profile.name ?? publication.profile.handle} - - Mirrored -
    - - - ) : ( - - ) - )} - {loading && - Array(5) - .fill(0) - .map((_, index) => ( - - ))} - - {publications?.length === 0 && No {title} yet.} -
    - ) -} diff --git a/integrations/lens-protocol/components/profile/profile-revenue.tsx b/integrations/lens-protocol/components/profile/profile-revenue.tsx deleted file mode 100644 index f621f6c..0000000 --- a/integrations/lens-protocol/components/profile/profile-revenue.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { ProfileId, useProfileFollowRevenue } from "@lens-protocol/react-web" - -import { Skeleton } from "@/components/ui/skeleton" - -export const ProfileRevenue = ({ profileId }: { profileId: ProfileId }) => { - const { data, loading: revenueLoading } = useProfileFollowRevenue({ - profileId, - }) - return ( -
    -

    Profile Revenue

    - {data?.map((revenue) => { - const { asset } = revenue.totalAmount - return ( -
    - - {revenue.totalAmount.toNumber()} - - {asset.symbol} -
    - ) - })} - {revenueLoading && ( -
    - -
    - )} - {!data?.length && ( - None yet - )} -
    - ) -} diff --git a/integrations/lens-protocol/components/profile/profile-stats.tsx b/integrations/lens-protocol/components/profile/profile-stats.tsx deleted file mode 100644 index d5381a9..0000000 --- a/integrations/lens-protocol/components/profile/profile-stats.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { - Profile, - useActiveProfile, - useProfileFollowers, - useProfileFollowing, -} from "@lens-protocol/react-web" - -import { ProfileListModal } from "./profile-list-modal" - -export const ProfileStats = ({ profile }: { profile: Profile }) => { - const { data: activeProfile } = useActiveProfile() - const { - data: followers, - loading: followersLoading, - hasMore: followersHasMore, - next: followersNext, - } = useProfileFollowers({ - profileId: profile.id, - observerId: activeProfile?.id, - limit: 10, - }) - const { - data: followings, - loading: followingsLoading, - hasMore: followingsHasMore, - next: followingsNext, - } = useProfileFollowing({ - walletAddress: profile.ownedBy, - observerId: activeProfile?.id, - limit: 10, - }) - return ( -
    - - follower.wallet.defaultProfile - ? [follower.wallet.defaultProfile] - : [] - ) ?? [] - } - title="Followers" - trigger={ - - {profile.stats.totalFollowers} - Followers - - } - /> - following.profile) ?? []} - title="Followings" - trigger={ - - {profile.stats.totalFollowing} - Followings - - } - /> -
    - ) -} diff --git a/integrations/lens-protocol/components/profile/profile.tsx b/integrations/lens-protocol/components/profile/profile.tsx deleted file mode 100644 index 5e3ba76..0000000 --- a/integrations/lens-protocol/components/profile/profile.tsx +++ /dev/null @@ -1,191 +0,0 @@ -import Link from "next/link" -import { - PublicationTypes, - useActiveProfile, - useProfile, -} from "@lens-protocol/react-web" - -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" -import { Skeleton } from "@/components/ui/skeleton" -import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" - -import { getProfilePictureSrc } from "../../utils" -import { IsUserAuthenticated } from "../auth/is-user-authenticated" -import { LoginButton } from "../auth/login-button" -import { NotAuthenticatedYet } from "../auth/not-authenticated-yet" -import { Feed } from "../feed" -import { PublicationCard } from "../publications/publication-card" -import { FollowUnfollowButton } from "./follow-unfollow-button" -import { ProfilePublications } from "./profile-publications" -import { ProfileRevenue } from "./profile-revenue" -import { ProfileStats } from "./profile-stats" - -export const Profile = ({ handle }: { handle: string }) => { - const activeProfile = useActiveProfile() - const { data: profile, loading } = useProfile({ - handle, - observerId: activeProfile?.data?.id ?? undefined, - }) - - if (!loading && !profile) - return
    Profile not found!
    - return ( -
    -
    - {profile ? ( - - - - {profile.handle.substring(0, 1)} - - - ) : ( - - )} - {!profile ? ( - - ) : ( - profile.name && ( - - {profile.name} - - ) - )} - {profile ? ( - @{profile.handle} - ) : ( - - )} - {profile ? ( - - ) : ( -
    - - -
    - )} - {profile && !profile.ownedByMe && ( - - )} - {!profile ? ( -
    - - - -
    - ) : ( - profile.bio && ( - <> -
    Bio
    -
    - {profile.bio} -
    - - ) - )} -
    - {profile ? ( -
    Owned by
    - ) : ( - - )} - {profile ? ( - - {profile.ownedBy} - - ) : ( - - )} - {profile ? ( - - See all profiles - - ) : ( - - )} -
    - {profile && Object.keys(profile.attributes).length > 0 && ( -
    - {Object.entries(profile.attributes).map(([key, attribute]) => ( -
    - {key}: - - {attribute.toString()} - -
    - ))} -
    - )} - {profile ? ( - - ) : ( - - )} -
    -
    - -
    - {profile ? ( - - Feed - Posts - Replies - - ) : ( - - - Feed - Posts - Replies - - - )} -
    - {profile ? ( - <> - - - - - -
    - You need to login to see the profile feed. -
    - -
    -
    - - - - - - - - ) : ( -
    - {Array(5) - .fill(0) - .map((_, index) => ( - - ))} -
    - )} -
    -
    -
    - ) -} diff --git a/integrations/lens-protocol/components/profile/search-profiles.tsx b/integrations/lens-protocol/components/profile/search-profiles.tsx deleted file mode 100644 index 3656e3f..0000000 --- a/integrations/lens-protocol/components/profile/search-profiles.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useRouter } from "next/navigation" -import { useActiveProfile, useSearchProfiles } from "@lens-protocol/react-web" - -import { LoadMoreButton } from "../load-more-button" -import { ProfileCard } from "./profile-card" - -export const SearchProfiles = ({ query }: { query: string }) => { - const profile = useActiveProfile() - const { - data: profiles, - loading, - hasMore, - next, - } = useSearchProfiles({ - query, - limit: 10, - observerId: profile?.data?.id ?? undefined, - }) - const router = useRouter() - return ( -
    -

    Profiles

    -
    - {profiles?.map((profile) => ( - - router.push( - `/integration/lens-protocol/profiles/${profile.handle}` - ) - } - /> - ))} - {loading && - Array(4) - .fill(0) - .map((_, index) => )} -
    - - {!loading && !profiles?.length && No profiles found.} -
    - ) -} diff --git a/integrations/lens-protocol/components/publications/actions/button.tsx b/integrations/lens-protocol/components/publications/actions/button.tsx deleted file mode 100644 index 03c80e6..0000000 --- a/integrations/lens-protocol/components/publications/actions/button.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { ReactNode } from "react" - -import { Button } from "@/components/ui/button" -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "@/components/ui/tooltip" - -export const ActionButton = ({ - color, - execute, - name, - hideCount, - count, - disabled, - icon, -}: { - color: string - execute: () => void - name: string - hideCount: boolean - count: number - disabled: boolean - icon: ReactNode -}) => { - const btnColor = `text-${color}-500 dark:text-${color}-300 hover:text-${color}-600 hover:dark:text-${color}-200` - return ( - - ) -} diff --git a/integrations/lens-protocol/components/publications/actions/comment.tsx b/integrations/lens-protocol/components/publications/actions/comment.tsx deleted file mode 100644 index 8c2e16c..0000000 --- a/integrations/lens-protocol/components/publications/actions/comment.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { FaRegCommentAlt } from "react-icons/fa" - -import { useToast } from "@/lib/hooks/use-toast" - -import { IActionButton } from "." -import { ActionButton } from "./button" - -export const CommentButton = ({ publication, hideCount }: IActionButton) => { - const { toast, dismiss } = useToast() - const showErrorToast = () => { - toast({ - title: "Commenting on a publication is not supported currently.", - }) - - setTimeout(() => { - dismiss() - }, 10000) - } - return ( - showErrorToast()} - hideCount={hideCount} - icon={} - name="comment" - /> - ) -} diff --git a/integrations/lens-protocol/components/publications/actions/index.tsx b/integrations/lens-protocol/components/publications/actions/index.tsx deleted file mode 100644 index b4f1aa1..0000000 --- a/integrations/lens-protocol/components/publications/actions/index.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { Comment, Post } from "@lens-protocol/react-web" - -export interface IActionButton { - publication: Post | Comment - hideCount: boolean -} diff --git a/integrations/lens-protocol/components/publications/actions/like.tsx b/integrations/lens-protocol/components/publications/actions/like.tsx deleted file mode 100644 index e864a94..0000000 --- a/integrations/lens-protocol/components/publications/actions/like.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import { - Profile, - ReactionTypes, - useActiveProfile, - useReaction, -} from "@lens-protocol/react-web" -import { FaHeart, FaRegHeart } from "react-icons/fa" - -import { useToast } from "@/lib/hooks/use-toast" - -import { IActionButton } from "." -import { IsUserAuthenticated } from "../../auth/is-user-authenticated" -import { NotAuthenticatedYet } from "../../auth/not-authenticated-yet" -import { ActionButton } from "./button" - -const UnAuthorizedLikeButton = ({ publication, hideCount }: IActionButton) => { - const { toast, dismiss } = useToast() - const showErrorToast = () => { - toast({ - title: "You need to login first.", - }) - - setTimeout(() => { - dismiss() - }, 10000) - } - return ( - showErrorToast()} - hideCount={hideCount} - icon={} - name="like" - /> - ) -} - -const AuthorizedLikeButton = ({ - publication, - hideCount, - profile, -}: IActionButton & { profile: Profile }) => { - const { addReaction, removeReaction, hasReaction, isPending } = useReaction({ - profileId: profile.id, - }) - - const reactionType = ReactionTypes.Upvote - - const hasReactionType = hasReaction({ - reactionType, - publication, - }) - - const execute = async () => { - if (isPending) return - if (!hasReactionType) { - await addReaction({ - reactionType, - publication, - }) - } else if (hasReactionType) { - await removeReaction({ - reactionType, - publication, - }) - } - } - - return ( - : } - name="like" - /> - ) -} - -export const LikeButton = (props: IActionButton) => { - const { data: profile } = useActiveProfile() - return ( - <> - - - - - {profile && } - - - ) -} diff --git a/integrations/lens-protocol/components/publications/actions/mirror.tsx b/integrations/lens-protocol/components/publications/actions/mirror.tsx deleted file mode 100644 index bbd9aa9..0000000 --- a/integrations/lens-protocol/components/publications/actions/mirror.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import { useEffect } from "react" -import { - ProfileOwnedByMe, - useActiveProfile, - useCreateMirror, -} from "@lens-protocol/react-web" -import { FaRetweet } from "react-icons/fa" - -import { useToast } from "@/lib/hooks/use-toast" - -import { IActionButton } from "." -import { IsUserAuthenticated } from "../../auth/is-user-authenticated" -import { NotAuthenticatedYet } from "../../auth/not-authenticated-yet" -import { ActionButton } from "./button" - -const UnAuthorizedMirrorButton = ({ - publication, - hideCount, -}: IActionButton) => { - const { toast, dismiss } = useToast() - const showErrorToast = () => { - toast({ - title: "You need to login first.", - }) - - setTimeout(() => { - dismiss() - }, 10000) - } - return ( - showErrorToast()} - hideCount={hideCount} - icon={} - name="mirror" - /> - ) -} - -const AuthorizedMirrorButton = ({ - publication, - hideCount, - profile, -}: IActionButton & { profile: ProfileOwnedByMe }) => { - const { - execute: create, - isPending, - error, - } = useCreateMirror({ publisher: profile }) - const { toast, dismiss } = useToast() - const showErrorToast = (error: string) => { - toast({ - title: "Mirror failed.", - description: error, - }) - - setTimeout(() => { - dismiss() - }, 10000) - } - useEffect(() => { - if (error) showErrorToast(String(error)) - }, [error]) - return ( - } - name="mirror" - execute={() => - create({ - publication, - }) - } - /> - ) -} - -export const MirrorButton = (props: IActionButton) => { - const { data: profile } = useActiveProfile() - return ( - <> - - - - - {profile && } - - - ) -} diff --git a/integrations/lens-protocol/components/publications/commnets.tsx b/integrations/lens-protocol/components/publications/commnets.tsx deleted file mode 100644 index 47cea9d..0000000 --- a/integrations/lens-protocol/components/publications/commnets.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { PublicationId, useComments } from "@lens-protocol/react-web" - -import { LoadMoreButton } from "../load-more-button" -import { PublicationCard } from "./publication-card" - -export const Comments = ({ - publicationId, -}: { - publicationId: PublicationId -}) => { - const { - data: comments, - loading, - hasMore, - next, - } = useComments({ - commentsOf: publicationId, - limit: 10, - }) - return ( -
    - {comments?.map((comment, index) => ( - - ))} - {loading && - Array(5) - .fill(0) - .map((_, index) => ( - - ))} - -
    - ) -} diff --git a/integrations/lens-protocol/components/publications/explore-publications.tsx b/integrations/lens-protocol/components/publications/explore-publications.tsx deleted file mode 100644 index ec35cc7..0000000 --- a/integrations/lens-protocol/components/publications/explore-publications.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { - Post, - PublicationTypes, - useExplorePublications, -} from "@lens-protocol/react-web" - -import { LoadMoreButton } from "../load-more-button" -import { PublicationCard } from "./publication-card" - -export const ExplorePublications = () => { - const { - data: publications, - loading, - hasMore, - next, - } = useExplorePublications({ - limit: 10, - publicationTypes: [PublicationTypes.Post], - }) - return ( - <> -
    -

    Publications

    - {publications?.map((publication) => ( - - ))} - {loading && - Array(5) - .fill(0) - .map((_, index) => ( - - ))} - -
    - - ) -} diff --git a/integrations/lens-protocol/components/publications/publication-actions-and-stats.tsx b/integrations/lens-protocol/components/publications/publication-actions-and-stats.tsx deleted file mode 100644 index 6450d31..0000000 --- a/integrations/lens-protocol/components/publications/publication-actions-and-stats.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Comment, Post } from "@lens-protocol/react-web" - -import { CommentButton } from "./actions/comment" -import { LikeButton } from "./actions/like" -import { MirrorButton } from "./actions/mirror" -import { PublicationStats } from "./stats" - -export const PublicationActionsAndStats = ({ - publication, - showCounts = false, -}: { - publication: Post | Comment - showCounts: boolean -}) => { - return ( -
    - {showCounts && } -
    - - - -
    -
    - ) -} diff --git a/integrations/lens-protocol/components/publications/publication-card.tsx b/integrations/lens-protocol/components/publications/publication-card.tsx deleted file mode 100644 index c06597e..0000000 --- a/integrations/lens-protocol/components/publications/publication-card.tsx +++ /dev/null @@ -1,243 +0,0 @@ -import { ReactNode } from "react" -import { useRouter } from "next/navigation" -import { Comment, FeedItem, Post } from "@lens-protocol/react-web" -import moment from "moment" -import { FaRetweet } from "react-icons/fa" - -import { cn } from "@/lib/utils" -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" -import { Card, CardContent } from "@/components/ui/card" -import { Skeleton } from "@/components/ui/skeleton" - -import { getProfilePictureSrc } from "../../utils" -import { Comments } from "./commnets" -import { PublicationActionsAndStats } from "./publication-actions-and-stats" -import { PublicationRevenue } from "./publication-revenue" - -export enum PublicationCardMode { - Normal = "normal", - Compact = "compact", - FeedComment = "FeedComment", - Full = "full", -} - -const Wrapper = ({ - shouldLinkToFullMode, - children, - id, - classNames, - chainedStyle, - last, -}: { - shouldLinkToFullMode: boolean - children: ReactNode - id?: string - classNames: string - chainedStyle: boolean - last: boolean -}) => { - const router = useRouter() - const defaultClassName = "p-6 w-full block" - const bottomLine = - "before:absolute before:left-[32px] before:top-[40px] before:h-full before:bg-slate-200 before:dark:bg-neutral-600 before:self-start before:w-[1px]" - const topLine = - "after:absolute after:left-[32px] after:top-[0px] after:h-[24px] after:bg-slate-200 after:dark:bg-neutral-600 after:self-start after:w-[1px]" - const chainedClassName = "relative ml-[-12px]" - const baseClassName = cn( - defaultClassName, - chainedStyle && chainedClassName, - chainedStyle && !last && bottomLine, - chainedStyle && topLine - ) - if (shouldLinkToFullMode) - return ( - { - e.stopPropagation() - if (id) router.push(`/integration/lens-protocol/publications/${id}`) - }} - > - {children} - - ) - return ( - - {children} - - ) -} - -export const PublicationCard = ({ - publication, - feedItem, - mode = PublicationCardMode.Normal, - wrapperClassNames = "", - last = false, - chainedStyle = false, -}: { - publication: Post | Comment | null - feedItem?: FeedItem - mode?: PublicationCardMode - wrapperClassNames?: string - last?: boolean - chainedStyle?: boolean -}) => { - const router = useRouter() - const compactMode = mode === PublicationCardMode.Compact - const fullMode = mode === PublicationCardMode.Full - const feedCommentMode = mode === PublicationCardMode.FeedComment - const { profile } = publication ?? { profile: null } - const mirrored = feedItem?.electedMirror ?? false - const bottomLine = - "relative before:absolute before:left-[-20px] before:top-[-16px] before:h-[calc(100%_+_32px)] before:bg-slate-200 before:dark:bg-neutral-600 before:self-start before:w-[1px]" - return ( - - {mirrored && ( -
    - - - {feedItem?.electedMirror?.profile.name ?? - feedItem?.electedMirror?.profile.handle} - - Mirrored -
    - )} -
    -
    -
    { - e.stopPropagation() - if (profile) - router.push( - `/integration/lens-protocol/profiles/${profile.handle}` - ) - }} - > - {profile ? ( - - - - {profile.handle.substring(0, 1)} - - - ) : ( - - )} -
    - - {profile ? ( - profile.name ?? profile.handle - ) : ( - - )} - - {!compactMode && ( - - {profile ? ( - <>@{profile.handle} - ) : ( - - )} - - )} -
    -
    -
    -
    -
    -
    - {publication ? ( - publication.metadata?.content - ) : ( -
    - - - -
    - )} -
    -
    - {publication ? ( - moment(publication.createdAt).format("HH:mm YY MMM DD") - ) : ( - - )} -
    - {!compactMode && publication && ( - - )} - {fullMode && publication && ( - - )} -
    -
    - {fullMode ? ( - publication ? ( - - ) : ( -
    - {Array(3) - .fill(0) - .map((_, index) => ( - - ))} -
    - ) - ) : null} - {feedCommentMode && feedItem?.comments?.[0] && ( - - )} -
    -
    - ) -} diff --git a/integrations/lens-protocol/components/publications/publication-revenue.tsx b/integrations/lens-protocol/components/publications/publication-revenue.tsx deleted file mode 100644 index 720bad6..0000000 --- a/integrations/lens-protocol/components/publications/publication-revenue.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { PublicationId, usePublicationRevenue } from "@lens-protocol/react-web" - -export const PublicationRevenue = ({ - publicationId, -}: { - publicationId: PublicationId -}) => { - const { data, loading: revenueLoading } = usePublicationRevenue({ - publicationId, - }) - if (revenueLoading) return null - return ( -
    -

    Publication Revenue

    - {data ? ( -
    - - {data.revenue.totalAmount.toNumber()} - - - {data.revenue.totalAmount.asset.symbol} - -
    - ) : ( - None yet - )} -
    - ) -} diff --git a/integrations/lens-protocol/components/publications/publication.tsx b/integrations/lens-protocol/components/publications/publication.tsx deleted file mode 100644 index 6d88c54..0000000 --- a/integrations/lens-protocol/components/publications/publication.tsx +++ /dev/null @@ -1,115 +0,0 @@ -import { - Comment, - Mirror, - Post, - PublicationId, - usePublication, -} from "@lens-protocol/react-web" -import { FaRegCommentAlt, FaRetweet } from "react-icons/fa" - -import { LinkComponent } from "@/components/shared/link-component" - -import { PublicationCard, PublicationCardMode } from "./publication-card" - -export const Publication = ({ - publicationId, -}: { - publicationId: PublicationId -}) => { - return ( -
    - -
    - ) -} - -export const PublicationDetails = ({ - publicationId, -}: { - publicationId: PublicationId -}) => { - const { data: publication, loading } = usePublication({ - publicationId, - }) - if (loading) - return ( - - ) - if (!publication) - return
    Publication not found!
    - if (publication.__typename === "Mirror") - return - if (publication.__typename === "Comment") - return - if (publication.__typename === "Post") - return - return ( -
    Unknown type of publication!
    - ) -} - -const RenderPost = ({ publication }: { publication: Post }) => { - return ( - - ) -} - -const RenderMirror = ({ publication }: { publication: Mirror }) => { - const { profile } = publication - return ( -
    -
    - - - - {profile.name ?? profile.handle} - - - Mirrored -
    - {publication.mirrorOf.__typename === "Post" && ( - - )} - {publication.mirrorOf.__typename === "Comment" && ( - - )} -
    - ) -} - -const RenderComment = ({ publication }: { publication: Comment }) => { - const { profile } = publication - return ( -
    -
    - Original publication -
    - {publication.commentOn?.__typename === "Post" && ( - - )} -
    - - - - {profile.name ?? profile.handle} - - - Commented -
    - -
    - ) -} diff --git a/integrations/lens-protocol/components/publications/search-publications.tsx b/integrations/lens-protocol/components/publications/search-publications.tsx deleted file mode 100644 index d999f8b..0000000 --- a/integrations/lens-protocol/components/publications/search-publications.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { Post, useSearchPublications } from "@lens-protocol/react-web" - -import { LoadMoreButton } from "../load-more-button" -import { PublicationCard } from "./publication-card" - -export const SearchPublications = ({ query }: { query: string }) => { - const { - data: publications, - loading, - hasMore, - next, - } = useSearchPublications({ query, limit: 10 }) - return ( -
    -

    Publications

    - {publications?.map((publication) => ( - - ))} - {loading && - Array(5) - .fill(0) - .map((_, index) => ( - - ))} - - {!loading && !publications?.length && No publications found.} -
    - ) -} diff --git a/integrations/lens-protocol/components/publications/stats/index.tsx b/integrations/lens-protocol/components/publications/stats/index.tsx deleted file mode 100644 index c3e0d25..0000000 --- a/integrations/lens-protocol/components/publications/stats/index.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { - Comment, - Post, - useActiveProfile, - useWhoCollectedPublication, - useWhoMirroredPublication, - useWhoReacted, -} from "@lens-protocol/react-web" - -import { Stat } from "./stat" - -export const PublicationStats = ({ - publication, -}: { - publication: Post | Comment -}) => { - const { data: profile } = useActiveProfile() - const likes = useWhoReacted({ - publicationId: publication.id, - observerId: profile?.id, - limit: 10, - }) - const mirrors = useWhoMirroredPublication({ - publicationId: publication.id, - observerId: profile?.id, - limit: 10, - }) - const collects = useWhoCollectedPublication({ - publicationId: publication.id, - observerId: profile?.id, - limit: 10, - }) - return ( -
    - - - {publication.stats.commentsCount} - - comments - - reaction.profile)} - hasMore={likes.hasMore} - loading={likes.loading} - name="likes" - next={likes.next} - value={publication.stats.totalUpvotes} - /> - - - wallet.defaultProfile ? [wallet.defaultProfile] : [] - )} - hasMore={collects.hasMore} - loading={collects.loading} - name="collects" - next={collects.next} - value={publication.stats.totalAmountOfCollects} - /> -
    - ) -} diff --git a/integrations/lens-protocol/components/publications/stats/stat.tsx b/integrations/lens-protocol/components/publications/stats/stat.tsx deleted file mode 100644 index 6b3b0a5..0000000 --- a/integrations/lens-protocol/components/publications/stats/stat.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Profile } from "@lens-protocol/react-web" - -import { ProfileListModal } from "../../profile/profile-list-modal" - -export const Stat = ({ - name, - value, - data, - hasMore, - loading, - next, -}: { - name: string - value: number - data?: Profile[] - hasMore: boolean - loading: boolean - next: () => void -}) => ( - - {value} - {name} - - } - /> -) diff --git a/integrations/lens-protocol/hooks/use-create-profile.ts b/integrations/lens-protocol/hooks/use-create-profile.ts deleted file mode 100644 index e05cc0f..0000000 --- a/integrations/lens-protocol/hooks/use-create-profile.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { FormEvent, useState } from "react" -import { isValidHandle, useCreateProfile } from "@lens-protocol/react-web" - -export const useCreateTestProfile = () => { - const [handle, setHandle] = useState(null) - const [error, setError] = useState(null) - - const { execute: create, error: createError, isPending } = useCreateProfile() - - const onSubmit = async (e: FormEvent) => { - e.preventDefault() - setError(null) - if (!handle) return - if (!isValidHandle(handle)) { - setError("Handle is taken.") - return - } - setHandle(null) - await create({ handle }) - } - - return { error: error ?? createError, isPending, onSubmit, handle, setHandle } -} diff --git a/integrations/lens-protocol/lens-provider.ts b/integrations/lens-protocol/lens-provider.ts deleted file mode 100644 index 37c9a3b..0000000 --- a/integrations/lens-protocol/lens-provider.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { development, LensConfig } from "@lens-protocol/react-web" -import { bindings as wagmiBindings } from "@lens-protocol/wagmi" - -export const lensProviderConfig: LensConfig = { - bindings: wagmiBindings(), - environment: development, -} diff --git a/integrations/lens-protocol/utils/index.ts b/integrations/lens-protocol/utils/index.ts deleted file mode 100644 index 405a475..0000000 --- a/integrations/lens-protocol/utils/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Profile } from "@lens-protocol/react-web" - -export const getProfilePictureSrc = (profile: Profile): string | undefined => { - if (!profile || !profile.picture) return undefined - if (profile.picture.__typename === "MediaSet") { - const splittedUrl = profile.picture.original.url.split("ipfs://") - if (splittedUrl.length === 2) - return `https://gateway.ipfs.io/ipfs/${splittedUrl[1]}` - return profile.picture.original.url - } - if (profile.picture.__typename === "NftImage") - return `https://cdn.stamp.fyi/avatar/eth:${profile.picture.uri}` - return undefined -} diff --git a/integrations/lit-protocol/README.md b/integrations/lit-protocol/README.md deleted file mode 100644 index 6953edd..0000000 --- a/integrations/lit-protocol/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# Lit Protocol - TurboETH Integration - -This React Hook integrates with [Lit Protocol](https://litprotocol.com/), enabling users to encrypt and decrypt messages using [Threshold Cryptography](https://en.wikipedia.org/wiki/Threshold_cryptosystem). Users can define access control conditions based on on-chain data, such as specific wallet addresses, ERC20, ERC721, and ERC1155 token holders. The integration is built on top of the [Lit Protocol SDK V2](https://developer.litprotocol.com/SDK/intro). - -## Features - -- Encrypt messages using the Lit Protocol SDK, based access control conditions -- Store encrypted messages and metadata in a MongoDB database -- Decrypt messages securely using the Lit Protocol SDK - -## API - -`signAuthMessage()` -Get the authentication signature using SIWE. Returns a Promise that resolves to the signature object containing the signature, derivation method, signed message, and wallet address. - -**Error Handling:** - -- Throws an error if the wallet is not connected. - -`encryptMessage(messageToEncrypt, accessControlConditions)` -Encrypt a message using the Lit Protocol. Returns a Promise that resolves to an object containing the encrypted message, database ID, and encrypted symmetric key. - -**Error Handling:** - -- Throws an error if the wallet is not connected or if the message cannot be encrypted. - -`decryptMessage(id)` -Decrypt a message using the Lit Protocol given the database ID. Returns a Promise that resolves to the decrypted message or an error message if it is not possible to decrypt the message (most common erro sources: invalid Access Control Conditions provided, denied access, or error to access the Lit network). - -**Error Handling:** - -- Throws an error if the message cannot be decrypted or if the wallet is not connected. - -## File Structure - -``` -integrations/lit-protocol -├─ api/ -│ ├─ [id].tsx -│ ├─ encrypt.tsx -├─ components/ -│ ├─ access-control/ -│ │ ├─ access-control-single-address.tsx -│ │ ├─ access-control-single-erc721.tsx -│ │ ├─ access-control-token-group.tsx -│ │ ├─ index.ts -│ │ ├─ types.ts -│ ├─ form-lit-decrypt-message.tsx -│ ├─ form-lit-encrypt-message.tsx -├─ hooks/ -│ ├─ use-lit-client.ts -├─ utils/ -│ ├─ config.ts -│ ├─ data-types.ts -│ ├─ types.ts -├─ client.ts -├─ README.md -``` diff --git a/integrations/lit-protocol/api/[id].ts b/integrations/lit-protocol/api/[id].ts deleted file mode 100644 index ce4631d..0000000 --- a/integrations/lit-protocol/api/[id].ts +++ /dev/null @@ -1,32 +0,0 @@ -import { env } from "@/env.mjs" - -import { prisma } from "@/lib/prisma" - -export async function GET( - req: Request, - { params }: { params: { id: string } } -) { - try { - if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set") - - const id = params.id - const message = await prisma.litProtocolMessage.findFirst({ - where: { - id: id, - }, - }) - - if (!message) { - return new Response("Message not found", { status: 404 }) - } - - return new Response(JSON.stringify(message), { - status: 200, - headers: { "Content-Type": "application/json" }, - }) - } catch (e) { - const errorMessage = e instanceof Error ? e.message : String(e) - console.log(errorMessage) - return new Response(errorMessage, { status: 500 }) - } -} diff --git a/integrations/lit-protocol/api/encrypt.ts b/integrations/lit-protocol/api/encrypt.ts deleted file mode 100644 index 67d9ad4..0000000 --- a/integrations/lit-protocol/api/encrypt.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { env } from "@/env.mjs" -import { z } from "zod" - -import { prisma } from "@/lib/prisma" - -const encryptSchema = z.object({ - encryptedString: z.string(), - accessControlConditions: z.array(z.any()), - encryptedSymmetricKeyString: z.string(), -}) - -export async function POST(req: Request) { - try { - if (!env.DATABASE_URL) throw new Error("DATABASE_URL not set") - - const { - encryptedString, - accessControlConditions, - encryptedSymmetricKeyString, - } = encryptSchema.parse(await req.json()) - - if ( - !encryptedString || - !accessControlConditions || - !encryptedSymmetricKeyString - ) { - return new Response( - JSON.stringify({ ok: false, error: "Invalid parameters" }), - { - status: 400, - headers: { "Content-Type": "application/json" }, - } - ) - } - - const litProtocolMessage = await prisma.litProtocolMessage.create({ - data: { - encryptedString, - metadata: { - accessControlConditions, - encryptedSymmetricKey: encryptedSymmetricKeyString, - }, - }, - }) - - return new Response(JSON.stringify(litProtocolMessage), { - status: 200, - headers: { "Content-Type": "application/json" }, - }) - } catch (e) { - const errorMessage = e instanceof Error ? e.message : String(e) - console.error(errorMessage) - return new Response(JSON.stringify({ ok: false, error: errorMessage }), { - status: 500, - headers: { "Content-Type": "application/json" }, - }) - } -} diff --git a/integrations/lit-protocol/client.ts b/integrations/lit-protocol/client.ts deleted file mode 100644 index 03664d2..0000000 --- a/integrations/lit-protocol/client.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as LitJsSdk from "@lit-protocol/lit-node-client" - -/** - * This is a wrapper around the Lit Node Client SDK. - * It is used to create a single instance of the client - * that can be used throughout the application. - */ -const client = new LitJsSdk.LitNodeClient({}) - -export default client diff --git a/integrations/lit-protocol/components/access-control/access-control-single-address.tsx b/integrations/lit-protocol/components/access-control/access-control-single-address.tsx deleted file mode 100644 index 846b734..0000000 --- a/integrations/lit-protocol/components/access-control/access-control-single-address.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { useState, type ChangeEvent } from "react" -import { useForm } from "react-hook-form" -import { isAddress } from "viem" - -import { Button } from "@/components/ui/button" - -import { AccessControlProps } from "./types" - -interface FormSchema { - address: string -} - -export function AccessControlSingleAddress({ - setAccessControlConditions, -}: AccessControlProps) { - const [address, setAddress] = useState("") - - const { - register, - handleSubmit, - formState: { errors }, - } = useForm() - - const handleChange = (e: ChangeEvent) => { - setAddress(e.target.value) - } - - const onSubmit = (data: FormSchema) => { - setAccessControlConditions(getAccessControlConditions(data.address)) - } - - return ( -
    - - - isAddress(value) || "Invalid Ethereum address", - }, - })} - placeholder="0x1234567890123456789012345678901234567890" - type="text" - value={address} - onChange={handleChange} - /> - {errors.address && ( -

    - {String(errors.address?.message)} -

    - )} - -
    - ) -} - -const getAccessControlConditions = (address: string) => { - return [ - { - conditionType: "evmBasic", - contractAddress: "", - standardContractType: "", - chain: "ethereum", - method: "", - parameters: [":userAddress"], - returnValueTest: { - comparator: "=", - value: address, - }, - }, - ] -} diff --git a/integrations/lit-protocol/components/access-control/access-control-single-erc721.tsx b/integrations/lit-protocol/components/access-control/access-control-single-erc721.tsx deleted file mode 100644 index f46f29c..0000000 --- a/integrations/lit-protocol/components/access-control/access-control-single-erc721.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import { useState } from "react" -import { useForm } from "react-hook-form" -import { isAddress } from "viem" - -import { Button } from "@/components/ui/button" -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select" - -import { supportedChains } from "../../utils/config" -import { AccessControlProps } from "./types" - -interface FormSchema { - address: string - tokenId: string - chain: string -} - -export function AccessControlSingleERC721({ - setAccessControlConditions, -}: AccessControlProps) { - const [address, setAddress] = useState("") - const [tokenId, setTokenId] = useState() - const [chain, setChain] = useState("ethereum") - - const { - register, - handleSubmit, - formState: { errors }, - } = useForm() - - const onSubmit = (data: FormSchema) => { - setAccessControlConditions( - getAccessControlConditions(chain, data.address, data.tokenId) - ) - } - - return ( -
    -
    -
    - - -
    -
    - - - isAddress(value) || "Invalid Contract address", - }, - })} - placeholder="0x1234567890123456789012345678901234567890" - type="text" - value={address} - onChange={(e) => setAddress(e.target.value)} - /> - {errors.address && ( -

    - {String(errors.address?.message)} -

    - )} -
    -
    - - { - console.log(e.target.value) - setTokenId(Number(e.target.value)) - }} - /> - {errors.tokenId && ( -

    - {String(errors.tokenId?.message)} -

    - )} -
    - -
    -
    - ) -} - -const getAccessControlConditions = ( - chain: string, - address: string, - tokenId: string -) => { - return [ - { - conditionType: "evmBasic", - contractAddress: address, - standardContractType: "ERC721", - chain, - method: "ownerOf", - parameters: [tokenId], - returnValueTest: { - comparator: "=", - value: ":userAddress", - }, - }, - ] -} diff --git a/integrations/lit-protocol/components/access-control/access-control-token-group.tsx b/integrations/lit-protocol/components/access-control/access-control-token-group.tsx deleted file mode 100644 index 88934bd..0000000 --- a/integrations/lit-protocol/components/access-control/access-control-token-group.tsx +++ /dev/null @@ -1,228 +0,0 @@ -import { useState } from "react" -import { useForm } from "react-hook-form" -import { isAddress } from "viem" - -import { Button } from "@/components/ui/button" -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from "@/components/ui/select" - -import { supportedChains } from "../../utils/config" -import { AccessControlProps } from "./types" - -interface FormSchema { - chain: string - tokenType: string - address: string - tokenAmount: string - tokenId: string - tokenDecimals: string -} - -export function AccessControlTokenGroup({ - setAccessControlConditions, -}: AccessControlProps) { - const [address, setAddress] = useState("") - const [tokenAmount, setTokenAmount] = useState(0) - const [tokenType, setTokenType] = useState() - const [tokenDecimals, setTokenDecimals] = useState(18) - const [tokenId, setTokenId] = useState(0) - const [chain, setChain] = useState("ethereum") - - const { - register, - handleSubmit, - formState: { errors }, - } = useForm() - - const onSubmit = ({ address, tokenId, tokenAmount }: FormSchema) => { - setAccessControlConditions( - getAccessControlConditions( - chain, - address, - tokenType || "", - tokenAmount, - tokenId, - tokenDecimals - ) - ) - } - - return ( -
    -
    -
    - - -
    -
    - - - {errors.tokenType && ( -

    - {String(errors.tokenType?.message)} -

    - )} -
    -
    - - - isAddress(value) || "Invalid Contract address", - }, - })} - placeholder="0x1234567890123456789012345678901234567890" - type="text" - value={address} - onChange={(e) => setAddress(e.target.value)} - /> - {errors.address && ( -

    - {String(errors.address?.message)} -

    - )} -
    -
    - - - Number(value) > 0 || "Token amount must be greater than 0", - })} - value={tokenAmount} - onChange={(e) => { - console.log(e.target.value) - setTokenAmount(Number(e.target.value)) - }} - /> - {errors.tokenAmount && ( -

    - {String(errors.tokenAmount?.message)} -

    - )} -
    - {tokenType === "ERC1155" && ( -
    - - - Number(value) >= 0 || "Token ID must be positive", - })} - value={tokenId} - onChange={(e) => { - setTokenId(Math.floor(Number(e.target.value))) - }} - /> - {errors.tokenId && ( -

    - {String(errors.tokenId?.message)} -

    - )} -
    - )} - {tokenType === "ERC20" && ( -
    - - - Number(value) > 0 || "Token decimals must be positive", - })} - value={tokenDecimals} - onChange={(e) => { - setTokenDecimals(Math.floor(Number(e.target.value))) - }} - /> - {errors.tokenDecimals && ( -

    - {String(errors.tokenDecimals?.message)} -

    - )} -
    - )} - -
    -
    - ) -} - -const getAccessControlConditions = ( - chain: string, - address: string, - tokenType: string, - tokenAmount: string, - tokenId: string, - tokenDecimals: number -) => { - return [ - { - conditionType: "evmBasic", - contractAddress: address, - standardContractType: tokenType, - chain, - method: "balanceOf", - parameters: - tokenType === "ERC1155" ? [":userAddress", tokenId] : [":userAddress"], - returnValueTest: { - comparator: ">=", - value: - tokenType === "ERC20" - ? String(Number(tokenAmount) * 10 ** tokenDecimals) - : tokenAmount, - }, - }, - ] -} diff --git a/integrations/lit-protocol/components/access-control/index.ts b/integrations/lit-protocol/components/access-control/index.ts deleted file mode 100644 index 15982ff..0000000 --- a/integrations/lit-protocol/components/access-control/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { AccessControlSingleAddress } from "./access-control-single-address" -import { AccessControlSingleERC721 } from "./access-control-single-erc721" -import { AccessControlTokenGroup } from "./access-control-token-group" - -export { - AccessControlSingleAddress, - AccessControlSingleERC721, - AccessControlTokenGroup, -} diff --git a/integrations/lit-protocol/components/access-control/types.ts b/integrations/lit-protocol/components/access-control/types.ts deleted file mode 100644 index 5156ab3..0000000 --- a/integrations/lit-protocol/components/access-control/types.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Dispatch, SetStateAction } from "react" - -import { AccessControlConditions } from "../../utils/types" - -export interface AccessControlProps { - accessControlConditions: AccessControlConditions - setAccessControlConditions: Dispatch> -} diff --git a/integrations/lit-protocol/components/form-lit-decrypt-message.tsx b/integrations/lit-protocol/components/form-lit-decrypt-message.tsx deleted file mode 100644 index 6d864cc..0000000 --- a/integrations/lit-protocol/components/form-lit-decrypt-message.tsx +++ /dev/null @@ -1,147 +0,0 @@ -import { useState } from "react" -import { Separator } from "@radix-ui/react-select" -import { motion } from "framer-motion" -import { useForm } from "react-hook-form" - -import { FADE_DOWN_ANIMATION_VARIANTS } from "@/config/design" -import { useToast } from "@/lib/hooks/use-toast" -import { Button } from "@/components/ui/button" -import { Card, CardContent, CardFooter } from "@/components/ui/card" -import { Textarea } from "@/components/ui/textarea" -import { WalletConnect } from "@/components/blockchain/wallet-connect" -import { IsWalletConnected } from "@/components/shared/is-wallet-connected" -import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" - -import { useLitClient } from "../hooks/use-lit-client" - -interface FormLitDecryptMessageProps { - initialEencryptedMessageId: string -} - -export function FormLitDecryptMessage({ - initialEencryptedMessageId, -}: FormLitDecryptMessageProps) { - const [encryptedMessageId, setEncryptedMessageId] = useState( - initialEencryptedMessageId - ) - const [decryptedMessage, setDecryptedMessage] = useState() - const [isLoading, setIsLoading] = useState(false) - - const { decryptMessage } = useLitClient() - const { register, handleSubmit } = useForm() - const { toast, dismiss } = useToast() - - const isValid = encryptedMessageId.length > 0 - - const onSubmit = async () => { - if (!isValid) return - setIsLoading(true) - const { decryptedString, error } = await decryptMessage(encryptedMessageId) - setIsLoading(false) - - if (!error) { - setDecryptedMessage(decryptedString) - } else if (error === "Message not found") { - handleToast( - "No ID found", - "The ID you entered does not match any encrypted message. Please check the ID and try again." - ) - return - } else if (error === "Access denied") { - handleToast( - "Access denied", - "Your address do not met the access control conditions of this message." - ) - return - } else { - handleToast("Error", "Something went wrong. Please try again.") - return - } - } - - const handleToast = (title: string, description: string) => { - toast({ - title, - description, - }) - - setTimeout(() => { - dismiss() - }, 4200) - } - - return ( -
    - -
    - - - - - setEncryptedMessageId(e.target.value)} - /> - - - - -

    Encrypted message ID

    -

    - The ID of the encrypted message saved into a database. -

    -
    -
    -
    - {decryptedMessage && ( - - - -

    Decrypted Message:

    -