{"id":25245875,"url":"https://github.com/lit-protocol/dune-old","last_synced_at":"2025-04-05T21:19:18.658Z","repository":{"id":260449283,"uuid":"867518601","full_name":"LIT-Protocol/dune-old","owner":"LIT-Protocol","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-07T11:13:50.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T12:24:13.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://agent-explorer-beige.vercel.app","language":"JavaScript","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/LIT-Protocol.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}},"created_at":"2024-10-04T08:09:36.000Z","updated_at":"2025-03-07T11:13:54.000Z","dependencies_parsed_at":"2025-01-14T01:21:32.105Z","dependency_job_id":"55e0e46b-9848-468e-adeb-20c980710a36","html_url":"https://github.com/LIT-Protocol/dune-old","commit_stats":null,"previous_names":["lit-protocol/dune-update-scripts","lit-protocol/dune-scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LIT-Protocol%2Fdune-old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LIT-Protocol","download_url":"https://codeload.github.com/LIT-Protocol/dune-old/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247400526,"owners_count":20932988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-02-12T02:03:14.186Z","updated_at":"2025-04-05T21:19:18.451Z","avatar_url":"https://github.com/LIT-Protocol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Getting Started\nTo trigger the script\n```\nnpm run start\n```\n\n## Working\nIt works in two parts:\n- Fetches Genius API for their realtime wrapped keys data\n- Fetches Yellowstone Blockchain for new PKPs minted after last table update\n\n### Relies on 3 DBs\n- genius_wk_api\n- yellowstone_pkp_api\n- latest_blocks_api\n\n### Genius Wrapped Keys\n- Uses `/clear` endpoint to clear existing table from Dune\n- Fetches from API\n- Filters for keytype and appends to the object array\n- Converts to CSV\n- Uses `/insert` endpoint to push the csv to Dune\n- Uses `/execute` endpoint to refresh the query responsible for fetching from table\n\n### Yellowstone PKPs\n- Stores starting and end block for each scan on Blocks Table\n- Fetches Blocks Table for end block to use it as a starting block for next scan\n- Scans Yellowstone till the current block\n- Convert to results to csv, also creates a csv for start and block of this scan\n- Uses `/insert` and `/execute` to push and refresh Yellowstone table\n- Uses `/clear` endpoint to clear existing Blocks table from Dune\n- Uses `/insert` and `/execute` to push and refresh Blocks table","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-protocol%2Fdune-old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flit-protocol%2Fdune-old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-protocol%2Fdune-old/lists"}