{"id":28380700,"url":"https://github.com/0xsequence/ethsigdb","last_synced_at":"2025-06-24T21:31:36.450Z","repository":{"id":247079451,"uuid":"824781991","full_name":"0xsequence/ethsigdb","owner":"0xsequence","description":"Ethereum event log signature lookup library","archived":false,"fork":false,"pushed_at":"2024-07-09T18:56:13.000Z","size":707,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T03:40:45.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/0xsequence.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-05T23:59:42.000Z","updated_at":"2024-07-09T18:56:15.000Z","dependencies_parsed_at":"2024-07-06T21:00:42.969Z","dependency_job_id":null,"html_url":"https://github.com/0xsequence/ethsigdb","commit_stats":null,"previous_names":["0xsequence/ethsigdb"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0xsequence/ethsigdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethsigdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethsigdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethsigdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethsigdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xsequence","download_url":"https://codeload.github.com/0xsequence/ethsigdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xsequence%2Fethsigdb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261759134,"owners_count":23205502,"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-05-30T03:09:03.919Z","updated_at":"2025-06-24T21:31:36.439Z","avatar_url":"https://github.com/0xsequence.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"ethsigdb\n========\n\nEthereum transaction log event signature database and Go lookup library.\n\nTo purpose of this dataset is to do a reverse lookup to convert an Ethereum\ntransaction log topicHash to the event defintion.\n\nFor example, when an ERC20 transfer transaction is mined, it will emit the\nevent log with topics[0] value of: `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef`\n\nIn order to look up from `0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef` what is\nthe actual event definition, we use this library and database to return:\n`Transfer(address,address,uint256)`.\n\nThis is useful when converting event data to human readable formats, or\nfor decoding an event.\n\n\n## Dataset\n\nThe signature dataset was originally sourced from https://github.com/otterscan/topic0\nwhich in turn is sourced from https://github.com/ethereum/sourcify. \n\nSignature data was copied into ./cmd/build-dataset/more_events_1.csv and additional\nevents are specified in ./cmd/build-dataset/more_events_2.csv. When running the build-dataset\nprogram, it will compute the topic hashes and store all datasets into ./ethsigdb.json.\n\nFinally, if you'd like to search for events by topic hash, you can use ./cmd/find-topics\nwhich will use the remote openchain.xyz service to look up events by their topic hash,\nand them print any topic hashes which are not in our local database, so you can copy\nthem over to ./cmd/build-dataset/more_events_2.csv and rebuild the local db.\n\n\n## Example\n\n```go\nsigdb := ethsigdb.Default()\n\n// Lookup event signature\ntopicHash := \"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\"\n\nevent, ok := sigdb.Lookup(topicHash)\nif !ok {\n  log.Fatal(\"event not found\")\n}\n\n// this will return Transfer(address,address,uint256)\nfmt.Println(\"found event!\", event)\n```\n\n\n## Caveats\n\nThere are a few caveats when using this database to decode generic events.\n\nEvent arguments may contain \"indexed\" arguments which are not necessary in the\norder of arguments, for example an event like, `Deposit(address indexed from, uint256 amount, uint256 expiry indexed)`\nhas two indexed arguments, but the topic hash for this event will be identical to `Deposit(address,uint256,uint256)`,\nyet without knowing that the first and third arguments are the ones which are indexed, then its not possible\nto do a reverse lookup and decode. For emitted events which have serial indexed arguments, then decoders\ncan try that path, but this is not a reliable assumption. Therefore, the best is to know the full event\ndefinition which includes the indexed arguments.\n\n\n## LICENSE\n\nApache 2.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsequence%2Fethsigdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xsequence%2Fethsigdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xsequence%2Fethsigdb/lists"}