{"id":23536360,"url":"https://github.com/developerfred/admanager-subgraph","last_synced_at":"2026-02-07T15:03:57.903Z","repository":{"id":265017871,"uuid":"863277912","full_name":"developerfred/admanager-subgraph","owner":"developerfred","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-16T20:09:12.000Z","size":290,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-29T23:48:19.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developerfred.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-26T02:57:32.000Z","updated_at":"2024-09-26T03:23:52.000Z","dependencies_parsed_at":"2025-04-23T09:01:33.537Z","dependency_job_id":"d4c46f8a-3bcb-4cff-a75e-5baa15223196","html_url":"https://github.com/developerfred/admanager-subgraph","commit_stats":null,"previous_names":["developerfred/admanager-subgraph"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/developerfred/admanager-subgraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developerfred%2Fadmanager-subgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developerfred%2Fadmanager-subgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developerfred%2Fadmanager-subgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developerfred%2Fadmanager-subgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developerfred","download_url":"https://codeload.github.com/developerfred/admanager-subgraph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developerfred%2Fadmanager-subgraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29197670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-26T02:19:37.247Z","updated_at":"2026-02-07T15:03:57.889Z","avatar_url":"https://github.com/developerfred.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AdvertisementManager Subgraph\n\nThis subgraph indexes events from the AdvertisementManager contract on the Base network. It provides a comprehensive view of advertisements, user activities, and system statistics.\n\n## Queries\n\nHere are some example queries you can use to interact with the subgraph:\n\n### Global Statistics\n\n```graphql\n{\n  globalStats(id: \"1\") {\n    totalAdvertisements\n    totalEngagements\n    totalUsers\n    totalRewardsMinted\n  }\n}\n```\n\n### User Information\n\nGet user details:\n\n```graphql\n{\n  user(id: \"0x1234...\") {\n    address\n    level\n    reputation\n    achievementsCount\n    engagementsCount\n    totalRewardsEarned\n    referrals {\n      id\n    }\n    referrer {\n      id\n    }\n  }\n}\n```\n\nList top users by reputation:\n\n```graphql\n{\n  users(first: 10, orderBy: reputation, orderDirection: desc) {\n    id\n    address\n    reputation\n    level\n  }\n}\n```\n\n### Advertisements\n\nGet advertisement details:\n\n```graphql\n{\n  advertisement(id: \"0x5678...\") {\n    link\n    imageUrl\n    price\n    advertiser {\n      id\n      address\n    }\n    referrer {\n      id\n      address\n    }\n    engagementsCount\n    active\n  }\n}\n```\n\nList recent active advertisements:\n\n```graphql\n{\n  advertisements(\n    first: 20,\n    orderBy: blockTimestamp,\n    orderDirection: desc,\n    where: { active: true }\n  ) {\n    id\n    link\n    imageUrl\n    price\n    advertiser {\n      address\n    }\n    engagementsCount\n  }\n}\n```\n\n### Engagements\n\nGet recent engagements:\n\n```graphql\n{\n  engagementRecordeds(first: 100, orderBy: blockTimestamp, orderDirection: desc) {\n    adIndex\n    user\n    timestamp\n  }\n}\n```\n\n### Achievements\n\nList recent achievements:\n\n```graphql\n{\n  achievementUnlockeds(first: 50, orderBy: blockTimestamp, orderDirection: desc) {\n    user\n    achievementId\n    name\n  }\n}\n```\n\n### Special Events\n\nGet details of recent special events:\n\n```graphql\n{\n  specialEventStarteds(first: 10, orderBy: startTime, orderDirection: desc) {\n    name\n    startTime\n    endTime\n    rewardMultiplier\n  }\n}\n```\n\n### Complex Queries\n\nGet user with their advertisements and engagements:\n\n```graphql\n{\n  user(id: \"0x1234...\") {\n    address\n    level\n    reputation\n    advertisements {\n      id\n      link\n      engagementsCount\n    }\n    engagementRecordeds {\n      adIndex\n      timestamp\n    }\n  }\n}\n```\n\nGet top advertisers by engagement count:\n\n```graphql\n{\n  advertisements(first: 10, orderBy: engagementsCount, orderDirection: desc) {\n    advertiser {\n      address\n      level\n      reputation\n    }\n    link\n    engagementsCount\n  }\n}\n```\n\n## Notes\n\n- Replace `\"0x1234...\"` and `\"0x5678...\"` with actual entity IDs when querying.\n- The `first` parameter in list queries can be adjusted to retrieve more or fewer results.\n- Use `skip` parameter for pagination, e.g., `(first: 20, skip: 20)` for the second page.\n- Combine `where` conditions for more specific queries, e.g., `where: { active: true, price_gt: \"1000000000000000000\" }`.\n\nFor more information on how to build queries, refer to [The Graph's query API documentation](https://thegraph.com/docs/en/querying/graphql-api/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperfred%2Fadmanager-subgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloperfred%2Fadmanager-subgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloperfred%2Fadmanager-subgraph/lists"}