Skip to content

Instantly share code, notes, and snippets.

@sreyemnayr
Last active October 18, 2022 20:13
Show Gist options
  • Save sreyemnayr/fc5eccc8c46b94b42fd5ffb199d224d2 to your computer and use it in GitHub Desktop.
Save sreyemnayr/fc5eccc8c46b94b42fd5ffb199d224d2 to your computer and use it in GitHub Desktop.
all_token_ids = [];
const get_assets = async (page) => {
await fetch(`https://api.opensea.io/api/v1/assets?collection_slug=grassverse&order_direction=desc&limit=30&include_orders=false&cursor=${page}`).then((j) => j.json()).then(async (j)=>{
all_token_ids.push(...j.assets.map((m)=>m.token_id));
if(j.next){
await get_assets(j.next);
}
});
}
await get_assets("")
all_user_data = [];
processed_wallets = [];
for(let tokenId of all_token_ids){
owners = await fetch(`https://api.opensea.io/api/v1/asset/0x495f947276749Ce646f68AC8c248420045cb7b5e/${tokenId}/owners?limit=50&order_by=created_date&order_direction=desc`).then((j)=>j.json()).then((j)=>j.owners.map((m)=>m.owner.address));
for(let wallet of owners){
if(!processed_wallets.includes(wallet)){
username = await fetch("https://opensea.io/__api/graphql/", {
"headers": {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9",
"authorization": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiVlhObGNsUjVjR1U2TVRBek16VTBNQT09IiwidXNlcm5hbWUiOiJTdHJhbmdlcnVmZiIsImFkZHJlc3MiOiIweDNkMjE5OGZjMzkwN2U5ZDA5NWMyZDk3M2Q3ZWMzZjQyYjdjNjJkZmMiLCJpc3MiOiJPcGVuU2VhIiwiZXhwIjoxNjY2MTMxMjI2LCJvcmlnSWF0IjoxNjY2MDQ0ODI2LCJhcGlBY2Nlc3MiOiJub25lIn0.hlf9dVdURX1eJOssH5gzsGsPWq7MPc_j77YucNcBMKE",
"content-type": "application/json",
"sec-ch-ua": "\"Chromium\";v=\"106\", \"Google Chrome\";v=\"106\", \"Not;A=Brand\";v=\"99\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-app-id": "opensea-web",
"x-build-id": "5a2d925792c7ed4d499436955cfda665734f2c2a",
"x-signed-query": "91e8a42853a3992462bed37be3f96157e75f9276750db6cd4379a4b16f860c45",
},
"referrer": "https://opensea.io/",
"referrerPolicy": "strict-origin",
"body": `{\"id\":\"NavSearchAccountsQuery\",\"query\":\"query NavSearchAccountsQuery(\\n $query: String!\\n) {\\n accounts(first: 4, query: $query) {\\n edges {\\n node {\\n address\\n config\\n imageUrl\\n relayId\\n isCompromised\\n user {\\n publicUsername\\n id\\n }\\n ...accounts_url\\n id\\n }\\n }\\n }\\n}\\n\\nfragment accounts_url on AccountType {\\n address\\n user {\\n publicUsername\\n id\\n }\\n}\\n\",\"variables\":{\"query\":\"${wallet}\"}}`,
"method": "POST",
"mode": "cors",
"credentials": "include"
}).then((j)=>j.json()).then((j)=>j?.data?.accounts?.edges[0]?.node?.user?.publicUsername);
if(username != 'null'){
userdata = await fetch("https://opensea.io/__api/graphql/", {
"headers": {
"accept": "*/*",
"accept-language": "en-US,en;q=0.9",
"authorization": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiVlhObGNsUjVjR1U2TVRBek16VTBNQT09IiwidXNlcm5hbWUiOiJTdHJhbmdlcnVmZiIsImFkZHJlc3MiOiIweDNkMjE5OGZjMzkwN2U5ZDA5NWMyZDk3M2Q3ZWMzZjQyYjdjNjJkZmMiLCJpc3MiOiJPcGVuU2VhIiwiZXhwIjoxNjY2MTMxMjI2LCJvcmlnSWF0IjoxNjY2MDQ0ODI2LCJhcGlBY2Nlc3MiOiJub25lIn0.hlf9dVdURX1eJOssH5gzsGsPWq7MPc_j77YucNcBMKE",
"content-type": "application/json",
"sec-ch-ua": "\"Chromium\";v=\"106\", \"Google Chrome\";v=\"106\", \"Not;A=Brand\";v=\"99\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-app-id": "opensea-web",
"x-build-id": "5a2d925792c7ed4d499436955cfda665734f2c2a",
"x-signed-query": "112e509198e97bc2675e48e6d10f49050ab93db4bcf61407014c53bcebfc954b",
},
"referrer": "https://opensea.io/",
"referrerPolicy": "strict-origin",
"body": `{\"id\":\"AccountPageQuery\",\"query\":\"query AccountPageQuery(\\n $categories: [CollectionSlug!]\\n $chains: [ChainScalar!]\\n $collection: CollectionSlug\\n $collections: [CollectionSlug!]\\n $identity: IdentityInputType!\\n $creator: IdentityInputType\\n $isActivityTab: Boolean!\\n $isAssetsTab: Boolean!\\n $isOffersTab: Boolean!\\n $isBidsMadeTab: Boolean!\\n $isCreatedTab: Boolean!\\n $isCreatedCollectionsTab: Boolean!\\n $isPrivateTab: Boolean!\\n $isPrivate: Boolean!\\n $isAutoHidden: Boolean\\n $isSingleCollection: Boolean!\\n $numericTraits: [TraitRangeType!]\\n $query: String\\n $resultModel: SearchResultModel\\n $sortAscending: Boolean\\n $sortBy: SearchSortBy\\n $stringTraits: [TraitInputType!]\\n $toggles: [SearchToggle!]\\n $shouldShowQuantity: Boolean!\\n $showContextMenu: Boolean!\\n $includePrivateAssetCount: Boolean!\\n) {\\n account(identity: $identity) {\\n address\\n imageUrl\\n user {\\n username\\n publicUsername\\n id\\n }\\n metadata {\\n isBanned\\n }\\n ...profilePageQueries_account_8v4Bz\\n ...wallet_accountKey\\n privateAssetCount\\n ...PhoenixProfilePage_data\\n ...ProfileActionBar_data\\n ...profilePageQueries_featured_27d9G3\\n id\\n }\\n collection(collection: $collection) {\\n description\\n imageUrl\\n name\\n id\\n }\\n ...AccountCollections_data_3qpS2e @include(if: $isCreatedCollectionsTab)\\n sidebarCollected: query {\\n ...profilePageQueries_collected_3StDC7\\n }\\n sidebarCreated: query {\\n ...profilePageQueries_created_3StDC7\\n }\\n sidebarCreatedCollections: account(identity: $identity) {\\n ...profilePageQueries_createdCollections\\n id\\n }\\n assets: query @include(if: $isAssetsTab) {\\n ...AssetSearch_data_13XFcx\\n }\\n activity: query @include(if: $isActivityTab) {\\n ...ActivitySearch_data_3v36wc\\n }\\n offers: query @include(if: $isOffersTab) {\\n ...OfferSearch_data_2Kg4Sq\\n }\\n offers: query @include(if: $isBidsMadeTab) {\\n ...OfferSearch_data_2Kg4Sq\\n }\\n created: query @include(if: $isCreatedTab) {\\n ...AssetSearch_data_1DuISp\\n }\\n createdCollections: query @include(if: $isCreatedTab) {\\n ...AccountCollections_data_3qpS2e\\n }\\n private: query @include(if: $isPrivateTab) {\\n ...AssetSearch_data_3W3PQd\\n }\\n}\\n\\nfragment AccountCollections_data_3qpS2e on Query {\\n collectionsByCreator(collectionCreator: $identity, first: 12) {\\n edges {\\n node {\\n ...CreatedCollections_data\\n id\\n __typename\\n }\\n cursor\\n }\\n pageInfo {\\n endCursor\\n hasNextPage\\n }\\n }\\n}\\n\\nfragment ActivitySearch_data_3v36wc on Query {\\n collection(collection: $collection) @include(if: $isSingleCollection) {\\n includeTradingHistory\\n id\\n }\\n ...SearchPills_data_2Kg4Sq\\n}\\n\\nfragment ApplyForVerificationBanner_data on AccountType {\\n canViewVerificationForm\\n config\\n verificationRequest {\\n status\\n id\\n }\\n}\\n\\nfragment AssetCardBuyNow_data on AssetType {\\n tokenId\\n relayId\\n assetContract {\\n address\\n chain\\n id\\n }\\n orderData {\\n bestAskV2 {\\n relayId\\n priceType {\\n usd\\n }\\n id\\n }\\n }\\n}\\n\\nfragment AssetContextMenu_data on AssetType {\\n ...asset_edit_url\\n ...asset_url\\n ...itemEvents_data\\n relayId\\n isDelisted\\n creator {\\n address\\n id\\n }\\n imageUrl\\n}\\n\\nfragment AssetMediaAnimation_asset on AssetType {\\n ...AssetMediaImage_asset\\n}\\n\\nfragment AssetMediaAudio_asset on AssetType {\\n backgroundColor\\n ...AssetMediaImage_asset\\n}\\n\\nfragment AssetMediaContainer_asset_1xJxfu on AssetType {\\n backgroundColor\\n ...AssetMediaEditions_asset_1xJxfu\\n}\\n\\nfragment AssetMediaContainer_asset_2V84VL on AssetType {\\n backgroundColor\\n ...AssetMediaEditions_asset_2V84VL\\n}\\n\\nfragment AssetMediaContainer_asset_fdERL on AssetType {\\n backgroundColor\\n ...AssetMediaEditions_asset_fdERL\\n}\\n\\nfragment AssetMediaEditions_asset_1xJxfu on AssetType {\\n decimals\\n ownedQuantity(identity: {}) @include(if: $isAssetsTab)\\n}\\n\\nfragment AssetMediaEditions_asset_2V84VL on AssetType {\\n decimals\\n}\\n\\nfragment AssetMediaEditions_asset_fdERL on AssetType {\\n decimals\\n ownedQuantity(identity: $identity) @include(if: $shouldShowQuantity)\\n}\\n\\nfragment AssetMediaImage_asset on AssetType {\\n backgroundColor\\n imageUrl\\n collection {\\n displayData {\\n cardDisplayStyle\\n }\\n id\\n }\\n}\\n\\nfragment AssetMediaPlaceholderImage_asset on AssetType {\\n collection {\\n displayData {\\n cardDisplayStyle\\n }\\n id\\n }\\n}\\n\\nfragment AssetMediaVideo_asset on AssetType {\\n backgroundColor\\n ...AssetMediaImage_asset\\n}\\n\\nfragment AssetMediaWebgl_asset on AssetType {\\n backgroundColor\\n ...AssetMediaImage_asset\\n}\\n\\nfragment AssetMedia_asset on AssetType {\\n animationUrl\\n displayImageUrl\\n imageUrl\\n isDelisted\\n ...AssetMediaAnimation_asset\\n ...AssetMediaAudio_asset\\n ...AssetMediaContainer_asset_2V84VL\\n ...AssetMediaImage_asset\\n ...AssetMediaPlaceholderImage_asset\\n ...AssetMediaVideo_asset\\n ...AssetMediaWebgl_asset\\n}\\n\\nfragment AssetMedia_asset_1xJxfu on AssetType {\\n animationUrl\\n displayImageUrl\\n imageUrl\\n isDelisted\\n ...AssetMediaAnimation_asset\\n ...AssetMediaAudio_asset\\n ...AssetMediaContainer_asset_1xJxfu\\n ...AssetMediaImage_asset\\n ...AssetMediaPlaceholderImage_asset\\n ...AssetMediaVideo_asset\\n ...AssetMediaWebgl_asset\\n}\\n\\nfragment AssetMedia_asset_2V84VL on AssetType {\\n animationUrl\\n displayImageUrl\\n imageUrl\\n isDelisted\\n ...AssetMediaAnimation_asset\\n ...AssetMediaAudio_asset\\n ...AssetMediaContainer_asset_2V84VL\\n ...AssetMediaImage_asset\\n ...AssetMediaPlaceholderImage_asset\\n ...AssetMediaVideo_asset\\n ...AssetMediaWebgl_asset\\n}\\n\\nfragment AssetMedia_asset_fdERL on AssetType {\\n animationUrl\\n displayImageUrl\\n imageUrl\\n isDelisted\\n ...AssetMediaAnimation_asset\\n ...AssetMediaAudio_asset\\n ...AssetMediaContainer_asset_fdERL\\n ...AssetMediaImage_asset\\n ...AssetMediaPlaceholderImage_asset\\n ...AssetMediaVideo_asset\\n ...AssetMediaWebgl_asset\\n}\\n\\nfragment AssetQuantity_data on AssetQuantityType {\\n asset {\\n ...Price_data\\n id\\n }\\n quantity\\n}\\n\\nfragment AssetSearchFilter_data_1p1g0 on Query {\\n collection(collection: $collection) {\\n numericTraits {\\n key\\n value {\\n max\\n min\\n }\\n ...NumericTraitFilter_data\\n }\\n stringTraits {\\n key\\n ...StringTraitFilter_data\\n }\\n defaultChain {\\n identifier\\n }\\n enabledRarities\\n ...RarityFilter_data\\n ...useIsRarityEnabled_collection\\n id\\n }\\n ...PaymentFilter_data_2YoIWt\\n}\\n\\nfragment AssetSearchFilter_data_1upvW6 on Query {\\n collection(collection: $collection) {\\n numericTraits {\\n key\\n value {\\n max\\n min\\n }\\n ...NumericTraitFilter_data\\n }\\n stringTraits {\\n key\\n ...StringTraitFilter_data\\n }\\n defaultChain {\\n identifier\\n }\\n enabledRarities\\n ...RarityFilter_data\\n ...useIsRarityEnabled_collection\\n id\\n }\\n ...PaymentFilter_data_2YoIWt\\n}\\n\\nfragment AssetSearchFilter_data_294zey on Query {\\n collection(collection: $collection) {\\n numericTraits {\\n key\\n value {\\n max\\n min\\n }\\n ...NumericTraitFilter_data\\n }\\n stringTraits {\\n key\\n ...StringTraitFilter_data\\n }\\n defaultChain {\\n identifier\\n }\\n enabledRarities\\n ...RarityFilter_data\\n ...useIsRarityEnabled_collection\\n id\\n }\\n ...PaymentFilter_data_2YoIWt\\n}\\n\\nfragment AssetSearchList_data_164hN9 on ItemType {\\n __isItemType: __typename\\n __typename\\n relayId\\n ...ItemCard_data_tmliZ\\n ... on AssetType {\\n collection {\\n isVerified\\n relayId\\n id\\n }\\n ...asset_url\\n }\\n ... on AssetBundleType {\\n bundleCollection: collection {\\n isVerified\\n relayId\\n id\\n }\\n }\\n chain {\\n identifier\\n }\\n}\\n\\nfragment AssetSearchList_data_3Aax2O on ItemType {\\n __isItemType: __typename\\n __typename\\n relayId\\n ...ItemCard_data_3Aax2O\\n ... on AssetType {\\n collection {\\n isVerified\\n relayId\\n id\\n }\\n ...asset_url\\n }\\n ... on AssetBundleType {\\n bundleCollection: collection {\\n isVerified\\n relayId\\n id\\n }\\n }\\n chain {\\n identifier\\n }\\n}\\n\\nfragment AssetSearch_data_13XFcx on Query {\\n queriedAt\\n ...AssetSearchFilter_data_294zey\\n ...SearchPills_data_2Kg4Sq\\n search: searchItems(chains: $chains, categories: $categories, collections: $collections, first: 20, identity: $identity, numericTraits: $numericTraits, querystring: $query, resultType: $resultModel, sortAscending: $sortAscending, sortBy: $sortBy, stringTraits: $stringTraits, toggles: $toggles, prioritizeBuyNow: false) {\\n edges {\\n node {\\n __typename\\n relayId\\n ...AssetSearchList_data_3Aax2O\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n cursor\\n }\\n totalCount\\n pageInfo {\\n endCursor\\n hasNextPage\\n }\\n }\\n}\\n\\nfragment AssetSearch_data_1DuISp on Query {\\n queriedAt\\n ...AssetSearchFilter_data_1upvW6\\n ...SearchPills_data_2Kg4Sq\\n search: searchItems(chains: $chains, categories: $categories, collections: $collections, first: 20, numericTraits: $numericTraits, querystring: $query, resultType: $resultModel, sortAscending: $sortAscending, sortBy: $sortBy, stringTraits: $stringTraits, toggles: $toggles, creator: $creator, prioritizeBuyNow: false) {\\n edges {\\n node {\\n __typename\\n relayId\\n ...AssetSearchList_data_164hN9\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n cursor\\n }\\n totalCount\\n pageInfo {\\n endCursor\\n hasNextPage\\n }\\n }\\n}\\n\\nfragment AssetSearch_data_3W3PQd on Query {\\n queriedAt\\n ...AssetSearchFilter_data_1p1g0\\n ...SearchPills_data_2Kg4Sq\\n search: searchItems(chains: $chains, categories: $categories, collections: $collections, first: 20, identity: $identity, numericTraits: $numericTraits, querystring: $query, resultType: $resultModel, sortAscending: $sortAscending, sortBy: $sortBy, stringTraits: $stringTraits, toggles: $toggles, isPrivate: $isPrivate, isAutoHidden: $isAutoHidden, prioritizeBuyNow: false) {\\n edges {\\n node {\\n __typename\\n relayId\\n ...AssetSearchList_data_3Aax2O\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n cursor\\n }\\n totalCount\\n pageInfo {\\n endCursor\\n hasNextPage\\n }\\n }\\n}\\n\\nfragment CollectionLink_assetContract on AssetContractType {\\n address\\n blockExplorerLink\\n}\\n\\nfragment CollectionLink_collection on CollectionType {\\n name\\n slug\\n verificationStatus\\n ...collection_url\\n}\\n\\nfragment CreatedCollectionCard_data on CollectionType {\\n logo\\n banner\\n name\\n ...collection_url\\n verificationStatus\\n}\\n\\nfragment CreatedCollections_data on CollectionType {\\n relayId\\n ...CreatedCollectionCard_data\\n}\\n\\nfragment FeaturedShelfAssets_data_27d9G3 on AccountShelfType {\\n shelfAssets {\\n id\\n displayOrder\\n asset {\\n id\\n name\\n displayImageUrl\\n ...asset_url\\n }\\n ...PhoenixAsset_data_27d9G3\\n }\\n}\\n\\nfragment ItemAddToCartButton_order on OrderV2Type {\\n maker {\\n address\\n id\\n }\\n item {\\n __typename\\n ...itemEvents_dataV2\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n openedAt\\n ...ShoppingCartContextProvider_inline_order\\n}\\n\\nfragment ItemCardAnnotations_27d9G3 on ItemType {\\n __isItemType: __typename\\n relayId\\n __typename\\n ... on AssetType {\\n chain {\\n identifier\\n }\\n decimals\\n favoritesCount\\n isDelisted\\n isFrozen\\n hasUnlockableContent\\n ...AssetCardBuyNow_data\\n orderData {\\n bestAskV2 {\\n ...ItemAddToCartButton_order\\n orderType\\n maker {\\n address\\n id\\n }\\n id\\n }\\n }\\n ...AssetContextMenu_data @include(if: $showContextMenu)\\n }\\n ... on AssetBundleType {\\n chain {\\n identifier\\n }\\n assetCount\\n orderData {\\n bestAskV2 {\\n ...ItemAddToCartButton_order\\n orderType\\n maker {\\n address\\n id\\n }\\n id\\n }\\n }\\n }\\n}\\n\\nfragment ItemCardContent_1xJxfu on ItemType {\\n __isItemType: __typename\\n __typename\\n ... on AssetType {\\n relayId\\n name\\n ...AssetMedia_asset_1xJxfu\\n }\\n ... on AssetBundleType {\\n assetQuantities(first: 18) {\\n edges {\\n node {\\n asset {\\n relayId\\n ...AssetMedia_asset\\n id\\n }\\n id\\n }\\n }\\n }\\n }\\n}\\n\\nfragment ItemCardContent_2V84VL on ItemType {\\n __isItemType: __typename\\n __typename\\n ... on AssetType {\\n relayId\\n name\\n ...AssetMedia_asset_2V84VL\\n }\\n ... on AssetBundleType {\\n assetQuantities(first: 18) {\\n edges {\\n node {\\n asset {\\n relayId\\n ...AssetMedia_asset\\n id\\n }\\n id\\n }\\n }\\n }\\n }\\n}\\n\\nfragment ItemCardContent_fdERL on ItemType {\\n __isItemType: __typename\\n __typename\\n ... on AssetType {\\n relayId\\n name\\n ...AssetMedia_asset_fdERL\\n }\\n ... on AssetBundleType {\\n assetQuantities(first: 18) {\\n edges {\\n node {\\n asset {\\n relayId\\n ...AssetMedia_asset\\n id\\n }\\n id\\n }\\n }\\n }\\n }\\n}\\n\\nfragment ItemCardFooter_27d9G3 on ItemType {\\n __isItemType: __typename\\n name\\n orderData {\\n bestBidV2 {\\n orderType\\n priceType {\\n unit\\n }\\n ...PriceContainer_data\\n id\\n }\\n bestAskV2 {\\n orderType\\n priceType {\\n unit\\n }\\n maker {\\n address\\n id\\n }\\n ...PriceContainer_data\\n id\\n }\\n }\\n ...ItemMetadata\\n ...ItemCardAnnotations_27d9G3\\n ... on AssetType {\\n tokenId\\n isDelisted\\n defaultRarityData {\\n ...RarityIndicator_data\\n id\\n }\\n collection {\\n slug\\n name\\n isVerified\\n ...collection_url\\n ...useIsRarityEnabled_collection\\n id\\n }\\n }\\n ... on AssetBundleType {\\n bundleCollection: collection {\\n slug\\n name\\n isVerified\\n ...collection_url\\n ...useIsRarityEnabled_collection\\n id\\n }\\n }\\n}\\n\\nfragment ItemCard_data_27d9G3 on ItemType {\\n __isItemType: __typename\\n __typename\\n relayId\\n orderData {\\n bestAskV2 {\\n priceType {\\n eth\\n }\\n id\\n }\\n }\\n ...ItemCardContent_2V84VL\\n ...ItemCardFooter_27d9G3\\n ...item_url\\n ... on AssetType {\\n isDelisted\\n ...itemEvents_data\\n }\\n}\\n\\nfragment ItemCard_data_3Aax2O on ItemType {\\n __isItemType: __typename\\n __typename\\n relayId\\n orderData {\\n bestAskV2 {\\n priceType {\\n eth\\n }\\n id\\n }\\n }\\n ...ItemCardContent_fdERL\\n ...ItemCardFooter_27d9G3\\n ...item_url\\n ... on AssetType {\\n isDelisted\\n ...itemEvents_data\\n }\\n}\\n\\nfragment ItemCard_data_tmliZ on ItemType {\\n __isItemType: __typename\\n __typename\\n relayId\\n orderData {\\n bestAskV2 {\\n priceType {\\n eth\\n }\\n id\\n }\\n }\\n ...ItemCardContent_1xJxfu\\n ...ItemCardFooter_27d9G3\\n ...item_url\\n ... on AssetType {\\n isDelisted\\n ...itemEvents_data\\n }\\n}\\n\\nfragment ItemMetadata on ItemType {\\n __isItemType: __typename\\n __typename\\n orderData {\\n bestAskV2 {\\n closedAt\\n id\\n }\\n }\\n assetEventData {\\n lastSale {\\n unitPriceQuantity {\\n ...AssetQuantity_data\\n id\\n }\\n }\\n }\\n}\\n\\nfragment NumericTraitFilter_data on NumericTraitTypePair {\\n key\\n value {\\n max\\n min\\n }\\n}\\n\\nfragment OfferSearch_data_2Kg4Sq on Query {\\n ...SearchPills_data_2Kg4Sq\\n}\\n\\nfragment OrderListItem_order on OrderV2Type {\\n relayId\\n item {\\n __typename\\n displayName\\n ... on AssetType {\\n assetContract {\\n ...CollectionLink_assetContract\\n id\\n }\\n collection {\\n slug\\n verificationStatus\\n ...CollectionLink_collection\\n id\\n }\\n ...AssetMedia_asset\\n ...asset_url\\n ...useAssetFees_asset\\n }\\n ... on AssetBundleType {\\n assetQuantities(first: 30) {\\n edges {\\n node {\\n asset {\\n displayName\\n relayId\\n assetContract {\\n ...CollectionLink_assetContract\\n id\\n }\\n collection {\\n slug\\n verificationStatus\\n ...CollectionLink_collection\\n id\\n }\\n ...StackedAssetMedia_assets\\n ...AssetMedia_asset\\n ...asset_url\\n id\\n }\\n id\\n }\\n }\\n }\\n }\\n ...itemEvents_dataV2\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n remainingQuantityType\\n ...OrderPrice\\n}\\n\\nfragment OrderList_orders on OrderV2Type {\\n item {\\n __typename\\n ... on AssetType {\\n __typename\\n relayId\\n }\\n ... on AssetBundleType {\\n __typename\\n assetQuantities(first: 30) {\\n edges {\\n node {\\n asset {\\n relayId\\n id\\n }\\n id\\n }\\n }\\n }\\n }\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n relayId\\n ...useTotalItems_orders\\n ...OrderListItem_order\\n}\\n\\nfragment OrderPrice on OrderV2Type {\\n priceType {\\n unit\\n }\\n perUnitPriceType {\\n unit\\n }\\n dutchAuctionFinalPriceType {\\n unit\\n }\\n openedAt\\n closedAt\\n payment {\\n ...TokenPricePayment\\n id\\n }\\n}\\n\\nfragment PaymentFilter_data_2YoIWt on Query {\\n paymentAssets(first: 10) {\\n edges {\\n node {\\n symbol\\n id\\n __typename\\n }\\n cursor\\n }\\n pageInfo {\\n endCursor\\n hasNextPage\\n }\\n }\\n PaymentFilter_collection: collection(collection: $collection) {\\n paymentAssets {\\n symbol\\n id\\n }\\n id\\n }\\n}\\n\\nfragment PhoenixAsset_data_27d9G3 on AccountShelfAssetType {\\n asset {\\n ...ItemCard_data_27d9G3\\n id\\n }\\n}\\n\\nfragment PhoenixProfileImage_data on AccountType {\\n ...ProfileImage_data\\n imageUrl\\n user {\\n publicUsername\\n id\\n }\\n displayName\\n}\\n\\nfragment PhoenixProfilePage_data on AccountType {\\n address\\n bio\\n bannerImageUrl\\n config\\n isCompromised\\n relayId\\n displayName\\n showAutoHiddenBanner\\n names {\\n name\\n type\\n }\\n user {\\n dateJoined\\n id\\n }\\n ...ApplyForVerificationBanner_data\\n ...accounts_url\\n ...ProfileImage_data\\n ...PhoenixProfileImage_data\\n ...socialLinksData\\n ...profilePageQueries_featured_27d9G3\\n}\\n\\nfragment PriceContainer_data on OrderV2Type {\\n ...OrderPrice\\n}\\n\\nfragment Price_data on AssetType {\\n decimals\\n imageUrl\\n symbol\\n usdSpotPrice\\n assetContract {\\n blockExplorerLink\\n chain\\n id\\n }\\n}\\n\\nfragment ProfileActionBar_data on AccountType {\\n relayId\\n address\\n names {\\n name\\n type\\n }\\n ...accounts_url\\n}\\n\\nfragment ProfileImage_data on AccountType {\\n imageUrl\\n}\\n\\nfragment RarityFilter_data on CollectionType {\\n representativeRarityData {\\n maxRank\\n id\\n }\\n}\\n\\nfragment RarityIndicator_data on RarityDataType {\\n rank\\n rankPercentile\\n rankCount\\n maxRank\\n}\\n\\nfragment SearchPills_data_2Kg4Sq on Query {\\n selectedCollections: collections(first: 25, collections: $collections, includeHidden: true) {\\n edges {\\n node {\\n imageUrl\\n name\\n slug\\n id\\n }\\n }\\n }\\n}\\n\\nfragment ShoppingCartContextProvider_inline_order on OrderV2Type {\\n relayId\\n item {\\n __typename\\n chain {\\n identifier\\n }\\n relayId\\n ... on AssetBundleType {\\n assetQuantities(first: 30) {\\n edges {\\n node {\\n asset {\\n relayId\\n id\\n }\\n id\\n }\\n }\\n }\\n }\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n payment {\\n relayId\\n id\\n }\\n remainingQuantityType\\n ...useTotalItems_orders\\n ...ShoppingCart_orders\\n}\\n\\nfragment ShoppingCartDetailedView_orders on OrderV2Type {\\n relayId\\n item {\\n __typename\\n chain {\\n identifier\\n }\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n supportsGiftingOnPurchase\\n ...useTotalPrice_orders\\n ...OrderList_orders\\n}\\n\\nfragment ShoppingCartFooter_orders on OrderV2Type {\\n ...useTotalPrice_orders\\n}\\n\\nfragment ShoppingCart_orders on OrderV2Type {\\n relayId\\n item {\\n __typename\\n relayId\\n chain {\\n identifier\\n }\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n payment {\\n relayId\\n symbol\\n id\\n }\\n ...ShoppingCartDetailedView_orders\\n ...ShoppingCartFooter_orders\\n ...useTotalPrice_orders\\n}\\n\\nfragment StackedAssetMedia_assets on AssetType {\\n relayId\\n ...AssetMedia_asset\\n collection {\\n logo\\n id\\n }\\n}\\n\\nfragment StringTraitFilter_data on StringTraitType {\\n counts {\\n count\\n value\\n }\\n key\\n}\\n\\nfragment TokenPricePayment on PaymentAssetType {\\n symbol\\n chain {\\n identifier\\n }\\n asset {\\n imageUrl\\n assetContract {\\n blockExplorerLink\\n id\\n }\\n id\\n }\\n}\\n\\nfragment accounts_url on AccountType {\\n address\\n user {\\n publicUsername\\n id\\n }\\n}\\n\\nfragment asset_edit_url on AssetType {\\n assetContract {\\n address\\n chain\\n id\\n }\\n tokenId\\n collection {\\n slug\\n id\\n }\\n}\\n\\nfragment asset_url on AssetType {\\n assetContract {\\n address\\n id\\n }\\n tokenId\\n chain {\\n identifier\\n }\\n}\\n\\nfragment bundle_url on AssetBundleType {\\n slug\\n chain {\\n identifier\\n }\\n}\\n\\nfragment collection_url on CollectionType {\\n slug\\n isCategory\\n}\\n\\nfragment itemEvents_data on AssetType {\\n relayId\\n assetContract {\\n address\\n id\\n }\\n tokenId\\n chain {\\n identifier\\n }\\n}\\n\\nfragment itemEvents_dataV2 on ItemType {\\n __isItemType: __typename\\n relayId\\n chain {\\n identifier\\n }\\n ... on AssetType {\\n tokenId\\n assetContract {\\n address\\n id\\n }\\n }\\n}\\n\\nfragment item_url on ItemType {\\n __isItemType: __typename\\n __typename\\n ... on AssetType {\\n ...asset_url\\n }\\n ... on AssetBundleType {\\n ...bundle_url\\n }\\n}\\n\\nfragment profilePageQueries_account_8v4Bz on AccountType {\\n user {\\n favoriteAssetCount\\n id\\n }\\n privateAssetCount @include(if: $includePrivateAssetCount)\\n}\\n\\nfragment profilePageQueries_collected_3StDC7 on Query {\\n searchItems(identity: $identity, first: 0) {\\n totalCount\\n }\\n}\\n\\nfragment profilePageQueries_createdCollections on AccountType {\\n createdCollectionExists\\n}\\n\\nfragment profilePageQueries_created_3StDC7 on Query {\\n searchItems(creator: $identity, first: 0, resultType: ASSETS) {\\n totalCount\\n }\\n}\\n\\nfragment profilePageQueries_featured_27d9G3 on AccountType {\\n shelves {\\n id\\n name\\n description\\n displayOrder\\n ...FeaturedShelfAssets_data_27d9G3\\n }\\n}\\n\\nfragment socialLinksData on AccountType {\\n metadata {\\n instagramUsername\\n twitterUsername\\n websiteUrl\\n }\\n connectedTwitterUsername\\n connectedInstagramUsername\\n}\\n\\nfragment useAssetFees_asset on AssetType {\\n openseaSellerFeeBasisPoints\\n totalCreatorFee\\n}\\n\\nfragment useIsRarityEnabled_collection on CollectionType {\\n slug\\n enabledRarities\\n isEligibleForRarity\\n}\\n\\nfragment useTotalItems_orders on OrderV2Type {\\n item {\\n __typename\\n relayId\\n ... on AssetBundleType {\\n assetQuantities(first: 30) {\\n edges {\\n node {\\n asset {\\n relayId\\n id\\n }\\n id\\n }\\n }\\n }\\n }\\n ... on Node {\\n __isNode: __typename\\n id\\n }\\n }\\n}\\n\\nfragment useTotalPrice_orders on OrderV2Type {\\n relayId\\n perUnitPriceType {\\n usd\\n unit\\n }\\n dutchAuctionFinalPriceType {\\n usd\\n unit\\n }\\n openedAt\\n closedAt\\n payment {\\n symbol\\n ...TokenPricePayment\\n id\\n }\\n}\\n\\nfragment wallet_accountKey on AccountType {\\n address\\n}\\n\",\"variables\":{\"categories\":null,\"chains\":null,\"collection\":null,\"collectionQuery\":null,\"collections\":[],\"eventTypes\":null,\"identity\":{\"username\":\"${username}\"},\"creator\":null,\"isActivityTab\":false,\"isAssetsTab\":true,\"isOffersTab\":false,\"isBidsMadeTab\":false,\"isCreatedTab\":false,\"isCreatedCollectionsTab\":false,\"isPrivateTab\":false,\"isPrivate\":false,\"isAutoHidden\":null,\"isSingleCollection\":false,\"numericTraits\":null,\"query\":null,\"resultModel\":null,\"sortAscending\":null,\"sortBy\":\"LAST_SALE_PRICE\",\"stringTraits\":null,\"toggles\":null,\"shouldShowQuantity\":true,\"showContextMenu\":false,\"includePrivateAssetCount\":false}}`,
"method": "POST",
"mode": "cors",
"credentials": "include"
}).then((j) => j.json()).then((j) => [wallet, j?.data?.account?.user?.publicUsername, j.data?.account?.metadata?.twitterUsername, j?.data?.account?.connectedTwitterUsername]);
all_user_data.push(userdata);
} else {
all_user_data.push([wallet, undefined, undefined, undefined]);
}
processed_wallets.push(wallet);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment