{"id":26373182,"url":"https://github.com/evzpav/ethereum-transaction-parser","last_synced_at":"2025-03-17T01:27:37.012Z","repository":{"id":247457876,"uuid":"823405603","full_name":"evzpav/ethereum-transaction-parser","owner":"evzpav","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-08T18:11:39.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-08T22:55:57.674Z","etag":null,"topics":["ethereum","golang","rpc"],"latest_commit_sha":null,"homepage":"","language":"Go","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/evzpav.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-07-03T01:29:11.000Z","updated_at":"2024-07-08T22:56:06.097Z","dependencies_parsed_at":"2024-07-08T23:10:52.578Z","dependency_job_id":null,"html_url":"https://github.com/evzpav/ethereum-transaction-parser","commit_stats":null,"previous_names":["evzpav/ethereum-transaction-parser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evzpav%2Fethereum-transaction-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evzpav%2Fethereum-transaction-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evzpav%2Fethereum-transaction-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evzpav%2Fethereum-transaction-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evzpav","download_url":"https://codeload.github.com/evzpav/ethereum-transaction-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243956924,"owners_count":20374576,"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":["ethereum","golang","rpc"],"created_at":"2025-03-17T01:27:36.509Z","updated_at":"2025-03-17T01:27:36.994Z","avatar_url":"https://github.com/evzpav.png","language":"Go","readme":"# Ethereum Transactions Parser\n\nIt is a server written in Golang, which run in intervals of 10 seconds(variable) to get all transactions from latest parsed block until the lastest block in Ethereum blockchain.\n\n## Running\n```bash\n    go run main.go\n\n```\n\nIt has a REST API running on http://localhost:8787 with 3 endpoints:\n\n1. POST /subscribe\n\n    Request body format:\n    ```\n        {\n           \"address\": \"0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5\"\n        }\n    ```  \n    Response: \n    ```\n        {\n\t        \"message\": \"0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5 subscribed\"\n        }\n    ```\n\n    Example:\n    ```\n    curl --request POST \\\n    --url http://localhost:8787/subscribe \\\n    --header 'Content-Type: application/json' \\\n    --data '{\n    \"address\": \"0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5\"\n    }'\n    ```\n\n 2. GET /transactions with query param `address`\n\n    Example: \n    ```\n        curl --request GET \\\n        --url 'http://localhost:8787/transactions?address=0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5'\n\n    ```\n\n    Response:\n    ```\n    {\n\t    \"transactions\": [\n            {\n                \"from\": \"0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5\",\n                \"to\": \"0xe688b84b23f322a994a53dbf8e15fa82cdb71127\",\n                \"hash\": \"0x7e13dbdfeaae5c54b565fff2b956ac87b04a8282d275e1b4fa8e800020e5228a\",\n                \"value\": \"0x7880111bfa36f6\",\n                \"type\": \"outbound\"\n            }\n        ]\n    }\n    ```\n\n3. GET /current-block\n\n    Example:\n\n    ```\n        curl --request GET  --url http://localhost:8787/current-block \n    ```\n    Response:\n    ```\n        {\n\t        \"currentBlock\": 20220631\n        }\n    ```\n\nAssumptions:\n1. Recent transactions are more important. Transactions since genesis block are not needed, only grabbing transactions of 10 blocks before starting the service.\n2. Transactions can be stored and shown in getTransaction endpoint in ascending order\n3. Running parser on interval of 10 seconds is fine.\n4. Not using websockets due to constraint of avoiding external libraries and different node url\n\n\nPotential improvements:\n1. Move nodeUrl and parseInterval to environment variables\n2. Run server with websockets to listen to latest block instead of running in intervals\n3. Create a worked who runs every so often parsing from current block backwards to genesis (if needed) filling historical transactions per address\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevzpav%2Fethereum-transaction-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevzpav%2Fethereum-transaction-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevzpav%2Fethereum-transaction-parser/lists"}