{"id":20669724,"url":"https://github.com/fox-one/4swap-events-demo","last_synced_at":"2026-04-20T15:32:06.643Z","repository":{"id":89475467,"uuid":"474849620","full_name":"fox-one/4swap-events-demo","owner":"fox-one","description":"A simple demo of getting the uniwap v2 events from specific endpoint and contract.","archived":false,"fork":false,"pushed_at":"2023-02-04T09:12:47.000Z","size":310,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-10T16:42:46.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/fox-one.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":"2022-03-28T04:51:20.000Z","updated_at":"2022-03-28T06:43:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca5a4062-8f37-4eef-8192-f5ca2e7435d0","html_url":"https://github.com/fox-one/4swap-events-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fox-one/4swap-events-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2F4swap-events-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2F4swap-events-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2F4swap-events-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2F4swap-events-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fox-one","download_url":"https://codeload.github.com/fox-one/4swap-events-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-one%2F4swap-events-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32053201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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-11-16T20:15:51.154Z","updated_at":"2026-04-20T15:32:06.621Z","avatar_url":"https://github.com/fox-one.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 4swap-sync-demo\n\n## Intro\n\nA simple demo of getting the [uniwap v2](https://docs.uniswap.org/protocol/V2/introduction) events from specific endpoint and contract.\n\nThese events include two parts,\n\n- From Factory\n\n```\nevent PairCreated(address indexed token0, address indexed token1, address pair, uint);\n```\n\n- From Pair\n\n```\nevent Mint(address indexed sender, uint amount0, uint amount1);\nevent Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\nevent Swap(\n        address indexed sender,\n        uint amount0In,\n        uint amount1In,\n        uint amount0Out,\n        uint amount1Out,\n        address indexed to\n    );\nevent Sync(uint112 reserve0, uint112 reserve1);\n```\n\n## Run\n\nTested on node versions `v16.14.2` and `v17.6.0`.\n\n1. Clone the project and enter it.\n2. Run `npm install` to install dependencies.\n3. Run `node subscribe.js \u003cendpoint\u003e \u003ccontract_address\u003e`.\n\nNode: the endpoint can be in `ws(s)` or `http(s)` format, for WebSocket will continuously print the latest events, HTTP not.\n\n## Contract Info\n\n- ETH Endpoint (RPC API): http://104.197.245.214:8545\n- Contract: 0x0A8a0058763A68E7f50A40356d050090E0D386F4\n- Chain ID: 83927\n- Block Browser: https://testnet.mvmscan.com/address/0x0A8a0058763A68E7f50A40356d050090E0D386F4/transactions\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffox-one%2F4swap-events-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffox-one%2F4swap-events-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffox-one%2F4swap-events-demo/lists"}