diff --git a/db/gen/coredb/manifest.json b/db/gen/coredb/manifest.json index de81def63..792faea45 100644 --- a/db/gen/coredb/manifest.json +++ b/db/gen/coredb/manifest.json @@ -184803,541 +184803,6 @@ "name": "notifications" } }, - { - "text": "select id, deleted, version, created_at, last_updated, name, symbol, address, creator_address, chain, profile_banner_url, profile_image_url, badge_url, description, owner_address, is_provider_marked_spam, parent_id, override_creator_user_id, l1_chain from contracts where not deleted and chain = $1 limit 1000", - "name": "HighlightCreatorQC", - "cmd": ":many", - "columns": [ - { - "name": "id", - "not_null": true, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "deleted", - "not_null": true, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "bool" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "version", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "int4" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "created_at", - "not_null": true, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "", - "name": "timestamptz" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "last_updated", - "not_null": true, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "", - "name": "timestamptz" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "name", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "symbol", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "address", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "creator_address", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "chain", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "int4" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "profile_banner_url", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "profile_image_url", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "badge_url", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "description", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "owner_address", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "is_provider_marked_spam", - "not_null": true, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "bool" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "parent_id", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "override_creator_user_id", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "varchar" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - }, - { - "name": "l1_chain", - "not_null": true, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "pg_catalog", - "name": "int4" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - } - ], - "params": [ - { - "number": 1, - "column": { - "name": "chain", - "not_null": false, - "is_array": false, - "comment": "", - "length": -1, - "is_named_param": false, - "is_func_call": false, - "scope": "", - "table": { - "catalog": "", - "schema": "", - "name": "contracts" - }, - "table_alias": "", - "type": { - "catalog": "", - "schema": "", - "name": "pg_catalog.int4" - }, - "is_sqlc_slice": false, - "embed_table": null, - "original_name": "", - "unsigned": false, - "array_dims": 0 - } - } - ], - "comments": [], - "filename": "query.sql", - "insert_into_table": null - }, { "text": "select\n follows.follower,\n follows.followee\nfrom\n follows,\n users as followers,\n users as followees\nwhere\n follows.follower = followers.id\n and followers.deleted is false\n and follows.followee = followees.id\n and followees.deleted is false\n and follows.deleted = false", "name": "GetFollowGraphSource", diff --git a/db/gen/coredb/query.sql.go b/db/gen/coredb/query.sql.go index 76061e69a..8562709dd 100644 --- a/db/gen/coredb/query.sql.go +++ b/db/gen/coredb/query.sql.go @@ -6030,50 +6030,6 @@ func (q *Queries) HasMintedClaimsByWalletAddress(ctx context.Context, arg HasMin return i, err } -const highlightCreatorQC = `-- name: HighlightCreatorQC :many -select id, deleted, version, created_at, last_updated, name, symbol, address, creator_address, chain, profile_banner_url, profile_image_url, badge_url, description, owner_address, is_provider_marked_spam, parent_id, override_creator_user_id, l1_chain from contracts where not deleted and chain = $1 limit 1000 -` - -func (q *Queries) HighlightCreatorQC(ctx context.Context, chain persist.Chain) ([]Contract, error) { - rows, err := q.db.Query(ctx, highlightCreatorQC, chain) - if err != nil { - return nil, err - } - defer rows.Close() - var items []Contract - for rows.Next() { - var i Contract - if err := rows.Scan( - &i.ID, - &i.Deleted, - &i.Version, - &i.CreatedAt, - &i.LastUpdated, - &i.Name, - &i.Symbol, - &i.Address, - &i.CreatorAddress, - &i.Chain, - &i.ProfileBannerUrl, - &i.ProfileImageUrl, - &i.BadgeUrl, - &i.Description, - &i.OwnerAddress, - &i.IsProviderMarkedSpam, - &i.ParentID, - &i.OverrideCreatorUserID, - &i.L1Chain, - ); err != nil { - return nil, err - } - items = append(items, i) - } - if err := rows.Err(); err != nil { - return nil, err - } - return items, nil -} - const insertComment = `-- name: InsertComment :one INSERT INTO comments (ID, FEED_EVENT_ID, POST_ID, ACTOR_ID, REPLY_TO, TOP_LEVEL_COMMENT_ID, COMMENT) diff --git a/db/queries/core/query.sql b/db/queries/core/query.sql index 863dda477..e1f3caecc 100644 --- a/db/queries/core/query.sql +++ b/db/queries/core/query.sql @@ -2057,6 +2057,3 @@ update highlight_mint_claims set last_updated = now(), status = $1, internal_tok -- name: AddAppMintAnnouncementNotificationToUser :exec insert into notifications (id, deleted, owner_id, last_updated, created_at, action, data, event_ids, seen, amount) values (@notification_id, false, @user_id, now(), now(), 'Announcement', '{"announcement_details": {"title": "Thank you for downloading the Gallery mobile app", "platform": "Web", "image_url": "https://highlight-creator-assets.highlight.xyz/main/base-dir/5b5d06ee-679c-4ead-90bf-aa784e9aabcc/previews/3.png?d=152x152&attempt=2", "description": "Tap to claim your unique mint of Radiance by MCHX", "internal_id": "apr-2024-mchx-collab"}}', '{2egglIVtSLLWmsPv3szwgkQmCd7}', false, 1); - --- name: HighlightCreatorQC :many -select * from contracts where not deleted and chain = $1 limit 1000; diff --git a/secrets/dev/backend-env.yaml b/secrets/dev/backend-env.yaml index 9c13748de..a9c483a5f 100644 --- a/secrets/dev/backend-env.yaml +++ b/secrets/dev/backend-env.yaml @@ -88,6 +88,7 @@ PRIVY_APP_VERIFICATION_PUBLIC_KEY: ENC[AES256_GCM,data:jSJzPxDJ/n6FaMojUpemWMiQp HIGHLIGHT_APP_ID: ENC[AES256_GCM,data:ZUhS02ARAWXKJDuvSpUyMxevxctmRKGw,iv:s98KgDIaSSeLusI2lsylK6Q7eq53xJylAuXwW82xIL8=,tag:Rodqm2bADkvbZHRD2E5goA==,type:str] HIGHLIGHT_APP_SECRET: ENC[AES256_GCM,data:nS1Qgy27iga6rd/etU3jUsTIUh5CazV37+ppu38yMzU8S9zP1CFNeVcJ3Y0=,iv:FeqB4pt5VwKG7aOYuB2EFAc8Yyuv6UE6y5w2yLFbmYA=,tag:3gfCZS+bWBLNI+DrZnWn5Q==,type:str] MINT_PROCESSING_QUEUE: ENC[AES256_GCM,data:PoGygWdFDMW9O0y851A4tYi71/M9rsRf2uOF25CiqHMJtn45UgAJUezZjapR8d1R2r6hZc/C7ra+Sq+sh/3BsDiP,iv:adVEuH4dMW/OAx5UXwTINi7RZcEE3dZUP46Mhzz0Dpc=,tag:n0GCcBBaA/Z5b1RHy3t+5Q==,type:str] +SIMPLEHASH_API_KEY: ENC[AES256_GCM,data:IB2RUf7WQELj5uYHTaWqdPFlYzo1v/hOcCjM/Nhqv5Ii,iv:DUDFVVSbnIs+nkHLYjs7yGRZrmLuZF3MRxLatahQNQ4=,tag:nrkabAz63yivv8e/VOU9cw==,type:str] sops: kms: [] gcp_kms: @@ -97,8 +98,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-04-04T20:16:55Z" - mac: ENC[AES256_GCM,data:R7gzrXbFWtivhPviy1JXuE3In2UqAeseQEx73AY1gp5RWc1p0f9j7qL6PkM7lh4Tq3x0/LdKnFd5yRqmRtKWblwKp//gl0Pa7rGyX8czyPJgH5kC8CAykRDFeoASJA8C3+yz/jvsEcXExT68m4ZNDP0/Y+Ruqmuc/9cosyUR0as=,iv:us5JexxnieUntD0VgdQpCRgYJwGl2/JoZKE+YyInSJU=,tag:awEWaW4xn6pFL5ssTPJXOg==,type:str] + lastmodified: "2024-04-10T22:54:26Z" + mac: ENC[AES256_GCM,data:nwM2OwfuLUUTWNLp04goXWtNSWdIKJcIsmkOZoASIrMHT/8P/rDN+iKKwnsICQ6u1ezdnlqDhKE3YH1EINzR+qrvlQuXiL2m3iqJmyCFYf9IPD8wTzlli2ymP5C9EFDIC3AyGyvA087oxzAJuw1ixBxmtuemsx8qTLU0hUx815s=,iv:TTyZPGJHPygM8guxbgnEsKy27xZznu+2Fs5COjP/FMY=,tag:VakhF/X2hmsOpDQGQYsUAA==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.7.3 diff --git a/secrets/dev/backend-sandbox-env.yaml b/secrets/dev/backend-sandbox-env.yaml index f52ba373f..dc848beee 100644 --- a/secrets/dev/backend-sandbox-env.yaml +++ b/secrets/dev/backend-sandbox-env.yaml @@ -86,6 +86,7 @@ PRIVY_APP_VERIFICATION_PUBLIC_KEY: ENC[AES256_GCM,data:PKS5+N5Ul2TBTVa5RVFI6G6jh HIGHLIGHT_APP_ID: ENC[AES256_GCM,data:LUkGigiD4Tt0rCe1K9zNygJ8gRmRfRYd,iv:PcnjyXRa9nPAniZlcgtcK9gknAkYdlO/WcepnCPgz04=,tag:u32oHy9KfLfSCiW/4QsVNQ==,type:str] HIGHLIGHT_APP_SECRET: ENC[AES256_GCM,data:kfZh434sLAnxNltuA9aSqB6BVmA/iZThpguZs0LvZ46Gu3m13V+88gQicks=,iv:O+EVZnOSdxRWCLWRJ3V0rnx/zWozPtaHSh1wyO1UVYo=,tag:vrbN8n6YHzhAxlf+CBOE8A==,type:str] MINT_PROCESSING_QUEUE: ENC[AES256_GCM,data:fCWjGRXl+xJ+osNUxG6NXDwyrbQAsQi3g5Bl7isPs6VFM7kSvuiDybm9GchVpSQqNNUfPcln7P/hLMxMR2rp0n1s,iv:AZO/PbLzSCOQN/f3TKwHLf84ETdc3U6DZwpN1ocxMsM=,tag:0RQGQQu+5YthT2wWTXusuA==,type:str] +SIMPLEHASH_API_KEY: ENC[AES256_GCM,data:P54T58+VZ4gL7t11gHVJmJmLsIDq3YcH5TzA6fUkqT7n,iv:BAC3++k8JF2uiq9dcEVdh5rnUEK6kJksmvPbztycVBU=,tag:1cKhkZyPGEQy3q4/+GWNpg==,type:str] sops: kms: [] gcp_kms: @@ -95,8 +96,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-03-28T00:16:10Z" - mac: ENC[AES256_GCM,data:aeU2Dkd5gWRJ3fVgEhfMdOwUwmSLJXlvFk7cyBqJPzAfiJ2J8ho73d3qavJjM5tXZvVwlsvEmfWjPE4IOy7hMO6pZ0MVqVq6zD3PIbFjaqnc/I+kaJf30Z4HYjqyMcmRw28DqkHvKziTzrrermBdg3knaUwMzX5vg4C6h5zkdbo=,iv:P5w6BnMul84GQOTilHpuQOlmzUh+B+RLyAm+4btbme8=,tag:kdNCzvIaQb06o5IGymZzew==,type:str] + lastmodified: "2024-04-10T22:56:04Z" + mac: ENC[AES256_GCM,data:u2RGmpD4ZdN+9J2X/JPb6FoIqnkiO8DBiDpot1ATMZNSUlDG9r8nqN/hI5azjt+kBtn/NWWbsyYAWXf81uW5uhgBzsO5vmLNxi5DVbW3ueys2CCPJ39roAy04zAasvu+XQIM+mrYRPc60gPu+PFSd5eWHKpNV+3U1+vQsLo43DU=,iv:ZmNIhj/03iz1CGjS5BY2C8x1lXKMX4c3kX+y+DhRTiU=,tag:VK7753a7ZtVqPVDKENKnOg==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.7.3 diff --git a/secrets/dev/local/app-dev-backend.yaml b/secrets/dev/local/app-dev-backend.yaml index bab8b26ff..b0c372d87 100644 --- a/secrets/dev/local/app-dev-backend.yaml +++ b/secrets/dev/local/app-dev-backend.yaml @@ -62,6 +62,7 @@ PRIVY_APP_VERIFICATION_PUBLIC_KEY: ENC[AES256_GCM,data:Qj9y9WDxGqbb2y77bidznNJ2j HIGHLIGHT_APP_ID: ENC[AES256_GCM,data:ThvGU2eKf+RyBGZMSnI7QIoOScVwaWxS,iv:SskP5Mga0Xz0YHBWwtLbvKjP97JVZmGt/vhV1lQgYTo=,tag:WxUEm8NxhNpAe1l65Kca0A==,type:str] HIGHLIGHT_APP_SECRET: ENC[AES256_GCM,data:MGt9kI/vsW35MfhhUxDWL7P8hl2cdLFkrlHoLbDujGNtBN1jyzQdiKNYvH0=,iv:Z3kXaNR7Sv3x4mln+uPDEa79TRrPWiTBrr4PAD93EnQ=,tag:PJukXHXaNAB3+3TnCRIRUQ==,type:str] MINT_PROCESSING_QUEUE: ENC[AES256_GCM,data:OduekZoXNS2Yk666BTRqOyxVniDENC/0PEksF5Ose/jpWGZJ5QSYy5G5EukavNbENlNhdDdk4+mVqP8QShzl36su,iv:kdU5nGSTzrE+Ce91TYvuLIg0IJ/1/VVequ0lvedck2g=,tag:4Lgw8O36HOCNJYCHKOQASw==,type:str] +SIMPLEHASH_API_KEY: ENC[AES256_GCM,data:/HtCKleC/Y4GoKpBZDlFmyVafSYRx8a9Mlqgcj8JMOPy,iv:aJZl00smpn2kVJY8GCDahKlu4nkedKherLgB/SMgHbQ=,tag:xvMsSsBxUN8aa/okh9qYMQ==,type:str] sops: kms: [] gcp_kms: @@ -71,8 +72,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-03-18T21:17:36Z" - mac: ENC[AES256_GCM,data:rkfd3P4oBzV4v72Cb2r3uAiGoi8F0g4jKkgLgSglL3t6bnPdDebNqa8sjxGrVVVl5coXgJP7Dt+yQQEjL/7HB+qvFNakDbY+pxkroA6P66dycRg5Rh4vdUTaCxcnyX264ap+PIyA/WNSfmZ0kO8+h130RyEPZk9xV1ERkp8BlbQ=,iv:+Lo9E/OTBJzeGsuCWIYANnMQvKkJj75TWq7ubOYUpoM=,tag:b5PTX0mCsbsNCN/hmFsthQ==,type:str] + lastmodified: "2024-04-10T22:55:03Z" + mac: ENC[AES256_GCM,data:BaFlWcxxL7NhkqTE2Ghc9OCpF+hMDEFTsNX9qbT3E7h4yWDwzYShrURg9TYefPeOfOfo3TfRcqtuG20yR8JGuqvLRZM5ADQIbVn2svDnniW9VJAPTn1HOG0oXtgrxFkNjNykgIVr3RabKpgmOqXHSIOPQ3Awg8KXrVQB8OKWaGo=,iv:BcoPjuVVcoUnJiwOYBLLRAMRxNhvJ1+sUZtd43Fp/kQ=,tag:pw/idTljMg3eUBnVlMCTFQ==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.7.3 diff --git a/secrets/dev/local/app-dev-tokenprocessing.yaml b/secrets/dev/local/app-dev-tokenprocessing.yaml index 9b125fd17..82634a94d 100644 --- a/secrets/dev/local/app-dev-tokenprocessing.yaml +++ b/secrets/dev/local/app-dev-tokenprocessing.yaml @@ -33,6 +33,7 @@ PUSH_NOTIFICATIONS_SECRET: ENC[AES256_GCM,data:uKNXIJ++dQF6Ey+4AQyz8LNTHOf6fA64K HIGHLIGHT_APP_ID: ENC[AES256_GCM,data:NpkI/9UvLhGBz7l/3pVCDHshck7kg5KN,iv:UNxFJcSuQEIb7SFAvUWV13Zv/DXNahtIYZhLymtomEk=,tag:1dfb+rrcIigv0GZYGD6g7Q==,type:str] HIGHLIGHT_APP_SECRET: ENC[AES256_GCM,data:uOCz++Sj+6wD67cW/BZPf8coG/CWTT+QW2jORDbOs8xs+4jAM8FFCK2MIQw=,iv:vbFe8J5bO8wUP8Y3r1MSel0SyOwfn/LZfjVyFn5k4Wg=,tag:OORIUODRkw49/ka7WXGLEQ==,type:str] MINT_PROCESSING_QUEUE: ENC[AES256_GCM,data:gPsHLLM/alEF6zSeVXUUuM9rMlAl/EdY0tcYZkJ01VXc1n+OCuT+NVbaTl27eP8EfmeVR99zeLsxykJRI6gFSxF8,iv:GHWXerEJSnQ6cUdJ0Nr/wqhRZ6/AopEb8zHGVScZGBQ=,tag:i0WZnWBcuwfn/aq5Gup6bw==,type:str] +SIMPLEHASH_API_KEY: ENC[AES256_GCM,data:0yE/H1BMHKVHOTQ7/DGHqfI7j6WLIRsvdRpthpcfP81K,iv:smWX8Iq3CzI6cxyDth7Q6Fqd0UZ3C5cEBX86/3VV4Zo=,tag:ZjbQ2EFzgt3YUN8hK7nFRA==,type:str] sops: kms: [] gcp_kms: @@ -42,8 +43,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-04-04T20:29:34Z" - mac: ENC[AES256_GCM,data:tNG+40wCTpsU9leT8SVZgJb7UIeNoCixODMx1If2pcklhyRX/s8NetPOBGT74WMRGre3TxM1o7KsE89mOyxi0NEF1WmrZWhOOhjs+W6yIhdQNBRdxiYKSFq6JgEaRzo4IS8U0HyVhPJ4DXrRzYcc3c1n+/wMQ7h/eQuxVfKOalY=,iv:r89nsAO5THPfaXYFsJecfd6iQs+4bdD1W1R+ad2Hhng=,tag:O+ARrxh6vc+HipnNvTra/w==,type:str] + lastmodified: "2024-04-10T22:55:15Z" + mac: ENC[AES256_GCM,data:gQeX0IGNsdKDTQxe2y/orai4EBU2TTd3KIB0W9g1GnO7kWiFljDBccfEVF0DYv3qN0xZnT/8oswu3KsNurH+nndi8heG1Sw/EnU1Ao8aS9MLXSS2UutiknrUPRr4H4lCnRhcpwb4EzDHQZGnKef2KDEBehzxXUbcTyeGgt3xLK4=,iv:G366S7XUOa8Gvaqsc8l6CEw8yhb5Yp7JQiznxhGnhMk=,tag:FgTKiny5fW2MjAkwVF5D4w==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.7.3 diff --git a/secrets/dev/tokenprocessing-env.yaml b/secrets/dev/tokenprocessing-env.yaml index fa367f109..7b3b199b7 100644 --- a/secrets/dev/tokenprocessing-env.yaml +++ b/secrets/dev/tokenprocessing-env.yaml @@ -50,6 +50,7 @@ PUSH_NOTIFICATIONS_SECRET: ENC[AES256_GCM,data:SAt2EnIe/TYrlBov2RuiKHw8a0d1hGuby HIGHLIGHT_APP_ID: ENC[AES256_GCM,data:rg/LLzgcoThGvc77e/O/ND02yw6t0gNf,iv:2iWSJ97IBnsomKGQQnogDXfXKqWaDB3tz4wJ1GfngOY=,tag:3dZtOGs158JJiIRcqZg2AQ==,type:str] HIGHLIGHT_APP_SECRET: ENC[AES256_GCM,data:5Hr9JCnw63cAY2+FumuQs8Og6U6Ds0TZwv3dCTIrDir63WwVe5ZCsfn+46k=,iv:E2lsalt03ueeMI5bYrEwMkHfrwCiGPgEtgMg7Kf6ZNQ=,tag:5b5TrLCF8xCLBqX/VcyS3g==,type:str] MINT_PROCESSING_QUEUE: ENC[AES256_GCM,data:uBwToSnl2F7fJ1xe8ZW2u1RBRNFoA2OxBx+DGY3z4KLtZbyOEx+NKTppNL+J52IxC7AmkIBUDpCtIV6KjhCrM3N9,iv:3ydpAv45Pv13fhkcKewU/onkazvqnYsdJrdsPQQPHI8=,tag:cI4fhzOBoY7jOJXF9rmBEw==,type:str] +SIMPLEHASH_API_KEY: ENC[AES256_GCM,data:V3mUtMvnZ7e7AUdzR+3DMZXgVSW6zJqpZAS+zMcOtLLQ,iv:fcaHZqbwI0m21G1T+xu2pqxzjnQqCZc1OuohZtpccpE=,tag:RiXz4RZO/ECBWoI3OZU/tw==,type:str] sops: kms: [] gcp_kms: @@ -59,8 +60,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-04-04T20:29:10Z" - mac: ENC[AES256_GCM,data:sLgHyWKWHz8FR1HFPGONgHZ8Bd2PMThiEg4t/M5tLOSs6ccrQgDJyde+WYEXTMq63hwSj7ZtP+2eEP/rVH/QS2BalN8y3a6bq9yLDIu91tuc9IkkUcq34lGtYK+lVGvy7bcXg7E9yguP2mq7vKFSxaZOmGnBrkB/GvMI+lKmqUM=,iv:eDb+uhodNvNh9v/juCfnx1lw0pkYUOBrv5iVSJIFNQ8=,tag:Y4eVI1jZ5FH2n7wo9+cRug==,type:str] + lastmodified: "2024-04-10T22:54:52Z" + mac: ENC[AES256_GCM,data:sR/umYk+iXJm3yFTHTThGIRjJT2G8SPPQ6zO8mC7KnC/r3QxPznl/rRm+TaLMTKQGJh5ZYAC5+Q2YdqjdTekX3AumHFm9m9amiJKwgclBm1rS/r+boeu4twgJraUY1swvfdoG57oREMK9dRLPV34PfzwYU0plGJfplhawLNgdlY=,iv:N8rNi3OjjBlUiISRU2r2c0N5syRDZiDme0MAN+wSv0I=,tag:G5YMrtUMSu1Z7tkodYzJJQ==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.7.3 diff --git a/secrets/local/local/app-local-tokenprocessing.yaml b/secrets/local/local/app-local-tokenprocessing.yaml index c0dfd77ab..0060db19e 100644 --- a/secrets/local/local/app-local-tokenprocessing.yaml +++ b/secrets/local/local/app-local-tokenprocessing.yaml @@ -31,6 +31,7 @@ RESERVOIR_API_KEY: ENC[AES256_GCM,data:O9GMojA+pWGCaTAbz5uPdWZKgQYTey4hEHQLAuvCN RPC_URL: ENC[AES256_GCM,data:okz4btF69/wAuRUcOmeWK+KlT/iEAVBbaA7u7CNWrzwacOznCzRk5CmYPvGkFHlHA88WRhWJo5zWuGXmnlaQm22jKv+A,iv:sDuFgCdpcBkN1MprvbAwGX/SOdqJOzz48mEVVKwtYq0=,tag:7cQc67Q5NDtMHSKw44sR8A==,type:str] HIGHLIGHT_APP_ID: ENC[AES256_GCM,data:O/KQvwvr25+Hvmnb9vIwNoeKboumaA8w,iv:JYd7rXNjeZGrEMugeeSNx/iQDTgWEpyvXBrfWf5hTyY=,tag:Yc7zCzCujazaTOMVjsoI/A==,type:str] HIGHLIGHT_APP_SECRET: ENC[AES256_GCM,data:W+12hQfTTbMn9XKiUxci2stPBJbih3R4pxujNzTMtOjgYZLX5M67XR9qQkk=,iv:qHxf7cEBTUKemxjQj+CfEmXIdN4Zg8lUqfS9KSkPR+c=,tag:txci0OT+0vr4epxrlQL3iQ==,type:str] +SIMPLEHASH_API_KEY: ENC[AES256_GCM,data:V+czV/sYvFhZauvZnbFjTp7j/n6JD3p5X5V2ZlzSORxW,iv:bN21L6+mjFh0oC24jaflh4JK+Kwt9PJWPJYyRyscghQ=,tag:yhFipHrSMOjs0PHFFzt+AQ==,type:str] sops: kms: [] gcp_kms: @@ -40,8 +41,8 @@ sops: azure_kv: [] hc_vault: [] age: [] - lastmodified: "2024-03-18T19:54:46Z" - mac: ENC[AES256_GCM,data:jVaBuJpLfQGuX35Aepxd3Fpob3jZuj/x4AF+BjzYvqiIciAkKfuxe9zwtSWCXiwKUu8BA2iP/3wBvPzKatADk8B/FLewfEb1nsJ/CLkT2diZsA3U3sQUSauWdCNalp5sgihij9uDD42hchzzB2IH005vWRvMBehlBZ+Z0Hj9hf0=,iv:cDRkVCpKt0kG5q4TxbwW8q+F//z6xD9i2VypsUsjIwA=,tag:gatPG+kEXVHHs/XxO5uRyQ==,type:str] + lastmodified: "2024-04-10T22:54:17Z" + mac: ENC[AES256_GCM,data:t4m47LSKphQr46D8Ki0fo2NOfu9f5VLl8tN0CDX3Pkzh8Z0RkfSQ2pLfd06Tb30HJQstMw4Mb37tgAd3antj16idF/H9jI8omvQ5iEwJRRCP13Tr8DAaeMEXnIC1iu0/RjNwYIatxNNQoaypwRWEXBuv5MY7a0an7ppF2THV3n4=,iv:Esm3toJATd2Gr2Rkdwku/GZ4b954/46TKdLvfZanCEc=,tag:wYpWYgI4rSafzAcFzqruGA==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.7.3 diff --git a/service/multichain/multichain.go b/service/multichain/multichain.go index 52799a1d1..c524e0582 100644 --- a/service/multichain/multichain.go +++ b/service/multichain/multichain.go @@ -93,7 +93,6 @@ type ChainAgnosticContractDescriptors struct { Description string `json:"description"` ProfileImageURL string `json:"profile_image_url"` OwnerAddress persist.Address `json:"owner_address"` - CreatorAddress persist.Address `json:"creator_address"` } // ChainAgnosticIdentifiers identify tokens despite their chain diff --git a/service/multichain/simplehash/simplehash.go b/service/multichain/simplehash/simplehash.go index 4dc721d12..3792456d2 100644 --- a/service/multichain/simplehash/simplehash.go +++ b/service/multichain/simplehash/simplehash.go @@ -5,10 +5,8 @@ import ( "fmt" "net/http" "net/url" - // "sort" "strconv" "strings" - // "time" "github.com/sourcegraph/conc/pool" @@ -349,10 +347,9 @@ func translateToChainAgnosticToken(t simplehashNFT, ownerAddress persist.Address func translateToChainAgnosticContract(address string, contract simplehashContract, collection simplehashCollection) mc.ChainAgnosticContract { c := mc.ChainAgnosticContract{ Descriptors: mc.ChainAgnosticContractDescriptors{ - Symbol: contract.Symbol, - Name: contract.Name, - OwnerAddress: persist.Address(contract.OwnedBy), - CreatorAddress: persist.Address(contract.DeployedBy), + Symbol: contract.Symbol, + Name: contract.Name, + OwnerAddress: persist.Address(util.FirstNonEmptyString(contract.OwnedBy, contract.DeployedBy)), }, Address: persist.Address(address), IsSpam: util.ToPointer(isSpamCollection(collection)), @@ -401,10 +398,10 @@ func (p *Provider) GetTokenByTokenIdentifiersAndOwner(ctx context.Context, tIDs next := u.String() var token simplehashNFT - var body getNftsByWalletResponse outer: - for ; next != "" && token.TokenID == ""; next = body.Next { + for next != "" && token.TokenID == "" { + var body getNftsByWalletResponse err := readResponseBodyInto(ctx, p.httpClient, next, &body) if err != nil { @@ -417,6 +414,8 @@ outer: break outer } } + + next = body.Next } if token.TokenID == "" { @@ -452,9 +451,9 @@ func (p *Provider) binRequestsByContract(ctx context.Context, address persist.Ad u = setSpamThreshold(u, spamScoreThreshold) next := u.String() - var body getContractsByWalletResponse + for next != "" { + var body getContractsByWalletResponse - for ; next != ""; next = body.Next { err := readResponseBodyInto(ctx, p.httpClient, next, &body) if err != nil { errCh <- err @@ -490,13 +489,13 @@ func (p *Provider) binRequestsByContract(ctx context.Context, address persist.Ad requestBinTotals = append(requestBinTotals[:addedToBinIdx], requestBinTotals[addedToBinIdx+1:]...) } } + next = body.Next } // Send the remaining bins for _, bin := range requestBins { outCh <- bin } - }() return outCh, errCh @@ -538,9 +537,8 @@ func (p *Provider) GetTokensIncrementallyByWalletAddress(ctx context.Context, ad next := u.String() - var body getNftsByWalletResponse - - for ; next != ""; next = body.Next { + for next != "" { + var body getNftsByWalletResponse err := readResponseBodyInto(ctx, p.httpClient, next, &body) if err != nil { @@ -558,6 +556,8 @@ func (p *Provider) GetTokensIncrementallyByWalletAddress(ctx context.Context, ad } outCh <- page + + next = body.Next } }) } @@ -728,8 +728,8 @@ func (p *Provider) GetContractsByCreatorAddress(ctx context.Context, address per } for i := range deployed { - if !hasOwner[i] { - // You are the creator on Gallery when you are the deployer and there is no owner() + // You are the creator on Gallery when you are the deployer and there is no owner() + if !hasOwner[i] && !seen[deployed[i].Address] { contracts = append(contracts, deployed[i]) } } @@ -744,9 +744,9 @@ func (p *Provider) GetContractsByOwnerAddress(ctx context.Context, address persi u = setWallet(u, address) next := u.String() - var body getContractsByOwnerResponse + for next != "" { + var body getContractsByOwnerResponse - for ; next != ""; next = body.Next { err := readResponseBodyInto(ctx, p.httpClient, next, &body) if err != nil { return nil, err @@ -762,6 +762,8 @@ func (p *Provider) GetContractsByOwnerAddress(ctx context.Context, address persi contract := translateToChainAgnosticContract(c.ContractAddress, c.simplehashContract, collection) contracts = append(contracts, contract) } + + next = body.Next } return contracts, nil @@ -775,9 +777,9 @@ func (p *Provider) GetContractsByDeployerAddress(ctx context.Context, address pe u = setWallet(u, address) next := u.String() - var body getContractsByDeployerResponse + for next != "" { + var body getContractsByDeployerResponse - for ; next != ""; next = body.Next { err := readResponseBodyInto(ctx, p.httpClient, next, &body) if err != nil { return nil, nil, err @@ -794,6 +796,8 @@ func (p *Provider) GetContractsByDeployerAddress(ctx context.Context, address pe contracts = append(contracts, contract) hasOwner = append(hasOwner, c.OwnedBy != "") } + + next = body.Next } return contracts, hasOwner, nil