{"id":37851566,"url":"https://github.com/blocky/abi","last_synced_at":"2026-01-16T16:13:26.265Z","repository":{"id":320502327,"uuid":"1082068125","full_name":"blocky/abi","owner":"blocky","description":"Minimal Go library for generic ABI encoding/decoding without reflection or code generation","archived":false,"fork":false,"pushed_at":"2025-10-24T04:49:34.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-24T06:24:29.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","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/blocky.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-23T17:28:09.000Z","updated_at":"2025-10-24T04:49:36.000Z","dependencies_parsed_at":"2025-10-24T06:24:33.277Z","dependency_job_id":"4af50623-df30-418d-82e4-cfaaf7468043","html_url":"https://github.com/blocky/abi","commit_stats":null,"previous_names":["blocky/abi"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/blocky/abi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocky%2Fabi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocky%2Fabi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocky%2Fabi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocky%2Fabi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blocky","download_url":"https://codeload.github.com/blocky/abi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocky%2Fabi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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":"2026-01-16T16:13:26.194Z","updated_at":"2026-01-16T16:13:26.252Z","avatar_url":"https://github.com/blocky.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# abi\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/blocky/abi.svg)](https://pkg.go.dev/github.com/blocky/abi)\n[![Go Report Card](https://goreportcard.com/badge/github.com/blocky/abi)](https://goreportcard.com/report/github.com/blocky/abi)\n[![Go Version](https://img.shields.io/badge/go-1.24.6+-blue.svg)](https://golang.org/dl/)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"abi gopher mascot\" src=\"./assets/abi-gopher.png\" /\u003e\n\u003c/p\u003e\n\nA minimal Go library for **ABI encoding and decoding** without reflection or code generation.\n\n## Why abi?\n\n- 🚀 **Zero dependencies** (except testing)\n- ⚡ **No reflection** - fast and predictable performance\n- 🔧 **No code generation** - simple integration\n- 📏 **ABI compliant** - follows Ethereum ABI encoding standards\n- 🧪 **Well tested** - comprehensive test suite\n- 📦 **Lightweight** - minimal API surface\n\n## Quick Start\n\n### Installation\n\n```bash\ngo get github.com/blocky/abi\n```\n\n### Basic Usage\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"log\"\n\n    \"github.com/blocky/abi\"\n)\n\nfunc main() {\n    // Encode a tuple (uint64, bytes, uint64)\n    encoded, err := abi.NewTupleEncoder().\n        Uint64(42).\n        Bytes([]byte(\"hello world\")).\n        Uint64(123).\n        Encode()\n    if err != nil {\n        log.Fatal(err)\n    }\n    fmt.Printf(\"Encoded tuple: %x\\n\", encoded)\n\n    // Decode the tuple back\n    var num1 uint64\n    var data []byte\n    var num2 uint64\n\n    err = abi.NewTupleDecoder().\n        Uint64(\u0026num1).\n        Bytes(\u0026data).\n        Uint64(\u0026num2).\n        Decode(encoded)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    fmt.Printf(\"Decoded: %d, %s, %d\\n\", num1, data, num2)\n    // Output: \n    // Decoded: 42, hello world, 123\n}\n```\n\n### Simple Types\n\n```go\n// Encode/decode individual types\nencoded := abi.EncodeUint64(42)\ndecoded, err := abi.DecodeUint64(encoded)\n\nencodedBytes, err := abi.EncodeBytes([]byte(\"hello\"))\ndecodedBytes, err := abi.DecodeBytes(encodedBytes)\n```\n\n## Features\n\n### Supported ABI Types\n\n- **`uint64`** - 64-bit unsigned integers\n- **`bytes`** - Dynamic byte arrays\n- **`[]bytes`** - Array of byte arrays\n- **Tuples** - Complex structures combining multiple types\n\nWith more planned, feel free to open an issue or PR!\n\n## Development\n\nIf you have nix installed, you can create a development environment with:\n\n```bash\nnix develop\n```\nOr set up your environment manually by installing standard Go tools and `just`.\n\n### Running Tests\n\n```bash\n# Run all tests\ngo test ./...\n\n# or use just\njust test\n```\n\n### Project Structure\n\n```\n├── abi.go               # Main library code\n├── abi_test.go          # Public API tests\n├── abi_internal_test.go # Internal function tests\n├── abitestdata_test.go  # Test data and fixtures\n└── assets/              # Documentation assets\n```\n\nTo maintain compatibility with the ethereum ABI standard, we test against\noutputs from the [go-ethereum](https://github.com/ethereum/go-ethereum)\nlibrary.  We generate these outputs using the `abi-testdata` tool, which\nis developed in [abi-testdata](https://github.com/blocky/abi-testdata).\nIf you would like to add new types, you will likely need to update that\nproject to add additional test data.\n\n### Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Add tests for new functionality\n5. Ensure all tests pass (`just pre-pr`)\n6. Commit your changes (`git commit -am 'Add amazing feature'`)\n7. Push to the branch (`git push origin feature/amazing-feature`)\n8. Open a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocky%2Fabi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblocky%2Fabi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocky%2Fabi/lists"}